mirror of
https://github.com/DeviceFarmer/stf.git
synced 2026-04-18 08:03:30 +02:00
Added admin-mode.
For now it shows/hides columns in the Device List and adds kicking behaviour. Using $rootScope.adminMode for convenience.
This commit is contained in:
11
res/app/components/stf/admin-mode/admin-mode-directive.js
Normal file
11
res/app/components/stf/admin-mode/admin-mode-directive.js
Normal file
@@ -0,0 +1,11 @@
|
||||
module.exports = function adminModeDirective($rootScope, SettingsService) {
|
||||
return {
|
||||
restrict: 'AE',
|
||||
link: function (scope) {
|
||||
SettingsService.bind($rootScope, {
|
||||
target: 'adminMode',
|
||||
defaultValue: false
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
11
res/app/components/stf/admin-mode/admin-mode-spec.js
Normal file
11
res/app/components/stf/admin-mode/admin-mode-spec.js
Normal file
@@ -0,0 +1,11 @@
|
||||
describe('AdminModeService', function() {
|
||||
|
||||
beforeEach(module('stf.admin-mode'));
|
||||
|
||||
it('should ...', inject(function(AdminModeService) {
|
||||
|
||||
//expect(AdminModeService.doSomething()).toEqual('something');
|
||||
|
||||
}));
|
||||
|
||||
})
|
||||
4
res/app/components/stf/admin-mode/index.js
Normal file
4
res/app/components/stf/admin-mode/index.js
Normal file
@@ -0,0 +1,4 @@
|
||||
module.exports = angular.module('stf.admin-mode', [
|
||||
|
||||
])
|
||||
.directive('adminMode', require('./admin-mode-directive'))
|
||||
Reference in New Issue
Block a user