lib/har/viewer/scripts/preview/menu.js in har-0.1.0 vs lib/har/viewer/scripts/preview/menu.js in har-0.1.1

- old
+ new

@@ -1,2 +1,4 @@ -require.def("preview/menu",["domplate/domplate","core/lib","domplate/toolbar","core/trace"],function(Domplate,Lib,Toolbar,Trace){with(Domplate){function Menu(){}Menu.prototype={render:function(a){this.element=MenuPlate.render(a),this.toolbar=new Toolbar,this.toolbar.addButton({id:"credentials",label:"Powered by Jan Odvarko",tooltiptext:"http://www.softwareishard.com/blog/har-viewer/",command:Lib.bindFixed(this.onCredentials,this,!0)});var b=Lib.getElementByClass(this.element,"menuContent");this.toolbar.render(b),Lib.isWebkit&&(b.style.paddingTop="1px")},onCredentials:function(){window.open("http://www.softwareishard.com/blog/har-viewer/")},onFullPreview:function(){}};var MenuPlate=domplate({tag:DIV({"class":"menu",_repObject:"$object"},DIV({"class":"menuHandle",onmousemove:"$onMouseMove",onclick:"$onMouseClick"}),DIV({"class":"menuContent",style:"display: none"})),onMouseMove:function(a){var b=Lib.fixEvent(a);this.open(b.target)},onMouseClick:function(a){var b=Lib.fixEvent(a);this.toggle(b.target)},open:function(a){var b=Lib.getAncestorByClass(a,"menu"),c=Lib.getElementByClass(b,"menuContent");c.clientWidth<=0&&this.toggle(a)},toggle:function(a){var b=Lib.getAncestorByClass(a,"menu"),c=Lib.getElementByClass(b,"menuContent");$(c).animate({width:"toggle"},undefined,undefined,function(){var a=Lib.getElementByClass(b,"menuHandle");c.clientWidth>0?Lib.setClass(a,"opened"):Lib.removeClass(a,"opened")})},render:function(a,b){return this.tag.append({object:b},a,this)}});return Menu}}) +/* See license.txt for terms of usage */ + +define("preview/menu",["domplate/domplate","core/lib","domplate/toolbar","core/trace"],function(Domplate,Lib,Toolbar,Trace){with(Domplate){function Menu(){}Menu.prototype={render:function(e){this.element=MenuPlate.render(e),this.toolbar=new Toolbar,this.toolbar.addButton({id:"credentials",label:"Powered by Jan Odvarko",tooltiptext:"http://www.softwareishard.com/blog/har-viewer/",command:Lib.bindFixed(this.onCredentials,this,!0)});var t=Lib.getElementByClass(this.element,"menuContent");this.toolbar.render(t),Lib.isWebkit&&(t.style.paddingTop="1px")},onCredentials:function(){window.open("http://www.softwareishard.com/blog/har-viewer/")},onFullPreview:function(){}};var MenuPlate=domplate({tag:DIV({"class":"menu",_repObject:"$object"},DIV({"class":"menuHandle",onmousemove:"$onMouseMove",onclick:"$onMouseClick"}),DIV({"class":"menuContent",style:"display: none"})),onMouseMove:function(e){var t=Lib.fixEvent(e);this.open(t.target)},onMouseClick:function(e){var t=Lib.fixEvent(e);this.toggle(t.target)},open:function(e){var t=Lib.getAncestorByClass(e,"menu"),n=Lib.getElementByClass(t,"menuContent");if(n.clientWidth>0)return;this.toggle(e)},toggle:function(e){var t=Lib.getAncestorByClass(e,"menu"),n=Lib.getElementByClass(t,"menuContent");$(n).animate({width:"toggle"},undefined,undefined,function(){var e=Lib.getElementByClass(t,"menuHandle");n.clientWidth>0?Lib.setClass(e,"opened"):Lib.removeClass(e,"opened")})},render:function(e,t){return this.tag.append({object:t},e,this)}});return Menu}}); \ No newline at end of file