nice-elements 1.12.7 → 1.12.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.
Files changed (155) hide show
  1. package/.vscode/settings.json +18 -18
  2. package/CHANGELOG.md +568 -564
  3. package/LICENSE.md +21 -21
  4. package/README.md +98 -98
  5. package/bower.json +17 -17
  6. package/dist/nice.js +11585 -9150
  7. package/dist/nice.min.js +1 -1
  8. package/dist/style.css +7 -7
  9. package/dist/style.min.css +7 -7
  10. package/eslint.config.mjs +32 -32
  11. package/package.json +44 -44
  12. package/src/components/nice-alert/nice-alert.html +6 -6
  13. package/src/components/nice-alert/nice-alert.js +29 -29
  14. package/src/components/nice-alert/nice-alert.scss +59 -59
  15. package/src/components/nice-avatar/nice-avatar.js +122 -122
  16. package/src/components/nice-avatar/nice-avatar.scss +4 -4
  17. package/src/components/nice-button/nice-button.html +4 -4
  18. package/src/components/nice-button/nice-button.js +41 -41
  19. package/src/components/nice-button/nice-button.scss +16 -16
  20. package/src/components/nice-button-toggle/nice-button-toggle.html +9 -9
  21. package/src/components/nice-button-toggle/nice-button-toggle.js +23 -23
  22. package/src/components/nice-button-toggle/nice-button-toggle.scss +2 -2
  23. package/src/components/nice-calendar/nice-calendar.html +91 -91
  24. package/src/components/nice-calendar/nice-calendar.js +346 -346
  25. package/src/components/nice-calendar/nice-calendar.scss +288 -288
  26. package/src/components/nice-checkbox/nice-checkbox.html +9 -9
  27. package/src/components/nice-checkbox/nice-checkbox.js +37 -37
  28. package/src/components/nice-checkbox/nice-checkbox.scss +120 -120
  29. package/src/components/nice-choice/nice-choice.html +18 -18
  30. package/src/components/nice-choice/nice-choice.js +211 -211
  31. package/src/components/nice-choice/nice-choice.scss +110 -110
  32. package/src/components/nice-click-outside/nice-click-outside.js +105 -105
  33. package/src/components/nice-comment/nice-comment.html +10 -10
  34. package/src/components/nice-comment/nice-comment.js +71 -71
  35. package/src/components/nice-comment/nice-comment.scss +39 -39
  36. package/src/components/nice-date/nice-date.html +82 -82
  37. package/src/components/nice-date/nice-date.js +350 -350
  38. package/src/components/nice-date/nice-date.scss +305 -305
  39. package/src/components/nice-date-input/nice-date-input.html +56 -56
  40. package/src/components/nice-date-input/nice-date-input.js +143 -143
  41. package/src/components/nice-date-input/nice-date-input.scss +55 -55
  42. package/src/components/nice-date-range/nice-date-range.html +15 -15
  43. package/src/components/nice-date-range/nice-date-range.js +78 -78
  44. package/src/components/nice-date-range/nice-date-range.scss +390 -390
  45. package/src/components/nice-datetime-picker/nice-datetime-picker.html +29 -29
  46. package/src/components/nice-datetime-picker/nice-datetime-picker.js +89 -89
  47. package/src/components/nice-datetime-picker/nice-datetime-picker.scss +428 -428
  48. package/src/components/nice-datetimerange-picker/nice-datetimerange-picker.html +55 -55
  49. package/src/components/nice-datetimerange-picker/nice-datetimerange-picker.js +248 -248
  50. package/src/components/nice-datetimerange-picker/nice-datetimerange-picker.scss +73 -73
  51. package/src/components/nice-datetimerange-picker-2/nice-datetimerange-picker-2.html +44 -44
  52. package/src/components/nice-datetimerange-picker-2/nice-datetimerange-picker-2.js +175 -175
  53. package/src/components/nice-datetimerange-picker-2/nice-datetimerange-picker-2.scss +127 -127
  54. package/src/components/nice-dropdown/nice-dropdown.html +61 -61
  55. package/src/components/nice-dropdown/nice-dropdown.js +517 -517
  56. package/src/components/nice-dropdown/nice-dropdown.scss +262 -262
  57. package/src/components/nice-dropdown-date/nice-dropdown-date.html +28 -28
  58. package/src/components/nice-dropdown-date/nice-dropdown-date.js +132 -132
  59. package/src/components/nice-dropdown-date/nice-dropdown-date.scss +87 -87
  60. package/src/components/nice-dropdown-old/nice-dropdown-old.html +44 -44
  61. package/src/components/nice-dropdown-old/nice-dropdown-old.js +330 -330
  62. package/src/components/nice-dropdown-old/nice-dropdown-old.scss +129 -129
  63. package/src/components/nice-dtp/nice-dtp.html +91 -91
  64. package/src/components/nice-dtp/nice-dtp.js +835 -835
  65. package/src/components/nice-help/nice-help.html +6 -6
  66. package/src/components/nice-help/nice-help.js +58 -58
  67. package/src/components/nice-help/nice-help.scss +78 -78
  68. package/src/components/nice-input/nice-input.html +47 -47
  69. package/src/components/nice-input/nice-input.js +251 -251
  70. package/src/components/nice-input/nice-input.scss +130 -130
  71. package/src/components/nice-label/nice-label.html +10 -10
  72. package/src/components/nice-label/nice-label.js +32 -32
  73. package/src/components/nice-loader/nice-loader.html +6 -6
  74. package/src/components/nice-loader/nice-loader.js +28 -28
  75. package/src/components/nice-loader/nice-loader.scss +47 -47
  76. package/src/components/nice-no-data/nice-no-data.html +3 -3
  77. package/src/components/nice-no-data/nice-no-data.js +27 -27
  78. package/src/components/nice-no-data/nice-no-data.scss +26 -26
  79. package/src/components/nice-notification/nice-notification.html +3 -3
  80. package/src/components/nice-notification/nice-notification.js +124 -124
  81. package/src/components/nice-notification/nice-notification.scss +66 -66
  82. package/src/components/nice-number/nice-number.html +40 -40
  83. package/src/components/nice-number/nice-number.js +172 -172
  84. package/src/components/nice-number/nice-number.scss +18 -18
  85. package/src/components/nice-on-scroll/nice-on-scroll.js +17 -17
  86. package/src/components/nice-percent/nice-percent.html +24 -24
  87. package/src/components/nice-percent/nice-percent.js +95 -95
  88. package/src/components/nice-pill/nice-pill.html +3 -3
  89. package/src/components/nice-pill/nice-pill.js +29 -29
  90. package/src/components/nice-pill/nice-pill.scss +25 -25
  91. package/src/components/nice-popup/nice-popup.html +6 -6
  92. package/src/components/nice-popup/nice-popup.js +122 -122
  93. package/src/components/nice-popup/nice-popup.scss +43 -43
  94. package/src/components/nice-progress-bar/nice-progress-bar.html +15 -15
  95. package/src/components/nice-progress-bar/nice-progress-bar.js +55 -55
  96. package/src/components/nice-progress-bar/nice-progress-bar.scss +47 -47
  97. package/src/components/nice-quantity/nice-quantity.html +22 -22
  98. package/src/components/nice-quantity/nice-quantity.js +57 -57
  99. package/src/components/nice-quantity/nice-quantity.scss +51 -51
  100. package/src/components/nice-search/nice-search.html +44 -44
  101. package/src/components/nice-search/nice-search.js +243 -243
  102. package/src/components/nice-search/nice-search.scss +90 -90
  103. package/src/components/nice-search2/nice-search2.html +32 -32
  104. package/src/components/nice-search2/nice-search2.js +267 -267
  105. package/src/components/nice-search2/nice-search2.scss +80 -80
  106. package/src/components/nice-slot/nice-slot.html +10 -10
  107. package/src/components/nice-slot/nice-slot.js +31 -31
  108. package/src/components/nice-steps/nice-steps.scss +81 -81
  109. package/src/components/nice-svgs/nice-svgs.html +1320 -1320
  110. package/src/components/nice-svgs/nice-svgs.js +19 -19
  111. package/src/components/nice-table/nice-table.html +38 -38
  112. package/src/components/nice-table/nice-table.js +60 -60
  113. package/src/components/nice-table/nice-table.scss +112 -112
  114. package/src/components/nice-time-picker/nice-time-picker.html +43 -43
  115. package/src/components/nice-time-picker/nice-time-picker.js +85 -85
  116. package/src/components/nice-time-picker/nice-time-picker.scss +37 -37
  117. package/src/components/nice-title/nice-title.html +6 -6
  118. package/src/components/nice-title/nice-title.js +22 -22
  119. package/src/components/nice-toast/nice-toast.html +2 -2
  120. package/src/components/nice-toast/nice-toast.js +56 -56
  121. package/src/components/nice-toast/nice-toast.scss +74 -74
  122. package/src/components/nice-toggle/nice-toggle.html +12 -12
  123. package/src/components/nice-toggle/nice-toggle.js +57 -57
  124. package/src/components/nice-toggle/nice-toggle.scss +131 -131
  125. package/src/components/nice-tooltip/_nice-tooltip.scss +55 -55
  126. package/src/components/nice-tooltip/nice-tooltip.js +84 -84
  127. package/src/components/nice-upload/nice-upload.html +22 -22
  128. package/src/components/nice-upload/nice-upload.js +159 -159
  129. package/src/components/nice-upload/nice-upload.scss +85 -85
  130. package/src/components/nice-view/_nice-view.scss +63 -63
  131. package/src/components/nice-view/nice-view.html +12 -12
  132. package/src/components/nice-view/nice-view.js +30 -30
  133. package/src/components/nice-virtual-scroll/_nice-virtual-scroll.scss +17 -17
  134. package/src/components/nice-virtual-scroll/nice-virtual-scroll.html +12 -12
  135. package/src/components/nice-virtual-scroll/nice-virtual-scroll.js +70 -70
  136. package/src/components/nice-wrapper/_nice-wrapper.scss +87 -87
  137. package/src/components/nice-wrapper/nice-wrapper.html +12 -12
  138. package/src/components/nice-wrapper/nice-wrapper.js +44 -44
  139. package/src/components/nice-yesno/nice-yesno.html +14 -14
  140. package/src/components/nice-yesno/nice-yesno.js +111 -111
  141. package/src/components/nice-yesno/nice-yesno.scss +95 -95
  142. package/src/filters/nice-date.js +17 -17
  143. package/src/filters/nice-highlight.js +16 -16
  144. package/src/modals/nice-multilangual-modal/nice-multilangual-modal.html +30 -30
  145. package/src/modals/nice-multilangual-modal/nice-multilangual-modal.js +67 -67
  146. package/src/modals/nice-multilangual-modal/nice-multilangual-modal.scss +19 -19
  147. package/src/nice.js +2 -2
  148. package/src/services/nice-service.js +22 -22
  149. package/src/styles/_bootstrap-variables.scss +178 -178
  150. package/src/styles/_nice-buttons.scss +612 -612
  151. package/src/styles/_nice-common.scss +479 -479
  152. package/src/styles/_nice-ngdialog.scss +85 -85
  153. package/src/styles/_nice-spacing.scss +283 -283
  154. package/src/styles/_nice.scss +72 -72
  155. package/src/styles/_variables.scss +194 -194
@@ -1,125 +1,125 @@
1
-
2
- /**
3
- * @ngdoc directive
4
- * @name niceElements.factory:NiceNotification
5
- * @description
6
- * # NiceNotification
7
- */
8
-
9
- angular.module('niceElements')
10
- .factory('NiceNotification', function ($timeout, $http, $compile, $templateCache, $rootScope, $sce) {
11
-
12
- let startTop = 10;
13
- let startRight = 10;
14
- let verticalSpacing = 10;
15
- let horizontalSpacing = 10;
16
- let delay = 5000;
17
-
18
- const messageElements = [];
19
-
20
- const notify = function (args, t) {
21
-
22
- if (typeof args !== 'object') {
23
- args = { message: args };
24
- }
25
-
26
- args.template = args.template ? args.template : 'src/components/nice-notification/nice-notification.html';
27
- args.delay = !angular.isUndefined(args.delay) ? args.delay : delay;
28
- args.type = t ? t : '';
29
-
30
- $http.get(args.template, { cache: $templateCache }).success(function (template) {
31
-
32
- const scope = $rootScope.$new();
33
- scope.message = $sce.trustAsHtml(args.message);
34
- scope.title = $sce.trustAsHtml(args.title);
35
- scope.t = args.type.substr(0, 1);
36
- scope.delay = args.delay;
37
-
38
- if (typeof args.scope === 'object') {
39
- for (let key in args.scope) {
40
- scope[key] = args.scope[key];
41
- }
42
- }
43
-
44
- const reposite = function () {
45
- let j = 0;
46
- let k = 0;
47
- let lastTop = startTop;
48
- let top = 0;
49
- // const lastRight = startRight;
50
- for (let i = messageElements.length - 1; i >= 0; i--) {
51
- const element = messageElements[i];
52
- const elHeight = parseInt(element[0].offsetHeight);
53
- const elWidth = parseInt(element[0].offsetWidth);
54
- if ((top + elHeight) > window.innerHeight) {
55
- lastTop = startTop;
56
- k++;
57
- j = 0;
58
- }
59
- top = lastTop + (j === 0 ? 0 : verticalSpacing);
60
- const right = startRight + (k * (horizontalSpacing + elWidth));
61
-
62
- element.css('top', top + 'px');
63
- element.css('right', right + 'px');
64
-
65
- lastTop = top + elHeight;
66
- j++;
67
- }
68
- };
69
-
70
- const templateElement = $compile(template)(scope);
71
- templateElement.addClass(args.type);
72
- templateElement.bind('transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd click', function (e) {
73
- e = e.originalEvent || e;
74
- if (e.type === 'click' || (e.propertyName === 'opacity' && e.elapsedTime >= 0.4)) {
75
- templateElement.remove();
76
- messageElements.splice(messageElements.indexOf(templateElement), 1);
77
- reposite();
78
- }
79
- });
80
-
81
- $timeout(function () {
82
- templateElement.addClass('killed');
83
- templateElement.remove();
84
- messageElements.splice(messageElements.indexOf(templateElement), 1);
85
- reposite();
86
- }, args.delay);
87
-
88
- angular.element(document.getElementsByTagName('body')).append(templateElement);
89
- messageElements.push(templateElement);
90
-
91
- $timeout(reposite);
92
-
93
- }).error(function (data) {
94
- throw new Error('Template (' + args.template + ') could not be loaded. ' + data);
95
- });
96
- };
97
-
98
- notify.config = function (args) {
99
- startTop = args.top ? args.top : startTop;
100
- verticalSpacing = args.verticalSpacing ? args.verticalSpacing : verticalSpacing;
101
- };
102
-
103
- notify.primary = function (args) {
104
- this(args, '');
105
- };
106
-
107
- notify.error = function (args) {
108
- this(args, 'error');
109
- };
110
-
111
- notify.success = function (args) {
112
- this(args, 'success');
113
- };
114
-
115
- notify.info = function (args) {
116
- this(args, 'info');
117
- };
118
-
119
- notify.warning = function (args) {
120
- this(args, 'warning');
121
- };
122
-
123
-
124
- return notify;
1
+
2
+ /**
3
+ * @ngdoc directive
4
+ * @name niceElements.factory:NiceNotification
5
+ * @description
6
+ * # NiceNotification
7
+ */
8
+
9
+ angular.module('niceElements')
10
+ .factory('NiceNotification', function ($timeout, $http, $compile, $templateCache, $rootScope, $sce) {
11
+
12
+ let startTop = 10;
13
+ let startRight = 10;
14
+ let verticalSpacing = 10;
15
+ let horizontalSpacing = 10;
16
+ let delay = 5000;
17
+
18
+ const messageElements = [];
19
+
20
+ const notify = function (args, t) {
21
+
22
+ if (typeof args !== 'object') {
23
+ args = { message: args };
24
+ }
25
+
26
+ args.template = args.template ? args.template : 'src/components/nice-notification/nice-notification.html';
27
+ args.delay = !angular.isUndefined(args.delay) ? args.delay : delay;
28
+ args.type = t ? t : '';
29
+
30
+ $http.get(args.template, { cache: $templateCache }).success(function (template) {
31
+
32
+ const scope = $rootScope.$new();
33
+ scope.message = $sce.trustAsHtml(args.message);
34
+ scope.title = $sce.trustAsHtml(args.title);
35
+ scope.t = args.type.substr(0, 1);
36
+ scope.delay = args.delay;
37
+
38
+ if (typeof args.scope === 'object') {
39
+ for (let key in args.scope) {
40
+ scope[key] = args.scope[key];
41
+ }
42
+ }
43
+
44
+ const reposite = function () {
45
+ let j = 0;
46
+ let k = 0;
47
+ let lastTop = startTop;
48
+ let top = 0;
49
+ // const lastRight = startRight;
50
+ for (let i = messageElements.length - 1; i >= 0; i--) {
51
+ const element = messageElements[i];
52
+ const elHeight = parseInt(element[0].offsetHeight);
53
+ const elWidth = parseInt(element[0].offsetWidth);
54
+ if ((top + elHeight) > window.innerHeight) {
55
+ lastTop = startTop;
56
+ k++;
57
+ j = 0;
58
+ }
59
+ top = lastTop + (j === 0 ? 0 : verticalSpacing);
60
+ const right = startRight + (k * (horizontalSpacing + elWidth));
61
+
62
+ element.css('top', top + 'px');
63
+ element.css('right', right + 'px');
64
+
65
+ lastTop = top + elHeight;
66
+ j++;
67
+ }
68
+ };
69
+
70
+ const templateElement = $compile(template)(scope);
71
+ templateElement.addClass(args.type);
72
+ templateElement.bind('transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd click', function (e) {
73
+ e = e.originalEvent || e;
74
+ if (e.type === 'click' || (e.propertyName === 'opacity' && e.elapsedTime >= 0.4)) {
75
+ templateElement.remove();
76
+ messageElements.splice(messageElements.indexOf(templateElement), 1);
77
+ reposite();
78
+ }
79
+ });
80
+
81
+ $timeout(function () {
82
+ templateElement.addClass('killed');
83
+ templateElement.remove();
84
+ messageElements.splice(messageElements.indexOf(templateElement), 1);
85
+ reposite();
86
+ }, args.delay);
87
+
88
+ angular.element(document.getElementsByTagName('body')).append(templateElement);
89
+ messageElements.push(templateElement);
90
+
91
+ $timeout(reposite);
92
+
93
+ }).error(function (data) {
94
+ throw new Error('Template (' + args.template + ') could not be loaded. ' + data);
95
+ });
96
+ };
97
+
98
+ notify.config = function (args) {
99
+ startTop = args.top ? args.top : startTop;
100
+ verticalSpacing = args.verticalSpacing ? args.verticalSpacing : verticalSpacing;
101
+ };
102
+
103
+ notify.primary = function (args) {
104
+ this(args, '');
105
+ };
106
+
107
+ notify.error = function (args) {
108
+ this(args, 'error');
109
+ };
110
+
111
+ notify.success = function (args) {
112
+ this(args, 'success');
113
+ };
114
+
115
+ notify.info = function (args) {
116
+ this(args, 'info');
117
+ };
118
+
119
+ notify.warning = function (args) {
120
+ this(args, 'warning');
121
+ };
122
+
123
+
124
+ return notify;
125
125
  });
@@ -1,67 +1,67 @@
1
- .notification {
2
- position: fixed;
3
- right: 10px;
4
- top: -100px;
5
- z-index: 99999;
6
- //box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.3);
7
- border-radius: $border-radius-base;
8
- cursor: pointer;
9
- font-weight: normal;
10
- min-width: 300px;
11
- padding: 10px 15px;
12
- color: $nice-notification-color;
13
- background: $nice-notification-bg;
14
- transform: all 0.5s ease;
15
-
16
- &.killed {
17
- opacity: 0;
18
- transform: opacity 0.5s ease;
19
- }
20
-
21
- &>h3 {
22
- display: block;
23
- margin: 10px 10px 0 10px;
24
- padding: 0 0 5px 0;
25
- text-align: left;
26
- font-size: $font-size-large;
27
- font-style: normal;
28
- color: white;
29
- font-weight: bold;
30
- }
31
-
32
- & a {
33
- color: $nice-notification-color;
34
-
35
- &:hover {
36
- text-decoration: underline;
37
- }
38
- }
39
-
40
- &>.message {
41
- margin: 10px 10px 10px 10px;
42
- }
43
-
44
- &.warning {
45
- color: $nice-notification-warning-color;
46
- background: $nice-notification-warning-bg;
47
- }
48
-
49
- &.error {
50
- color: $nice-notification-danger-color;
51
- background: $nice-notification-danger-color-bg;
52
- }
53
-
54
- &.success {
55
- color: $nice-notification-success-color;
56
- background: $nice-notification-success-bg;
57
- }
58
-
59
- &.info {
60
- color: $nice-notification-info-color;
61
- background: $nice-notification-info-bg;
62
- }
63
-
64
- &:hover {
65
- opacity: 0.7;
66
- }
1
+ .notification {
2
+ position: fixed;
3
+ right: 10px;
4
+ top: -100px;
5
+ z-index: 99999;
6
+ //box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.3);
7
+ border-radius: $border-radius-base;
8
+ cursor: pointer;
9
+ font-weight: normal;
10
+ min-width: 300px;
11
+ padding: 10px 15px;
12
+ color: $nice-notification-color;
13
+ background: $nice-notification-bg;
14
+ transform: all 0.5s ease;
15
+
16
+ &.killed {
17
+ opacity: 0;
18
+ transform: opacity 0.5s ease;
19
+ }
20
+
21
+ &>h3 {
22
+ display: block;
23
+ margin: 10px 10px 0 10px;
24
+ padding: 0 0 5px 0;
25
+ text-align: left;
26
+ font-size: $font-size-large;
27
+ font-style: normal;
28
+ color: white;
29
+ font-weight: bold;
30
+ }
31
+
32
+ & a {
33
+ color: $nice-notification-color;
34
+
35
+ &:hover {
36
+ text-decoration: underline;
37
+ }
38
+ }
39
+
40
+ &>.message {
41
+ margin: 10px 10px 10px 10px;
42
+ }
43
+
44
+ &.warning {
45
+ color: $nice-notification-warning-color;
46
+ background: $nice-notification-warning-bg;
47
+ }
48
+
49
+ &.error {
50
+ color: $nice-notification-danger-color;
51
+ background: $nice-notification-danger-color-bg;
52
+ }
53
+
54
+ &.success {
55
+ color: $nice-notification-success-color;
56
+ background: $nice-notification-success-bg;
57
+ }
58
+
59
+ &.info {
60
+ color: $nice-notification-info-color;
61
+ background: $nice-notification-info-bg;
62
+ }
63
+
64
+ &:hover {
65
+ opacity: 0.7;
66
+ }
67
67
  }
@@ -1,41 +1,41 @@
1
- <div class="nice-component nice-number" ng-form="niceNumberForm" ng-class="{ 'margin-bottom-0' : noMargin, 'nice-component-inline': isInline }">
2
- <div ng-class="{'row' : !disableRow}">
3
- <!------------------------- Title ------------------------->
4
- <nice-title text="title || niceTitle" help="help" required="required" label-width="labelWidth"></nice-title>
5
-
6
- <!------------------------- Field ------------------------->
7
- <div class="nice-field col-xs-12" ng-class="[fieldWidth ? fieldWidth : 'col-sm-8', { 'nice-disabled': isDisabled }]">
8
- <div class="input-group" ng-class="{'has-warning': !isDisabled && niceNumberForm.$invalid && niceNumberForm.$dirty}">
9
- <span class="input-group-btn">
10
- <button type="button" class="btn btn-default btn-left" ng-disabled="!canSubtract || isDisabled" ng-click="subtract()" tabindex="-1">
11
- <nice-icon icon="icon-minus"></nice-icon>
12
- </button>
13
- </span>
14
-
15
- <input type="number" step="{{ step }}" ng-change="inputChanged()" class="form-control" max="{{ max }}" min="{{ min }}" ng-disabled="isDisabled" ng-model="model" />
16
-
17
- <span class="input-group-btn">
18
- <button type="button" class="btn btn-default btn-right" ng-disabled="!canAdd || isDisabled" ng-click="add()" tabindex="-1">
19
- <nice-icon icon="icon-plus"></nice-icon>
20
- </button>
21
- </span>
22
- </div>
23
-
24
- <div class="error-messages" ng-if="niceNumberForm.$error && !hideError" ng-class="{ 'floating-error': floatingError }">
25
- <div class="error-message" ng-if="niceNumberForm.$dirty && niceNumberForm.$error.number" translate translate-context="Nice">This field requires a number</div>
26
- <div class="error-message" ng-if="niceNumberForm.$error.min">
27
- <translate translate-context="Nice">Minimum value is</translate> {{ min }}
28
- </div>
29
- <div class="error-message" ng-if="niceNumberForm.$error.max">
30
- <translate translate-context="Nice">Maximum value is</translate> {{ max }}
31
- </div>
32
- <div class="error-message" ng-if="niceNumberForm.$error.zero">
33
- <translate translate-context="Nice">0 is not allowed</translate>
34
- </div>
35
- <div class="error-message" ng-if="niceNumberForm.$error.no-value && !niceNumberForm.$error.zero && !niceNumberForm.$error.min && !niceNumberForm.$error.max">
36
- <translate translate-context="Nice">Value is missing</translate>
37
- </div>
38
- </div>
39
- </div>
40
- </div>
1
+ <div class="nice-component nice-number" ng-form="niceNumberForm" ng-class="{ 'margin-bottom-0' : noMargin, 'nice-component-inline': isInline }">
2
+ <div ng-class="{'row' : !disableRow}">
3
+ <!------------------------- Title ------------------------->
4
+ <nice-title text="title || niceTitle" help="help" required="required" label-width="labelWidth"></nice-title>
5
+
6
+ <!------------------------- Field ------------------------->
7
+ <div class="nice-field col-xs-12" ng-class="[fieldWidth ? fieldWidth : 'col-sm-8', { 'nice-disabled': isDisabled }]">
8
+ <div class="input-group" ng-class="{'has-warning': !isDisabled && niceNumberForm.$invalid && niceNumberForm.$dirty}">
9
+ <span class="input-group-btn">
10
+ <button type="button" class="btn btn-default btn-left" ng-disabled="!canSubtract || isDisabled" ng-click="subtract()" tabindex="-1">
11
+ <nice-icon icon="icon-minus"></nice-icon>
12
+ </button>
13
+ </span>
14
+
15
+ <input type="number" step="{{ step }}" ng-change="inputChanged()" class="form-control" max="{{ max }}" min="{{ min }}" ng-disabled="isDisabled" ng-model="model" />
16
+
17
+ <span class="input-group-btn">
18
+ <button type="button" class="btn btn-default btn-right" ng-disabled="!canAdd || isDisabled" ng-click="add()" tabindex="-1">
19
+ <nice-icon icon="icon-plus"></nice-icon>
20
+ </button>
21
+ </span>
22
+ </div>
23
+
24
+ <div class="error-messages" ng-if="niceNumberForm.$error && !hideError" ng-class="{ 'floating-error': floatingError }">
25
+ <div class="error-message" ng-if="niceNumberForm.$dirty && niceNumberForm.$error.number" translate translate-context="Nice">This field requires a number</div>
26
+ <div class="error-message" ng-if="niceNumberForm.$error.min">
27
+ <translate translate-context="Nice">Minimum value is</translate> {{ min }}
28
+ </div>
29
+ <div class="error-message" ng-if="niceNumberForm.$error.max">
30
+ <translate translate-context="Nice">Maximum value is</translate> {{ max }}
31
+ </div>
32
+ <div class="error-message" ng-if="niceNumberForm.$error.zero">
33
+ <translate translate-context="Nice">0 is not allowed</translate>
34
+ </div>
35
+ <div class="error-message" ng-if="niceNumberForm.$error.no-value && !niceNumberForm.$error.zero && !niceNumberForm.$error.min && !niceNumberForm.$error.max">
36
+ <translate translate-context="Nice">Value is missing</translate>
37
+ </div>
38
+ </div>
39
+ </div>
40
+ </div>
41
41
  </div>