nice-elements 1.3.17 → 1.4.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.
Files changed (36) hide show
  1. package/CHANGELOG.md +5 -0
  2. package/LICENSE.md +2 -2
  3. package/README.md +1 -1
  4. package/bower.json +1 -1
  5. package/dist/nice.js +127 -176
  6. package/dist/nice.min.js +1 -1
  7. package/dist/style.css +24 -2
  8. package/dist/style.css.map +1 -1
  9. package/dist/style.min.css +1 -1
  10. package/package.json +2 -1
  11. package/src/components/nice-calendar/nice-calendar.html +15 -15
  12. package/src/components/nice-calendar/nice-calendar.js +4 -26
  13. package/src/components/nice-date/nice-date.js +12 -4
  14. package/src/components/nice-date-range/nice-date-range.js +6 -40
  15. package/src/components/nice-datetime-picker/nice-datetime-picker.js +6 -6
  16. package/src/components/nice-datetimerange-picker/nice-datetimerange-picker.html +6 -6
  17. package/src/components/nice-datetimerange-picker/nice-datetimerange-picker.js +7 -7
  18. package/src/components/nice-datetimerange-picker-2/nice-datetimerange-picker-2.html +6 -6
  19. package/src/components/nice-datetimerange-picker-2/nice-datetimerange-picker-2.js +2 -2
  20. package/src/components/nice-dropdown/nice-dropdown.js +7 -7
  21. package/src/components/nice-dropdown-date/nice-dropdown-date.js +14 -14
  22. package/src/components/nice-dropdown-old/nice-dropdown-old.html +2 -2
  23. package/src/components/nice-dropdown-old/nice-dropdown-old.js +2 -2
  24. package/src/components/nice-dtp/nice-dtp.js +5 -5
  25. package/src/components/nice-help/nice-help.js +0 -6
  26. package/src/components/nice-input/nice-input.html +6 -6
  27. package/src/components/nice-loader/nice-loader.html +3 -1
  28. package/src/components/nice-loader/nice-loader.js +6 -2
  29. package/src/components/nice-loader/nice-loader.scss +25 -2
  30. package/src/components/nice-notification/nice-notification.js +1 -2
  31. package/src/components/nice-number/nice-number.html +5 -5
  32. package/src/components/nice-percent/nice-percent.html +2 -2
  33. package/src/components/nice-search/nice-search.html +1 -1
  34. package/src/components/nice-search2/nice-search2.html +1 -1
  35. package/src/components/nice-upload/nice-upload.js +5 -5
  36. package/src/components/nice-yesno/nice-yesno.js +3 -3
package/dist/nice.js CHANGED
@@ -75,7 +75,7 @@ angular.module('niceElements')
75
75
  * # niceCalendar
76
76
  */
77
77
  angular.module('niceElements')
78
- .directive("niceCalendar", function($timeout) {
78
+ .directive("niceCalendar", function($timeout, gettextCatalog) {
79
79
  return {
80
80
  restrict: "E",
81
81
  templateUrl: "src/components/nice-calendar/nice-calendar.html",
@@ -92,36 +92,14 @@ angular.module('niceElements')
92
92
  endDate: '=',
93
93
  startDate: '=',
94
94
  isDisabled: '=',
95
- translations: '@',
96
95
  help: '@',
97
96
  isInline: '=',
98
97
  onChange: '&?'
99
98
  },
100
99
  link: function(scope, element) {
101
- scope.translations = {
102
- selectStartDate: "Select start date",
103
- selectStartTime: "Select start time",
104
- selectEndDate: "Select end date",
105
- selectEndTime: "Select end time",
106
- nextMonth: "Next month",
107
- prevMonth: "Previous month",
108
- start: "Start",
109
- end: "End",
110
- mon: "Mon",
111
- tue: "Tue",
112
- wed: "Wed",
113
- thu: "Thu",
114
- fri: "Fri",
115
- sat: "Sat",
116
- sun: "Sun",
117
- january: "January",
118
- february: "February",
119
-
120
- };
121
-
122
100
  // ------------------ Init default values ------------------
123
101
  scope.selectStart = true;
124
- scope.popupText = scope.translations.selectStartDate;
102
+ scope.popupText = gettextCatalog.getString("Select start date", null, "Nice");
125
103
 
126
104
  scope.hours = [
127
105
  0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23
@@ -186,7 +164,7 @@ angular.module('niceElements')
186
164
  // Set start date
187
165
  scope.startDate = selectedDate;
188
166
  scope.selectStart = false;
189
- scope.popupText = scope.translations.selectEndDate;
167
+ scope.popupText = gettextCatalog.getString("Select end date", null, "Nice");
190
168
  scope.formCalendar.$setDirty();
191
169
  scope.displayStartChange();
192
170
 
@@ -201,7 +179,7 @@ angular.module('niceElements')
201
179
  // Set end date
202
180
  scope.endDate = selectedDate;
203
181
  scope.selectStart = true;
204
- scope.popupText = scope.translations.selectStartDate;
182
+ scope.popupText = gettextCatalog.getString("Select start date", null, "Nice");
205
183
  scope.formCalendar.$setDirty();
206
184
  scope.displayEndChange();
207
185
 
@@ -826,7 +804,7 @@ angular.module('niceElements')
826
804
  onChange: '&?'
827
805
  },
828
806
 
829
- link: function(scope, iElement, attrs, ctrl){
807
+ link: function(scope, attrs){
830
808
  if (!attrs.title) { attrs.title = ''; }
831
809
  if (!attrs.fieldWidth) { attrs.fieldWidth = 'col-sm-8'; }
832
810
  if (!attrs.labelWidth) { attrs.labelWidth = 'col-sm-4'; }
@@ -851,55 +829,21 @@ angular.module('niceElements')
851
829
  }
852
830
  },
853
831
 
854
- controller: function($scope, $filter) { //gettextCatalog
832
+ controller: function($scope) {
855
833
  $scope.opts = {
856
- //format: 'DD.MM.YYYY',
857
834
  locale: {
858
835
  applyClass: 'btn-green',
859
- //applyLabel: gettextCatalog.getString("Apply"),
860
- //fromLabel: gettextCatalog.getString("From"),
861
- //toLabel: gettextCatalog.getString("To"),
862
- //cancelLabel: gettextCatalog.getString("Cancel"),
863
- //customRangeLabel: gettextCatalog.getString("Custom range"),
864
836
  firstDay: 1
865
- //daysOfWeek: [
866
- // gettextCatalog.getString("Sun"),
867
- // gettextCatalog.getString("Mon"),
868
- // gettextCatalog.getString("Tue"),
869
- // gettextCatalog.getString("Wed"),
870
- // gettextCatalog.getString("Thu"),
871
- // gettextCatalog.getString("Fri"),
872
- // gettextCatalog.getString("Sat")
873
- //],
874
- //monthNames: [
875
- // gettextCatalog.getString("January"),
876
- // gettextCatalog.getString("February"),
877
- // gettextCatalog.getString("March"),
878
- // gettextCatalog.getString("April"),
879
- // gettextCatalog.getString("May"),
880
- // gettextCatalog.getString("June"),
881
- // gettextCatalog.getString("July"),
882
- // gettextCatalog.getString("August"),
883
- // gettextCatalog.getString("September"),
884
- // gettextCatalog.getString("October"),
885
- // gettextCatalog.getString("November"),
886
- // gettextCatalog.getString("December")
887
- //]
888
837
  },
889
838
  ranges: {},
890
839
  min: $scope.min,
891
840
  max: $scope.max
892
841
  };
893
842
 
894
- //$scope.opts.ranges[gettextCatalog.getString("Today")] = [moment(), moment()];
895
- //$scope.opts.ranges[gettextCatalog.getString("Last 7 days")] = [moment().subtract(7, 'days'), moment()];
896
- //$scope.opts.ranges[gettextCatalog.getString("Last 30 days")] = [moment().subtract(30, 'days'), moment()];
897
- //$scope.opts.ranges[gettextCatalog.getString("This month")] = [moment().startOf('month'), moment().endOf('month')];
898
-
899
- $scope.opts.ranges["Today"] = [moment(), moment()];
900
- $scope.opts.ranges["Last 7 days"] = [moment().subtract(7, 'days'), moment()];
901
- $scope.opts.ranges["Last 30 days"] = [moment().subtract(30, 'days'), moment()];
902
- $scope.opts.ranges["This month"] = [moment().startOf('month'), moment().endOf('month')];
843
+ $scope.opts.ranges[gettextCatalog.getString("Today", null, "Nice")] = [moment(), moment()];
844
+ $scope.opts.ranges[gettextCatalog.getString("Last 7 days", null, "Nice")] = [moment().subtract(7, 'days'), moment()];
845
+ $scope.opts.ranges[gettextCatalog.getString("Last 30 days", null, "Nice")] = [moment().subtract(30, 'days'), moment()];
846
+ $scope.opts.ranges[gettextCatalog.getString("This month", null, "Nice")] = [moment().startOf('month'), moment().endOf('month')];
903
847
 
904
848
  if(angular.isDefined($scope.format)) $scope.opts.format = format;
905
849
  }
@@ -939,13 +883,13 @@ angular.module('niceElements')
939
883
  isInline: '=',
940
884
  onChange: '&?'
941
885
  },
942
- controller: function($scope) {
886
+ controller: function($scope, gettextCatalog) {
943
887
  $scope.isOpen = false;
944
888
  $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];
945
889
  $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];
946
890
  $scope.translations = {
947
- nextMonth: "Next month",
948
- prevMonth: "Previous month",
891
+ nextMonth: gettextCatalog.getString("Next month", null, "Nice"),
892
+ prevMonth: gettextCatalog.getString("Previous month", null, "Nice"),
949
893
  };
950
894
  $scope.innerDate = {
951
895
  month: 0,
@@ -958,7 +902,15 @@ angular.module('niceElements')
958
902
  $scope.days = [];
959
903
 
960
904
  // $scope.weekdays = moment.weekdaysShort(false);
961
- $scope.weekdays = ["Pon", "Tor", "Sre", "Čet", "Pet", "Sob", "Ned"];
905
+ $scope.weekdays = [
906
+ gettextCatalog.getString("Pon", null, "Nice"),
907
+ gettextCatalog.getString("Tor", null, "Nice"),
908
+ gettextCatalog.getString("Sre", null, "Nice"),
909
+ gettextCatalog.getString("Čet", null, "Nice"),
910
+ gettextCatalog.getString("Pet", null, "Nice"),
911
+ gettextCatalog.getString("Sob", null, "Nice"),
912
+ gettextCatalog.getString("Ned", null, "Nice")
913
+ ];
962
914
 
963
915
  $scope.years = [];
964
916
  var year = moment().year()-100;
@@ -1207,7 +1159,7 @@ angular.module('niceElements').directive('niceDatetimePicker', function () {
1207
1159
  templateUrl: 'src/components/nice-datetime-picker/nice-datetime-picker.html',
1208
1160
  scope: {
1209
1161
  model: '=', // binding model
1210
- format: '@', // default: 'DD.MM.YYYY HH:mm', format for input label string
1162
+ format: '@', // default: 'D.M.YYYY • H:mm', format for input label string
1211
1163
  date: '@', // default: true, is date picker enabled?
1212
1164
  time: '@', // default: false, is time picker enabled?
1213
1165
  width: '@', // default: 300, width of entire dtp-picker in px
@@ -1228,14 +1180,14 @@ angular.module('niceElements').directive('niceDatetimePicker', function () {
1228
1180
  isInline: '=',
1229
1181
  onChange: '&?'
1230
1182
  },
1231
- controller: function ($scope) {
1183
+ controller: function ($scope, gettextCatalog) {
1232
1184
  $scope.date = $scope.date == 'true' || $scope.date == true;
1233
1185
  $scope.time = $scope.time == 'true' || $scope.time == true;
1234
1186
  $scope.noMargin === 'true' || $scope.noMargin === true;
1235
1187
  $scope.enableOkButtons === 'true' || $scope.enableOkButtons === true;
1236
1188
  $scope.lang = $scope.lang || 'en';
1237
- $scope.okText = $scope.okText || 'OK';
1238
- $scope.cancelText = $scope.cancelText || 'Cancel';
1189
+ $scope.okText = $scope.okText || gettextCatalog.getString('OK', null, 'Nice');
1190
+ $scope.cancelText = $scope.cancelText || gettextCatalog.getString('Cancel', null, 'Nice');
1239
1191
  $scope.weekStart = parseInt($scope.weekStart) || 1;
1240
1192
  $scope.width = parseInt($scope.width) || 300;
1241
1193
  $scope.isOpen = false;
@@ -1243,11 +1195,11 @@ angular.module('niceElements').directive('niceDatetimePicker', function () {
1243
1195
 
1244
1196
  if (!$scope.format) {
1245
1197
  if ($scope.date && !$scope.time) {
1246
- $scope.format = 'DD.MM.YYYY';
1198
+ $scope.format = 'D.M.YYYY';
1247
1199
  } else if (!$scope.date && $scope.time) {
1248
1200
  $scope.format = 'HH:mm';
1249
1201
  } else {
1250
- $scope.format = 'DD.MM.YYYY HH:mm';
1202
+ $scope.format = 'D.M.YYYY • H:mm';
1251
1203
  }
1252
1204
  }
1253
1205
 
@@ -1293,7 +1245,7 @@ angular.module('niceElements')
1293
1245
  scope: {
1294
1246
  startDate: '=', // binding model
1295
1247
  endDate: '=', // binding model
1296
- formatString: '@', // default: 'DD.MM.YYYY HH:mm', format for input label string
1248
+ formatString: '@', // default: 'D.M.YYYY • H:mm', format for input label string
1297
1249
  modelFormat: '@',
1298
1250
  time: '@', // default: false, is time picker enabled?
1299
1251
  minDate: '@', // default: undefined
@@ -1319,7 +1271,7 @@ angular.module('niceElements')
1319
1271
 
1320
1272
  // Set format string
1321
1273
  if(!$scope.formatString) {
1322
- if($scope.time) $scope.formatString = 'D.M.YYYY H:mm';
1274
+ if($scope.time) $scope.formatString = 'D.M.YYYY • H:mm';
1323
1275
  else $scope.formatString = 'D.M.YYYY';
1324
1276
  }
1325
1277
 
@@ -1431,12 +1383,12 @@ angular.module('niceElements')
1431
1383
  * # niceDatetimerangePicker
1432
1384
  */
1433
1385
  angular.module('niceElements')
1434
- .directive('niceDatetimerangePicker', ['$window', '$timeout', function($window, $timeout) {
1386
+ .directive('niceDatetimerangePicker', function(gettextCatalog) {
1435
1387
  return {
1436
1388
  scope: {
1437
1389
  modelStart: '=', // binding model
1438
1390
  modelEnd: '=', // binding model
1439
- format: '@', // default: 'DD.MM.YYYY HH:mm', format for input label string
1391
+ format: '@', // default: 'D.M.YYYY • H:mm', format for input label string
1440
1392
  modelFormat: '@',
1441
1393
  date: '@', // default: true, is date picker enabled?
1442
1394
  time: '@', // default: false, is time picker enabled?
@@ -1461,22 +1413,22 @@ angular.module('niceElements')
1461
1413
  },
1462
1414
  templateUrl: 'src/components/nice-datetimerange-picker/nice-datetimerange-picker.html',
1463
1415
  link: {
1464
- pre: function($scope, $element, $attrs) {
1416
+ pre: function($scope) {
1465
1417
  // Default parameters
1466
1418
  var params = {
1467
1419
  title: '',
1468
1420
  noMargin: false,
1469
1421
  fieldWidth: 'col-sm-8',
1470
1422
  labelWidth: 'col-sm-4',
1471
- format: 'D.M.YYYY H:mm',
1423
+ format: 'D.M.YYYY • H:mm',
1472
1424
  modelFormat: 'YYYY-MM-DDTHH:mm:ss.SSS',
1473
1425
  minDate: null,
1474
1426
  maxDate: null,
1475
1427
  lang: 'en',
1476
1428
  weekStart: 1,
1477
1429
  shortTime: false,
1478
- cancelText: 'Cancel',
1479
- okText: 'OK',
1430
+ cancelText: gettextCatalog.getString('Cancel', null, 'Nice'),
1431
+ okText: gettextCatalog.getString('OK', null, 'Nice'),
1480
1432
  date: true,
1481
1433
  time: false,
1482
1434
  width: 300,
@@ -1667,7 +1619,7 @@ angular.module('niceElements')
1667
1619
  }
1668
1620
  };
1669
1621
 
1670
- }]);
1622
+ });
1671
1623
  'use strict';
1672
1624
 
1673
1625
  /**
@@ -1677,7 +1629,7 @@ angular.module('niceElements')
1677
1629
  * # niceDropdownDate
1678
1630
  */
1679
1631
  angular.module('niceElements')
1680
- .directive('niceDropdownDate', function (){
1632
+ .directive('niceDropdownDate', function (gettextCatalog) {
1681
1633
  return {
1682
1634
  restrict: 'E',
1683
1635
  replace: true,
@@ -1699,18 +1651,18 @@ angular.module('niceElements')
1699
1651
  link: function ($scope) {
1700
1652
  $scope.days = [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];
1701
1653
  $scope.months = [
1702
- { value: 0, name: 'Jan' },
1703
- { value: 1, name: 'Feb' },
1704
- { value: 2, name: 'Mar' },
1705
- { value: 3, name: 'Apr' },
1706
- { value: 4, name: 'May' },
1707
- { value: 5, name: 'Jun' },
1708
- { value: 6, name: 'Jul' },
1709
- { value: 7, name: 'Aug' },
1710
- { value: 8, name: 'Sep' },
1711
- { value: 9, name: 'Oct' },
1712
- { value: 10, name: 'Nov' },
1713
- { value: 11, name: 'Dec' }
1654
+ { value: 0, name: gettextCatalog.getString('Jan', null, 'Nice') },
1655
+ { value: 1, name: gettextCatalog.getString('Feb', null, 'Nice') },
1656
+ { value: 2, name: gettextCatalog.getString('Mar', null, 'Nice') },
1657
+ { value: 3, name: gettextCatalog.getString('Apr', null, 'Nice') },
1658
+ { value: 4, name: gettextCatalog.getString('May', null, 'Nice') },
1659
+ { value: 5, name: gettextCatalog.getString('Jun', null, 'Nice') },
1660
+ { value: 6, name: gettextCatalog.getString('Jul', null, 'Nice') },
1661
+ { value: 7, name: gettextCatalog.getString('Aug', null, 'Nice') },
1662
+ { value: 8, name: gettextCatalog.getString('Sep', null, 'Nice') },
1663
+ { value: 9, name: gettextCatalog.getString('Oct', null, 'Nice') },
1664
+ { value: 10, name: gettextCatalog.getString('Nov', null, 'Nice') },
1665
+ { value: 11, name: gettextCatalog.getString('Dec', null, 'Nice') }
1714
1666
  ];
1715
1667
 
1716
1668
 
@@ -1752,7 +1704,7 @@ angular.module('niceElements')
1752
1704
 
1753
1705
  // validate that the date selected is accurate
1754
1706
  $scope.checkDate = function(){
1755
- var date = moment($scope.dateFields.day + "." + ($scope.dateFields.month + 1) + "." + $scope.dateFields.year, "DD.MM.YYYY");
1707
+ var date = moment($scope.dateFields.day + "." + ($scope.dateFields.month + 1) + "." + $scope.dateFields.year, "D.M.YYYY");
1756
1708
 
1757
1709
  if(date.isValid()){
1758
1710
  // Format
@@ -1830,11 +1782,11 @@ angular.module('niceElements')
1830
1782
  isInline: '=',
1831
1783
  onChange: '&?'
1832
1784
  },
1833
- controller: function($rootScope, $scope, $document, $element) {
1785
+ controller: function($scope, $element, gettextCatalog) {
1834
1786
  if (!$scope.objValue) { $scope.objValue = 'value'; }
1835
1787
  if (!$scope.objKey) { $scope.objKey = 'id'; }
1836
1788
  if (!$scope.list) { $scope.list = []; }
1837
- if (!$scope.noOptionsText) { $scope.noOptionsText = "No options"; }
1789
+ if (!$scope.noOptionsText) { $scope.noOptionsText = gettextCatalog.getString("No options", null, "Nice"); }
1838
1790
  if(!$scope.addButtonFunction) { $scope.addButtonFunction = null; }
1839
1791
  if(!$scope.listenKeydown) { $scope.listenKeydown = false; }
1840
1792
  $scope.valid = $scope.formDropdown;
@@ -2168,15 +2120,15 @@ angular.module('niceElements')
2168
2120
  clearOnSelect: '@',
2169
2121
  positionFixed: '=' // Dropdown menu will be fixed to page
2170
2122
  },
2171
- controller: function ($scope, $element, $timeout) {
2123
+ controller: function ($scope, $element, $timeout, gettextCatalog) {
2172
2124
  if (!$scope.objValue) { $scope.objValue = 'value'; }
2173
2125
  if (!$scope.objKey) { $scope.objKey = 'id'; }
2174
- if (!$scope.noOptionsText) { $scope.noOptionsText = "No options"; }
2175
- if (!$scope.noDataText) { $scope.noDataText = "No options"; }
2176
- if (!$scope.searchText) { $scope.searchText = "Search..."; }
2177
- if (!$scope.nullableText) { $scope.nullableText = "None"; }
2178
- if (!$scope.selectText) { $scope.selectText = "None"; }
2179
- if (!$scope.selectedText) { $scope.selectedText = "selected"; }
2126
+ if (!$scope.noOptionsText) { $scope.noOptionsText = gettextCatalog.getString("No options", null, "Nice"); }
2127
+ if (!$scope.noDataText) { $scope.noDataText = gettextCatalog.getString("No options", null, "Nice"); }
2128
+ if (!$scope.searchText) { $scope.searchText = gettextCatalog.getString("Search...", null, "Nice"); }
2129
+ if (!$scope.nullableText) { $scope.nullableText = gettextCatalog.getString("None", null, "Nice"); }
2130
+ if (!$scope.selectText) { $scope.selectText = gettextCatalog.getString("None", null, "Nice"); }
2131
+ if (!$scope.selectedText) { $scope.selectedText = gettextCatalog.getString("selected", null, "Nice"); }
2180
2132
  if (!$scope.addButtonFunction) { $scope.addButtonFunction = null; }
2181
2133
  $scope.nullable = $scope.nullable === 'true' || $scope.nullable === true;
2182
2134
  $scope.required = $scope.required === 'true' || $scope.required === true;
@@ -2500,7 +2452,7 @@ angular.module('niceElements')
2500
2452
  scope: {
2501
2453
  onChange: '&?', // function called on date changed
2502
2454
  model: '=', // binding model
2503
- format: '@', // default: 'DD.MM.YYYY HH:mm', format for input label string
2455
+ format: '@', // default: 'D.M.YYYY • H:mm', format for input label string
2504
2456
  modelFormat: '@', // default: ''
2505
2457
  //currentDate: '@',
2506
2458
  date: '@', // default: true, is date picker enabled?
@@ -2521,7 +2473,7 @@ angular.module('niceElements')
2521
2473
  closed: '='
2522
2474
  },
2523
2475
  templateUrl: 'src/components/nice-dtp/nice-dtp.html',
2524
- link: function ($scope, $element, $attrs) {
2476
+ controller: function ($scope, $element, $attrs, gettextCatalog) {
2525
2477
 
2526
2478
  // default parameters
2527
2479
  var params = {
@@ -2529,15 +2481,15 @@ angular.module('niceElements')
2529
2481
  noMargin: false,
2530
2482
  fieldWidth: 'col-sm-8',
2531
2483
  labelWidth: 'col-sm-4',
2532
- format: 'DD.MM.YYYY HH:mm',
2484
+ format: 'D.M.YYYY • H:mm',
2533
2485
  modelFormat: 'YYYY-MM-DDTHH:mm:ss.SSS',
2534
2486
  minDate: null,
2535
2487
  maxDate: null,
2536
2488
  lang: 'en',
2537
2489
  weekStart: 1,
2538
2490
  shortTime: false,
2539
- cancelText: 'Cancel',
2540
- okText: 'OK',
2491
+ cancelText: gettextCatalog.getString('Cancel', null, 'Nice'),
2492
+ okText: gettextCatalog.getString('OK', null, 'Nice'),
2541
2493
  date: true,
2542
2494
  time: false,
2543
2495
  width: 300,
@@ -3332,12 +3284,6 @@ angular.module('niceElements')
3332
3284
  restrict: 'E',
3333
3285
  scope: {
3334
3286
  text: '@'
3335
- },
3336
- link: function postLink(scope, element, attrs) {
3337
-
3338
- },
3339
- controller: function($rootScope, $scope) {
3340
-
3341
3287
  }
3342
3288
  };
3343
3289
  });
@@ -3539,9 +3485,13 @@ angular.module('niceElements')
3539
3485
  return {
3540
3486
  templateUrl: 'src/components/nice-loader/nice-loader.html',
3541
3487
  restrict: 'E',
3488
+ transclude: true,
3542
3489
  scope: {
3543
- visibleWhen: '=',
3544
- addClass: '@'
3490
+ visibleWhen: '=',
3491
+ message: '@',
3492
+ fullscreen: '@',
3493
+ fulldiv: '@',
3494
+ addClass: '@'
3545
3495
  }
3546
3496
  };
3547
3497
  });
@@ -3554,13 +3504,12 @@ angular.module('niceElements')
3554
3504
  */
3555
3505
 
3556
3506
  angular.module('niceElements')
3557
- .factory('NiceNotification', function ($timeout, $http, $compile, $templateCache, $rootScope, $injector, $sce) {
3507
+ .factory('NiceNotification', function ($timeout, $http, $compile, $templateCache, $rootScope, $sce) {
3558
3508
 
3559
3509
  var startTop = 10;
3560
3510
  var startRight = 10;
3561
3511
  var verticalSpacing = 10;
3562
3512
  var horizontalSpacing = 10;
3563
- var type = '';
3564
3513
  var delay = 5000;
3565
3514
 
3566
3515
  var messageElements = [];
@@ -4610,7 +4559,7 @@ angular.module('niceElements')
4610
4559
  * # niceUpload
4611
4560
  */
4612
4561
  angular.module('niceElements')
4613
- .directive('niceUpload', function ($timeout) {
4562
+ .directive('niceUpload', function ($timeout, gettextCatalog) {
4614
4563
  return {
4615
4564
  restrict: 'E',
4616
4565
  replace: true,
@@ -4633,9 +4582,9 @@ angular.module('niceElements')
4633
4582
  help: '@'
4634
4583
  },
4635
4584
 
4636
- link: function(scope, element, attrs, ctrl){
4585
+ link: function(scope, element, attrs){
4637
4586
  if (!attrs.title) { attrs.title = ''; }
4638
- if (!attrs.text) { attrs.text = 'Click to upload file'; }
4587
+ if (!attrs.text) { attrs.text = gettextCatalog.getString('Click to upload file', null, 'Nice'); }
4639
4588
  if (!attrs.fieldWidth) { attrs.fieldWidth = 'col-sm-8'; }
4640
4589
  if (!attrs.labelWidth) { attrs.labelWidth = 'col-sm-4'; }
4641
4590
  attrs.noMargin = angular.isDefined(attrs.noMargin);
@@ -4694,7 +4643,7 @@ angular.module('niceElements')
4694
4643
  }
4695
4644
  } else {
4696
4645
  // Handle file too big error
4697
- scope.error = "File must be smaller than 1MB";
4646
+ scope.error = gettextCatalog.getString("File must be smaller than 1MB", null, "Nice");
4698
4647
  scope.loading = false;
4699
4648
  scope.imageSource = null;
4700
4649
  }
@@ -4703,7 +4652,7 @@ angular.module('niceElements')
4703
4652
 
4704
4653
  } catch (err) {
4705
4654
  // Handle try catch
4706
- scope.error = "Something went wrong";
4655
+ scope.error = gettextCatalog.getString("Something went wrong", null, "Nice");
4707
4656
  scope.loading = false;
4708
4657
  scope.imageSource = null;
4709
4658
  }
@@ -4755,9 +4704,9 @@ angular.module('niceElements')
4755
4704
  isInline: '=',
4756
4705
  help: '@'
4757
4706
  },
4758
- controller: function($scope, $attrs) {
4759
- if (!$attrs.yes) { $attrs.yes = 'Yes'; }
4760
- if (!$attrs.no) { $attrs.no = 'No'; }
4707
+ controller: function($scope, $attrs, gettextCatalog) {
4708
+ if (!$attrs.yes) { $attrs.yes = gettextCatalog.getString('Yes', null, "Nice"); }
4709
+ if (!$attrs.no) { $attrs.no = gettextCatalog.getString('No', null, "Nice"); }
4761
4710
  if (!$attrs.title) { $attrs.title = ''; }
4762
4711
  if (!$attrs.fieldWidth) { $attrs.fieldWidth = 'col-sm-8'; }
4763
4712
  if (!$attrs.labelWidth) { $attrs.labelWidth = 'col-sm-4'; }
@@ -4905,18 +4854,18 @@ angular.module('niceElements').run(['$templateCache', function($templateCache) {
4905
4854
  "<div class=\"disabled-shield\" ng-if=\"isDisabled\"></div>\n" +
4906
4855
  "<div class=\"nice-calendar-wrapper\">\n" +
4907
4856
  "<div class=\"header\">\n" +
4908
- "<i class=\"fa fa-angle-left\" ng-click=\"previous()\" title=\"{{ translations.prevMonth }}\"></i>\n" +
4857
+ "<i class=\"fa fa-angle-left\" ng-click=\"previous()\" title=\"{{ 'Previous month' | translate:'Nice' }}\"></i>\n" +
4909
4858
  "<span title=\"{{ month.format('M.YYYY' )}}\">{{ month.format(\"MMMM, YYYY\" )}}</span>\n" +
4910
- "<i class=\"fa fa-angle-right\" ng-click=\"next()\" title=\"{{ translations.nextMonth }}\"></i>\n" +
4859
+ "<i class=\"fa fa-angle-right\" ng-click=\"next()\" title=\"{{ 'Next month' | translate:'Nice' }}\"></i>\n" +
4911
4860
  "</div>\n" +
4912
4861
  "<div class=\"week names\">\n" +
4913
- "<span class=\"day\" translate>{{ translations.mon }}</span>\n" +
4914
- "<span class=\"day\" translate>{{ translations.tue }}</span>\n" +
4915
- "<span class=\"day\" translate>{{ translations.wed }}</span>\n" +
4916
- "<span class=\"day\" translate>{{ translations.thu }}</span>\n" +
4917
- "<span class=\"day\" translate>{{ translations.fri }}</span>\n" +
4918
- "<span class=\"day weekend\" translate>{{ translations.sat }}</span>\n" +
4919
- "<span class=\"day weekend\" translate>{{ translations.sun }}</span>\n" +
4862
+ "<span class=\"day\" translate translate-context=\"Nice\">Mon</span>\n" +
4863
+ "<span class=\"day\" translate translate-context=\"Nice\">Tue</span>\n" +
4864
+ "<span class=\"day\" translate translate-context=\"Nice\">Wed</span>\n" +
4865
+ "<span class=\"day\" translate translate-context=\"Nice\">Thu</span>\n" +
4866
+ "<span class=\"day\" translate translate-context=\"Nice\">Fri</span>\n" +
4867
+ "<span class=\"day weekend\" translate translate-context=\"Nice\">Sat</span>\n" +
4868
+ "<span class=\"day weekend\" translate translate-context=\"Nice\">Sun</span>\n" +
4920
4869
  "</div>\n" +
4921
4870
  "<div class=\"week\" ng-repeat=\"week in weeks\">\n" +
4922
4871
  "<span class=\"day\" title=\"{{ day.date.format('D.M.YYYY') }}\" ng-class=\"{\n" +
@@ -4941,32 +4890,32 @@ angular.module('niceElements').run(['$templateCache', function($templateCache) {
4941
4890
  "<div class=\"clearfix\"></div>\n" +
4942
4891
  "<div class=\"nice-calendar-time\" ng-if=\"time\">\n" +
4943
4892
  "<div class=\"time-picker\">\n" +
4944
- "<select title=\"{{ translations.selectStartTime }}\" class=\"time-picker-hour\" ng-model=\"startDateHour\" ng-change=\"startHourChange(startDateHour)\" ng-options=\"hour for hour in hours\">\n" +
4893
+ "<select title=\"{{ 'Select start time' | translate:'Nice' }}\" class=\"time-picker-hour\" ng-model=\"startDateHour\" ng-change=\"startHourChange(startDateHour)\" ng-options=\"hour for hour in hours\">\n" +
4945
4894
  "</select>\n" +
4946
4895
  "</div>\n" +
4947
4896
  "<div class=\"time-picker\">\n" +
4948
- "<select title=\"{{ translations.selectStartTime }}\" class=\"time-picker-minute\" ng-model=\"startDateMinute\" ng-change=\"startMinuteChange(startDateMinute)\" ng-options=\"minute for minute in minutes\">\n" +
4897
+ "<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" +
4949
4898
  "</select>\n" +
4950
4899
  "</div>\n" +
4951
4900
  "<div class=\"time-picket-icon\">\n" +
4952
4901
  "<i class=\"fa fa-clock-o\"></i>\n" +
4953
4902
  "</div>\n" +
4954
4903
  "<div class=\"time-picker\">\n" +
4955
- "<select title=\"{{ translations.selectEndTime }}\" class=\"time-picker-hour\" ng-model=\"endDateHour\" ng-change=\"endHourChange(endDateHour)\" ng-options=\"hour for hour in hours\">\n" +
4904
+ "<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" +
4956
4905
  "</select>\n" +
4957
4906
  "</div>\n" +
4958
4907
  "<div class=\"time-picker no-border-right\">\n" +
4959
- "<select title=\"{{ translations.selectEndTime }}\" class=\"time-picker-minute\" ng-model=\"endDateMinute\" ng-change=\"endMinuteChange(endDateMinute)\" ng-options=\"minute for minute in minutes\">\n" +
4908
+ "<select title=\"{{ 'Select end time' | translate:'Nice' }}\" class=\"time-picker-minute\" ng-model=\"endDateMinute\" ng-change=\"endMinuteChange(endDateMinute)\" ng-options=\"minute for minute in minutes\">\n" +
4960
4909
  "</select>\n" +
4961
4910
  "</div>\n" +
4962
4911
  "</div>\n" +
4963
4912
  "<div class=\"nice-selected-dates\">\n" +
4964
4913
  "<div class=\"nice-start-date\">\n" +
4965
- "<label>{{ translations.start }}</label>\n" +
4914
+ "<label translate translate-context=\"Nice\">Start</label>\n" +
4966
4915
  "<div ng-class=\"startTimeClass\">{{ formatDate(startDate) }}</div>\n" +
4967
4916
  "</div>\n" +
4968
4917
  "<div class=\"nice-end-date\">\n" +
4969
- "<label>{{ translations.end }}</label>\n" +
4918
+ "<label translate translate-context=\"Nice\">End</label>\n" +
4970
4919
  "<div ng-class=\"endTimeClass\">{{ formatDate(endDate) }}</div>\n" +
4971
4920
  "</div>\n" +
4972
4921
  "<div class=\"clearfix\"></div>\n" +
@@ -5146,14 +5095,14 @@ angular.module('niceElements').run(['$templateCache', function($templateCache) {
5146
5095
  "<div class=\"dtp-wrapper\" ng-show=\"isOpen\">\n" +
5147
5096
  "<div class=\"dtp-buttons-left\">\n" +
5148
5097
  "<div class=\"dtp-buttons-top\">\n" +
5149
- "<a class=\"btn btn-primary btn-block\" ng-click=\"selectToday()\">Last 24 hours</a>\n" +
5150
- "<a class=\"btn btn-primary btn-block\" ng-click=\"selectLastNDays(7)\">Last 7 days</a>\n" +
5151
- "<a class=\"btn btn-primary btn-block\" ng-click=\"selectLastMonth()\">Last month</a>\n" +
5152
- "<a class=\"btn btn-primary btn-block\" ng-click=\"selectThisMonth()\">This month</a>\n" +
5098
+ "<a class=\"btn btn-primary btn-block\" ng-click=\"selectToday()\" translate translate-context=\"Nice\">Last 24 hours</a>\n" +
5099
+ "<a class=\"btn btn-primary btn-block\" ng-click=\"selectLastNDays(7)\" translate translate-context=\"Nice\">Last 7 days</a>\n" +
5100
+ "<a class=\"btn btn-primary btn-block\" ng-click=\"selectLastMonth()\" translate translate-context=\"Nice\">Last month</a>\n" +
5101
+ "<a class=\"btn btn-primary btn-block\" ng-click=\"selectThisMonth()\" translate translate-context=\"Nice\">This month</a>\n" +
5153
5102
  "</div>\n" +
5154
5103
  "<div class=\"dtp-buttons-bottom\">\n" +
5155
- "<a class=\"btn btn-danger btn-block\" ng-click=\"close()\">Cancel</a>\n" +
5156
- "<a class=\"btn btn-success btn-block\" ng-click=\"confirm()\">OK</a>\n" +
5104
+ "<a class=\"btn btn-danger btn-block\" ng-click=\"close()\" translate translate-context=\"Nice\">Cancel</a>\n" +
5105
+ "<a class=\"btn btn-success btn-block\" ng-click=\"confirm()\" translate translate-context=\"Nice\">OK</a>\n" +
5157
5106
  "</div>\n" +
5158
5107
  "</div>\n" +
5159
5108
  "<div class=\"dtp-left\">\n" +
@@ -5190,10 +5139,10 @@ angular.module('niceElements').run(['$templateCache', function($templateCache) {
5190
5139
  "<div class=\"dtp-range-wrapper\" ng-show=\"showDtpRange\">\n" +
5191
5140
  "<div class=\"dtp-layer\">\n" +
5192
5141
  "<div class=\"dtp-buttons-left\">\n" +
5193
- "<a class=\"btn btn-primary btn-block\" ng-click=\"selectLastNDays(1)\">Last 24 hours</a>\n" +
5194
- "<a class=\"btn btn-primary btn-block\" ng-click=\"selectLastNDays(7)\">Last 7 days</a>\n" +
5195
- "<a class=\"btn btn-primary btn-block\" ng-click=\"selectLastMonth()\">Last month</a>\n" +
5196
- "<a class=\"btn btn-primary btn-block\" ng-click=\"selectThisMonth()\">This month</a>\n" +
5142
+ "<a class=\"btn btn-primary btn-block\" ng-click=\"selectLastNDays(1)\" translate translate-context=\"Nice\">Last 24 hours</a>\n" +
5143
+ "<a class=\"btn btn-primary btn-block\" ng-click=\"selectLastNDays(7)\" translate translate-context=\"Nice\">Last 7 days</a>\n" +
5144
+ "<a class=\"btn btn-primary btn-block\" ng-click=\"selectLastMonth()\" translate translate-context=\"Nice\">Last month</a>\n" +
5145
+ "<a class=\"btn btn-primary btn-block\" ng-click=\"selectThisMonth()\" translate translate-context=\"Nice\">This month</a>\n" +
5197
5146
  "</div>\n" +
5198
5147
  "<div class=\"dtp-left\">\n" +
5199
5148
  "<nice-dtp model=\"dateStart\" format=\"{{format}}\" model-format=\"{{modelFormat}}\" date=\"{{date}}\" time=\"{{time}}\" width=\"{{width}}\" enable-ok-buttons=\"{{enableOkButtons}}\" lang=\"{{lang}}\" min-date=\"{{minDate}}\" max-date=\"{{maxDate}}\" week-start=\"{{weekStart}}\" ok-text=\"{{okText}}\" cancel-text=\"{{cancelText}}\" inline=\"true\"></nice-dtp>\n" +
@@ -5202,8 +5151,8 @@ angular.module('niceElements').run(['$templateCache', function($templateCache) {
5202
5151
  "<nice-dtp model=\"dateEnd\" format=\"{{format}}\" model-format=\"{{modelFormat}}\" date=\"{{date}}\" time=\"{{time}}\" width=\"{{width}}\" enable-ok-buttons=\"{{enableOkButtons}}\" lang=\"{{lang}}\" min-date=\"{{minDate}}\" max-date=\"{{maxDate}}\" week-start=\"{{weekStart}}\" ok-text=\"{{okText}}\" cancel-text=\"{{cancelText}}\" inline=\"true\"></nice-dtp>\n" +
5203
5152
  "</div>\n" +
5204
5153
  "<div class=\"dtp-buttons-bottom\">\n" +
5205
- "<a class=\"btn btn-danger btn-block margin-right-20\" ng-click=\"cancelClick()\">Cancel</a>\n" +
5206
- "<a class=\"btn btn-success btn-block\" ng-click=\"okClick()\">OK</a>\n" +
5154
+ "<a class=\"btn btn-danger btn-block margin-right-20\" ng-click=\"cancelClick()\" translate translate-context=\"Nice\">Cancel</a>\n" +
5155
+ "<a class=\"btn btn-success btn-block\" ng-click=\"okClick()\" translate translate-context=\"Nice\">OK</a>\n" +
5207
5156
  "</div>\n" +
5208
5157
  "</div>\n" +
5209
5158
  "</div>\n" +
@@ -5258,9 +5207,9 @@ angular.module('niceElements').run(['$templateCache', function($templateCache) {
5258
5207
  "<span ng-if=\"internalSelected.color_hex_code\" class=\"dropdown-color\" ng-style=\"{'background': internalSelected.color_hex_code}\"></span>\n" +
5259
5208
  "<span ng-if=\"!multiple\">{{ getLabel(internalSelected) }}</span>\n" +
5260
5209
  "<span ng-if=\"multiple\">\n" +
5261
- "<span ng-if=\"internalSelected.length > 1\">{{ internalSelected.length }}<translate>selected</translate></span>\n" +
5210
+ "<span ng-if=\"internalSelected.length > 1\">{{ internalSelected.length }}<translate translate-context=\"Nice\">selected</translate></span>\n" +
5262
5211
  "<span ng-if=\"internalSelected.length == 1\">{{ getLabel(internalSelected[0]) }}</span>\n" +
5263
- "<span ng-if=\"internalSelected.length == 0\" translate>None</span>\n" +
5212
+ "<span ng-if=\"internalSelected.length == 0\" translate translate-context=\"Nice\">None</span>\n" +
5264
5213
  "</span>\n" +
5265
5214
  "<span class=\"caret\"></span>\n" +
5266
5215
  "</button>\n" +
@@ -5451,12 +5400,12 @@ angular.module('niceElements').run(['$templateCache', function($templateCache) {
5451
5400
  "<span class=\"input-group-addon\" ng-if=\"symbol\">{{ symbol }}</span>\n" +
5452
5401
  "</div>\n" +
5453
5402
  "<div ng-if=\"forma.$error && forma.$dirty\">\n" +
5454
- "<div class=\"error-message\" ng-if=\"forma.$dirty && forma.$error.email\" translate>Email is not valid.</div>\n" +
5455
- "<div class=\"error-message\" ng-if=\"forma.$dirty && forma.$error.pattern\" translate>This field requires a specific pattern.</div>\n" +
5456
- "<div class=\"error-message\" ng-if=\"forma.$error.minlength\"><translate>Your input is too short. It must contain at least</translate>{{ minlength }}<translate>characters</translate>.</div>\n" +
5457
- "<div class=\"error-message\" ng-if=\"forma.$error.maxlength\" translate>Your input is too long</div>\n" +
5458
- "<div class=\"error-message\" ng-if=\"forma.$error.required\" ng-if=\"forma.$dirty\" translate>This field is required.</div>\n" +
5459
- "<div class=\"error-message\" ng-if=\"forma.$error.unique\" translate>This field must be unique.</div>\n" +
5403
+ "<div class=\"error-message\" ng-if=\"forma.$dirty && forma.$error.email\" translate translate-context=\"Nice\">Email is not valid.</div>\n" +
5404
+ "<div class=\"error-message\" ng-if=\"forma.$dirty && forma.$error.pattern\" translate translate-context=\"Nice\">This field requires a specific pattern.</div>\n" +
5405
+ "<div class=\"error-message\" ng-if=\"forma.$error.minlength\"><translate translate-context=\"Nice\">Your input is too short. It must contain at least</translate>{{ minlength }}<translate translate-context=\"Nice\">characters</translate>.</div>\n" +
5406
+ "<div class=\"error-message\" ng-if=\"forma.$error.maxlength\" translate translate-context=\"Nice\">Your input is too long</div>\n" +
5407
+ "<div class=\"error-message\" ng-if=\"forma.$error.required\" ng-if=\"forma.$dirty\" translate translate-context=\"Nice\">This field is required.</div>\n" +
5408
+ "<div class=\"error-message\" ng-if=\"forma.$error.unique\" translate translate-context=\"Nice\">This field must be unique.</div>\n" +
5460
5409
  "</div>\n" +
5461
5410
  "</div>\n" +
5462
5411
  "</div>\n" +
@@ -5480,10 +5429,12 @@ angular.module('niceElements').run(['$templateCache', function($templateCache) {
5480
5429
 
5481
5430
 
5482
5431
  $templateCache.put('src/components/nice-loader/nice-loader.html',
5483
- "<div class=\"nice-loader\" ng-if=\"!visibleWhen\" ng-class=\"addClass\">\n" +
5432
+ "<div class=\"nice-loader\" ng-if=\"!visibleWhen\" ng-class=\"[addClass, { 'nice-loader-fullscreen': fullscreen, 'nice-loader-fulldiv': fulldiv }]\">\n" +
5484
5433
  "<svg version=\"1.1\" id=\"loader\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" x=\"0px\" y=\"0px\" width=\"40px\" height=\"40px\" viewBox=\"0 0 50 50\" style=\"enable-background:new 0 0 50 50;\" xml:space=\"preserve\">\n" +
5485
5434
  "<path fill=\"#000\" d=\"M43.935,25.145c0-10.318-8.364-18.683-18.683-18.683c-10.318,0-18.683,8.365-18.683,18.683h4.068c0-8.071,6.543-14.615,14.615-14.615c8.072,0,14.615,6.543,14.615,14.615H43.935z\"></path>\n" +
5486
5435
  "</svg>\n" +
5436
+ "<div class=\"nice-loader-message\" ng-if=\"message\">{{ message }}</div>\n" +
5437
+ "<ng-transclude></ng-transclude>\n" +
5487
5438
  "</div>"
5488
5439
  );
5489
5440
 
@@ -5514,11 +5465,11 @@ angular.module('niceElements').run(['$templateCache', function($templateCache) {
5514
5465
  "</span>\n" +
5515
5466
  "</div>\n" +
5516
5467
  "<div class=\"error-messages\" ng-if=\"form.$error && !hideError\" ng-class=\"{ 'floating-error': floatingError }\">\n" +
5517
- "<div class=\"error-message\" ng-if=\"form.$dirty && form.$error.number\" translate>This field requires a number</div>\n" +
5518
- "<div class=\"error-message\" ng-if=\"form.$error.min\"><translate>Minimum value is</translate>{{ min }}</div>\n" +
5519
- "<div class=\"error-message\" ng-if=\"form.$error.max\"><translate>Maximum value is</translate>{{ max }}</div>\n" +
5520
- "<div class=\"error-message\" ng-if=\"form.$error.zero\"><translate>0 is not allowed</translate></div>\n" +
5521
- "<div class=\"error-message\" ng-if=\"form.$error.noValue && !form.$error.zero && !form.$error.min && !form.$error.max\"><translate>Value is missing</translate></div>\n" +
5468
+ "<div class=\"error-message\" ng-if=\"form.$dirty && form.$error.number\" translate translate-context=\"Nice\">This field requires a number</div>\n" +
5469
+ "<div class=\"error-message\" ng-if=\"form.$error.min\"><translate translate-context=\"Nice\">Minimum value is</translate>{{ min }}</div>\n" +
5470
+ "<div class=\"error-message\" ng-if=\"form.$error.max\"><translate translate-context=\"Nice\">Maximum value is</translate>{{ max }}</div>\n" +
5471
+ "<div class=\"error-message\" ng-if=\"form.$error.zero\"><translate translate-context=\"Nice\">0 is not allowed</translate></div>\n" +
5472
+ "<div class=\"error-message\" ng-if=\"form.$error.noValue && !form.$error.zero && !form.$error.min && !form.$error.max\"><translate translate-context=\"Nice\">Value is missing</translate></div>\n" +
5522
5473
  "</div>\n" +
5523
5474
  "</div>\n" +
5524
5475
  "</div>\n" +
@@ -5543,8 +5494,8 @@ angular.module('niceElements').run(['$templateCache', function($templateCache) {
5543
5494
  "<span class=\"input-group-addon\">%</span>\n" +
5544
5495
  "</div>\n" +
5545
5496
  "<div ng-if=\"form.$error\">\n" +
5546
- "<div class=\"error-message\" ng-if=\"form.$dirty && form.$error.pattern\">This field requires a specific pattern.</div>\n" +
5547
- "<div class=\"error-message\" ng-if=\"form.$dirty && form.$error.required\">This field is required.</div>\n" +
5497
+ "<div class=\"error-message\" ng-if=\"form.$dirty && form.$error.pattern\" translate translate-context=\"Nice\">This field requires a specific pattern.</div>\n" +
5498
+ "<div class=\"error-message\" ng-if=\"form.$dirty && form.$error.required\" translate translate-context=\"Nice\">This field is required.</div>\n" +
5548
5499
  "</div>\n" +
5549
5500
  "</div>\n" +
5550
5501
  "</div>\n" +
@@ -5623,7 +5574,7 @@ angular.module('niceElements').run(['$templateCache', function($templateCache) {
5623
5574
  "<div ng-class=\"labelWidth ? labelWidth : 'col-sm-4'\" ng-if=\"title\"></div>\n" +
5624
5575
  "<div ng-class=\"fieldWidth ? fieldWidth : 'col-sm-8'\">\n" +
5625
5576
  "<div class=\"nice-dropdown-empty\" ng-if=\"noResults\">\n" +
5626
- "<div class=\"nice-search-row\">No results found.</div>\n" +
5577
+ "<div class=\"nice-search-row\" translate translate-context=\"Nice\">No results found.</div>\n" +
5627
5578
  "</div>\n" +
5628
5579
  "<div class=\"nice-dropdown\" ng-if=\"results.length\">\n" +
5629
5580
  "<div ng-repeat=\"result in results\" class=\"nice-search-row\" ng-class=\"{'active': selectedIndex == $index}\" ng-click=\"selectRow(result)\">\n" +
@@ -5654,7 +5605,7 @@ angular.module('niceElements').run(['$templateCache', function($templateCache) {
5654
5605
  "<div class=\"nice-search-row nice-search-row-loading\" ng-if=\"loading && results.length == 0\">\n" +
5655
5606
  "<nice-loader visible-when=\"!loading\"></nice-loader>\n" +
5656
5607
  "</div>\n" +
5657
- "<div class=\"nice-search-row nice-search-row-empty\" ng-if=\"!loading && results.length == 0\">No results found.</div>\n" +
5608
+ "<div class=\"nice-search-row nice-search-row-empty\" ng-if=\"!loading && results.length == 0\" translate translate-context=\"Nice\">No results found.</div>\n" +
5658
5609
  "<div ng-repeat=\"result in results\" class=\"nice-search-row\" ng-class=\"{'active': selectedIndex == $index}\" ng-click=\"selectItem(result)\">\n" +
5659
5610
  "<ng-transclude>{{ result[keyForInputLabel] }}</ng-transclude>\n" +
5660
5611
  "</div>\n" +