mirror of
https://github.com/DeviceFarmer/stf.git
synced 2026-04-25 18:25:15 +02:00
Fixed kicking in admin mode.
This commit is contained in:
@@ -4,6 +4,7 @@ module.exports = function DeviceListDetailsDirective(
|
|||||||
DeviceColumnService
|
DeviceColumnService
|
||||||
, GroupService
|
, GroupService
|
||||||
, $filter
|
, $filter
|
||||||
|
, $rootScope
|
||||||
) {
|
) {
|
||||||
return {
|
return {
|
||||||
restrict: 'E'
|
restrict: 'E'
|
||||||
@@ -38,7 +39,7 @@ module.exports = function DeviceListDetailsDirective(
|
|||||||
var id = e.target.parentNode.parentNode.id
|
var id = e.target.parentNode.parentNode.id
|
||||||
var device = mapping[id]
|
var device = mapping[id]
|
||||||
|
|
||||||
if (scope.adminMode && device.state === 'busy') {
|
if ($rootScope.adminMode && device.state === 'busy') {
|
||||||
kickDevice(device, true)
|
kickDevice(device, true)
|
||||||
e.preventDefault()
|
e.preventDefault()
|
||||||
}
|
}
|
||||||
@@ -131,7 +132,7 @@ module.exports = function DeviceListDetailsDirective(
|
|||||||
// Check what we're supposed to show now
|
// Check what we're supposed to show now
|
||||||
columnSettings.forEach(function(column) {
|
columnSettings.forEach(function(column) {
|
||||||
|
|
||||||
var skipColumn = scope.adminMode && scope.columnDefinitions[column.name].admin
|
var skipColumn = $rootScope.adminMode && scope.columnDefinitions[column.name].admin
|
||||||
if (skipColumn) {
|
if (skipColumn) {
|
||||||
column.selected = false
|
column.selected = false
|
||||||
return
|
return
|
||||||
|
|||||||
Reference in New Issue
Block a user