nice-elements 1.6.2 → 1.7.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.
Files changed (50) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/README.md +2 -1
  3. package/bower.json +1 -1
  4. package/dist/nice.js +249 -220
  5. package/dist/nice.min.js +1 -1
  6. package/dist/style.css +247 -91
  7. package/dist/style.css.map +3 -2
  8. package/dist/style.min.css +2 -2
  9. package/package.json +1 -1
  10. package/src/components/nice-calendar/nice-calendar.html +3 -2
  11. package/src/components/nice-calendar/nice-calendar.scss +9 -7
  12. package/src/components/nice-checkbox/nice-checkbox.html +1 -3
  13. package/src/components/nice-checkbox/nice-checkbox.scss +12 -12
  14. package/src/components/nice-choice/nice-choice.html +3 -1
  15. package/src/components/nice-choice/nice-choice.scss +14 -3
  16. package/src/components/nice-date/nice-date.html +7 -8
  17. package/src/components/nice-date/nice-date.js +51 -53
  18. package/src/components/nice-date/nice-date.scss +29 -6
  19. package/src/components/nice-date-input/nice-date-input.html +6 -9
  20. package/src/components/nice-date-input/nice-date-input.js +24 -11
  21. package/src/components/nice-date-range/nice-date-range.html +3 -1
  22. package/src/components/nice-datetime-picker/nice-datetime-picker.html +5 -19
  23. package/src/components/nice-datetime-picker/nice-datetime-picker.scss +1 -1
  24. package/src/components/nice-datetimerange-picker/nice-datetimerange-picker.html +6 -1
  25. package/src/components/nice-datetimerange-picker-2/nice-datetimerange-picker-2.html +5 -3
  26. package/src/components/nice-datetimerange-picker-2/nice-datetimerange-picker-2.js +25 -26
  27. package/src/components/nice-dropdown/nice-dropdown.html +3 -1
  28. package/src/components/nice-dropdown/nice-dropdown.scss +1 -0
  29. package/src/components/nice-dropdown-old/nice-dropdown-old.js +38 -36
  30. package/src/components/nice-dtp/nice-dtp.html +12 -12
  31. package/src/components/nice-dtp/nice-dtp.js +1 -0
  32. package/src/components/nice-help/nice-help.html +2 -1
  33. package/src/components/nice-help/nice-help.scss +7 -0
  34. package/src/components/nice-input/nice-input.html +9 -42
  35. package/src/components/nice-input/nice-input.js +28 -28
  36. package/src/components/nice-input/nice-input.scss +27 -20
  37. package/src/components/nice-number/nice-number.html +6 -2
  38. package/src/components/nice-number/nice-number.scss +15 -3
  39. package/src/components/nice-quantity/nice-quantity.html +6 -2
  40. package/src/components/nice-quantity/nice-quantity.scss +11 -0
  41. package/src/components/nice-search/nice-search.html +9 -20
  42. package/src/components/nice-search2/nice-search2.html +4 -2
  43. package/src/components/nice-time-picker/nice-time-picker.html +21 -27
  44. package/src/components/nice-time-picker/nice-time-picker.scss +11 -32
  45. package/src/components/nice-yesno/nice-yesno.html +2 -2
  46. package/src/components/nice-yesno/nice-yesno.scss +13 -0
  47. package/src/styles/_nice-buttons.scss +22 -9
  48. package/src/styles/_nice-common.scss +64 -16
  49. package/src/styles/_nice.scss +2 -1
  50. package/src/styles/_variables.scss +3 -0
package/dist/nice.js CHANGED
@@ -841,21 +841,29 @@ angular.module('niceElements')
841
841
  isInline: '=',
842
842
  onChange: '&?'
843
843
  },
844
- controller: function ($scope) {
844
+ controller: function ($scope, $timeout) {
845
845
  $scope.formatDate = "DD.MM.YYYY";
846
846
  $scope.formatTime = "HH:mm";
847
- $scope.hours = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23];
848
- $scope.minutes = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59];
847
+ if ($scope.date === undefined) $scope.date = true;
848
+ if ($scope.time === undefined) $scope.time = true;
849
849
  $scope.model = moment($scope.model) || moment().set({ 'second': 0, 'millisecond': 0 });
850
+ $scope.inner = {
851
+ timeModel: angular.copy($scope.model),
852
+ dateModel: angular.copy($scope.model)
853
+ };
850
854
 
851
- $scope.dateChanged = function (date) {
852
- $scope.modelDate = date.format($scope.formatDate);
853
- $scope.handleChange();
855
+ $scope.dateChanged = function () {
856
+ $timeout(function () {
857
+ $scope.modelDate = $scope.inner.dateModel.format($scope.formatDate);
858
+ $scope.handleChange();
859
+ });
854
860
  }
855
861
 
856
- $scope.timeChanged = function (date) {
857
- $scope.modelTime = date.format($scope.formatTime);
858
- $scope.handleChange();
862
+ $scope.timeChanged = function () {
863
+ $timeout(function () {
864
+ $scope.modelTime = $scope.inner.timeModel.format($scope.formatTime);
865
+ $scope.handleChange();
866
+ });
859
867
  }
860
868
 
861
869
  // -------------------- On date change --------------------
@@ -863,13 +871,13 @@ angular.module('niceElements')
863
871
  var newModel = moment($scope.modelDate + " " + $scope.modelTime, $scope.formatDate + " " + $scope.formatTime).seconds(0).milliseconds(0);
864
872
  if (newModel.isValid()) {
865
873
  $scope.model = newModel;
866
- if ($scope.onChange) $scope.onChange({ model: $scope.model });
867
874
  $scope.niceDateInputForm.$setValidity('validDate', true);
868
875
  } else {
869
876
  $scope.model = null;
870
- if ($scope.onChange) $scope.onChange({ model: $scope.model });
871
877
  $scope.niceDateInputForm.$setValidity('validDate', false);
872
878
  }
879
+ if ($scope.onChange) $scope.onChange({ model: $scope.model });
880
+ $scope.niceDateInputForm.$setDirty();
873
881
  }
874
882
 
875
883
  // -------------------- Format model --------------------
@@ -904,6 +912,11 @@ angular.module('niceElements')
904
912
  // -------------------- Watch model --------------------
905
913
  $scope.$watch('model', function () {
906
914
  $scope.formatModel();
915
+ $scope.inner = {
916
+ timeModel: angular.copy($scope.model),
917
+ dateModel: angular.copy($scope.model)
918
+ };
919
+
907
920
  });
908
921
  }
909
922
  }
@@ -996,7 +1009,7 @@ angular.module('niceElements')
996
1009
  */
997
1010
  angular.module('niceElements')
998
1011
 
999
- .directive('niceDate', function() {
1012
+ .directive('niceDate', function () {
1000
1013
  return {
1001
1014
  restrict: 'E',
1002
1015
  replace: true,
@@ -1008,7 +1021,8 @@ angular.module('niceElements')
1008
1021
  fieldWidth: '@', // default: 'col-sm-8', bootstrap classes that defines width of field
1009
1022
  labelWidth: '@', // default: 'col-sm-4', bootstrap classes that defines width of label
1010
1023
  model: '=',
1011
- time: '@',
1024
+ time: '=?',
1025
+ date: '=?',
1012
1026
  help: '@',
1013
1027
  inline: '@',
1014
1028
  maxDate: '=',
@@ -1018,14 +1032,17 @@ angular.module('niceElements')
1018
1032
  isInline: '=',
1019
1033
  onChange: '&?'
1020
1034
  },
1021
- controller: function($scope, $element, $timeout, gettextCatalog) {
1035
+ controller: function ($scope, $element, $timeout, gettextCatalog) {
1022
1036
  $scope.isOpen = false;
1037
+ if ($scope.date == undefined) $scope.date = true;
1038
+ if ($scope.time == undefined) $scope.time = false;
1023
1039
  $scope.hours = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23];
1024
1040
  $scope.minutes = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59];
1025
1041
  $scope.translations = {
1026
1042
  nextMonth: gettextCatalog.getString("Next month", null, "Nice"),
1027
1043
  prevMonth: gettextCatalog.getString("Previous month", null, "Nice"),
1028
1044
  };
1045
+ if (!$scope.model) $scope.model = moment();
1029
1046
  $scope.innerDate = {
1030
1047
  month: 0,
1031
1048
  year: 0,
@@ -1038,18 +1055,18 @@ angular.module('niceElements')
1038
1055
 
1039
1056
  // $scope.weekdays = moment.weekdaysShort(false);
1040
1057
  $scope.weekdays = [
1041
- gettextCatalog.getString("Mon", null, "Nice"),
1042
- gettextCatalog.getString("Tue", null, "Nice"),
1043
- gettextCatalog.getString("Wed", null, "Nice"),
1044
- gettextCatalog.getString("Thu", null, "Nice"),
1045
- gettextCatalog.getString("Fri", null, "Nice"),
1046
- gettextCatalog.getString("Sat", null, "Nice"),
1058
+ gettextCatalog.getString("Mon", null, "Nice"),
1059
+ gettextCatalog.getString("Tue", null, "Nice"),
1060
+ gettextCatalog.getString("Wed", null, "Nice"),
1061
+ gettextCatalog.getString("Thu", null, "Nice"),
1062
+ gettextCatalog.getString("Fri", null, "Nice"),
1063
+ gettextCatalog.getString("Sat", null, "Nice"),
1047
1064
  gettextCatalog.getString("Sun", null, "Nice")
1048
1065
  ];
1049
1066
 
1050
1067
  $scope.years = [];
1051
- var year = moment().year()-100;
1052
- for(var i=0; i<200; i++) {
1068
+ var year = moment().year() - 100;
1069
+ for (var i = 0; i < 200; i++) {
1053
1070
  $scope.years.push(year + i);
1054
1071
  }
1055
1072
 
@@ -1068,20 +1085,13 @@ angular.module('niceElements')
1068
1085
  { value: 11, name: gettextCatalog.getString("December", null, "Nice") }
1069
1086
  ]
1070
1087
 
1071
-
1072
- if(!$scope.model) $scope.model = moment();
1073
-
1074
- if(!$scope.time) $scope.time = false;
1075
- else $scope.time = $scope.time == "true";
1076
-
1077
-
1078
1088
  if ($scope.maxDate) $scope.maxDate = moment($scope.maxDate);
1079
1089
  if ($scope.minDate) $scope.minDate = moment($scope.minDate);
1080
1090
 
1081
-
1091
+
1082
1092
  // Setup popper
1083
1093
  // https://popper.js.org/docs/v2/constructors/
1084
- $scope.setupPopper = function() {
1094
+ $scope.setupPopper = function () {
1085
1095
  var button = $element[0].getElementsByClassName('nice-date-button')[0];
1086
1096
  var tooltip = $element[0].getElementsByClassName('nice-date-dropdown-wrapper')[0];
1087
1097
  $scope.popper = Popper.createPopper(button, tooltip, {
@@ -1104,22 +1114,22 @@ angular.module('niceElements')
1104
1114
 
1105
1115
 
1106
1116
  // ------------------ Time changes ------------------
1107
- $scope.timeChange = function() {
1117
+ $scope.timeChange = function () {
1108
1118
  var selectedDate = angular.copy($scope.model);
1109
1119
  selectedDate = $scope._removeTime(selectedDate);
1110
1120
  selectedDate.hours($scope.innerDate.hour);
1111
1121
  selectedDate.minutes($scope.innerDate.minute);
1112
1122
  $scope.innerDate.value = $scope.formatDate(selectedDate);
1113
-
1114
- $scope.model = selectedDate;
1123
+
1124
+ $scope.model = angular.copy(selectedDate);
1115
1125
  if ($scope.onChange) $scope.onChange({ model: $scope.model });
1116
1126
  $scope.forma.$setDirty();
1117
1127
  };
1118
1128
 
1119
1129
 
1120
1130
  // ------------------ Day was selected ------------------
1121
- $scope.select = function(day) {
1122
- if(!day.isDisabled){
1131
+ $scope.select = function (day) {
1132
+ if (!day.isDisabled) {
1123
1133
  var selectedDate = angular.copy(day.date);
1124
1134
  selectedDate.hours($scope.innerDate.hour);
1125
1135
  selectedDate.minutes($scope.innerDate.minute);
@@ -1140,7 +1150,7 @@ angular.module('niceElements')
1140
1150
 
1141
1151
 
1142
1152
  // ------------------ Set inner date ------------------
1143
- $scope.setInnerDate = function(date) {
1153
+ $scope.setInnerDate = function (date) {
1144
1154
  $scope.innerDate.year = date.year();
1145
1155
  $scope.innerDate.month = date.month();
1146
1156
  $scope.innerDate.date = date;
@@ -1148,14 +1158,14 @@ angular.module('niceElements')
1148
1158
 
1149
1159
 
1150
1160
  // ------------------ Today ------------------
1151
- $scope.today = function() {
1161
+ $scope.today = function () {
1152
1162
  $scope.setInnerDate(moment());
1153
1163
  $scope._buildMonth();
1154
1164
  };
1155
1165
 
1156
1166
 
1157
1167
  // ------------------ Go to next month ------------------
1158
- $scope.next = function() {
1168
+ $scope.next = function () {
1159
1169
  $scope.innerDate.date.add(1, "month");
1160
1170
  $scope.setInnerDate($scope.innerDate.date);
1161
1171
  $scope._buildMonth();
@@ -1163,7 +1173,7 @@ angular.module('niceElements')
1163
1173
 
1164
1174
 
1165
1175
  // ------------------ Go to previous month ------------------
1166
- $scope.previous = function() {
1176
+ $scope.previous = function () {
1167
1177
  $scope.innerDate.date.subtract(1, "month");
1168
1178
  $scope.setInnerDate($scope.innerDate.date);
1169
1179
  $scope._buildMonth();
@@ -1171,7 +1181,7 @@ angular.module('niceElements')
1171
1181
 
1172
1182
 
1173
1183
  // ------------------ Check if dates are equal without time ------------------
1174
- $scope.isSameDay = function(date1, date2){
1184
+ $scope.isSameDay = function (date1, date2) {
1175
1185
  date1 = moment(date1);
1176
1186
  date2 = moment(date2);
1177
1187
  return (
@@ -1182,7 +1192,7 @@ angular.module('niceElements')
1182
1192
  };
1183
1193
 
1184
1194
  // ------------------ Check month ------------------
1185
- $scope.isSameMonth = function(date1, date2){
1195
+ $scope.isSameMonth = function (date1, date2) {
1186
1196
  date1 = moment(date1);
1187
1197
  date2 = moment(date2);
1188
1198
  return (
@@ -1192,12 +1202,12 @@ angular.module('niceElements')
1192
1202
  };
1193
1203
 
1194
1204
 
1195
- $scope.isBetween = function(date1, date2, date3){
1196
- if(!$scope.nextDate){
1205
+ $scope.isBetween = function (date1, date2, date3) {
1206
+ if (!$scope.nextDate) {
1197
1207
  return false;
1198
- } else if($scope.isSameDay(date1, date2) || $scope.isSameDay(date1, date3)){
1208
+ } else if ($scope.isSameDay(date1, date2) || $scope.isSameDay(date1, date3)) {
1199
1209
  return true;
1200
- } else if(date2.isBefore(date3)){
1210
+ } else if (date2.isBefore(date3)) {
1201
1211
  return $scope._removeTime(date1).isBetween(date2, date3);
1202
1212
  } else {
1203
1213
  return $scope._removeTime(date1).isBetween(date3, date2);
@@ -1206,24 +1216,25 @@ angular.module('niceElements')
1206
1216
 
1207
1217
 
1208
1218
  // ------------------ Format date ------------------
1209
- $scope.formatDate = function(date) {
1210
- if($scope.time) return date.format('D.M.YYYY • H:mm');
1219
+ $scope.formatDate = function (date) {
1220
+ if ($scope.time) return date.format('D.M.YYYY • H:mm');
1211
1221
  else return date.format('D.M.YYYY');
1212
1222
  };
1213
1223
 
1214
1224
 
1215
1225
  // ------------------ Remove time from date ------------------
1216
- $scope._removeTime = function(date) {
1226
+ $scope._removeTime = function (date) {
1227
+ if (!date) return date;
1217
1228
  return date.hour(0).minute(0).second(0).millisecond(0);
1218
1229
  };
1219
1230
 
1220
- $scope._removeTimeWithDate = function(date) {
1231
+ $scope._removeTimeWithDate = function (date) {
1221
1232
  return date.date(0).hour(0).minute(0).second(0).millisecond(0);
1222
1233
  };
1223
1234
 
1224
1235
 
1225
1236
  // ------------------ Build month ------------------
1226
- $scope._buildMonth = function() {
1237
+ $scope._buildMonth = function () {
1227
1238
  var done = false;
1228
1239
  var date = angular.copy($scope.innerDate.date).date(0).startOf('week').isoWeekday(1);
1229
1240
  var monthIndex = date.month();
@@ -1242,7 +1253,7 @@ angular.module('niceElements')
1242
1253
 
1243
1254
 
1244
1255
  // ------------------ Build week ------------------
1245
- $scope._buildWeek = function(date) {
1256
+ $scope._buildWeek = function (date) {
1246
1257
  var days = [];
1247
1258
  for (var i = 0; i < 7; i++) {
1248
1259
  var day = {
@@ -1255,9 +1266,9 @@ angular.module('niceElements')
1255
1266
  date: date
1256
1267
  };
1257
1268
 
1258
- if($scope.minDate) day.isDisabled = date.isBefore($scope.minDate);
1259
- if($scope.maxDate) day.isDisabled = date.isAfter($scope.maxDate);
1260
- if($scope.minDate && $scope.maxDate) day.isDisabled = !date.isBetween($scope.minDate, $scope.maxDate);
1269
+ if ($scope.minDate) day.isDisabled = date.isBefore($scope.minDate);
1270
+ if ($scope.maxDate) day.isDisabled = date.isAfter($scope.maxDate);
1271
+ if ($scope.minDate && $scope.maxDate) day.isDisabled = !date.isBetween($scope.minDate, $scope.maxDate);
1261
1272
 
1262
1273
  days.push(day);
1263
1274
  date = date.clone();
@@ -1269,13 +1280,13 @@ angular.module('niceElements')
1269
1280
 
1270
1281
 
1271
1282
  // ------------------ Watch for model change ------------------
1272
- $scope.$watchGroup(["model", 'minDate', 'maxDate', 'nextDate'], function(value) {
1283
+ $scope.$watchGroup(["model", 'minDate', 'maxDate', 'nextDate'], function (value) {
1273
1284
  $scope.boostrap();
1274
1285
  });
1275
-
1286
+
1276
1287
 
1277
1288
  // ------------------ Get time ------------------
1278
- $scope.getTime = function() {
1289
+ $scope.getTime = function () {
1279
1290
  if ($scope.time) {
1280
1291
  $scope.innerDate.hour = moment($scope.model).hours();
1281
1292
  $scope.innerDate.minute = moment($scope.model).minutes();
@@ -1289,14 +1300,14 @@ angular.module('niceElements')
1289
1300
 
1290
1301
 
1291
1302
  // ------------------ Bootstrap ------------------
1292
- $scope.boostrap = function() {
1303
+ $scope.boostrap = function () {
1293
1304
  $scope.setInnerDate(moment($scope.model));
1294
1305
  $scope.getTime();
1295
-
1296
- if(!$scope.time) {
1306
+
1307
+ if (!$scope.time) {
1297
1308
  $scope.model = $scope._removeTime($scope.model);
1298
1309
  }
1299
-
1310
+
1300
1311
  $scope.innerDate.value = $scope.formatDate(moment($scope.model));
1301
1312
  $scope._buildMonth();
1302
1313
  };
@@ -1305,10 +1316,10 @@ angular.module('niceElements')
1305
1316
 
1306
1317
 
1307
1318
  // ------------------ Toggle open ------------------
1308
- $scope.toggleOpen = function() {
1319
+ $scope.toggleOpen = function () {
1309
1320
  if (!$scope.isDisabled) {
1310
1321
  $scope.isOpen = !$scope.isOpen;
1311
- $timeout(function() {
1322
+ $timeout(function () {
1312
1323
  if ($scope.popper) $scope.popper.update();
1313
1324
  })
1314
1325
  }
@@ -1413,14 +1424,14 @@ angular.module('niceElements').directive('niceDatetimePicker', function () {
1413
1424
  * # niceDatetimerangePicker2
1414
1425
  */
1415
1426
  angular.module('niceElements')
1416
- .directive('niceDatetimerangePicker2', function() {
1427
+ .directive('niceDatetimerangePicker2', function () {
1417
1428
  return {
1418
1429
  scope: {
1419
1430
  startDate: '=', // binding model
1420
1431
  endDate: '=', // binding model
1421
1432
  formatString: '@', // default: 'D.M.YYYY • H:mm', format for input label string
1422
1433
  modelFormat: '@',
1423
- time: '@', // default: false, is time picker enabled?
1434
+ time: '=', // default: false, is time picker enabled?
1424
1435
  minDate: '@', // default: undefined
1425
1436
  maxDate: '@', // default: undefined
1426
1437
  title: '@', // default: ''
@@ -1442,25 +1453,24 @@ angular.module('niceElements')
1442
1453
 
1443
1454
 
1444
1455
  // Set defaults
1445
- if(!$scope.time) $scope.time = false;
1446
- else $scope.time = $scope.time == "true";
1456
+ if ($scope.time == undefined) $scope.time = false;
1447
1457
 
1448
1458
 
1449
1459
  // Set format string
1450
- if(!$scope.formatString) {
1451
- if($scope.time) $scope.formatString = 'D.M.YYYY • H:mm';
1460
+ if (!$scope.formatString) {
1461
+ if ($scope.time) $scope.formatString = 'D.M.YYYY • H:mm';
1452
1462
  else $scope.formatString = 'D.M.YYYY';
1453
1463
  }
1454
1464
 
1455
1465
  // Set start date
1456
- if(!$scope.startDate) {
1466
+ if (!$scope.startDate) {
1457
1467
  $scope.startDate = moment();
1458
1468
  } else {
1459
1469
  $scope.model.innerStartDate = angular.copy($scope.startDate);
1460
1470
  }
1461
1471
 
1462
1472
  // Set end date
1463
- if(!$scope.endDate) {
1473
+ if (!$scope.endDate) {
1464
1474
  $scope.endDate = moment();
1465
1475
  } else {
1466
1476
  $scope.model.innerEndDate = angular.copy($scope.endDate);
@@ -1469,7 +1479,7 @@ angular.module('niceElements')
1469
1479
 
1470
1480
  // Setup popper
1471
1481
  // https://popper.js.org/docs/v2/constructors/
1472
- $scope.setupPopper = function() {
1482
+ $scope.setupPopper = function () {
1473
1483
  var button = $element[0].getElementsByClassName('nice-daterange-picker-button')[0];
1474
1484
  var tooltip = $element[0].getElementsByClassName('nice-daterange-picker-wrapper')[0];
1475
1485
  $scope.popper = Popper.createPopper(button, tooltip, {
@@ -1485,18 +1495,18 @@ angular.module('niceElements')
1485
1495
  ],
1486
1496
  });
1487
1497
  };
1488
-
1498
+
1489
1499
  $timeout(function () {
1490
1500
  $scope.setupPopper();
1491
1501
  });
1492
1502
 
1493
1503
 
1494
- $scope.format = function(){
1504
+ $scope.format = function () {
1495
1505
  $scope.modelFormat = $scope.startDate.format($scope.formatString) + " - " + $scope.endDate.format($scope.formatString);
1496
1506
  };
1497
1507
 
1498
1508
 
1499
- $scope.open = function() {
1509
+ $scope.open = function () {
1500
1510
  if (!$scope.isDisabled) {
1501
1511
  $scope.isOpen = true;
1502
1512
  $scope.popper.update();
@@ -1504,14 +1514,14 @@ angular.module('niceElements')
1504
1514
  };
1505
1515
 
1506
1516
 
1507
- $scope.close = function() {
1517
+ $scope.close = function () {
1508
1518
  $scope.model.innerStartDate = angular.copy($scope.startDate);
1509
1519
  $scope.model.innerEndDate = angular.copy($scope.endDate);
1510
1520
  $scope.isOpen = false;
1511
1521
  };
1512
1522
 
1513
1523
 
1514
- $scope.confirm = function() {
1524
+ $scope.confirm = function () {
1515
1525
  $scope.startDate = angular.copy($scope.model.innerStartDate);
1516
1526
  $scope.endDate = angular.copy($scope.model.innerEndDate);
1517
1527
  if ($scope.onChange) $scope.onChange({ startDate: $scope.startDate, endDate: $scope.endDate });
@@ -1519,58 +1529,58 @@ angular.module('niceElements')
1519
1529
  };
1520
1530
 
1521
1531
 
1522
- $scope.selectToday = function(){
1532
+ $scope.selectToday = function () {
1523
1533
  $scope.model.innerStartDate = moment().startOf('day');
1524
1534
  $scope.model.innerEndDate = moment().endOf('day');
1525
1535
  };
1526
1536
 
1527
1537
 
1528
- $scope.selectLastNDays = function(days){
1538
+ $scope.selectLastNDays = function (days) {
1529
1539
  $scope.model.innerStartDate = moment().subtract(days, 'days').startOf('day');
1530
1540
  $scope.model.innerEndDate = moment().endOf('day');
1531
1541
  };
1532
1542
 
1533
1543
 
1534
- $scope.selectLastMonth = function(){
1544
+ $scope.selectLastMonth = function () {
1535
1545
  $scope.model.innerStartDate = moment().subtract(1, 'months').startOf('month').startOf('date');
1536
1546
  $scope.model.innerEndDate = moment().subtract(1, 'months').endOf('month').endOf('date');
1537
1547
  };
1538
1548
 
1539
1549
 
1540
- $scope.selectThisMonth = function(){
1550
+ $scope.selectThisMonth = function () {
1541
1551
  $scope.model.innerStartDate = moment().startOf('month').startOf('date');
1542
1552
  $scope.model.innerEndDate = moment().endOf('month').endOf('date');
1543
1553
  };
1544
1554
 
1545
1555
 
1546
1556
  // ------------------ Remove time from date ------------------
1547
- $scope._removeTime = function(date) {
1557
+ $scope._removeTime = function (date) {
1548
1558
  return date.hour(0).minute(0).second(0).millisecond(0);
1549
1559
  };
1550
1560
 
1551
1561
 
1552
- $scope.dateChanged = function() {
1553
- $timeout(function() {
1562
+ $scope.dateChanged = function () {
1563
+ $timeout(function () {
1554
1564
  if ($scope.model.innerStartDate && $scope.model.innerEndDate) {
1555
1565
  // Check if start date is after end date
1556
1566
  if ($scope.model.innerStartDate.isAfter($scope.model.innerEndDate)) {
1557
1567
  var temp = angular.copy($scope.model.innerStartDate);
1558
- $scope.model.innerStartDate = angular.copy($scope.model.innerEndDate);
1559
- $scope.model.innerEndDate = temp;
1568
+ $scope.model.innerStartDate = angular.copy($scope.model.innerEndDate);
1569
+ $scope.model.innerEndDate = temp;
1560
1570
  }
1561
1571
 
1562
1572
  // Check if end date is before start date
1563
1573
  if ($scope.model.innerEndDate.isBefore($scope.model.innerStartDate)) {
1564
1574
  var temp = angular.copy($scope.model.innerStartDate);
1565
- $scope.model.innerStartDate = angular.copy($scope.model.innerEndDate);
1566
- $scope.model.innerEndDate = temp;
1575
+ $scope.model.innerStartDate = angular.copy($scope.model.innerEndDate);
1576
+ $scope.model.innerEndDate = temp;
1567
1577
  }
1568
1578
  }
1569
1579
  });
1570
1580
  }
1571
1581
 
1572
1582
 
1573
- $scope.$watchGroup(["startDate", "endDate"], function() {
1583
+ $scope.$watchGroup(["startDate", "endDate"], function () {
1574
1584
  $scope.model.innerStartDate = angular.copy($scope.startDate);
1575
1585
  $scope.model.innerEndDate = angular.copy($scope.endDate);
1576
1586
  $scope.format();
@@ -1986,13 +1996,15 @@ angular.module('niceElements')
1986
1996
  isInline: '=',
1987
1997
  onChange: '&?'
1988
1998
  },
1989
- controller: function($scope, $element, gettextCatalog) {
1999
+ controller: function ($scope, $element, gettextCatalog) {
2000
+ console.warn("[NICE ELEMENTS] nice-dropdown-old component is deprecated!");
2001
+
1990
2002
  if (!$scope.objValue) { $scope.objValue = 'value'; }
1991
2003
  if (!$scope.objKey) { $scope.objKey = 'id'; }
1992
2004
  if (!$scope.list) { $scope.list = []; }
1993
2005
  if (!$scope.noOptionsText) { $scope.noOptionsText = gettextCatalog.getString("No options", null, "Nice"); }
1994
- if(!$scope.addButtonFunction) { $scope.addButtonFunction = null; }
1995
- if(!$scope.listenKeydown) { $scope.listenKeydown = false; }
2006
+ if (!$scope.addButtonFunction) { $scope.addButtonFunction = null; }
2007
+ if (!$scope.listenKeydown) { $scope.listenKeydown = false; }
1996
2008
  $scope.valid = $scope.formDropdown;
1997
2009
 
1998
2010
 
@@ -2007,13 +2019,13 @@ angular.module('niceElements')
2007
2019
  $scope.id = Math.random().toString(36).substring(7);
2008
2020
 
2009
2021
  $scope.isOpen = false;
2010
- $scope.toggle = function(){ $scope.isOpen = !$scope.isOpen; };
2011
- $scope.close = function(){ $scope.isOpen = false; };
2012
- $scope.open = function(){ $scope.isOpen = true; };
2022
+ $scope.toggle = function () { $scope.isOpen = !$scope.isOpen; };
2023
+ $scope.close = function () { $scope.isOpen = false; };
2024
+ $scope.open = function () { $scope.isOpen = true; };
2013
2025
 
2014
2026
 
2015
2027
  // ----------------------------------- Get filter -----------------------------------
2016
- var getFilter = function(item){
2028
+ var getFilter = function (item) {
2017
2029
  // Create filter for finding object by objValue with _.where()
2018
2030
  var filter = {};
2019
2031
  if (item.hasOwnProperty($scope.objKey))
@@ -2025,13 +2037,13 @@ angular.module('niceElements')
2025
2037
 
2026
2038
 
2027
2039
  // ----------------------------------- Set internal list -----------------------------------
2028
- var _set_internal_list = function(){
2040
+ var _set_internal_list = function () {
2029
2041
  $scope.internalList = angular.copy($scope.list);
2030
2042
  };
2031
2043
 
2032
2044
 
2033
2045
  // ----------------------------------- Add null object to internal list -----------------------------------
2034
- var _add_null_object_to_internal = function(){
2046
+ var _add_null_object_to_internal = function () {
2035
2047
  if ($scope.nullable && !$scope.multiple) {
2036
2048
  var nullObj = {};
2037
2049
  nullObj[$scope.objKey] = null;
@@ -2042,7 +2054,7 @@ angular.module('niceElements')
2042
2054
 
2043
2055
 
2044
2056
  // ----------------------------------- Get selected object -----------------------------------
2045
- var _get_selected_object = function(selected){
2057
+ var _get_selected_object = function (selected) {
2046
2058
  if (!selected) return null;
2047
2059
  if ($scope.selectedIsObj) {
2048
2060
  return selected;
@@ -2053,12 +2065,12 @@ angular.module('niceElements')
2053
2065
 
2054
2066
 
2055
2067
  // ----------------------------------- Init -----------------------------------
2056
- var _set_internal_selected_one = function(selected){
2068
+ var _set_internal_selected_one = function (selected) {
2057
2069
  var obj = {};
2058
2070
 
2059
2071
  var selectedObj = _get_selected_object(selected);
2060
2072
  // console.log('_set_internal_selected_one', selected, selectedObj);
2061
- if(selectedObj && _.find($scope.internalList, getFilter(selected))){
2073
+ if (selectedObj && _.find($scope.internalList, getFilter(selected))) {
2062
2074
  obj = selectedObj;
2063
2075
  } else {
2064
2076
  obj = $scope.internalList[0];
@@ -2069,7 +2081,7 @@ angular.module('niceElements')
2069
2081
 
2070
2082
 
2071
2083
  // ----------------------------------- Get selected objects -----------------------------------
2072
- var _get_selected_objects = function(selected){
2084
+ var _get_selected_objects = function (selected) {
2073
2085
  if (!selected)
2074
2086
  return null;
2075
2087
 
@@ -2085,9 +2097,9 @@ angular.module('niceElements')
2085
2097
 
2086
2098
 
2087
2099
  // ----------------------------------- Set internal selected multiple -----------------------------------
2088
- var _set_internal_selected_multiple = function(item){
2100
+ var _set_internal_selected_multiple = function (item) {
2089
2101
  var _selected_objects = _get_selected_objects(item);
2090
- if (_selected_objects){
2102
+ if (_selected_objects) {
2091
2103
  $scope.internalSelected = _selected_objects;
2092
2104
  _set_model($scope.internalSelected);
2093
2105
  } else {
@@ -2098,21 +2110,21 @@ angular.module('niceElements')
2098
2110
 
2099
2111
 
2100
2112
  // ----------------------------------- Set model -----------------------------------
2101
- var _set_model = function(value){
2113
+ var _set_model = function (value) {
2102
2114
  var _new = angular.copy($scope.model);
2103
2115
 
2104
- if(!$scope.multiple){
2105
- if (value[$scope.objKey]==null){
2116
+ if (!$scope.multiple) {
2117
+ if (value[$scope.objKey] == null) {
2106
2118
  _new = null;
2107
2119
  } else {
2108
- if ($scope.selectedIsObj){
2120
+ if ($scope.selectedIsObj) {
2109
2121
  _new = value;
2110
2122
  } else {
2111
2123
  _new = value[$scope.objKey];
2112
2124
  }
2113
2125
  }
2114
2126
  } else {
2115
- if ($scope.selectedIsObj){
2127
+ if ($scope.selectedIsObj) {
2116
2128
  _new = value;
2117
2129
  } else {
2118
2130
  _new = _.map(value, function (val) {
@@ -2122,7 +2134,7 @@ angular.module('niceElements')
2122
2134
  }
2123
2135
 
2124
2136
  // update model only if it is changed
2125
- if (!_.isEqual(_new, $scope.model)){
2137
+ if (!_.isEqual(_new, $scope.model)) {
2126
2138
  $scope.model = _new;
2127
2139
  if ($scope.onChange) $scope.onChange({ model: $scope.model });
2128
2140
  }
@@ -2130,11 +2142,11 @@ angular.module('niceElements')
2130
2142
 
2131
2143
 
2132
2144
  // ----------------------------------- Init -----------------------------------
2133
- var init = function() {
2145
+ var init = function () {
2134
2146
  _set_internal_list();
2135
2147
  _add_null_object_to_internal();
2136
2148
 
2137
- if($scope.multiple && $scope.model){
2149
+ if ($scope.multiple && $scope.model) {
2138
2150
  if ($scope.internalSelected) {
2139
2151
  // remove already selected but not in list - this happens when list changes from outside
2140
2152
  _set_internal_selected_multiple(_.filter($scope.internalSelected, function (obj) {
@@ -2146,7 +2158,7 @@ angular.module('niceElements')
2146
2158
  }
2147
2159
 
2148
2160
  // Set internalSelected
2149
- if($scope.internalList && $scope.internalList.length>0){
2161
+ if ($scope.internalList && $scope.internalList.length > 0) {
2150
2162
  $scope.emptyList = false;
2151
2163
 
2152
2164
  if ($scope.multiple) {
@@ -2155,7 +2167,7 @@ angular.module('niceElements')
2155
2167
  _set_internal_selected_one($scope.model);
2156
2168
  }
2157
2169
 
2158
- if($scope.formDropdown && $scope.required){
2170
+ if ($scope.formDropdown && $scope.required) {
2159
2171
  $scope.formDropdown.$setValidity('required', true);
2160
2172
  }
2161
2173
  } else {
@@ -2166,7 +2178,7 @@ angular.module('niceElements')
2166
2178
  sel[$scope.objValue] = $scope.noOptionsText;
2167
2179
  $scope.internalList = [sel];
2168
2180
 
2169
- if($scope.formDropdown && $scope.required){
2181
+ if ($scope.formDropdown && $scope.required) {
2170
2182
  $scope.formDropdown.$setValidity('required', false); // Form is not valid because dropdown is empty and required
2171
2183
  }
2172
2184
 
@@ -2180,12 +2192,12 @@ angular.module('niceElements')
2180
2192
 
2181
2193
 
2182
2194
  // ----------------------------------- Is Item selected -----------------------------------
2183
- $scope.isItemSelected = function(item){
2195
+ $scope.isItemSelected = function (item) {
2184
2196
  if (!$scope.internalSelected) return false;
2185
2197
 
2186
2198
  // Which item is selected
2187
2199
  if ($scope.multiple) {
2188
- return _.where($scope.internalSelected, {'id':item.id}).length > 0;
2200
+ return _.where($scope.internalSelected, { 'id': item.id }).length > 0;
2189
2201
  } else {
2190
2202
  return $scope.internalSelected[$scope.objKey] == item[$scope.objKey];
2191
2203
  }
@@ -2193,12 +2205,12 @@ angular.module('niceElements')
2193
2205
 
2194
2206
 
2195
2207
  // ----------------------------------- Item clicked -----------------------------------
2196
- $scope.clicked = function(item){
2208
+ $scope.clicked = function (item) {
2197
2209
  $scope.formDropdown.$setDirty();
2198
- if($scope.multiple){
2210
+ if ($scope.multiple) {
2199
2211
  // This actually toggles selection
2200
2212
  var _current = angular.copy($scope.internalSelected);
2201
- if(!_.find(_current, getFilter(item))){
2213
+ if (!_.find(_current, getFilter(item))) {
2202
2214
  _current.push(item);
2203
2215
  } else {
2204
2216
  _current = _.reject(_current, getFilter(item[$scope.objKey]));
@@ -2213,7 +2225,7 @@ angular.module('niceElements')
2213
2225
 
2214
2226
 
2215
2227
  // ----------------------------------- Get label -----------------------------------
2216
- $scope.getLabel = function(item){
2228
+ $scope.getLabel = function (item) {
2217
2229
  if (item) {
2218
2230
  return item[$scope.objValue];
2219
2231
  } else {
@@ -2236,14 +2248,14 @@ angular.module('niceElements')
2236
2248
  var _new_model_object = _get_selected_objects(value_new);
2237
2249
  }
2238
2250
 
2239
- if (!_.isEqual(_new_model_object, $scope.internalSelected)){
2251
+ if (!_.isEqual(_new_model_object, $scope.internalSelected)) {
2240
2252
  init();
2241
2253
  }
2242
2254
  });
2243
2255
 
2244
2256
 
2245
2257
  // ----------------------------------- Listen keydown -----------------------------------
2246
- $scope.bindKeypress = function(){
2258
+ $scope.bindKeypress = function () {
2247
2259
  if ($scope.listenKeydown) {
2248
2260
  $element.bind('keyup', function (e) {
2249
2261
  // bind to keypress events if dropdown list is opened
@@ -2270,8 +2282,8 @@ angular.module('niceElements')
2270
2282
  }
2271
2283
  };
2272
2284
 
2273
- $scope.unbindKeypress = function(){
2274
- $element.off('keyup', function (e) {});
2285
+ $scope.unbindKeypress = function () {
2286
+ $element.off('keyup', function (e) { });
2275
2287
  };
2276
2288
 
2277
2289
  }
@@ -2703,6 +2715,7 @@ angular.module('niceElements')
2703
2715
  },
2704
2716
  templateUrl: 'src/components/nice-dtp/nice-dtp.html',
2705
2717
  controller: function ($scope, $element, $attrs, gettextCatalog) {
2718
+ console.warn("[NICE ELEMENTS] nice-dtp component is deprecated!");
2706
2719
 
2707
2720
  // default parameters
2708
2721
  var params = {
@@ -3628,7 +3641,7 @@ angular.module('niceElements')
3628
3641
  attrs.required = attrs.required === 'true';
3629
3642
  //attrs.required = angular.isDefined(attrs.required);
3630
3643
 
3631
- if(!scope.textArea) {
3644
+ if (!scope.textArea) {
3632
3645
  scope.elementType = "input";
3633
3646
  } else {
3634
3647
  scope.elementType = "textarea";
@@ -3636,9 +3649,7 @@ angular.module('niceElements')
3636
3649
 
3637
3650
  if (scope.isFocused) {
3638
3651
  var input = element[0].getElementsByTagName(scope.elementType)[0];
3639
- if (input) {
3640
- input.focus();
3641
- }
3652
+ if (input) input.focus();
3642
3653
  }
3643
3654
 
3644
3655
  // Set internal type
@@ -3667,8 +3678,9 @@ angular.module('niceElements')
3667
3678
 
3668
3679
  if (angular.isDefined(attrs.minDecimalsCutZeros) && attrs.type == 'number') {
3669
3680
  scope.model = Number(scope.model);
3670
- if (scope.model.toString().split('.').length < 2 || scope.model.toString().split('.')[1].length < parseInt(attrs.minDecimalsCutZeros))
3671
- scope.model = (Number(scope.model)).toFixed(parseInt(attrs.minDecimalsCutZeros));
3681
+ if (scope.model.toString().split('.').length < 2 || scope.model.toString().split('.')[1].length < parseInt(attrs.minDecimalsCutZeros)) {
3682
+ scope.model = Number((Number(scope.model)).toFixed(parseInt(attrs.minDecimalsCutZeros)));
3683
+ }
3672
3684
  }
3673
3685
 
3674
3686
  if (angular.isDefined(scope.regex) && scope.regex != '') {
@@ -3687,40 +3699,41 @@ angular.module('niceElements')
3687
3699
  if (scope.onChange) scope.onChange({ model: scope.model });
3688
3700
  }
3689
3701
  } else {
3702
+ scope.model = scope.internalModel;
3690
3703
  if (scope.onChange) scope.onChange({ model: scope.model });
3691
3704
  }
3692
3705
  });
3693
- },
3694
-
3695
- controller: function ($scope) {
3696
- $scope.id = Math.random().toString(36).substring(7);
3697
-
3698
- $scope.keypress = function (event) {
3699
- if ($scope.type == "number" || $scope.type == "integer") {
3700
- if (event.charCode == 46 || event.charCode == 44) { // Handle "." and "," key (only one allowed)
3701
- if ($scope.type == "number") {
3702
- if (String($scope.model).indexOf(".") >= 0) {
3703
- event.preventDefault();
3704
- return false;
3705
- }
3706
- } else {
3707
- event.preventDefault();
3708
- return false;
3709
- }
3710
- } else if (event.charCode == 45) {
3711
- if (String($scope.model).indexOf("-") >= 0) {
3706
+ },
3707
+
3708
+ controller: function ($scope) {
3709
+ $scope.id = Math.random().toString(36).substring(7);
3710
+
3711
+ $scope.keypress = function (event) {
3712
+ if ($scope.type == "number" || $scope.type == "integer") {
3713
+ if (event.charCode == 46 || event.charCode == 44) { // Handle "." and "," key (only one allowed)
3714
+ if ($scope.type == "number") {
3715
+ if (String($scope.model).indexOf(".") >= 0) {
3712
3716
  event.preventDefault();
3713
3717
  return false;
3714
3718
  }
3715
- } else if ((event.charCode >= 48 && event.charCode <= 58) || event.charCode == 0) { // Allow only numbers
3716
- return true;
3717
- } else { // Prevent everything else
3719
+ } else {
3718
3720
  event.preventDefault();
3719
3721
  return false;
3720
3722
  }
3723
+ } else if (event.charCode == 45) {
3724
+ if (String($scope.model).indexOf("-") >= 0) {
3725
+ event.preventDefault();
3726
+ return false;
3727
+ }
3728
+ } else if ((event.charCode >= 48 && event.charCode <= 58) || event.charCode == 0) { // Allow only numbers
3729
+ return true;
3730
+ } else { // Prevent everything else
3731
+ event.preventDefault();
3732
+ return false;
3721
3733
  }
3722
- };
3723
- }
3734
+ }
3735
+ };
3736
+ }
3724
3737
  };
3725
3738
  });
3726
3739
 
@@ -5484,8 +5497,8 @@ angular.module('niceElements').run(['$templateCache', function($templateCache) {
5484
5497
  "<select title=\"{{ 'Select start time' | translate:'Nice' }}\" class=\"time-picker-minute\" ng-model=\"startDateMinute\" ng-change=\"startMinuteChange(startDateMinute)\" ng-options=\"minute for minute in minutes\">\n" +
5485
5498
  "</select>\n" +
5486
5499
  "</div>\n" +
5487
- "<div class=\"time-picket-icon\">\n" +
5488
- "<i class=\"fa fa-clock-o\"></i>\n" +
5500
+ "<div class=\"time-picker-icon\">\n" +
5501
+ "<nice-icon icon=\"icon-clock\"></nice-icon>\n" +
5489
5502
  "</div>\n" +
5490
5503
  "<div class=\"time-picker\">\n" +
5491
5504
  "<select title=\"{{ 'Select end time' | translate:'Nice' }}\" class=\"time-picker-hour\" ng-model=\"endDateHour\" ng-change=\"endHourChange(endDateHour)\" ng-options=\"hour for hour in hours\">\n" +
@@ -5516,9 +5529,7 @@ angular.module('niceElements').run(['$templateCache', function($templateCache) {
5516
5529
  $templateCache.put('src/components/nice-checkbox/nice-checkbox.html',
5517
5530
  "<div class=\"nice-component nice-checkbox\" ng-class=\"{ 'checked': model, 'margin-bottom-0' : noMargin }\" ng-click=\"toggle()\">\n" +
5518
5531
  "<button class=\"btn checkbox\">\n" +
5519
- "<svg class=\"check\" viewBox=\"-281 373 48 48\">\n" +
5520
- "<path class=\"check-stroke\" d=\"M-273.2,398.2l10,9.9 l22.4-22.3\"></path>\n" +
5521
- "</svg>\n" +
5532
+ "<nice-icon class=\"check\" icon=\"icon-check\"></nice-icon>\n" +
5522
5533
  "</button>\n" +
5523
5534
  "<div ng-if=\"title\" class=\"message\">{{ title }}</div>\n" +
5524
5535
  "</div>"
@@ -5535,7 +5546,9 @@ angular.module('niceElements').run(['$templateCache', function($templateCache) {
5535
5546
  "<div class=\"nice-field col-xs-12\" ng-class=\"fieldWidth ? fieldWidth : 'col-sm-8'\">\n" +
5536
5547
  "<ul class=\"list-unstyled\" ng-class=\"{ 'disabled': isDisabled }\">\n" +
5537
5548
  "<li ng-repeat=\"item in internalList\" ng-class=\"{ 'selected' : isItemSelected(item) }\" ng-click=\"toggle(item)\">\n" +
5538
- "<button class=\"choice-checkbox\" ng-class=\"{'circle' : !multiple }\"><i class=\"fa fa-check\"></i></button>\n" +
5549
+ "<button class=\"choice-checkbox\" ng-class=\"{'circle' : !multiple }\">\n" +
5550
+ "<nice-icon icon=\"icon-check\"></nice-icon>\n" +
5551
+ "</button>\n" +
5539
5552
  "<div ng-transclude class=\"choice-label\">{{ getLabel(item) }}</div>\n" +
5540
5553
  "</li>\n" +
5541
5554
  "</ul>\n" +
@@ -5568,8 +5581,8 @@ angular.module('niceElements').run(['$templateCache', function($templateCache) {
5568
5581
  "<nice-help class=\"nice-title-help\" ng-if=\"help\" text=\"{{ help }}\"></nice-help>\n" +
5569
5582
  "</div>\n" +
5570
5583
  "<div class=\"nice-field col-xs-12\" ng-class=\"[fieldWidth ? fieldWidth : 'col-sm-8', { 'nice-disabled': isDisabled }]\">\n" +
5571
- "<div class=\"input-group nice-date-input\" ng-class=\"{ 'has-warning': !disabled && niceDateInputForm.$invalid && niceDateInputForm.$dirty }\">\n" +
5572
- "<input type=\"text\" class=\"form-control\" ng-model=\"modelDate\" ng-blur=\"dateBlur()\" ng-disabled=\"isDisabled\">\n" +
5584
+ "<div class=\"input-group nice-date-input\" ng-show=\"date\" ng-class=\"{ 'has-warning': !disabled && niceDateInputForm.$invalid && niceDateInputForm.$dirty }\">\n" +
5585
+ "<input type=\"text\" class=\"form-control\" ng-model=\"modelDate\" ng-blur=\"dateBlur($event)\" ng-disabled=\"isDisabled\">\n" +
5573
5586
  "<nice-popup placement=\"bottom\">\n" +
5574
5587
  "<nice-popup-target>\n" +
5575
5588
  "<button class=\"input-group-addon btn btn-default\" tabindex=\"-1\">\n" +
@@ -5577,12 +5590,12 @@ angular.module('niceElements').run(['$templateCache', function($templateCache) {
5577
5590
  "</button>\n" +
5578
5591
  "</nice-popup-target>\n" +
5579
5592
  "<nice-popup-content>\n" +
5580
- "<nice-date is-inline=\"true\" inline=\"true\" model=\"model\" on-change=\"dateChanged(model)\" no-margin=\"true\"></nice-date>\n" +
5593
+ "<nice-date is-inline=\"true\" inline=\"true\" model=\"inner.dateModel\" on-change=\"dateChanged()\" no-margin=\"true\"></nice-date>\n" +
5581
5594
  "</nice-popup-content>\n" +
5582
5595
  "</nice-popup>\n" +
5583
5596
  "</div>\n" +
5584
- "<div class=\"input-group nice-time-input\" ng-class=\"{ 'has-warning': !disabled && niceDateInputForm.$invalid && niceDateInputForm.$dirty }\">\n" +
5585
- "<input type=\"text\" class=\"form-control\" ng-model=\"modelTime\" ng-blur=\"timeBlur()\" ng-disabled=\"isDisabled\">\n" +
5597
+ "<div class=\"input-group nice-time-input\" ng-show=\"time\" ng-class=\"{ 'has-warning': !disabled && niceDateInputForm.$invalid && niceDateInputForm.$dirty }\">\n" +
5598
+ "<input type=\"text\" class=\"form-control\" ng-model=\"modelTime\" ng-blur=\"timeBlur($event)\" ng-disabled=\"isDisabled\">\n" +
5586
5599
  "<nice-popup placement=\"bottom\">\n" +
5587
5600
  "<nice-popup-target>\n" +
5588
5601
  "<button class=\"input-group-addon btn btn-default\" tabindex=\"-1\">\n" +
@@ -5590,9 +5603,7 @@ angular.module('niceElements').run(['$templateCache', function($templateCache) {
5590
5603
  "</button>\n" +
5591
5604
  "</nice-popup-target>\n" +
5592
5605
  "<nice-popup-content>\n" +
5593
- "<div class=\"dates\">\n" +
5594
- "<div class=\"date\"></div>\n" +
5595
- "</div>\n" +
5606
+ "<nice-date is-inline=\"true\" inline=\"true\" model=\"inner.timeModel\" on-change=\"timeChanged()\" time=\"true\" date=\"false\" no-margin=\"true\"></nice-date>\n" +
5596
5607
  "</nice-popup-content>\n" +
5597
5608
  "</nice-popup>\n" +
5598
5609
  "</div>\n" +
@@ -5612,7 +5623,9 @@ angular.module('niceElements').run(['$templateCache', function($templateCache) {
5612
5623
  "<div class=\"nice-field col-xs-12\" ng-class=\"fieldWidth ? fieldWidth : 'col-sm-8'\">\n" +
5613
5624
  "<div class=\"input-group\">\n" +
5614
5625
  "<input date-range-picker class=\"form-control date-picker\" type=\"text\" options=\"opts\" ng-model=\"model\">\n" +
5615
- "<span date-range-picker options=\"opts\" ng-model=\"model\" class=\"input-group-addon\"><i class=\"fa fa-calendar\"></i></span>\n" +
5626
+ "<span date-range-picker options=\"opts\" ng-model=\"model\" class=\"input-group-addon\">\n" +
5627
+ "<nice-icon icon=\"icon-calendar\"></nice-icon>\n" +
5628
+ "</span>\n" +
5616
5629
  "</div>\n" +
5617
5630
  "</div>\n" +
5618
5631
  "</div>\n" +
@@ -5633,12 +5646,12 @@ angular.module('niceElements').run(['$templateCache', function($templateCache) {
5633
5646
  "<div class=\"nice-date-button input-group\" ng-class=\"{ 'open': isOpen }\" ng-show=\"!inline\" ng-click=\"toggleOpen()\">\n" +
5634
5647
  "<input type=\"text\" class=\"form-control\" value=\"{{ model | niceDate:time }}\" readonly=\"readonly\">\n" +
5635
5648
  "<span class=\"input-group-addon clickable\">\n" +
5636
- "<i class=\"fa fa-calendar\"></i>\n" +
5649
+ "<nice-icon icon=\"icon-calendar\"></nice-icon>\n" +
5637
5650
  "</span>\n" +
5638
5651
  "</div>\n" +
5639
5652
  "<div ng-class=\"{ 'nice-date-dropdown-wrapper': !inline }\">\n" +
5640
- "<div ng-class=\"{ 'nice-date-dropdown': !inline }\" ng-if=\"inline || isOpen\">\n" +
5641
- "<div class=\"nice-date-date\" ng-class=\"{ 'with-time': time }\" role=\"grid\">\n" +
5653
+ "<div ng-class=\"{ 'nice-date-dropdown': !inline, 'with-time': time, 'no-date': !date }\" ng-if=\"inline || isOpen\">\n" +
5654
+ "<div class=\"nice-date-date\" ng-if=\"date\" role=\"grid\">\n" +
5642
5655
  "<div class=\"nice-date-header\">\n" +
5643
5656
  "<span>\n" +
5644
5657
  "<select class=\"year-picker\" ng-model=\"innerDate.year\" ng-change=\"handleDateChange()\" ng-options=\"year for year in years\">\n" +
@@ -5667,15 +5680,13 @@ angular.module('niceElements').run(['$templateCache', function($templateCache) {
5667
5680
  "</div>\n" +
5668
5681
  "</div>\n" +
5669
5682
  "<div class=\"nice-date-time\" ng-if=\"time\">\n" +
5670
- "<i class=\"fa fa-clock-o\"></i>\n" +
5683
+ "<nice-icon icon=\"icon-clock\"></nice-icon>\n" +
5671
5684
  "<div class=\"time-picker time-picker-hour\">\n" +
5672
- "<select ng-disabled=\"isDisabled\" ng-model=\"innerDate.hour\" ng-change=\"timeChange()\" ng-options=\"hour as hour for hour in hours track by hour\">\n" +
5673
- "</select>\n" +
5685
+ "<select ng-disabled=\"isDisabled\" ng-model=\"innerDate.hour\" ng-change=\"timeChange()\" ng-options=\"hour as hour for hour in hours track by hour\"></select>\n" +
5674
5686
  "</div>\n" +
5675
5687
  "<div class=\"divider\">:</div>\n" +
5676
5688
  "<div class=\"time-picker time-picker-minute\">\n" +
5677
- "<select ng-disabled=\"isDisabled\" ng-model=\"innerDate.minute\" ng-change=\"timeChange()\" ng-options=\"minute as minute for minute in minutes track by minute\">\n" +
5678
- "</select>\n" +
5689
+ "<select ng-disabled=\"isDisabled\" ng-model=\"innerDate.minute\" ng-change=\"timeChange()\" ng-options=\"minute as minute for minute in minutes track by minute\"></select>\n" +
5679
5690
  "</div>\n" +
5680
5691
  "</div>\n" +
5681
5692
  "</div>\n" +
@@ -5699,7 +5710,8 @@ angular.module('niceElements').run(['$templateCache', function($templateCache) {
5699
5710
  "<div class=\"input-group\" id=\"dropdown{{randNum}}\">\n" +
5700
5711
  "<input type=\"text\" class=\"form-control\" value=\"{{ value }}\" ng-click=\"openDtp()\" ng-disabled=\"isDisabled\">\n" +
5701
5712
  "<span class=\"input-group-addon clickable\" ng-click=\"openDtp()\">\n" +
5702
- "<i class=\"fa\" ng-class=\"date == 'true' ? 'fa-calendar' : 'fa-clock-o'\"></i>\n" +
5713
+ "<nice-icon ng-if=\"date == 'true'\" icon=\"icon-calendar\"></nice-icon>\n" +
5714
+ "<nice-icon ng-if=\"date != 'true'\" icon=\"icon-clock\"></nice-icon>\n" +
5703
5715
  "</span>\n" +
5704
5716
  "</div>\n" +
5705
5717
  "<div ng-show=\"isOpen\">\n" +
@@ -5707,7 +5719,7 @@ angular.module('niceElements').run(['$templateCache', function($templateCache) {
5707
5719
  "</div>\n" +
5708
5720
  "</div>\n" +
5709
5721
  "</div>\n" +
5710
- "</div>\n"
5722
+ "</div>"
5711
5723
  );
5712
5724
 
5713
5725
 
@@ -5722,7 +5734,9 @@ angular.module('niceElements').run(['$templateCache', function($templateCache) {
5722
5734
  "<div class=\"nice-field col-xs-12\" ng-class=\"[fieldWidth ? fieldWidth : 'col-sm-8', { 'nice-disabled': isDisabled }]\">\n" +
5723
5735
  "<div class=\"nice-daterange-picker-button input-group\" ng-class=\"{ 'open': isOpen }\" ng-click=\"open()\">\n" +
5724
5736
  "<input type=\"text\" class=\"form-control\" value=\"{{ modelFormat }}\" readonly=\"readonly\">\n" +
5725
- "<span class=\"input-group-addon clickable\"><i class=\"fa fa-calendar\"></i></span>\n" +
5737
+ "<span class=\"input-group-addon clickable\">\n" +
5738
+ "<nice-icon icon=\"icon-calendar\"></nice-icon>\n" +
5739
+ "</span>\n" +
5726
5740
  "</div>\n" +
5727
5741
  "<div class=\"nice-daterange-picker-wrapper\">\n" +
5728
5742
  "<div class=\"dtp-wrapper\" ng-if=\"isOpen\">\n" +
@@ -5739,10 +5753,10 @@ angular.module('niceElements').run(['$templateCache', function($templateCache) {
5739
5753
  "</div>\n" +
5740
5754
  "</div>\n" +
5741
5755
  "<div class=\"dtp-left\">\n" +
5742
- "<nice-date model=\"model.innerStartDate\" next-date=\"model.innerEndDate\" is-inline=\"true\" no-margin=\"true\" inline=\"true\" time=\"{{ time }}\" on-change=\"dateChanged(model)\"></nice-date>\n" +
5756
+ "<nice-date model=\"model.innerStartDate\" next-date=\"model.innerEndDate\" is-inline=\"true\" no-margin=\"true\" inline=\"true\" time=\"time\" on-change=\"dateChanged(model)\"></nice-date>\n" +
5743
5757
  "</div>\n" +
5744
5758
  "<div class=\"dtp-right\">\n" +
5745
- "<nice-date model=\"model.innerEndDate\" next-date=\"model.innerStartDate\" is-inline=\"true\" no-margin=\"true\" inline=\"true\" time=\"{{ time }}\" on-change=\"dateChanged(model)\"></nice-date>\n" +
5759
+ "<nice-date model=\"model.innerEndDate\" next-date=\"model.innerStartDate\" is-inline=\"true\" no-margin=\"true\" inline=\"true\" time=\"time\" on-change=\"dateChanged(model)\"></nice-date>\n" +
5746
5760
  "</div>\n" +
5747
5761
  "</div>\n" +
5748
5762
  "</div>\n" +
@@ -5766,7 +5780,10 @@ angular.module('niceElements').run(['$templateCache', function($templateCache) {
5766
5780
  "<div class=\"dropdown-toggle\" id=\"dropdown{{randNum}}\" role=\"button\" ng-click=\"openDtpRange()\">\n" +
5767
5781
  "<div class=\"input-group\">\n" +
5768
5782
  "<input type=\"text\" class=\"form-control\" value=\"{{value}}\" ng-click=\"openDtpRange()\">\n" +
5769
- "<span class=\"input-group-addon clickable\"><i class=\"fa\" ng-class=\"{'fa-clock-o': date=='false', 'fa-calendar': date!='false'}\"></i></span>\n" +
5783
+ "<span class=\"input-group-addon clickable\">\n" +
5784
+ "<nice-icon ng-if=\"date != 'false'\" icon=\"icon-calendar\"></nice-icon>\n" +
5785
+ "<nice-icon ng-if=\"date == 'false'\" icon=\"icon-clock\"></nice-icon>\n" +
5786
+ "</span>\n" +
5770
5787
  "</div>\n" +
5771
5788
  "</div>\n" +
5772
5789
  "</div>\n" +
@@ -5910,7 +5927,9 @@ angular.module('niceElements').run(['$templateCache', function($templateCache) {
5910
5927
  "</div>\n" +
5911
5928
  "</div>\n" +
5912
5929
  "</div>\n" +
5913
- "<button class=\"btn btn-primary add-btn\" type=\"button\" ng-if=\"addButtonFunction && !isDisabled\" ng-click=\"addButtonFunction()\">+</button>\n" +
5930
+ "<button class=\"btn btn-primary btn-icon add-btn\" type=\"button\" ng-if=\"addButtonFunction && !isDisabled\" ng-click=\"addButtonFunction()\">\n" +
5931
+ "<nice-icon icon=\"icon-plus\"></nice-icon>\n" +
5932
+ "</button>\n" +
5914
5933
  "</div>\n" +
5915
5934
  "</div>\n" +
5916
5935
  "</div>\n" +
@@ -6004,13 +6023,13 @@ angular.module('niceElements').run(['$templateCache', function($templateCache) {
6004
6023
  "</div>\n" +
6005
6024
  "</div>\n" +
6006
6025
  "</div>\n" +
6007
- "</div>\n"
6026
+ "</div>"
6008
6027
  );
6009
6028
 
6010
6029
 
6011
6030
  $templateCache.put('src/components/nice-help/nice-help.html',
6012
6031
  "<div class=\"nice-help\" ng-mouseover=\"onHover()\">\n" +
6013
- "<i class=\"fa fa-question-circle nice-help-button\" aria-label=\"\"></i>\n" +
6032
+ "<nice-icon icon=\"icon-help-circle\" class=\"nice-help-button\"></nice-icon>\n" +
6014
6033
  "<div class=\"nice-help-popup\">\n" +
6015
6034
  "<span ng-bind-html=\"text\">{{ text }}</span>\n" +
6016
6035
  "<div data-popper-arrow class=\"nice-help-arrow\"></div>\n" +
@@ -6048,14 +6067,16 @@ angular.module('niceElements').run(['$templateCache', function($templateCache) {
6048
6067
  "<div ng-if=\"forma.$error && forma.$dirty\">\n" +
6049
6068
  "<div class=\"error-message\" ng-if=\"forma.$dirty && forma.$error.email\" translate translate-context=\"Nice\">Email is not valid.</div>\n" +
6050
6069
  "<div class=\"error-message\" ng-if=\"forma.$dirty && forma.$error.pattern\" translate translate-context=\"Nice\">This field requires a specific pattern.</div>\n" +
6051
- "<div class=\"error-message\" ng-if=\"forma.$error.minlength\"><translate translate-context=\"Nice\">Your input is too short. It must contain at least</translate>&nbsp;{{ minlength }}&nbsp;<translate translate-context=\"Nice\">characters</translate>.</div>\n" +
6070
+ "<div class=\"error-message\" ng-if=\"forma.$error.minlength\">\n" +
6071
+ "<translate translate-context=\"Nice\">Your input is too short. It must contain at least</translate>&nbsp;{{ minlength }}&nbsp;<translate translate-context=\"Nice\">characters</translate>.\n" +
6072
+ "</div>\n" +
6052
6073
  "<div class=\"error-message\" ng-if=\"forma.$error.maxlength\" translate translate-context=\"Nice\">Your input is too long</div>\n" +
6053
6074
  "<div class=\"error-message\" ng-if=\"forma.$error.required\" ng-if=\"forma.$dirty\" translate translate-context=\"Nice\">This field is required.</div>\n" +
6054
6075
  "<div class=\"error-message\" ng-if=\"forma.$error.unique\" translate translate-context=\"Nice\">This field must be unique.</div>\n" +
6055
6076
  "</div>\n" +
6056
6077
  "</div>\n" +
6057
6078
  "</div>\n" +
6058
- "</ng-form>\n"
6079
+ "</ng-form>"
6059
6080
  );
6060
6081
 
6061
6082
 
@@ -6103,11 +6124,15 @@ angular.module('niceElements').run(['$templateCache', function($templateCache) {
6103
6124
  "<div class=\"nice-field col-xs-12\" ng-class=\"fieldWidth ? fieldWidth : 'col-sm-8'\">\n" +
6104
6125
  "<div class=\"input-group\" ng-class=\"{'has-warning': !disabled && niceNumberForm.$invalid && niceNumberForm.$dirty}\">\n" +
6105
6126
  "<span class=\"input-group-btn\">\n" +
6106
- "<button class=\"btn btn-default\" type=\"button\" ng-disabled=\"!canSubstract\" ng-click=\"subtract()\" tabindex=\"-1\">-</button>\n" +
6127
+ "<button class=\"btn btn-default btn-left\" type=\"button\" ng-disabled=\"!canSubstract\" ng-click=\"subtract()\" tabindex=\"-1\">\n" +
6128
+ "<nice-icon icon=\"icon-minus\"></nice-icon>\n" +
6129
+ "</button>\n" +
6107
6130
  "</span>\n" +
6108
6131
  "<input type=\"number\" step=\"{{ step }}\" ng-change=\"inputChanged()\" class=\"form-control\" max=\"{{ max }}\" min=\"{{ min }}\" ng-model=\"model\">\n" +
6109
6132
  "<span class=\"input-group-btn\">\n" +
6110
- "<button class=\"btn btn-default\" type=\"button\" ng-disabled=\"!canAdd\" ng-click=\"add()\" tabindex=\"-1\">+</button>\n" +
6133
+ "<button class=\"btn btn-default btn-right\" type=\"button\" ng-disabled=\"!canAdd\" ng-click=\"add()\" tabindex=\"-1\">\n" +
6134
+ "<nice-icon icon=\"icon-plus\"></nice-icon>\n" +
6135
+ "</button>\n" +
6111
6136
  "</span>\n" +
6112
6137
  "</div>\n" +
6113
6138
  "<div class=\"error-messages\" ng-if=\"niceNumberForm.$error && !hideError\" ng-class=\"{ 'floating-error': floatingError }\">\n" +
@@ -6197,9 +6222,13 @@ angular.module('niceElements').run(['$templateCache', function($templateCache) {
6197
6222
  "</div>\n" +
6198
6223
  "<div class=\"nice-field col-xs-12\" ng-class=\"[fieldWidth ? fieldWidth : 'col-sm-8', { 'nice-disabled': isDisabled }]\">\n" +
6199
6224
  "<div class=\"input-group\">\n" +
6200
- "<button class=\"btn btn-default btn-left\" ng-click=\"sub()\" type=\"button\" ng-disabled=\"isDisabled\" tabindex=\"-1\">-</button>\n" +
6225
+ "<button class=\"btn btn-default btn-left\" ng-click=\"sub()\" type=\"button\" ng-disabled=\"isDisabled\" tabindex=\"-1\">\n" +
6226
+ "<nice-icon icon=\"icon-minus\"></nice-icon>\n" +
6227
+ "</button>\n" +
6201
6228
  "<input class=\"value form-control\" ng-model=\"model\" type=\"number\" ng-change=\"handleChange()\" ng-disabled=\"isDisabled\">\n" +
6202
- "<button class=\"btn btn-default btn-right\" ng-click=\"add()\" type=\"button\" ng-disabled=\"isDisabled\" tabindex=\"-1\">+</button>\n" +
6229
+ "<button class=\"btn btn-default btn-right\" ng-click=\"add()\" type=\"button\" ng-disabled=\"isDisabled\" tabindex=\"-1\">\n" +
6230
+ "<nice-icon icon=\"icon-plus\"></nice-icon>\n" +
6231
+ "</button>\n" +
6203
6232
  "</div>\n" +
6204
6233
  "</div>\n" +
6205
6234
  "</div>\n" +
@@ -6222,11 +6251,11 @@ angular.module('niceElements').run(['$templateCache', function($templateCache) {
6222
6251
  " \">\n" +
6223
6252
  "<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 }}\">\n" +
6224
6253
  "<span class=\"input-group-addon clickable\" ng-click=\"search()\" ng-if=\"!model\">\n" +
6225
- "<i ng-show=\"!loading\" class=\"fa fa-search\"></i>\n" +
6226
- "<i ng-show=\"loading\" class=\"fa fa-refresh fa-spin\"></i>\n" +
6254
+ "<nice-icon ng-show=\"!loading\" icon=\"icon-search\"></nice-icon>\n" +
6255
+ "<nice-icon ng-show=\"loading\" icon=\"icon-loader\" class=\"d-block nice-animation-spin\"></nice-icon>\n" +
6227
6256
  "</span>\n" +
6228
6257
  "<span class=\"input-group-addon clickable\" ng-click=\"remove()\" ng-if=\"model\">\n" +
6229
- "<i ng-show=\"!loading\" class=\"fa fa-remove\"></i>\n" +
6258
+ "<nice-icon ng-show=\"!loading\" icon=\"icon-x\"></nice-icon>\n" +
6230
6259
  "</span>\n" +
6231
6260
  "</div>\n" +
6232
6261
  "</div>\n" +
@@ -6259,8 +6288,8 @@ angular.module('niceElements').run(['$templateCache', function($templateCache) {
6259
6288
  "<div class=\"nice-search-button input-group\" ng-class=\"{ 'disabled': isDisabled, 'has-warning': !isDisabled && form.$invalid && form.$dirty, 'has-success': !isDisabled && form.$valid && form.$dirty}\">\n" +
6260
6289
  "<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" +
6261
6290
  "<span class=\"input-group-addon clickable\" ng-click=\"onFocus()\">\n" +
6262
- "<i ng-show=\"!loading\" class=\"fa fa-search\"></i>\n" +
6263
- "<i ng-show=\"loading\" class=\"fa fa-refresh fa-spin\"></i>\n" +
6291
+ "<nice-icon ng-show=\"!loading\" icon=\"icon-search\"></nice-icon>\n" +
6292
+ "<nice-icon ng-show=\"loading\" icon=\"icon-loader\" class=\"d-block nice-animation-spin\"></nice-icon>\n" +
6264
6293
  "</span>\n" +
6265
6294
  "</div>\n" +
6266
6295
  "<div class=\"nice-search-dropdown-wrapper\">\n" +
@@ -7180,28 +7209,28 @@ angular.module('niceElements').run(['$templateCache', function($templateCache) {
7180
7209
  " 'disabled': isDisabled\n" +
7181
7210
  " }\">\n" +
7182
7211
  "<input type=\"text\" class=\"form-control\" ng-model=\"modelString\" ng-keyup=\"$event.keyCode == 13 && validateDate()\" ng-blur=\"validateDate()\">\n" +
7183
- "<span class=\"input-group-addon clickable\" ng-click=\"open = !open\"><i class=\"fa fa-clock-o\"></i></span>\n" +
7212
+ "<span class=\"input-group-addon clickable\" ng-click=\"open = !open\">\n" +
7213
+ "<nice-icon icon=\"icon-clock\"></nice-icon>\n" +
7214
+ "</span>\n" +
7184
7215
  "</div>\n" +
7185
7216
  "<div class=\"nice-time-picker-dropdown\" ng-if=\"open\">\n" +
7186
- "<div class=\"row\">\n" +
7187
- "<div class=\"col-xs-6\">\n" +
7188
- "<button ng-click=\"changeHour(true)\"><i class=\"fa fa-chevron-up\"></i></button>\n" +
7189
- "</div>\n" +
7190
- "<div class=\"col-xs-6\">\n" +
7191
- "<button ng-click=\"changeMinutes(true)\"><i class=\"fa fa-chevron-up\"></i></button>\n" +
7192
- "</div>\n" +
7193
- "</div>\n" +
7194
- "<div class=\"row numbers\">\n" +
7195
- "<div class=\"col-xs-6\">{{ hours }}</div>\n" +
7196
- "<div class=\"col-xs-6\">{{ minutes }}</div>\n" +
7197
- "</div>\n" +
7198
- "<div class=\"row\">\n" +
7199
- "<div class=\"col-xs-6\">\n" +
7200
- "<button ng-click=\"changeHour(false)\"><i class=\"fa fa-chevron-down\"></i></button>\n" +
7201
- "</div>\n" +
7202
- "<div class=\"col-xs-6\">\n" +
7203
- "<button ng-click=\"changeMinutes(false)\"><i class=\"fa fa-chevron-down\"></i></button>\n" +
7217
+ "<div>\n" +
7218
+ "<button class=\"btn btn-sm btn-block btn-default\" ng-click=\"changeHour(true)\">\n" +
7219
+ "<nice-icon icon=\"icon-chevron-up\"></nice-icon>\n" +
7220
+ "</button>\n" +
7221
+ "<div class=\"numbers\">{{ hours }}</div>\n" +
7222
+ "<button class=\"btn btn-sm btn-block btn-default\" ng-click=\"changeHour(false)\">\n" +
7223
+ "<nice-icon icon=\"icon-chevron-down\"></nice-icon>\n" +
7224
+ "</button>\n" +
7204
7225
  "</div>\n" +
7226
+ "<div>\n" +
7227
+ "<button class=\"btn btn-sm btn-block btn-default\" ng-click=\"changeMinutes(true)\">\n" +
7228
+ "<nice-icon icon=\"icon-chevron-up\"></nice-icon>\n" +
7229
+ "</button>\n" +
7230
+ "<div class=\"numbers\">{{ minutes }}</div>\n" +
7231
+ "<button class=\"btn btn-sm btn-block btn-default\" ng-click=\"changeMinutes(false)\">\n" +
7232
+ "<nice-icon icon=\"icon-chevron-down\"></nice-icon>\n" +
7233
+ "</button>\n" +
7205
7234
  "</div>\n" +
7206
7235
  "</div>\n" +
7207
7236
  "</div>\n" +
@@ -7254,8 +7283,8 @@ angular.module('niceElements').run(['$templateCache', function($templateCache) {
7254
7283
  "</div>\n" +
7255
7284
  "<div class=\"nice-field col-xs-12\" ng-class=\"fieldWidth ? fieldWidth : 'col-sm-8'\">\n" +
7256
7285
  "<div class=\"yesno-wrapper noselect\" ng-class=\"{ 'disabled': isDisabled }\">\n" +
7257
- "<div class=\"yesno-yes-bg\" ng-click=\"switch()\">{{ yes }}</div>\n" +
7258
- "<div class=\"yesno-no-bg\" ng-click=\"switch()\">{{ no }}</div>\n" +
7286
+ "<button class=\"yesno-yes-bg\" ng-click=\"switch()\" tabindex=\"-1\">{{ yes }}</button>\n" +
7287
+ "<button class=\"yesno-no-bg\" ng-click=\"switch()\" tabindex=\"-1\">{{ no }}</button>\n" +
7259
7288
  "<button class=\"yesno-button btn btn-primary\" ng-class=\"buttonClass\" ng-click=\"switch()\">{{ state }}</button>\n" +
7260
7289
  "</div>\n" +
7261
7290
  "</div>\n" +