diff --git a/src/app/pages/form/inputs/widgets/switch/SwitchPanelCtrl.js b/src/app/pages/form/inputs/widgets/switch/SwitchPanelCtrl.js new file mode 100644 index 0000000..4ea425d --- /dev/null +++ b/src/app/pages/form/inputs/widgets/switch/SwitchPanelCtrl.js @@ -0,0 +1,24 @@ +/** + * @author v.lugovsky + * created on 07.06.2016 + */ +(function () { + 'use strict'; + + angular.module('BlurAdmin.pages.form') + .controller('SwitchPanelCtrl', SwitchPanelCtrl); + + /** @ngInject */ + function SwitchPanelCtrl() { + var vm = this; + + vm.switcherValues = { + primary: true, + warning: true, + danger: true, + info: true, + success: true + }; + } + +})(); diff --git a/src/app/pages/form/inputs/widgets/switch/switch.directive.js b/src/app/pages/form/inputs/widgets/switch/switch.directive.js index 0608a69..7b2937c 100644 --- a/src/app/pages/form/inputs/widgets/switch/switch.directive.js +++ b/src/app/pages/form/inputs/widgets/switch/switch.directive.js @@ -16,10 +16,11 @@ scope: { ngModel: '=' }, - template: '
', + template: function(el, attrs) { + return '
'; + }, link: function (scope, elem, attr) { $timeout(function(){ - scope.color = attr.color; var input = $(elem).find('input'); input.bootstrapSwitch({ size: 'small', diff --git a/src/app/pages/form/inputs/widgets/switch/switch.html b/src/app/pages/form/inputs/widgets/switch/switch.html index dfc9645..c8b0034 100644 --- a/src/app/pages/form/inputs/widgets/switch/switch.html +++ b/src/app/pages/form/inputs/widgets/switch/switch.html @@ -1,7 +1,7 @@ -
- - - - - +
+ + + + +
\ No newline at end of file