diff --git a/res/app/app.js b/res/app/app.js index 6b74a240..48d72230 100644 --- a/res/app/app.js +++ b/res/app/app.js @@ -4,13 +4,10 @@ require.ensure([], function (require) { require('angular-route') require('angular-touch') - require('ng-file-upload') - angular.module('app', [ 'ngRoute', 'ngTouch', require('gettext').name, - 'angularFileUpload', require('angular-hotkeys').name, require('./layout').name, require('./device-list').name, diff --git a/res/app/components/stf/app-state/app-state-provider.js b/res/app/components/stf/app-state/app-state-provider.js index 285f1945..909e6aac 100644 --- a/res/app/components/stf/app-state/app-state-provider.js +++ b/res/app/components/stf/app-state/app-state-provider.js @@ -9,7 +9,7 @@ module.exports = function AppStateProvider() { } /*globals GLOBAL_APPSTATE:false*/ - if (GLOBAL_APPSTATE) { + if (typeof GLOBAL_APPSTATE !== 'undefined') { values = angular.extend(values, GLOBAL_APPSTATE) } diff --git a/res/app/components/stf/common-ui/modals/version-update/index.js b/res/app/components/stf/common-ui/modals/version-update/index.js index 635f7ef8..020ed02a 100644 --- a/res/app/components/stf/common-ui/modals/version-update/index.js +++ b/res/app/components/stf/common-ui/modals/version-update/index.js @@ -1,4 +1,5 @@ -module.exports = angular.module('stf.version-update', [ - require('stf/common-ui/modals/common').name +module.exports = angular.module('stf.version-update-service', [ + require('stf/common-ui/modals/common').name, + require('ui-bootstrap').name ]) .factory('VersionUpdateService', require('./version-update-service')) diff --git a/res/app/components/stf/control/index.js b/res/app/components/stf/control/index.js index 5644cffa..e6bd42cd 100644 --- a/res/app/components/stf/control/index.js +++ b/res/app/components/stf/control/index.js @@ -1,6 +1,5 @@ module.exports = angular.module('stf/control', [ - require('stf/socket').name + require('stf/socket').name, + require('stf/transaction').name ]) - .factory('TransactionService', require('./transaction-service')) .factory('ControlService', require('./control-service')) - .factory('StorageService', require('./storage-service')) diff --git a/res/app/components/stf/logcat/logcat-service.js b/res/app/components/stf/logcat/logcat-service.js index 7033062d..414ebd86 100644 --- a/res/app/components/stf/logcat/logcat-service.js +++ b/res/app/components/stf/logcat/logcat-service.js @@ -1,7 +1,7 @@ var _ = require('lodash') var _s = require('underscore.string') -module.exports = function LogcatServiceFactory(socket, DeviceService, FilterStringService) { +module.exports = function LogcatServiceFactory(socket, FilterStringService) { var service = {} service.started = false service.numberOfEntries = 0 diff --git a/res/app/components/stf/port-forwarding/index.js b/res/app/components/stf/port-forwarding/index.js index d4d12d15..b03e6778 100644 --- a/res/app/components/stf/port-forwarding/index.js +++ b/res/app/components/stf/port-forwarding/index.js @@ -1,3 +1,3 @@ -module.exports = angular.module('stf.port-forwarding', [ +module.exports = angular.module('stf.port-forwarding-service', [ ]) .factory('PortForwardingService', require('./port-forwarding-service')) diff --git a/res/app/components/stf/settings/index.js b/res/app/components/stf/settings/index.js index 9e30c6df..369750e1 100644 --- a/res/app/components/stf/settings/index.js +++ b/res/app/components/stf/settings/index.js @@ -1,4 +1,5 @@ module.exports = angular.module('stf/settings', [ - require('stf/user').name + require('stf/user').name, + require('stf/socket').name ]) .factory('SettingsService', require('./settings-service')) diff --git a/res/app/components/stf/socket/index.js b/res/app/components/stf/socket/index.js index fb4e95c7..205a50d1 100644 --- a/res/app/components/stf/socket/index.js +++ b/res/app/components/stf/socket/index.js @@ -1,4 +1,4 @@ -module.exports = angular.module('stf/socket', [ +module.exports = angular.module('stf.socket', [ //TODO: Refactor version update out to its own Ctrl require('stf/app-state').name, require('stf/common-ui/modals/version-update').name diff --git a/res/app/components/stf/storage/index.js b/res/app/components/stf/storage/index.js new file mode 100644 index 00000000..fcf64f21 --- /dev/null +++ b/res/app/components/stf/storage/index.js @@ -0,0 +1,6 @@ +require('ng-file-upload') + +module.exports = angular.module('stf/storage', [ + 'angularFileUpload' +]) + .factory('StorageService', require('./storage-service')) diff --git a/res/app/components/stf/control/storage-service.js b/res/app/components/stf/storage/storage-service.js similarity index 100% rename from res/app/components/stf/control/storage-service.js rename to res/app/components/stf/storage/storage-service.js diff --git a/res/app/components/stf/transaction/index.js b/res/app/components/stf/transaction/index.js new file mode 100644 index 00000000..277dfd29 --- /dev/null +++ b/res/app/components/stf/transaction/index.js @@ -0,0 +1,4 @@ +module.exports = angular.module('stf/transaction', [ + require('stf/socket').name +]) + .factory('TransactionService', require('./transaction-service')) diff --git a/res/app/components/stf/control/transaction-service.js b/res/app/components/stf/transaction/transaction-service.js similarity index 100% rename from res/app/components/stf/control/transaction-service.js rename to res/app/components/stf/transaction/transaction-service.js diff --git a/res/app/components/stf/user/group/index.js b/res/app/components/stf/user/group/index.js index a68a400c..0737a3de 100644 --- a/res/app/components/stf/user/group/index.js +++ b/res/app/components/stf/user/group/index.js @@ -1,5 +1,6 @@ module.exports = angular.module('stf/group', [ require('stf/socket').name, - require('stf/user').name + require('stf/user').name, + require('stf/transaction').name ]) - .factory('GroupService', require('./group-service')) \ No newline at end of file + .factory('GroupService', require('./group-service')) diff --git a/res/app/control-panes/advanced/maintenance/index.js b/res/app/control-panes/advanced/maintenance/index.js index 6dd386a6..b153a661 100644 --- a/res/app/control-panes/advanced/maintenance/index.js +++ b/res/app/control-panes/advanced/maintenance/index.js @@ -1,4 +1,5 @@ module.exports = angular.module('stf.advanced.maintenance', [ + require('gettext').name ]) .run(["$templateCache", function ($templateCache) { $templateCache.put('control-panes/advanced/maintenance/maintenance.jade', diff --git a/res/app/control-panes/advanced/port-forwarding/index.js b/res/app/control-panes/advanced/port-forwarding/index.js index 0d569c72..a92201c9 100644 --- a/res/app/control-panes/advanced/port-forwarding/index.js +++ b/res/app/control-panes/advanced/port-forwarding/index.js @@ -2,7 +2,8 @@ require('./port-forwarding.css') module.exports = angular.module('stf.port-forwarding', [ require('stf/common-ui/table').name, - require('stf/settings').name + require('stf/settings').name, + require('gettext').name ]) .run(["$templateCache", function ($templateCache) { $templateCache.put( diff --git a/res/app/control-panes/dashboard/upload/index.js b/res/app/control-panes/dashboard/upload/index.js index f1a7d0a8..8d1622ec 100644 --- a/res/app/control-panes/dashboard/upload/index.js +++ b/res/app/control-panes/dashboard/upload/index.js @@ -1,9 +1,12 @@ require('./upload.css') +require('ng-file-upload') + module.exports = angular.module('stf.upload', [ - require('stf/common-ui/tree').name, + 'angularFileUpload', require('./activities').name, - require('stf/settings').name + require('stf/settings').name, + require('stf/storage').name ]) .run(["$templateCache", function ($templateCache) { $templateCache.put('control-panes/dashboard/upload/upload.jade',