Sha256: f3d45db111bbd8aa56300520669b2b857ae51f964e7cfe07b2677d05e9454349

Contents?: true

Size: 1.14 KB

Versions: 10

Compression:

Stored size: 1.14 KB

Contents

require.def("domplate/toolbar",["domplate/domplate","core/lib","core/trace"],function(c,e){with(c){var d=domplate({tag:DIV({"class":"toolbar",onclick:"$onClick"}),buttonTag:SPAN({"class":"$button.className toolbarButton",title:"$button.tooltiptext",$text:"$button|hasLabel",onclick:"$button|getCommand"},"$button|getLabel"),separatorTag:SPAN({"class":"toolbarSeparator",style:"color: gray;"},"|"),hasLabel:function(a){return a.label?true:false},getLabel:function(a){return a.label?a.label:""},getCommand:function(a){return a.command?
a.command:function(){}},onClick:function(a){a=$.event.fix(a||window.event);e.cancelEvent(a)}});c=function(){this.buttons=[]};c.prototype={addButton:function(a){a.tooltiptext||(tooltiptext="");this.buttons.push(a)},getButton:function(a){for(var b=0;b<this.buttons.length;b++)if(this.buttons[b].id==a)return this.buttons[b]},render:function(a){if(this.element)a=this.element.parentNode;this.element=d.tag.replace({},a);for(a=0;a<this.buttons.length;a++){var b=this.buttons[a];(b.tag?b.tag:d.buttonTag).append({button:b},
this.element);a<this.buttons.length-1&&d.separatorTag.append({},this.element)}return this.element}};return c}});

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
har-0.0.9 lib/har/viewer/scripts/domplate/toolbar.js
har-0.0.8 lib/har/viewer/scripts/domplate/toolbar.js
har-0.0.7 lib/har/viewer/scripts/domplate/toolbar.js
har-0.0.6 lib/har/viewer/scripts/domplate/toolbar.js
har-0.0.5 lib/har/viewer/scripts/domplate/toolbar.js
har-0.0.4 lib/har/viewer/scripts/domplate/toolbar.js
har-0.0.3 lib/har/viewer/scripts/domplate/toolbar.js
har-0.0.2 lib/har/viewer/scripts/domplate/toolbar.js
har-0.0.1 lib/har/viewer/scripts/domplate/toolbar.js
har-0.0.1.dev lib/har/viewer/scripts/domplate/toolbar.js