nice-elements 1.6.2 → 1.7.0
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/CHANGELOG.md +7 -0
- package/README.md +1 -1
- package/bower.json +1 -1
- package/dist/nice.js +182 -167
- package/dist/nice.min.js +1 -1
- package/dist/style.css +239 -85
- package/dist/style.css.map +3 -2
- package/dist/style.min.css +2 -2
- package/package.json +1 -1
- package/src/components/nice-calendar/nice-calendar.html +3 -2
- package/src/components/nice-calendar/nice-calendar.scss +9 -5
- package/src/components/nice-checkbox/nice-checkbox.html +1 -3
- package/src/components/nice-checkbox/nice-checkbox.scss +12 -12
- package/src/components/nice-choice/nice-choice.html +3 -1
- package/src/components/nice-choice/nice-choice.scss +14 -3
- package/src/components/nice-date/nice-date.html +5 -4
- package/src/components/nice-date/nice-date.js +50 -52
- package/src/components/nice-date/nice-date.scss +29 -6
- package/src/components/nice-date-input/nice-date-input.html +3 -6
- package/src/components/nice-date-input/nice-date-input.js +2 -2
- package/src/components/nice-date-range/nice-date-range.html +3 -1
- package/src/components/nice-datetime-picker/nice-datetime-picker.html +5 -19
- package/src/components/nice-datetimerange-picker/nice-datetimerange-picker.html +6 -1
- package/src/components/nice-datetimerange-picker-2/nice-datetimerange-picker-2.html +5 -3
- package/src/components/nice-datetimerange-picker-2/nice-datetimerange-picker-2.js +25 -26
- package/src/components/nice-dropdown/nice-dropdown.html +3 -1
- package/src/components/nice-dropdown/nice-dropdown.scss +1 -0
- package/src/components/nice-dtp/nice-dtp.html +12 -12
- package/src/components/nice-help/nice-help.html +2 -1
- package/src/components/nice-help/nice-help.scss +7 -0
- package/src/components/nice-input/nice-input.html +9 -42
- package/src/components/nice-input/nice-input.js +28 -28
- package/src/components/nice-input/nice-input.scss +27 -20
- package/src/components/nice-number/nice-number.html +6 -2
- package/src/components/nice-number/nice-number.scss +15 -3
- package/src/components/nice-quantity/nice-quantity.html +6 -2
- package/src/components/nice-quantity/nice-quantity.scss +11 -0
- package/src/components/nice-search/nice-search.html +9 -20
- package/src/components/nice-search2/nice-search2.html +4 -2
- package/src/components/nice-time-picker/nice-time-picker.html +21 -27
- package/src/components/nice-time-picker/nice-time-picker.scss +11 -32
- package/src/components/nice-yesno/nice-yesno.html +2 -2
- package/src/components/nice-yesno/nice-yesno.scss +13 -0
- package/src/styles/_nice-buttons.scss +22 -9
- package/src/styles/_nice-common.scss +57 -13
- package/src/styles/_nice.scss +2 -1
- package/src/styles/_variables.scss +3 -0
|
@@ -52,7 +52,9 @@
|
|
|
52
52
|
|
|
53
53
|
|
|
54
54
|
<!------------------------- Add button ------------------------->
|
|
55
|
-
<button class="btn btn-primary add-btn" type="button" ng-if="addButtonFunction && !isDisabled" ng-click="addButtonFunction()"
|
|
55
|
+
<button class="btn btn-primary btn-icon add-btn" type="button" ng-if="addButtonFunction && !isDisabled" ng-click="addButtonFunction()">
|
|
56
|
+
<nice-icon icon="icon-plus"></nice-icon>
|
|
57
|
+
</button>
|
|
56
58
|
</div>
|
|
57
59
|
</div>
|
|
58
60
|
</div>
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
<div class="dtp-actual-num" ng-click="initDate()">{{actualNum}}</div>
|
|
21
21
|
<div>
|
|
22
22
|
<div class="left center p10">
|
|
23
|
-
<a href="javascript:void(0);" class="dtp-select-year-before" ng-click="onYearBeforeClick()" ng-class="{'disabled': !btnYearBeforeEnabled}""><i class="fa fa-chevron-left"></i></a>
|
|
23
|
+
<a href="javascript:void(0);" class="dtp-select-year-before" ng-click="onYearBeforeClick()" ng-class="{'disabled': !btnYearBeforeEnabled}""><i class=" fa fa-chevron-left"></i></a>
|
|
24
24
|
</div>
|
|
25
25
|
<div class="dtp-actual-year p80" ng-click="initDate()">{{actualYear}}</div>
|
|
26
26
|
<div class="right center p10">
|
|
@@ -48,15 +48,15 @@
|
|
|
48
48
|
|
|
49
49
|
<table class="table dtp-picker-days">
|
|
50
50
|
<thead>
|
|
51
|
-
|
|
51
|
+
<th ng-repeat="weekDay in weekDays track by $index">{{weekDay}}</th>
|
|
52
52
|
</thead>
|
|
53
53
|
<tbody>
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
54
|
+
<tr ng-repeat="week in weeks">
|
|
55
|
+
<td ng-repeat="day in week">
|
|
56
|
+
<span ng-if="day.disabled" class="dtp-select-day">{{day.label}}</span>
|
|
57
|
+
<a ng-if="!day.disabled" ng-click="onSelectDate(day)" href="javascript:void(0);" class="dtp-select-day" ng-class="{'selected': day.selected}">{{day.label}}</a>
|
|
58
|
+
</td>
|
|
59
|
+
</tr>
|
|
60
60
|
</tbody>
|
|
61
61
|
</table>
|
|
62
62
|
|
|
@@ -83,10 +83,10 @@
|
|
|
83
83
|
</div>
|
|
84
84
|
</div>
|
|
85
85
|
<!--<div class="dtp-buttons" ng-if="enableOkButtons">-->
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
86
|
+
<!--<button class="dtp-btn-cancel btn btn-flat" ng-click="onCancelClick()">{{cancelText}}</button>-->
|
|
87
|
+
<!--<button class="dtp-btn-ok btn btn-flat" ng-click="onOKClick()"> {{okText}} </button>-->
|
|
88
|
+
<!--<div class="clearfix"></div>-->
|
|
89
89
|
<!--</div>-->
|
|
90
90
|
</div>
|
|
91
91
|
</div>
|
|
92
|
-
</div>
|
|
92
|
+
</div>
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
<div class="nice-help" ng-mouseover="onHover()">
|
|
2
|
-
<i class="fa fa-question-circle nice-help-button" aria-label=""></i>
|
|
2
|
+
<!-- <i class="fa fa-question-circle nice-help-button" aria-label=""></i> -->
|
|
3
|
+
<nice-icon icon="icon-help-circle" class="nice-help-button"></nice-icon>
|
|
3
4
|
<div class="nice-help-popup">
|
|
4
5
|
<span ng-bind-html="text">{{ text }}</span>
|
|
5
6
|
<div data-popper-arrow class="nice-help-arrow"></div>
|
|
@@ -8,51 +8,16 @@
|
|
|
8
8
|
|
|
9
9
|
<!------------------------- Field ------------------------->
|
|
10
10
|
<div class="nice-field col-xs-12" ng-class="fieldWidth ? fieldWidth : 'col-sm-8'">
|
|
11
|
-
<div
|
|
12
|
-
class="form-group"
|
|
13
|
-
ng-class="{
|
|
11
|
+
<div class="form-group" ng-class="{
|
|
14
12
|
'has-feedback': showValid && !hideValid,
|
|
15
13
|
'has-warning': !isDisabled && forma.$invalid && forma.$dirty && !hideValid,
|
|
16
14
|
'has-success': !isDisabled && forma.$valid && forma.$dirty && showValid,
|
|
17
15
|
'symbol': symbol,
|
|
18
16
|
'nice-disabled': isDisabled
|
|
19
|
-
}"
|
|
20
|
-
|
|
21
|
-
<textarea
|
|
22
|
-
|
|
23
|
-
class="form-control"
|
|
24
|
-
ng-model="model"
|
|
25
|
-
id="{{ id }}"
|
|
26
|
-
tabindex="{{ tabIndex }}"
|
|
27
|
-
placeholder="{{ placeholder }}"
|
|
28
|
-
rows="{{textAreaLines}}"
|
|
29
|
-
max="{{ max }}"
|
|
30
|
-
min="{{ min }}"
|
|
31
|
-
ng-minlength="minlength"
|
|
32
|
-
ng-maxlength="maxlength"
|
|
33
|
-
ng-required="required"
|
|
34
|
-
ng-pattern="regexexp"
|
|
35
|
-
ng-disabled="isDisabled"
|
|
36
|
-
></textarea>
|
|
37
|
-
|
|
38
|
-
<input
|
|
39
|
-
ng-show="!textArea"
|
|
40
|
-
class="form-control"
|
|
41
|
-
type="{{ internalType }}"
|
|
42
|
-
ng-model="model"
|
|
43
|
-
name="{{ name }}"
|
|
44
|
-
id="{{ id }}"
|
|
45
|
-
tabindex="{{ tabIndex }}"
|
|
46
|
-
placeholder="{{ placeholder }}"
|
|
47
|
-
max="{{ max }}"
|
|
48
|
-
min="{{ min }}"
|
|
49
|
-
ng-minlength="minlength"
|
|
50
|
-
ng-maxlength="maxlength"
|
|
51
|
-
ng-required="required"
|
|
52
|
-
ng-keypress="keypress($event)"
|
|
53
|
-
ng-pattern="regexexp"
|
|
54
|
-
ng-disabled="isDisabled"
|
|
55
|
-
/>
|
|
17
|
+
}">
|
|
18
|
+
|
|
19
|
+
<textarea ng-show="textArea" class="form-control" ng-model="model" 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>
|
|
20
|
+
<input ng-show="!textArea" class="form-control" type="{{ internalType }}" ng-model="model" 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" />
|
|
56
21
|
|
|
57
22
|
<span class="input-group-addon" ng-if="symbol">{{ symbol }}</span>
|
|
58
23
|
<!--<span ng-if="!disabled && showValid && form.$valid && form.$dirty" class="glyphicon glyphicon-ok form-control-feedback feedback-valid" aria-hidden="true"></span>-->
|
|
@@ -62,7 +27,9 @@
|
|
|
62
27
|
<div ng-if="forma.$error && forma.$dirty">
|
|
63
28
|
<div class="error-message" ng-if="forma.$dirty && forma.$error.email" translate translate-context="Nice">Email is not valid.</div>
|
|
64
29
|
<div class="error-message" ng-if="forma.$dirty && forma.$error.pattern" translate translate-context="Nice">This field requires a specific pattern.</div>
|
|
65
|
-
<div class="error-message" ng-if="forma.$error.minlength"
|
|
30
|
+
<div class="error-message" ng-if="forma.$error.minlength">
|
|
31
|
+
<translate translate-context="Nice">Your input is too short. It must contain at least</translate> {{ minlength }} <translate translate-context="Nice">characters</translate>.
|
|
32
|
+
</div>
|
|
66
33
|
<div class="error-message" ng-if="forma.$error.maxlength" translate translate-context="Nice">Your input is too long</div>
|
|
67
34
|
<div class="error-message" ng-if="forma.$error.required" ng-if="forma.$dirty" translate translate-context="Nice">This field is required.</div>
|
|
68
35
|
<div class="error-message" ng-if="forma.$error.unique" translate translate-context="Nice">This field must be unique.</div>
|
|
@@ -71,4 +38,4 @@
|
|
|
71
38
|
<!-- <pre>{{ forma | json }}</pre> -->
|
|
72
39
|
</div>
|
|
73
40
|
</div>
|
|
74
|
-
</ng-form>
|
|
41
|
+
</ng-form>
|
|
@@ -55,7 +55,7 @@ angular.module('niceElements')
|
|
|
55
55
|
attrs.required = attrs.required === 'true';
|
|
56
56
|
//attrs.required = angular.isDefined(attrs.required);
|
|
57
57
|
|
|
58
|
-
if(!scope.textArea) {
|
|
58
|
+
if (!scope.textArea) {
|
|
59
59
|
scope.elementType = "input";
|
|
60
60
|
} else {
|
|
61
61
|
scope.elementType = "textarea";
|
|
@@ -63,9 +63,7 @@ angular.module('niceElements')
|
|
|
63
63
|
|
|
64
64
|
if (scope.isFocused) {
|
|
65
65
|
var input = element[0].getElementsByTagName(scope.elementType)[0];
|
|
66
|
-
if (input)
|
|
67
|
-
input.focus();
|
|
68
|
-
}
|
|
66
|
+
if (input) input.focus();
|
|
69
67
|
}
|
|
70
68
|
|
|
71
69
|
// Set internal type
|
|
@@ -94,8 +92,9 @@ angular.module('niceElements')
|
|
|
94
92
|
|
|
95
93
|
if (angular.isDefined(attrs.minDecimalsCutZeros) && attrs.type == 'number') {
|
|
96
94
|
scope.model = Number(scope.model);
|
|
97
|
-
if (scope.model.toString().split('.').length < 2 || scope.model.toString().split('.')[1].length < parseInt(attrs.minDecimalsCutZeros))
|
|
98
|
-
scope.model = (Number(scope.model)).toFixed(parseInt(attrs.minDecimalsCutZeros));
|
|
95
|
+
if (scope.model.toString().split('.').length < 2 || scope.model.toString().split('.')[1].length < parseInt(attrs.minDecimalsCutZeros)) {
|
|
96
|
+
scope.model = Number((Number(scope.model)).toFixed(parseInt(attrs.minDecimalsCutZeros)));
|
|
97
|
+
}
|
|
99
98
|
}
|
|
100
99
|
|
|
101
100
|
if (angular.isDefined(scope.regex) && scope.regex != '') {
|
|
@@ -114,39 +113,40 @@ angular.module('niceElements')
|
|
|
114
113
|
if (scope.onChange) scope.onChange({ model: scope.model });
|
|
115
114
|
}
|
|
116
115
|
} else {
|
|
116
|
+
scope.model = scope.internalModel;
|
|
117
117
|
if (scope.onChange) scope.onChange({ model: scope.model });
|
|
118
118
|
}
|
|
119
119
|
});
|
|
120
|
-
|
|
120
|
+
},
|
|
121
121
|
|
|
122
|
-
|
|
123
|
-
|
|
122
|
+
controller: function ($scope) {
|
|
123
|
+
$scope.id = Math.random().toString(36).substring(7);
|
|
124
124
|
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
event.preventDefault();
|
|
131
|
-
return false;
|
|
132
|
-
}
|
|
133
|
-
} else {
|
|
134
|
-
event.preventDefault();
|
|
135
|
-
return false;
|
|
136
|
-
}
|
|
137
|
-
} else if (event.charCode == 45) {
|
|
138
|
-
if (String($scope.model).indexOf("-") >= 0) {
|
|
125
|
+
$scope.keypress = function (event) {
|
|
126
|
+
if ($scope.type == "number" || $scope.type == "integer") {
|
|
127
|
+
if (event.charCode == 46 || event.charCode == 44) { // Handle "." and "," key (only one allowed)
|
|
128
|
+
if ($scope.type == "number") {
|
|
129
|
+
if (String($scope.model).indexOf(".") >= 0) {
|
|
139
130
|
event.preventDefault();
|
|
140
131
|
return false;
|
|
141
132
|
}
|
|
142
|
-
} else
|
|
143
|
-
return true;
|
|
144
|
-
} else { // Prevent everything else
|
|
133
|
+
} else {
|
|
145
134
|
event.preventDefault();
|
|
146
135
|
return false;
|
|
147
136
|
}
|
|
137
|
+
} else if (event.charCode == 45) {
|
|
138
|
+
if (String($scope.model).indexOf("-") >= 0) {
|
|
139
|
+
event.preventDefault();
|
|
140
|
+
return false;
|
|
141
|
+
}
|
|
142
|
+
} else if ((event.charCode >= 48 && event.charCode <= 58) || event.charCode == 0) { // Allow only numbers
|
|
143
|
+
return true;
|
|
144
|
+
} else { // Prevent everything else
|
|
145
|
+
event.preventDefault();
|
|
146
|
+
return false;
|
|
148
147
|
}
|
|
149
|
-
}
|
|
150
|
-
}
|
|
148
|
+
}
|
|
149
|
+
};
|
|
150
|
+
}
|
|
151
151
|
};
|
|
152
152
|
});
|
|
@@ -1,42 +1,49 @@
|
|
|
1
|
-
.nice-input{
|
|
2
|
-
color:
|
|
1
|
+
.nice-input {
|
|
2
|
+
color: var(--nice-font-color);
|
|
3
3
|
display: block;
|
|
4
4
|
|
|
5
|
-
::-webkit-input-placeholder {
|
|
5
|
+
::-webkit-input-placeholder {
|
|
6
|
+
/* WebKit browsers */
|
|
6
7
|
color: $nice-input-placeholder-color;
|
|
7
|
-
// opacity: 0.1;
|
|
8
8
|
}
|
|
9
9
|
|
|
10
|
-
:-moz-placeholder {
|
|
10
|
+
:-moz-placeholder {
|
|
11
|
+
/* Mozilla Firefox 4 to 18 */
|
|
11
12
|
color: $nice-input-placeholder-color;
|
|
12
|
-
// opacity: 0.1;
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
-
::-moz-placeholder {
|
|
15
|
+
::-moz-placeholder {
|
|
16
|
+
/* Mozilla Firefox 19+ */
|
|
16
17
|
color: $nice-input-placeholder-color;
|
|
17
|
-
// opacity: 0.1;
|
|
18
18
|
}
|
|
19
19
|
|
|
20
|
-
:-ms-input-placeholder {
|
|
20
|
+
:-ms-input-placeholder {
|
|
21
|
+
/* Internet Explorer 10+ */
|
|
21
22
|
color: $nice-input-placeholder-color;
|
|
22
|
-
// opacity: 0.1;
|
|
23
23
|
}
|
|
24
24
|
|
|
25
|
-
:disabled::-webkit-input-placeholder {
|
|
25
|
+
:disabled::-webkit-input-placeholder {
|
|
26
|
+
/* WebKit browsers */
|
|
26
27
|
color: $nice-input-disabled-bg;
|
|
27
28
|
}
|
|
28
29
|
|
|
29
|
-
:disabled:-moz-placeholder {
|
|
30
|
+
:disabled:-moz-placeholder {
|
|
31
|
+
/* Mozilla Firefox 4 to 18 */
|
|
30
32
|
color: $nice-input-disabled-bg;
|
|
31
|
-
// opacity: 0;
|
|
32
33
|
}
|
|
33
|
-
|
|
34
|
+
|
|
35
|
+
:disabled::-moz-placeholder {
|
|
36
|
+
/* Mozilla Firefox 19+ */
|
|
34
37
|
color: $nice-input-disabled-bg;
|
|
35
|
-
// opacity: 0;
|
|
36
38
|
}
|
|
37
|
-
|
|
39
|
+
|
|
40
|
+
:disabled:-ms-input-placeholder {
|
|
41
|
+
/* Internet Explorer 10+ */
|
|
38
42
|
color: $nice-input-disabled-bg;
|
|
39
|
-
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
textarea {
|
|
46
|
+
border-right: 1px solid var(--nice-border-color) !important;
|
|
40
47
|
}
|
|
41
48
|
|
|
42
49
|
|
|
@@ -44,17 +51,17 @@
|
|
|
44
51
|
margin-bottom: 0px;
|
|
45
52
|
}
|
|
46
53
|
|
|
47
|
-
.symbol{
|
|
54
|
+
.symbol {
|
|
48
55
|
position: relative;
|
|
49
56
|
display: table;
|
|
50
57
|
border-collapse: separate;
|
|
51
|
-
|
|
58
|
+
|
|
52
59
|
.form-control-feedback {
|
|
53
60
|
left: 0;
|
|
54
61
|
right: auto;
|
|
55
62
|
}
|
|
56
63
|
|
|
57
|
-
.form-control{
|
|
64
|
+
.form-control {
|
|
58
65
|
border-top-right-radius: 0;
|
|
59
66
|
border-bottom-right-radius: 0;
|
|
60
67
|
text-align: right;
|
|
@@ -10,13 +10,17 @@
|
|
|
10
10
|
<div class="nice-field col-xs-12" ng-class="fieldWidth ? fieldWidth : 'col-sm-8'">
|
|
11
11
|
<div class="input-group" ng-class="{'has-warning': !disabled && niceNumberForm.$invalid && niceNumberForm.$dirty}">
|
|
12
12
|
<span class="input-group-btn">
|
|
13
|
-
<button class="btn btn-default" type="button" ng-disabled="!canSubstract" ng-click="subtract()" tabindex="-1"
|
|
13
|
+
<button class="btn btn-default btn-left" type="button" ng-disabled="!canSubstract" ng-click="subtract()" tabindex="-1">
|
|
14
|
+
<nice-icon icon="icon-minus"></nice-icon>
|
|
15
|
+
</button>
|
|
14
16
|
</span>
|
|
15
17
|
|
|
16
18
|
<input type="number" step="{{ step }}" ng-change="inputChanged()" class="form-control" max="{{ max }}" min="{{ min }}" ng-model="model" />
|
|
17
19
|
|
|
18
20
|
<span class="input-group-btn">
|
|
19
|
-
<button class="btn btn-default" type="button" ng-disabled="!canAdd" ng-click="add()" tabindex="-1"
|
|
21
|
+
<button class="btn btn-default btn-right" type="button" ng-disabled="!canAdd" ng-click="add()" tabindex="-1">
|
|
22
|
+
<nice-icon icon="icon-plus"></nice-icon>
|
|
23
|
+
</button>
|
|
20
24
|
</span>
|
|
21
25
|
</div>
|
|
22
26
|
|
|
@@ -6,20 +6,32 @@
|
|
|
6
6
|
padding: 0;
|
|
7
7
|
min-width: 30px;
|
|
8
8
|
border-left: 0 none;
|
|
9
|
+
border-right: 0 none;
|
|
9
10
|
}
|
|
10
11
|
}
|
|
11
12
|
|
|
12
13
|
.input-group-btn {
|
|
13
|
-
z-index: 1;
|
|
14
|
-
|
|
15
14
|
.btn {
|
|
16
|
-
background: $nice-
|
|
15
|
+
background: $nice-input-bg;
|
|
17
16
|
height: 34px;
|
|
17
|
+
width: 34px;
|
|
18
|
+
display: flex;
|
|
19
|
+
justify-content: center;
|
|
20
|
+
align-items: center;
|
|
21
|
+
line-height: 0;
|
|
18
22
|
border: 1px solid $nice-border-color;
|
|
19
23
|
|
|
20
24
|
&:focus {
|
|
21
25
|
outline: 0;
|
|
22
26
|
}
|
|
27
|
+
|
|
28
|
+
&.btn-left {
|
|
29
|
+
border-right: 0 none;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
&.btn-right {
|
|
33
|
+
border-left: 0 none;
|
|
34
|
+
}
|
|
23
35
|
}
|
|
24
36
|
}
|
|
25
37
|
|
|
@@ -9,9 +9,13 @@
|
|
|
9
9
|
<!------------------------- Field ------------------------->
|
|
10
10
|
<div class="nice-field col-xs-12" ng-class="[fieldWidth ? fieldWidth : 'col-sm-8', { 'nice-disabled': isDisabled }]">
|
|
11
11
|
<div class="input-group">
|
|
12
|
-
<button class="btn btn-default btn-left" ng-click="sub()" type="button" ng-disabled="isDisabled" tabindex="-1"
|
|
12
|
+
<button class="btn btn-default btn-left" ng-click="sub()" type="button" ng-disabled="isDisabled" tabindex="-1">
|
|
13
|
+
<nice-icon icon="icon-minus"></nice-icon>
|
|
14
|
+
</button>
|
|
13
15
|
<input class="value form-control" ng-model="model" type="number" ng-change="handleChange()" ng-disabled="isDisabled" />
|
|
14
|
-
<button class="btn btn-default btn-right" ng-click="add()" type="button" ng-disabled="isDisabled" tabindex="-1"
|
|
16
|
+
<button class="btn btn-default btn-right" ng-click="add()" type="button" ng-disabled="isDisabled" tabindex="-1">
|
|
17
|
+
<nice-icon icon="icon-plus"></nice-icon>
|
|
18
|
+
</button>
|
|
15
19
|
</div>
|
|
16
20
|
</div>
|
|
17
21
|
</div>
|
|
@@ -6,9 +6,20 @@
|
|
|
6
6
|
display: flex;
|
|
7
7
|
}
|
|
8
8
|
|
|
9
|
+
.form-control {
|
|
10
|
+
border-left: 0 none !important;
|
|
11
|
+
border-right: 0 none !important;
|
|
12
|
+
}
|
|
13
|
+
|
|
9
14
|
.btn {
|
|
10
15
|
border: 1px solid $nice-border-color;
|
|
11
16
|
border-radius: 0;
|
|
17
|
+
width: 34px;
|
|
18
|
+
display: flex;
|
|
19
|
+
background: $nice-input-bg;
|
|
20
|
+
justify-content: center;
|
|
21
|
+
align-items: center;
|
|
22
|
+
line-height: 0;
|
|
12
23
|
|
|
13
24
|
&:focus {
|
|
14
25
|
outline: 0 none;
|
|
@@ -8,34 +8,23 @@
|
|
|
8
8
|
|
|
9
9
|
<!------------------------- Field ------------------------->
|
|
10
10
|
<div class="nice-field col-xs-12" ng-class="[fieldWidth ? fieldWidth : 'col-sm-8', { 'nice-disabled': isDisabled }]">
|
|
11
|
-
<div
|
|
12
|
-
class="input-group"
|
|
13
|
-
ng-class="{
|
|
11
|
+
<div class="input-group" ng-class="{
|
|
14
12
|
'disabled': isDisabled,
|
|
15
13
|
'has-warning': !isDisabled && form.$invalid && form.$dirty,
|
|
16
14
|
'has-success': !isDisabled && form.$valid && form.$dirty}
|
|
17
|
-
"
|
|
18
|
-
|
|
19
|
-
<input
|
|
20
|
-
class="form-control"
|
|
21
|
-
type="text"
|
|
22
|
-
id="{{ id }}"
|
|
23
|
-
ng-model="modelString"
|
|
24
|
-
ng-keypress="keypress($event)"
|
|
25
|
-
placeholder="{{ placeholder }}"
|
|
26
|
-
ng-disabled="isDisabled"
|
|
27
|
-
ng-change="updateSearch()"
|
|
28
|
-
ng-required="required"
|
|
29
|
-
tabindex="{{ tabIndex }}"
|
|
30
|
-
>
|
|
15
|
+
">
|
|
16
|
+
<input class="form-control" type="text" id="{{ id }}" ng-model="modelString" ng-keypress="keypress($event)" placeholder="{{ placeholder }}" ng-disabled="isDisabled" ng-change="updateSearch()" ng-required="required" tabindex="{{ tabIndex }}">
|
|
31
17
|
|
|
32
18
|
<span class="input-group-addon clickable" ng-click="search()" ng-if="!model">
|
|
33
|
-
<i ng-show="!loading" class="fa fa-search"
|
|
34
|
-
<i ng-show="loading" class="fa fa-refresh fa-spin"></i>
|
|
19
|
+
<!-- <i ng-show="!loading" class="fa fa-search"></i>
|
|
20
|
+
<i ng-show="loading" class="fa fa-refresh fa-spin"></i> -->
|
|
21
|
+
<nice-icon ng-show="!loading" icon="icon-search"></nice-icon>
|
|
22
|
+
<nice-icon ng-show="loading" icon="icon-loader" class="d-block nice-animation-spin"></nice-icon>
|
|
35
23
|
</span>
|
|
36
24
|
|
|
37
25
|
<span class="input-group-addon clickable" ng-click="remove()" ng-if="model">
|
|
38
|
-
<i ng-show="!loading" class="fa fa-remove"
|
|
26
|
+
<!-- <i ng-show="!loading" class="fa fa-remove"></i> -->
|
|
27
|
+
<nice-icon ng-show="!loading" icon="icon-x"></nice-icon>
|
|
39
28
|
</span>
|
|
40
29
|
</div>
|
|
41
30
|
</div>
|
|
@@ -12,8 +12,10 @@
|
|
|
12
12
|
<input class="form-control" type="text" id="{{ id }}" ng-model="model" placeholder="{{ placeholder }}" ng-disabled="isDisabled" ng-change="updateSearch()" ng-focus="onFocus()" tabindex="{{ tabIndex }}">
|
|
13
13
|
|
|
14
14
|
<span class="input-group-addon clickable" ng-click="onFocus()">
|
|
15
|
-
<
|
|
16
|
-
<
|
|
15
|
+
<nice-icon ng-show="!loading" icon="icon-search"></nice-icon>
|
|
16
|
+
<nice-icon ng-show="loading" icon="icon-loader" class="d-block nice-animation-spin"></nice-icon>
|
|
17
|
+
<!-- <i ng-show="!loading" class="fa fa-search"></i>
|
|
18
|
+
<i ng-show="loading" class="fa fa-refresh fa-spin"></i> -->
|
|
17
19
|
</span>
|
|
18
20
|
</div>
|
|
19
21
|
|
|
@@ -8,41 +8,35 @@
|
|
|
8
8
|
|
|
9
9
|
<!------------------------- Field ------------------------->
|
|
10
10
|
<div class="nice-field col-xs-12" ng-class="fieldWidth ? fieldWidth : 'col-sm-8'">
|
|
11
|
-
<div
|
|
12
|
-
class="input-group"
|
|
13
|
-
ng-class="{
|
|
11
|
+
<div class="input-group" ng-class="{
|
|
14
12
|
'has-warning': !isDisabled && forma.$invalid && forma.$dirty,
|
|
15
13
|
'disabled': isDisabled
|
|
16
|
-
}"
|
|
17
|
-
>
|
|
14
|
+
}">
|
|
18
15
|
<input type="text" class="form-control" ng-model="modelString" ng-keyup="$event.keyCode == 13 && validateDate()" ng-blur="validateDate()">
|
|
19
|
-
<span class="input-group-addon clickable" ng-click="open = !open"
|
|
16
|
+
<span class="input-group-addon clickable" ng-click="open = !open">
|
|
17
|
+
<nice-icon icon="icon-clock"></nice-icon>
|
|
18
|
+
</span>
|
|
20
19
|
</div>
|
|
21
20
|
|
|
22
21
|
<div class="nice-time-picker-dropdown" ng-if="open">
|
|
23
|
-
<div
|
|
24
|
-
<
|
|
25
|
-
<
|
|
26
|
-
</
|
|
27
|
-
<div class="
|
|
28
|
-
|
|
29
|
-
|
|
22
|
+
<div>
|
|
23
|
+
<button class="btn btn-sm btn-block btn-default" ng-click="changeHour(true)">
|
|
24
|
+
<nice-icon icon="icon-chevron-up"></nice-icon>
|
|
25
|
+
</button>
|
|
26
|
+
<div class="numbers">{{ hours }}</div>
|
|
27
|
+
<button class="btn btn-sm btn-block btn-default" ng-click="changeHour(false)">
|
|
28
|
+
<nice-icon icon="icon-chevron-down"></nice-icon>
|
|
29
|
+
</button>
|
|
30
30
|
</div>
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
<button ng-click="changeHour(false)"><i class="fa fa-chevron-down"></i></button>
|
|
40
|
-
</div>
|
|
41
|
-
<div class="col-xs-6">
|
|
42
|
-
<button ng-click="changeMinutes(false)"><i class="fa fa-chevron-down"></i></button>
|
|
43
|
-
</div>
|
|
31
|
+
<div>
|
|
32
|
+
<button class="btn btn-sm btn-block btn-default" ng-click="changeMinutes(true)">
|
|
33
|
+
<nice-icon icon="icon-chevron-up"></nice-icon>
|
|
34
|
+
</button>
|
|
35
|
+
<div class="numbers">{{ minutes }}</div>
|
|
36
|
+
<button class="btn btn-sm btn-block btn-default" ng-click="changeMinutes(false)">
|
|
37
|
+
<nice-icon icon="icon-chevron-down"></nice-icon>
|
|
38
|
+
</button>
|
|
44
39
|
</div>
|
|
45
|
-
|
|
46
40
|
</div>
|
|
47
41
|
</div>
|
|
48
42
|
</div>
|
|
@@ -1,54 +1,33 @@
|
|
|
1
|
-
.nice-time-picker{
|
|
1
|
+
.nice-time-picker {
|
|
2
2
|
position: relative;
|
|
3
3
|
|
|
4
|
-
.nice-time-picker-dropdown{
|
|
4
|
+
.nice-time-picker-dropdown {
|
|
5
5
|
z-index: 900;
|
|
6
6
|
border-radius: $nice-border-radius;
|
|
7
7
|
position: absolute;
|
|
8
8
|
top: 100%;
|
|
9
9
|
left: 15px;
|
|
10
|
-
width:
|
|
10
|
+
width: 130px;
|
|
11
11
|
background: white;
|
|
12
12
|
border: 1px solid $nice-border-color;
|
|
13
13
|
box-shadow: $nice-box-shadow;
|
|
14
14
|
padding: 10px;
|
|
15
15
|
margin-top: 0.5rem;
|
|
16
|
-
text-align: center;
|
|
17
16
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
line-height: 1.6;
|
|
22
|
-
}
|
|
17
|
+
display: grid;
|
|
18
|
+
grid-template-columns: 1fr 1fr;
|
|
19
|
+
gap: 10px;
|
|
23
20
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
border: 0;
|
|
21
|
+
.numbers {
|
|
22
|
+
font-size: 1.5rem;
|
|
27
23
|
color: $nice-font-color;
|
|
28
24
|
line-height: 1;
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
background: none;
|
|
32
|
-
|
|
33
|
-
&:hover{
|
|
34
|
-
background: $nice-base-color;
|
|
35
|
-
color: #ffffff;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
&:focus{
|
|
39
|
-
outline: 0;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
&:active{
|
|
43
|
-
outline: 0;
|
|
44
|
-
background: darken($nice-base-color, 10%);
|
|
45
|
-
color: #ffffff;
|
|
46
|
-
}
|
|
25
|
+
text-align: center;
|
|
26
|
+
padding: 5px 0;
|
|
47
27
|
}
|
|
48
28
|
}
|
|
49
29
|
|
|
50
|
-
|
|
51
|
-
.nice-background{
|
|
30
|
+
.nice-background {
|
|
52
31
|
position: fixed;
|
|
53
32
|
top: 0;
|
|
54
33
|
left: 0;
|