[ Index ] |
PHP Cross Reference of GlotPress |
[Summary view] [Print] [Text view]
1 var $gp=function(s){return{notices:{element:null,init:function(){$gp.notices.element=s("#gp-js-message"),$gp.notices.element.on("click",".gp-js-message-dismiss",$gp.notices.clear)},error:function(e){$gp.notices.genericMessage("gp-js-error",e,!0)},notice:function(e){$gp.notices.genericMessage("gp-js-notice",e,!0)},success:function(e){$gp.notices.genericMessage("gp-js-success",e,!1),$gp.notices.element.fadeOut(1e4)},clear:function(){$gp.notices.element.html("").hide()},genericMessage:function(e,s,t){var n="";$gp.notices.element.stop(!0,!0),!0===t&&(n=' <button type="button" class="button is-link gp-js-message-dismiss">'+$gp.l10n.dismiss+"</button>"),$gp.notices.element.removeClass().addClass("gp-js-message").addClass(e).html('<div id="gp-js-message-content" class="gp-js-message-content">'+s+n+"</div>"),$gp.notices.center(),$gp.notices.element.show()},center:function(){$gp.notices.element.css("left",(s(document).width()-$gp.notices.element.width())/2)}},esc_html:function(e){return s("<div/>").text(e).html()},init:function(){$gp.notices.init()}}}(jQuery);$gp.showhide=function(p){return function(e,s,t){var n=p.extend({},{show_text:"Show",hide_text:"Hide",focus:!1,group:"default"},t),i=p(e),o=p(s);$gp.showhide.registry[n.group]||($gp.showhide.registry[n.group]=[]);function c(){for(var e=0;e<r.length;++e)r[e].hide();o.show(),n.focus&&p(n.focus,o).focus(),i.html(n.hide_text).addClass("open")}function g(){o.hide(),i.html(n.show_text).removeClass("open")}var r=$gp.showhide.registry[n.group];r.push({show:c,hide:g}),i.click(function(){return(o.is(":visible")?g:c)(),!1})}}(jQuery),$gp.showhide.registry={};
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Sat Sep 7 01:01:04 2024 | Cross-referenced by PHPXref 0.7.1 |