|
|
@@ -76,7 +76,7 @@ Ext.define('saas.view.main.Navigation', {
|
|
|
if (!menu) {
|
|
|
var view = new Ext.DataView({
|
|
|
store: Ext.create('Ext.data.Store', {
|
|
|
- fields: ['id', 'text', 'addType', 'viewType'],
|
|
|
+ fields: ['id', 'text', 'addType', 'viewType', 'ctype'],
|
|
|
data: menuItems
|
|
|
}),
|
|
|
tpl: new Ext.XTemplate('<div class="x-navitem-menu">',
|
|
|
@@ -89,7 +89,7 @@ Ext.define('saas.view.main.Navigation', {
|
|
|
'<div class="menu-content">',
|
|
|
'<tpl for="items">',
|
|
|
'<div class="menuitem">',
|
|
|
- '<div class="item-text" data-config="{config}" data-id="{id}" data-text="{text}" data-type="query" data-viewType="{viewType}">',
|
|
|
+ '<div class="item-text" data-config="{config}" data-id="{id}" data-text="{text}" data-type="query" data-viewType="{viewType}" data-ctype="{ctype}">',
|
|
|
'{text}',
|
|
|
'</div>',
|
|
|
'<tpl if="{addType}">',
|
|
|
@@ -152,13 +152,15 @@ Ext.define('saas.view.main.Navigation', {
|
|
|
type = dataset.type,
|
|
|
text = dataset.text,
|
|
|
config = dataset.config,
|
|
|
- id = dataset.id;
|
|
|
+ id = dataset.id,
|
|
|
+ componentType = dataset.ctype || 'Tab';
|
|
|
|
|
|
var tabTitle = text,
|
|
|
tabId = 'maintab-' + type + '-' + id;
|
|
|
-
|
|
|
+
|
|
|
menu.navItem.classList.remove(menu.navView.overItemCls);
|
|
|
- saas.util.BaseUtil.openTab(viewType, tabTitle, tabId,config);
|
|
|
+ // saas.util.BaseUtil.openTab(viewType, tabTitle, tabId,config);
|
|
|
+ saas.util.BaseUtil['open' + componentType](viewType, tabTitle, tabId,config);
|
|
|
menu.hide();
|
|
|
});
|
|
|
});
|
|
|
@@ -169,13 +171,15 @@ Ext.define('saas.view.main.Navigation', {
|
|
|
viewType = dataset.viewtype,
|
|
|
type = dataset.type,
|
|
|
text = dataset.text,
|
|
|
- id = dataset.id;
|
|
|
+ id = dataset.id,
|
|
|
+ componentType = dataset.ctype || 'Tab';
|
|
|
|
|
|
var tabTitle ='新增' + text,
|
|
|
tabId = viewType + '-add';
|
|
|
|
|
|
menu.navItem.classList.remove(menu.navView.overItemCls);
|
|
|
- saas.util.BaseUtil.openTab(viewType, tabTitle, tabId);
|
|
|
+ // saas.util.BaseUtil.openTab(viewType, tabTitle, tabId);
|
|
|
+ saas.util.BaseUtil['open' + componentType](viewType, tabTitle, tabId);
|
|
|
menu.hide();
|
|
|
});
|
|
|
});
|