diff --git a/res/app/control-panes/control-panes-controller.js b/res/app/control-panes/control-panes-controller.js index eab21b94..7e2eeeab 100644 --- a/res/app/control-panes/control-panes-controller.js +++ b/res/app/control-panes/control-panes-controller.js @@ -156,6 +156,10 @@ module.exports = }) } + // TODO: Move this out to Ctrl.resolve + // http://blog.brunoscopelliti.com/show-route-only-after-all-promises-are-resolved + // http://odetocode.com/blogs/scott/archive/2014/05/20/using-resolve-in-angularjs-routes.aspx + DeviceService.get($routeParams.serial, $scope) .then(function (device) { return GroupService.invite(device) @@ -164,8 +168,6 @@ module.exports = $scope.device = device $scope.control = ControlService.create(device, device.channel) - //FatalMessageService.open($scope.device) - return device }) .catch(function () { @@ -174,10 +176,6 @@ module.exports = }) }) - // TODO: WHAT??? - //$scope.$watch('device') - - $scope.$watch('device.state', function (newValue, oldValue) { if (newValue !== oldValue) { if (oldValue === 'using') { diff --git a/res/app/control-panes/dashboard/apps/apps-controller.js b/res/app/control-panes/dashboard/apps/apps-controller.js index 27b42947..ff6d7e28 100644 --- a/res/app/control-panes/dashboard/apps/apps-controller.js +++ b/res/app/control-panes/dashboard/apps/apps-controller.js @@ -12,8 +12,11 @@ module.exports = function ShellCtrl($scope) { }) } + // TODO: Move this to server side + // TODO: Android 2.x doesn't support openSetting(), account for that on the UI + + function openSetting(activity) { - // TODO: CHECK THIS run('am start -a android.intent.action.MAIN -n com.android.settings/.Settings\\$' + activity) } diff --git a/res/app/control-panes/dashboard/remote-debug/remote-debug-controller.js b/res/app/control-panes/dashboard/remote-debug/remote-debug-controller.js index e132f8dd..d08a2d17 100644 --- a/res/app/control-panes/dashboard/remote-debug/remote-debug-controller.js +++ b/res/app/control-panes/dashboard/remote-debug/remote-debug-controller.js @@ -23,7 +23,6 @@ module.exports = function RemoteDebugCtrl($scope, $timeout, gettext) { } $scope.$watch('platform', function (newValue) { - console.log('newValue', newValue) if (newValue === 'native') { $scope.remoteDebugTooltip = gettext('Run the following on your command line to debug the device from your IDE') diff --git a/res/app/control-panes/index.js b/res/app/control-panes/index.js index eac24b82..f10b5617 100644 --- a/res/app/control-panes/index.js +++ b/res/app/control-panes/index.js @@ -20,6 +20,11 @@ module.exports = angular.module('control-panes', [ $routeProvider.when('/control/:serial', { template: require('./control-panes.jade'), controller: 'ControlPanesCtrl' + // TODO: Move device inviting to resolve + //resolve: { + // device + // control + //} }) }]) .factory('ControlPanesService', require('./control-panes-service'))