From 2a260b231b5dec337be7697fb8f85038711b2d47 Mon Sep 17 00:00:00 2001 From: Daniel Molina Date: Tue, 27 Oct 2015 11:08:39 +0100 Subject: [PATCH] feature #4038: Fix tab dependencies for minify process --- src/sunstone/public/app/app.js | 1 - src/sunstone/public/app/main.js | 77 ++++++++++------------------- src/sunstone/public/app/sunstone.js | 3 +- 3 files changed, 27 insertions(+), 54 deletions(-) diff --git a/src/sunstone/public/app/app.js b/src/sunstone/public/app/app.js index 46c7e134fe..1d93a96f12 100644 --- a/src/sunstone/public/app/app.js +++ b/src/sunstone/public/app/app.js @@ -17,7 +17,6 @@ define(function(require) { require('jquery'); require('foundation.dropdown'); - //require('tabs'); var DASHBOARD_TAB_ID = require('tabs/dashboard-tab/tabId'); var SETTINGS_TAB_ID = require('tabs/settings-tab/tabId'); diff --git a/src/sunstone/public/app/main.js b/src/sunstone/public/app/main.js index e0a856a581..5126ed0099 100644 --- a/src/sunstone/public/app/main.js +++ b/src/sunstone/public/app/main.js @@ -16,33 +16,6 @@ require.config({ paths: { - /* Tabs */ - 'provision-tab': './tabs/provision-tab', - 'dashboard-tab': './tabs/dashboard-tab', - 'system-tab': './tabs/system-tab', - 'users-tab': './tabs/users-tab', - 'groups-tab': './tabs/groups-tab', - 'vdcs-tab': './tabs/vdcs-tab', - 'acls-tab': './tabs/acls-tab', - 'vresources-tab': './tabs/vresources-tab', - 'vms-tab': './tabs/vms-tab', - 'templates-tab': './tabs/templates-tab', - 'images-tab': './tabs/images-tab', - 'files-tab': './tabs/files-tab', - 'infra-tab': './tabs/infra-tab', - 'clusters-tab': './tabs/clusters-tab', - 'hosts-tab': './tabs/hosts-tab', - 'datastores-tab': './tabs/datastores-tab', - 'vnets-tab': './tabs/vnets-tab', - 'secgroups-tab': './tabs/secgroups-tab', - 'zones-tab': './tabs/zones-tab', - 'marketplace-tab': './tabs/marketplace-tab', - 'oneflow-dashboard': './tabs/oneflow-dashboard', - 'oneflow-services-tab': './tabs/oneflow-services-tab', - 'oneflow-templates-tab': './tabs/oneflow-templates-tab', - 'settings-tab': './tabs/settings-tab', - 'support-tab': './tabs/support-tab', - /* Almond */ 'almond': '../bower_components/almond/almond', @@ -142,31 +115,31 @@ require.config({ /* Tabs */ 'app': { deps: [ - 'provision-tab', - 'dashboard-tab', - 'system-tab', - 'users-tab', - 'groups-tab', - 'vdcs-tab', - 'acls-tab', - 'vresources-tab', - 'vms-tab', - 'templates-tab', - 'images-tab', - 'files-tab', - 'infra-tab', - 'clusters-tab', - 'hosts-tab', - 'datastores-tab', - 'vnets-tab', - 'secgroups-tab', - 'zones-tab', - 'marketplace-tab', - 'oneflow-dashboard', - 'oneflow-services-tab', - 'oneflow-templates-tab', - 'settings-tab', - 'support-tab' + 'tabs/provision-tab', + 'tabs/dashboard-tab', + 'tabs/system-tab', + 'tabs/users-tab', + 'tabs/groups-tab', + 'tabs/vdcs-tab', + 'tabs/acls-tab', + 'tabs/vresources-tab', + 'tabs/vms-tab', + 'tabs/templates-tab', + 'tabs/images-tab', + 'tabs/files-tab', + 'tabs/infra-tab', + 'tabs/clusters-tab', + 'tabs/hosts-tab', + 'tabs/datastores-tab', + 'tabs/vnets-tab', + 'tabs/secgroups-tab', + 'tabs/zones-tab', + 'tabs/marketplace-tab', + 'tabs/oneflow-dashboard', + 'tabs/oneflow-services-tab', + 'tabs/oneflow-templates-tab', + 'tabs/settings-tab', + 'tabs/support-tab' ] }, diff --git a/src/sunstone/public/app/sunstone.js b/src/sunstone/public/app/sunstone.js index 809c2acf8e..cc9143b244 100644 --- a/src/sunstone/public/app/sunstone.js +++ b/src/sunstone/public/app/sunstone.js @@ -39,7 +39,8 @@ define(function(require) { var _addMainTabs = function() { $.each(Config.enabledTabs, function(tabName, enabled){ if (enabled) { - var tabObj = require(tabName); + var name = './tabs/' + tabName; + var tabObj = require(name); var _tabId = tabObj.tabId; SunstoneCfg["tabs"][_tabId] = tabObj;