nice-elements 1.10.3 → 1.10.5

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.
Files changed (69) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/README.md +1 -1
  3. package/bower.json +1 -1
  4. package/dist/nice.js +198 -143
  5. package/dist/nice.min.js +1 -1
  6. package/dist/style.css +17 -2
  7. package/dist/style.css.map +1 -1
  8. package/dist/style.min.css +2 -2
  9. package/eslint.config.mjs +28 -0
  10. package/package.json +4 -1
  11. package/src/components/nice-button/nice-button.js +0 -1
  12. package/src/components/nice-calendar/nice-calendar.html +1 -1
  13. package/src/components/nice-calendar/nice-calendar.js +3 -1
  14. package/src/components/nice-checkbox/nice-checkbox.html +1 -1
  15. package/src/components/nice-checkbox/nice-checkbox.js +1 -0
  16. package/src/components/nice-choice/nice-choice.html +1 -1
  17. package/src/components/nice-choice/nice-choice.js +1 -0
  18. package/src/components/nice-comment/nice-comment.html +2 -2
  19. package/src/components/nice-comment/nice-comment.js +3 -1
  20. package/src/components/nice-date/nice-date.html +3 -2
  21. package/src/components/nice-date/nice-date.js +3 -1
  22. package/src/components/nice-date-input/nice-date-input.html +1 -1
  23. package/src/components/nice-date-input/nice-date-input.js +3 -1
  24. package/src/components/nice-date-range/nice-date-range.html +1 -1
  25. package/src/components/nice-date-range/nice-date-range.js +9 -7
  26. package/src/components/nice-datetime-picker/nice-datetime-picker.html +1 -1
  27. package/src/components/nice-datetime-picker/nice-datetime-picker.js +3 -1
  28. package/src/components/nice-datetimerange-picker/nice-datetimerange-picker.html +1 -1
  29. package/src/components/nice-datetimerange-picker/nice-datetimerange-picker.js +3 -1
  30. package/src/components/nice-datetimerange-picker-2/nice-datetimerange-picker-2.html +1 -1
  31. package/src/components/nice-datetimerange-picker-2/nice-datetimerange-picker-2.js +3 -1
  32. package/src/components/nice-dropdown/nice-dropdown.html +3 -2
  33. package/src/components/nice-dropdown/nice-dropdown.js +13 -6
  34. package/src/components/nice-dropdown/nice-dropdown.scss +13 -1
  35. package/src/components/nice-dropdown-date/nice-dropdown-date.html +1 -1
  36. package/src/components/nice-dropdown-date/nice-dropdown-date.js +10 -8
  37. package/src/components/nice-dropdown-old/nice-dropdown-old.html +1 -1
  38. package/src/components/nice-dropdown-old/nice-dropdown-old.js +1 -0
  39. package/src/components/nice-dtp/nice-dtp.js +3 -1
  40. package/src/components/nice-input/nice-input.html +1 -1
  41. package/src/components/nice-input/nice-input.js +1 -0
  42. package/src/components/nice-label/nice-label.html +1 -1
  43. package/src/components/nice-label/nice-label.js +3 -1
  44. package/src/components/nice-number/nice-number.html +1 -1
  45. package/src/components/nice-number/nice-number.js +1 -0
  46. package/src/components/nice-percent/nice-percent.html +1 -1
  47. package/src/components/nice-percent/nice-percent.js +1 -0
  48. package/src/components/nice-progress-bar/nice-progress-bar.html +1 -1
  49. package/src/components/nice-progress-bar/nice-progress-bar.js +1 -0
  50. package/src/components/nice-quantity/nice-quantity.html +1 -1
  51. package/src/components/nice-quantity/nice-quantity.js +2 -0
  52. package/src/components/nice-search/nice-search.html +1 -1
  53. package/src/components/nice-search/nice-search.js +1 -0
  54. package/src/components/nice-search2/nice-search2.html +1 -1
  55. package/src/components/nice-search2/nice-search2.js +1 -0
  56. package/src/components/nice-slot/nice-slot.html +1 -1
  57. package/src/components/nice-slot/nice-slot.js +3 -1
  58. package/src/components/nice-time-picker/nice-time-picker.html +1 -1
  59. package/src/components/nice-time-picker/nice-time-picker.js +3 -1
  60. package/src/components/nice-toggle/nice-toggle.html +2 -2
  61. package/src/components/nice-toggle/nice-toggle.js +4 -2
  62. package/src/components/nice-toggle/nice-toggle.scss +4 -0
  63. package/src/components/nice-upload/nice-upload.html +2 -2
  64. package/src/components/nice-upload/nice-upload.js +3 -1
  65. package/src/components/nice-wrapper/nice-wrapper.html +1 -1
  66. package/src/components/nice-wrapper/nice-wrapper.js +1 -0
  67. package/src/components/nice-yesno/nice-yesno.html +1 -1
  68. package/src/components/nice-yesno/nice-yesno.js +23 -21
  69. package/src/services/nice-service.js +5 -2
@@ -1,7 +1,7 @@
1
1
  <div class="nice-component nice-number" ng-form="niceNumberForm" ng-class="{ 'margin-bottom-0' : noMargin, 'nice-component-inline': isInline }">
2
2
  <div ng-class="{'row' : !disableRow}">
3
3
  <!------------------------- Title ------------------------->
4
- <nice-title text="title" help="help" required="required" label-width="labelWidth"></nice-title>
4
+ <nice-title text="title || niceTitle" help="help" required="required" label-width="labelWidth"></nice-title>
5
5
 
6
6
  <!------------------------- Field ------------------------->
7
7
  <div class="nice-field col-xs-12" ng-class="[fieldWidth ? fieldWidth : 'col-sm-8', { 'nice-disabled': isDisabled }]">
@@ -16,6 +16,7 @@ angular.module('niceElements')
16
16
  valid: '=',
17
17
  isDisabled: '=',
18
18
  title: '@?',
19
+ niceTitle: '@?',
19
20
  min: '@',
20
21
  max: '@',
21
22
  defaultValue: '@',
@@ -1,7 +1,7 @@
1
1
  <ng-form class="nice-component nice-input" ng-class="{ 'margin-bottom-0' : noMargin, 'nice-component-inline': isInline }" name="form">
2
2
  <div class="row">
3
3
  <!------------------------- Title ------------------------->
4
- <nice-title text="title" help="help" required="required" label-width="labelWidth"></nice-title>
4
+ <nice-title text="title || niceTitle" help="help" required="required" label-width="labelWidth"></nice-title>
5
5
 
6
6
  <!------------------------- Field ------------------------->
7
7
  <div class="nice-field col-xs-12" ng-class="fieldWidth ? fieldWidth : 'col-sm-8'">
@@ -17,6 +17,7 @@ angular.module('niceElements')
17
17
  valid: '=',
18
18
  isDisabled: '=',
19
19
  title: '@?',
20
+ niceTitle: '@?',
20
21
  required: '=',
21
22
  fieldWidth: '@',
22
23
  labelWidth: '@',
@@ -1,7 +1,7 @@
1
1
  <div class="nice-component nice-progress-bar" ng-class="{ 'margin-bottom-0': noMargin, 'nice-component-inline': isInline }">
2
2
  <div class="row">
3
3
  <!------------------------- Title ------------------------->
4
- <nice-title text="title" help="help" required="required" label-width="labelWidth"></nice-title>
4
+ <nice-title text="title || niceTitle" help="help" required="required" label-width="labelWidth"></nice-title>
5
5
 
6
6
  <!------------------------- Field ------------------------->
7
7
  <div class="nice-field col-xs-12" ng-class="fieldWidth ? fieldWidth : 'col-sm-8'">
@@ -13,6 +13,7 @@ angular.module('niceElements')
13
13
  replace: true,
14
14
  templateUrl: 'src/components/nice-progress-bar/nice-progress-bar.html',
15
15
  scope: {
16
+ niceTitle: '@',
16
17
  title: '@',
17
18
  noMargin: '@',
18
19
  value: '=',
@@ -1,7 +1,7 @@
1
1
  <div class="nice-component nice-quantity" ng-class="{ 'margin-bottom-0': noMargin, 'nice-component-inline': isInline }">
2
2
  <div class="row">
3
3
  <!------------------------- Title ------------------------->
4
- <nice-title text="title" help="help" required="required" label-width="labelWidth"></nice-title>
4
+ <nice-title text="title || niceTitle" help="help" required="required" label-width="labelWidth"></nice-title>
5
5
 
6
6
  <!------------------------- Field ------------------------->
7
7
  <div class="nice-field col-xs-12" ng-class="[fieldWidth ? fieldWidth : 'col-sm-8', { 'nice-disabled': isDisabled }]">
@@ -12,6 +12,7 @@ angular.module('niceElements')
12
12
  templateUrl: 'src/components/nice-quantity/nice-quantity.html',
13
13
  restrict: 'E',
14
14
  scope: {
15
+ niceTitle: '@',
15
16
  title: '@',
16
17
  model: '=',
17
18
  min: '=?',
@@ -23,6 +24,7 @@ angular.module('niceElements')
23
24
  isDisabled: '=',
24
25
  isInline: '=',
25
26
  help: '@',
27
+ required: '='
26
28
  },
27
29
  controller: function ($scope) {
28
30
  $scope.min = Number($scope.min) || 0;
@@ -1,7 +1,7 @@
1
1
  <ng-form class="nice-component nice-input nice-search" ng-class="{ 'margin-bottom-0': noMargin, 'nice-component-inline': isInline}" name="form">
2
2
  <div class="row">
3
3
  <!------------------------- Title ------------------------->
4
- <nice-title text="title" help="help" required="required" label-width="labelWidth"></nice-title>
4
+ <nice-title text="title || niceTitle" help="help" required="required" label-width="labelWidth"></nice-title>
5
5
 
6
6
  <!------------------------- Field ------------------------->
7
7
  <div class="nice-field col-xs-12" ng-class="[fieldWidth ? fieldWidth : 'col-sm-8', { 'nice-disabled': isDisabled }]">
@@ -16,6 +16,7 @@ angular.module('niceElements')
16
16
  model: '=',
17
17
  isDisabled: '=',
18
18
  title: '@?',
19
+ niceTitle: '@?',
19
20
  placeholder: '@',
20
21
  required: '=',
21
22
  fieldWidth: '@',
@@ -1,7 +1,7 @@
1
1
  <ng-form class="nice-component nice-input nice-search2" ng-class="{ 'margin-bottom-0' : noMargin, 'nice-component-inline': isInline }" name="form">
2
2
  <div class="row">
3
3
  <!------------------------- Title ------------------------->
4
- <nice-title text="title" help="help" required="required" label-width="labelWidth"></nice-title>
4
+ <nice-title text="title || niceTitle" help="help" required="required" label-width="labelWidth"></nice-title>
5
5
 
6
6
  <!------------------------- Field ------------------------->
7
7
  <div class="nice-field col-xs-12" ng-class="[fieldWidth ? fieldWidth : 'col-sm-8', { 'nice-disabled': isDisabled }]" click-outside="close()">
@@ -17,6 +17,7 @@ angular.module('niceElements')
17
17
  isDisabled: '=',
18
18
  showDropdown: '=',
19
19
  title: '@?',
20
+ niceTitle: '@?',
20
21
  placeholder: '@',
21
22
  fieldWidth: '@',
22
23
  labelWidth: '@',
@@ -1,7 +1,7 @@
1
1
  <div class="nice-component nice-slot" ng-class="{ 'margin-bottom-0' : noMargin, 'nice-component-inline': isInline }">
2
2
  <div class="row">
3
3
  <!------------------------- Title ------------------------->
4
- <nice-title text="title" help="help" required="required" label-width="labelWidth"></nice-title>
4
+ <nice-title text="title || niceTitle" help="help" required="required" label-width="labelWidth"></nice-title>
5
5
 
6
6
  <!------------------------- Field ------------------------->
7
7
  <div class="nice-field col-xs-12" ng-class="fieldWidth ? fieldWidth : 'col-xs-8'">
@@ -15,10 +15,12 @@ angular.module('niceElements')
15
15
  scope: {
16
16
  fieldWidth: '@',
17
17
  labelWidth: '@',
18
+ niceTitle: '@',
18
19
  title: '@',
19
20
  noMargin: '@',
20
21
  isInline: '=',
21
- help: '@'
22
+ help: '@',
23
+ required: '='
22
24
  },
23
25
  link: function postLink(scope, element, attrs) {
24
26
  if (!attrs.fieldWidth) { attrs.fieldWidth = 'col-sm-8'; }
@@ -1,7 +1,7 @@
1
1
  <div class="nice-component nice-time-picker" ng-form="forma" ng-class="{ 'margin-bottom-0': noMargin, 'nice-component-inline': isInline }">
2
2
  <div class="row">
3
3
  <!------------------------- Title ------------------------->
4
- <nice-title text="title" help="help" required="required" label-width="labelWidth"></nice-title>
4
+ <nice-title text="title || niceTitle" help="help" required="required" label-width="labelWidth"></nice-title>
5
5
 
6
6
  <!------------------------- Field ------------------------->
7
7
  <div class="nice-field col-xs-12" ng-class="fieldWidth ? fieldWidth : 'col-sm-8'">
@@ -11,6 +11,7 @@ angular.module('niceElements')
11
11
  return {
12
12
  scope: {
13
13
  model: '=',
14
+ niceTitle: '@',
14
15
  title: '@',
15
16
  isDisabled: '=',
16
17
  noMargin: '@',
@@ -18,7 +19,8 @@ angular.module('niceElements')
18
19
  labelWidth: '@',
19
20
  onChange: '&?',
20
21
  isInline: '=',
21
- help: '@'
22
+ help: '@',
23
+ required: '='
22
24
  },
23
25
  restrict: 'E',
24
26
  templateUrl: 'src/components/nice-time-picker/nice-time-picker.html',
@@ -1,7 +1,7 @@
1
- <div class="nice-component nice-toggle" ng-class="{ 'margin-bottom-0' : noMargin, 'title-right': titleRight, 'nice-component-inline': isInline, 'nice-component-block': isBlock, 'active': model }" ng-form="formToggle">
1
+ <div class="nice-component nice-toggle" ng-class="{ 'margin-bottom-0': noMargin, 'title-right': titleRight, 'nice-component-inline': isInline, 'nice-component-block': isBlock, 'active': model }" ng-form="formToggle">
2
2
  <div class="row">
3
3
  <!------------------------- Title ------------------------->
4
- <nice-title text="title" help="help" required="required" label-width="labelWidth"></nice-title>
4
+ <nice-title text="title || niceTitle" help="help" required="required" label-width="labelWidth"></nice-title>
5
5
 
6
6
  <!------------------------- Field ------------------------->
7
7
  <div class="nice-field col-xs-12" ng-class="[fieldWidth ? fieldWidth : 'col-sm-8', { 'nice-disabled': isDisabled }]">
@@ -13,6 +13,7 @@ angular.module('niceElements')
13
13
  restrict: 'E',
14
14
  scope: {
15
15
  model: '=',
16
+ niceTitle: '@',
16
17
  title: '@',
17
18
  isDisabled: '=',
18
19
  fieldWidth: '@',
@@ -22,7 +23,8 @@ angular.module('niceElements')
22
23
  isInline: '=',
23
24
  isBlock: '=',
24
25
  titleRight: '=',
25
- help: '@'
26
+ help: '@',
27
+ required: '='
26
28
  },
27
29
  controller: function ($scope, $timeout) {
28
30
  if (!$scope.title) { $scope.title = ''; }
@@ -42,7 +44,7 @@ angular.module('niceElements')
42
44
  }
43
45
  }
44
46
 
45
- $timeout(function() {
47
+ $timeout(function () {
46
48
  if ($scope.onChange) $scope.onChange({ model: $scope.model });
47
49
  $scope.formToggle.$setDirty();
48
50
  });
@@ -77,6 +77,10 @@
77
77
  height: 25px;
78
78
  transition: background-color 0.3s ease-in-out;
79
79
 
80
+ &:disabled {
81
+ cursor: not-allowed;
82
+ }
83
+
80
84
  &:hover {
81
85
  .nice-toggle-field-handle {
82
86
  background: var(--nice-border-color-darker);
@@ -1,7 +1,7 @@
1
1
  <ng-form class="nice-component nice-upload" ng-class="{ 'margin-bottom-0' : noMargin, 'nice-component-inline': isInline }" name="form">
2
2
  <div class="row">
3
3
  <!------------------------- Title ------------------------->
4
- <nice-title text="title" help="help" required="required" label-width="labelWidth"></nice-title>
4
+ <nice-title text="title || niceTitle" help="help" required="required" label-width="labelWidth"></nice-title>
5
5
 
6
6
  <!------------------------- Field ------------------------->
7
7
  <div class="nice-field col-xs-12" ng-class="[fieldWidth ? fieldWidth : 'col-sm-8', { 'nice-disabled': isDisabled }]">
@@ -15,7 +15,7 @@
15
15
  </div>
16
16
  <img ng-if="imageSource" data-ng-src="{{ imageSource }}" />
17
17
  </div>
18
- <input class="input-file" type="file" accept="{{ accept }}" ng-model="file" ng-disabled="isDisabled || loading" />
18
+ <input class="input-file" type="file" accept="{{ accept }}" ng-model="file" ng-required="required" ng-disabled="isDisabled || loading" />
19
19
  <nice-loader fulldiv="true" ng-if="loading"></nice-loader>
20
20
  </div>
21
21
  </div>
@@ -15,6 +15,7 @@ angular.module('niceElements')
15
15
  templateUrl: 'src/components/nice-upload/nice-upload.html',
16
16
  scope: {
17
17
  model: '=',
18
+ niceTitle: '@',
18
19
  title: '@',
19
20
  text: '@',
20
21
  fieldWidth: '@',
@@ -28,7 +29,8 @@ angular.module('niceElements')
28
29
  isDisabled: '=',
29
30
  isInline: '=',
30
31
  help: '@',
31
- maxFileSize: '@'
32
+ maxFileSize: '@',
33
+ required: '=',
32
34
  },
33
35
 
34
36
  link: function (scope, element, attrs) {
@@ -1,7 +1,7 @@
1
1
  <div class="nice-wrapper" ng-class="{ 'collapsable': collapsable, 'has-header': hasHeader, 'has-footer': hasFooter, 'nice-wrapper-sticky-footer': stickyFooter, 'nice-wrapper-sticky-header': stickyHeader }">
2
2
  <div class="nice-wrapper-header" ng-if="hasHeader" ng-click="toggle()">
3
3
  <div class="nice-wrapper-info">
4
- <div class="nice-wrapper-title" ng-transclude="title">{{ title }}</div>
4
+ <div class="nice-wrapper-title" ng-transclude="title">{{ title || niceTitle }}</div>
5
5
  <div class="nice-wrapper-subtitle" ng-transclude="subtitle">{{ subtitle }}</div>
6
6
  </div>
7
7
  <button type="button" class="nice-wrapper-toggle btn btn-icon btn-default-naked" ng-if="collapsable" ng-class="{ 'is-open': isOpen }">
@@ -18,6 +18,7 @@ angular.module('niceElements')
18
18
  'footer': '?niceWrapperFooter'
19
19
  },
20
20
  scope: {
21
+ niceTitle: '@',
21
22
  title: '@',
22
23
  subtitle: '@',
23
24
  collapsable: '=',
@@ -1,7 +1,7 @@
1
1
  <div class="nice-component nice-yesno" ng-class="{ 'margin-bottom-0' : noMargin, 'nice-component-inline': isInline }" ng-form="formYesno">
2
2
  <div class="row">
3
3
  <!------------------------- Title ------------------------->
4
- <nice-title text="title" help="help" required="required" label-width="labelWidth"></nice-title>
4
+ <nice-title text="title || niceTitle" help="help" required="required" label-width="labelWidth"></nice-title>
5
5
 
6
6
  <!------------------------- Field ------------------------->
7
7
  <div class="nice-field col-xs-12" ng-class="[fieldWidth ? fieldWidth : 'col-sm-8', { 'nice-disabled': isDisabled }]">
@@ -16,6 +16,7 @@ angular.module('niceElements')
16
16
  modelValue: '=',
17
17
  yes: '@',
18
18
  no: '@',
19
+ niceTitle: '@',
19
20
  title: '@',
20
21
  isDisabled: '=',
21
22
  fieldWidth: '@',
@@ -25,26 +26,27 @@ angular.module('niceElements')
25
26
  noMargin: '@',
26
27
  onChange: '&?',
27
28
  isInline: '=',
28
- help: '@'
29
+ help: '@',
30
+ required: '='
29
31
  },
30
- controller: function($scope, gettextCatalog) {
32
+ controller: function ($scope, gettextCatalog) {
31
33
  if (!$scope.yes) { $scope.yes = gettextCatalog.getString('Yes', null, "Nice"); }
32
34
  if (!$scope.no) { $scope.no = gettextCatalog.getString('No', null, "Nice"); }
33
35
  if (!$scope.title) { $scope.title = ''; }
34
36
  if (!$scope.fieldWidth) { $scope.fieldWidth = 'col-sm-8'; }
35
37
  if (!$scope.labelWidth) { $scope.labelWidth = 'col-sm-4'; }
36
- if(!angular.isDefined($scope.model) && !angular.isDefined($scope.options)) $scope.model = !angular.isDefined($scope.defaultFalse);
37
- if(!angular.isDefined($scope.modelValue) && angular.isDefined($scope.options)) $scope.modelValue = $scope.options[0];
38
+ if (!angular.isDefined($scope.model) && !angular.isDefined($scope.options)) $scope.model = !angular.isDefined($scope.defaultFalse);
39
+ if (!angular.isDefined($scope.modelValue) && angular.isDefined($scope.options)) $scope.modelValue = $scope.options[0];
38
40
 
39
41
  $scope.defaultFalse = angular.isDefined($scope.defaultFalse);
40
42
  $scope.noMargin = angular.isDefined($scope.noMargin);
41
43
 
42
44
  $scope.buttonClass = "";
43
-
45
+
44
46
 
45
47
  // ------------------------- Set overlay button position based on passed state in $scope.model -------------------------
46
- $scope.setButtonPosition = function(state) {
47
- if(state) {
48
+ $scope.setButtonPosition = function (state) {
49
+ if (state) {
48
50
  $scope.buttonClass = "yesno-button-yes";
49
51
  } else {
50
52
  $scope.buttonClass = "yesno-button-no";
@@ -52,48 +54,48 @@ angular.module('niceElements')
52
54
  };
53
55
 
54
56
  // ------------------------- Watch for changes from outside -------------------------
55
- $scope.$watch('model', function(value_new, value_old){
56
- if(angular.isDefined($scope.model)){
57
+ $scope.$watch('model', function (value_new, value_old) {
58
+ if (angular.isDefined($scope.model)) {
57
59
  $scope.setButtonLabel($scope.model);
58
60
  $scope.setButtonPosition($scope.model);
59
61
  }
60
62
  });
61
63
 
62
64
  // ------------------------- Watch for model value -------------------------
63
- $scope.$watch('modelValue', function(value_new, value_old){
64
- if($scope.options){
65
+ $scope.$watch('modelValue', function (value_new, value_old) {
66
+ if ($scope.options) {
65
67
  $scope.model = $scope.modelValue == $scope.options[0];
66
68
  }
67
69
  });
68
70
 
69
71
  // ------------------------- Set button label -------------------------
70
- $scope.setButtonLabel = function(state){
72
+ $scope.setButtonLabel = function (state) {
71
73
  if (state) {
72
74
  $scope.state = $scope.yes;
73
75
  } else {
74
76
  $scope.state = $scope.no;
75
77
  }
76
78
  };
77
-
79
+
78
80
  // ------------------------- Set width -------------------------
79
- $scope.setWidth = function(width, el){
81
+ $scope.setWidth = function (width, el) {
80
82
  el.style.width = width;
81
83
  };
82
-
84
+
83
85
 
84
86
  // ------------------------- Switch -------------------------
85
- $scope.switch = function(){
86
- if(!$scope.isDisabled){
87
+ $scope.switch = function () {
88
+ if (!$scope.isDisabled) {
87
89
  $scope.model = !$scope.model;
88
-
89
- if($scope.options){
90
- if($scope.model){
90
+
91
+ if ($scope.options) {
92
+ if ($scope.model) {
91
93
  $scope.modelValue = $scope.options[0];
92
94
  } else {
93
95
  $scope.modelValue = $scope.options[1];
94
96
  }
95
97
  }
96
-
98
+
97
99
  if ($scope.onChange) $scope.onChange({ model: $scope.model });
98
100
  $scope.formYesno.$setDirty();
99
101
  }
@@ -7,12 +7,15 @@
7
7
  * Service in the niceElements.
8
8
  */
9
9
  angular.module('niceElements')
10
- .service('NiceService', function () {
10
+ .service('NiceService', function ($rootScope) {
11
11
  var service = {
12
12
  name: "Nice elements",
13
- version: "1.10.3",
13
+ version: "1.10.5",
14
14
  getHeader: function () {
15
15
  return {};
16
+ },
17
+ toast: function (message, type) {
18
+ $rootScope.$broadcast('toast', message, type);
16
19
  }
17
20
  };
18
21