Sha256: 6dce9c0f1a72bfd3230f647f27aa8f2414e48dec295cd05f5ac5850077953f34
Contents?: true
Size: 1.44 KB
Versions: 10
Compression:
Stored size: 1.44 KB
Contents
Compass.ErpApp.Desktop.Applications.Knitkit.WidgetsPanel = function() { var widgetsStore = Ext.create('Ext.data.Store',{ autoDestroy: true, fields:['name', 'iconUrl', 'onClick', 'about'], data:Compass.ErpApp.Widgets.AvailableWidgets }); this.widgetsDataView = Ext.create("Ext.view.View",{ style:'overflow:auto', itemSelector: 'div.thumb-wrap', store:widgetsStore, tpl: [ '<tpl for=".">', '<div data-qtip="{about}" class="thumb-wrap" id="{name}">', '<div class="thumb"><img src="{iconUrl}" class="thumb-img"></div>', '<span>{name}</span></div>', '</tpl>', '<div class="x-clear"></div>' ], listeners:{ 'itemcontextmenu':function(view, record, htmlitem, index, e, options){ e.stopEvent(); var contextMenu = Ext.create("Ext.menu.Menu",{ items:[{ text:'Add Widget', iconCls:'icon-add', handler:function(btn){ record.data.onClick(); } }] }); contextMenu.showAt(e.xy); } } }); var widgetsPanel = new Ext.Panel({ id:'widgets', autoDestroy:true, title:'Available Widgets', region:'center', margins: '5 5 5 0', layout:'fit', items: this.widgetsDataView }); this.layout = new Ext.Panel({ layout: 'border', autoDestroy:true, title:'Widgets', items: [widgetsPanel] }); }
Version data entries
10 entries across 10 versions & 1 rubygems