Sha256: 10012d56e9e568c51ae1326be4173d25bd6ee7b5c183b467f7886e3890e2c3ea
Contents?: true
Size: 1.51 KB
Versions: 5
Compression:
Stored size: 1.51 KB
Contents
/* 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}});
Version data entries
5 entries across 5 versions & 1 rubygems