You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
2 lines
1.2 KiB
2 lines
1.2 KiB
2 years ago
|
YUI.add("moodle-core-popuphelp",function(e,t){function n(){n.superclass.constructor.apply(this,arguments)}var r={CLICKABLELINKS:"span.helptooltip > a",FOOTER:"div.moodle-dialogue-ft"},i={ICON:"icon",ICONPRE:"icon-pre"},s={};n.NAME="moodle-core-popuphelp",n.ATTRS=s,e.extend(n,e.Base,{panel:null,initializer:function(){e.one("body").delegate("click",this.display_panel,r.CLICKABLELINKS,this)},display_panel:function(e){this.panel||(this.panel=new M.core.tooltip({bodyhandler:this.set_body_content,footerhandler:this.set_footer,initialheadertext:M.util.get_string("loadinghelp","moodle"),initialfootertext:""})),this.panel.display_panel(e)},set_footer:function(t){if(t.doclink){var n=e.Node.create("<a />").setAttrs({href:t.doclink.link}).addClass(t.doclink["class"]),s=e.Node.create("<img />").setAttrs({src:M.util.image_url("docs","core")}).addClass(i.ICON).addClass(i.ICONPRE);n.appendChild(s),n.appendChild(t.doclink.linktext),this.set("footerContent",n),this.bb.one(r.FOOTER).show()}else this.bb.one(r.FOOTER).hide()}}),M.core=M.core||{},M.core.popuphelp=M.core.popuphelp||null,M.core.init_popuphelp=M.core.init_popuphelp||function(e){return M.core.popuphelp||(M.core.popuphelp=new n(e)),M.core.popuphelp}},"@VERSION@",{requires:["moodle-core-tooltip"]});
|