nice-elements 1.15.0 → 1.15.1
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/.claude/launch.json +11 -0
- package/CHANGELOG.md +10 -0
- package/README.md +1 -1
- package/bower.json +1 -1
- package/dist/nice.js +118 -30
- package/dist/nice.min.js +1 -1
- package/dist/style.css +18 -10
- package/dist/style.css.map +1 -1
- package/dist/style.min.css +2 -2
- package/package.json +1 -1
- package/src/components/nice-calendar/nice-calendar.html +4 -0
- package/src/components/nice-checkbox/nice-checkbox.html +10 -4
- package/src/components/nice-checkbox/nice-checkbox.js +1 -0
- package/src/components/nice-checkbox/nice-checkbox.scss +7 -0
- package/src/components/nice-choice/nice-choice.js +11 -0
- package/src/components/nice-date/nice-date.html +10 -1
- package/src/components/nice-date/nice-date.js +47 -0
- package/src/components/nice-date/nice-date.scss +1 -0
- package/src/components/nice-date-input/nice-date-input.js +1 -1
- package/src/components/nice-date-range/nice-date-range.html +1 -1
- package/src/components/nice-datetime-picker/nice-datetime-picker.html +3 -0
- package/src/components/nice-dropdown/nice-dropdown.js +12 -3
- package/src/components/nice-dropdown/nice-dropdown.scss +0 -11
- package/src/components/nice-percent/nice-percent.js +10 -3
- package/src/components/nice-search/nice-search.js +8 -14
- package/src/components/nice-search2/nice-search2.html +1 -1
- package/src/components/nice-search2/nice-search2.js +1 -0
- package/src/components/nice-toggle/nice-toggle.html +3 -0
- package/src/components/nice-upload/nice-upload.html +1 -1
- package/src/components/nice-yesno/nice-yesno.html +3 -0
- package/src/services/nice-service.js +1 -1
- package/src/styles/_nice-common.scss +17 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## v1.15.1 (20.11.2026)
|
|
4
|
+
|
|
5
|
+
- added manual input support to nice date,
|
|
6
|
+
- fixed required prop on all form components (nice search, nice dropdown, nice upload, nice percent, nice date, nice date input, nice yesno, nice toggle, nice calendar, nice date range, nice datetime picker),
|
|
7
|
+
- added required to nice search2, nice choice and nice checkbox,
|
|
8
|
+
- fixed browser required message not showing on nice checkbox,
|
|
9
|
+
- fixed nice search losing the label of a preset model,
|
|
10
|
+
- fixed nice date input showing "Invalid date" for a null model,
|
|
11
|
+
- updated example documentation
|
|
12
|
+
|
|
3
13
|
## v1.15.0 (18.11.2026)
|
|
4
14
|
|
|
5
15
|
- created nice badges list component,
|
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|

|
|
2
2
|
|
|
3
|
-
# Nice elements v1.15.
|
|
3
|
+
# Nice elements v1.15.1
|
|
4
4
|
|
|
5
5
|
Nice elements is an AngularJS v1.5.8 module that contains nice form elements like inputs, choice fields, search, toggle, dropdown, etc.
|
|
6
6
|
|
package/bower.json
CHANGED
package/dist/nice.js
CHANGED
|
@@ -801,6 +801,7 @@ angular.module('niceElements')
|
|
|
801
801
|
onChange: '&?',
|
|
802
802
|
help: '@',
|
|
803
803
|
isDisabled: '=',
|
|
804
|
+
required: '=', // Checkbox must be checked
|
|
804
805
|
},
|
|
805
806
|
controller: function ($scope) {
|
|
806
807
|
if ($scope.model === undefined) $scope.model = false;
|
|
@@ -845,6 +846,7 @@ angular.module('niceElements')
|
|
|
845
846
|
multiple: '=?',
|
|
846
847
|
help: '@',
|
|
847
848
|
isInline: '=?',
|
|
849
|
+
required: '=?',
|
|
848
850
|
onChange: '&?'
|
|
849
851
|
},
|
|
850
852
|
controller: function ($attrs, $scope) {
|
|
@@ -1024,6 +1026,16 @@ angular.module('niceElements')
|
|
|
1024
1026
|
}
|
|
1025
1027
|
});
|
|
1026
1028
|
|
|
1029
|
+
// Required: something has to be selected (at least one item when multiple)
|
|
1030
|
+
const checkRequired = function () {
|
|
1031
|
+
if (!$scope.formChoice) return;
|
|
1032
|
+
let hasValue = $scope.model !== null && angular.isDefined($scope.model);
|
|
1033
|
+
if ($scope.multiple) hasValue = !!($scope.model && $scope.model.length);
|
|
1034
|
+
$scope.formChoice.$setValidity('required', !$scope.required || hasValue);
|
|
1035
|
+
};
|
|
1036
|
+
$scope.$watchCollection('model', checkRequired);
|
|
1037
|
+
$scope.$watch('required', checkRequired);
|
|
1038
|
+
|
|
1027
1039
|
}
|
|
1028
1040
|
};
|
|
1029
1041
|
});
|
|
@@ -1144,7 +1156,7 @@ angular.module('niceElements')
|
|
|
1144
1156
|
if ($scope.time === undefined) $scope.time = true;
|
|
1145
1157
|
if (!$scope.placeholderDate) { $scope.placeholderDate = gettextCatalog.getString("••.••.••••", null, "Nice"); }
|
|
1146
1158
|
if (!$scope.placeholderTime) { $scope.placeholderTime = gettextCatalog.getString("••:••", null, "Nice"); }
|
|
1147
|
-
if (!$scope.model && !$scope.nullable) $scope.model = moment(
|
|
1159
|
+
if (!$scope.model && !$scope.nullable) $scope.model = moment().set({ 'second': 0, 'millisecond': 0 });
|
|
1148
1160
|
$scope.inner = {
|
|
1149
1161
|
timeModel: angular.copy($scope.model || moment()),
|
|
1150
1162
|
dateModel: angular.copy($scope.model || moment()),
|
|
@@ -1488,6 +1500,53 @@ angular.module('niceElements')
|
|
|
1488
1500
|
};
|
|
1489
1501
|
|
|
1490
1502
|
|
|
1503
|
+
// ------------------ Typed date ------------------
|
|
1504
|
+
// Formats accepted when the date is typed in (strict parsing)
|
|
1505
|
+
const TYPED_DATE_FORMATS = ['D.M.YYYY', 'D.M.YY', 'D.M.', 'D.M'];
|
|
1506
|
+
const TYPED_TIME_FORMATS = ['D.M.YYYY H:mm', 'D.M.YY H:mm', 'D.M. H:mm', 'D.M H:mm'];
|
|
1507
|
+
|
|
1508
|
+
// Parse typed text on blur (or Enter). Invalid or out of range text reverts to the current model.
|
|
1509
|
+
$scope.parseTypedDate = function () {
|
|
1510
|
+
const text = ($scope.innerDate.value || "").replace("•", " ").replace(/\s+/g, " ").trim();
|
|
1511
|
+
|
|
1512
|
+
// Nothing changed
|
|
1513
|
+
if (text == $scope.formatDate($scope.model).replace("•", " ").replace(/\s+/g, " ")) return;
|
|
1514
|
+
|
|
1515
|
+
// Empty text clears the model, unless the field can't be empty
|
|
1516
|
+
if (!text) {
|
|
1517
|
+
if ($scope.nullable || $scope.required) $scope.setTypedDate(null);
|
|
1518
|
+
else $scope.innerDate.value = $scope.formatDate($scope.model);
|
|
1519
|
+
return;
|
|
1520
|
+
}
|
|
1521
|
+
|
|
1522
|
+
const formats = $scope.time ? TYPED_TIME_FORMATS.concat(TYPED_DATE_FORMATS) : TYPED_DATE_FORMATS;
|
|
1523
|
+
const date = moment(text, formats, true);
|
|
1524
|
+
if (!date.isValid() || _isDisabledDate(date)) {
|
|
1525
|
+
$scope.innerDate.value = $scope.formatDate($scope.model);
|
|
1526
|
+
return;
|
|
1527
|
+
}
|
|
1528
|
+
|
|
1529
|
+
if (!$scope.time) $scope._removeTime(date);
|
|
1530
|
+
$scope.setTypedDate(date);
|
|
1531
|
+
};
|
|
1532
|
+
|
|
1533
|
+
$scope.setTypedDate = function (date) {
|
|
1534
|
+
$scope.model = date;
|
|
1535
|
+
$scope.innerDate.value = $scope.formatDate($scope.model);
|
|
1536
|
+
$timeout(function () {
|
|
1537
|
+
if ($scope.onChange) $scope.onChange({ model: $scope.model });
|
|
1538
|
+
$scope.forma.$setDirty();
|
|
1539
|
+
});
|
|
1540
|
+
};
|
|
1541
|
+
|
|
1542
|
+
// Enter parses the text first, so the form is submitted with the typed date.
|
|
1543
|
+
// Enter and Tab also close the picker (it isn't closed on blur, because clicking a day blurs the input).
|
|
1544
|
+
$scope.typedDateKeydown = function (event) {
|
|
1545
|
+
if (event.keyCode == 13) $scope.parseTypedDate();
|
|
1546
|
+
if (event.keyCode == 13 || event.keyCode == 9) $scope.isOpen = false;
|
|
1547
|
+
};
|
|
1548
|
+
|
|
1549
|
+
|
|
1491
1550
|
// ------------------ Clear ------------------
|
|
1492
1551
|
$scope.clear = function () {
|
|
1493
1552
|
$scope.isOpen = false;
|
|
@@ -3226,11 +3285,20 @@ angular.module('niceElements')
|
|
|
3226
3285
|
});
|
|
3227
3286
|
|
|
3228
3287
|
// Handle required
|
|
3229
|
-
$timeout(
|
|
3230
|
-
if ($scope.formDropdown) $scope.formDropdown.$setValidity('required', !(!$scope.selected && $scope.required));
|
|
3231
|
-
});
|
|
3288
|
+
$timeout($scope.checkRequired);
|
|
3232
3289
|
}
|
|
3233
3290
|
|
|
3291
|
+
// ----------------------------------- Required -----------------------------------
|
|
3292
|
+
// Form is invalid when required and nothing is selected
|
|
3293
|
+
$scope.checkRequired = function () {
|
|
3294
|
+
if ($scope.formDropdown) $scope.formDropdown.$setValidity('required', !(!$scope.selected && $scope.required));
|
|
3295
|
+
};
|
|
3296
|
+
|
|
3297
|
+
// Re-check when required is turned on/off
|
|
3298
|
+
$scope.$watch('required', function () {
|
|
3299
|
+
$scope.checkRequired();
|
|
3300
|
+
});
|
|
3301
|
+
|
|
3234
3302
|
// ----------------------------------- Watch for keydown and keypress -----------------------------------
|
|
3235
3303
|
// $element.bind("keydown keypress", function (event) {
|
|
3236
3304
|
// // Arrow Up
|
|
@@ -5125,7 +5193,10 @@ angular.module('niceElements')
|
|
|
5125
5193
|
return Number(new Decimal(String(number)).toFixed(decimals, 4));
|
|
5126
5194
|
};
|
|
5127
5195
|
|
|
5128
|
-
if (
|
|
5196
|
+
if ($scope.model === null && $scope.required) {
|
|
5197
|
+
// Required and empty: keep the field empty so ng-required marks it invalid
|
|
5198
|
+
$scope.internalModel = "";
|
|
5199
|
+
} else if (angular.isDefined($scope.model)) {
|
|
5129
5200
|
$scope.internalModel = roundN((angular.copy($scope.model) * 100), 6);
|
|
5130
5201
|
} else {
|
|
5131
5202
|
$scope.internalModel = "0";
|
|
@@ -5138,7 +5209,8 @@ angular.module('niceElements')
|
|
|
5138
5209
|
if (parseFloat($scope.internalModel) > 100) $scope.internalModel = 100;
|
|
5139
5210
|
$scope.model = roundN(parseFloat($scope.internalModel) / 100, 6);
|
|
5140
5211
|
} else {
|
|
5141
|
-
|
|
5212
|
+
// Cleared field: null when required (so the form is invalid), otherwise 0
|
|
5213
|
+
$scope.model = $scope.required ? null : 0;
|
|
5142
5214
|
}
|
|
5143
5215
|
if ($scope.onChange) $scope.onChange({ model: $scope.model });
|
|
5144
5216
|
};
|
|
@@ -5160,11 +5232,14 @@ angular.module('niceElements')
|
|
|
5160
5232
|
$scope.$watch('model', function (value_new, value_old) {
|
|
5161
5233
|
if (value_new) {
|
|
5162
5234
|
$scope.internalModel = roundN(angular.copy($scope.model) * 100, 6);
|
|
5235
|
+
} else if (value_new === null && $scope.required) {
|
|
5236
|
+
$scope.internalModel = "";
|
|
5163
5237
|
}
|
|
5164
5238
|
});
|
|
5165
5239
|
|
|
5166
5240
|
$scope.$watch('internalModel', function (value_new, value_old) {
|
|
5167
|
-
|
|
5241
|
+
// Empty field falls back to 0, unless required (then it stays empty and invalid)
|
|
5242
|
+
if (!$scope.internalModel && !$scope.required) {
|
|
5168
5243
|
$scope.internalModel = "0";
|
|
5169
5244
|
}
|
|
5170
5245
|
});
|
|
@@ -5491,7 +5566,6 @@ angular.module('niceElements')
|
|
|
5491
5566
|
if (!attrs.placeholder) { attrs.placeholder = ''; }
|
|
5492
5567
|
if (!attrs.fieldWidth) { attrs.fieldWidth = 'col-sm-8'; }
|
|
5493
5568
|
if (!attrs.labelWidth) { attrs.labelWidth = 'col-sm-4'; }
|
|
5494
|
-
if (!attrs.setText) { attrs.setText = ''; }
|
|
5495
5569
|
|
|
5496
5570
|
attrs.required = attrs.required === 'true' || attrs.required === true;
|
|
5497
5571
|
attrs.hideValid = attrs.hideValid === 'true' || attrs.hideValid === true;
|
|
@@ -5517,8 +5591,9 @@ angular.module('niceElements')
|
|
|
5517
5591
|
});
|
|
5518
5592
|
|
|
5519
5593
|
// Set default text
|
|
5594
|
+
// (skip when set-text is not used, so the label of a preset model below is kept)
|
|
5520
5595
|
scope.$watch("setText", function () {
|
|
5521
|
-
scope.modelString = scope.setText;
|
|
5596
|
+
if (angular.isDefined(scope.setText)) scope.modelString = scope.setText;
|
|
5522
5597
|
});
|
|
5523
5598
|
|
|
5524
5599
|
// Check if object is defined
|
|
@@ -5529,18 +5604,12 @@ angular.module('niceElements')
|
|
|
5529
5604
|
scope.modelString = scope.model;
|
|
5530
5605
|
}
|
|
5531
5606
|
|
|
5532
|
-
|
|
5533
|
-
|
|
5534
|
-
|
|
5535
|
-
|
|
5536
|
-
|
|
5537
|
-
|
|
5538
|
-
scope.$watch('model', function (newValue) {
|
|
5539
|
-
if (scope.model && scope.model.id) {
|
|
5540
|
-
setValid(true);
|
|
5541
|
-
} else {
|
|
5542
|
-
setValid(false);
|
|
5543
|
-
}
|
|
5607
|
+
// When required, an object (with id) has to be selected. Also re-check when
|
|
5608
|
+
// `required` changes, so turning it off clears the error.
|
|
5609
|
+
scope.$watchGroup(['model', 'required'], function () {
|
|
5610
|
+
if (!scope.form) return;
|
|
5611
|
+
const hasObject = !!(scope.model && scope.model.id);
|
|
5612
|
+
scope.form.$setValidity('objectSelected', !scope.required || hasObject);
|
|
5544
5613
|
});
|
|
5545
5614
|
|
|
5546
5615
|
scope.selectRow = function (obj) {
|
|
@@ -5751,6 +5820,7 @@ angular.module('niceElements')
|
|
|
5751
5820
|
debounceTime: '@',
|
|
5752
5821
|
isInline: '=',
|
|
5753
5822
|
help: '@',
|
|
5823
|
+
required: '=',
|
|
5754
5824
|
placement: '@', // Describes the preferred placement of the popper
|
|
5755
5825
|
},
|
|
5756
5826
|
controller: function ($scope, $timeout, $element) {
|
|
@@ -7134,7 +7204,7 @@ angular.module('niceElements')
|
|
|
7134
7204
|
.service('NiceService', function ($rootScope) {
|
|
7135
7205
|
const service = {
|
|
7136
7206
|
name: "Nice elements",
|
|
7137
|
-
version: "1.15.
|
|
7207
|
+
version: "1.15.1",
|
|
7138
7208
|
getHeader: function () {
|
|
7139
7209
|
return {};
|
|
7140
7210
|
},
|
|
@@ -7309,6 +7379,10 @@ angular.module('niceElements').run(['$templateCache', function($templateCache) {
|
|
|
7309
7379
|
" <div class=\"nice-field col-xs-12\" ng-class=\"[fieldWidth ? fieldWidth : 'col-sm-8', { 'nice-disabled': isDisabled }]\">\n" +
|
|
7310
7380
|
" <div class=\"disabled-shield\" ng-if=\"isDisabled\"></div>\n" +
|
|
7311
7381
|
"\n" +
|
|
7382
|
+
" \n" +
|
|
7383
|
+
" <input class=\"hidden-input\" ng-model=\"startDate\" ng-required=\"required\" tabindex=\"-1\">\n" +
|
|
7384
|
+
" <input class=\"hidden-input\" ng-model=\"endDate\" ng-required=\"required\" tabindex=\"-1\">\n" +
|
|
7385
|
+
"\n" +
|
|
7312
7386
|
" <div class=\"nice-calendar-wrapper\">\n" +
|
|
7313
7387
|
" <div class=\"nice-calendar-weeks\">\n" +
|
|
7314
7388
|
" <div class=\"nice-calendar-header\">\n" +
|
|
@@ -7423,10 +7497,15 @@ angular.module('niceElements').run(['$templateCache', function($templateCache) {
|
|
|
7423
7497
|
" 'nice-checkbox-disabled': isDisabled, \n" +
|
|
7424
7498
|
" 'nice-checkbox-left': titleOnLeft\n" +
|
|
7425
7499
|
" }\" ng-click=\"toggle()\">\n" +
|
|
7426
|
-
" <
|
|
7427
|
-
" <
|
|
7428
|
-
"
|
|
7429
|
-
"
|
|
7500
|
+
" <span class=\"nice-checkbox-box\">\n" +
|
|
7501
|
+
" <button type=\"button\" class=\"btn nice-checkbox-checkbox\" ng-disabled=\"isDisabled\">\n" +
|
|
7502
|
+
" <nice-icon ng-if=\"model\" class=\"nice-checkbox-check\" icon=\"icon-check\"></nice-icon>\n" +
|
|
7503
|
+
" <nice-icon ng-if=\"!model && indeterminate\" class=\"nice-checkbox-check\" icon=\"icon-minus\"></nice-icon>\n" +
|
|
7504
|
+
" </button>\n" +
|
|
7505
|
+
"\n" +
|
|
7506
|
+
" \n" +
|
|
7507
|
+
" <input type=\"checkbox\" class=\"hidden-input\" ng-model=\"model\" ng-required=\"required\" tabindex=\"-1\">\n" +
|
|
7508
|
+
" </span>\n" +
|
|
7430
7509
|
" <div class=\"nice-checkbox-info\" ng-transclude>\n" +
|
|
7431
7510
|
" <nice-title text=\"title || niceTitle\" help=\"help\" required=\"required\" description=\"niceDescription\" label-width=\"col-xs-12\"></nice-title>\n" +
|
|
7432
7511
|
" \n" +
|
|
@@ -7544,7 +7623,7 @@ angular.module('niceElements').run(['$templateCache', function($templateCache) {
|
|
|
7544
7623
|
" \n" +
|
|
7545
7624
|
" <div class=\"nice-field col-xs-12\" ng-class=\"fieldWidth ? fieldWidth : 'col-sm-8'\">\n" +
|
|
7546
7625
|
" <div class=\"input-group\">\n" +
|
|
7547
|
-
" <input date-range-picker class=\"form-control date-picker\" type=\"text\" options=\"opts\" ng-model=\"model\">\n" +
|
|
7626
|
+
" <input date-range-picker class=\"form-control date-picker\" type=\"text\" options=\"opts\" ng-model=\"model\" ng-required=\"required\">\n" +
|
|
7548
7627
|
" <span date-range-picker options=\"opts\" ng-model=\"model\" class=\"input-group-addon\">\n" +
|
|
7549
7628
|
" <nice-icon icon=\"icon-calendar\"></nice-icon>\n" +
|
|
7550
7629
|
" </span>\n" +
|
|
@@ -7569,7 +7648,7 @@ angular.module('niceElements').run(['$templateCache', function($templateCache) {
|
|
|
7569
7648
|
"\n" +
|
|
7570
7649
|
" \n" +
|
|
7571
7650
|
" <div class=\"nice-date-button input-group\" ng-class=\"{ 'open': isOpen }\" ng-show=\"!inline\" ng-click=\"toggleOpen()\">\n" +
|
|
7572
|
-
" <input type=\"text\" class=\"form-control\"
|
|
7651
|
+
" <input type=\"text\" class=\"form-control\" ng-model=\"innerDate.value\" placeholder=\"{{ placeholder }}\" ng-required=\"required\" ng-disabled=\"isDisabled\" ng-blur=\"parseTypedDate()\" ng-keydown=\"typedDateKeydown($event)\">\n" +
|
|
7573
7652
|
" <span class=\"input-group-btn\">\n" +
|
|
7574
7653
|
" <button type=\"button\" class=\"btn btn-default btn-right\" ng-disabled=\"isDisabled\" ng-if=\"!(model && nullable)\">\n" +
|
|
7575
7654
|
" <nice-icon icon=\"icon-calendar\"></nice-icon>\n" +
|
|
@@ -7667,6 +7746,9 @@ angular.module('niceElements').run(['$templateCache', function($templateCache) {
|
|
|
7667
7746
|
" </div>\n" +
|
|
7668
7747
|
"\n" +
|
|
7669
7748
|
" \n" +
|
|
7749
|
+
" <input class=\"hidden-input\" ng-model=\"model\" ng-required=\"required\" tabindex=\"-1\">\n" +
|
|
7750
|
+
"\n" +
|
|
7751
|
+
" \n" +
|
|
7670
7752
|
" <div ng-show=\"isOpen\">\n" +
|
|
7671
7753
|
" <nice-dtp model=\"internalDate\" format=\"{{ format }}\" model-format=\"{{ modelFormat }}\" date=\"{{ isTrue(date) }}\" time=\"{{ isTrue(time) }}\" width=\"{{ width }}\" enable-ok-buttons=\"{{ enableOkButtons }}\" lang=\"{{ lang }}\" min-date=\"{{ minDate }}\" max-date=\"{{ maxDate }}\" week-start=\"{{ weekStart }}\" ok-text=\"{{ okText }}\" cancel-text=\"{{ cancelText }}\" closed=\"closeDtp\"></nice-dtp>\n" +
|
|
7672
7754
|
" </div>\n" +
|
|
@@ -8399,7 +8481,7 @@ angular.module('niceElements').run(['$templateCache', function($templateCache) {
|
|
|
8399
8481
|
" \n" +
|
|
8400
8482
|
" <div class=\"nice-field col-xs-12\" ng-class=\"[fieldWidth ? fieldWidth : 'col-sm-8', { 'nice-disabled': isDisabled }]\" click-outside=\"close()\">\n" +
|
|
8401
8483
|
" <div class=\"nice-search-button input-group\" ng-class=\"{ 'disabled': isDisabled }\">\n" +
|
|
8402
|
-
" <input class=\"form-control\" type=\"text\" id=\"{{ id }}\" ng-model=\"model\" placeholder=\"{{ placeholder }}\" ng-disabled=\"isDisabled\" ng-change=\"updateSearch()\" ng-focus=\"onFocus()\" tabindex=\"{{ tabIndex }}\">\n" +
|
|
8484
|
+
" <input class=\"form-control\" type=\"text\" id=\"{{ id }}\" ng-model=\"model\" placeholder=\"{{ placeholder }}\" ng-disabled=\"isDisabled\" ng-change=\"updateSearch()\" ng-focus=\"onFocus()\" ng-required=\"required\" tabindex=\"{{ tabIndex }}\">\n" +
|
|
8403
8485
|
"\n" +
|
|
8404
8486
|
" <button type=\"button\" class=\"btn input-group-addon\" ng-disabled=\"isDisabled\" ng-click=\"buttonClicked()\">\n" +
|
|
8405
8487
|
" <nice-icon ng-show=\"!loading && model != ''\" icon=\"icon-x\"></nice-icon>\n" +
|
|
@@ -10052,6 +10134,9 @@ angular.module('niceElements').run(['$templateCache', function($templateCache) {
|
|
|
10052
10134
|
"\n" +
|
|
10053
10135
|
" \n" +
|
|
10054
10136
|
" <div class=\"nice-field col-xs-12\" ng-class=\"[fieldWidth ? fieldWidth : 'col-sm-8', { 'nice-disabled': isDisabled }]\">\n" +
|
|
10137
|
+
" \n" +
|
|
10138
|
+
" <input type=\"checkbox\" class=\"hidden-input\" ng-model=\"model\" ng-required=\"required\" tabindex=\"-1\">\n" +
|
|
10139
|
+
"\n" +
|
|
10055
10140
|
" <button type=\"button\" class=\"nice-toggle-field\" ng-click=\"toggle()\" ng-disabled=\"isDisabled\">\n" +
|
|
10056
10141
|
" <div class=\"nice-toggle-field-handle\">\n" +
|
|
10057
10142
|
" <nice-icon ng-if=\"showIcons && model\" icon=\"icon-check\"></nice-icon>\n" +
|
|
@@ -10092,7 +10177,7 @@ angular.module('niceElements').run(['$templateCache', function($templateCache) {
|
|
|
10092
10177
|
" </button>\n" +
|
|
10093
10178
|
"\n" +
|
|
10094
10179
|
" \n" +
|
|
10095
|
-
" <input class=\"input-file\" type=\"file\" accept=\"{{ accept }}\" ng-model=\"file\" ng-required=\"required\" ng-disabled=\"isDisabled || loading\">\n" +
|
|
10180
|
+
" <input class=\"input-file\" type=\"file\" accept=\"{{ accept }}\" ng-model=\"file\" ng-required=\"required && !model\" ng-disabled=\"isDisabled || loading\">\n" +
|
|
10096
10181
|
"\n" +
|
|
10097
10182
|
" \n" +
|
|
10098
10183
|
" <div class=\"nice-upload-loading\" ng-if=\"loading\">\n" +
|
|
@@ -10172,6 +10257,9 @@ angular.module('niceElements').run(['$templateCache', function($templateCache) {
|
|
|
10172
10257
|
"\n" +
|
|
10173
10258
|
" \n" +
|
|
10174
10259
|
" <div class=\"nice-field col-xs-12\" ng-class=\"[fieldWidth ? fieldWidth : 'col-sm-8', { 'nice-disabled': isDisabled }]\">\n" +
|
|
10260
|
+
" \n" +
|
|
10261
|
+
" <input class=\"hidden-input\" ng-model=\"model\" ng-required=\"required\" tabindex=\"-1\">\n" +
|
|
10262
|
+
"\n" +
|
|
10175
10263
|
" <div class=\"yesno-wrapper noselect\">\n" +
|
|
10176
10264
|
" <button type=\"button\" class=\"yesno-yes-bg\" ng-click=\"switch()\" tabindex=\"-1\" ng-disabled=\"isDisabled\">{{ yes }}</button>\n" +
|
|
10177
10265
|
" <button type=\"button\" class=\"yesno-no-bg\" ng-click=\"switch()\" tabindex=\"-1\" ng-disabled=\"isDisabled\">{{ no }}</button>\n" +
|