nice-elements 1.3.15 → 1.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +38 -20
- package/LICENSE.md +3 -3
- package/README.md +3 -3
- package/bower.json +1 -1
- package/dist/nice.js +181 -188
- package/dist/nice.min.js +1 -1
- package/dist/style.css +463 -488
- package/dist/style.css.map +40 -0
- package/dist/style.min.css +2 -2
- package/package.json +12 -17
- 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.html +2 -2
- package/src/components/nice-dropdown/nice-dropdown.js +43 -12
- package/src/components/nice-dropdown/nice-dropdown.scss +4 -0
- 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-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 +5 -5
- 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-upload/nice-upload.js +5 -5
- 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 =
|
|
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;
|
|
@@ -2131,7 +2094,7 @@ angular.module('niceElements')
|
|
|
2131
2094
|
* # nice-dropdown
|
|
2132
2095
|
*/
|
|
2133
2096
|
angular.module('niceElements')
|
|
2134
|
-
.directive('niceDropdown', function () {
|
|
2097
|
+
.directive('niceDropdown', function ($window) {
|
|
2135
2098
|
return {
|
|
2136
2099
|
templateUrl: 'src/components/nice-dropdown/nice-dropdown.html',
|
|
2137
2100
|
restrict: 'E',
|
|
@@ -2165,17 +2128,18 @@ angular.module('niceElements')
|
|
|
2165
2128
|
selectedText: '@',
|
|
2166
2129
|
searchFunction: '=?',
|
|
2167
2130
|
isInline: '=',
|
|
2168
|
-
clearOnSelect: '@'
|
|
2131
|
+
clearOnSelect: '@',
|
|
2132
|
+
positionFixed: '=' // Dropdown menu will be fixed to page
|
|
2169
2133
|
},
|
|
2170
|
-
controller: function ($scope, $element, $timeout) {
|
|
2134
|
+
controller: function ($scope, $element, $timeout, gettextCatalog) {
|
|
2171
2135
|
if (!$scope.objValue) { $scope.objValue = 'value'; }
|
|
2172
2136
|
if (!$scope.objKey) { $scope.objKey = 'id'; }
|
|
2173
|
-
if (!$scope.noOptionsText) { $scope.noOptionsText = "No options"; }
|
|
2174
|
-
if (!$scope.noDataText) { $scope.noDataText = "No options"; }
|
|
2175
|
-
if (!$scope.searchText) { $scope.searchText = "Search..."; }
|
|
2176
|
-
if (!$scope.nullableText) { $scope.nullableText = "None"; }
|
|
2177
|
-
if (!$scope.selectText) { $scope.selectText = "None"; }
|
|
2178
|
-
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"); }
|
|
2179
2143
|
if (!$scope.addButtonFunction) { $scope.addButtonFunction = null; }
|
|
2180
2144
|
$scope.nullable = $scope.nullable === 'true' || $scope.nullable === true;
|
|
2181
2145
|
$scope.required = $scope.required === 'true' || $scope.required === true;
|
|
@@ -2207,6 +2171,7 @@ angular.module('niceElements')
|
|
|
2207
2171
|
$scope.open = function () {
|
|
2208
2172
|
$scope.focusInput();
|
|
2209
2173
|
$scope.isOpen = true;
|
|
2174
|
+
if($scope.positionFixed) $scope.updateStyle();
|
|
2210
2175
|
$timeout(function() {
|
|
2211
2176
|
$scope.scrollToHover(true);
|
|
2212
2177
|
}, 100);
|
|
@@ -2337,7 +2302,8 @@ angular.module('niceElements')
|
|
|
2337
2302
|
|
|
2338
2303
|
// ----------------------------------- Handle default -----------------------------------
|
|
2339
2304
|
$scope.handleDefault = function() {
|
|
2340
|
-
if (
|
|
2305
|
+
if ($scope.model) $scope.handleModelChange();
|
|
2306
|
+
if (!$scope.nullable && !$scope.model && !$scope.clearOnSelect && $scope.internalList && $scope.internalList.length > 0) {
|
|
2341
2307
|
$scope.handleSelected($scope.internalList[0], 0);
|
|
2342
2308
|
}
|
|
2343
2309
|
};
|
|
@@ -2351,6 +2317,10 @@ angular.module('niceElements')
|
|
|
2351
2317
|
|
|
2352
2318
|
// ----------------------------------- Watch for model change -----------------------------------
|
|
2353
2319
|
$scope.$watch('model', function (value_new, value_old) {
|
|
2320
|
+
$scope.handleModelChange();
|
|
2321
|
+
});
|
|
2322
|
+
|
|
2323
|
+
$scope.handleModelChange = function() {
|
|
2354
2324
|
$scope.selected = angular.copy($scope.model);
|
|
2355
2325
|
angular.forEach($scope.internalList, function(i, index) {
|
|
2356
2326
|
i._selected = false;
|
|
@@ -2374,7 +2344,7 @@ angular.module('niceElements')
|
|
|
2374
2344
|
$scope.selectedIndex = index;
|
|
2375
2345
|
$scope.scrollToHover();
|
|
2376
2346
|
}
|
|
2377
|
-
}
|
|
2347
|
+
}
|
|
2378
2348
|
} else {
|
|
2379
2349
|
// Is object
|
|
2380
2350
|
if ($scope.multiple) {
|
|
@@ -2397,7 +2367,31 @@ angular.module('niceElements')
|
|
|
2397
2367
|
}
|
|
2398
2368
|
}
|
|
2399
2369
|
});
|
|
2400
|
-
}
|
|
2370
|
+
}
|
|
2371
|
+
|
|
2372
|
+
// ----------------------------------- Handle fixed position -----------------------------------
|
|
2373
|
+
if ($scope.positionFixed) {
|
|
2374
|
+
$scope.dropdownButton = $element[0].getElementsByClassName('btn-dropdown')[0]
|
|
2375
|
+
$scope.dropdownMenu = $element[0].getElementsByClassName('dropdown-menu')[0]
|
|
2376
|
+
$scope.updateStyle = function () {
|
|
2377
|
+
if (this.isOpen) {
|
|
2378
|
+
var buttonPos = $scope.dropdownButton.getBoundingClientRect();
|
|
2379
|
+
$scope.dropdownMenu.style.top = (buttonPos.top + buttonPos.height) + "px";
|
|
2380
|
+
$scope.dropdownMenu.style.left = buttonPos.left + "px";
|
|
2381
|
+
$scope.dropdownMenu.style.width = buttonPos.width + "px";
|
|
2382
|
+
}
|
|
2383
|
+
}
|
|
2384
|
+
|
|
2385
|
+
$scope.updateStyle();
|
|
2386
|
+
|
|
2387
|
+
angular.element($window).on("resize", function () {
|
|
2388
|
+
$scope.updateStyle();
|
|
2389
|
+
})
|
|
2390
|
+
|
|
2391
|
+
angular.element($window).on("scroll", function () {
|
|
2392
|
+
$scope.updateStyle();
|
|
2393
|
+
})
|
|
2394
|
+
}
|
|
2401
2395
|
|
|
2402
2396
|
|
|
2403
2397
|
// ----------------------------------- Watch for keydown and keypress -----------------------------------
|
|
@@ -2469,7 +2463,7 @@ angular.module('niceElements')
|
|
|
2469
2463
|
scope: {
|
|
2470
2464
|
onChange: '&?', // function called on date changed
|
|
2471
2465
|
model: '=', // binding model
|
|
2472
|
-
format: '@', // default: '
|
|
2466
|
+
format: '@', // default: 'D.M.YYYY • H:mm', format for input label string
|
|
2473
2467
|
modelFormat: '@', // default: ''
|
|
2474
2468
|
//currentDate: '@',
|
|
2475
2469
|
date: '@', // default: true, is date picker enabled?
|
|
@@ -2490,7 +2484,7 @@ angular.module('niceElements')
|
|
|
2490
2484
|
closed: '='
|
|
2491
2485
|
},
|
|
2492
2486
|
templateUrl: 'src/components/nice-dtp/nice-dtp.html',
|
|
2493
|
-
|
|
2487
|
+
controller: function ($scope, $element, $attrs, gettextCatalog) {
|
|
2494
2488
|
|
|
2495
2489
|
// default parameters
|
|
2496
2490
|
var params = {
|
|
@@ -2498,15 +2492,15 @@ angular.module('niceElements')
|
|
|
2498
2492
|
noMargin: false,
|
|
2499
2493
|
fieldWidth: 'col-sm-8',
|
|
2500
2494
|
labelWidth: 'col-sm-4',
|
|
2501
|
-
format: '
|
|
2495
|
+
format: 'D.M.YYYY • H:mm',
|
|
2502
2496
|
modelFormat: 'YYYY-MM-DDTHH:mm:ss.SSS',
|
|
2503
2497
|
minDate: null,
|
|
2504
2498
|
maxDate: null,
|
|
2505
2499
|
lang: 'en',
|
|
2506
2500
|
weekStart: 1,
|
|
2507
2501
|
shortTime: false,
|
|
2508
|
-
cancelText: 'Cancel',
|
|
2509
|
-
okText: 'OK',
|
|
2502
|
+
cancelText: gettextCatalog.getString('Cancel', null, 'Nice'),
|
|
2503
|
+
okText: gettextCatalog.getString('OK', null, 'Nice'),
|
|
2510
2504
|
date: true,
|
|
2511
2505
|
time: false,
|
|
2512
2506
|
width: 300,
|
|
@@ -3301,12 +3295,6 @@ angular.module('niceElements')
|
|
|
3301
3295
|
restrict: 'E',
|
|
3302
3296
|
scope: {
|
|
3303
3297
|
text: '@'
|
|
3304
|
-
},
|
|
3305
|
-
link: function postLink(scope, element, attrs) {
|
|
3306
|
-
|
|
3307
|
-
},
|
|
3308
|
-
controller: function($rootScope, $scope) {
|
|
3309
|
-
|
|
3310
3298
|
}
|
|
3311
3299
|
};
|
|
3312
3300
|
});
|
|
@@ -3508,9 +3496,13 @@ angular.module('niceElements')
|
|
|
3508
3496
|
return {
|
|
3509
3497
|
templateUrl: 'src/components/nice-loader/nice-loader.html',
|
|
3510
3498
|
restrict: 'E',
|
|
3499
|
+
transclude: true,
|
|
3511
3500
|
scope: {
|
|
3512
|
-
|
|
3513
|
-
|
|
3501
|
+
visibleWhen: '=',
|
|
3502
|
+
message: '@',
|
|
3503
|
+
fullscreen: '@',
|
|
3504
|
+
fulldiv: '@',
|
|
3505
|
+
addClass: '@'
|
|
3514
3506
|
}
|
|
3515
3507
|
};
|
|
3516
3508
|
});
|
|
@@ -3523,13 +3515,12 @@ angular.module('niceElements')
|
|
|
3523
3515
|
*/
|
|
3524
3516
|
|
|
3525
3517
|
angular.module('niceElements')
|
|
3526
|
-
.factory('NiceNotification', function ($timeout, $http, $compile, $templateCache, $rootScope, $
|
|
3518
|
+
.factory('NiceNotification', function ($timeout, $http, $compile, $templateCache, $rootScope, $sce) {
|
|
3527
3519
|
|
|
3528
3520
|
var startTop = 10;
|
|
3529
3521
|
var startRight = 10;
|
|
3530
3522
|
var verticalSpacing = 10;
|
|
3531
3523
|
var horizontalSpacing = 10;
|
|
3532
|
-
var type = '';
|
|
3533
3524
|
var delay = 5000;
|
|
3534
3525
|
|
|
3535
3526
|
var messageElements = [];
|
|
@@ -4579,7 +4570,7 @@ angular.module('niceElements')
|
|
|
4579
4570
|
* # niceUpload
|
|
4580
4571
|
*/
|
|
4581
4572
|
angular.module('niceElements')
|
|
4582
|
-
.directive('niceUpload', function ($timeout) {
|
|
4573
|
+
.directive('niceUpload', function ($timeout, gettextCatalog) {
|
|
4583
4574
|
return {
|
|
4584
4575
|
restrict: 'E',
|
|
4585
4576
|
replace: true,
|
|
@@ -4602,9 +4593,9 @@ angular.module('niceElements')
|
|
|
4602
4593
|
help: '@'
|
|
4603
4594
|
},
|
|
4604
4595
|
|
|
4605
|
-
link: function(scope, element, attrs
|
|
4596
|
+
link: function(scope, element, attrs){
|
|
4606
4597
|
if (!attrs.title) { attrs.title = ''; }
|
|
4607
|
-
if (!attrs.text) { attrs.text = 'Click to upload file'; }
|
|
4598
|
+
if (!attrs.text) { attrs.text = gettextCatalog.getString('Click to upload file', null, 'Nice'); }
|
|
4608
4599
|
if (!attrs.fieldWidth) { attrs.fieldWidth = 'col-sm-8'; }
|
|
4609
4600
|
if (!attrs.labelWidth) { attrs.labelWidth = 'col-sm-4'; }
|
|
4610
4601
|
attrs.noMargin = angular.isDefined(attrs.noMargin);
|
|
@@ -4663,7 +4654,7 @@ angular.module('niceElements')
|
|
|
4663
4654
|
}
|
|
4664
4655
|
} else {
|
|
4665
4656
|
// Handle file too big error
|
|
4666
|
-
scope.error = "File must be smaller than 1MB";
|
|
4657
|
+
scope.error = gettextCatalog.getString("File must be smaller than 1MB", null, "Nice");
|
|
4667
4658
|
scope.loading = false;
|
|
4668
4659
|
scope.imageSource = null;
|
|
4669
4660
|
}
|
|
@@ -4672,7 +4663,7 @@ angular.module('niceElements')
|
|
|
4672
4663
|
|
|
4673
4664
|
} catch (err) {
|
|
4674
4665
|
// Handle try catch
|
|
4675
|
-
scope.error = "Something went wrong";
|
|
4666
|
+
scope.error = gettextCatalog.getString("Something went wrong", null, "Nice");
|
|
4676
4667
|
scope.loading = false;
|
|
4677
4668
|
scope.imageSource = null;
|
|
4678
4669
|
}
|
|
@@ -4724,9 +4715,9 @@ angular.module('niceElements')
|
|
|
4724
4715
|
isInline: '=',
|
|
4725
4716
|
help: '@'
|
|
4726
4717
|
},
|
|
4727
|
-
controller: function($scope, $attrs) {
|
|
4728
|
-
if (!$attrs.yes) { $attrs.yes = 'Yes'; }
|
|
4729
|
-
if (!$attrs.no) { $attrs.no = 'No'; }
|
|
4718
|
+
controller: function($scope, $attrs, gettextCatalog) {
|
|
4719
|
+
if (!$attrs.yes) { $attrs.yes = gettextCatalog.getString('Yes', null, "Nice"); }
|
|
4720
|
+
if (!$attrs.no) { $attrs.no = gettextCatalog.getString('No', null, "Nice"); }
|
|
4730
4721
|
if (!$attrs.title) { $attrs.title = ''; }
|
|
4731
4722
|
if (!$attrs.fieldWidth) { $attrs.fieldWidth = 'col-sm-8'; }
|
|
4732
4723
|
if (!$attrs.labelWidth) { $attrs.labelWidth = 'col-sm-4'; }
|
|
@@ -4874,18 +4865,18 @@ angular.module('niceElements').run(['$templateCache', function($templateCache) {
|
|
|
4874
4865
|
"<div class=\"disabled-shield\" ng-if=\"isDisabled\"></div>\n" +
|
|
4875
4866
|
"<div class=\"nice-calendar-wrapper\">\n" +
|
|
4876
4867
|
"<div class=\"header\">\n" +
|
|
4877
|
-
"<i class=\"fa fa-angle-left\" ng-click=\"previous()\" title=\"{{
|
|
4868
|
+
"<i class=\"fa fa-angle-left\" ng-click=\"previous()\" title=\"{{ 'Previous month' | translate:'Nice' }}\"></i>\n" +
|
|
4878
4869
|
"<span title=\"{{ month.format('M.YYYY' )}}\">{{ month.format(\"MMMM, YYYY\" )}}</span>\n" +
|
|
4879
|
-
"<i class=\"fa fa-angle-right\" ng-click=\"next()\" title=\"{{
|
|
4870
|
+
"<i class=\"fa fa-angle-right\" ng-click=\"next()\" title=\"{{ 'Next month' | translate:'Nice' }}\"></i>\n" +
|
|
4880
4871
|
"</div>\n" +
|
|
4881
4872
|
"<div class=\"week names\">\n" +
|
|
4882
|
-
"<span class=\"day\" translate>
|
|
4883
|
-
"<span class=\"day\" translate>
|
|
4884
|
-
"<span class=\"day\" translate>
|
|
4885
|
-
"<span class=\"day\" translate>
|
|
4886
|
-
"<span class=\"day\" translate>
|
|
4887
|
-
"<span class=\"day weekend\" translate>
|
|
4888
|
-
"<span class=\"day weekend\" translate>
|
|
4873
|
+
"<span class=\"day\" translate translate-context=\"Nice\">Mon</span>\n" +
|
|
4874
|
+
"<span class=\"day\" translate translate-context=\"Nice\">Tue</span>\n" +
|
|
4875
|
+
"<span class=\"day\" translate translate-context=\"Nice\">Wed</span>\n" +
|
|
4876
|
+
"<span class=\"day\" translate translate-context=\"Nice\">Thu</span>\n" +
|
|
4877
|
+
"<span class=\"day\" translate translate-context=\"Nice\">Fri</span>\n" +
|
|
4878
|
+
"<span class=\"day weekend\" translate translate-context=\"Nice\">Sat</span>\n" +
|
|
4879
|
+
"<span class=\"day weekend\" translate translate-context=\"Nice\">Sun</span>\n" +
|
|
4889
4880
|
"</div>\n" +
|
|
4890
4881
|
"<div class=\"week\" ng-repeat=\"week in weeks\">\n" +
|
|
4891
4882
|
"<span class=\"day\" title=\"{{ day.date.format('D.M.YYYY') }}\" ng-class=\"{\n" +
|
|
@@ -4910,32 +4901,32 @@ angular.module('niceElements').run(['$templateCache', function($templateCache) {
|
|
|
4910
4901
|
"<div class=\"clearfix\"></div>\n" +
|
|
4911
4902
|
"<div class=\"nice-calendar-time\" ng-if=\"time\">\n" +
|
|
4912
4903
|
"<div class=\"time-picker\">\n" +
|
|
4913
|
-
"<select title=\"{{
|
|
4904
|
+
"<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" +
|
|
4914
4905
|
"</select>\n" +
|
|
4915
4906
|
"</div>\n" +
|
|
4916
4907
|
"<div class=\"time-picker\">\n" +
|
|
4917
|
-
"<select title=\"{{
|
|
4908
|
+
"<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" +
|
|
4918
4909
|
"</select>\n" +
|
|
4919
4910
|
"</div>\n" +
|
|
4920
4911
|
"<div class=\"time-picket-icon\">\n" +
|
|
4921
4912
|
"<i class=\"fa fa-clock-o\"></i>\n" +
|
|
4922
4913
|
"</div>\n" +
|
|
4923
4914
|
"<div class=\"time-picker\">\n" +
|
|
4924
|
-
"<select title=\"{{
|
|
4915
|
+
"<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" +
|
|
4925
4916
|
"</select>\n" +
|
|
4926
4917
|
"</div>\n" +
|
|
4927
4918
|
"<div class=\"time-picker no-border-right\">\n" +
|
|
4928
|
-
"<select title=\"{{
|
|
4919
|
+
"<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" +
|
|
4929
4920
|
"</select>\n" +
|
|
4930
4921
|
"</div>\n" +
|
|
4931
4922
|
"</div>\n" +
|
|
4932
4923
|
"<div class=\"nice-selected-dates\">\n" +
|
|
4933
4924
|
"<div class=\"nice-start-date\">\n" +
|
|
4934
|
-
"<label
|
|
4925
|
+
"<label translate translate-context=\"Nice\">Start</label>\n" +
|
|
4935
4926
|
"<div ng-class=\"startTimeClass\">{{ formatDate(startDate) }}</div>\n" +
|
|
4936
4927
|
"</div>\n" +
|
|
4937
4928
|
"<div class=\"nice-end-date\">\n" +
|
|
4938
|
-
"<label
|
|
4929
|
+
"<label translate translate-context=\"Nice\">End</label>\n" +
|
|
4939
4930
|
"<div ng-class=\"endTimeClass\">{{ formatDate(endDate) }}</div>\n" +
|
|
4940
4931
|
"</div>\n" +
|
|
4941
4932
|
"<div class=\"clearfix\"></div>\n" +
|
|
@@ -5115,14 +5106,14 @@ angular.module('niceElements').run(['$templateCache', function($templateCache) {
|
|
|
5115
5106
|
"<div class=\"dtp-wrapper\" ng-show=\"isOpen\">\n" +
|
|
5116
5107
|
"<div class=\"dtp-buttons-left\">\n" +
|
|
5117
5108
|
"<div class=\"dtp-buttons-top\">\n" +
|
|
5118
|
-
"<a class=\"btn btn-primary btn-block\" ng-click=\"selectToday()\">Last 24 hours</a>\n" +
|
|
5119
|
-
"<a class=\"btn btn-primary btn-block\" ng-click=\"selectLastNDays(7)\">Last 7 days</a>\n" +
|
|
5120
|
-
"<a class=\"btn btn-primary btn-block\" ng-click=\"selectLastMonth()\">Last month</a>\n" +
|
|
5121
|
-
"<a class=\"btn btn-primary btn-block\" ng-click=\"selectThisMonth()\">This month</a>\n" +
|
|
5109
|
+
"<a class=\"btn btn-primary btn-block\" ng-click=\"selectToday()\" translate translate-context=\"Nice\">Last 24 hours</a>\n" +
|
|
5110
|
+
"<a class=\"btn btn-primary btn-block\" ng-click=\"selectLastNDays(7)\" translate translate-context=\"Nice\">Last 7 days</a>\n" +
|
|
5111
|
+
"<a class=\"btn btn-primary btn-block\" ng-click=\"selectLastMonth()\" translate translate-context=\"Nice\">Last month</a>\n" +
|
|
5112
|
+
"<a class=\"btn btn-primary btn-block\" ng-click=\"selectThisMonth()\" translate translate-context=\"Nice\">This month</a>\n" +
|
|
5122
5113
|
"</div>\n" +
|
|
5123
5114
|
"<div class=\"dtp-buttons-bottom\">\n" +
|
|
5124
|
-
"<a class=\"btn btn-danger btn-block\" ng-click=\"close()\">Cancel</a>\n" +
|
|
5125
|
-
"<a class=\"btn btn-success btn-block\" ng-click=\"confirm()\">OK</a>\n" +
|
|
5115
|
+
"<a class=\"btn btn-danger btn-block\" ng-click=\"close()\" translate translate-context=\"Nice\">Cancel</a>\n" +
|
|
5116
|
+
"<a class=\"btn btn-success btn-block\" ng-click=\"confirm()\" translate translate-context=\"Nice\">OK</a>\n" +
|
|
5126
5117
|
"</div>\n" +
|
|
5127
5118
|
"</div>\n" +
|
|
5128
5119
|
"<div class=\"dtp-left\">\n" +
|
|
@@ -5159,10 +5150,10 @@ angular.module('niceElements').run(['$templateCache', function($templateCache) {
|
|
|
5159
5150
|
"<div class=\"dtp-range-wrapper\" ng-show=\"showDtpRange\">\n" +
|
|
5160
5151
|
"<div class=\"dtp-layer\">\n" +
|
|
5161
5152
|
"<div class=\"dtp-buttons-left\">\n" +
|
|
5162
|
-
"<a class=\"btn btn-primary btn-block\" ng-click=\"selectLastNDays(1)\">Last 24 hours</a>\n" +
|
|
5163
|
-
"<a class=\"btn btn-primary btn-block\" ng-click=\"selectLastNDays(7)\">Last 7 days</a>\n" +
|
|
5164
|
-
"<a class=\"btn btn-primary btn-block\" ng-click=\"selectLastMonth()\">Last month</a>\n" +
|
|
5165
|
-
"<a class=\"btn btn-primary btn-block\" ng-click=\"selectThisMonth()\">This month</a>\n" +
|
|
5153
|
+
"<a class=\"btn btn-primary btn-block\" ng-click=\"selectLastNDays(1)\" translate translate-context=\"Nice\">Last 24 hours</a>\n" +
|
|
5154
|
+
"<a class=\"btn btn-primary btn-block\" ng-click=\"selectLastNDays(7)\" translate translate-context=\"Nice\">Last 7 days</a>\n" +
|
|
5155
|
+
"<a class=\"btn btn-primary btn-block\" ng-click=\"selectLastMonth()\" translate translate-context=\"Nice\">Last month</a>\n" +
|
|
5156
|
+
"<a class=\"btn btn-primary btn-block\" ng-click=\"selectThisMonth()\" translate translate-context=\"Nice\">This month</a>\n" +
|
|
5166
5157
|
"</div>\n" +
|
|
5167
5158
|
"<div class=\"dtp-left\">\n" +
|
|
5168
5159
|
"<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" +
|
|
@@ -5171,8 +5162,8 @@ angular.module('niceElements').run(['$templateCache', function($templateCache) {
|
|
|
5171
5162
|
"<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" +
|
|
5172
5163
|
"</div>\n" +
|
|
5173
5164
|
"<div class=\"dtp-buttons-bottom\">\n" +
|
|
5174
|
-
"<a class=\"btn btn-danger btn-block margin-right-20\" ng-click=\"cancelClick()\">Cancel</a>\n" +
|
|
5175
|
-
"<a class=\"btn btn-success btn-block\" ng-click=\"okClick()\">OK</a>\n" +
|
|
5165
|
+
"<a class=\"btn btn-danger btn-block margin-right-20\" ng-click=\"cancelClick()\" translate translate-context=\"Nice\">Cancel</a>\n" +
|
|
5166
|
+
"<a class=\"btn btn-success btn-block\" ng-click=\"okClick()\" translate translate-context=\"Nice\">OK</a>\n" +
|
|
5176
5167
|
"</div>\n" +
|
|
5177
5168
|
"</div>\n" +
|
|
5178
5169
|
"</div>\n" +
|
|
@@ -5227,9 +5218,9 @@ angular.module('niceElements').run(['$templateCache', function($templateCache) {
|
|
|
5227
5218
|
"<span ng-if=\"internalSelected.color_hex_code\" class=\"dropdown-color\" ng-style=\"{'background': internalSelected.color_hex_code}\"></span>\n" +
|
|
5228
5219
|
"<span ng-if=\"!multiple\">{{ getLabel(internalSelected) }}</span>\n" +
|
|
5229
5220
|
"<span ng-if=\"multiple\">\n" +
|
|
5230
|
-
"<span ng-if=\"internalSelected.length > 1\">{{ internalSelected.length }}<translate>selected</translate></span>\n" +
|
|
5221
|
+
"<span ng-if=\"internalSelected.length > 1\">{{ internalSelected.length }}<translate translate-context=\"Nice\">selected</translate></span>\n" +
|
|
5231
5222
|
"<span ng-if=\"internalSelected.length == 1\">{{ getLabel(internalSelected[0]) }}</span>\n" +
|
|
5232
|
-
"<span ng-if=\"internalSelected.length == 0\" translate>None</span>\n" +
|
|
5223
|
+
"<span ng-if=\"internalSelected.length == 0\" translate translate-context=\"Nice\">None</span>\n" +
|
|
5233
5224
|
"</span>\n" +
|
|
5234
5225
|
"<span class=\"caret\"></span>\n" +
|
|
5235
5226
|
"</button>\n" +
|
|
@@ -5263,7 +5254,7 @@ angular.module('niceElements').run(['$templateCache', function($templateCache) {
|
|
|
5263
5254
|
"</div>\n" +
|
|
5264
5255
|
"<div class=\"nice-field col-xs-12\" ng-class=\"[ fieldWidth ? fieldWidth : 'col-sm-8', { 'open': isOpen, 'nice-disabled': isDisabled || emptyList } ]\" click-outside=\"close()\" is-open=\"{{ isOpen }}\">\n" +
|
|
5265
5256
|
"<div class=\"nice-field-wrapper\">\n" +
|
|
5266
|
-
"<button type=\"button\" class=\"btn btn-dropdown\" ng-click=\"toggle()\" ng-disabled=\"isDisabled || emptyList\">\n" +
|
|
5257
|
+
"<button type=\"button\" class=\"btn btn-dropdown\" ng-ref=\"dropdown-button\" ng-click=\"toggle()\" ng-disabled=\"isDisabled || emptyList\">\n" +
|
|
5267
5258
|
"<div class=\"btn-dropdown-inside\" ng-transclude=\"button\" ng-if=\"selected != null\">\n" +
|
|
5268
5259
|
"<span ng-if=\"!multiple\">{{ selected[objValue] }}</span>\n" +
|
|
5269
5260
|
"<span ng-if=\"multiple\">\n" +
|
|
@@ -5276,7 +5267,7 @@ angular.module('niceElements').run(['$templateCache', function($templateCache) {
|
|
|
5276
5267
|
"<span class=\"caret\" ng-show=\"!loading\"></span>\n" +
|
|
5277
5268
|
"<nice-loader visible-when=\"!loading\"></nice-loader>\n" +
|
|
5278
5269
|
"</button>\n" +
|
|
5279
|
-
"<div class=\"dropdown-menu\">\n" +
|
|
5270
|
+
"<div class=\"dropdown-menu\" ng-class=\"{ 'dropdown-menu-fixed': positionFixed }\">\n" +
|
|
5280
5271
|
"<div class=\"search-bar\" ng-if=\"searchFunction\">\n" +
|
|
5281
5272
|
"<input ng-model=\"internal.search\" ng-model-options=\"{ debounce: 500 }\" ng-change=\"handleSearch()\" placeholder=\"{{ searchText }}\">\n" +
|
|
5282
5273
|
"<span class=\"icon\"><i class=\"fa fa-search\"></i></span>\n" +
|
|
@@ -5420,12 +5411,12 @@ angular.module('niceElements').run(['$templateCache', function($templateCache) {
|
|
|
5420
5411
|
"<span class=\"input-group-addon\" ng-if=\"symbol\">{{ symbol }}</span>\n" +
|
|
5421
5412
|
"</div>\n" +
|
|
5422
5413
|
"<div ng-if=\"forma.$error && forma.$dirty\">\n" +
|
|
5423
|
-
"<div class=\"error-message\" ng-if=\"forma.$dirty && forma.$error.email\" translate>Email is not valid.</div>\n" +
|
|
5424
|
-
"<div class=\"error-message\" ng-if=\"forma.$dirty && forma.$error.pattern\" translate>This field requires a specific pattern.</div>\n" +
|
|
5425
|
-
"<div class=\"error-message\" ng-if=\"forma.$error.minlength\"><translate>Your input is too short. It must contain at least</translate
|
|
5426
|
-
"<div class=\"error-message\" ng-if=\"forma.$error.maxlength\" translate>Your input is too long</div>\n" +
|
|
5427
|
-
"<div class=\"error-message\" ng-if=\"forma.$error.required\" ng-if=\"forma.$dirty\" translate>This field is required.</div>\n" +
|
|
5428
|
-
"<div class=\"error-message\" ng-if=\"forma.$error.unique\" translate>This field must be unique.</div>\n" +
|
|
5414
|
+
"<div class=\"error-message\" ng-if=\"forma.$dirty && forma.$error.email\" translate translate-context=\"Nice\">Email is not valid.</div>\n" +
|
|
5415
|
+
"<div class=\"error-message\" ng-if=\"forma.$dirty && forma.$error.pattern\" translate translate-context=\"Nice\">This field requires a specific pattern.</div>\n" +
|
|
5416
|
+
"<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" +
|
|
5417
|
+
"<div class=\"error-message\" ng-if=\"forma.$error.maxlength\" translate translate-context=\"Nice\">Your input is too long</div>\n" +
|
|
5418
|
+
"<div class=\"error-message\" ng-if=\"forma.$error.required\" ng-if=\"forma.$dirty\" translate translate-context=\"Nice\">This field is required.</div>\n" +
|
|
5419
|
+
"<div class=\"error-message\" ng-if=\"forma.$error.unique\" translate translate-context=\"Nice\">This field must be unique.</div>\n" +
|
|
5429
5420
|
"</div>\n" +
|
|
5430
5421
|
"</div>\n" +
|
|
5431
5422
|
"</div>\n" +
|
|
@@ -5449,10 +5440,12 @@ angular.module('niceElements').run(['$templateCache', function($templateCache) {
|
|
|
5449
5440
|
|
|
5450
5441
|
|
|
5451
5442
|
$templateCache.put('src/components/nice-loader/nice-loader.html',
|
|
5452
|
-
"<div class=\"nice-loader\" ng-if=\"!visibleWhen\" ng-class=\"addClass\">\n" +
|
|
5453
|
-
"<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
|
|
5443
|
+
"<div class=\"nice-loader\" ng-if=\"!visibleWhen\" ng-class=\"[addClass, { 'nice-loader-fullscreen': fullscreen, 'nice-loader-fulldiv': fulldiv }]\">\n" +
|
|
5444
|
+
"<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" +
|
|
5454
5445
|
"<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" +
|
|
5455
5446
|
"</svg>\n" +
|
|
5447
|
+
"<div class=\"nice-loader-message\" ng-if=\"message\">{{ message }}</div>\n" +
|
|
5448
|
+
"<ng-transclude></ng-transclude>\n" +
|
|
5456
5449
|
"</div>"
|
|
5457
5450
|
);
|
|
5458
5451
|
|
|
@@ -5483,11 +5476,11 @@ angular.module('niceElements').run(['$templateCache', function($templateCache) {
|
|
|
5483
5476
|
"</span>\n" +
|
|
5484
5477
|
"</div>\n" +
|
|
5485
5478
|
"<div class=\"error-messages\" ng-if=\"form.$error && !hideError\" ng-class=\"{ 'floating-error': floatingError }\">\n" +
|
|
5486
|
-
"<div class=\"error-message\" ng-if=\"form.$dirty && form.$error.number\" translate>This field requires a number</div>\n" +
|
|
5487
|
-
"<div class=\"error-message\" ng-if=\"form.$error.min\"><translate>Minimum value is</translate>{{ min }}</div>\n" +
|
|
5488
|
-
"<div class=\"error-message\" ng-if=\"form.$error.max\"><translate>Maximum value is</translate>{{ max }}</div>\n" +
|
|
5489
|
-
"<div class=\"error-message\" ng-if=\"form.$error.zero\"><translate>0 is not allowed</translate></div>\n" +
|
|
5490
|
-
"<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" +
|
|
5479
|
+
"<div class=\"error-message\" ng-if=\"form.$dirty && form.$error.number\" translate translate-context=\"Nice\">This field requires a number</div>\n" +
|
|
5480
|
+
"<div class=\"error-message\" ng-if=\"form.$error.min\"><translate translate-context=\"Nice\">Minimum value is</translate>{{ min }}</div>\n" +
|
|
5481
|
+
"<div class=\"error-message\" ng-if=\"form.$error.max\"><translate translate-context=\"Nice\">Maximum value is</translate>{{ max }}</div>\n" +
|
|
5482
|
+
"<div class=\"error-message\" ng-if=\"form.$error.zero\"><translate translate-context=\"Nice\">0 is not allowed</translate></div>\n" +
|
|
5483
|
+
"<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" +
|
|
5491
5484
|
"</div>\n" +
|
|
5492
5485
|
"</div>\n" +
|
|
5493
5486
|
"</div>\n" +
|
|
@@ -5512,8 +5505,8 @@ angular.module('niceElements').run(['$templateCache', function($templateCache) {
|
|
|
5512
5505
|
"<span class=\"input-group-addon\">%</span>\n" +
|
|
5513
5506
|
"</div>\n" +
|
|
5514
5507
|
"<div ng-if=\"form.$error\">\n" +
|
|
5515
|
-
"<div class=\"error-message\" ng-if=\"form.$dirty && form.$error.pattern\">This field requires a specific pattern.</div>\n" +
|
|
5516
|
-
"<div class=\"error-message\" ng-if=\"form.$dirty && form.$error.required\">This field is required.</div>\n" +
|
|
5508
|
+
"<div class=\"error-message\" ng-if=\"form.$dirty && form.$error.pattern\" translate translate-context=\"Nice\">This field requires a specific pattern.</div>\n" +
|
|
5509
|
+
"<div class=\"error-message\" ng-if=\"form.$dirty && form.$error.required\" translate translate-context=\"Nice\">This field is required.</div>\n" +
|
|
5517
5510
|
"</div>\n" +
|
|
5518
5511
|
"</div>\n" +
|
|
5519
5512
|
"</div>\n" +
|
|
@@ -5592,7 +5585,7 @@ angular.module('niceElements').run(['$templateCache', function($templateCache) {
|
|
|
5592
5585
|
"<div ng-class=\"labelWidth ? labelWidth : 'col-sm-4'\" ng-if=\"title\"></div>\n" +
|
|
5593
5586
|
"<div ng-class=\"fieldWidth ? fieldWidth : 'col-sm-8'\">\n" +
|
|
5594
5587
|
"<div class=\"nice-dropdown-empty\" ng-if=\"noResults\">\n" +
|
|
5595
|
-
"<div class=\"nice-search-row\">No results found.</div>\n" +
|
|
5588
|
+
"<div class=\"nice-search-row\" translate translate-context=\"Nice\">No results found.</div>\n" +
|
|
5596
5589
|
"</div>\n" +
|
|
5597
5590
|
"<div class=\"nice-dropdown\" ng-if=\"results.length\">\n" +
|
|
5598
5591
|
"<div ng-repeat=\"result in results\" class=\"nice-search-row\" ng-class=\"{'active': selectedIndex == $index}\" ng-click=\"selectRow(result)\">\n" +
|
|
@@ -5623,7 +5616,7 @@ angular.module('niceElements').run(['$templateCache', function($templateCache) {
|
|
|
5623
5616
|
"<div class=\"nice-search-row nice-search-row-loading\" ng-if=\"loading && results.length == 0\">\n" +
|
|
5624
5617
|
"<nice-loader visible-when=\"!loading\"></nice-loader>\n" +
|
|
5625
5618
|
"</div>\n" +
|
|
5626
|
-
"<div class=\"nice-search-row nice-search-row-empty\" ng-if=\"!loading && results.length == 0\">No results found.</div>\n" +
|
|
5619
|
+
"<div class=\"nice-search-row nice-search-row-empty\" ng-if=\"!loading && results.length == 0\" translate translate-context=\"Nice\">No results found.</div>\n" +
|
|
5627
5620
|
"<div ng-repeat=\"result in results\" class=\"nice-search-row\" ng-class=\"{'active': selectedIndex == $index}\" ng-click=\"selectItem(result)\">\n" +
|
|
5628
5621
|
"<ng-transclude>{{ result[keyForInputLabel] }}</ng-transclude>\n" +
|
|
5629
5622
|
"</div>\n" +
|