Commit c5d81fdd authored by Jerome Chauveau's avatar Jerome Chauveau
Browse files

nettoyage

parent 184bb5f9
Loading
Loading
Loading
Loading
+8 −1
Original line number Diff line number Diff line
@@ -54,6 +54,13 @@ Cette fonctionnalité nécessite de télécharger le [module fop](https://files.
```bash
$ cd </path/to/basex>/lib && wget https://files.basex.org/modules/org/basex/modules/fop/FOP.jar
```
### Initialisation

Installation des dépendances JS et désactivation des plugins

```bash
$ ./tools/max.sh -i
```

### Édition de démonstration

@@ -76,7 +83,7 @@ L'édition de démonstration est consultable à **http://localhost:8984/max_tei_

## Paramétrage et customisation

Une documentation est disponible dans le répertoire [documentation](./documentation)
Une documentation utilisateur est disponible dans le répertoire [documentation](./documentation)



+0 −11
Original line number Diff line number Diff line
@@ -28,17 +28,6 @@ class ApparatPlugin extends Plugin{
            let wlist = e.getAttribute("data-witnesses").replace(" ", ", ");
            e.setAttribute("title", wlist);
        })
        // $('[data-witnesses]').each(function(){
        //     var wlist = $(this).attr("data-witnesses").replace(" ",", ");
        //     $(this).attr("title", wlist);
        //     $(this).tooltip(
        //        {
        //         html:true, // allows html content
        //         content: "<div><em>Témoins:</em> "+wlist+"</div>"
        //        }
        //     );
        // });

    }

    hideLacunas(witId) {
+26 −23
Original line number Diff line number Diff line
#breadcrumb * {
    text-decoration: none;
}

#breadcrumb {
    position: fixed;
    top: 80px;
@@ -15,6 +16,7 @@
#breadcrumb ol {
    border-radius: 0;
}

#breadcrumb li, #breadcrumb li a {
    /*padding: 2px 5px;*/
    display: flex;
@@ -47,12 +49,13 @@
}



#breadcrumb .max-doc-title:hover:after {
    text-decoration: none;
    color: red;
}

.breadcrumb {
    background-color: white;
    border-bottom: 1px solid #efefef;
    /*border-top: 1px solid #efefef;*/
}
 No newline at end of file
+1 −8
Original line number Diff line number Diff line
@@ -44,10 +44,7 @@ class CorrectionPlugin extends Plugin{
    document.getElementById('options-list').append(
        document.importNode(node, true)
    );
    // $("#options-list").append("<li><a><input id='toggle_corr' type='checkbox' "
    //       +checkAttr
    //       +" name='toggle_corr'>"+corrI18n[lang]['display']+"</a></li>");
    // let self = this;

    document.getElementById('toggle_corr').addEventListener('change',() => {
      this.setCorrVisible()
    })       
@@ -76,8 +73,6 @@ class CorrectionPlugin extends Plugin{
      e.style.display = 'inline';
    });

    // $("." + SIC_CLASS).hide();
    // $("." + CORR_CLASS).show();
  }
  /*corr hidden (sic visibles)*/
  off(){
@@ -88,8 +83,6 @@ class CorrectionPlugin extends Plugin{
    document.querySelectorAll("." + CORR_CLASS).forEach((e) => {
      e.style.display = 'none';
    });
    // $("." + SIC_CLASS).show();
    // $("." + CORR_CLASS).hide();
  }
}

+15 −5
Original line number Diff line number Diff line
import {Plugin} from '../../core/ui/js/Plugin.js';
// const MathJax = require('mathjax');

//TODO : terminer la dé-jquerylisation !

class EquationPlugin extends Plugin{
  constructor(name) {
    super(name);
@@ -10,11 +12,19 @@ class EquationPlugin extends Plugin{
    if(!this.docWithEquation())
        return;
    //appends lib + conf into head element
    let mathjax = "<script type='text/x-mathjax-config'>";
    mathjax += "MathJax.Hub.Config({tex2jax: {inlineMath: [['$','$'], ['\\(','\\)']]}";
    //let mathjax = "<script type='text/x-mathjax-config'>";
    let mathjax = "MathJax.Hub.Config({tex2jax: {inlineMath: [['$','$'], ['\\(','\\)']]}";
    mathjax+=",TeX: {Macros: {textnormal: '{}',ad: '{=}'}}});</script>";
    $("head").append(mathjax);
    $("head").append('<script type="text/javascript" src="'+MAX.getBaseURL() + 'plugins/equations/mathjax/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>');
    let script = document.createElement('script');
    script.setAttribute('type', 'text/x-mathjax-config');
    script.append(mathjax);

    document.querySelector("head").appendChild(script);
    let scriptImport = document.createElement('script');
    scriptImport.setAttribute('type', 'text/javascript');
    scriptImport.setAttribute('src',MAX.getBaseURL() + 'plugins/equations/mathjax/MathJax.js?config=TeX-AMS-MML_HTMLorMML');
    document.querySelector("head").appendChild(scriptImport);
    //document.querySelector("head").append('<script type="text/javascript" src="'+MAX.getBaseURL() + 'plugins/equations/mathjax/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>');

    //appends text options components
    $("#options-list").append("<li role='separator' class='divider'></li><li><a href='#'>"
@@ -51,7 +61,7 @@ class EquationPlugin extends Plugin{
  }

  docWithEquation(){
   return $(".formula").length > 0;
   return document.querySelectorAll(".formula").length > 0;
  }
}

Loading