diff --git a/res/app/components/stf/common-ui/modals/fatal-message/fatal-message-service.js b/res/app/components/stf/common-ui/modals/fatal-message/fatal-message-service.js index 4fe9f4a7..7f837956 100644 --- a/res/app/components/stf/common-ui/modals/fatal-message/fatal-message-service.js +++ b/res/app/components/stf/common-ui/modals/fatal-message/fatal-message-service.js @@ -1,6 +1,6 @@ module.exports = function FatalMessageServiceFactory($modal, $location, $route, $interval, - StateClassesService) { + StateClassesService, $timeout) { var FatalMessageService = {} var intervalDeviceInfo @@ -13,12 +13,20 @@ module.exports = //$location.path('/control/' + device.serial) } + function update() { + $scope.device = device + $scope.stateColor = StateClassesService.stateButton(device.state) + } + + update() + + // TODO: remove this please + intervalDeviceInfo = $interval(update, 750) + if (tryToReconnect) { // TODO: this is ugly, find why its not updated correctly (also on the device list) intervalDeviceInfo = $interval(function () { - $scope.device = device - - $scope.stateColor = StateClassesService.stateColor(device.state) + update() if (device.usable) { // Try to reconnect @@ -27,8 +35,6 @@ module.exports = }, 1000, 500) } - $scope.device = device - $scope.second = function () { $modalInstance.dismiss() $location.path('/devices/') diff --git a/res/app/device-list/device-list.css b/res/app/device-list/device-list.css index 5ec6c3db..0a2d2942 100644 --- a/res/app/device-list/device-list.css +++ b/res/app/device-list/device-list.css @@ -71,3 +71,17 @@ img.device-icon-smallest { .stf-device-list .device-product-name-using { border-bottom: 2px solid; /* leaving out the color inherits text color */ } + + +.device-status .using { + +} + +/*using: 'state-using btn-primary',*/ +/*busy: 'state-busy btn-warning',*/ +/*available: 'state-available btn-primary-outline',*/ +/*ready: 'state-ready btn-primary-outline',*/ +/*present: 'state-present btn-primary-outline',*/ +/*preparing: 'state-preparing btn-primary-outline btn-success-outline',*/ +/*unauthorized: 'state-unauthorized btn-danger-outline',*/ +/*offline: 'state-offline btn-warning-outline'*/ diff --git a/res/app/layout/stf-styles.css b/res/app/layout/stf-styles.css index 0fc470e4..40d1d480 100644 --- a/res/app/layout/stf-styles.css +++ b/res/app/layout/stf-styles.css @@ -424,6 +424,10 @@ input { textarea.form-control[disabled], textarea.form-control[readonly], -fieldset[disabled] textarea.form-control { +fieldset[disabled] textarea.form-control, +input[type="text"].form-control[disabled], +input[type="text"].form-control[readonly], +fieldset[disabled] input[type="text"].form-control +{ cursor: text; }