Sha256: de204615b59bd8b332e0ea5a9e47346a1bd6830df294b74da92f02d220ede339
Contents?: true
Size: 1.83 KB
Versions: 10
Compression:
Stored size: 1.83 KB
Contents
require.def("preview/pageList",["domplate/domplate","core/lib","core/trace","preview/requestList"],function(d,c,h,f){with(d){d=function(a){this.input=a};d.prototype=domplate({tableTag:TABLE({"class":"pageTable",cellpadding:0,cellspacing:0,onclick:"$onClick",_repObject:"$input"},TBODY(TAG("$rowTag",{groups:"$input.log.pages"}))),rowTag:FOR("group","$groups",TR({"class":"pageRow",_repObject:"$group"},TD({"class":"groupName pageCol"},SPAN({"class":"pageName"},"$group|getPageTitle")))),bodyTag:TR({"class":"pageInfoRow", style:"height:auto;"},TD({"class":"pageInfoCol"})),getPageTitle:function(a){return c.cropString(a.title,100)},getPageID:function(a){return"["+a.id+"]"},onClick:function(a){var b=$.event.fix(a||window.event);if(c.isLeftClick(a))if(b=c.getAncestorByClass(b.target,"pageRow")){this.toggleRow(b);c.cancelEvent(a)}},toggleRow:function(a,b){if(!(c.hasClass(a,"opened")&&b)){c.toggleClass(a,"opened");if(c.hasClass(a,"opened")){b=this.bodyTag.insertRows({},a)[0];(new f(this.input)).render(b.firstChild,a.repObject)}else{b= a.nextSibling;a.parentNode.removeChild(b)}}},expandAll:function(a){for(a=a.firstChild.firstChild;a;){hasClass(a,"pageRow")&&this.toggleRow(a,true);a=a.nextSibling}},getPageRow:function(a){for(var b=c.getElementsByClass(this.element.parentNode,"pageRow"),e=0;e<b.length;e++){var g=b[e];if(g.repObject==a)return g}},togglePage:function(a){this.toggleRow(this.getPageRow(a))},expandPage:function(a){this.toggleRow(this.getPageRow(a),true)},collapsePage:function(a){a=this.getPageRow(a);c.hasClass(a,"opened")&& this.toggleRow(a)},append:function(a){(new f(this.input)).render(a,null);var b=this.input.log.pages;if(b&&b.length){a=this.tableTag.append({input:this.input},a,this);a.firstChild.childNodes.length==1&&a.parentNode.childNodes.length==1&&this.toggleRow(a.firstChild.firstChild)}},render:function(a){this.append(a)}});return d}});
Version data entries
10 entries across 10 versions & 1 rubygems