diff --git a/bower.json b/bower.json index 50952643..ecb34a89 100644 --- a/bower.json +++ b/bower.json @@ -11,7 +11,7 @@ "fa-borderlayout": "git@ghe.amb.ca.local:gunther-brunner/fa-borderlayout.git", "Snap.svg": "~0.2.0", "angular-localForage": "~0.0.2", - "ng-table": "~0.3.1", + "ng-table": "git://github.com/esvit/ng-table.git#880fbb26eda602c873b1448c92bdcf813296a72a", "jquery.terminal": "~0.8.4", "stf-site": "git@ghe.amb.ca.local:stf/stf-site.git", "angular-gettext": "~0.2.5", diff --git a/res/app/components/stf/device/device-service.js b/res/app/components/stf/device/device-service.js index d10aa46b..550226f4 100644 --- a/res/app/components/stf/device/device-service.js +++ b/res/app/components/stf/device/device-service.js @@ -48,7 +48,7 @@ module.exports = function DeviceServiceFactory($rootScope, $http, socket) { data.state = 'busy' } else { - data.state = 'usable' + data.state = 'available' } } } diff --git a/res/app/components/stf/user/user-service.js b/res/app/components/stf/user/user-service.js index 5037ac47..42bc7450 100644 --- a/res/app/components/stf/user/user-service.js +++ b/res/app/components/stf/user/user-service.js @@ -1,6 +1,5 @@ module.exports = function UserServiceFactory($http) { - var userService = { - } + var userService = {} userService.user = (function () { var userPromise = $http.get('/api/v1/user') diff --git a/res/app/device-list/device-list.css b/res/app/device-list/device-list.css index 287e9e61..d3935b45 100644 --- a/res/app/device-list/device-list.css +++ b/res/app/device-list/device-list.css @@ -1,7 +1,18 @@ .device-list { - color: deepskyblue; + color: deepskyblue; } +.stf-device-list .devices-not-available { + background: #f6f6f6; +} + +.stf-device-list .line { + height: 1px; + width: 100%; + /*padding: 10px 15px 12px 2px;*/ + border-bottom: 1px solid #e2e2e2; + margin: 0; +} ul.devices-icon-view { margin: 0; diff --git a/res/app/device-list/device-list.jade b/res/app/device-list/device-list.jade index 02ed537b..00a6d817 100644 --- a/res/app/device-list/device-list.jade +++ b/res/app/device-list/device-list.jade @@ -1,4 +1,4 @@ -div +div.stf-device-list .row .col-md-12 .widget-container.fluid-height @@ -11,12 +11,26 @@ div nothing-to-show(message='{{"No devices connected"|translate}}', icon='fa-sitemap', ng-show='!tracker.devices.length') ul.devices-icon-view - li(ng-repeat='device in tracker.devices track by device.serial', ng-disabled='!isControllable(device)', ng-click='toggle(device)', - ng-class='{"device-is-busy": deviceStatus(device) == "busy"}').cursor-select.pointer.thumbnail + li(ng-repeat='device in tracker.devices | filter:{usable:true} | orderBy:"name" track by device.serial', + ng-click='toggle(device)', + ).cursor-select.pointer.thumbnail .device-photo-small img(ng-src='{{device.image ? "/static/devices/" + device.image : "/static/bower_components/stf-graphics/devices/small/default.jpg" }}') - .device-name(title='{{device.serial}} - {{device.model}}') {{ device.name }} - raphael-status-icon.device-status-button(status='{{ deviceStatus(device) }}', title="{{ deviceStatusText(device) }}", tooltip='{{ deviceStatusText(device)|translate }}') + .device-name(title='{{device.serial}} - {{device.model}}') {{ device.name || device.model }} + //raphael-status-icon.device-status-button(status='{{ deviceStatus(device) }}', title="{{ deviceStatusText(device) }}", tooltip='{{ deviceStatusText(device)|translate }}') + p {{statusName(device)}} + .clear-fix + .clear-fix + .line + ul.devices-icon-view + li(ng-repeat='device in tracker.devices | filter:{usable:false} | orderBy:"name" track by device.serial', + ng-disabled='true', + ).cursor-select.pointer.thumbnail.device-is-busy + .device-photo-small + img(ng-src='{{device.image ? "/static/devices/" + device.image : "/static/bower_components/stf-graphics/devices/small/default.jpg" }}') + .device-name(title='{{device.serial}} - {{device.model}}') {{ device.name || device.model }} + //raphael-status-icon.device-status-button(status='{{ deviceStatus(device) }}', title="{{ deviceStatusText(device) }}", tooltip='{{ deviceStatusText(device)|translate }}') + p {{statusName(device)}} .clear-fix tab(heading='Details') @@ -85,6 +99,7 @@ div td(width='10%', data-title='"User"', ng-show='showDeviceUsers') a(ng-href='{{deviceUser(device).link}}', target='_blank') {{ deviceUser(device).name }} + ul li(ng-repeat='device in tracker.devices track by device.serial') pre {{device|json}}