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:
Gunther Brunner
2014-07-14 20:20:53 +09:00
parent e33b0f922f
commit fa71aae56a
10 changed files with 91 additions and 24 deletions

View File

@@ -0,0 +1,11 @@
module.exports = function adminModeDirective($rootScope, SettingsService) {
return {
restrict: 'AE',
link: function (scope) {
SettingsService.bind($rootScope, {
target: 'adminMode',
defaultValue: false
})
}
}
}

View File

@@ -0,0 +1,11 @@
describe('AdminModeService', function() {
beforeEach(module('stf.admin-mode'));
it('should ...', inject(function(AdminModeService) {
//expect(AdminModeService.doSomething()).toEqual('something');
}));
})

View File

@@ -0,0 +1,4 @@
module.exports = angular.module('stf.admin-mode', [
])
.directive('adminMode', require('./admin-mode-directive'))