-
-
Save stan229/4610850 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* @class McAfee.view.main.Viewport | |
* @extends Ext.container.Container | |
* @author Crysfel Villa <[email protected]> | |
* | |
* Description | |
*/ | |
Ext.define('McAfee.view.main.Viewport',{ | |
extend : 'Ext.container.Container', | |
alias : 'widget.main-viewport', | |
requires : [ | |
'McAfee.view.main.SkinnyHeader', | |
'Ext.layout.container.Border', | |
'McAfee.abstract.tab.Panel' | |
], | |
cls: 'main-viewport', | |
initComponent : function(){ | |
var me = this; | |
me.on({ | |
activate : me.onActivate | |
}); | |
me.items = me.buildItems(); | |
me.callParent(); | |
}, | |
onActivate: function(viewport, e) { | |
var me = this; | |
console.log(viewport); | |
console.log(e); | |
me.element.on({ | |
click: me.onViewportClick, | |
scope: me | |
}); | |
}, | |
onViewportClick: function(evtObj) { | |
// var me = this, | |
// dataset = evtObj.delegatedTarget.dataset; | |
alert('yay'); | |
// if(evtObj.getTarget('.hero-back')) { | |
// me.fireEvent('close', me); | |
// } else { | |
// me.fireEvent('heroOverviewTap', dataset.battletag, dataset.id); | |
// } | |
}, | |
buildItems : function(){ | |
return [{ | |
xtype : 'skinnyheader', | |
data : this.headerData, | |
height: 170 | |
}, { | |
xtype : 'mcafeetabpanel', | |
itemId: 'mainTabs', | |
cls : 'mainTabs', | |
border: false, | |
bodyBorder: false, | |
tabBar: { | |
items: [{ | |
xtype: 'tbfill' | |
}, { | |
closable: false, | |
text: '<i class="icon-wrench"></i> IR Tools', | |
itemId: 'IRToolsButton', | |
enableToggle: true | |
}] | |
}, | |
items : [{ | |
xtype : 'dashboard', | |
itemId : 'dashboardPanelContainer' | |
},{ | |
xtype : 'sessions' | |
},{ | |
xtype : 'behaviors' | |
},{ | |
xtype : 'file_captures' | |
},{ | |
xtype : 'host_ratings' | |
}] | |
}]; | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment