Commit 6fc26524 authored by dje's avatar dje
Browse files

Merge branch 'core_resources_refactoring'

parents 37a1b789 5400e370
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
<?xml version="1.0"?>
<configuration xmlns:xi="http://www.w3.org/2001/XInclude">
  <basexBaseURI/>
  <baseURI></baseURI>
  <editions> 
  </editions>
</configuration>
+6 −7
Original line number Diff line number Diff line
@@ -20,8 +20,7 @@ declare
%output:method("html")
%rest:path( "/editions/{$project}")
function max:home($project){
  web:redirect(if(ends-with(request:uri(),'/')) then 'accueil' else $project || "/accueil")

   web:redirect(request:uri() || '/accueil')
};

(:gets a project's HTML page:)
@@ -73,7 +72,7 @@ declare
%rest:GET
%output:method("html")
%output:indent("no")
%rest:path("/editions/{$project}/parcours/{$routeDoc=.*\.xml|.*\.svg}")
%rest:path("/editions/{$project}/parcours/{$routeDoc=[^plugins].*\.xml|.*\.svg}")
function max:document($project,$routeDoc){
   let $f:= max.route:getRouteQueryFile($project, $routeDoc)
   return
@@ -88,7 +87,7 @@ declare
%rest:GET
%output:method("html")
%output:indent("no")
%rest:path("/editions/{$project}/{$routeDoc=.*\.xml}/{$id}")
%rest:path("/editions/{$project}/{$routeDoc=[^plugins].*\.xml}/{$id}")
function max:htmlFragmentWithNavigationBar($project, $routeDoc, $id){

    let $dbPath := max.config:getProjectDBPath($project)
@@ -127,7 +126,7 @@ declare
%rest:GET
%output:method("html")
%output:indent("no")
%rest:path("/editions/{$project}/{$routeDoc=.*\.xml}/{$id}/target/{$targetId}/{$search}")
%rest:path("/editions/{$project}/{$routeDoc=[^plugins].*\.xml}/{$id}/target/{$targetId}/{$search}")
function max:htmlFragmentAndTargetSearchWithNavigationBar($project, $routeDoc, $id, $targetId, $search){
 
    
@@ -150,7 +149,7 @@ declare
%rest:GET
%output:method("html")
%output:indent("no")
%rest:path("/editions/{$project}/{$routeDoc=.*\.xml}/focus/{$idFocus}")
%rest:path("/editions/{$project}/{$routeDoc=[^plugins].*\.xml}/focus/{$idFocus}")
function max:htmlFragmentTargetIdWithNavigationBar($project, $routeDoc, $idFocus){
    copy $c := max:getFullDocument($project, $routeDoc)
    modify (
@@ -166,7 +165,7 @@ declare
%rest:GET
%output:method("html")
%output:indent("no")
%rest:path("/editions/{$project}/{$routeDoc=.*\.xml}/focus/{$idPart}/{$idFocus}")
%rest:path("/editions/{$project}/{$routeDoc=[^plugins].*\.xml}/focus/{$idPart}/{$idFocus}")
function max:htmlFragmentTargetPartAndIdWithNavigationBar($project, $routeDoc,$idPart, $idFocus){
  copy $c := max:htmlFragmentWithNavigationBar($project, $routeDoc, $idPart)
    modify (
+3 −4
Original line number Diff line number Diff line
@@ -12,8 +12,7 @@ moduleApparat['onTextChange'] = function() {
  //sinon
  var route = (window.location.href.split("/" + MAX.getProjectID() +"/")[1]).split(".xml")[0] + ".xml";
  var witnessQueryURL = 
      MAX.getPluginsBaseURL() + "/" + PLUGIN_NAME + "/" +
      MAX.getProjectID() +"/"+route;
      MAX.getPluginsBaseURL() + "/" + PLUGIN_NAME + "/"+route;
      $.get(witnessQueryURL, function(data){
        $('#options-list').append(data);
        $('#txt_options').show();
@@ -21,7 +20,7 @@ moduleApparat['onTextChange'] = function() {
      if(MAX.getFragmentId() !== ""){
      
        //récupération des témoins intégralement lacunaire sur le fragment courant
        $.get(MAX.getPluginsBaseURL() + "/" + PLUGIN_NAME + "/lacunarywit/"+MAX.getProjectID() +"/"+route+"/"+MAX.getFragmentId(),
        $.get(MAX.getPluginsBaseURL() + "/" + PLUGIN_NAME + "/lacunarywit/" + route+"/"+MAX.getFragmentId(),
         function(data){
            
        })
+2 −2
Original line number Diff line number Diff line
@@ -34,7 +34,7 @@ Route witnesses list as html
declare
%rest:GET
%output:method("html")
%rest:path("/plugins/apparat/{$project}/{$route=.*\.xml}")
%rest:path("/editions/{$project}/plugins/apparat/{$route=.*\.xml}")
function max.plugin.apparat_critique:getRouteWitnessesAsHTML($project, $route)
{

@@ -63,7 +63,7 @@ Recherche des témoins intégralement lacunaires sur le fragment $fragmentId
declare
%rest:GET
%output:method("html")
%rest:path("/plugins/apparat/lacunarywit/{$project}/{$route=.*\.xml}/{$fragmentId}")
%rest:path("/editions/{$project}/plugins/apparat/lacunarywit/{$route=.*\.xml}/{$fragmentId}")
function max.plugin.apparat_critique:getLacunaryWitnesses($project, $route, $fragmentId)
{

+5 −3
Original line number Diff line number Diff line
var breadcrumb = new Object();

breadcrumb['onTextChange'] = function() {
  var currentPart = $("#text").find(".subpart").first().text();
  console.log(currentPart);
  if(route === '')
    return;
  $.get(MAX.getPluginsBaseURL() + "/breadcrumb/" + projectId +"/"+route +"/"+currentPart, function(data){

  $.get( MAX.getPluginsBaseURL()  +"/breadcrumb/"+route +"/"+currentPart, function(data){
      var breadcrumb = data;
      $(breadcrumb).insertAfter($('#topbar'));
  });   
Loading