Commit e32173c2 authored by dje's avatar dje
Browse files

suppression de window.location.href de l'accueil + clean de la double balise...

suppression de window.location.href de l'accueil + clean de la double balise html générée par fetch:xml+parser HTML
parent aea0e787
Loading
Loading
Loading
Loading
+5 −3
Changes for max.xq: 5 added lines, 3 removed lines.
Original line number Diff line number Diff line
@@ -42,6 +42,11 @@ function max:projectHome($project){
   web:redirect(request:uri() || '/accueil')
};






(:gets a project's HTML page:)
declare
%rest:GET
@@ -288,6 +293,3 @@ declare
{
  "Max - ERROR: " || $desc
};


+7 −7
Changes for rxq/html.xqm: 7 added lines, 7 removed lines.
Original line number Diff line number Diff line
@@ -284,8 +284,12 @@ declare %private function max.html:buildSubMenu($projectId, $pageId){
declare function max.html:getHTMLFragment($project, $fragmentName as xs:string)
as element(div){
    let $fragmentPath := max.util:maxHome() ||"/editions/"||$project|| "/fragments/"||$fragmentName|| ".frag.html"
    let $content :=  fetch:xml($fragmentPath, map { 'parser': 'html','htmlparser': map { 'html': false(), 'nodefaults': true() }})  
    return  <div id='content'>{$content}</div> 
    (:on conserve la méthode fetch/parse html en commentaire au cas où ...:)
    (: let $content :=  fetch:xml($fragmentPath, map { 'parser': 'html','htmlparser': map { 'html': false(), 'nodefaults': true() }}) :)
    (: let $contentBody := $content//*:body/*[1] :)
    
    let $content := fetch:xml($fragmentPath, map { 'chop': false() })
    return  <div>{$content}</div> 
};

(:gets a project static HTML fragment (wrapped in an html div):)
@@ -300,11 +304,7 @@ as element(){
declare function max.html:getFooter($project){  
  try {
    let $footerPath := max.util:maxHome() ||"/editions/"||$project|| "/" || $max.cons:EDITION_FOOTER_PATH
    let $content :=fetch:xml(
                    $footerPath,
                    map { 
                      'parser': 'html','htmlparser': map { 'html': false(), 'nodefaults': true() }
                     })
    let $content := fetch:xml($footerPath, map { 'chop': false() })
    return $content
  }
  catch * {
+0 −1
Changes for ui/templates/tei_responsive.html: 0 added lines, 1 removed line.
Original line number Diff line number Diff line
<!DOCTYPE html>
<html lang="en">
  {$head}

  <body>
    <header id="topbar" class="navbar fixed-top navbar-light bg-light">
      <a class="navbar-brand" href="#">{$projectId}</a>