nice-elements 1.9.7 → 1.9.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  ![Nice elements](https://github.com/Klemen1337/angularjs-nice-elements/raw/master/demo/assets/logo.png)
2
2
 
3
- # Nice elements v1.9.7
3
+ # Nice elements v1.9.8
4
4
 
5
5
  Nice elements is an AngularJS v1.5.8 module that contains nice form elements like inputs, choice fields, search, toggle, dropdown, etc.
6
6
 
@@ -46,6 +46,7 @@ Nice elements is an AngularJS v1.5.8 module that contains nice form elements lik
46
46
  - nice-upload
47
47
  - nice-yesno
48
48
  - nice-pill
49
+ - nice-toggle
49
50
  - ~~nice-datetime-picker~~ (DEPREACATED)
50
51
  - ~~nice-datetimerange-picker~~ (DEPREACATED)
51
52
  - ~~nice-dtp~~ (DEPREACATED)
package/bower.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nice-elements",
3
- "version": "1.9.7",
3
+ "version": "1.9.8",
4
4
  "authors": [
5
5
  "Klemen Kastelic <klemen@olaii.com>"
6
6
  ],
package/dist/nice.js CHANGED
@@ -18,7 +18,7 @@ angular.module('niceElements')
18
18
  label: '@'
19
19
  },
20
20
  link: function postLink(scope, element, attrs) {
21
- if (angular.isDefined(scope.model)) {
21
+ if (angular.isDefined(scope.model)){
22
22
  scope.model = false;
23
23
  }
24
24
  }
@@ -655,14 +655,14 @@ angular.module('niceElements')
655
655
  * # clickOutside
656
656
  */
657
657
  angular.module('niceElements')
658
- .directive('clickOutside', function ($document, $parse, $timeout) {
658
+ .directive('clickOutside', function($document, $parse, $timeout){
659
659
  return {
660
660
  restrict: 'A',
661
661
  link: function ($scope, elem, attr) {
662
662
  $scope.isOpen = false;
663
663
 
664
664
  // watch for is open
665
- attr.$observe('isOpen', function (value) {
665
+ attr.$observe('isOpen', function(value){
666
666
  $scope.isOpen = value == 'true';
667
667
  });
668
668
 
@@ -717,7 +717,7 @@ angular.module('niceElements')
717
717
  // if we have got this far, then we are good to go with processing the command passed in via the click-outside attribute
718
718
  $timeout(function () {
719
719
  fn = $parse(attr['clickOutside']);
720
- fn($scope, { event: e });
720
+ fn($scope, {event: e});
721
721
  });
722
722
  }
723
723
  }
@@ -751,7 +751,7 @@ angular.module('niceElements')
751
751
  });
752
752
  }
753
753
  };
754
- });
754
+ });
755
755
  'use strict';
756
756
 
757
757
  /**
@@ -942,7 +942,7 @@ angular.module('niceElements')
942
942
  */
943
943
  angular.module('niceElements')
944
944
 
945
- .directive('niceDateRange', function () {
945
+ .directive('niceDateRange', function() {
946
946
  return {
947
947
  restrict: 'E',
948
948
  transclude: true,
@@ -962,16 +962,16 @@ angular.module('niceElements')
962
962
  onChange: '&?'
963
963
  },
964
964
 
965
- link: function (scope, attrs) {
965
+ link: function(scope, attrs){
966
966
  if (!attrs.title) { attrs.title = ''; }
967
967
  if (!attrs.fieldWidth) { attrs.fieldWidth = 'col-sm-8'; }
968
968
  if (!attrs.labelWidth) { attrs.labelWidth = 'col-sm-4'; }
969
969
  if (!attrs.format) { attrs.format = 'dd.MM.yyyy'; }
970
970
  attrs.noMargin = angular.isDefined(attrs.noMargin);
971
971
 
972
- if (!angular.isDefined(scope.model)) {
972
+ if(!angular.isDefined(scope.model)) {
973
973
  var model = null;
974
- if (!angular.isDefined(scope.startOfTheYear)) {
974
+ if(!angular.isDefined(scope.startOfTheYear)){
975
975
  model = {
976
976
  startDate: moment().format(),
977
977
  endDate: moment().format()
@@ -987,7 +987,7 @@ angular.module('niceElements')
987
987
  }
988
988
  },
989
989
 
990
- controller: function ($scope) {
990
+ controller: function($scope) {
991
991
  $scope.opts = {
992
992
  locale: {
993
993
  applyClass: 'btn-green',
@@ -1003,7 +1003,7 @@ angular.module('niceElements')
1003
1003
  $scope.opts.ranges[gettextCatalog.getString("Last 30 days", null, "Nice")] = [moment().subtract(30, 'days'), moment()];
1004
1004
  $scope.opts.ranges[gettextCatalog.getString("This month", null, "Nice")] = [moment().startOf('month'), moment().endOf('month')];
1005
1005
 
1006
- if (angular.isDefined($scope.format)) $scope.opts.format = format;
1006
+ if(angular.isDefined($scope.format)) $scope.opts.format = format;
1007
1007
  }
1008
1008
 
1009
1009
  };
@@ -3683,25 +3683,25 @@ angular.module('niceElements')
3683
3683
  };
3684
3684
  });
3685
3685
 
3686
- 'use strict';
3687
-
3688
- /**
3689
- * @ngdoc directive
3690
- * @name niceElements.directive:niceIcon
3691
- * @description
3692
- * # niceIcon
3693
- */
3694
- angular.module('niceElements')
3695
- .directive('niceIcon', function () {
3696
- return {
3697
- templateUrl: 'src/components/nice-icon/nice-icon.html',
3698
- restrict: 'E',
3699
- replace: true,
3700
- scope: {
3701
- icon: '@',
3702
- size: '=',
3703
- },
3704
- };
3686
+ 'use strict';
3687
+
3688
+ /**
3689
+ * @ngdoc directive
3690
+ * @name niceElements.directive:niceIcon
3691
+ * @description
3692
+ * # niceIcon
3693
+ */
3694
+ angular.module('niceElements')
3695
+ .directive('niceIcon', function () {
3696
+ return {
3697
+ templateUrl: 'src/components/nice-icon/nice-icon.html',
3698
+ restrict: 'E',
3699
+ replace: true,
3700
+ scope: {
3701
+ icon: '@',
3702
+ size: '=',
3703
+ },
3704
+ };
3705
3705
  });
3706
3706
  angular.module('niceElements')
3707
3707
  .directive('niceInput', function () {
@@ -3998,42 +3998,42 @@ angular.module('niceElements')
3998
3998
 
3999
3999
  var messageElements = [];
4000
4000
 
4001
- var notify = function (args, t) {
4001
+ var notify = function(args, t){
4002
4002
 
4003
- if (typeof args !== 'object') {
4004
- args = { message: args };
4003
+ if (typeof args !== 'object'){
4004
+ args = {message:args};
4005
4005
  }
4006
4006
 
4007
4007
  args.template = args.template ? args.template : 'src/components/nice-notification/nice-notification.html';
4008
4008
  args.delay = !angular.isUndefined(args.delay) ? args.delay : delay;
4009
4009
  args.type = t ? t : '';
4010
4010
 
4011
- $http.get(args.template, { cache: $templateCache }).success(function (template) {
4011
+ $http.get(args.template,{cache: $templateCache}).success(function(template) {
4012
4012
 
4013
4013
  var scope = $rootScope.$new();
4014
4014
  scope.message = $sce.trustAsHtml(args.message);
4015
4015
  scope.title = $sce.trustAsHtml(args.title);
4016
- scope.t = args.type.substr(0, 1);
4016
+ scope.t = args.type.substr(0,1);
4017
4017
  scope.delay = args.delay;
4018
4018
 
4019
- if (typeof args.scope === 'object') {
4020
- for (var key in args.scope) {
4019
+ if (typeof args.scope === 'object'){
4020
+ for (var key in args.scope){
4021
4021
  scope[key] = args.scope[key];
4022
4022
  }
4023
4023
  }
4024
4024
 
4025
- var reposite = function () {
4025
+ var reposite = function() {
4026
4026
  var j = 0;
4027
4027
  var k = 0;
4028
4028
  var lastTop = startTop;
4029
4029
  var lastRight = startRight;
4030
- for (var i = messageElements.length - 1; i >= 0; i--) {
4030
+ for(var i = messageElements.length - 1; i >= 0; i --) {
4031
4031
  var element = messageElements[i];
4032
4032
  var elHeight = parseInt(element[0].offsetHeight);
4033
4033
  var elWidth = parseInt(element[0].offsetWidth);
4034
4034
  if ((top + elHeight) > window.innerHeight) {
4035
4035
  lastTop = startTop;
4036
- k++;
4036
+ k ++;
4037
4037
  j = 0;
4038
4038
  }
4039
4039
  var top = lastTop + (j === 0 ? 0 : verticalSpacing);
@@ -4043,22 +4043,22 @@ angular.module('niceElements')
4043
4043
  element.css('right', right + 'px');
4044
4044
 
4045
4045
  lastTop = top + elHeight;
4046
- j++;
4046
+ j ++;
4047
4047
  }
4048
4048
  };
4049
4049
 
4050
4050
  var templateElement = $compile(template)(scope);
4051
4051
  templateElement.addClass(args.type);
4052
- templateElement.bind('transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd click', function (e) {
4052
+ templateElement.bind('transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd click', function(e){
4053
4053
  e = e.originalEvent || e;
4054
- if (e.type === 'click' || (e.propertyName === 'opacity' && e.elapsedTime >= 0.4)) {
4054
+ if (e.type === 'click' || (e.propertyName === 'opacity' && e.elapsedTime >= 0.4)){
4055
4055
  templateElement.remove();
4056
4056
  messageElements.splice(messageElements.indexOf(templateElement), 1);
4057
4057
  reposite();
4058
4058
  }
4059
4059
  });
4060
4060
 
4061
- $timeout(function () {
4061
+ $timeout(function() {
4062
4062
  templateElement.addClass('killed');
4063
4063
  templateElement.remove();
4064
4064
  messageElements.splice(messageElements.indexOf(templateElement), 1);
@@ -4070,34 +4070,34 @@ angular.module('niceElements')
4070
4070
 
4071
4071
  $timeout(reposite);
4072
4072
 
4073
- }).error(function (data) {
4074
- throw new Error('Template (' + args.template + ') could not be loaded. ' + data);
4073
+ }).error(function(data){
4074
+ throw new Error('Template ('+args.template+') could not be loaded. ' + data);
4075
4075
  });
4076
4076
 
4077
4077
  };
4078
4078
 
4079
- notify.config = function (args) {
4080
- startTop = args.top ? args.top : startTop;
4081
- verticalSpacing = args.verticalSpacing ? args.verticalSpacing : verticalSpacing;
4079
+ notify.config = function(args){
4080
+ startTop = args.top ? args.top : startTop;
4081
+ verticalSpacing = args.verticalSpacing ? args.verticalSpacing : verticalSpacing;
4082
4082
  };
4083
4083
 
4084
- notify.primary = function () {
4084
+ notify.primary = function() {
4085
4085
  this(args, '');
4086
4086
  };
4087
4087
 
4088
- notify.error = function (args) {
4088
+ notify.error = function(args) {
4089
4089
  this(args, 'error');
4090
4090
  };
4091
4091
 
4092
- notify.success = function (args) {
4092
+ notify.success = function(args) {
4093
4093
  this(args, 'success');
4094
4094
  };
4095
4095
 
4096
- notify.info = function (args) {
4096
+ notify.info = function(args) {
4097
4097
  this(args, 'info');
4098
4098
  };
4099
4099
 
4100
- notify.warning = function (args) {
4100
+ notify.warning = function(args) {
4101
4101
  this(args, 'warning');
4102
4102
  };
4103
4103
 
@@ -4528,7 +4528,7 @@ angular.module('niceElements')
4528
4528
  * # niceProgressBar
4529
4529
  */
4530
4530
  angular.module('niceElements')
4531
- .directive('niceProgressBar', function () {
4531
+ .directive('niceProgressBar', function() {
4532
4532
  return {
4533
4533
  restrict: 'E',
4534
4534
  replace: true,
@@ -4543,29 +4543,29 @@ angular.module('niceElements')
4543
4543
  help: '@'
4544
4544
  },
4545
4545
 
4546
- controller: function ($scope, $element, $timeout) {
4546
+ controller: function($scope, $element, $timeout) {
4547
4547
  $scope.width = 0;
4548
- $scope.resize = function () {
4549
- $timeout(function () {
4548
+ $scope.resize = function(){
4549
+ $timeout(function() {
4550
4550
  $scope.width = $element[0].getElementsByClassName("progress")[0].offsetWidth;
4551
- }, 100);
4551
+ },100);
4552
4552
  };
4553
- window.onresize = function () {
4553
+ window.onresize = function() {
4554
4554
  $scope.resize();
4555
4555
  };
4556
4556
  $scope.resize();
4557
4557
 
4558
+
4558
4559
 
4559
-
4560
- $scope.$watch("value", function (valueNew, valueOld) {
4560
+ $scope.$watch("value", function(valueNew, valueOld){
4561
4561
  $scope.calculate();
4562
4562
  });
4563
4563
 
4564
- $scope.$watch("max", function (valueNew, valueOld) {
4564
+ $scope.$watch("max", function(valueNew, valueOld){
4565
4565
  $scope.calculate();
4566
4566
  });
4567
4567
 
4568
- $scope.calculate = function () {
4568
+ $scope.calculate = function(){
4569
4569
  $scope.percentage = ($scope.value / $scope.max) * 100;
4570
4570
  };
4571
4571
 
@@ -5347,6 +5347,102 @@ angular.module('niceElements')
5347
5347
  });
5348
5348
  'use strict';
5349
5349
 
5350
+ /**
5351
+ * @ngdoc directive
5352
+ * @name niceElements.directive:niceToggle
5353
+ * @description
5354
+ * # niceToggle
5355
+ */
5356
+ angular.module('niceElements')
5357
+ .directive('niceToggle', function () {
5358
+ return {
5359
+ templateUrl: 'src/components/nice-toggle/nice-toggle.html',
5360
+ restrict: 'E',
5361
+ scope: {
5362
+ model: '=',
5363
+ title: '@',
5364
+ isDisabled: '=',
5365
+ fieldWidth: '@',
5366
+ labelWidth: '@',
5367
+ defaultFalse: '@',
5368
+ noMargin: '@',
5369
+ onChange: '&?',
5370
+ isInline: '=',
5371
+ help: '@'
5372
+ },
5373
+ controller: function ($scope) {
5374
+ if (!$scope.title) { $scope.title = ''; }
5375
+ if (!$scope.fieldWidth) { $scope.fieldWidth = 'col-sm-8'; }
5376
+ if (!$scope.labelWidth) { $scope.labelWidth = 'col-sm-4'; }
5377
+
5378
+ // ------------------------- Set overlay button position based on passed state in $scope.model -------------------------
5379
+ $scope.setButtonPosition = function (state) {
5380
+ if (state) {
5381
+ $scope.buttonClass = "yesno-button-yes";
5382
+ } else {
5383
+ $scope.buttonClass = "yesno-button-no";
5384
+ }
5385
+ };
5386
+
5387
+ // ------------------------- Watch for changes from outside -------------------------
5388
+ $scope.$watch('model', function (value_new, value_old) {
5389
+ if (angular.isDefined($scope.model)) {
5390
+ $scope.setButtonLabel($scope.model);
5391
+ $scope.setButtonPosition($scope.model);
5392
+ }
5393
+ });
5394
+
5395
+ // ------------------------- Watch for model value -------------------------
5396
+ $scope.$watch('modelValue', function (value_new, value_old) {
5397
+ if ($scope.options) {
5398
+ $scope.model = $scope.modelValue == $scope.options[0];
5399
+ }
5400
+ });
5401
+
5402
+ // ------------------------- Set button label -------------------------
5403
+ $scope.setButtonLabel = function (state) {
5404
+ if (state) {
5405
+ $scope.state = $scope.yes;
5406
+ } else {
5407
+ $scope.state = $scope.no;
5408
+ }
5409
+ };
5410
+
5411
+ // ------------------------- Set width -------------------------
5412
+ $scope.setWidth = function (width, el) {
5413
+ el.style.width = width;
5414
+ };
5415
+
5416
+
5417
+ // ------------------------- Switch -------------------------
5418
+ $scope.switch = function () {
5419
+ if (!$scope.isDisabled) {
5420
+ $scope.model = !$scope.model;
5421
+
5422
+ if ($scope.options) {
5423
+ if ($scope.model) {
5424
+ $scope.modelValue = $scope.options[0];
5425
+ } else {
5426
+ $scope.modelValue = $scope.options[1];
5427
+ }
5428
+ }
5429
+
5430
+ if ($scope.onChange) $scope.onChange({ model: $scope.model });
5431
+ $scope.formYesno.$setDirty();
5432
+ }
5433
+ };
5434
+
5435
+ // Call it first time
5436
+ $scope.setButtonPosition($scope.model);
5437
+
5438
+ // Set label based on state passed in $scope.model
5439
+ $scope.setButtonLabel($scope.model);
5440
+ }
5441
+ };
5442
+ });
5443
+
5444
+ 'use strict';
5445
+
5350
5446
  /**
5351
5447
  * @ngdoc directive
5352
5448
  * @name niceElements.directive:niceTooltip
@@ -5600,24 +5696,24 @@ angular.module('niceElements')
5600
5696
  isInline: '=',
5601
5697
  help: '@'
5602
5698
  },
5603
- controller: function ($scope, gettextCatalog) {
5699
+ controller: function($scope, gettextCatalog) {
5604
5700
  if (!$scope.yes) { $scope.yes = gettextCatalog.getString('Yes', null, "Nice"); }
5605
5701
  if (!$scope.no) { $scope.no = gettextCatalog.getString('No', null, "Nice"); }
5606
5702
  if (!$scope.title) { $scope.title = ''; }
5607
5703
  if (!$scope.fieldWidth) { $scope.fieldWidth = 'col-sm-8'; }
5608
5704
  if (!$scope.labelWidth) { $scope.labelWidth = 'col-sm-4'; }
5609
- if (!angular.isDefined($scope.model) && !angular.isDefined($scope.options)) $scope.model = !angular.isDefined($scope.defaultFalse);
5610
- if (!angular.isDefined($scope.modelValue) && angular.isDefined($scope.options)) $scope.modelValue = $scope.options[0];
5705
+ if(!angular.isDefined($scope.model) && !angular.isDefined($scope.options)) $scope.model = !angular.isDefined($scope.defaultFalse);
5706
+ if(!angular.isDefined($scope.modelValue) && angular.isDefined($scope.options)) $scope.modelValue = $scope.options[0];
5611
5707
 
5612
5708
  $scope.defaultFalse = angular.isDefined($scope.defaultFalse);
5613
5709
  $scope.noMargin = angular.isDefined($scope.noMargin);
5614
5710
 
5615
5711
  $scope.buttonClass = "";
5616
-
5712
+
5617
5713
 
5618
5714
  // ------------------------- Set overlay button position based on passed state in $scope.model -------------------------
5619
- $scope.setButtonPosition = function (state) {
5620
- if (state) {
5715
+ $scope.setButtonPosition = function(state) {
5716
+ if(state) {
5621
5717
  $scope.buttonClass = "yesno-button-yes";
5622
5718
  } else {
5623
5719
  $scope.buttonClass = "yesno-button-no";
@@ -5625,48 +5721,48 @@ angular.module('niceElements')
5625
5721
  };
5626
5722
 
5627
5723
  // ------------------------- Watch for changes from outside -------------------------
5628
- $scope.$watch('model', function (value_new, value_old) {
5629
- if (angular.isDefined($scope.model)) {
5724
+ $scope.$watch('model', function(value_new, value_old){
5725
+ if(angular.isDefined($scope.model)){
5630
5726
  $scope.setButtonLabel($scope.model);
5631
5727
  $scope.setButtonPosition($scope.model);
5632
5728
  }
5633
5729
  });
5634
5730
 
5635
5731
  // ------------------------- Watch for model value -------------------------
5636
- $scope.$watch('modelValue', function (value_new, value_old) {
5637
- if ($scope.options) {
5732
+ $scope.$watch('modelValue', function(value_new, value_old){
5733
+ if($scope.options){
5638
5734
  $scope.model = $scope.modelValue == $scope.options[0];
5639
5735
  }
5640
5736
  });
5641
5737
 
5642
5738
  // ------------------------- Set button label -------------------------
5643
- $scope.setButtonLabel = function (state) {
5739
+ $scope.setButtonLabel = function(state){
5644
5740
  if (state) {
5645
5741
  $scope.state = $scope.yes;
5646
5742
  } else {
5647
5743
  $scope.state = $scope.no;
5648
5744
  }
5649
5745
  };
5650
-
5746
+
5651
5747
  // ------------------------- Set width -------------------------
5652
- $scope.setWidth = function (width, el) {
5748
+ $scope.setWidth = function(width, el){
5653
5749
  el.style.width = width;
5654
5750
  };
5655
-
5751
+
5656
5752
 
5657
5753
  // ------------------------- Switch -------------------------
5658
- $scope.switch = function () {
5659
- if (!$scope.isDisabled) {
5754
+ $scope.switch = function(){
5755
+ if(!$scope.isDisabled){
5660
5756
  $scope.model = !$scope.model;
5661
-
5662
- if ($scope.options) {
5663
- if ($scope.model) {
5757
+
5758
+ if($scope.options){
5759
+ if($scope.model){
5664
5760
  $scope.modelValue = $scope.options[0];
5665
5761
  } else {
5666
5762
  $scope.modelValue = $scope.options[1];
5667
5763
  }
5668
5764
  }
5669
-
5765
+
5670
5766
  if ($scope.onChange) $scope.onChange({ model: $scope.model });
5671
5767
  $scope.formYesno.$setDirty();
5672
5768
  }
@@ -5728,7 +5824,7 @@ angular.module('niceElements')
5728
5824
  .service('NiceService', function () {
5729
5825
  var service = {
5730
5826
  name: "Nice elements",
5731
- version: "1.9.7",
5827
+ version: "1.9.8",
5732
5828
  getHeader: function () {
5733
5829
  return {};
5734
5830
  }
@@ -5804,7 +5900,7 @@ angular.module('niceElements')
5804
5900
  };
5805
5901
  });
5806
5902
 
5807
- angular.module('niceElements').run(['$templateCache', function ($templateCache) {
5903
+ angular.module('niceElements').run(['$templateCache', function($templateCache) {
5808
5904
  'use strict';
5809
5905
 
5810
5906
  $templateCache.put('src/components/nice-button-toggle/nice-button-toggle.html',
@@ -7625,12 +7721,12 @@ angular.module('niceElements').run(['$templateCache', function ($templateCache)
7625
7721
  "<path d=\"m364 102.4-1.8-1.4c.4 0 .7 0 1-.2.1-.1.3-.4.3-.8l1.1 1 .6.5v.4a.5.5 0 0 1 0 .2.6.6 0 0 1-.4.2h-.7z\"/>\n" +
7626
7722
  "<path d=\"M366.2 103.8a11.8 11.8 0 0 1-2-1.3h.7a.8.8 0 0 0 .4-.2l.1-.4a1 1 0 0 0 0-.2 10.5 10.5 0 0 0 2.1 1.4c0 .3 0 .4-.3.5a3 3 0 0 1-1 .1z\"/>\n" +
7627
7723
  "<path d=\"M368.4 104.7a11.9 11.9 0 0 1-2-.8c.4 0 .7 0 1-.2.2 0 .3-.2.3-.5a10.8 10.8 0 0 0 1.3.6v.4l-.5.4s-.1 0 0 0z\"/>\n" +
7628
- "<path d=\"M373.2 104.2s.4-.1.2 0c-1.4 1-3.1 1-4.8.5.3-.1.5-.2.6-.4a.6.6 0 0 0 0-.5l1.7.4a.4.4 0 0 1-.1.3l-.5.3s-.1 0 0 .1c0 .1 0 0 0 0 .3 0 .5-.2.6-.3a.6.6 0 0 0 .2-.4 9 9 0 0 0 2 0zm-9.7 24-.2.4-1.2.3c0 .3 0 .4.3.4l.7-.3c.1 0 0 .5-.5.8v.1c.4.6 1.4.4 1.9.3a3 3 0 0 0 1.3-1l-.3-.6c-.4.1-.6 0-.5-.2a3.9 3.9 0 0 0-1.5-.2zm-15.1-4.8c-.3.3-.7.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4 1.4 0 0 0-.4 0h-.1l-1.3 1c.3.1.6.2.7.4z\"/>\n" +
7629
7725
  "</g>\n" +
7630
7726
  "<path fill=\"#0093dd\" d=\"m409 156.5 20.8-47-15.3-24.7-27.3 10-12.7 49.8a219.4 219.4 0 0 1 34.5 11.9z\"/>\n" +
7631
7727
  "<path fill=\"#fff\" d=\"M382.6 113a251.7 251.7 0 0 1 39.6 13.7l-8 18.2a232 232 0 0 0-36.5-12.7z\"/>\n" +
7632
7728
  "<path fill=\"red\" d=\"m415.4 142 5.4-12.2a248.6 248.6 0 0 0-39-13.5l-3.2 12.4a235.9 235.9 0 0 1 37 12.8l-.1.4z\"/>\n" +
7633
- "<path d=\"M385.6 125.8c.3-.3.7-.2 1.1-.1.3-.2.7-.2 1-.2l.6-.2c.2 0 .2-.2 0-.3a.6.6 0 0 1 0-.3c-.7-.4-1-1-1.2-1.5-.3 0-.5-.2-.5-.3h-.5c-.8 0-1-.3-1.3-.5a1 1 0 0 1-.6-.4l-.3-.3c-.2-.3-.1-.7.2-.7h.7a2 2 0 0 1 .9-.1c.3 0 .5-.3.9-.6v-.4s0-.2.2-.1a1 1 0 0 1 .8.5c.5 0 1 .3 1.2.7.7 0 1.1.3 1.2.5 0 .2-.2.4-.5.6v.2l.4.4 1 .7c1-.1 2.6.6 4.8 2a18.6 18.6 0 0 1 4.1 1.2h.9c2.4-.4 4.7 0 6.8 1.5.8.1 1.5.4 2.2.7.5.2 1 .3 1.6.3a8 8 0 0 1 2.6.7c1 .2 1.9.7 2.4 1.2.4.5.3 1-.2 1.2-.3.6-.9.6-1.8.3-.6.1-1.3-.4-2-.9-.8-.2-1.6-.8-2.4-1.3l-1.3-.6h-.8v.2c.2.2.4.4.4.8v1c0 .4.3.6.7.9l1 .4c.2 0 .3.1.3.3l.4 1.7.4.3c.6.5.2 1-.3 1a3.1 3.1 0 0 1-1.3.8c-.4.2-.6 0-.7-.2a.5.5 0 0 1-.4-.2c-.5-.4-.1-1 1-.7l.2-.2a1.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ff\" d=\"M401.2 130.5s0-.2-.3 0c-.8 0-1.6 0-2.2-.4-.7-.4-1.3-.8-2-.8l.7-.4h1.5c.7 0 1.4.2 2 .4.4.2.8.5 1 .8a3.4 3.4 0 0 1 .8.7 2.5 2.5 0 0 1-.7 0 2.9 2.9 0 0 1-.8-.3z\"/>\n" +
7635
7731
  "<path d=\"M403 94.7v.2l.9 4.9-3.7 3.2-.2.1.2.1 4.7 1.6 1 4.9v.2l.2-.1 3.7-3.3 4.6 1.6h.3v-.1l-1-4.9 3.7-3.2.2-.2h-.3l-4.6-1.6-1-4.9V93l-.2.1-3.7 3.3-4.7-1.6z\"/>\n" +
7636
7732
  "<path fill=\"#f7db17\" d=\"m400.6 103 3.5-3 4.4 1.4zm8.5-1.7 3.4-3 4.4 1.5zm7.8-1.3-3.4 3-4.4-1.5zm-8.4 1.6-3.5 3-4.3-1.5zm-5-6.4 4.3 1.4.8 4.6zm5.5 6.4 4.4 1.5.9 4.5zm5.1 6.1-4.3-1.5-.9-4.5zm-5.6-6.4-4.3-1.5-.9-4.5zm3-7.7 1 4.6-3.5 3zm-2.7 8.1.8 4.6-3.4 3zm-2.8 7.5-.9-4.5 3.5-3zm2.8-8-.9-4.6 3.5-3z\"/>\n" +
@@ -7713,6 +7809,20 @@ angular.module('niceElements').run(['$templateCache', function ($templateCache)
7713
7809
  );
7714
7810
 
7715
7811
 
7812
+ $templateCache.put('src/components/nice-toggle/nice-toggle.html',
7813
+ "<div class=\"nice-component nice-toggle\" ng-class=\"{ 'margin-bottom-0' : noMargin, 'nice-component-inline': isInline }\" ng-form=\"formToggle\">\n" +
7814
+ "<div class=\"row\">\n" +
7815
+ "<nice-title text=\"title\" help=\"help\" required=\"required\" label-width=\"labelWidth\"></nice-title>\n" +
7816
+ "<div class=\"nice-field col-xs-12\" ng-class=\"[fieldWidth ? fieldWidth : 'col-sm-8', { 'nice-disabled': isDisabled }]\">\n" +
7817
+ "<button class=\"nice-toggle-field\" ng-click=\"switch()\" ng-disabled=\"isDisabled\" type=\"button\">\n" +
7818
+ "<div class=\"nice-toggle-field-handle\" ng-class=\"{ 'active': model }\">{{ state }}</div>\n" +
7819
+ "</button>\n" +
7820
+ "</div>\n" +
7821
+ "</div>\n" +
7822
+ "</div>"
7823
+ );
7824
+
7825
+
7716
7826
  $templateCache.put('src/components/nice-upload/nice-upload.html',
7717
7827
  "<ng-form class=\"nice-component nice-upload\" ng-class=\"{ 'margin-bottom-0' : noMargin, 'nice-component-inline': isInline }\" name=\"form\">\n" +
7718
7828
  "<div class=\"row\">\n" +