Commit 3d75870e authored by Anne Goloubkoff-Duponchel's avatar Anne Goloubkoff-Duponchel
Browse files

ajout du js pour masquer les boutons pdf et porte-document quand pas d'ident (header et archdesc)

parent 15caa2d9
Loading
Loading
Loading
Loading
+26 −0
Original line number Diff line number Diff line
import { Plugin } from '../../core/ui/js/Plugin.js';


class eadpdfPlugin extends Plugin {
  constructor(name) {
    super(name);
  }

  run() {
    if(document.querySelector('.article_actions')){
        this.affichageBouton();
   }
}
  affichageBouton(){
      let str=''+window.location
      let res=str.split("/")
      if((res.indexOf("eadheader.html")>0) | (res.indexOf("archdesc.html")>0))
      {
          document.getElementsByClassName("article_actions")[0].style.display='none'
          document.getElementsByClassName("ead2pdf")[0].style.display='none'
      }
  }
 
}

  MAX.addPlugin(new eadpdfPlugin('EAD pdf'));
 No newline at end of file