nice-elements 1.3.17 → 1.4.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.vscode/settings.json +4 -0
- package/CHANGELOG.md +15 -0
- package/LICENSE.md +3 -3
- package/README.md +8 -10
- package/bower.json +3 -11
- package/dist/nice.js +187 -197
- package/dist/nice.min.js +1 -1
- package/dist/style.css +80 -10
- package/dist/style.css.map +3 -2
- package/dist/style.min.css +1 -1
- package/package.json +5 -4
- package/src/components/nice-calendar/nice-calendar.html +15 -15
- package/src/components/nice-calendar/nice-calendar.js +4 -26
- package/src/components/nice-date/nice-date.js +27 -8
- package/src/components/nice-date-range/nice-date-range.js +6 -40
- package/src/components/nice-datetime-picker/nice-datetime-picker.js +6 -6
- package/src/components/nice-datetimerange-picker/nice-datetimerange-picker.html +6 -6
- package/src/components/nice-datetimerange-picker/nice-datetimerange-picker.js +7 -7
- package/src/components/nice-datetimerange-picker-2/nice-datetimerange-picker-2.html +6 -6
- package/src/components/nice-datetimerange-picker-2/nice-datetimerange-picker-2.js +2 -2
- package/src/components/nice-dropdown/nice-dropdown.js +7 -7
- package/src/components/nice-dropdown-date/nice-dropdown-date.js +14 -14
- package/src/components/nice-dropdown-old/nice-dropdown-old.html +2 -2
- package/src/components/nice-dropdown-old/nice-dropdown-old.js +2 -2
- package/src/components/nice-dtp/nice-dtp.js +5 -5
- package/src/components/nice-help/nice-help.js +0 -6
- package/src/components/nice-help/nice-help.scss +8 -9
- package/src/components/nice-input/nice-input.html +6 -6
- package/src/components/nice-loader/nice-loader.html +3 -1
- package/src/components/nice-loader/nice-loader.js +6 -2
- package/src/components/nice-loader/nice-loader.scss +25 -2
- package/src/components/nice-notification/nice-notification.js +1 -2
- package/src/components/nice-number/nice-number.html +17 -10
- package/src/components/nice-number/nice-number.js +8 -8
- package/src/components/nice-percent/nice-percent.html +2 -2
- package/src/components/nice-search/nice-search.html +1 -1
- package/src/components/nice-search2/nice-search2.html +1 -1
- package/src/components/nice-tooltip/_nice-tooltip.scss +72 -0
- package/src/components/nice-tooltip/nice-tooltip.js +20 -0
- package/src/components/nice-upload/nice-upload.js +5 -5
- package/src/components/nice-yesno/nice-yesno.js +8 -9
- package/src/styles/_nice.scss +1 -0
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 =
|
|
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 =
|
|
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 =
|
|
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,
|
|
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
|
|
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
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
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 = [
|
|
905
|
+
$scope.weekdays = [
|
|
906
|
+
gettextCatalog.getString("Mon", null, "Nice"),
|
|
907
|
+
gettextCatalog.getString("Tue", null, "Nice"),
|
|
908
|
+
gettextCatalog.getString("Wed", null, "Nice"),
|
|
909
|
+
gettextCatalog.getString("Thu", null, "Nice"),
|
|
910
|
+
gettextCatalog.getString("Fri", null, "Nice"),
|
|
911
|
+
gettextCatalog.getString("Sat", null, "Nice"),
|
|
912
|
+
gettextCatalog.getString("Sun", null, "Nice")
|
|
913
|
+
];
|
|
962
914
|
|
|
963
915
|
$scope.years = [];
|
|
964
916
|
var year = moment().year()-100;
|
|
@@ -966,10 +918,21 @@ angular.module('niceElements')
|
|
|
966
918
|
$scope.years.push(year + i);
|
|
967
919
|
}
|
|
968
920
|
|
|
969
|
-
$scope.months =
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
921
|
+
$scope.months = [
|
|
922
|
+
{ value: 0, name: gettextCatalog.getString("January", null, "Nice") },
|
|
923
|
+
{ value: 1, name: gettextCatalog.getString("February", null, "Nice") },
|
|
924
|
+
{ value: 2, name: gettextCatalog.getString("March", null, "Nice") },
|
|
925
|
+
{ value: 3, name: gettextCatalog.getString("April", null, "Nice") },
|
|
926
|
+
{ value: 4, name: gettextCatalog.getString("May", null, "Nice") },
|
|
927
|
+
{ value: 5, name: gettextCatalog.getString("June", null, "Nice") },
|
|
928
|
+
{ value: 6, name: gettextCatalog.getString("July", null, "Nice") },
|
|
929
|
+
{ value: 7, name: gettextCatalog.getString("August", null, "Nice") },
|
|
930
|
+
{ value: 8, name: gettextCatalog.getString("September", null, "Nice") },
|
|
931
|
+
{ value: 9, name: gettextCatalog.getString("October", null, "Nice") },
|
|
932
|
+
{ value: 10, name: gettextCatalog.getString("November", null, "Nice") },
|
|
933
|
+
{ value: 11, name: gettextCatalog.getString("December", null, "Nice") }
|
|
934
|
+
]
|
|
935
|
+
|
|
973
936
|
|
|
974
937
|
if(!$scope.model) $scope.model = moment();
|
|
975
938
|
|
|
@@ -1207,7 +1170,7 @@ angular.module('niceElements').directive('niceDatetimePicker', function () {
|
|
|
1207
1170
|
templateUrl: 'src/components/nice-datetime-picker/nice-datetime-picker.html',
|
|
1208
1171
|
scope: {
|
|
1209
1172
|
model: '=', // binding model
|
|
1210
|
-
format: '@', // default: '
|
|
1173
|
+
format: '@', // default: 'D.M.YYYY • H:mm', format for input label string
|
|
1211
1174
|
date: '@', // default: true, is date picker enabled?
|
|
1212
1175
|
time: '@', // default: false, is time picker enabled?
|
|
1213
1176
|
width: '@', // default: 300, width of entire dtp-picker in px
|
|
@@ -1228,14 +1191,14 @@ angular.module('niceElements').directive('niceDatetimePicker', function () {
|
|
|
1228
1191
|
isInline: '=',
|
|
1229
1192
|
onChange: '&?'
|
|
1230
1193
|
},
|
|
1231
|
-
controller: function ($scope) {
|
|
1194
|
+
controller: function ($scope, gettextCatalog) {
|
|
1232
1195
|
$scope.date = $scope.date == 'true' || $scope.date == true;
|
|
1233
1196
|
$scope.time = $scope.time == 'true' || $scope.time == true;
|
|
1234
1197
|
$scope.noMargin === 'true' || $scope.noMargin === true;
|
|
1235
1198
|
$scope.enableOkButtons === 'true' || $scope.enableOkButtons === true;
|
|
1236
1199
|
$scope.lang = $scope.lang || 'en';
|
|
1237
|
-
$scope.okText = $scope.okText || 'OK';
|
|
1238
|
-
$scope.cancelText = $scope.cancelText || 'Cancel';
|
|
1200
|
+
$scope.okText = $scope.okText || gettextCatalog.getString('OK', null, 'Nice');
|
|
1201
|
+
$scope.cancelText = $scope.cancelText || gettextCatalog.getString('Cancel', null, 'Nice');
|
|
1239
1202
|
$scope.weekStart = parseInt($scope.weekStart) || 1;
|
|
1240
1203
|
$scope.width = parseInt($scope.width) || 300;
|
|
1241
1204
|
$scope.isOpen = false;
|
|
@@ -1243,11 +1206,11 @@ angular.module('niceElements').directive('niceDatetimePicker', function () {
|
|
|
1243
1206
|
|
|
1244
1207
|
if (!$scope.format) {
|
|
1245
1208
|
if ($scope.date && !$scope.time) {
|
|
1246
|
-
$scope.format = '
|
|
1209
|
+
$scope.format = 'D.M.YYYY';
|
|
1247
1210
|
} else if (!$scope.date && $scope.time) {
|
|
1248
1211
|
$scope.format = 'HH:mm';
|
|
1249
1212
|
} else {
|
|
1250
|
-
$scope.format = '
|
|
1213
|
+
$scope.format = 'D.M.YYYY • H:mm';
|
|
1251
1214
|
}
|
|
1252
1215
|
}
|
|
1253
1216
|
|
|
@@ -1293,7 +1256,7 @@ angular.module('niceElements')
|
|
|
1293
1256
|
scope: {
|
|
1294
1257
|
startDate: '=', // binding model
|
|
1295
1258
|
endDate: '=', // binding model
|
|
1296
|
-
formatString: '@', // default: '
|
|
1259
|
+
formatString: '@', // default: 'D.M.YYYY • H:mm', format for input label string
|
|
1297
1260
|
modelFormat: '@',
|
|
1298
1261
|
time: '@', // default: false, is time picker enabled?
|
|
1299
1262
|
minDate: '@', // default: undefined
|
|
@@ -1319,7 +1282,7 @@ angular.module('niceElements')
|
|
|
1319
1282
|
|
|
1320
1283
|
// Set format string
|
|
1321
1284
|
if(!$scope.formatString) {
|
|
1322
|
-
if($scope.time) $scope.formatString = 'D.M.YYYY H:mm';
|
|
1285
|
+
if($scope.time) $scope.formatString = 'D.M.YYYY • H:mm';
|
|
1323
1286
|
else $scope.formatString = 'D.M.YYYY';
|
|
1324
1287
|
}
|
|
1325
1288
|
|
|
@@ -1431,12 +1394,12 @@ angular.module('niceElements')
|
|
|
1431
1394
|
* # niceDatetimerangePicker
|
|
1432
1395
|
*/
|
|
1433
1396
|
angular.module('niceElements')
|
|
1434
|
-
.directive('niceDatetimerangePicker',
|
|
1397
|
+
.directive('niceDatetimerangePicker', function(gettextCatalog) {
|
|
1435
1398
|
return {
|
|
1436
1399
|
scope: {
|
|
1437
1400
|
modelStart: '=', // binding model
|
|
1438
1401
|
modelEnd: '=', // binding model
|
|
1439
|
-
format: '@', // default: '
|
|
1402
|
+
format: '@', // default: 'D.M.YYYY • H:mm', format for input label string
|
|
1440
1403
|
modelFormat: '@',
|
|
1441
1404
|
date: '@', // default: true, is date picker enabled?
|
|
1442
1405
|
time: '@', // default: false, is time picker enabled?
|
|
@@ -1461,22 +1424,22 @@ angular.module('niceElements')
|
|
|
1461
1424
|
},
|
|
1462
1425
|
templateUrl: 'src/components/nice-datetimerange-picker/nice-datetimerange-picker.html',
|
|
1463
1426
|
link: {
|
|
1464
|
-
pre: function($scope
|
|
1427
|
+
pre: function($scope) {
|
|
1465
1428
|
// Default parameters
|
|
1466
1429
|
var params = {
|
|
1467
1430
|
title: '',
|
|
1468
1431
|
noMargin: false,
|
|
1469
1432
|
fieldWidth: 'col-sm-8',
|
|
1470
1433
|
labelWidth: 'col-sm-4',
|
|
1471
|
-
format: 'D.M.YYYY H:mm',
|
|
1434
|
+
format: 'D.M.YYYY • H:mm',
|
|
1472
1435
|
modelFormat: 'YYYY-MM-DDTHH:mm:ss.SSS',
|
|
1473
1436
|
minDate: null,
|
|
1474
1437
|
maxDate: null,
|
|
1475
1438
|
lang: 'en',
|
|
1476
1439
|
weekStart: 1,
|
|
1477
1440
|
shortTime: false,
|
|
1478
|
-
cancelText: 'Cancel',
|
|
1479
|
-
okText: 'OK',
|
|
1441
|
+
cancelText: gettextCatalog.getString('Cancel', null, 'Nice'),
|
|
1442
|
+
okText: gettextCatalog.getString('OK', null, 'Nice'),
|
|
1480
1443
|
date: true,
|
|
1481
1444
|
time: false,
|
|
1482
1445
|
width: 300,
|
|
@@ -1667,7 +1630,7 @@ angular.module('niceElements')
|
|
|
1667
1630
|
}
|
|
1668
1631
|
};
|
|
1669
1632
|
|
|
1670
|
-
}
|
|
1633
|
+
});
|
|
1671
1634
|
'use strict';
|
|
1672
1635
|
|
|
1673
1636
|
/**
|
|
@@ -1677,7 +1640,7 @@ angular.module('niceElements')
|
|
|
1677
1640
|
* # niceDropdownDate
|
|
1678
1641
|
*/
|
|
1679
1642
|
angular.module('niceElements')
|
|
1680
|
-
.directive('niceDropdownDate', function (){
|
|
1643
|
+
.directive('niceDropdownDate', function (gettextCatalog) {
|
|
1681
1644
|
return {
|
|
1682
1645
|
restrict: 'E',
|
|
1683
1646
|
replace: true,
|
|
@@ -1699,18 +1662,18 @@ angular.module('niceElements')
|
|
|
1699
1662
|
link: function ($scope) {
|
|
1700
1663
|
$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
1664
|
$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' }
|
|
1665
|
+
{ value: 0, name: gettextCatalog.getString('Jan', null, 'Nice') },
|
|
1666
|
+
{ value: 1, name: gettextCatalog.getString('Feb', null, 'Nice') },
|
|
1667
|
+
{ value: 2, name: gettextCatalog.getString('Mar', null, 'Nice') },
|
|
1668
|
+
{ value: 3, name: gettextCatalog.getString('Apr', null, 'Nice') },
|
|
1669
|
+
{ value: 4, name: gettextCatalog.getString('May', null, 'Nice') },
|
|
1670
|
+
{ value: 5, name: gettextCatalog.getString('Jun', null, 'Nice') },
|
|
1671
|
+
{ value: 6, name: gettextCatalog.getString('Jul', null, 'Nice') },
|
|
1672
|
+
{ value: 7, name: gettextCatalog.getString('Aug', null, 'Nice') },
|
|
1673
|
+
{ value: 8, name: gettextCatalog.getString('Sep', null, 'Nice') },
|
|
1674
|
+
{ value: 9, name: gettextCatalog.getString('Oct', null, 'Nice') },
|
|
1675
|
+
{ value: 10, name: gettextCatalog.getString('Nov', null, 'Nice') },
|
|
1676
|
+
{ value: 11, name: gettextCatalog.getString('Dec', null, 'Nice') }
|
|
1714
1677
|
];
|
|
1715
1678
|
|
|
1716
1679
|
|
|
@@ -1752,7 +1715,7 @@ angular.module('niceElements')
|
|
|
1752
1715
|
|
|
1753
1716
|
// validate that the date selected is accurate
|
|
1754
1717
|
$scope.checkDate = function(){
|
|
1755
|
-
var date = moment($scope.dateFields.day + "." + ($scope.dateFields.month + 1) + "." + $scope.dateFields.year, "
|
|
1718
|
+
var date = moment($scope.dateFields.day + "." + ($scope.dateFields.month + 1) + "." + $scope.dateFields.year, "D.M.YYYY");
|
|
1756
1719
|
|
|
1757
1720
|
if(date.isValid()){
|
|
1758
1721
|
// Format
|
|
@@ -1830,11 +1793,11 @@ angular.module('niceElements')
|
|
|
1830
1793
|
isInline: '=',
|
|
1831
1794
|
onChange: '&?'
|
|
1832
1795
|
},
|
|
1833
|
-
controller: function($
|
|
1796
|
+
controller: function($scope, $element, gettextCatalog) {
|
|
1834
1797
|
if (!$scope.objValue) { $scope.objValue = 'value'; }
|
|
1835
1798
|
if (!$scope.objKey) { $scope.objKey = 'id'; }
|
|
1836
1799
|
if (!$scope.list) { $scope.list = []; }
|
|
1837
|
-
if (!$scope.noOptionsText) { $scope.noOptionsText = "No options"; }
|
|
1800
|
+
if (!$scope.noOptionsText) { $scope.noOptionsText = gettextCatalog.getString("No options", null, "Nice"); }
|
|
1838
1801
|
if(!$scope.addButtonFunction) { $scope.addButtonFunction = null; }
|
|
1839
1802
|
if(!$scope.listenKeydown) { $scope.listenKeydown = false; }
|
|
1840
1803
|
$scope.valid = $scope.formDropdown;
|
|
@@ -2168,15 +2131,15 @@ angular.module('niceElements')
|
|
|
2168
2131
|
clearOnSelect: '@',
|
|
2169
2132
|
positionFixed: '=' // Dropdown menu will be fixed to page
|
|
2170
2133
|
},
|
|
2171
|
-
controller: function ($scope, $element, $timeout) {
|
|
2134
|
+
controller: function ($scope, $element, $timeout, gettextCatalog) {
|
|
2172
2135
|
if (!$scope.objValue) { $scope.objValue = 'value'; }
|
|
2173
2136
|
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"; }
|
|
2137
|
+
if (!$scope.noOptionsText) { $scope.noOptionsText = gettextCatalog.getString("No options", null, "Nice"); }
|
|
2138
|
+
if (!$scope.noDataText) { $scope.noDataText = gettextCatalog.getString("No options", null, "Nice"); }
|
|
2139
|
+
if (!$scope.searchText) { $scope.searchText = gettextCatalog.getString("Search...", null, "Nice"); }
|
|
2140
|
+
if (!$scope.nullableText) { $scope.nullableText = gettextCatalog.getString("None", null, "Nice"); }
|
|
2141
|
+
if (!$scope.selectText) { $scope.selectText = gettextCatalog.getString("None", null, "Nice"); }
|
|
2142
|
+
if (!$scope.selectedText) { $scope.selectedText = gettextCatalog.getString("selected", null, "Nice"); }
|
|
2180
2143
|
if (!$scope.addButtonFunction) { $scope.addButtonFunction = null; }
|
|
2181
2144
|
$scope.nullable = $scope.nullable === 'true' || $scope.nullable === true;
|
|
2182
2145
|
$scope.required = $scope.required === 'true' || $scope.required === true;
|
|
@@ -2500,7 +2463,7 @@ angular.module('niceElements')
|
|
|
2500
2463
|
scope: {
|
|
2501
2464
|
onChange: '&?', // function called on date changed
|
|
2502
2465
|
model: '=', // binding model
|
|
2503
|
-
format: '@', // default: '
|
|
2466
|
+
format: '@', // default: 'D.M.YYYY • H:mm', format for input label string
|
|
2504
2467
|
modelFormat: '@', // default: ''
|
|
2505
2468
|
//currentDate: '@',
|
|
2506
2469
|
date: '@', // default: true, is date picker enabled?
|
|
@@ -2521,7 +2484,7 @@ angular.module('niceElements')
|
|
|
2521
2484
|
closed: '='
|
|
2522
2485
|
},
|
|
2523
2486
|
templateUrl: 'src/components/nice-dtp/nice-dtp.html',
|
|
2524
|
-
|
|
2487
|
+
controller: function ($scope, $element, $attrs, gettextCatalog) {
|
|
2525
2488
|
|
|
2526
2489
|
// default parameters
|
|
2527
2490
|
var params = {
|
|
@@ -2529,15 +2492,15 @@ angular.module('niceElements')
|
|
|
2529
2492
|
noMargin: false,
|
|
2530
2493
|
fieldWidth: 'col-sm-8',
|
|
2531
2494
|
labelWidth: 'col-sm-4',
|
|
2532
|
-
format: '
|
|
2495
|
+
format: 'D.M.YYYY • H:mm',
|
|
2533
2496
|
modelFormat: 'YYYY-MM-DDTHH:mm:ss.SSS',
|
|
2534
2497
|
minDate: null,
|
|
2535
2498
|
maxDate: null,
|
|
2536
2499
|
lang: 'en',
|
|
2537
2500
|
weekStart: 1,
|
|
2538
2501
|
shortTime: false,
|
|
2539
|
-
cancelText: 'Cancel',
|
|
2540
|
-
okText: 'OK',
|
|
2502
|
+
cancelText: gettextCatalog.getString('Cancel', null, 'Nice'),
|
|
2503
|
+
okText: gettextCatalog.getString('OK', null, 'Nice'),
|
|
2541
2504
|
date: true,
|
|
2542
2505
|
time: false,
|
|
2543
2506
|
width: 300,
|
|
@@ -3332,12 +3295,6 @@ angular.module('niceElements')
|
|
|
3332
3295
|
restrict: 'E',
|
|
3333
3296
|
scope: {
|
|
3334
3297
|
text: '@'
|
|
3335
|
-
},
|
|
3336
|
-
link: function postLink(scope, element, attrs) {
|
|
3337
|
-
|
|
3338
|
-
},
|
|
3339
|
-
controller: function($rootScope, $scope) {
|
|
3340
|
-
|
|
3341
3298
|
}
|
|
3342
3299
|
};
|
|
3343
3300
|
});
|
|
@@ -3539,9 +3496,13 @@ angular.module('niceElements')
|
|
|
3539
3496
|
return {
|
|
3540
3497
|
templateUrl: 'src/components/nice-loader/nice-loader.html',
|
|
3541
3498
|
restrict: 'E',
|
|
3499
|
+
transclude: true,
|
|
3542
3500
|
scope: {
|
|
3543
|
-
|
|
3544
|
-
|
|
3501
|
+
visibleWhen: '=',
|
|
3502
|
+
message: '@',
|
|
3503
|
+
fullscreen: '@',
|
|
3504
|
+
fulldiv: '@',
|
|
3505
|
+
addClass: '@'
|
|
3545
3506
|
}
|
|
3546
3507
|
};
|
|
3547
3508
|
});
|
|
@@ -3554,13 +3515,12 @@ angular.module('niceElements')
|
|
|
3554
3515
|
*/
|
|
3555
3516
|
|
|
3556
3517
|
angular.module('niceElements')
|
|
3557
|
-
.factory('NiceNotification', function ($timeout, $http, $compile, $templateCache, $rootScope, $
|
|
3518
|
+
.factory('NiceNotification', function ($timeout, $http, $compile, $templateCache, $rootScope, $sce) {
|
|
3558
3519
|
|
|
3559
3520
|
var startTop = 10;
|
|
3560
3521
|
var startRight = 10;
|
|
3561
3522
|
var verticalSpacing = 10;
|
|
3562
3523
|
var horizontalSpacing = 10;
|
|
3563
|
-
var type = '';
|
|
3564
3524
|
var delay = 5000;
|
|
3565
3525
|
|
|
3566
3526
|
var messageElements = [];
|
|
@@ -3714,7 +3674,7 @@ angular.module('niceElements')
|
|
|
3714
3674
|
|
|
3715
3675
|
// Link form object with valid object
|
|
3716
3676
|
if ($scope.valid) {
|
|
3717
|
-
$scope.valid = $scope.
|
|
3677
|
+
$scope.valid = $scope.forma;
|
|
3718
3678
|
}
|
|
3719
3679
|
|
|
3720
3680
|
// Fix min
|
|
@@ -3758,9 +3718,9 @@ angular.module('niceElements')
|
|
|
3758
3718
|
// Check canAdd or canSubtract
|
|
3759
3719
|
$scope.check = function() {
|
|
3760
3720
|
if ($scope.required && ($scope.model == undefined || $scope.model == null)) {
|
|
3761
|
-
$scope.
|
|
3721
|
+
$scope.niceNumberForm.$setValidity("no-value", false);
|
|
3762
3722
|
} else {
|
|
3763
|
-
$scope.
|
|
3723
|
+
$scope.niceNumberForm.$setValidity("no-value", null);
|
|
3764
3724
|
}
|
|
3765
3725
|
|
|
3766
3726
|
if ($scope.min && parseFloat($scope.model) <= $scope.min) {
|
|
@@ -3778,9 +3738,9 @@ angular.module('niceElements')
|
|
|
3778
3738
|
}
|
|
3779
3739
|
|
|
3780
3740
|
if ($scope.preventZero && parseFloat($scope.model) == 0) {
|
|
3781
|
-
$scope.
|
|
3741
|
+
$scope.niceNumberForm.$setValidity("zero", false);
|
|
3782
3742
|
} else {
|
|
3783
|
-
$scope.
|
|
3743
|
+
$scope.niceNumberForm.$setValidity("zero", null);
|
|
3784
3744
|
}
|
|
3785
3745
|
|
|
3786
3746
|
if ($scope.onChange) $scope.onChange({ model: $scope.model });
|
|
@@ -3811,11 +3771,11 @@ angular.module('niceElements')
|
|
|
3811
3771
|
if ($scope.max) {
|
|
3812
3772
|
if (result <= parseFloat($scope.max)) {
|
|
3813
3773
|
$scope.model = result;
|
|
3814
|
-
$scope.
|
|
3774
|
+
$scope.niceNumberForm.$setDirty();
|
|
3815
3775
|
}
|
|
3816
3776
|
} else {
|
|
3817
3777
|
$scope.model = result;
|
|
3818
|
-
$scope.
|
|
3778
|
+
$scope.niceNumberForm.$setDirty();
|
|
3819
3779
|
}
|
|
3820
3780
|
$scope.check();
|
|
3821
3781
|
};
|
|
@@ -3826,7 +3786,7 @@ angular.module('niceElements')
|
|
|
3826
3786
|
var result = new Decimal($scope.model != undefined ? $scope.model : $scope.defaultValue).minus($scope.step).toNumber();
|
|
3827
3787
|
if (result >= Number($scope.min)) {
|
|
3828
3788
|
$scope.model = result;
|
|
3829
|
-
$scope.
|
|
3789
|
+
$scope.niceNumberForm.$setDirty();
|
|
3830
3790
|
}
|
|
3831
3791
|
$scope.check();
|
|
3832
3792
|
};
|
|
@@ -4603,6 +4563,27 @@ angular.module('niceElements')
|
|
|
4603
4563
|
});
|
|
4604
4564
|
'use strict';
|
|
4605
4565
|
|
|
4566
|
+
/**
|
|
4567
|
+
* @ngdoc directive
|
|
4568
|
+
* @name niceElements.directive:niceTooltip
|
|
4569
|
+
* @description
|
|
4570
|
+
* # niceTooltip
|
|
4571
|
+
*/
|
|
4572
|
+
angular.module('niceElements')
|
|
4573
|
+
.directive('niceTooltip', function() {
|
|
4574
|
+
return {
|
|
4575
|
+
restrict: 'EA',
|
|
4576
|
+
link: function(scope, element, attrs) {
|
|
4577
|
+
var html = element.html();
|
|
4578
|
+
element.addClass("nice-tooltip");
|
|
4579
|
+
html = html + "<span class='nice-tooltip-window'>" + attrs.niceTooltip + "</span>"
|
|
4580
|
+
element.html(html);
|
|
4581
|
+
}
|
|
4582
|
+
};
|
|
4583
|
+
});
|
|
4584
|
+
|
|
4585
|
+
'use strict';
|
|
4586
|
+
|
|
4606
4587
|
/**
|
|
4607
4588
|
* @ngdoc directive
|
|
4608
4589
|
* @name niceElements.directive:niceUpload
|
|
@@ -4610,7 +4591,7 @@ angular.module('niceElements')
|
|
|
4610
4591
|
* # niceUpload
|
|
4611
4592
|
*/
|
|
4612
4593
|
angular.module('niceElements')
|
|
4613
|
-
.directive('niceUpload', function ($timeout) {
|
|
4594
|
+
.directive('niceUpload', function ($timeout, gettextCatalog) {
|
|
4614
4595
|
return {
|
|
4615
4596
|
restrict: 'E',
|
|
4616
4597
|
replace: true,
|
|
@@ -4633,9 +4614,9 @@ angular.module('niceElements')
|
|
|
4633
4614
|
help: '@'
|
|
4634
4615
|
},
|
|
4635
4616
|
|
|
4636
|
-
link: function(scope, element, attrs
|
|
4617
|
+
link: function(scope, element, attrs){
|
|
4637
4618
|
if (!attrs.title) { attrs.title = ''; }
|
|
4638
|
-
if (!attrs.text) { attrs.text = 'Click to upload file'; }
|
|
4619
|
+
if (!attrs.text) { attrs.text = gettextCatalog.getString('Click to upload file', null, 'Nice'); }
|
|
4639
4620
|
if (!attrs.fieldWidth) { attrs.fieldWidth = 'col-sm-8'; }
|
|
4640
4621
|
if (!attrs.labelWidth) { attrs.labelWidth = 'col-sm-4'; }
|
|
4641
4622
|
attrs.noMargin = angular.isDefined(attrs.noMargin);
|
|
@@ -4694,7 +4675,7 @@ angular.module('niceElements')
|
|
|
4694
4675
|
}
|
|
4695
4676
|
} else {
|
|
4696
4677
|
// Handle file too big error
|
|
4697
|
-
scope.error = "File must be smaller than 1MB";
|
|
4678
|
+
scope.error = gettextCatalog.getString("File must be smaller than 1MB", null, "Nice");
|
|
4698
4679
|
scope.loading = false;
|
|
4699
4680
|
scope.imageSource = null;
|
|
4700
4681
|
}
|
|
@@ -4703,7 +4684,7 @@ angular.module('niceElements')
|
|
|
4703
4684
|
|
|
4704
4685
|
} catch (err) {
|
|
4705
4686
|
// Handle try catch
|
|
4706
|
-
scope.error = "Something went wrong";
|
|
4687
|
+
scope.error = gettextCatalog.getString("Something went wrong", null, "Nice");
|
|
4707
4688
|
scope.loading = false;
|
|
4708
4689
|
scope.imageSource = null;
|
|
4709
4690
|
}
|
|
@@ -4755,18 +4736,17 @@ angular.module('niceElements')
|
|
|
4755
4736
|
isInline: '=',
|
|
4756
4737
|
help: '@'
|
|
4757
4738
|
},
|
|
4758
|
-
controller: function($scope,
|
|
4759
|
-
if (!$
|
|
4760
|
-
if (!$
|
|
4761
|
-
if (!$
|
|
4762
|
-
if (!$
|
|
4763
|
-
if (!$
|
|
4739
|
+
controller: function($scope, gettextCatalog) {
|
|
4740
|
+
if (!$scope.yes) { $scope.yes = gettextCatalog.getString('Yes', null, "Nice"); }
|
|
4741
|
+
if (!$scope.no) { $scope.no = gettextCatalog.getString('No', null, "Nice"); }
|
|
4742
|
+
if (!$scope.title) { $scope.title = ''; }
|
|
4743
|
+
if (!$scope.fieldWidth) { $scope.fieldWidth = 'col-sm-8'; }
|
|
4744
|
+
if (!$scope.labelWidth) { $scope.labelWidth = 'col-sm-4'; }
|
|
4764
4745
|
if(!angular.isDefined($scope.model) && !angular.isDefined($scope.options)) $scope.model = !angular.isDefined($scope.defaultFalse);
|
|
4765
4746
|
if(!angular.isDefined($scope.modelValue) && angular.isDefined($scope.options)) $scope.modelValue = $scope.options[0];
|
|
4766
4747
|
|
|
4767
|
-
$
|
|
4768
|
-
$
|
|
4769
|
-
$attrs.isDisabled = angular.isDefined($attrs.isDisabled);
|
|
4748
|
+
$scope.defaultFalse = angular.isDefined($scope.defaultFalse);
|
|
4749
|
+
$scope.noMargin = angular.isDefined($scope.noMargin);
|
|
4770
4750
|
|
|
4771
4751
|
$scope.buttonClass = "";
|
|
4772
4752
|
|
|
@@ -4905,18 +4885,18 @@ angular.module('niceElements').run(['$templateCache', function($templateCache) {
|
|
|
4905
4885
|
"<div class=\"disabled-shield\" ng-if=\"isDisabled\"></div>\n" +
|
|
4906
4886
|
"<div class=\"nice-calendar-wrapper\">\n" +
|
|
4907
4887
|
"<div class=\"header\">\n" +
|
|
4908
|
-
"<i class=\"fa fa-angle-left\" ng-click=\"previous()\" title=\"{{
|
|
4888
|
+
"<i class=\"fa fa-angle-left\" ng-click=\"previous()\" title=\"{{ 'Previous month' | translate:'Nice' }}\"></i>\n" +
|
|
4909
4889
|
"<span title=\"{{ month.format('M.YYYY' )}}\">{{ month.format(\"MMMM, YYYY\" )}}</span>\n" +
|
|
4910
|
-
"<i class=\"fa fa-angle-right\" ng-click=\"next()\" title=\"{{
|
|
4890
|
+
"<i class=\"fa fa-angle-right\" ng-click=\"next()\" title=\"{{ 'Next month' | translate:'Nice' }}\"></i>\n" +
|
|
4911
4891
|
"</div>\n" +
|
|
4912
4892
|
"<div class=\"week names\">\n" +
|
|
4913
|
-
"<span class=\"day\" translate>
|
|
4914
|
-
"<span class=\"day\" translate>
|
|
4915
|
-
"<span class=\"day\" translate>
|
|
4916
|
-
"<span class=\"day\" translate>
|
|
4917
|
-
"<span class=\"day\" translate>
|
|
4918
|
-
"<span class=\"day weekend\" translate>
|
|
4919
|
-
"<span class=\"day weekend\" translate>
|
|
4893
|
+
"<span class=\"day\" translate translate-context=\"Nice\">Mon</span>\n" +
|
|
4894
|
+
"<span class=\"day\" translate translate-context=\"Nice\">Tue</span>\n" +
|
|
4895
|
+
"<span class=\"day\" translate translate-context=\"Nice\">Wed</span>\n" +
|
|
4896
|
+
"<span class=\"day\" translate translate-context=\"Nice\">Thu</span>\n" +
|
|
4897
|
+
"<span class=\"day\" translate translate-context=\"Nice\">Fri</span>\n" +
|
|
4898
|
+
"<span class=\"day weekend\" translate translate-context=\"Nice\">Sat</span>\n" +
|
|
4899
|
+
"<span class=\"day weekend\" translate translate-context=\"Nice\">Sun</span>\n" +
|
|
4920
4900
|
"</div>\n" +
|
|
4921
4901
|
"<div class=\"week\" ng-repeat=\"week in weeks\">\n" +
|
|
4922
4902
|
"<span class=\"day\" title=\"{{ day.date.format('D.M.YYYY') }}\" ng-class=\"{\n" +
|
|
@@ -4941,32 +4921,32 @@ angular.module('niceElements').run(['$templateCache', function($templateCache) {
|
|
|
4941
4921
|
"<div class=\"clearfix\"></div>\n" +
|
|
4942
4922
|
"<div class=\"nice-calendar-time\" ng-if=\"time\">\n" +
|
|
4943
4923
|
"<div class=\"time-picker\">\n" +
|
|
4944
|
-
"<select title=\"{{
|
|
4924
|
+
"<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
4925
|
"</select>\n" +
|
|
4946
4926
|
"</div>\n" +
|
|
4947
4927
|
"<div class=\"time-picker\">\n" +
|
|
4948
|
-
"<select title=\"{{
|
|
4928
|
+
"<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
4929
|
"</select>\n" +
|
|
4950
4930
|
"</div>\n" +
|
|
4951
4931
|
"<div class=\"time-picket-icon\">\n" +
|
|
4952
4932
|
"<i class=\"fa fa-clock-o\"></i>\n" +
|
|
4953
4933
|
"</div>\n" +
|
|
4954
4934
|
"<div class=\"time-picker\">\n" +
|
|
4955
|
-
"<select title=\"{{
|
|
4935
|
+
"<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
4936
|
"</select>\n" +
|
|
4957
4937
|
"</div>\n" +
|
|
4958
4938
|
"<div class=\"time-picker no-border-right\">\n" +
|
|
4959
|
-
"<select title=\"{{
|
|
4939
|
+
"<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
4940
|
"</select>\n" +
|
|
4961
4941
|
"</div>\n" +
|
|
4962
4942
|
"</div>\n" +
|
|
4963
4943
|
"<div class=\"nice-selected-dates\">\n" +
|
|
4964
4944
|
"<div class=\"nice-start-date\">\n" +
|
|
4965
|
-
"<label
|
|
4945
|
+
"<label translate translate-context=\"Nice\">Start</label>\n" +
|
|
4966
4946
|
"<div ng-class=\"startTimeClass\">{{ formatDate(startDate) }}</div>\n" +
|
|
4967
4947
|
"</div>\n" +
|
|
4968
4948
|
"<div class=\"nice-end-date\">\n" +
|
|
4969
|
-
"<label
|
|
4949
|
+
"<label translate translate-context=\"Nice\">End</label>\n" +
|
|
4970
4950
|
"<div ng-class=\"endTimeClass\">{{ formatDate(endDate) }}</div>\n" +
|
|
4971
4951
|
"</div>\n" +
|
|
4972
4952
|
"<div class=\"clearfix\"></div>\n" +
|
|
@@ -5146,14 +5126,14 @@ angular.module('niceElements').run(['$templateCache', function($templateCache) {
|
|
|
5146
5126
|
"<div class=\"dtp-wrapper\" ng-show=\"isOpen\">\n" +
|
|
5147
5127
|
"<div class=\"dtp-buttons-left\">\n" +
|
|
5148
5128
|
"<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" +
|
|
5129
|
+
"<a class=\"btn btn-primary btn-block\" ng-click=\"selectToday()\" translate translate-context=\"Nice\">Last 24 hours</a>\n" +
|
|
5130
|
+
"<a class=\"btn btn-primary btn-block\" ng-click=\"selectLastNDays(7)\" translate translate-context=\"Nice\">Last 7 days</a>\n" +
|
|
5131
|
+
"<a class=\"btn btn-primary btn-block\" ng-click=\"selectLastMonth()\" translate translate-context=\"Nice\">Last month</a>\n" +
|
|
5132
|
+
"<a class=\"btn btn-primary btn-block\" ng-click=\"selectThisMonth()\" translate translate-context=\"Nice\">This month</a>\n" +
|
|
5153
5133
|
"</div>\n" +
|
|
5154
5134
|
"<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" +
|
|
5135
|
+
"<a class=\"btn btn-danger btn-block\" ng-click=\"close()\" translate translate-context=\"Nice\">Cancel</a>\n" +
|
|
5136
|
+
"<a class=\"btn btn-success btn-block\" ng-click=\"confirm()\" translate translate-context=\"Nice\">OK</a>\n" +
|
|
5157
5137
|
"</div>\n" +
|
|
5158
5138
|
"</div>\n" +
|
|
5159
5139
|
"<div class=\"dtp-left\">\n" +
|
|
@@ -5190,10 +5170,10 @@ angular.module('niceElements').run(['$templateCache', function($templateCache) {
|
|
|
5190
5170
|
"<div class=\"dtp-range-wrapper\" ng-show=\"showDtpRange\">\n" +
|
|
5191
5171
|
"<div class=\"dtp-layer\">\n" +
|
|
5192
5172
|
"<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" +
|
|
5173
|
+
"<a class=\"btn btn-primary btn-block\" ng-click=\"selectLastNDays(1)\" translate translate-context=\"Nice\">Last 24 hours</a>\n" +
|
|
5174
|
+
"<a class=\"btn btn-primary btn-block\" ng-click=\"selectLastNDays(7)\" translate translate-context=\"Nice\">Last 7 days</a>\n" +
|
|
5175
|
+
"<a class=\"btn btn-primary btn-block\" ng-click=\"selectLastMonth()\" translate translate-context=\"Nice\">Last month</a>\n" +
|
|
5176
|
+
"<a class=\"btn btn-primary btn-block\" ng-click=\"selectThisMonth()\" translate translate-context=\"Nice\">This month</a>\n" +
|
|
5197
5177
|
"</div>\n" +
|
|
5198
5178
|
"<div class=\"dtp-left\">\n" +
|
|
5199
5179
|
"<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 +5182,8 @@ angular.module('niceElements').run(['$templateCache', function($templateCache) {
|
|
|
5202
5182
|
"<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
5183
|
"</div>\n" +
|
|
5204
5184
|
"<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" +
|
|
5185
|
+
"<a class=\"btn btn-danger btn-block margin-right-20\" ng-click=\"cancelClick()\" translate translate-context=\"Nice\">Cancel</a>\n" +
|
|
5186
|
+
"<a class=\"btn btn-success btn-block\" ng-click=\"okClick()\" translate translate-context=\"Nice\">OK</a>\n" +
|
|
5207
5187
|
"</div>\n" +
|
|
5208
5188
|
"</div>\n" +
|
|
5209
5189
|
"</div>\n" +
|
|
@@ -5258,9 +5238,9 @@ angular.module('niceElements').run(['$templateCache', function($templateCache) {
|
|
|
5258
5238
|
"<span ng-if=\"internalSelected.color_hex_code\" class=\"dropdown-color\" ng-style=\"{'background': internalSelected.color_hex_code}\"></span>\n" +
|
|
5259
5239
|
"<span ng-if=\"!multiple\">{{ getLabel(internalSelected) }}</span>\n" +
|
|
5260
5240
|
"<span ng-if=\"multiple\">\n" +
|
|
5261
|
-
"<span ng-if=\"internalSelected.length > 1\">{{ internalSelected.length }}<translate>selected</translate></span>\n" +
|
|
5241
|
+
"<span ng-if=\"internalSelected.length > 1\">{{ internalSelected.length }}<translate translate-context=\"Nice\">selected</translate></span>\n" +
|
|
5262
5242
|
"<span ng-if=\"internalSelected.length == 1\">{{ getLabel(internalSelected[0]) }}</span>\n" +
|
|
5263
|
-
"<span ng-if=\"internalSelected.length == 0\" translate>None</span>\n" +
|
|
5243
|
+
"<span ng-if=\"internalSelected.length == 0\" translate translate-context=\"Nice\">None</span>\n" +
|
|
5264
5244
|
"</span>\n" +
|
|
5265
5245
|
"<span class=\"caret\"></span>\n" +
|
|
5266
5246
|
"</button>\n" +
|
|
@@ -5451,12 +5431,12 @@ angular.module('niceElements').run(['$templateCache', function($templateCache) {
|
|
|
5451
5431
|
"<span class=\"input-group-addon\" ng-if=\"symbol\">{{ symbol }}</span>\n" +
|
|
5452
5432
|
"</div>\n" +
|
|
5453
5433
|
"<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
|
|
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" +
|
|
5434
|
+
"<div class=\"error-message\" ng-if=\"forma.$dirty && forma.$error.email\" translate translate-context=\"Nice\">Email is not valid.</div>\n" +
|
|
5435
|
+
"<div class=\"error-message\" ng-if=\"forma.$dirty && forma.$error.pattern\" translate translate-context=\"Nice\">This field requires a specific pattern.</div>\n" +
|
|
5436
|
+
"<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" +
|
|
5437
|
+
"<div class=\"error-message\" ng-if=\"forma.$error.maxlength\" translate translate-context=\"Nice\">Your input is too long</div>\n" +
|
|
5438
|
+
"<div class=\"error-message\" ng-if=\"forma.$error.required\" ng-if=\"forma.$dirty\" translate translate-context=\"Nice\">This field is required.</div>\n" +
|
|
5439
|
+
"<div class=\"error-message\" ng-if=\"forma.$error.unique\" translate translate-context=\"Nice\">This field must be unique.</div>\n" +
|
|
5460
5440
|
"</div>\n" +
|
|
5461
5441
|
"</div>\n" +
|
|
5462
5442
|
"</div>\n" +
|
|
@@ -5480,10 +5460,12 @@ angular.module('niceElements').run(['$templateCache', function($templateCache) {
|
|
|
5480
5460
|
|
|
5481
5461
|
|
|
5482
5462
|
$templateCache.put('src/components/nice-loader/nice-loader.html',
|
|
5483
|
-
"<div class=\"nice-loader\" ng-if=\"!visibleWhen\" ng-class=\"addClass\">\n" +
|
|
5463
|
+
"<div class=\"nice-loader\" ng-if=\"!visibleWhen\" ng-class=\"[addClass, { 'nice-loader-fullscreen': fullscreen, 'nice-loader-fulldiv': fulldiv }]\">\n" +
|
|
5484
5464
|
"<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
5465
|
"<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
5466
|
"</svg>\n" +
|
|
5467
|
+
"<div class=\"nice-loader-message\" ng-if=\"message\">{{ message }}</div>\n" +
|
|
5468
|
+
"<ng-transclude></ng-transclude>\n" +
|
|
5487
5469
|
"</div>"
|
|
5488
5470
|
);
|
|
5489
5471
|
|
|
@@ -5497,14 +5479,14 @@ angular.module('niceElements').run(['$templateCache', function($templateCache) {
|
|
|
5497
5479
|
|
|
5498
5480
|
|
|
5499
5481
|
$templateCache.put('src/components/nice-number/nice-number.html',
|
|
5500
|
-
"<div class=\"nice-component nice-number\" ng-form=\"
|
|
5482
|
+
"<div class=\"nice-component nice-number\" ng-form=\"niceNumberForm\" ng-class=\"{ 'margin-bottom-0' : noMargin, 'nice-component-inline': isInline }\">\n" +
|
|
5501
5483
|
"<div ng-class=\"{'row' : !disableRow}\">\n" +
|
|
5502
5484
|
"<div class=\"nice-title col-xs-12\" ng-class=\"labelWidth ? labelWidth : 'col-sm-4'\" ng-if=\"title\">\n" +
|
|
5503
5485
|
"<div class=\"nice-title-text\">{{ title }}<span ng-if=\"required\">*</span></div>\n" +
|
|
5504
5486
|
"<nice-help class=\"nice-title-help\" ng-if=\"help\" text=\"{{ help }}\"></nice-help>\n" +
|
|
5505
5487
|
"</div>\n" +
|
|
5506
5488
|
"<div class=\"nice-field col-xs-12\" ng-class=\"fieldWidth ? fieldWidth : 'col-sm-8'\">\n" +
|
|
5507
|
-
"<div class=\"input-group\" ng-class=\"{'has-warning': !disabled &&
|
|
5489
|
+
"<div class=\"input-group\" ng-class=\"{'has-warning': !disabled && niceNumberForm.$invalid && niceNumberForm.$dirty}\">\n" +
|
|
5508
5490
|
"<span class=\"input-group-btn\">\n" +
|
|
5509
5491
|
"<button class=\"btn btn-default\" type=\"button\" ng-disabled=\"!canSubstract\" ng-click=\"subtract()\">-</button>\n" +
|
|
5510
5492
|
"</span>\n" +
|
|
@@ -5513,12 +5495,20 @@ angular.module('niceElements').run(['$templateCache', function($templateCache) {
|
|
|
5513
5495
|
"<button class=\"btn btn-default\" type=\"button\" ng-disabled=\"!canAdd\" ng-click=\"add()\">+</button>\n" +
|
|
5514
5496
|
"</span>\n" +
|
|
5515
5497
|
"</div>\n" +
|
|
5516
|
-
"<div class=\"error-messages\" ng-if=\"
|
|
5517
|
-
"<div class=\"error-message\" ng-if=\"
|
|
5518
|
-
"<div class=\"error-message\" ng-if=\"
|
|
5519
|
-
"<
|
|
5520
|
-
"
|
|
5521
|
-
"<div class=\"error-message\" ng-if=\"
|
|
5498
|
+
"<div class=\"error-messages\" ng-if=\"niceNumberForm.$error && !hideError\" ng-class=\"{ 'floating-error': floatingError }\">\n" +
|
|
5499
|
+
"<div class=\"error-message\" ng-if=\"niceNumberForm.$dirty && niceNumberForm.$error.number\" translate translate-context=\"Nice\">This field requires a number</div>\n" +
|
|
5500
|
+
"<div class=\"error-message\" ng-if=\"niceNumberForm.$error.min\">\n" +
|
|
5501
|
+
"<translate translate-context=\"Nice\">Minimum value is</translate>{{ min }}\n" +
|
|
5502
|
+
"</div>\n" +
|
|
5503
|
+
"<div class=\"error-message\" ng-if=\"niceNumberForm.$error.max\">\n" +
|
|
5504
|
+
"<translate translate-context=\"Nice\">Maximum value is</translate>{{ max }}\n" +
|
|
5505
|
+
"</div>\n" +
|
|
5506
|
+
"<div class=\"error-message\" ng-if=\"niceNumberForm.$error.zero\">\n" +
|
|
5507
|
+
"<translate translate-context=\"Nice\">0 is not allowed</translate>\n" +
|
|
5508
|
+
"</div>\n" +
|
|
5509
|
+
"<div class=\"error-message\" ng-if=\"niceNumberForm.$error.no-value && !niceNumberForm.$error.zero && !niceNumberForm.$error.min && !niceNumberForm.$error.max\">\n" +
|
|
5510
|
+
"<translate translate-context=\"Nice\">Value is missing</translate>\n" +
|
|
5511
|
+
"</div>\n" +
|
|
5522
5512
|
"</div>\n" +
|
|
5523
5513
|
"</div>\n" +
|
|
5524
5514
|
"</div>\n" +
|
|
@@ -5543,8 +5533,8 @@ angular.module('niceElements').run(['$templateCache', function($templateCache) {
|
|
|
5543
5533
|
"<span class=\"input-group-addon\">%</span>\n" +
|
|
5544
5534
|
"</div>\n" +
|
|
5545
5535
|
"<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" +
|
|
5536
|
+
"<div class=\"error-message\" ng-if=\"form.$dirty && form.$error.pattern\" translate translate-context=\"Nice\">This field requires a specific pattern.</div>\n" +
|
|
5537
|
+
"<div class=\"error-message\" ng-if=\"form.$dirty && form.$error.required\" translate translate-context=\"Nice\">This field is required.</div>\n" +
|
|
5548
5538
|
"</div>\n" +
|
|
5549
5539
|
"</div>\n" +
|
|
5550
5540
|
"</div>\n" +
|
|
@@ -5623,7 +5613,7 @@ angular.module('niceElements').run(['$templateCache', function($templateCache) {
|
|
|
5623
5613
|
"<div ng-class=\"labelWidth ? labelWidth : 'col-sm-4'\" ng-if=\"title\"></div>\n" +
|
|
5624
5614
|
"<div ng-class=\"fieldWidth ? fieldWidth : 'col-sm-8'\">\n" +
|
|
5625
5615
|
"<div class=\"nice-dropdown-empty\" ng-if=\"noResults\">\n" +
|
|
5626
|
-
"<div class=\"nice-search-row\">No results found.</div>\n" +
|
|
5616
|
+
"<div class=\"nice-search-row\" translate translate-context=\"Nice\">No results found.</div>\n" +
|
|
5627
5617
|
"</div>\n" +
|
|
5628
5618
|
"<div class=\"nice-dropdown\" ng-if=\"results.length\">\n" +
|
|
5629
5619
|
"<div ng-repeat=\"result in results\" class=\"nice-search-row\" ng-class=\"{'active': selectedIndex == $index}\" ng-click=\"selectRow(result)\">\n" +
|
|
@@ -5654,7 +5644,7 @@ angular.module('niceElements').run(['$templateCache', function($templateCache) {
|
|
|
5654
5644
|
"<div class=\"nice-search-row nice-search-row-loading\" ng-if=\"loading && results.length == 0\">\n" +
|
|
5655
5645
|
"<nice-loader visible-when=\"!loading\"></nice-loader>\n" +
|
|
5656
5646
|
"</div>\n" +
|
|
5657
|
-
"<div class=\"nice-search-row nice-search-row-empty\" ng-if=\"!loading && results.length == 0\">No results found.</div>\n" +
|
|
5647
|
+
"<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
5648
|
"<div ng-repeat=\"result in results\" class=\"nice-search-row\" ng-class=\"{'active': selectedIndex == $index}\" ng-click=\"selectItem(result)\">\n" +
|
|
5659
5649
|
"<ng-transclude>{{ result[keyForInputLabel] }}</ng-transclude>\n" +
|
|
5660
5650
|
"</div>\n" +
|