nice-elements 1.10.5 → 1.10.6
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/.vscode/settings.json +17 -17
- package/CHANGELOG.md +444 -440
- package/LICENSE.md +21 -21
- package/README.md +95 -95
- package/bower.json +10 -10
- package/dist/nice.js +8074 -8114
- package/dist/nice.min.js +1 -1
- package/dist/style.css +7 -7
- package/dist/style.min.css +7 -7
- package/eslint.config.mjs +27 -27
- package/package.json +45 -45
- package/src/components/nice-button/nice-button.html +4 -4
- package/src/components/nice-button/nice-button.js +40 -40
- package/src/components/nice-button/nice-button.scss +16 -16
- package/src/components/nice-button-toggle/nice-button-toggle.html +9 -9
- package/src/components/nice-button-toggle/nice-button-toggle.js +23 -23
- package/src/components/nice-button-toggle/nice-button-toggle.scss +2 -2
- package/src/components/nice-calendar/nice-calendar.html +91 -91
- package/src/components/nice-calendar/nice-calendar.js +336 -336
- package/src/components/nice-calendar/nice-calendar.scss +285 -285
- package/src/components/nice-checkbox/nice-checkbox.html +5 -5
- package/src/components/nice-checkbox/nice-checkbox.js +34 -34
- package/src/components/nice-checkbox/nice-checkbox.scss +91 -91
- package/src/components/nice-choice/nice-choice.html +18 -18
- package/src/components/nice-choice/nice-choice.js +211 -211
- package/src/components/nice-choice/nice-choice.scss +110 -110
- package/src/components/nice-click-outside/nice-click-outside.js +105 -105
- package/src/components/nice-comment/nice-comment.html +10 -10
- package/src/components/nice-comment/nice-comment.js +71 -71
- package/src/components/nice-comment/nice-comment.scss +39 -39
- package/src/components/nice-date/nice-date.html +75 -75
- package/src/components/nice-date/nice-date.js +329 -329
- package/src/components/nice-date/nice-date.scss +302 -302
- package/src/components/nice-date-input/nice-date-input.html +41 -41
- package/src/components/nice-date-input/nice-date-input.js +111 -111
- package/src/components/nice-date-input/nice-date-input.scss +45 -45
- package/src/components/nice-date-range/nice-date-range.html +15 -15
- package/src/components/nice-date-range/nice-date-range.js +78 -78
- package/src/components/nice-date-range/nice-date-range.scss +390 -390
- package/src/components/nice-datetime-picker/nice-datetime-picker.html +29 -29
- package/src/components/nice-datetime-picker/nice-datetime-picker.js +89 -89
- package/src/components/nice-datetime-picker/nice-datetime-picker.scss +428 -428
- package/src/components/nice-datetimerange-picker/nice-datetimerange-picker.html +55 -55
- package/src/components/nice-datetimerange-picker/nice-datetimerange-picker.js +248 -248
- package/src/components/nice-datetimerange-picker/nice-datetimerange-picker.scss +73 -73
- package/src/components/nice-datetimerange-picker-2/nice-datetimerange-picker-2.html +44 -44
- package/src/components/nice-datetimerange-picker-2/nice-datetimerange-picker-2.js +174 -174
- package/src/components/nice-datetimerange-picker-2/nice-datetimerange-picker-2.scss +127 -127
- package/src/components/nice-dropdown/nice-dropdown.html +61 -61
- package/src/components/nice-dropdown/nice-dropdown.js +496 -496
- package/src/components/nice-dropdown/nice-dropdown.scss +261 -261
- package/src/components/nice-dropdown-date/nice-dropdown-date.html +28 -28
- package/src/components/nice-dropdown-date/nice-dropdown-date.js +128 -128
- package/src/components/nice-dropdown-date/nice-dropdown-date.scss +82 -82
- package/src/components/nice-dropdown-old/nice-dropdown-old.html +44 -44
- package/src/components/nice-dropdown-old/nice-dropdown-old.js +331 -331
- package/src/components/nice-dropdown-old/nice-dropdown-old.scss +129 -129
- package/src/components/nice-dtp/nice-dtp.html +91 -91
- package/src/components/nice-dtp/nice-dtp.js +835 -835
- package/src/components/nice-help/nice-help.html +6 -6
- package/src/components/nice-help/nice-help.js +55 -55
- package/src/components/nice-help/nice-help.scss +78 -78
- package/src/components/nice-input/nice-input.html +48 -48
- package/src/components/nice-input/nice-input.js +245 -245
- package/src/components/nice-input/nice-input.scss +130 -130
- package/src/components/nice-label/nice-label.html +10 -10
- package/src/components/nice-label/nice-label.js +32 -32
- package/src/components/nice-loader/nice-loader.html +6 -6
- package/src/components/nice-loader/nice-loader.js +28 -28
- package/src/components/nice-loader/nice-loader.scss +47 -47
- package/src/components/nice-no-data/nice-no-data.html +3 -3
- package/src/components/nice-no-data/nice-no-data.js +27 -27
- package/src/components/nice-no-data/nice-no-data.scss +30 -30
- package/src/components/nice-notification/nice-notification.html +3 -3
- package/src/components/nice-notification/nice-notification.js +124 -124
- package/src/components/nice-notification/nice-notification.scss +66 -66
- package/src/components/nice-number/nice-number.html +40 -40
- package/src/components/nice-number/nice-number.js +170 -170
- package/src/components/nice-number/nice-number.scss +18 -18
- package/src/components/nice-percent/nice-percent.html +24 -24
- package/src/components/nice-percent/nice-percent.js +95 -95
- package/src/components/nice-pill/nice-pill.html +3 -3
- package/src/components/nice-pill/nice-pill.js +29 -29
- package/src/components/nice-pill/nice-pill.scss +25 -25
- package/src/components/nice-popup/nice-popup.html +6 -6
- package/src/components/nice-popup/nice-popup.js +122 -122
- package/src/components/nice-popup/nice-popup.scss +43 -43
- package/src/components/nice-progress-bar/nice-progress-bar.html +15 -15
- package/src/components/nice-progress-bar/nice-progress-bar.js +55 -55
- package/src/components/nice-progress-bar/nice-progress-bar.scss +47 -47
- package/src/components/nice-quantity/nice-quantity.html +22 -22
- package/src/components/nice-quantity/nice-quantity.js +57 -57
- package/src/components/nice-quantity/nice-quantity.scss +51 -51
- package/src/components/nice-search/nice-search.html +44 -44
- package/src/components/nice-search/nice-search.js +240 -240
- package/src/components/nice-search/nice-search.scss +90 -90
- package/src/components/nice-search2/nice-search2.html +32 -32
- package/src/components/nice-search2/nice-search2.js +265 -265
- package/src/components/nice-search2/nice-search2.scss +80 -80
- package/src/components/nice-slot/nice-slot.html +10 -10
- package/src/components/nice-slot/nice-slot.js +31 -31
- package/src/components/nice-steps/nice-steps.scss +81 -81
- package/src/components/nice-svgs/nice-svgs.html +1262 -1262
- package/src/components/nice-svgs/nice-svgs.js +16 -16
- package/src/components/nice-table/nice-table.html +38 -38
- package/src/components/nice-table/nice-table.js +60 -60
- package/src/components/nice-table/nice-table.scss +111 -111
- package/src/components/nice-time-picker/nice-time-picker.html +43 -43
- package/src/components/nice-time-picker/nice-time-picker.js +85 -85
- package/src/components/nice-time-picker/nice-time-picker.scss +37 -37
- package/src/components/nice-title/nice-title.html +3 -3
- package/src/components/nice-title/nice-title.js +21 -21
- package/src/components/nice-toast/nice-toast.html +2 -2
- package/src/components/nice-toast/nice-toast.js +56 -56
- package/src/components/nice-toast/nice-toast.scss +74 -74
- package/src/components/nice-toggle/nice-toggle.html +12 -12
- package/src/components/nice-toggle/nice-toggle.js +54 -54
- package/src/components/nice-toggle/nice-toggle.scss +131 -131
- package/src/components/nice-tooltip/_nice-tooltip.scss +71 -71
- package/src/components/nice-tooltip/nice-tooltip.js +23 -23
- package/src/components/nice-upload/nice-upload.html +22 -22
- package/src/components/nice-upload/nice-upload.js +159 -159
- package/src/components/nice-upload/nice-upload.scss +85 -85
- package/src/components/nice-wrapper/_nice-wrapper.scss +87 -87
- package/src/components/nice-wrapper/nice-wrapper.html +12 -12
- package/src/components/nice-wrapper/nice-wrapper.js +44 -44
- package/src/components/nice-yesno/nice-yesno.html +14 -14
- package/src/components/nice-yesno/nice-yesno.js +111 -111
- package/src/components/nice-yesno/nice-yesno.scss +95 -95
- package/src/filters/nice-date.js +17 -17
- package/src/filters/nice-highlight.js +16 -16
- package/src/modals/nice-multilangual-modal/nice-multilangual-modal.html +30 -30
- package/src/modals/nice-multilangual-modal/nice-multilangual-modal.js +67 -67
- package/src/modals/nice-multilangual-modal/nice-multilangual-modal.scss +19 -19
- package/src/nice.js +2 -2
- package/src/services/nice-service.js +22 -22
- package/src/styles/_bootstrap-variables.scss +178 -178
- package/src/styles/_nice-buttons.scss +612 -612
- package/src/styles/_nice-common.scss +471 -471
- package/src/styles/_nice-ngdialog.scss +85 -85
- package/src/styles/_nice-spacing.scss +283 -283
- package/src/styles/_nice.scss +67 -67
- package/src/styles/_variables.scss +198 -198
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
<div class="nice-help" ng-mouseover="onHover()">
|
|
2
|
-
<nice-icon icon="icon-help-circle" class="nice-help-button"></nice-icon>
|
|
3
|
-
<div class="nice-help-popup">
|
|
4
|
-
<span ng-bind-html="text">{{ text }}</span>
|
|
5
|
-
<div data-popper-arrow class="nice-help-arrow"></div>
|
|
6
|
-
</div>
|
|
1
|
+
<div class="nice-help" ng-mouseover="onHover()">
|
|
2
|
+
<nice-icon icon="icon-help-circle" class="nice-help-button"></nice-icon>
|
|
3
|
+
<div class="nice-help-popup">
|
|
4
|
+
<span ng-bind-html="text">{{ text }}</span>
|
|
5
|
+
<div data-popper-arrow class="nice-help-arrow"></div>
|
|
6
|
+
</div>
|
|
7
7
|
</div>
|
|
@@ -1,55 +1,55 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* @ngdoc directive
|
|
5
|
-
* @name niceElements.directive:niceHelp
|
|
6
|
-
* @description
|
|
7
|
-
* # niceHelp
|
|
8
|
-
*/
|
|
9
|
-
angular.module('niceElements')
|
|
10
|
-
.directive('niceHelp', function () {
|
|
11
|
-
return {
|
|
12
|
-
templateUrl: 'src/components/nice-help/nice-help.html',
|
|
13
|
-
restrict: 'E',
|
|
14
|
-
replace: true,
|
|
15
|
-
scope: {
|
|
16
|
-
text: '@'
|
|
17
|
-
},
|
|
18
|
-
controller: function ($scope, $element, $timeout) {
|
|
19
|
-
// Setup popper
|
|
20
|
-
// https://popper.js.org/docs/v2/constructors/
|
|
21
|
-
$scope.setupPopper = function () {
|
|
22
|
-
var button = $element[0].getElementsByClassName('nice-help-button')[0];
|
|
23
|
-
var tooltip = $element[0].getElementsByClassName('nice-help-popup')[0];
|
|
24
|
-
$scope.popper = Popper.createPopper(button, tooltip, {
|
|
25
|
-
strategy: 'fixed',
|
|
26
|
-
placement: 'top',
|
|
27
|
-
scroll: true,
|
|
28
|
-
resize: true,
|
|
29
|
-
modifiers: [
|
|
30
|
-
{
|
|
31
|
-
name: 'offset',
|
|
32
|
-
options: {
|
|
33
|
-
offset: [0, 5],
|
|
34
|
-
},
|
|
35
|
-
},
|
|
36
|
-
{
|
|
37
|
-
name: 'arrow',
|
|
38
|
-
options: {
|
|
39
|
-
padding: 2,
|
|
40
|
-
},
|
|
41
|
-
}
|
|
42
|
-
],
|
|
43
|
-
});
|
|
44
|
-
};
|
|
45
|
-
|
|
46
|
-
// $timeout(function () {
|
|
47
|
-
// $scope.setupPopper();
|
|
48
|
-
// });
|
|
49
|
-
|
|
50
|
-
$scope.onHover = function () {
|
|
51
|
-
$scope.setupPopper();
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
};
|
|
55
|
-
});
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @ngdoc directive
|
|
5
|
+
* @name niceElements.directive:niceHelp
|
|
6
|
+
* @description
|
|
7
|
+
* # niceHelp
|
|
8
|
+
*/
|
|
9
|
+
angular.module('niceElements')
|
|
10
|
+
.directive('niceHelp', function () {
|
|
11
|
+
return {
|
|
12
|
+
templateUrl: 'src/components/nice-help/nice-help.html',
|
|
13
|
+
restrict: 'E',
|
|
14
|
+
replace: true,
|
|
15
|
+
scope: {
|
|
16
|
+
text: '@'
|
|
17
|
+
},
|
|
18
|
+
controller: function ($scope, $element, $timeout) {
|
|
19
|
+
// Setup popper
|
|
20
|
+
// https://popper.js.org/docs/v2/constructors/
|
|
21
|
+
$scope.setupPopper = function () {
|
|
22
|
+
var button = $element[0].getElementsByClassName('nice-help-button')[0];
|
|
23
|
+
var tooltip = $element[0].getElementsByClassName('nice-help-popup')[0];
|
|
24
|
+
$scope.popper = Popper.createPopper(button, tooltip, {
|
|
25
|
+
strategy: 'fixed',
|
|
26
|
+
placement: 'top',
|
|
27
|
+
scroll: true,
|
|
28
|
+
resize: true,
|
|
29
|
+
modifiers: [
|
|
30
|
+
{
|
|
31
|
+
name: 'offset',
|
|
32
|
+
options: {
|
|
33
|
+
offset: [0, 5],
|
|
34
|
+
},
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
name: 'arrow',
|
|
38
|
+
options: {
|
|
39
|
+
padding: 2,
|
|
40
|
+
},
|
|
41
|
+
}
|
|
42
|
+
],
|
|
43
|
+
});
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
// $timeout(function () {
|
|
47
|
+
// $scope.setupPopper();
|
|
48
|
+
// });
|
|
49
|
+
|
|
50
|
+
$scope.onHover = function () {
|
|
51
|
+
$scope.setupPopper();
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
};
|
|
55
|
+
});
|
|
@@ -1,79 +1,79 @@
|
|
|
1
|
-
.nice-help {
|
|
2
|
-
$nice-help-popup-color: #3e3e3e;
|
|
3
|
-
position: relative;
|
|
4
|
-
display: inline-block;
|
|
5
|
-
|
|
6
|
-
i {
|
|
7
|
-
font-size: 14px;
|
|
8
|
-
cursor: help;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
svg {
|
|
12
|
-
height: 14px;
|
|
13
|
-
width: 14px;
|
|
14
|
-
cursor: help;
|
|
15
|
-
display: block;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
&:hover {
|
|
19
|
-
.nice-help-popup {
|
|
20
|
-
display: block;
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
.nice-help-popup {
|
|
25
|
-
display: none;
|
|
26
|
-
z-index: 9999;
|
|
27
|
-
background: $nice-help-popup-color;
|
|
28
|
-
color: white;
|
|
29
|
-
max-width: 200px;
|
|
30
|
-
width: max-content;
|
|
31
|
-
border-radius: $nice-border-radius;
|
|
32
|
-
font-size: 12px;
|
|
33
|
-
line-height: 1.3;
|
|
34
|
-
padding: 7px 10px;
|
|
35
|
-
font-weight: normal;
|
|
36
|
-
text-align: center;
|
|
37
|
-
|
|
38
|
-
a {
|
|
39
|
-
color: $nice-base-color;
|
|
40
|
-
text-transform: none;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
.nice-help-arrow,
|
|
44
|
-
.nice-help-arrow::before {
|
|
45
|
-
position: absolute;
|
|
46
|
-
width: 8px;
|
|
47
|
-
height: 8px;
|
|
48
|
-
background: inherit;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
.nice-help-arrow {
|
|
52
|
-
visibility: hidden;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
.nice-help-arrow::before {
|
|
56
|
-
visibility: visible;
|
|
57
|
-
content: "";
|
|
58
|
-
transform: rotate(45deg);
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
&[data-popper-placement^="top"]>.nice-help-arrow {
|
|
62
|
-
bottom: -2px;
|
|
63
|
-
margin-left: -4px;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
&[data-popper-placement^="bottom"]>.nice-help-arrow {
|
|
67
|
-
top: -2px;
|
|
68
|
-
margin-left: -4px;
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
&[data-popper-placement^="left"]>.nice-help-arrow {
|
|
72
|
-
right: 1px;
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
&[data-popper-placement^="right"]>.nice-help-arrow {
|
|
76
|
-
left: -6px;
|
|
77
|
-
}
|
|
78
|
-
}
|
|
1
|
+
.nice-help {
|
|
2
|
+
$nice-help-popup-color: #3e3e3e;
|
|
3
|
+
position: relative;
|
|
4
|
+
display: inline-block;
|
|
5
|
+
|
|
6
|
+
i {
|
|
7
|
+
font-size: 14px;
|
|
8
|
+
cursor: help;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
svg {
|
|
12
|
+
height: 14px;
|
|
13
|
+
width: 14px;
|
|
14
|
+
cursor: help;
|
|
15
|
+
display: block;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
&:hover {
|
|
19
|
+
.nice-help-popup {
|
|
20
|
+
display: block;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.nice-help-popup {
|
|
25
|
+
display: none;
|
|
26
|
+
z-index: 9999;
|
|
27
|
+
background: $nice-help-popup-color;
|
|
28
|
+
color: white;
|
|
29
|
+
max-width: 200px;
|
|
30
|
+
width: max-content;
|
|
31
|
+
border-radius: $nice-border-radius;
|
|
32
|
+
font-size: 12px;
|
|
33
|
+
line-height: 1.3;
|
|
34
|
+
padding: 7px 10px;
|
|
35
|
+
font-weight: normal;
|
|
36
|
+
text-align: center;
|
|
37
|
+
|
|
38
|
+
a {
|
|
39
|
+
color: $nice-base-color;
|
|
40
|
+
text-transform: none;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.nice-help-arrow,
|
|
44
|
+
.nice-help-arrow::before {
|
|
45
|
+
position: absolute;
|
|
46
|
+
width: 8px;
|
|
47
|
+
height: 8px;
|
|
48
|
+
background: inherit;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.nice-help-arrow {
|
|
52
|
+
visibility: hidden;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.nice-help-arrow::before {
|
|
56
|
+
visibility: visible;
|
|
57
|
+
content: "";
|
|
58
|
+
transform: rotate(45deg);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
&[data-popper-placement^="top"]>.nice-help-arrow {
|
|
62
|
+
bottom: -2px;
|
|
63
|
+
margin-left: -4px;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
&[data-popper-placement^="bottom"]>.nice-help-arrow {
|
|
67
|
+
top: -2px;
|
|
68
|
+
margin-left: -4px;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
&[data-popper-placement^="left"]>.nice-help-arrow {
|
|
72
|
+
right: 1px;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
&[data-popper-placement^="right"]>.nice-help-arrow {
|
|
76
|
+
left: -6px;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
79
|
}
|
|
@@ -1,49 +1,49 @@
|
|
|
1
|
-
<ng-form class="nice-component nice-input" ng-class="{ 'margin-bottom-0' : noMargin, 'nice-component-inline': isInline }" name="forma">
|
|
2
|
-
<div class="row">
|
|
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'">
|
|
8
|
-
<div class="input-group" ng-class="{
|
|
9
|
-
'has-feedback': showValid && !hideValid,
|
|
10
|
-
'has-warning': !isDisabled && forma.$invalid && forma.$dirty && !hideValid,
|
|
11
|
-
'has-success': !isDisabled && forma.$valid && forma.$dirty && showValid,
|
|
12
|
-
'symbol': symbol,
|
|
13
|
-
'nice-disabled': isDisabled
|
|
14
|
-
}">
|
|
15
|
-
|
|
16
|
-
<textarea ng-if="textArea" class="form-control" ng-model="$parent.internalModel" id="{{ id }}" tabindex="{{ tabIndex }}" placeholder="{{ placeholder }}" rows="{{textAreaLines}}" max="{{ max }}" min="{{ min }}" ng-minlength="minlength" ng-maxlength="maxlength" ng-required="required" ng-pattern="regexexp" ng-disabled="isDisabled"></textarea>
|
|
17
|
-
<input ng-if="!textArea" class="form-control" type="{{ internalType }}" inputmode="{{ inputMode }}" ng-model="$parent.internalModel" name="{{ name }}" id="{{ id }}" tabindex="{{ tabIndex }}" placeholder="{{ placeholder }}" max="{{ max }}" min="{{ min }}" ng-minlength="minlength" ng-maxlength="maxlength" ng-required="required" ng-keypress="keypress($event)" ng-pattern="regexexp" ng-disabled="isDisabled" />
|
|
18
|
-
|
|
19
|
-
<div class="input-group-addon" ng-if="symbol">{{ symbol }}</div>
|
|
20
|
-
<button type="button" class="input-group-btn" ng-if="multilanguageField" ng-click="openMultilanguage()">
|
|
21
|
-
<nice-icon icon="icon-translate"></nice-icon>
|
|
22
|
-
<div class="nice-input-addon-bubble" ng-if="numberOfLanguages > 0">{{ numberOfLanguages }}</div>
|
|
23
|
-
</button>
|
|
24
|
-
<button type="button" class="input-group-btn" ng-if="onClear" ng-click="onClear()">
|
|
25
|
-
<nice-icon icon="icon-x"></nice-icon>
|
|
26
|
-
</button>
|
|
27
|
-
<!--<span ng-if="!disabled && showValid && form.$valid && form.$dirty" class="glyphicon glyphicon-ok form-control-feedback feedback-valid" aria-hidden="true"></span>-->
|
|
28
|
-
<!--<span ng-if="!disabled && !hideValid && form.$invalid && form.$dirty" class="glyphicon glyphicon-remove form-control-feedback feedback-invalid" aria-hidden="true"></span>-->
|
|
29
|
-
</div>
|
|
30
|
-
|
|
31
|
-
<div class="error-messages" ng-if="forma.$error && forma.$dirty">
|
|
32
|
-
<div class="error-message" ng-if="forma.$dirty && forma.$error.email" translate translate-context="Nice">Email is not valid.</div>
|
|
33
|
-
<div class="error-message" ng-if="forma.$dirty && forma.$error.pattern">
|
|
34
|
-
<span ng-if="regexError">{{ regexError }}</span>
|
|
35
|
-
<span ng-if="!regexError" translate translate-context="Nice">This field requires a specific pattern.</span>
|
|
36
|
-
</div>
|
|
37
|
-
<div class="error-message" ng-if="forma.$error.minlength">
|
|
38
|
-
<translate translate-context="Nice">Your input is too short. It must contain at least</translate> {{ minlength }} <translate translate-context="Nice">characters</translate>.
|
|
39
|
-
</div>
|
|
40
|
-
<div class="error-message" ng-if="forma.$error.maxlength" translate translate-context="Nice">Your input is too long</div>
|
|
41
|
-
<div class="error-message" ng-if="forma.$error.required" ng-if="forma.$dirty" translate translate-context="Nice">This field is required.</div>
|
|
42
|
-
<div class="error-message" ng-if="forma.$error.unique" translate translate-context="Nice">This field must be unique.</div>
|
|
43
|
-
<div class="error-message" ng-if="forma.$error.positiveOnly" translate translate-context="Nice">Number must be positive.</div>
|
|
44
|
-
</div>
|
|
45
|
-
|
|
46
|
-
<!-- <pre>{{ forma | json }}</pre> -->
|
|
47
|
-
</div>
|
|
48
|
-
</div>
|
|
1
|
+
<ng-form class="nice-component nice-input" ng-class="{ 'margin-bottom-0' : noMargin, 'nice-component-inline': isInline }" name="forma">
|
|
2
|
+
<div class="row">
|
|
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'">
|
|
8
|
+
<div class="input-group" ng-class="{
|
|
9
|
+
'has-feedback': showValid && !hideValid,
|
|
10
|
+
'has-warning': !isDisabled && forma.$invalid && forma.$dirty && !hideValid,
|
|
11
|
+
'has-success': !isDisabled && forma.$valid && forma.$dirty && showValid,
|
|
12
|
+
'symbol': symbol,
|
|
13
|
+
'nice-disabled': isDisabled
|
|
14
|
+
}">
|
|
15
|
+
|
|
16
|
+
<textarea ng-if="textArea" class="form-control" ng-model="$parent.internalModel" id="{{ id }}" tabindex="{{ tabIndex }}" placeholder="{{ placeholder }}" rows="{{textAreaLines}}" max="{{ max }}" min="{{ min }}" ng-minlength="minlength" ng-maxlength="maxlength" ng-required="required" ng-pattern="regexexp" ng-disabled="isDisabled"></textarea>
|
|
17
|
+
<input ng-if="!textArea" class="form-control" type="{{ internalType }}" inputmode="{{ inputMode }}" ng-model="$parent.internalModel" name="{{ name }}" id="{{ id }}" tabindex="{{ tabIndex }}" placeholder="{{ placeholder }}" max="{{ max }}" min="{{ min }}" ng-minlength="minlength" ng-maxlength="maxlength" ng-required="required" ng-keypress="keypress($event)" ng-pattern="regexexp" ng-disabled="isDisabled" />
|
|
18
|
+
|
|
19
|
+
<div class="input-group-addon" ng-if="symbol">{{ symbol }}</div>
|
|
20
|
+
<button type="button" class="input-group-btn" ng-if="multilanguageField" ng-click="openMultilanguage()">
|
|
21
|
+
<nice-icon icon="icon-translate"></nice-icon>
|
|
22
|
+
<div class="nice-input-addon-bubble" ng-if="numberOfLanguages > 0">{{ numberOfLanguages }}</div>
|
|
23
|
+
</button>
|
|
24
|
+
<button type="button" class="input-group-btn" ng-if="onClear" ng-click="onClear()">
|
|
25
|
+
<nice-icon icon="icon-x"></nice-icon>
|
|
26
|
+
</button>
|
|
27
|
+
<!--<span ng-if="!disabled && showValid && form.$valid && form.$dirty" class="glyphicon glyphicon-ok form-control-feedback feedback-valid" aria-hidden="true"></span>-->
|
|
28
|
+
<!--<span ng-if="!disabled && !hideValid && form.$invalid && form.$dirty" class="glyphicon glyphicon-remove form-control-feedback feedback-invalid" aria-hidden="true"></span>-->
|
|
29
|
+
</div>
|
|
30
|
+
|
|
31
|
+
<div class="error-messages" ng-if="forma.$error && forma.$dirty">
|
|
32
|
+
<div class="error-message" ng-if="forma.$dirty && forma.$error.email" translate translate-context="Nice">Email is not valid.</div>
|
|
33
|
+
<div class="error-message" ng-if="forma.$dirty && forma.$error.pattern">
|
|
34
|
+
<span ng-if="regexError">{{ regexError }}</span>
|
|
35
|
+
<span ng-if="!regexError" translate translate-context="Nice">This field requires a specific pattern.</span>
|
|
36
|
+
</div>
|
|
37
|
+
<div class="error-message" ng-if="forma.$error.minlength">
|
|
38
|
+
<translate translate-context="Nice">Your input is too short. It must contain at least</translate> {{ minlength }} <translate translate-context="Nice">characters</translate>.
|
|
39
|
+
</div>
|
|
40
|
+
<div class="error-message" ng-if="forma.$error.maxlength" translate translate-context="Nice">Your input is too long</div>
|
|
41
|
+
<div class="error-message" ng-if="forma.$error.required" ng-if="forma.$dirty" translate translate-context="Nice">This field is required.</div>
|
|
42
|
+
<div class="error-message" ng-if="forma.$error.unique" translate translate-context="Nice">This field must be unique.</div>
|
|
43
|
+
<div class="error-message" ng-if="forma.$error.positiveOnly" translate translate-context="Nice">Number must be positive.</div>
|
|
44
|
+
</div>
|
|
45
|
+
|
|
46
|
+
<!-- <pre>{{ forma | json }}</pre> -->
|
|
47
|
+
</div>
|
|
48
|
+
</div>
|
|
49
49
|
</ng-form>
|