Loading plugins/ajout/ajout.css +3 −1 Changes for plugins/ajout/ajout.css: 3 added lines, 1 removed line. Original line number Diff line number Diff line Loading @@ -4,4 +4,6 @@ .add[title] { cursor:default; } .del{ text-decoration:line-through; } plugins/ajout/ajout.xsl +22 Changes for plugins/ajout/ajout.xsl: 22 added lines, 0 removed lines. Original line number Diff line number Diff line <?xml version="1.0" encoding="UTF-8"?> <!-- For conditions of distribution and use, see the accompanying legal.txt file. --> <xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:tei="http://www.tei-c.org/ns/1.0" exclude-result-prefixes="tei xsl"> <xsl:template match="//tei:subst"><xsl:apply-templates/></xsl:template> <xsl:template match="//tei:del | //tei:add"> <span> <xsl:attribute name="class"> <xsl:value-of select="local-name(.)"/> </xsl:attribute><xsl:apply-templates/> </span> </xsl:template> </xsl:stylesheet> No newline at end of file plugins/diplomatique/diplomatique.css +27 Changes for plugins/diplomatique/diplomatique.css: 27 added lines, 0 removed lines. Original line number Diff line number Diff line .sic{ color:brown; display:none; } .corr{ color:pink; } .reg{ color:red; display:none; } .orig{ color:green; } .am{ color:black; display:none; } .ex{ color:blue; } No newline at end of file plugins/diplomatique/diplomatique.js +79 Changes for plugins/diplomatique/diplomatique.js: 79 added lines, 0 removed lines. Original line number Diff line number Diff line import {Plugin} from '../../core/ui/js/Plugin.js'; const CORR_CLASS = "corr"; const SIC_CLASS = "sic"; const ORIG_CLASS = "orig"; const REG_CLASS = "reg"; const EX_CLASS = "ex"; const AM_CLASS = "am"; class DiplomatiquePlugin extends Plugin{ constructor(name) { super(name); } run(){ console.log("plugin diplomatque running") var checkAttr = ""; if(localStorage. getItem(MAX_LOCAL_STORAGE_PREFIX + CORR_CLASS) === MAX_VISIBLE_PROPERTY_STRING && localStorage. getItem(MAX_LOCAL_STORAGE_PREFIX + REG_CLASS) === MAX_VISIBLE_PROPERTY_STRING && localStorage. getItem(MAX_LOCAL_STORAGE_PREFIX + EX_CLASS) === MAX_VISIBLE_PROPERTY_STRING) { checkAttr = "checked='checked' "; //updates visibility this.on(); } else{ //updates visibility this.off(); } $("#options-list").append("<li><a><input id='toggle_diplo' type='checkbox' " +checkAttr +" name='toggle_diplo'>Affichage régularisé</a></li>"); let self = this; $('#toggle_diplo').change(function(){ self.setCorrVisible() }) } setCorrVisible(){ if($('#toggle_diplo').is(":checked")) { this.on(); localStorage.setItem(MAX_LOCAL_STORAGE_PREFIX + CORR_CLASS, MAX_VISIBLE_PROPERTY_STRING); localStorage.setItem(MAX_LOCAL_STORAGE_PREFIX + REG_CLASS, MAX_VISIBLE_PROPERTY_STRING); localStorage.setItem(MAX_LOCAL_STORAGE_PREFIX + EX_CLASS, MAX_VISIBLE_PROPERTY_STRING); } else{ this.off(); localStorage.removeItem(MAX_LOCAL_STORAGE_PREFIX + CORR_CLASS); localStorage.removeItem(MAX_LOCAL_STORAGE_PREFIX + REG_CLASS); localStorage.removeItem(MAX_LOCAL_STORAGE_PREFIX + EX_CLASS); } } /*corr visibles*/ on(){ $("." + SIC_CLASS).hide(); $("." + CORR_CLASS).show(); $("." + ORIG_CLASS).hide(); $("." + REG_CLASS).show(); $("." + AM_CLASS).hide(); $("." + EX_CLASS).show(); } /*corr hidden (sic visibles)*/ off(){ $("." + SIC_CLASS).show(); $("." + CORR_CLASS).hide(); $("." + ORIG_CLASS).show(); $("." + REG_CLASS).hide(); $("." + AM_CLASS).show(); $("." + EX_CLASS).hide(); } } MAX.addPlugin(new DiplomatiquePlugin('Diplomatique')); plugins/diplomatique/diplomatique.xsl +51 Changes for plugins/diplomatique/diplomatique.xsl: 51 added lines, 0 removed lines. Original line number Diff line number Diff line <?xml version="1.0" encoding="UTF-8"?> <!-- For conditions of distribution and use, see the accompanying legal.txt file. --> <xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:tei="http://www.tei-c.org/ns/1.0" exclude-result-prefixes="tei xsl"> <xsl:template match="//tei:choice"><xsl:apply-templates/></xsl:template> <xsl:template match="//tei:sic | //tei:corr"> <span> <xsl:attribute name="class"> <xsl:value-of select="local-name(.)"/> </xsl:attribute><xsl:apply-templates/> </span> </xsl:template> <xsl:template match="//tei:orig | //tei:reg"> <span> <xsl:attribute name="class"> <xsl:value-of select="local-name(.)"/> </xsl:attribute><xsl:apply-templates/> </span> </xsl:template> <xsl:template match="//tei:am | //tei:ex"> <span> <xsl:attribute name="class"> <xsl:value-of select="local-name(.)"/> </xsl:attribute> <xsl:apply-templates/> </span> </xsl:template> <xsl:template match="//tei:abbr"> <span class="am"> <xsl:apply-templates/> </span> </xsl:template> <xsl:template match="//tei:expan"> <span class="ex"> <xsl:apply-templates/> </span> </xsl:template> </xsl:stylesheet> No newline at end of file Loading
plugins/ajout/ajout.css +3 −1 Changes for plugins/ajout/ajout.css: 3 added lines, 1 removed line. Original line number Diff line number Diff line Loading @@ -4,4 +4,6 @@ .add[title] { cursor:default; } .del{ text-decoration:line-through; }
plugins/ajout/ajout.xsl +22 Changes for plugins/ajout/ajout.xsl: 22 added lines, 0 removed lines. Original line number Diff line number Diff line <?xml version="1.0" encoding="UTF-8"?> <!-- For conditions of distribution and use, see the accompanying legal.txt file. --> <xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:tei="http://www.tei-c.org/ns/1.0" exclude-result-prefixes="tei xsl"> <xsl:template match="//tei:subst"><xsl:apply-templates/></xsl:template> <xsl:template match="//tei:del | //tei:add"> <span> <xsl:attribute name="class"> <xsl:value-of select="local-name(.)"/> </xsl:attribute><xsl:apply-templates/> </span> </xsl:template> </xsl:stylesheet> No newline at end of file
plugins/diplomatique/diplomatique.css +27 Changes for plugins/diplomatique/diplomatique.css: 27 added lines, 0 removed lines. Original line number Diff line number Diff line .sic{ color:brown; display:none; } .corr{ color:pink; } .reg{ color:red; display:none; } .orig{ color:green; } .am{ color:black; display:none; } .ex{ color:blue; } No newline at end of file
plugins/diplomatique/diplomatique.js +79 Changes for plugins/diplomatique/diplomatique.js: 79 added lines, 0 removed lines. Original line number Diff line number Diff line import {Plugin} from '../../core/ui/js/Plugin.js'; const CORR_CLASS = "corr"; const SIC_CLASS = "sic"; const ORIG_CLASS = "orig"; const REG_CLASS = "reg"; const EX_CLASS = "ex"; const AM_CLASS = "am"; class DiplomatiquePlugin extends Plugin{ constructor(name) { super(name); } run(){ console.log("plugin diplomatque running") var checkAttr = ""; if(localStorage. getItem(MAX_LOCAL_STORAGE_PREFIX + CORR_CLASS) === MAX_VISIBLE_PROPERTY_STRING && localStorage. getItem(MAX_LOCAL_STORAGE_PREFIX + REG_CLASS) === MAX_VISIBLE_PROPERTY_STRING && localStorage. getItem(MAX_LOCAL_STORAGE_PREFIX + EX_CLASS) === MAX_VISIBLE_PROPERTY_STRING) { checkAttr = "checked='checked' "; //updates visibility this.on(); } else{ //updates visibility this.off(); } $("#options-list").append("<li><a><input id='toggle_diplo' type='checkbox' " +checkAttr +" name='toggle_diplo'>Affichage régularisé</a></li>"); let self = this; $('#toggle_diplo').change(function(){ self.setCorrVisible() }) } setCorrVisible(){ if($('#toggle_diplo').is(":checked")) { this.on(); localStorage.setItem(MAX_LOCAL_STORAGE_PREFIX + CORR_CLASS, MAX_VISIBLE_PROPERTY_STRING); localStorage.setItem(MAX_LOCAL_STORAGE_PREFIX + REG_CLASS, MAX_VISIBLE_PROPERTY_STRING); localStorage.setItem(MAX_LOCAL_STORAGE_PREFIX + EX_CLASS, MAX_VISIBLE_PROPERTY_STRING); } else{ this.off(); localStorage.removeItem(MAX_LOCAL_STORAGE_PREFIX + CORR_CLASS); localStorage.removeItem(MAX_LOCAL_STORAGE_PREFIX + REG_CLASS); localStorage.removeItem(MAX_LOCAL_STORAGE_PREFIX + EX_CLASS); } } /*corr visibles*/ on(){ $("." + SIC_CLASS).hide(); $("." + CORR_CLASS).show(); $("." + ORIG_CLASS).hide(); $("." + REG_CLASS).show(); $("." + AM_CLASS).hide(); $("." + EX_CLASS).show(); } /*corr hidden (sic visibles)*/ off(){ $("." + SIC_CLASS).show(); $("." + CORR_CLASS).hide(); $("." + ORIG_CLASS).show(); $("." + REG_CLASS).hide(); $("." + AM_CLASS).show(); $("." + EX_CLASS).hide(); } } MAX.addPlugin(new DiplomatiquePlugin('Diplomatique'));
plugins/diplomatique/diplomatique.xsl +51 Changes for plugins/diplomatique/diplomatique.xsl: 51 added lines, 0 removed lines. Original line number Diff line number Diff line <?xml version="1.0" encoding="UTF-8"?> <!-- For conditions of distribution and use, see the accompanying legal.txt file. --> <xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:tei="http://www.tei-c.org/ns/1.0" exclude-result-prefixes="tei xsl"> <xsl:template match="//tei:choice"><xsl:apply-templates/></xsl:template> <xsl:template match="//tei:sic | //tei:corr"> <span> <xsl:attribute name="class"> <xsl:value-of select="local-name(.)"/> </xsl:attribute><xsl:apply-templates/> </span> </xsl:template> <xsl:template match="//tei:orig | //tei:reg"> <span> <xsl:attribute name="class"> <xsl:value-of select="local-name(.)"/> </xsl:attribute><xsl:apply-templates/> </span> </xsl:template> <xsl:template match="//tei:am | //tei:ex"> <span> <xsl:attribute name="class"> <xsl:value-of select="local-name(.)"/> </xsl:attribute> <xsl:apply-templates/> </span> </xsl:template> <xsl:template match="//tei:abbr"> <span class="am"> <xsl:apply-templates/> </span> </xsl:template> <xsl:template match="//tei:expan"> <span class="ex"> <xsl:apply-templates/> </span> </xsl:template> </xsl:stylesheet> No newline at end of file