nice-elements 1.3.14 → 1.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.sass-cache/9d06f237d2d27ccd53e7f33d4b297c0d8eb0b63f/nice-number.scssc +0 -0
- package/CHANGELOG.md +39 -19
- package/LICENSE.md +3 -3
- package/README.md +3 -3
- package/bower.json +1 -1
- package/dist/nice.js +174 -184
- package/dist/nice.min.js +1 -1
- package/dist/style.css +467 -487
- 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 +12 -4
- 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 +6 -5
- package/src/components/nice-number/nice-number.js +7 -0
- package/src/components/nice-number/nice-number.scss +7 -0
- 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("Pon", null, "Nice"),
|
|
907
|
+
gettextCatalog.getString("Tor", null, "Nice"),
|
|
908
|
+
gettextCatalog.getString("Sre", null, "Nice"),
|
|
909
|
+
gettextCatalog.getString("Čet", null, "Nice"),
|
|
910
|
+
gettextCatalog.getString("Pet", null, "Nice"),
|
|
911
|
+
gettextCatalog.getString("Sob", null, "Nice"),
|
|
912
|
+
gettextCatalog.getString("Ned", null, "Nice")
|
|
913
|
+
];
|
|
962
914
|
|
|
963
915
|
$scope.years = [];
|
|
964
916
|
var year = moment().year()-100;
|
|
@@ -1207,7 +1159,7 @@ angular.module('niceElements').directive('niceDatetimePicker', function () {
|
|
|
1207
1159
|
templateUrl: 'src/components/nice-datetime-picker/nice-datetime-picker.html',
|
|
1208
1160
|
scope: {
|
|
1209
1161
|
model: '=', // binding model
|
|
1210
|
-
format: '@', // default: '
|
|
1162
|
+
format: '@', // default: 'D.M.YYYY • H:mm', format for input label string
|
|
1211
1163
|
date: '@', // default: true, is date picker enabled?
|
|
1212
1164
|
time: '@', // default: false, is time picker enabled?
|
|
1213
1165
|
width: '@', // default: 300, width of entire dtp-picker in px
|
|
@@ -1228,14 +1180,14 @@ angular.module('niceElements').directive('niceDatetimePicker', function () {
|
|
|
1228
1180
|
isInline: '=',
|
|
1229
1181
|
onChange: '&?'
|
|
1230
1182
|
},
|
|
1231
|
-
controller: function ($scope) {
|
|
1183
|
+
controller: function ($scope, gettextCatalog) {
|
|
1232
1184
|
$scope.date = $scope.date == 'true' || $scope.date == true;
|
|
1233
1185
|
$scope.time = $scope.time == 'true' || $scope.time == true;
|
|
1234
1186
|
$scope.noMargin === 'true' || $scope.noMargin === true;
|
|
1235
1187
|
$scope.enableOkButtons === 'true' || $scope.enableOkButtons === true;
|
|
1236
1188
|
$scope.lang = $scope.lang || 'en';
|
|
1237
|
-
$scope.okText = $scope.okText || 'OK';
|
|
1238
|
-
$scope.cancelText = $scope.cancelText || 'Cancel';
|
|
1189
|
+
$scope.okText = $scope.okText || gettextCatalog.getString('OK', null, 'Nice');
|
|
1190
|
+
$scope.cancelText = $scope.cancelText || gettextCatalog.getString('Cancel', null, 'Nice');
|
|
1239
1191
|
$scope.weekStart = parseInt($scope.weekStart) || 1;
|
|
1240
1192
|
$scope.width = parseInt($scope.width) || 300;
|
|
1241
1193
|
$scope.isOpen = false;
|
|
@@ -1243,11 +1195,11 @@ angular.module('niceElements').directive('niceDatetimePicker', function () {
|
|
|
1243
1195
|
|
|
1244
1196
|
if (!$scope.format) {
|
|
1245
1197
|
if ($scope.date && !$scope.time) {
|
|
1246
|
-
$scope.format = '
|
|
1198
|
+
$scope.format = 'D.M.YYYY';
|
|
1247
1199
|
} else if (!$scope.date && $scope.time) {
|
|
1248
1200
|
$scope.format = 'HH:mm';
|
|
1249
1201
|
} else {
|
|
1250
|
-
$scope.format = '
|
|
1202
|
+
$scope.format = 'D.M.YYYY • H:mm';
|
|
1251
1203
|
}
|
|
1252
1204
|
}
|
|
1253
1205
|
|
|
@@ -1293,7 +1245,7 @@ angular.module('niceElements')
|
|
|
1293
1245
|
scope: {
|
|
1294
1246
|
startDate: '=', // binding model
|
|
1295
1247
|
endDate: '=', // binding model
|
|
1296
|
-
formatString: '@', // default: '
|
|
1248
|
+
formatString: '@', // default: 'D.M.YYYY • H:mm', format for input label string
|
|
1297
1249
|
modelFormat: '@',
|
|
1298
1250
|
time: '@', // default: false, is time picker enabled?
|
|
1299
1251
|
minDate: '@', // default: undefined
|
|
@@ -1319,7 +1271,7 @@ angular.module('niceElements')
|
|
|
1319
1271
|
|
|
1320
1272
|
// Set format string
|
|
1321
1273
|
if(!$scope.formatString) {
|
|
1322
|
-
if($scope.time) $scope.formatString = 'D.M.YYYY H:mm';
|
|
1274
|
+
if($scope.time) $scope.formatString = 'D.M.YYYY • H:mm';
|
|
1323
1275
|
else $scope.formatString = 'D.M.YYYY';
|
|
1324
1276
|
}
|
|
1325
1277
|
|
|
@@ -1431,12 +1383,12 @@ angular.module('niceElements')
|
|
|
1431
1383
|
* # niceDatetimerangePicker
|
|
1432
1384
|
*/
|
|
1433
1385
|
angular.module('niceElements')
|
|
1434
|
-
.directive('niceDatetimerangePicker',
|
|
1386
|
+
.directive('niceDatetimerangePicker', function(gettextCatalog) {
|
|
1435
1387
|
return {
|
|
1436
1388
|
scope: {
|
|
1437
1389
|
modelStart: '=', // binding model
|
|
1438
1390
|
modelEnd: '=', // binding model
|
|
1439
|
-
format: '@', // default: '
|
|
1391
|
+
format: '@', // default: 'D.M.YYYY • H:mm', format for input label string
|
|
1440
1392
|
modelFormat: '@',
|
|
1441
1393
|
date: '@', // default: true, is date picker enabled?
|
|
1442
1394
|
time: '@', // default: false, is time picker enabled?
|
|
@@ -1461,22 +1413,22 @@ angular.module('niceElements')
|
|
|
1461
1413
|
},
|
|
1462
1414
|
templateUrl: 'src/components/nice-datetimerange-picker/nice-datetimerange-picker.html',
|
|
1463
1415
|
link: {
|
|
1464
|
-
pre: function($scope
|
|
1416
|
+
pre: function($scope) {
|
|
1465
1417
|
// Default parameters
|
|
1466
1418
|
var params = {
|
|
1467
1419
|
title: '',
|
|
1468
1420
|
noMargin: false,
|
|
1469
1421
|
fieldWidth: 'col-sm-8',
|
|
1470
1422
|
labelWidth: 'col-sm-4',
|
|
1471
|
-
format: 'D.M.YYYY H:mm',
|
|
1423
|
+
format: 'D.M.YYYY • H:mm',
|
|
1472
1424
|
modelFormat: 'YYYY-MM-DDTHH:mm:ss.SSS',
|
|
1473
1425
|
minDate: null,
|
|
1474
1426
|
maxDate: null,
|
|
1475
1427
|
lang: 'en',
|
|
1476
1428
|
weekStart: 1,
|
|
1477
1429
|
shortTime: false,
|
|
1478
|
-
cancelText: 'Cancel',
|
|
1479
|
-
okText: 'OK',
|
|
1430
|
+
cancelText: gettextCatalog.getString('Cancel', null, 'Nice'),
|
|
1431
|
+
okText: gettextCatalog.getString('OK', null, 'Nice'),
|
|
1480
1432
|
date: true,
|
|
1481
1433
|
time: false,
|
|
1482
1434
|
width: 300,
|
|
@@ -1667,7 +1619,7 @@ angular.module('niceElements')
|
|
|
1667
1619
|
}
|
|
1668
1620
|
};
|
|
1669
1621
|
|
|
1670
|
-
}
|
|
1622
|
+
});
|
|
1671
1623
|
'use strict';
|
|
1672
1624
|
|
|
1673
1625
|
/**
|
|
@@ -1677,7 +1629,7 @@ angular.module('niceElements')
|
|
|
1677
1629
|
* # niceDropdownDate
|
|
1678
1630
|
*/
|
|
1679
1631
|
angular.module('niceElements')
|
|
1680
|
-
.directive('niceDropdownDate', function (){
|
|
1632
|
+
.directive('niceDropdownDate', function (gettextCatalog) {
|
|
1681
1633
|
return {
|
|
1682
1634
|
restrict: 'E',
|
|
1683
1635
|
replace: true,
|
|
@@ -1699,18 +1651,18 @@ angular.module('niceElements')
|
|
|
1699
1651
|
link: function ($scope) {
|
|
1700
1652
|
$scope.days = [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31];
|
|
1701
1653
|
$scope.months = [
|
|
1702
|
-
{ value: 0, name: 'Jan' },
|
|
1703
|
-
{ value: 1, name: 'Feb' },
|
|
1704
|
-
{ value: 2, name: 'Mar' },
|
|
1705
|
-
{ value: 3, name: 'Apr' },
|
|
1706
|
-
{ value: 4, name: 'May' },
|
|
1707
|
-
{ value: 5, name: 'Jun' },
|
|
1708
|
-
{ value: 6, name: 'Jul' },
|
|
1709
|
-
{ value: 7, name: 'Aug' },
|
|
1710
|
-
{ value: 8, name: 'Sep' },
|
|
1711
|
-
{ value: 9, name: 'Oct' },
|
|
1712
|
-
{ value: 10, name: 'Nov' },
|
|
1713
|
-
{ value: 11, name: 'Dec' }
|
|
1654
|
+
{ value: 0, name: gettextCatalog.getString('Jan', null, 'Nice') },
|
|
1655
|
+
{ value: 1, name: gettextCatalog.getString('Feb', null, 'Nice') },
|
|
1656
|
+
{ value: 2, name: gettextCatalog.getString('Mar', null, 'Nice') },
|
|
1657
|
+
{ value: 3, name: gettextCatalog.getString('Apr', null, 'Nice') },
|
|
1658
|
+
{ value: 4, name: gettextCatalog.getString('May', null, 'Nice') },
|
|
1659
|
+
{ value: 5, name: gettextCatalog.getString('Jun', null, 'Nice') },
|
|
1660
|
+
{ value: 6, name: gettextCatalog.getString('Jul', null, 'Nice') },
|
|
1661
|
+
{ value: 7, name: gettextCatalog.getString('Aug', null, 'Nice') },
|
|
1662
|
+
{ value: 8, name: gettextCatalog.getString('Sep', null, 'Nice') },
|
|
1663
|
+
{ value: 9, name: gettextCatalog.getString('Oct', null, 'Nice') },
|
|
1664
|
+
{ value: 10, name: gettextCatalog.getString('Nov', null, 'Nice') },
|
|
1665
|
+
{ value: 11, name: gettextCatalog.getString('Dec', null, 'Nice') }
|
|
1714
1666
|
];
|
|
1715
1667
|
|
|
1716
1668
|
|
|
@@ -1752,7 +1704,7 @@ angular.module('niceElements')
|
|
|
1752
1704
|
|
|
1753
1705
|
// validate that the date selected is accurate
|
|
1754
1706
|
$scope.checkDate = function(){
|
|
1755
|
-
var date = moment($scope.dateFields.day + "." + ($scope.dateFields.month + 1) + "." + $scope.dateFields.year, "
|
|
1707
|
+
var date = moment($scope.dateFields.day + "." + ($scope.dateFields.month + 1) + "." + $scope.dateFields.year, "D.M.YYYY");
|
|
1756
1708
|
|
|
1757
1709
|
if(date.isValid()){
|
|
1758
1710
|
// Format
|
|
@@ -1830,11 +1782,11 @@ angular.module('niceElements')
|
|
|
1830
1782
|
isInline: '=',
|
|
1831
1783
|
onChange: '&?'
|
|
1832
1784
|
},
|
|
1833
|
-
controller: function($
|
|
1785
|
+
controller: function($scope, $element, gettextCatalog) {
|
|
1834
1786
|
if (!$scope.objValue) { $scope.objValue = 'value'; }
|
|
1835
1787
|
if (!$scope.objKey) { $scope.objKey = 'id'; }
|
|
1836
1788
|
if (!$scope.list) { $scope.list = []; }
|
|
1837
|
-
if (!$scope.noOptionsText) { $scope.noOptionsText = "No options"; }
|
|
1789
|
+
if (!$scope.noOptionsText) { $scope.noOptionsText = gettextCatalog.getString("No options", null, "Nice"); }
|
|
1838
1790
|
if(!$scope.addButtonFunction) { $scope.addButtonFunction = null; }
|
|
1839
1791
|
if(!$scope.listenKeydown) { $scope.listenKeydown = false; }
|
|
1840
1792
|
$scope.valid = $scope.formDropdown;
|
|
@@ -2131,7 +2083,7 @@ angular.module('niceElements')
|
|
|
2131
2083
|
* # nice-dropdown
|
|
2132
2084
|
*/
|
|
2133
2085
|
angular.module('niceElements')
|
|
2134
|
-
.directive('niceDropdown', function () {
|
|
2086
|
+
.directive('niceDropdown', function ($window) {
|
|
2135
2087
|
return {
|
|
2136
2088
|
templateUrl: 'src/components/nice-dropdown/nice-dropdown.html',
|
|
2137
2089
|
restrict: 'E',
|
|
@@ -2165,17 +2117,18 @@ angular.module('niceElements')
|
|
|
2165
2117
|
selectedText: '@',
|
|
2166
2118
|
searchFunction: '=?',
|
|
2167
2119
|
isInline: '=',
|
|
2168
|
-
clearOnSelect: '@'
|
|
2120
|
+
clearOnSelect: '@',
|
|
2121
|
+
positionFixed: '=' // Dropdown menu will be fixed to page
|
|
2169
2122
|
},
|
|
2170
|
-
controller: function ($scope, $element, $timeout) {
|
|
2123
|
+
controller: function ($scope, $element, $timeout, gettextCatalog) {
|
|
2171
2124
|
if (!$scope.objValue) { $scope.objValue = 'value'; }
|
|
2172
2125
|
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"; }
|
|
2126
|
+
if (!$scope.noOptionsText) { $scope.noOptionsText = gettextCatalog.getString("No options", null, "Nice"); }
|
|
2127
|
+
if (!$scope.noDataText) { $scope.noDataText = gettextCatalog.getString("No options", null, "Nice"); }
|
|
2128
|
+
if (!$scope.searchText) { $scope.searchText = gettextCatalog.getString("Search...", null, "Nice"); }
|
|
2129
|
+
if (!$scope.nullableText) { $scope.nullableText = gettextCatalog.getString("None", null, "Nice"); }
|
|
2130
|
+
if (!$scope.selectText) { $scope.selectText = gettextCatalog.getString("None", null, "Nice"); }
|
|
2131
|
+
if (!$scope.selectedText) { $scope.selectedText = gettextCatalog.getString("selected", null, "Nice"); }
|
|
2179
2132
|
if (!$scope.addButtonFunction) { $scope.addButtonFunction = null; }
|
|
2180
2133
|
$scope.nullable = $scope.nullable === 'true' || $scope.nullable === true;
|
|
2181
2134
|
$scope.required = $scope.required === 'true' || $scope.required === true;
|
|
@@ -2207,6 +2160,7 @@ angular.module('niceElements')
|
|
|
2207
2160
|
$scope.open = function () {
|
|
2208
2161
|
$scope.focusInput();
|
|
2209
2162
|
$scope.isOpen = true;
|
|
2163
|
+
if($scope.positionFixed) $scope.updateStyle();
|
|
2210
2164
|
$timeout(function() {
|
|
2211
2165
|
$scope.scrollToHover(true);
|
|
2212
2166
|
}, 100);
|
|
@@ -2337,7 +2291,8 @@ angular.module('niceElements')
|
|
|
2337
2291
|
|
|
2338
2292
|
// ----------------------------------- Handle default -----------------------------------
|
|
2339
2293
|
$scope.handleDefault = function() {
|
|
2340
|
-
if (
|
|
2294
|
+
if ($scope.model) $scope.handleModelChange();
|
|
2295
|
+
if (!$scope.nullable && !$scope.model && !$scope.clearOnSelect && $scope.internalList && $scope.internalList.length > 0) {
|
|
2341
2296
|
$scope.handleSelected($scope.internalList[0], 0);
|
|
2342
2297
|
}
|
|
2343
2298
|
};
|
|
@@ -2351,6 +2306,10 @@ angular.module('niceElements')
|
|
|
2351
2306
|
|
|
2352
2307
|
// ----------------------------------- Watch for model change -----------------------------------
|
|
2353
2308
|
$scope.$watch('model', function (value_new, value_old) {
|
|
2309
|
+
$scope.handleModelChange();
|
|
2310
|
+
});
|
|
2311
|
+
|
|
2312
|
+
$scope.handleModelChange = function() {
|
|
2354
2313
|
$scope.selected = angular.copy($scope.model);
|
|
2355
2314
|
angular.forEach($scope.internalList, function(i, index) {
|
|
2356
2315
|
i._selected = false;
|
|
@@ -2374,7 +2333,7 @@ angular.module('niceElements')
|
|
|
2374
2333
|
$scope.selectedIndex = index;
|
|
2375
2334
|
$scope.scrollToHover();
|
|
2376
2335
|
}
|
|
2377
|
-
}
|
|
2336
|
+
}
|
|
2378
2337
|
} else {
|
|
2379
2338
|
// Is object
|
|
2380
2339
|
if ($scope.multiple) {
|
|
@@ -2397,7 +2356,31 @@ angular.module('niceElements')
|
|
|
2397
2356
|
}
|
|
2398
2357
|
}
|
|
2399
2358
|
});
|
|
2400
|
-
}
|
|
2359
|
+
}
|
|
2360
|
+
|
|
2361
|
+
// ----------------------------------- Handle fixed position -----------------------------------
|
|
2362
|
+
if ($scope.positionFixed) {
|
|
2363
|
+
$scope.dropdownButton = $element[0].getElementsByClassName('btn-dropdown')[0]
|
|
2364
|
+
$scope.dropdownMenu = $element[0].getElementsByClassName('dropdown-menu')[0]
|
|
2365
|
+
$scope.updateStyle = function () {
|
|
2366
|
+
if (this.isOpen) {
|
|
2367
|
+
var buttonPos = $scope.dropdownButton.getBoundingClientRect();
|
|
2368
|
+
$scope.dropdownMenu.style.top = (buttonPos.top + buttonPos.height) + "px";
|
|
2369
|
+
$scope.dropdownMenu.style.left = buttonPos.left + "px";
|
|
2370
|
+
$scope.dropdownMenu.style.width = buttonPos.width + "px";
|
|
2371
|
+
}
|
|
2372
|
+
}
|
|
2373
|
+
|
|
2374
|
+
$scope.updateStyle();
|
|
2375
|
+
|
|
2376
|
+
angular.element($window).on("resize", function () {
|
|
2377
|
+
$scope.updateStyle();
|
|
2378
|
+
})
|
|
2379
|
+
|
|
2380
|
+
angular.element($window).on("scroll", function () {
|
|
2381
|
+
$scope.updateStyle();
|
|
2382
|
+
})
|
|
2383
|
+
}
|
|
2401
2384
|
|
|
2402
2385
|
|
|
2403
2386
|
// ----------------------------------- Watch for keydown and keypress -----------------------------------
|
|
@@ -2469,7 +2452,7 @@ angular.module('niceElements')
|
|
|
2469
2452
|
scope: {
|
|
2470
2453
|
onChange: '&?', // function called on date changed
|
|
2471
2454
|
model: '=', // binding model
|
|
2472
|
-
format: '@', // default: '
|
|
2455
|
+
format: '@', // default: 'D.M.YYYY • H:mm', format for input label string
|
|
2473
2456
|
modelFormat: '@', // default: ''
|
|
2474
2457
|
//currentDate: '@',
|
|
2475
2458
|
date: '@', // default: true, is date picker enabled?
|
|
@@ -2490,7 +2473,7 @@ angular.module('niceElements')
|
|
|
2490
2473
|
closed: '='
|
|
2491
2474
|
},
|
|
2492
2475
|
templateUrl: 'src/components/nice-dtp/nice-dtp.html',
|
|
2493
|
-
|
|
2476
|
+
controller: function ($scope, $element, $attrs, gettextCatalog) {
|
|
2494
2477
|
|
|
2495
2478
|
// default parameters
|
|
2496
2479
|
var params = {
|
|
@@ -2498,15 +2481,15 @@ angular.module('niceElements')
|
|
|
2498
2481
|
noMargin: false,
|
|
2499
2482
|
fieldWidth: 'col-sm-8',
|
|
2500
2483
|
labelWidth: 'col-sm-4',
|
|
2501
|
-
format: '
|
|
2484
|
+
format: 'D.M.YYYY • H:mm',
|
|
2502
2485
|
modelFormat: 'YYYY-MM-DDTHH:mm:ss.SSS',
|
|
2503
2486
|
minDate: null,
|
|
2504
2487
|
maxDate: null,
|
|
2505
2488
|
lang: 'en',
|
|
2506
2489
|
weekStart: 1,
|
|
2507
2490
|
shortTime: false,
|
|
2508
|
-
cancelText: 'Cancel',
|
|
2509
|
-
okText: 'OK',
|
|
2491
|
+
cancelText: gettextCatalog.getString('Cancel', null, 'Nice'),
|
|
2492
|
+
okText: gettextCatalog.getString('OK', null, 'Nice'),
|
|
2510
2493
|
date: true,
|
|
2511
2494
|
time: false,
|
|
2512
2495
|
width: 300,
|
|
@@ -3301,12 +3284,6 @@ angular.module('niceElements')
|
|
|
3301
3284
|
restrict: 'E',
|
|
3302
3285
|
scope: {
|
|
3303
3286
|
text: '@'
|
|
3304
|
-
},
|
|
3305
|
-
link: function postLink(scope, element, attrs) {
|
|
3306
|
-
|
|
3307
|
-
},
|
|
3308
|
-
controller: function($rootScope, $scope) {
|
|
3309
|
-
|
|
3310
3287
|
}
|
|
3311
3288
|
};
|
|
3312
3289
|
});
|
|
@@ -3508,9 +3485,13 @@ angular.module('niceElements')
|
|
|
3508
3485
|
return {
|
|
3509
3486
|
templateUrl: 'src/components/nice-loader/nice-loader.html',
|
|
3510
3487
|
restrict: 'E',
|
|
3488
|
+
transclude: true,
|
|
3511
3489
|
scope: {
|
|
3512
|
-
|
|
3513
|
-
|
|
3490
|
+
visibleWhen: '=',
|
|
3491
|
+
message: '@',
|
|
3492
|
+
fullscreen: '@',
|
|
3493
|
+
fulldiv: '@',
|
|
3494
|
+
addClass: '@'
|
|
3514
3495
|
}
|
|
3515
3496
|
};
|
|
3516
3497
|
});
|
|
@@ -3523,13 +3504,12 @@ angular.module('niceElements')
|
|
|
3523
3504
|
*/
|
|
3524
3505
|
|
|
3525
3506
|
angular.module('niceElements')
|
|
3526
|
-
.factory('NiceNotification', function ($timeout, $http, $compile, $templateCache, $rootScope, $
|
|
3507
|
+
.factory('NiceNotification', function ($timeout, $http, $compile, $templateCache, $rootScope, $sce) {
|
|
3527
3508
|
|
|
3528
3509
|
var startTop = 10;
|
|
3529
3510
|
var startRight = 10;
|
|
3530
3511
|
var verticalSpacing = 10;
|
|
3531
3512
|
var horizontalSpacing = 10;
|
|
3532
|
-
var type = '';
|
|
3533
3513
|
var delay = 5000;
|
|
3534
3514
|
|
|
3535
3515
|
var messageElements = [];
|
|
@@ -3670,6 +3650,7 @@ angular.module('niceElements')
|
|
|
3670
3650
|
step: '@',
|
|
3671
3651
|
decimals: '@',
|
|
3672
3652
|
allowNegative: '@',
|
|
3653
|
+
floatingError: '@',
|
|
3673
3654
|
help: '@',
|
|
3674
3655
|
isInline: '=',
|
|
3675
3656
|
onChange: '&?'
|
|
@@ -3725,6 +3706,12 @@ angular.module('niceElements')
|
|
|
3725
3706
|
|
|
3726
3707
|
// Check canAdd or canSubtract
|
|
3727
3708
|
$scope.check = function() {
|
|
3709
|
+
if ($scope.required && ($scope.model == undefined || $scope.model == null)) {
|
|
3710
|
+
$scope.form.$setValidity("noValue", false);
|
|
3711
|
+
} else {
|
|
3712
|
+
$scope.form.$setValidity("noValue", null);
|
|
3713
|
+
}
|
|
3714
|
+
|
|
3728
3715
|
if ($scope.min && parseFloat($scope.model) <= $scope.min) {
|
|
3729
3716
|
$scope.canSubstract = false;
|
|
3730
3717
|
// $scope.model = $scope.min;
|
|
@@ -4572,7 +4559,7 @@ angular.module('niceElements')
|
|
|
4572
4559
|
* # niceUpload
|
|
4573
4560
|
*/
|
|
4574
4561
|
angular.module('niceElements')
|
|
4575
|
-
.directive('niceUpload', function ($timeout) {
|
|
4562
|
+
.directive('niceUpload', function ($timeout, gettextCatalog) {
|
|
4576
4563
|
return {
|
|
4577
4564
|
restrict: 'E',
|
|
4578
4565
|
replace: true,
|
|
@@ -4595,9 +4582,9 @@ angular.module('niceElements')
|
|
|
4595
4582
|
help: '@'
|
|
4596
4583
|
},
|
|
4597
4584
|
|
|
4598
|
-
link: function(scope, element, attrs
|
|
4585
|
+
link: function(scope, element, attrs){
|
|
4599
4586
|
if (!attrs.title) { attrs.title = ''; }
|
|
4600
|
-
if (!attrs.text) { attrs.text = 'Click to upload file'; }
|
|
4587
|
+
if (!attrs.text) { attrs.text = gettextCatalog.getString('Click to upload file', null, 'Nice'); }
|
|
4601
4588
|
if (!attrs.fieldWidth) { attrs.fieldWidth = 'col-sm-8'; }
|
|
4602
4589
|
if (!attrs.labelWidth) { attrs.labelWidth = 'col-sm-4'; }
|
|
4603
4590
|
attrs.noMargin = angular.isDefined(attrs.noMargin);
|
|
@@ -4656,7 +4643,7 @@ angular.module('niceElements')
|
|
|
4656
4643
|
}
|
|
4657
4644
|
} else {
|
|
4658
4645
|
// Handle file too big error
|
|
4659
|
-
scope.error = "File must be smaller than 1MB";
|
|
4646
|
+
scope.error = gettextCatalog.getString("File must be smaller than 1MB", null, "Nice");
|
|
4660
4647
|
scope.loading = false;
|
|
4661
4648
|
scope.imageSource = null;
|
|
4662
4649
|
}
|
|
@@ -4665,7 +4652,7 @@ angular.module('niceElements')
|
|
|
4665
4652
|
|
|
4666
4653
|
} catch (err) {
|
|
4667
4654
|
// Handle try catch
|
|
4668
|
-
scope.error = "Something went wrong";
|
|
4655
|
+
scope.error = gettextCatalog.getString("Something went wrong", null, "Nice");
|
|
4669
4656
|
scope.loading = false;
|
|
4670
4657
|
scope.imageSource = null;
|
|
4671
4658
|
}
|
|
@@ -4717,9 +4704,9 @@ angular.module('niceElements')
|
|
|
4717
4704
|
isInline: '=',
|
|
4718
4705
|
help: '@'
|
|
4719
4706
|
},
|
|
4720
|
-
controller: function($scope, $attrs) {
|
|
4721
|
-
if (!$attrs.yes) { $attrs.yes = 'Yes'; }
|
|
4722
|
-
if (!$attrs.no) { $attrs.no = 'No'; }
|
|
4707
|
+
controller: function($scope, $attrs, gettextCatalog) {
|
|
4708
|
+
if (!$attrs.yes) { $attrs.yes = gettextCatalog.getString('Yes', null, "Nice"); }
|
|
4709
|
+
if (!$attrs.no) { $attrs.no = gettextCatalog.getString('No', null, "Nice"); }
|
|
4723
4710
|
if (!$attrs.title) { $attrs.title = ''; }
|
|
4724
4711
|
if (!$attrs.fieldWidth) { $attrs.fieldWidth = 'col-sm-8'; }
|
|
4725
4712
|
if (!$attrs.labelWidth) { $attrs.labelWidth = 'col-sm-4'; }
|
|
@@ -4867,18 +4854,18 @@ angular.module('niceElements').run(['$templateCache', function($templateCache) {
|
|
|
4867
4854
|
"<div class=\"disabled-shield\" ng-if=\"isDisabled\"></div>\n" +
|
|
4868
4855
|
"<div class=\"nice-calendar-wrapper\">\n" +
|
|
4869
4856
|
"<div class=\"header\">\n" +
|
|
4870
|
-
"<i class=\"fa fa-angle-left\" ng-click=\"previous()\" title=\"{{
|
|
4857
|
+
"<i class=\"fa fa-angle-left\" ng-click=\"previous()\" title=\"{{ 'Previous month' | translate:'Nice' }}\"></i>\n" +
|
|
4871
4858
|
"<span title=\"{{ month.format('M.YYYY' )}}\">{{ month.format(\"MMMM, YYYY\" )}}</span>\n" +
|
|
4872
|
-
"<i class=\"fa fa-angle-right\" ng-click=\"next()\" title=\"{{
|
|
4859
|
+
"<i class=\"fa fa-angle-right\" ng-click=\"next()\" title=\"{{ 'Next month' | translate:'Nice' }}\"></i>\n" +
|
|
4873
4860
|
"</div>\n" +
|
|
4874
4861
|
"<div class=\"week names\">\n" +
|
|
4875
|
-
"<span class=\"day\" translate>
|
|
4876
|
-
"<span class=\"day\" translate>
|
|
4877
|
-
"<span class=\"day\" translate>
|
|
4878
|
-
"<span class=\"day\" translate>
|
|
4879
|
-
"<span class=\"day\" translate>
|
|
4880
|
-
"<span class=\"day weekend\" translate>
|
|
4881
|
-
"<span class=\"day weekend\" translate>
|
|
4862
|
+
"<span class=\"day\" translate translate-context=\"Nice\">Mon</span>\n" +
|
|
4863
|
+
"<span class=\"day\" translate translate-context=\"Nice\">Tue</span>\n" +
|
|
4864
|
+
"<span class=\"day\" translate translate-context=\"Nice\">Wed</span>\n" +
|
|
4865
|
+
"<span class=\"day\" translate translate-context=\"Nice\">Thu</span>\n" +
|
|
4866
|
+
"<span class=\"day\" translate translate-context=\"Nice\">Fri</span>\n" +
|
|
4867
|
+
"<span class=\"day weekend\" translate translate-context=\"Nice\">Sat</span>\n" +
|
|
4868
|
+
"<span class=\"day weekend\" translate translate-context=\"Nice\">Sun</span>\n" +
|
|
4882
4869
|
"</div>\n" +
|
|
4883
4870
|
"<div class=\"week\" ng-repeat=\"week in weeks\">\n" +
|
|
4884
4871
|
"<span class=\"day\" title=\"{{ day.date.format('D.M.YYYY') }}\" ng-class=\"{\n" +
|
|
@@ -4903,32 +4890,32 @@ angular.module('niceElements').run(['$templateCache', function($templateCache) {
|
|
|
4903
4890
|
"<div class=\"clearfix\"></div>\n" +
|
|
4904
4891
|
"<div class=\"nice-calendar-time\" ng-if=\"time\">\n" +
|
|
4905
4892
|
"<div class=\"time-picker\">\n" +
|
|
4906
|
-
"<select title=\"{{
|
|
4893
|
+
"<select title=\"{{ 'Select start time' | translate:'Nice' }}\" class=\"time-picker-hour\" ng-model=\"startDateHour\" ng-change=\"startHourChange(startDateHour)\" ng-options=\"hour for hour in hours\">\n" +
|
|
4907
4894
|
"</select>\n" +
|
|
4908
4895
|
"</div>\n" +
|
|
4909
4896
|
"<div class=\"time-picker\">\n" +
|
|
4910
|
-
"<select title=\"{{
|
|
4897
|
+
"<select title=\"{{ 'Select start time' | translate:'Nice' }}\" class=\"time-picker-minute\" ng-model=\"startDateMinute\" ng-change=\"startMinuteChange(startDateMinute)\" ng-options=\"minute for minute in minutes\">\n" +
|
|
4911
4898
|
"</select>\n" +
|
|
4912
4899
|
"</div>\n" +
|
|
4913
4900
|
"<div class=\"time-picket-icon\">\n" +
|
|
4914
4901
|
"<i class=\"fa fa-clock-o\"></i>\n" +
|
|
4915
4902
|
"</div>\n" +
|
|
4916
4903
|
"<div class=\"time-picker\">\n" +
|
|
4917
|
-
"<select title=\"{{
|
|
4904
|
+
"<select title=\"{{ 'Select end time' | translate:'Nice' }}\" class=\"time-picker-hour\" ng-model=\"endDateHour\" ng-change=\"endHourChange(endDateHour)\" ng-options=\"hour for hour in hours\">\n" +
|
|
4918
4905
|
"</select>\n" +
|
|
4919
4906
|
"</div>\n" +
|
|
4920
4907
|
"<div class=\"time-picker no-border-right\">\n" +
|
|
4921
|
-
"<select title=\"{{
|
|
4908
|
+
"<select title=\"{{ 'Select end time' | translate:'Nice' }}\" class=\"time-picker-minute\" ng-model=\"endDateMinute\" ng-change=\"endMinuteChange(endDateMinute)\" ng-options=\"minute for minute in minutes\">\n" +
|
|
4922
4909
|
"</select>\n" +
|
|
4923
4910
|
"</div>\n" +
|
|
4924
4911
|
"</div>\n" +
|
|
4925
4912
|
"<div class=\"nice-selected-dates\">\n" +
|
|
4926
4913
|
"<div class=\"nice-start-date\">\n" +
|
|
4927
|
-
"<label
|
|
4914
|
+
"<label translate translate-context=\"Nice\">Start</label>\n" +
|
|
4928
4915
|
"<div ng-class=\"startTimeClass\">{{ formatDate(startDate) }}</div>\n" +
|
|
4929
4916
|
"</div>\n" +
|
|
4930
4917
|
"<div class=\"nice-end-date\">\n" +
|
|
4931
|
-
"<label
|
|
4918
|
+
"<label translate translate-context=\"Nice\">End</label>\n" +
|
|
4932
4919
|
"<div ng-class=\"endTimeClass\">{{ formatDate(endDate) }}</div>\n" +
|
|
4933
4920
|
"</div>\n" +
|
|
4934
4921
|
"<div class=\"clearfix\"></div>\n" +
|
|
@@ -5108,14 +5095,14 @@ angular.module('niceElements').run(['$templateCache', function($templateCache) {
|
|
|
5108
5095
|
"<div class=\"dtp-wrapper\" ng-show=\"isOpen\">\n" +
|
|
5109
5096
|
"<div class=\"dtp-buttons-left\">\n" +
|
|
5110
5097
|
"<div class=\"dtp-buttons-top\">\n" +
|
|
5111
|
-
"<a class=\"btn btn-primary btn-block\" ng-click=\"selectToday()\">Last 24 hours</a>\n" +
|
|
5112
|
-
"<a class=\"btn btn-primary btn-block\" ng-click=\"selectLastNDays(7)\">Last 7 days</a>\n" +
|
|
5113
|
-
"<a class=\"btn btn-primary btn-block\" ng-click=\"selectLastMonth()\">Last month</a>\n" +
|
|
5114
|
-
"<a class=\"btn btn-primary btn-block\" ng-click=\"selectThisMonth()\">This month</a>\n" +
|
|
5098
|
+
"<a class=\"btn btn-primary btn-block\" ng-click=\"selectToday()\" translate translate-context=\"Nice\">Last 24 hours</a>\n" +
|
|
5099
|
+
"<a class=\"btn btn-primary btn-block\" ng-click=\"selectLastNDays(7)\" translate translate-context=\"Nice\">Last 7 days</a>\n" +
|
|
5100
|
+
"<a class=\"btn btn-primary btn-block\" ng-click=\"selectLastMonth()\" translate translate-context=\"Nice\">Last month</a>\n" +
|
|
5101
|
+
"<a class=\"btn btn-primary btn-block\" ng-click=\"selectThisMonth()\" translate translate-context=\"Nice\">This month</a>\n" +
|
|
5115
5102
|
"</div>\n" +
|
|
5116
5103
|
"<div class=\"dtp-buttons-bottom\">\n" +
|
|
5117
|
-
"<a class=\"btn btn-danger btn-block\" ng-click=\"close()\">Cancel</a>\n" +
|
|
5118
|
-
"<a class=\"btn btn-success btn-block\" ng-click=\"confirm()\">OK</a>\n" +
|
|
5104
|
+
"<a class=\"btn btn-danger btn-block\" ng-click=\"close()\" translate translate-context=\"Nice\">Cancel</a>\n" +
|
|
5105
|
+
"<a class=\"btn btn-success btn-block\" ng-click=\"confirm()\" translate translate-context=\"Nice\">OK</a>\n" +
|
|
5119
5106
|
"</div>\n" +
|
|
5120
5107
|
"</div>\n" +
|
|
5121
5108
|
"<div class=\"dtp-left\">\n" +
|
|
@@ -5152,10 +5139,10 @@ angular.module('niceElements').run(['$templateCache', function($templateCache) {
|
|
|
5152
5139
|
"<div class=\"dtp-range-wrapper\" ng-show=\"showDtpRange\">\n" +
|
|
5153
5140
|
"<div class=\"dtp-layer\">\n" +
|
|
5154
5141
|
"<div class=\"dtp-buttons-left\">\n" +
|
|
5155
|
-
"<a class=\"btn btn-primary btn-block\" ng-click=\"selectLastNDays(1)\">Last 24 hours</a>\n" +
|
|
5156
|
-
"<a class=\"btn btn-primary btn-block\" ng-click=\"selectLastNDays(7)\">Last 7 days</a>\n" +
|
|
5157
|
-
"<a class=\"btn btn-primary btn-block\" ng-click=\"selectLastMonth()\">Last month</a>\n" +
|
|
5158
|
-
"<a class=\"btn btn-primary btn-block\" ng-click=\"selectThisMonth()\">This month</a>\n" +
|
|
5142
|
+
"<a class=\"btn btn-primary btn-block\" ng-click=\"selectLastNDays(1)\" translate translate-context=\"Nice\">Last 24 hours</a>\n" +
|
|
5143
|
+
"<a class=\"btn btn-primary btn-block\" ng-click=\"selectLastNDays(7)\" translate translate-context=\"Nice\">Last 7 days</a>\n" +
|
|
5144
|
+
"<a class=\"btn btn-primary btn-block\" ng-click=\"selectLastMonth()\" translate translate-context=\"Nice\">Last month</a>\n" +
|
|
5145
|
+
"<a class=\"btn btn-primary btn-block\" ng-click=\"selectThisMonth()\" translate translate-context=\"Nice\">This month</a>\n" +
|
|
5159
5146
|
"</div>\n" +
|
|
5160
5147
|
"<div class=\"dtp-left\">\n" +
|
|
5161
5148
|
"<nice-dtp model=\"dateStart\" format=\"{{format}}\" model-format=\"{{modelFormat}}\" date=\"{{date}}\" time=\"{{time}}\" width=\"{{width}}\" enable-ok-buttons=\"{{enableOkButtons}}\" lang=\"{{lang}}\" min-date=\"{{minDate}}\" max-date=\"{{maxDate}}\" week-start=\"{{weekStart}}\" ok-text=\"{{okText}}\" cancel-text=\"{{cancelText}}\" inline=\"true\"></nice-dtp>\n" +
|
|
@@ -5164,8 +5151,8 @@ angular.module('niceElements').run(['$templateCache', function($templateCache) {
|
|
|
5164
5151
|
"<nice-dtp model=\"dateEnd\" format=\"{{format}}\" model-format=\"{{modelFormat}}\" date=\"{{date}}\" time=\"{{time}}\" width=\"{{width}}\" enable-ok-buttons=\"{{enableOkButtons}}\" lang=\"{{lang}}\" min-date=\"{{minDate}}\" max-date=\"{{maxDate}}\" week-start=\"{{weekStart}}\" ok-text=\"{{okText}}\" cancel-text=\"{{cancelText}}\" inline=\"true\"></nice-dtp>\n" +
|
|
5165
5152
|
"</div>\n" +
|
|
5166
5153
|
"<div class=\"dtp-buttons-bottom\">\n" +
|
|
5167
|
-
"<a class=\"btn btn-danger btn-block margin-right-20\" ng-click=\"cancelClick()\">Cancel</a>\n" +
|
|
5168
|
-
"<a class=\"btn btn-success btn-block\" ng-click=\"okClick()\">OK</a>\n" +
|
|
5154
|
+
"<a class=\"btn btn-danger btn-block margin-right-20\" ng-click=\"cancelClick()\" translate translate-context=\"Nice\">Cancel</a>\n" +
|
|
5155
|
+
"<a class=\"btn btn-success btn-block\" ng-click=\"okClick()\" translate translate-context=\"Nice\">OK</a>\n" +
|
|
5169
5156
|
"</div>\n" +
|
|
5170
5157
|
"</div>\n" +
|
|
5171
5158
|
"</div>\n" +
|
|
@@ -5220,9 +5207,9 @@ angular.module('niceElements').run(['$templateCache', function($templateCache) {
|
|
|
5220
5207
|
"<span ng-if=\"internalSelected.color_hex_code\" class=\"dropdown-color\" ng-style=\"{'background': internalSelected.color_hex_code}\"></span>\n" +
|
|
5221
5208
|
"<span ng-if=\"!multiple\">{{ getLabel(internalSelected) }}</span>\n" +
|
|
5222
5209
|
"<span ng-if=\"multiple\">\n" +
|
|
5223
|
-
"<span ng-if=\"internalSelected.length > 1\">{{ internalSelected.length }}<translate>selected</translate></span>\n" +
|
|
5210
|
+
"<span ng-if=\"internalSelected.length > 1\">{{ internalSelected.length }}<translate translate-context=\"Nice\">selected</translate></span>\n" +
|
|
5224
5211
|
"<span ng-if=\"internalSelected.length == 1\">{{ getLabel(internalSelected[0]) }}</span>\n" +
|
|
5225
|
-
"<span ng-if=\"internalSelected.length == 0\" translate>None</span>\n" +
|
|
5212
|
+
"<span ng-if=\"internalSelected.length == 0\" translate translate-context=\"Nice\">None</span>\n" +
|
|
5226
5213
|
"</span>\n" +
|
|
5227
5214
|
"<span class=\"caret\"></span>\n" +
|
|
5228
5215
|
"</button>\n" +
|
|
@@ -5256,7 +5243,7 @@ angular.module('niceElements').run(['$templateCache', function($templateCache) {
|
|
|
5256
5243
|
"</div>\n" +
|
|
5257
5244
|
"<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" +
|
|
5258
5245
|
"<div class=\"nice-field-wrapper\">\n" +
|
|
5259
|
-
"<button type=\"button\" class=\"btn btn-dropdown\" ng-click=\"toggle()\" ng-disabled=\"isDisabled || emptyList\">\n" +
|
|
5246
|
+
"<button type=\"button\" class=\"btn btn-dropdown\" ng-ref=\"dropdown-button\" ng-click=\"toggle()\" ng-disabled=\"isDisabled || emptyList\">\n" +
|
|
5260
5247
|
"<div class=\"btn-dropdown-inside\" ng-transclude=\"button\" ng-if=\"selected != null\">\n" +
|
|
5261
5248
|
"<span ng-if=\"!multiple\">{{ selected[objValue] }}</span>\n" +
|
|
5262
5249
|
"<span ng-if=\"multiple\">\n" +
|
|
@@ -5269,7 +5256,7 @@ angular.module('niceElements').run(['$templateCache', function($templateCache) {
|
|
|
5269
5256
|
"<span class=\"caret\" ng-show=\"!loading\"></span>\n" +
|
|
5270
5257
|
"<nice-loader visible-when=\"!loading\"></nice-loader>\n" +
|
|
5271
5258
|
"</button>\n" +
|
|
5272
|
-
"<div class=\"dropdown-menu\">\n" +
|
|
5259
|
+
"<div class=\"dropdown-menu\" ng-class=\"{ 'dropdown-menu-fixed': positionFixed }\">\n" +
|
|
5273
5260
|
"<div class=\"search-bar\" ng-if=\"searchFunction\">\n" +
|
|
5274
5261
|
"<input ng-model=\"internal.search\" ng-model-options=\"{ debounce: 500 }\" ng-change=\"handleSearch()\" placeholder=\"{{ searchText }}\">\n" +
|
|
5275
5262
|
"<span class=\"icon\"><i class=\"fa fa-search\"></i></span>\n" +
|
|
@@ -5413,12 +5400,12 @@ angular.module('niceElements').run(['$templateCache', function($templateCache) {
|
|
|
5413
5400
|
"<span class=\"input-group-addon\" ng-if=\"symbol\">{{ symbol }}</span>\n" +
|
|
5414
5401
|
"</div>\n" +
|
|
5415
5402
|
"<div ng-if=\"forma.$error && forma.$dirty\">\n" +
|
|
5416
|
-
"<div class=\"error-message\" ng-if=\"forma.$dirty && forma.$error.email\" translate>Email is not valid.</div>\n" +
|
|
5417
|
-
"<div class=\"error-message\" ng-if=\"forma.$dirty && forma.$error.pattern\" translate>This field requires a specific pattern.</div>\n" +
|
|
5418
|
-
"<div class=\"error-message\" ng-if=\"forma.$error.minlength\"><translate>Your input is too short. It must contain at least</translate>{{ minlength }}<translate>characters</translate>.</div>\n" +
|
|
5419
|
-
"<div class=\"error-message\" ng-if=\"forma.$error.maxlength\" translate>Your input is too long</div>\n" +
|
|
5420
|
-
"<div class=\"error-message\" ng-if=\"forma.$error.required\" ng-if=\"forma.$dirty\" translate>This field is required.</div>\n" +
|
|
5421
|
-
"<div class=\"error-message\" ng-if=\"forma.$error.unique\" translate>This field must be unique.</div>\n" +
|
|
5403
|
+
"<div class=\"error-message\" ng-if=\"forma.$dirty && forma.$error.email\" translate translate-context=\"Nice\">Email is not valid.</div>\n" +
|
|
5404
|
+
"<div class=\"error-message\" ng-if=\"forma.$dirty && forma.$error.pattern\" translate translate-context=\"Nice\">This field requires a specific pattern.</div>\n" +
|
|
5405
|
+
"<div class=\"error-message\" ng-if=\"forma.$error.minlength\"><translate translate-context=\"Nice\">Your input is too short. It must contain at least</translate>{{ minlength }}<translate translate-context=\"Nice\">characters</translate>.</div>\n" +
|
|
5406
|
+
"<div class=\"error-message\" ng-if=\"forma.$error.maxlength\" translate translate-context=\"Nice\">Your input is too long</div>\n" +
|
|
5407
|
+
"<div class=\"error-message\" ng-if=\"forma.$error.required\" ng-if=\"forma.$dirty\" translate translate-context=\"Nice\">This field is required.</div>\n" +
|
|
5408
|
+
"<div class=\"error-message\" ng-if=\"forma.$error.unique\" translate translate-context=\"Nice\">This field must be unique.</div>\n" +
|
|
5422
5409
|
"</div>\n" +
|
|
5423
5410
|
"</div>\n" +
|
|
5424
5411
|
"</div>\n" +
|
|
@@ -5442,10 +5429,12 @@ angular.module('niceElements').run(['$templateCache', function($templateCache) {
|
|
|
5442
5429
|
|
|
5443
5430
|
|
|
5444
5431
|
$templateCache.put('src/components/nice-loader/nice-loader.html',
|
|
5445
|
-
"<div class=\"nice-loader\" ng-if=\"!visibleWhen\" ng-class=\"addClass\">\n" +
|
|
5446
|
-
"<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
|
|
5432
|
+
"<div class=\"nice-loader\" ng-if=\"!visibleWhen\" ng-class=\"[addClass, { 'nice-loader-fullscreen': fullscreen, 'nice-loader-fulldiv': fulldiv }]\">\n" +
|
|
5433
|
+
"<svg version=\"1.1\" id=\"loader\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" x=\"0px\" y=\"0px\" width=\"40px\" height=\"40px\" viewBox=\"0 0 50 50\" style=\"enable-background:new 0 0 50 50;\" xml:space=\"preserve\">\n" +
|
|
5447
5434
|
"<path fill=\"#000\" d=\"M43.935,25.145c0-10.318-8.364-18.683-18.683-18.683c-10.318,0-18.683,8.365-18.683,18.683h4.068c0-8.071,6.543-14.615,14.615-14.615c8.072,0,14.615,6.543,14.615,14.615H43.935z\"></path>\n" +
|
|
5448
5435
|
"</svg>\n" +
|
|
5436
|
+
"<div class=\"nice-loader-message\" ng-if=\"message\">{{ message }}</div>\n" +
|
|
5437
|
+
"<ng-transclude></ng-transclude>\n" +
|
|
5449
5438
|
"</div>"
|
|
5450
5439
|
);
|
|
5451
5440
|
|
|
@@ -5475,11 +5464,12 @@ angular.module('niceElements').run(['$templateCache', function($templateCache) {
|
|
|
5475
5464
|
"<button class=\"btn btn-default\" type=\"button\" ng-disabled=\"!canAdd\" ng-click=\"add()\">+</button>\n" +
|
|
5476
5465
|
"</span>\n" +
|
|
5477
5466
|
"</div>\n" +
|
|
5478
|
-
"<div ng-if=\"form.$error && !hideError\">\n" +
|
|
5479
|
-
"<div class=\"error-message\" ng-if=\"form.$dirty && form.$error.number\" translate>This field requires a number</div>\n" +
|
|
5480
|
-
"<div class=\"error-message\" ng-if=\"form.$error.min\"><translate>
|
|
5481
|
-
"<div class=\"error-message\" ng-if=\"form.$error.max\"><translate>
|
|
5482
|
-
"<div class=\"error-message\" ng-if=\"form.$error.zero\"><translate>0 is not allowed</translate></div>\n" +
|
|
5467
|
+
"<div class=\"error-messages\" ng-if=\"form.$error && !hideError\" ng-class=\"{ 'floating-error': floatingError }\">\n" +
|
|
5468
|
+
"<div class=\"error-message\" ng-if=\"form.$dirty && form.$error.number\" translate translate-context=\"Nice\">This field requires a number</div>\n" +
|
|
5469
|
+
"<div class=\"error-message\" ng-if=\"form.$error.min\"><translate translate-context=\"Nice\">Minimum value is</translate>{{ min }}</div>\n" +
|
|
5470
|
+
"<div class=\"error-message\" ng-if=\"form.$error.max\"><translate translate-context=\"Nice\">Maximum value is</translate>{{ max }}</div>\n" +
|
|
5471
|
+
"<div class=\"error-message\" ng-if=\"form.$error.zero\"><translate translate-context=\"Nice\">0 is not allowed</translate></div>\n" +
|
|
5472
|
+
"<div class=\"error-message\" ng-if=\"form.$error.noValue && !form.$error.zero && !form.$error.min && !form.$error.max\"><translate translate-context=\"Nice\">Value is missing</translate></div>\n" +
|
|
5483
5473
|
"</div>\n" +
|
|
5484
5474
|
"</div>\n" +
|
|
5485
5475
|
"</div>\n" +
|
|
@@ -5504,8 +5494,8 @@ angular.module('niceElements').run(['$templateCache', function($templateCache) {
|
|
|
5504
5494
|
"<span class=\"input-group-addon\">%</span>\n" +
|
|
5505
5495
|
"</div>\n" +
|
|
5506
5496
|
"<div ng-if=\"form.$error\">\n" +
|
|
5507
|
-
"<div class=\"error-message\" ng-if=\"form.$dirty && form.$error.pattern\">This field requires a specific pattern.</div>\n" +
|
|
5508
|
-
"<div class=\"error-message\" ng-if=\"form.$dirty && form.$error.required\">This field is required.</div>\n" +
|
|
5497
|
+
"<div class=\"error-message\" ng-if=\"form.$dirty && form.$error.pattern\" translate translate-context=\"Nice\">This field requires a specific pattern.</div>\n" +
|
|
5498
|
+
"<div class=\"error-message\" ng-if=\"form.$dirty && form.$error.required\" translate translate-context=\"Nice\">This field is required.</div>\n" +
|
|
5509
5499
|
"</div>\n" +
|
|
5510
5500
|
"</div>\n" +
|
|
5511
5501
|
"</div>\n" +
|
|
@@ -5584,7 +5574,7 @@ angular.module('niceElements').run(['$templateCache', function($templateCache) {
|
|
|
5584
5574
|
"<div ng-class=\"labelWidth ? labelWidth : 'col-sm-4'\" ng-if=\"title\"></div>\n" +
|
|
5585
5575
|
"<div ng-class=\"fieldWidth ? fieldWidth : 'col-sm-8'\">\n" +
|
|
5586
5576
|
"<div class=\"nice-dropdown-empty\" ng-if=\"noResults\">\n" +
|
|
5587
|
-
"<div class=\"nice-search-row\">No results found.</div>\n" +
|
|
5577
|
+
"<div class=\"nice-search-row\" translate translate-context=\"Nice\">No results found.</div>\n" +
|
|
5588
5578
|
"</div>\n" +
|
|
5589
5579
|
"<div class=\"nice-dropdown\" ng-if=\"results.length\">\n" +
|
|
5590
5580
|
"<div ng-repeat=\"result in results\" class=\"nice-search-row\" ng-class=\"{'active': selectedIndex == $index}\" ng-click=\"selectRow(result)\">\n" +
|
|
@@ -5615,7 +5605,7 @@ angular.module('niceElements').run(['$templateCache', function($templateCache) {
|
|
|
5615
5605
|
"<div class=\"nice-search-row nice-search-row-loading\" ng-if=\"loading && results.length == 0\">\n" +
|
|
5616
5606
|
"<nice-loader visible-when=\"!loading\"></nice-loader>\n" +
|
|
5617
5607
|
"</div>\n" +
|
|
5618
|
-
"<div class=\"nice-search-row nice-search-row-empty\" ng-if=\"!loading && results.length == 0\">No results found.</div>\n" +
|
|
5608
|
+
"<div class=\"nice-search-row nice-search-row-empty\" ng-if=\"!loading && results.length == 0\" translate translate-context=\"Nice\">No results found.</div>\n" +
|
|
5619
5609
|
"<div ng-repeat=\"result in results\" class=\"nice-search-row\" ng-class=\"{'active': selectedIndex == $index}\" ng-click=\"selectItem(result)\">\n" +
|
|
5620
5610
|
"<ng-transclude>{{ result[keyForInputLabel] }}</ng-transclude>\n" +
|
|
5621
5611
|
"</div>\n" +
|