nice-elements 1.6.1 → 1.7.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/CHANGELOG.md +12 -1
- package/README.md +1 -1
- package/bower.json +1 -1
- package/dist/nice.js +318 -161
- package/dist/nice.min.js +1 -1
- package/dist/style.css +262 -114
- package/dist/style.css.map +3 -2
- package/dist/style.min.css +2 -2
- package/package.json +1 -1
- package/src/components/nice-calendar/nice-calendar.html +3 -2
- package/src/components/nice-calendar/nice-calendar.scss +9 -5
- package/src/components/nice-checkbox/nice-checkbox.html +1 -3
- package/src/components/nice-checkbox/nice-checkbox.scss +12 -12
- package/src/components/nice-choice/nice-choice.html +3 -1
- package/src/components/nice-choice/nice-choice.scss +14 -3
- package/src/components/nice-date/nice-date.html +5 -4
- package/src/components/nice-date/nice-date.js +50 -52
- package/src/components/nice-date/nice-date.scss +29 -6
- package/src/components/nice-date-input/nice-date-input.html +41 -0
- package/src/components/nice-date-input/nice-date-input.js +97 -0
- package/src/components/nice-date-input/nice-date-input.scss +49 -0
- package/src/components/nice-date-range/nice-date-range.html +3 -1
- package/src/components/nice-datetime-picker/nice-datetime-picker.html +5 -19
- package/src/components/nice-datetimerange-picker/nice-datetimerange-picker.html +6 -1
- package/src/components/nice-datetimerange-picker-2/nice-datetimerange-picker-2.html +5 -3
- package/src/components/nice-datetimerange-picker-2/nice-datetimerange-picker-2.js +25 -26
- package/src/components/nice-dropdown/nice-dropdown.html +3 -1
- package/src/components/nice-dropdown/nice-dropdown.scss +1 -0
- package/src/components/nice-dtp/nice-dtp.html +12 -12
- package/src/components/nice-help/nice-help.html +2 -1
- package/src/components/nice-help/nice-help.scss +7 -0
- package/src/components/nice-input/nice-input.html +9 -42
- package/src/components/nice-input/nice-input.js +28 -28
- package/src/components/nice-input/nice-input.scss +27 -20
- package/src/components/nice-number/nice-number.html +6 -2
- package/src/components/nice-number/nice-number.scss +15 -3
- package/src/components/nice-quantity/nice-quantity.html +6 -2
- package/src/components/nice-quantity/nice-quantity.scss +11 -0
- package/src/components/nice-search/nice-search.html +9 -20
- package/src/components/nice-search2/nice-search2.html +4 -2
- package/src/components/nice-time-picker/nice-time-picker.html +21 -27
- package/src/components/nice-time-picker/nice-time-picker.scss +11 -32
- package/src/components/nice-upload/nice-upload.html +10 -7
- package/src/components/nice-upload/nice-upload.scss +26 -31
- package/src/components/nice-yesno/nice-yesno.html +2 -2
- package/src/components/nice-yesno/nice-yesno.scss +13 -0
- package/src/styles/_nice-buttons.scss +22 -9
- package/src/styles/_nice-common.scss +57 -13
- package/src/styles/_nice.scss +2 -1
- package/src/styles/_variables.scss +3 -0
package/dist/nice.js
CHANGED
|
@@ -814,6 +814,103 @@ angular.module('niceElements')
|
|
|
814
814
|
|
|
815
815
|
'use strict';
|
|
816
816
|
|
|
817
|
+
/**
|
|
818
|
+
* @ngdoc directive
|
|
819
|
+
* @name niceElements.directive:niceDatetimePicker
|
|
820
|
+
* @description
|
|
821
|
+
* # niceDatetimePicker
|
|
822
|
+
*/
|
|
823
|
+
angular.module('niceElements')
|
|
824
|
+
.directive('niceDateInput', function () {
|
|
825
|
+
return {
|
|
826
|
+
restrict: 'E',
|
|
827
|
+
transclude: false,
|
|
828
|
+
templateUrl: 'src/components/nice-date-input/nice-date-input.html',
|
|
829
|
+
scope: {
|
|
830
|
+
model: '=', // binding model
|
|
831
|
+
date: '=?', // default: true, is date picker enabled?
|
|
832
|
+
time: '=?', // default: false, is time picker enabled?
|
|
833
|
+
minDate: '@', // default: undefined
|
|
834
|
+
maxDate: '@', // default: undefined
|
|
835
|
+
title: '@', // default: ''
|
|
836
|
+
noMargin: '@', // default: false, if noMargin==true then entire directive can be injected inside other divs
|
|
837
|
+
fieldWidth: '@', // default: 'col-sm-8', bootstrap classes that defines width of field
|
|
838
|
+
labelWidth: '@', // default: 'col-sm-4', bootstrap classes that defines width of label
|
|
839
|
+
isDisabled: '=',
|
|
840
|
+
help: '@',
|
|
841
|
+
isInline: '=',
|
|
842
|
+
onChange: '&?'
|
|
843
|
+
},
|
|
844
|
+
controller: function ($scope) {
|
|
845
|
+
$scope.formatDate = "DD.MM.YYYY";
|
|
846
|
+
$scope.formatTime = "HH:mm";
|
|
847
|
+
if ($scope.date === undefined) $scope.date = true;
|
|
848
|
+
if ($scope.time === undefined) $scope.time = true;
|
|
849
|
+
$scope.model = moment($scope.model) || moment().set({ 'second': 0, 'millisecond': 0 });
|
|
850
|
+
|
|
851
|
+
$scope.dateChanged = function (date) {
|
|
852
|
+
$scope.modelDate = date.format($scope.formatDate);
|
|
853
|
+
$scope.handleChange();
|
|
854
|
+
}
|
|
855
|
+
|
|
856
|
+
$scope.timeChanged = function (date) {
|
|
857
|
+
$scope.modelTime = date.format($scope.formatTime);
|
|
858
|
+
$scope.handleChange();
|
|
859
|
+
}
|
|
860
|
+
|
|
861
|
+
// -------------------- On date change --------------------
|
|
862
|
+
$scope.handleChange = function () {
|
|
863
|
+
var newModel = moment($scope.modelDate + " " + $scope.modelTime, $scope.formatDate + " " + $scope.formatTime).seconds(0).milliseconds(0);
|
|
864
|
+
if (newModel.isValid()) {
|
|
865
|
+
$scope.model = newModel;
|
|
866
|
+
if ($scope.onChange) $scope.onChange({ model: $scope.model });
|
|
867
|
+
$scope.niceDateInputForm.$setValidity('validDate', true);
|
|
868
|
+
} else {
|
|
869
|
+
$scope.model = null;
|
|
870
|
+
if ($scope.onChange) $scope.onChange({ model: $scope.model });
|
|
871
|
+
$scope.niceDateInputForm.$setValidity('validDate', false);
|
|
872
|
+
}
|
|
873
|
+
}
|
|
874
|
+
|
|
875
|
+
// -------------------- Format model --------------------
|
|
876
|
+
$scope.formatModel = function () {
|
|
877
|
+
$scope.modelDate = $scope.model.format($scope.formatDate);
|
|
878
|
+
$scope.modelTime = $scope.model.format($scope.formatTime);
|
|
879
|
+
}
|
|
880
|
+
$scope.formatModel();
|
|
881
|
+
|
|
882
|
+
// -------------------- Date --------------------
|
|
883
|
+
$scope.dateBlur = function () {
|
|
884
|
+
var newDate = moment($scope.modelDate, $scope.formatDate);
|
|
885
|
+
if (newDate.isValid()) {
|
|
886
|
+
$scope.niceDateInputForm.$setValidity('validDate', true);
|
|
887
|
+
$scope.handleChange();
|
|
888
|
+
} else {
|
|
889
|
+
$scope.niceDateInputForm.$setValidity('validDate', false);
|
|
890
|
+
}
|
|
891
|
+
};
|
|
892
|
+
|
|
893
|
+
// -------------------- Time --------------------
|
|
894
|
+
$scope.timeBlur = function () {
|
|
895
|
+
var newTime = moment($scope.modelTime, $scope.formatTime);
|
|
896
|
+
if (newTime.isValid()) {
|
|
897
|
+
$scope.niceDateInputForm.$setValidity('validDate', true);
|
|
898
|
+
$scope.handleChange();
|
|
899
|
+
} else {
|
|
900
|
+
$scope.niceDateInputForm.$setValidity('validDate', false);
|
|
901
|
+
}
|
|
902
|
+
};
|
|
903
|
+
|
|
904
|
+
// -------------------- Watch model --------------------
|
|
905
|
+
$scope.$watch('model', function () {
|
|
906
|
+
$scope.formatModel();
|
|
907
|
+
});
|
|
908
|
+
}
|
|
909
|
+
}
|
|
910
|
+
}
|
|
911
|
+
);
|
|
912
|
+
'use strict';
|
|
913
|
+
|
|
817
914
|
/**
|
|
818
915
|
* @ngdoc directive
|
|
819
916
|
* @name niceElements.directive:niceDateRange
|
|
@@ -899,7 +996,7 @@ angular.module('niceElements')
|
|
|
899
996
|
*/
|
|
900
997
|
angular.module('niceElements')
|
|
901
998
|
|
|
902
|
-
.directive('niceDate', function() {
|
|
999
|
+
.directive('niceDate', function () {
|
|
903
1000
|
return {
|
|
904
1001
|
restrict: 'E',
|
|
905
1002
|
replace: true,
|
|
@@ -911,7 +1008,8 @@ angular.module('niceElements')
|
|
|
911
1008
|
fieldWidth: '@', // default: 'col-sm-8', bootstrap classes that defines width of field
|
|
912
1009
|
labelWidth: '@', // default: 'col-sm-4', bootstrap classes that defines width of label
|
|
913
1010
|
model: '=',
|
|
914
|
-
time: '
|
|
1011
|
+
time: '=?',
|
|
1012
|
+
date: '=?',
|
|
915
1013
|
help: '@',
|
|
916
1014
|
inline: '@',
|
|
917
1015
|
maxDate: '=',
|
|
@@ -921,14 +1019,17 @@ angular.module('niceElements')
|
|
|
921
1019
|
isInline: '=',
|
|
922
1020
|
onChange: '&?'
|
|
923
1021
|
},
|
|
924
|
-
controller: function($scope, $element, $timeout, gettextCatalog) {
|
|
1022
|
+
controller: function ($scope, $element, $timeout, gettextCatalog) {
|
|
925
1023
|
$scope.isOpen = false;
|
|
1024
|
+
if ($scope.date == undefined) $scope.date = true;
|
|
1025
|
+
if ($scope.time == undefined) $scope.time = false;
|
|
926
1026
|
$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];
|
|
927
1027
|
$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];
|
|
928
1028
|
$scope.translations = {
|
|
929
1029
|
nextMonth: gettextCatalog.getString("Next month", null, "Nice"),
|
|
930
1030
|
prevMonth: gettextCatalog.getString("Previous month", null, "Nice"),
|
|
931
1031
|
};
|
|
1032
|
+
if (!$scope.model) $scope.model = moment();
|
|
932
1033
|
$scope.innerDate = {
|
|
933
1034
|
month: 0,
|
|
934
1035
|
year: 0,
|
|
@@ -941,18 +1042,18 @@ angular.module('niceElements')
|
|
|
941
1042
|
|
|
942
1043
|
// $scope.weekdays = moment.weekdaysShort(false);
|
|
943
1044
|
$scope.weekdays = [
|
|
944
|
-
gettextCatalog.getString("Mon", null, "Nice"),
|
|
945
|
-
gettextCatalog.getString("Tue", null, "Nice"),
|
|
946
|
-
gettextCatalog.getString("Wed", null, "Nice"),
|
|
947
|
-
gettextCatalog.getString("Thu", null, "Nice"),
|
|
948
|
-
gettextCatalog.getString("Fri", null, "Nice"),
|
|
949
|
-
gettextCatalog.getString("Sat", null, "Nice"),
|
|
1045
|
+
gettextCatalog.getString("Mon", null, "Nice"),
|
|
1046
|
+
gettextCatalog.getString("Tue", null, "Nice"),
|
|
1047
|
+
gettextCatalog.getString("Wed", null, "Nice"),
|
|
1048
|
+
gettextCatalog.getString("Thu", null, "Nice"),
|
|
1049
|
+
gettextCatalog.getString("Fri", null, "Nice"),
|
|
1050
|
+
gettextCatalog.getString("Sat", null, "Nice"),
|
|
950
1051
|
gettextCatalog.getString("Sun", null, "Nice")
|
|
951
1052
|
];
|
|
952
1053
|
|
|
953
1054
|
$scope.years = [];
|
|
954
|
-
var year = moment().year()-100;
|
|
955
|
-
for(var i=0; i<200; i++) {
|
|
1055
|
+
var year = moment().year() - 100;
|
|
1056
|
+
for (var i = 0; i < 200; i++) {
|
|
956
1057
|
$scope.years.push(year + i);
|
|
957
1058
|
}
|
|
958
1059
|
|
|
@@ -971,20 +1072,13 @@ angular.module('niceElements')
|
|
|
971
1072
|
{ value: 11, name: gettextCatalog.getString("December", null, "Nice") }
|
|
972
1073
|
]
|
|
973
1074
|
|
|
974
|
-
|
|
975
|
-
if(!$scope.model) $scope.model = moment();
|
|
976
|
-
|
|
977
|
-
if(!$scope.time) $scope.time = false;
|
|
978
|
-
else $scope.time = $scope.time == "true";
|
|
979
|
-
|
|
980
|
-
|
|
981
1075
|
if ($scope.maxDate) $scope.maxDate = moment($scope.maxDate);
|
|
982
1076
|
if ($scope.minDate) $scope.minDate = moment($scope.minDate);
|
|
983
1077
|
|
|
984
|
-
|
|
1078
|
+
|
|
985
1079
|
// Setup popper
|
|
986
1080
|
// https://popper.js.org/docs/v2/constructors/
|
|
987
|
-
$scope.setupPopper = function() {
|
|
1081
|
+
$scope.setupPopper = function () {
|
|
988
1082
|
var button = $element[0].getElementsByClassName('nice-date-button')[0];
|
|
989
1083
|
var tooltip = $element[0].getElementsByClassName('nice-date-dropdown-wrapper')[0];
|
|
990
1084
|
$scope.popper = Popper.createPopper(button, tooltip, {
|
|
@@ -1007,13 +1101,13 @@ angular.module('niceElements')
|
|
|
1007
1101
|
|
|
1008
1102
|
|
|
1009
1103
|
// ------------------ Time changes ------------------
|
|
1010
|
-
$scope.timeChange = function() {
|
|
1104
|
+
$scope.timeChange = function () {
|
|
1011
1105
|
var selectedDate = angular.copy($scope.model);
|
|
1012
1106
|
selectedDate = $scope._removeTime(selectedDate);
|
|
1013
1107
|
selectedDate.hours($scope.innerDate.hour);
|
|
1014
1108
|
selectedDate.minutes($scope.innerDate.minute);
|
|
1015
1109
|
$scope.innerDate.value = $scope.formatDate(selectedDate);
|
|
1016
|
-
|
|
1110
|
+
|
|
1017
1111
|
$scope.model = selectedDate;
|
|
1018
1112
|
if ($scope.onChange) $scope.onChange({ model: $scope.model });
|
|
1019
1113
|
$scope.forma.$setDirty();
|
|
@@ -1021,8 +1115,8 @@ angular.module('niceElements')
|
|
|
1021
1115
|
|
|
1022
1116
|
|
|
1023
1117
|
// ------------------ Day was selected ------------------
|
|
1024
|
-
$scope.select = function(day) {
|
|
1025
|
-
if(!day.isDisabled){
|
|
1118
|
+
$scope.select = function (day) {
|
|
1119
|
+
if (!day.isDisabled) {
|
|
1026
1120
|
var selectedDate = angular.copy(day.date);
|
|
1027
1121
|
selectedDate.hours($scope.innerDate.hour);
|
|
1028
1122
|
selectedDate.minutes($scope.innerDate.minute);
|
|
@@ -1043,7 +1137,7 @@ angular.module('niceElements')
|
|
|
1043
1137
|
|
|
1044
1138
|
|
|
1045
1139
|
// ------------------ Set inner date ------------------
|
|
1046
|
-
$scope.setInnerDate = function(date) {
|
|
1140
|
+
$scope.setInnerDate = function (date) {
|
|
1047
1141
|
$scope.innerDate.year = date.year();
|
|
1048
1142
|
$scope.innerDate.month = date.month();
|
|
1049
1143
|
$scope.innerDate.date = date;
|
|
@@ -1051,14 +1145,14 @@ angular.module('niceElements')
|
|
|
1051
1145
|
|
|
1052
1146
|
|
|
1053
1147
|
// ------------------ Today ------------------
|
|
1054
|
-
$scope.today = function() {
|
|
1148
|
+
$scope.today = function () {
|
|
1055
1149
|
$scope.setInnerDate(moment());
|
|
1056
1150
|
$scope._buildMonth();
|
|
1057
1151
|
};
|
|
1058
1152
|
|
|
1059
1153
|
|
|
1060
1154
|
// ------------------ Go to next month ------------------
|
|
1061
|
-
$scope.next = function() {
|
|
1155
|
+
$scope.next = function () {
|
|
1062
1156
|
$scope.innerDate.date.add(1, "month");
|
|
1063
1157
|
$scope.setInnerDate($scope.innerDate.date);
|
|
1064
1158
|
$scope._buildMonth();
|
|
@@ -1066,7 +1160,7 @@ angular.module('niceElements')
|
|
|
1066
1160
|
|
|
1067
1161
|
|
|
1068
1162
|
// ------------------ Go to previous month ------------------
|
|
1069
|
-
$scope.previous = function() {
|
|
1163
|
+
$scope.previous = function () {
|
|
1070
1164
|
$scope.innerDate.date.subtract(1, "month");
|
|
1071
1165
|
$scope.setInnerDate($scope.innerDate.date);
|
|
1072
1166
|
$scope._buildMonth();
|
|
@@ -1074,7 +1168,7 @@ angular.module('niceElements')
|
|
|
1074
1168
|
|
|
1075
1169
|
|
|
1076
1170
|
// ------------------ Check if dates are equal without time ------------------
|
|
1077
|
-
$scope.isSameDay = function(date1, date2){
|
|
1171
|
+
$scope.isSameDay = function (date1, date2) {
|
|
1078
1172
|
date1 = moment(date1);
|
|
1079
1173
|
date2 = moment(date2);
|
|
1080
1174
|
return (
|
|
@@ -1085,7 +1179,7 @@ angular.module('niceElements')
|
|
|
1085
1179
|
};
|
|
1086
1180
|
|
|
1087
1181
|
// ------------------ Check month ------------------
|
|
1088
|
-
$scope.isSameMonth = function(date1, date2){
|
|
1182
|
+
$scope.isSameMonth = function (date1, date2) {
|
|
1089
1183
|
date1 = moment(date1);
|
|
1090
1184
|
date2 = moment(date2);
|
|
1091
1185
|
return (
|
|
@@ -1095,12 +1189,12 @@ angular.module('niceElements')
|
|
|
1095
1189
|
};
|
|
1096
1190
|
|
|
1097
1191
|
|
|
1098
|
-
$scope.isBetween = function(date1, date2, date3){
|
|
1099
|
-
if(!$scope.nextDate){
|
|
1192
|
+
$scope.isBetween = function (date1, date2, date3) {
|
|
1193
|
+
if (!$scope.nextDate) {
|
|
1100
1194
|
return false;
|
|
1101
|
-
} else if($scope.isSameDay(date1, date2) || $scope.isSameDay(date1, date3)){
|
|
1195
|
+
} else if ($scope.isSameDay(date1, date2) || $scope.isSameDay(date1, date3)) {
|
|
1102
1196
|
return true;
|
|
1103
|
-
} else if(date2.isBefore(date3)){
|
|
1197
|
+
} else if (date2.isBefore(date3)) {
|
|
1104
1198
|
return $scope._removeTime(date1).isBetween(date2, date3);
|
|
1105
1199
|
} else {
|
|
1106
1200
|
return $scope._removeTime(date1).isBetween(date3, date2);
|
|
@@ -1109,24 +1203,25 @@ angular.module('niceElements')
|
|
|
1109
1203
|
|
|
1110
1204
|
|
|
1111
1205
|
// ------------------ Format date ------------------
|
|
1112
|
-
$scope.formatDate = function(date) {
|
|
1113
|
-
if($scope.time) return date.format('D.M.YYYY • H:mm');
|
|
1206
|
+
$scope.formatDate = function (date) {
|
|
1207
|
+
if ($scope.time) return date.format('D.M.YYYY • H:mm');
|
|
1114
1208
|
else return date.format('D.M.YYYY');
|
|
1115
1209
|
};
|
|
1116
1210
|
|
|
1117
1211
|
|
|
1118
1212
|
// ------------------ Remove time from date ------------------
|
|
1119
|
-
$scope._removeTime = function(date) {
|
|
1213
|
+
$scope._removeTime = function (date) {
|
|
1214
|
+
if (!date) return date;
|
|
1120
1215
|
return date.hour(0).minute(0).second(0).millisecond(0);
|
|
1121
1216
|
};
|
|
1122
1217
|
|
|
1123
|
-
$scope._removeTimeWithDate = function(date) {
|
|
1218
|
+
$scope._removeTimeWithDate = function (date) {
|
|
1124
1219
|
return date.date(0).hour(0).minute(0).second(0).millisecond(0);
|
|
1125
1220
|
};
|
|
1126
1221
|
|
|
1127
1222
|
|
|
1128
1223
|
// ------------------ Build month ------------------
|
|
1129
|
-
$scope._buildMonth = function() {
|
|
1224
|
+
$scope._buildMonth = function () {
|
|
1130
1225
|
var done = false;
|
|
1131
1226
|
var date = angular.copy($scope.innerDate.date).date(0).startOf('week').isoWeekday(1);
|
|
1132
1227
|
var monthIndex = date.month();
|
|
@@ -1145,7 +1240,7 @@ angular.module('niceElements')
|
|
|
1145
1240
|
|
|
1146
1241
|
|
|
1147
1242
|
// ------------------ Build week ------------------
|
|
1148
|
-
$scope._buildWeek = function(date) {
|
|
1243
|
+
$scope._buildWeek = function (date) {
|
|
1149
1244
|
var days = [];
|
|
1150
1245
|
for (var i = 0; i < 7; i++) {
|
|
1151
1246
|
var day = {
|
|
@@ -1158,9 +1253,9 @@ angular.module('niceElements')
|
|
|
1158
1253
|
date: date
|
|
1159
1254
|
};
|
|
1160
1255
|
|
|
1161
|
-
if($scope.minDate) day.isDisabled = date.isBefore($scope.minDate);
|
|
1162
|
-
if($scope.maxDate) day.isDisabled = date.isAfter($scope.maxDate);
|
|
1163
|
-
if($scope.minDate && $scope.maxDate) day.isDisabled = !date.isBetween($scope.minDate, $scope.maxDate);
|
|
1256
|
+
if ($scope.minDate) day.isDisabled = date.isBefore($scope.minDate);
|
|
1257
|
+
if ($scope.maxDate) day.isDisabled = date.isAfter($scope.maxDate);
|
|
1258
|
+
if ($scope.minDate && $scope.maxDate) day.isDisabled = !date.isBetween($scope.minDate, $scope.maxDate);
|
|
1164
1259
|
|
|
1165
1260
|
days.push(day);
|
|
1166
1261
|
date = date.clone();
|
|
@@ -1172,13 +1267,13 @@ angular.module('niceElements')
|
|
|
1172
1267
|
|
|
1173
1268
|
|
|
1174
1269
|
// ------------------ Watch for model change ------------------
|
|
1175
|
-
$scope.$watchGroup(["model", 'minDate', 'maxDate', 'nextDate'], function(value) {
|
|
1270
|
+
$scope.$watchGroup(["model", 'minDate', 'maxDate', 'nextDate'], function (value) {
|
|
1176
1271
|
$scope.boostrap();
|
|
1177
1272
|
});
|
|
1178
|
-
|
|
1273
|
+
|
|
1179
1274
|
|
|
1180
1275
|
// ------------------ Get time ------------------
|
|
1181
|
-
$scope.getTime = function() {
|
|
1276
|
+
$scope.getTime = function () {
|
|
1182
1277
|
if ($scope.time) {
|
|
1183
1278
|
$scope.innerDate.hour = moment($scope.model).hours();
|
|
1184
1279
|
$scope.innerDate.minute = moment($scope.model).minutes();
|
|
@@ -1192,14 +1287,14 @@ angular.module('niceElements')
|
|
|
1192
1287
|
|
|
1193
1288
|
|
|
1194
1289
|
// ------------------ Bootstrap ------------------
|
|
1195
|
-
$scope.boostrap = function() {
|
|
1290
|
+
$scope.boostrap = function () {
|
|
1196
1291
|
$scope.setInnerDate(moment($scope.model));
|
|
1197
1292
|
$scope.getTime();
|
|
1198
|
-
|
|
1199
|
-
if(!$scope.time) {
|
|
1293
|
+
|
|
1294
|
+
if (!$scope.time) {
|
|
1200
1295
|
$scope.model = $scope._removeTime($scope.model);
|
|
1201
1296
|
}
|
|
1202
|
-
|
|
1297
|
+
|
|
1203
1298
|
$scope.innerDate.value = $scope.formatDate(moment($scope.model));
|
|
1204
1299
|
$scope._buildMonth();
|
|
1205
1300
|
};
|
|
@@ -1208,10 +1303,10 @@ angular.module('niceElements')
|
|
|
1208
1303
|
|
|
1209
1304
|
|
|
1210
1305
|
// ------------------ Toggle open ------------------
|
|
1211
|
-
$scope.toggleOpen = function() {
|
|
1306
|
+
$scope.toggleOpen = function () {
|
|
1212
1307
|
if (!$scope.isDisabled) {
|
|
1213
1308
|
$scope.isOpen = !$scope.isOpen;
|
|
1214
|
-
$timeout(function() {
|
|
1309
|
+
$timeout(function () {
|
|
1215
1310
|
if ($scope.popper) $scope.popper.update();
|
|
1216
1311
|
})
|
|
1217
1312
|
}
|
|
@@ -1316,14 +1411,14 @@ angular.module('niceElements').directive('niceDatetimePicker', function () {
|
|
|
1316
1411
|
* # niceDatetimerangePicker2
|
|
1317
1412
|
*/
|
|
1318
1413
|
angular.module('niceElements')
|
|
1319
|
-
.directive('niceDatetimerangePicker2', function() {
|
|
1414
|
+
.directive('niceDatetimerangePicker2', function () {
|
|
1320
1415
|
return {
|
|
1321
1416
|
scope: {
|
|
1322
1417
|
startDate: '=', // binding model
|
|
1323
1418
|
endDate: '=', // binding model
|
|
1324
1419
|
formatString: '@', // default: 'D.M.YYYY • H:mm', format for input label string
|
|
1325
1420
|
modelFormat: '@',
|
|
1326
|
-
time: '
|
|
1421
|
+
time: '=', // default: false, is time picker enabled?
|
|
1327
1422
|
minDate: '@', // default: undefined
|
|
1328
1423
|
maxDate: '@', // default: undefined
|
|
1329
1424
|
title: '@', // default: ''
|
|
@@ -1345,25 +1440,24 @@ angular.module('niceElements')
|
|
|
1345
1440
|
|
|
1346
1441
|
|
|
1347
1442
|
// Set defaults
|
|
1348
|
-
if(
|
|
1349
|
-
else $scope.time = $scope.time == "true";
|
|
1443
|
+
if ($scope.time == undefined) $scope.time = false;
|
|
1350
1444
|
|
|
1351
1445
|
|
|
1352
1446
|
// Set format string
|
|
1353
|
-
if(!$scope.formatString) {
|
|
1354
|
-
if($scope.time) $scope.formatString = 'D.M.YYYY • H:mm';
|
|
1447
|
+
if (!$scope.formatString) {
|
|
1448
|
+
if ($scope.time) $scope.formatString = 'D.M.YYYY • H:mm';
|
|
1355
1449
|
else $scope.formatString = 'D.M.YYYY';
|
|
1356
1450
|
}
|
|
1357
1451
|
|
|
1358
1452
|
// Set start date
|
|
1359
|
-
if(!$scope.startDate) {
|
|
1453
|
+
if (!$scope.startDate) {
|
|
1360
1454
|
$scope.startDate = moment();
|
|
1361
1455
|
} else {
|
|
1362
1456
|
$scope.model.innerStartDate = angular.copy($scope.startDate);
|
|
1363
1457
|
}
|
|
1364
1458
|
|
|
1365
1459
|
// Set end date
|
|
1366
|
-
if(!$scope.endDate) {
|
|
1460
|
+
if (!$scope.endDate) {
|
|
1367
1461
|
$scope.endDate = moment();
|
|
1368
1462
|
} else {
|
|
1369
1463
|
$scope.model.innerEndDate = angular.copy($scope.endDate);
|
|
@@ -1372,7 +1466,7 @@ angular.module('niceElements')
|
|
|
1372
1466
|
|
|
1373
1467
|
// Setup popper
|
|
1374
1468
|
// https://popper.js.org/docs/v2/constructors/
|
|
1375
|
-
$scope.setupPopper = function() {
|
|
1469
|
+
$scope.setupPopper = function () {
|
|
1376
1470
|
var button = $element[0].getElementsByClassName('nice-daterange-picker-button')[0];
|
|
1377
1471
|
var tooltip = $element[0].getElementsByClassName('nice-daterange-picker-wrapper')[0];
|
|
1378
1472
|
$scope.popper = Popper.createPopper(button, tooltip, {
|
|
@@ -1388,18 +1482,18 @@ angular.module('niceElements')
|
|
|
1388
1482
|
],
|
|
1389
1483
|
});
|
|
1390
1484
|
};
|
|
1391
|
-
|
|
1485
|
+
|
|
1392
1486
|
$timeout(function () {
|
|
1393
1487
|
$scope.setupPopper();
|
|
1394
1488
|
});
|
|
1395
1489
|
|
|
1396
1490
|
|
|
1397
|
-
$scope.format = function(){
|
|
1491
|
+
$scope.format = function () {
|
|
1398
1492
|
$scope.modelFormat = $scope.startDate.format($scope.formatString) + " - " + $scope.endDate.format($scope.formatString);
|
|
1399
1493
|
};
|
|
1400
1494
|
|
|
1401
1495
|
|
|
1402
|
-
$scope.open = function() {
|
|
1496
|
+
$scope.open = function () {
|
|
1403
1497
|
if (!$scope.isDisabled) {
|
|
1404
1498
|
$scope.isOpen = true;
|
|
1405
1499
|
$scope.popper.update();
|
|
@@ -1407,14 +1501,14 @@ angular.module('niceElements')
|
|
|
1407
1501
|
};
|
|
1408
1502
|
|
|
1409
1503
|
|
|
1410
|
-
$scope.close = function() {
|
|
1504
|
+
$scope.close = function () {
|
|
1411
1505
|
$scope.model.innerStartDate = angular.copy($scope.startDate);
|
|
1412
1506
|
$scope.model.innerEndDate = angular.copy($scope.endDate);
|
|
1413
1507
|
$scope.isOpen = false;
|
|
1414
1508
|
};
|
|
1415
1509
|
|
|
1416
1510
|
|
|
1417
|
-
$scope.confirm = function() {
|
|
1511
|
+
$scope.confirm = function () {
|
|
1418
1512
|
$scope.startDate = angular.copy($scope.model.innerStartDate);
|
|
1419
1513
|
$scope.endDate = angular.copy($scope.model.innerEndDate);
|
|
1420
1514
|
if ($scope.onChange) $scope.onChange({ startDate: $scope.startDate, endDate: $scope.endDate });
|
|
@@ -1422,58 +1516,58 @@ angular.module('niceElements')
|
|
|
1422
1516
|
};
|
|
1423
1517
|
|
|
1424
1518
|
|
|
1425
|
-
$scope.selectToday = function(){
|
|
1519
|
+
$scope.selectToday = function () {
|
|
1426
1520
|
$scope.model.innerStartDate = moment().startOf('day');
|
|
1427
1521
|
$scope.model.innerEndDate = moment().endOf('day');
|
|
1428
1522
|
};
|
|
1429
1523
|
|
|
1430
1524
|
|
|
1431
|
-
$scope.selectLastNDays = function(days){
|
|
1525
|
+
$scope.selectLastNDays = function (days) {
|
|
1432
1526
|
$scope.model.innerStartDate = moment().subtract(days, 'days').startOf('day');
|
|
1433
1527
|
$scope.model.innerEndDate = moment().endOf('day');
|
|
1434
1528
|
};
|
|
1435
1529
|
|
|
1436
1530
|
|
|
1437
|
-
$scope.selectLastMonth = function(){
|
|
1531
|
+
$scope.selectLastMonth = function () {
|
|
1438
1532
|
$scope.model.innerStartDate = moment().subtract(1, 'months').startOf('month').startOf('date');
|
|
1439
1533
|
$scope.model.innerEndDate = moment().subtract(1, 'months').endOf('month').endOf('date');
|
|
1440
1534
|
};
|
|
1441
1535
|
|
|
1442
1536
|
|
|
1443
|
-
$scope.selectThisMonth = function(){
|
|
1537
|
+
$scope.selectThisMonth = function () {
|
|
1444
1538
|
$scope.model.innerStartDate = moment().startOf('month').startOf('date');
|
|
1445
1539
|
$scope.model.innerEndDate = moment().endOf('month').endOf('date');
|
|
1446
1540
|
};
|
|
1447
1541
|
|
|
1448
1542
|
|
|
1449
1543
|
// ------------------ Remove time from date ------------------
|
|
1450
|
-
$scope._removeTime = function(date) {
|
|
1544
|
+
$scope._removeTime = function (date) {
|
|
1451
1545
|
return date.hour(0).minute(0).second(0).millisecond(0);
|
|
1452
1546
|
};
|
|
1453
1547
|
|
|
1454
1548
|
|
|
1455
|
-
$scope.dateChanged = function() {
|
|
1456
|
-
$timeout(function() {
|
|
1549
|
+
$scope.dateChanged = function () {
|
|
1550
|
+
$timeout(function () {
|
|
1457
1551
|
if ($scope.model.innerStartDate && $scope.model.innerEndDate) {
|
|
1458
1552
|
// Check if start date is after end date
|
|
1459
1553
|
if ($scope.model.innerStartDate.isAfter($scope.model.innerEndDate)) {
|
|
1460
1554
|
var temp = angular.copy($scope.model.innerStartDate);
|
|
1461
|
-
$scope.model.innerStartDate = angular.copy($scope.model.innerEndDate);
|
|
1462
|
-
$scope.model.innerEndDate = temp;
|
|
1555
|
+
$scope.model.innerStartDate = angular.copy($scope.model.innerEndDate);
|
|
1556
|
+
$scope.model.innerEndDate = temp;
|
|
1463
1557
|
}
|
|
1464
1558
|
|
|
1465
1559
|
// Check if end date is before start date
|
|
1466
1560
|
if ($scope.model.innerEndDate.isBefore($scope.model.innerStartDate)) {
|
|
1467
1561
|
var temp = angular.copy($scope.model.innerStartDate);
|
|
1468
|
-
$scope.model.innerStartDate = angular.copy($scope.model.innerEndDate);
|
|
1469
|
-
$scope.model.innerEndDate = temp;
|
|
1562
|
+
$scope.model.innerStartDate = angular.copy($scope.model.innerEndDate);
|
|
1563
|
+
$scope.model.innerEndDate = temp;
|
|
1470
1564
|
}
|
|
1471
1565
|
}
|
|
1472
1566
|
});
|
|
1473
1567
|
}
|
|
1474
1568
|
|
|
1475
1569
|
|
|
1476
|
-
$scope.$watchGroup(["startDate", "endDate"], function() {
|
|
1570
|
+
$scope.$watchGroup(["startDate", "endDate"], function () {
|
|
1477
1571
|
$scope.model.innerStartDate = angular.copy($scope.startDate);
|
|
1478
1572
|
$scope.model.innerEndDate = angular.copy($scope.endDate);
|
|
1479
1573
|
$scope.format();
|
|
@@ -3531,7 +3625,7 @@ angular.module('niceElements')
|
|
|
3531
3625
|
attrs.required = attrs.required === 'true';
|
|
3532
3626
|
//attrs.required = angular.isDefined(attrs.required);
|
|
3533
3627
|
|
|
3534
|
-
if(!scope.textArea) {
|
|
3628
|
+
if (!scope.textArea) {
|
|
3535
3629
|
scope.elementType = "input";
|
|
3536
3630
|
} else {
|
|
3537
3631
|
scope.elementType = "textarea";
|
|
@@ -3539,9 +3633,7 @@ angular.module('niceElements')
|
|
|
3539
3633
|
|
|
3540
3634
|
if (scope.isFocused) {
|
|
3541
3635
|
var input = element[0].getElementsByTagName(scope.elementType)[0];
|
|
3542
|
-
if (input)
|
|
3543
|
-
input.focus();
|
|
3544
|
-
}
|
|
3636
|
+
if (input) input.focus();
|
|
3545
3637
|
}
|
|
3546
3638
|
|
|
3547
3639
|
// Set internal type
|
|
@@ -3570,8 +3662,9 @@ angular.module('niceElements')
|
|
|
3570
3662
|
|
|
3571
3663
|
if (angular.isDefined(attrs.minDecimalsCutZeros) && attrs.type == 'number') {
|
|
3572
3664
|
scope.model = Number(scope.model);
|
|
3573
|
-
if (scope.model.toString().split('.').length < 2 || scope.model.toString().split('.')[1].length < parseInt(attrs.minDecimalsCutZeros))
|
|
3574
|
-
scope.model = (Number(scope.model)).toFixed(parseInt(attrs.minDecimalsCutZeros));
|
|
3665
|
+
if (scope.model.toString().split('.').length < 2 || scope.model.toString().split('.')[1].length < parseInt(attrs.minDecimalsCutZeros)) {
|
|
3666
|
+
scope.model = Number((Number(scope.model)).toFixed(parseInt(attrs.minDecimalsCutZeros)));
|
|
3667
|
+
}
|
|
3575
3668
|
}
|
|
3576
3669
|
|
|
3577
3670
|
if (angular.isDefined(scope.regex) && scope.regex != '') {
|
|
@@ -3590,40 +3683,41 @@ angular.module('niceElements')
|
|
|
3590
3683
|
if (scope.onChange) scope.onChange({ model: scope.model });
|
|
3591
3684
|
}
|
|
3592
3685
|
} else {
|
|
3686
|
+
scope.model = scope.internalModel;
|
|
3593
3687
|
if (scope.onChange) scope.onChange({ model: scope.model });
|
|
3594
3688
|
}
|
|
3595
3689
|
});
|
|
3596
|
-
|
|
3597
|
-
|
|
3598
|
-
|
|
3599
|
-
|
|
3600
|
-
|
|
3601
|
-
|
|
3602
|
-
|
|
3603
|
-
|
|
3604
|
-
|
|
3605
|
-
|
|
3606
|
-
event.preventDefault();
|
|
3607
|
-
return false;
|
|
3608
|
-
}
|
|
3609
|
-
} else {
|
|
3610
|
-
event.preventDefault();
|
|
3611
|
-
return false;
|
|
3612
|
-
}
|
|
3613
|
-
} else if (event.charCode == 45) {
|
|
3614
|
-
if (String($scope.model).indexOf("-") >= 0) {
|
|
3690
|
+
},
|
|
3691
|
+
|
|
3692
|
+
controller: function ($scope) {
|
|
3693
|
+
$scope.id = Math.random().toString(36).substring(7);
|
|
3694
|
+
|
|
3695
|
+
$scope.keypress = function (event) {
|
|
3696
|
+
if ($scope.type == "number" || $scope.type == "integer") {
|
|
3697
|
+
if (event.charCode == 46 || event.charCode == 44) { // Handle "." and "," key (only one allowed)
|
|
3698
|
+
if ($scope.type == "number") {
|
|
3699
|
+
if (String($scope.model).indexOf(".") >= 0) {
|
|
3615
3700
|
event.preventDefault();
|
|
3616
3701
|
return false;
|
|
3617
3702
|
}
|
|
3618
|
-
} else
|
|
3619
|
-
|
|
3620
|
-
|
|
3703
|
+
} else {
|
|
3704
|
+
event.preventDefault();
|
|
3705
|
+
return false;
|
|
3706
|
+
}
|
|
3707
|
+
} else if (event.charCode == 45) {
|
|
3708
|
+
if (String($scope.model).indexOf("-") >= 0) {
|
|
3621
3709
|
event.preventDefault();
|
|
3622
3710
|
return false;
|
|
3623
3711
|
}
|
|
3712
|
+
} else if ((event.charCode >= 48 && event.charCode <= 58) || event.charCode == 0) { // Allow only numbers
|
|
3713
|
+
return true;
|
|
3714
|
+
} else { // Prevent everything else
|
|
3715
|
+
event.preventDefault();
|
|
3716
|
+
return false;
|
|
3624
3717
|
}
|
|
3625
|
-
}
|
|
3626
|
-
}
|
|
3718
|
+
}
|
|
3719
|
+
};
|
|
3720
|
+
}
|
|
3627
3721
|
};
|
|
3628
3722
|
});
|
|
3629
3723
|
|
|
@@ -5387,8 +5481,8 @@ angular.module('niceElements').run(['$templateCache', function($templateCache) {
|
|
|
5387
5481
|
"<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" +
|
|
5388
5482
|
"</select>\n" +
|
|
5389
5483
|
"</div>\n" +
|
|
5390
|
-
"<div class=\"time-
|
|
5391
|
-
"<
|
|
5484
|
+
"<div class=\"time-picker-icon\">\n" +
|
|
5485
|
+
"<nice-icon icon=\"icon-clock\"></nice-icon>\n" +
|
|
5392
5486
|
"</div>\n" +
|
|
5393
5487
|
"<div class=\"time-picker\">\n" +
|
|
5394
5488
|
"<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" +
|
|
@@ -5419,9 +5513,7 @@ angular.module('niceElements').run(['$templateCache', function($templateCache) {
|
|
|
5419
5513
|
$templateCache.put('src/components/nice-checkbox/nice-checkbox.html',
|
|
5420
5514
|
"<div class=\"nice-component nice-checkbox\" ng-class=\"{ 'checked': model, 'margin-bottom-0' : noMargin }\" ng-click=\"toggle()\">\n" +
|
|
5421
5515
|
"<button class=\"btn checkbox\">\n" +
|
|
5422
|
-
"<
|
|
5423
|
-
"<path class=\"check-stroke\" d=\"M-273.2,398.2l10,9.9 l22.4-22.3\"></path>\n" +
|
|
5424
|
-
"</svg>\n" +
|
|
5516
|
+
"<nice-icon class=\"check\" icon=\"icon-check\"></nice-icon>\n" +
|
|
5425
5517
|
"</button>\n" +
|
|
5426
5518
|
"<div ng-if=\"title\" class=\"message\">{{ title }}</div>\n" +
|
|
5427
5519
|
"</div>"
|
|
@@ -5438,7 +5530,9 @@ angular.module('niceElements').run(['$templateCache', function($templateCache) {
|
|
|
5438
5530
|
"<div class=\"nice-field col-xs-12\" ng-class=\"fieldWidth ? fieldWidth : 'col-sm-8'\">\n" +
|
|
5439
5531
|
"<ul class=\"list-unstyled\" ng-class=\"{ 'disabled': isDisabled }\">\n" +
|
|
5440
5532
|
"<li ng-repeat=\"item in internalList\" ng-class=\"{ 'selected' : isItemSelected(item) }\" ng-click=\"toggle(item)\">\n" +
|
|
5441
|
-
"<button class=\"choice-checkbox\" ng-class=\"{'circle' : !multiple }\"
|
|
5533
|
+
"<button class=\"choice-checkbox\" ng-class=\"{'circle' : !multiple }\">\n" +
|
|
5534
|
+
"<nice-icon icon=\"icon-check\"></nice-icon>\n" +
|
|
5535
|
+
"</button>\n" +
|
|
5442
5536
|
"<div ng-transclude class=\"choice-label\">{{ getLabel(item) }}</div>\n" +
|
|
5443
5537
|
"</li>\n" +
|
|
5444
5538
|
"</ul>\n" +
|
|
@@ -5463,6 +5557,46 @@ angular.module('niceElements').run(['$templateCache', function($templateCache) {
|
|
|
5463
5557
|
);
|
|
5464
5558
|
|
|
5465
5559
|
|
|
5560
|
+
$templateCache.put('src/components/nice-date-input/nice-date-input.html',
|
|
5561
|
+
"<div class=\"nice-component nice-date-input\" ng-form=\"niceDateInputForm\" ng-class=\"{ 'margin-bottom-0': noMargin, 'nice-component-inline': isInline, 'error': niceDateInputForm.$invalid }\">\n" +
|
|
5562
|
+
"<div class=\"row\">\n" +
|
|
5563
|
+
"<div class=\"nice-title col-xs-12\" ng-class=\"labelWidth ? labelWidth : 'col-sm-4'\" ng-if=\"title\">\n" +
|
|
5564
|
+
"<div class=\"nice-title-text\">{{ title }}<span ng-if=\"required\">*</span></div>\n" +
|
|
5565
|
+
"<nice-help class=\"nice-title-help\" ng-if=\"help\" text=\"{{ help }}\"></nice-help>\n" +
|
|
5566
|
+
"</div>\n" +
|
|
5567
|
+
"<div class=\"nice-field col-xs-12\" ng-class=\"[fieldWidth ? fieldWidth : 'col-sm-8', { 'nice-disabled': isDisabled }]\">\n" +
|
|
5568
|
+
"<div class=\"input-group nice-date-input\" ng-if=\"date\" ng-class=\"{ 'has-warning': !disabled && niceDateInputForm.$invalid && niceDateInputForm.$dirty }\">\n" +
|
|
5569
|
+
"<input type=\"text\" class=\"form-control\" ng-model=\"modelDate\" ng-blur=\"dateBlur()\" ng-disabled=\"isDisabled\">\n" +
|
|
5570
|
+
"<nice-popup placement=\"bottom\">\n" +
|
|
5571
|
+
"<nice-popup-target>\n" +
|
|
5572
|
+
"<button class=\"input-group-addon btn btn-default\" tabindex=\"-1\">\n" +
|
|
5573
|
+
"<nice-icon icon=\"icon-calendar\"></nice-icon>\n" +
|
|
5574
|
+
"</button>\n" +
|
|
5575
|
+
"</nice-popup-target>\n" +
|
|
5576
|
+
"<nice-popup-content>\n" +
|
|
5577
|
+
"<nice-date is-inline=\"true\" inline=\"true\" model=\"model\" on-change=\"dateChanged(model)\" no-margin=\"true\"></nice-date>\n" +
|
|
5578
|
+
"</nice-popup-content>\n" +
|
|
5579
|
+
"</nice-popup>\n" +
|
|
5580
|
+
"</div>\n" +
|
|
5581
|
+
"<div class=\"input-group nice-time-input\" ng-if=\"time\" ng-class=\"{ 'has-warning': !disabled && niceDateInputForm.$invalid && niceDateInputForm.$dirty }\">\n" +
|
|
5582
|
+
"<input type=\"text\" class=\"form-control\" ng-model=\"modelTime\" ng-blur=\"timeBlur()\" ng-disabled=\"isDisabled\">\n" +
|
|
5583
|
+
"<nice-popup placement=\"bottom\">\n" +
|
|
5584
|
+
"<nice-popup-target>\n" +
|
|
5585
|
+
"<button class=\"input-group-addon btn btn-default\" tabindex=\"-1\">\n" +
|
|
5586
|
+
"<nice-icon icon=\"icon-clock\"></nice-icon>\n" +
|
|
5587
|
+
"</button>\n" +
|
|
5588
|
+
"</nice-popup-target>\n" +
|
|
5589
|
+
"<nice-popup-content>\n" +
|
|
5590
|
+
"<nice-date is-inline=\"true\" inline=\"true\" time=\"true\" date=\"false\" on-change=\"timeChanged(model)\" model=\"model\"></nice-date>\n" +
|
|
5591
|
+
"</nice-popup-content>\n" +
|
|
5592
|
+
"</nice-popup>\n" +
|
|
5593
|
+
"</div>\n" +
|
|
5594
|
+
"</div>\n" +
|
|
5595
|
+
"</div>\n" +
|
|
5596
|
+
"</div>"
|
|
5597
|
+
);
|
|
5598
|
+
|
|
5599
|
+
|
|
5466
5600
|
$templateCache.put('src/components/nice-date-range/nice-date-range.html',
|
|
5467
5601
|
"<ng-form class=\"nice-component nice-date-range\" ng-class=\"{ 'margin-bottom-0' : noMargin, 'nice-component-inline': isInline }\" name=\"form\">\n" +
|
|
5468
5602
|
"<div class=\"row\">\n" +
|
|
@@ -5473,7 +5607,9 @@ angular.module('niceElements').run(['$templateCache', function($templateCache) {
|
|
|
5473
5607
|
"<div class=\"nice-field col-xs-12\" ng-class=\"fieldWidth ? fieldWidth : 'col-sm-8'\">\n" +
|
|
5474
5608
|
"<div class=\"input-group\">\n" +
|
|
5475
5609
|
"<input date-range-picker class=\"form-control date-picker\" type=\"text\" options=\"opts\" ng-model=\"model\">\n" +
|
|
5476
|
-
"<span date-range-picker options=\"opts\" ng-model=\"model\" class=\"input-group-addon\"
|
|
5610
|
+
"<span date-range-picker options=\"opts\" ng-model=\"model\" class=\"input-group-addon\">\n" +
|
|
5611
|
+
"<nice-icon icon=\"icon-calendar\"></nice-icon>\n" +
|
|
5612
|
+
"</span>\n" +
|
|
5477
5613
|
"</div>\n" +
|
|
5478
5614
|
"</div>\n" +
|
|
5479
5615
|
"</div>\n" +
|
|
@@ -5494,12 +5630,12 @@ angular.module('niceElements').run(['$templateCache', function($templateCache) {
|
|
|
5494
5630
|
"<div class=\"nice-date-button input-group\" ng-class=\"{ 'open': isOpen }\" ng-show=\"!inline\" ng-click=\"toggleOpen()\">\n" +
|
|
5495
5631
|
"<input type=\"text\" class=\"form-control\" value=\"{{ model | niceDate:time }}\" readonly=\"readonly\">\n" +
|
|
5496
5632
|
"<span class=\"input-group-addon clickable\">\n" +
|
|
5497
|
-
"<
|
|
5633
|
+
"<nice-icon icon=\"icon-calendar\"></nice-icon>\n" +
|
|
5498
5634
|
"</span>\n" +
|
|
5499
5635
|
"</div>\n" +
|
|
5500
5636
|
"<div ng-class=\"{ 'nice-date-dropdown-wrapper': !inline }\">\n" +
|
|
5501
|
-
"<div ng-class=\"{ 'nice-date-dropdown': !inline }\" ng-if=\"inline || isOpen\">\n" +
|
|
5502
|
-
"<div class=\"nice-date-date\" ng-
|
|
5637
|
+
"<div ng-class=\"{ 'nice-date-dropdown': !inline, 'with-time': time, 'no-date': !date }\" ng-if=\"inline || isOpen\">\n" +
|
|
5638
|
+
"<div class=\"nice-date-date\" ng-if=\"date\" role=\"grid\">\n" +
|
|
5503
5639
|
"<div class=\"nice-date-header\">\n" +
|
|
5504
5640
|
"<span>\n" +
|
|
5505
5641
|
"<select class=\"year-picker\" ng-model=\"innerDate.year\" ng-change=\"handleDateChange()\" ng-options=\"year for year in years\">\n" +
|
|
@@ -5528,7 +5664,7 @@ angular.module('niceElements').run(['$templateCache', function($templateCache) {
|
|
|
5528
5664
|
"</div>\n" +
|
|
5529
5665
|
"</div>\n" +
|
|
5530
5666
|
"<div class=\"nice-date-time\" ng-if=\"time\">\n" +
|
|
5531
|
-
"<
|
|
5667
|
+
"<nice-icon icon=\"icon-clock\"></nice-icon>\n" +
|
|
5532
5668
|
"<div class=\"time-picker time-picker-hour\">\n" +
|
|
5533
5669
|
"<select ng-disabled=\"isDisabled\" ng-model=\"innerDate.hour\" ng-change=\"timeChange()\" ng-options=\"hour as hour for hour in hours track by hour\">\n" +
|
|
5534
5670
|
"</select>\n" +
|
|
@@ -5560,7 +5696,8 @@ angular.module('niceElements').run(['$templateCache', function($templateCache) {
|
|
|
5560
5696
|
"<div class=\"input-group\" id=\"dropdown{{randNum}}\">\n" +
|
|
5561
5697
|
"<input type=\"text\" class=\"form-control\" value=\"{{ value }}\" ng-click=\"openDtp()\" ng-disabled=\"isDisabled\">\n" +
|
|
5562
5698
|
"<span class=\"input-group-addon clickable\" ng-click=\"openDtp()\">\n" +
|
|
5563
|
-
"<
|
|
5699
|
+
"<nice-icon ng-if=\"date == 'true'\" icon=\"icon-calendar\"></nice-icon>\n" +
|
|
5700
|
+
"<nice-icon ng-if=\"date != 'true'\" icon=\"icon-clock\"></nice-icon>\n" +
|
|
5564
5701
|
"</span>\n" +
|
|
5565
5702
|
"</div>\n" +
|
|
5566
5703
|
"<div ng-show=\"isOpen\">\n" +
|
|
@@ -5568,7 +5705,7 @@ angular.module('niceElements').run(['$templateCache', function($templateCache) {
|
|
|
5568
5705
|
"</div>\n" +
|
|
5569
5706
|
"</div>\n" +
|
|
5570
5707
|
"</div>\n" +
|
|
5571
|
-
"</div
|
|
5708
|
+
"</div>"
|
|
5572
5709
|
);
|
|
5573
5710
|
|
|
5574
5711
|
|
|
@@ -5583,7 +5720,9 @@ angular.module('niceElements').run(['$templateCache', function($templateCache) {
|
|
|
5583
5720
|
"<div class=\"nice-field col-xs-12\" ng-class=\"[fieldWidth ? fieldWidth : 'col-sm-8', { 'nice-disabled': isDisabled }]\">\n" +
|
|
5584
5721
|
"<div class=\"nice-daterange-picker-button input-group\" ng-class=\"{ 'open': isOpen }\" ng-click=\"open()\">\n" +
|
|
5585
5722
|
"<input type=\"text\" class=\"form-control\" value=\"{{ modelFormat }}\" readonly=\"readonly\">\n" +
|
|
5586
|
-
"<span class=\"input-group-addon clickable\"
|
|
5723
|
+
"<span class=\"input-group-addon clickable\">\n" +
|
|
5724
|
+
"<nice-icon icon=\"icon-calendar\"></nice-icon>\n" +
|
|
5725
|
+
"</span>\n" +
|
|
5587
5726
|
"</div>\n" +
|
|
5588
5727
|
"<div class=\"nice-daterange-picker-wrapper\">\n" +
|
|
5589
5728
|
"<div class=\"dtp-wrapper\" ng-if=\"isOpen\">\n" +
|
|
@@ -5600,10 +5739,10 @@ angular.module('niceElements').run(['$templateCache', function($templateCache) {
|
|
|
5600
5739
|
"</div>\n" +
|
|
5601
5740
|
"</div>\n" +
|
|
5602
5741
|
"<div class=\"dtp-left\">\n" +
|
|
5603
|
-
"<nice-date model=\"model.innerStartDate\" next-date=\"model.innerEndDate\" is-inline=\"true\" no-margin=\"true\" inline=\"true\" time=\"
|
|
5742
|
+
"<nice-date model=\"model.innerStartDate\" next-date=\"model.innerEndDate\" is-inline=\"true\" no-margin=\"true\" inline=\"true\" time=\"time\" on-change=\"dateChanged(model)\"></nice-date>\n" +
|
|
5604
5743
|
"</div>\n" +
|
|
5605
5744
|
"<div class=\"dtp-right\">\n" +
|
|
5606
|
-
"<nice-date model=\"model.innerEndDate\" next-date=\"model.innerStartDate\" is-inline=\"true\" no-margin=\"true\" inline=\"true\" time=\"
|
|
5745
|
+
"<nice-date model=\"model.innerEndDate\" next-date=\"model.innerStartDate\" is-inline=\"true\" no-margin=\"true\" inline=\"true\" time=\"time\" on-change=\"dateChanged(model)\"></nice-date>\n" +
|
|
5607
5746
|
"</div>\n" +
|
|
5608
5747
|
"</div>\n" +
|
|
5609
5748
|
"</div>\n" +
|
|
@@ -5627,7 +5766,10 @@ angular.module('niceElements').run(['$templateCache', function($templateCache) {
|
|
|
5627
5766
|
"<div class=\"dropdown-toggle\" id=\"dropdown{{randNum}}\" role=\"button\" ng-click=\"openDtpRange()\">\n" +
|
|
5628
5767
|
"<div class=\"input-group\">\n" +
|
|
5629
5768
|
"<input type=\"text\" class=\"form-control\" value=\"{{value}}\" ng-click=\"openDtpRange()\">\n" +
|
|
5630
|
-
"<span class=\"input-group-addon clickable\"
|
|
5769
|
+
"<span class=\"input-group-addon clickable\">\n" +
|
|
5770
|
+
"<nice-icon ng-if=\"date != 'false'\" icon=\"icon-calendar\"></nice-icon>\n" +
|
|
5771
|
+
"<nice-icon ng-if=\"date == 'false'\" icon=\"icon-clock\"></nice-icon>\n" +
|
|
5772
|
+
"</span>\n" +
|
|
5631
5773
|
"</div>\n" +
|
|
5632
5774
|
"</div>\n" +
|
|
5633
5775
|
"</div>\n" +
|
|
@@ -5771,7 +5913,9 @@ angular.module('niceElements').run(['$templateCache', function($templateCache) {
|
|
|
5771
5913
|
"</div>\n" +
|
|
5772
5914
|
"</div>\n" +
|
|
5773
5915
|
"</div>\n" +
|
|
5774
|
-
"<button class=\"btn btn-primary add-btn\" type=\"button\" ng-if=\"addButtonFunction && !isDisabled\" ng-click=\"addButtonFunction()\"
|
|
5916
|
+
"<button class=\"btn btn-primary btn-icon add-btn\" type=\"button\" ng-if=\"addButtonFunction && !isDisabled\" ng-click=\"addButtonFunction()\">\n" +
|
|
5917
|
+
"<nice-icon icon=\"icon-plus\"></nice-icon>\n" +
|
|
5918
|
+
"</button>\n" +
|
|
5775
5919
|
"</div>\n" +
|
|
5776
5920
|
"</div>\n" +
|
|
5777
5921
|
"</div>\n" +
|
|
@@ -5865,13 +6009,13 @@ angular.module('niceElements').run(['$templateCache', function($templateCache) {
|
|
|
5865
6009
|
"</div>\n" +
|
|
5866
6010
|
"</div>\n" +
|
|
5867
6011
|
"</div>\n" +
|
|
5868
|
-
"</div
|
|
6012
|
+
"</div>"
|
|
5869
6013
|
);
|
|
5870
6014
|
|
|
5871
6015
|
|
|
5872
6016
|
$templateCache.put('src/components/nice-help/nice-help.html',
|
|
5873
6017
|
"<div class=\"nice-help\" ng-mouseover=\"onHover()\">\n" +
|
|
5874
|
-
"<
|
|
6018
|
+
"<nice-icon icon=\"icon-help-circle\" class=\"nice-help-button\"></nice-icon>\n" +
|
|
5875
6019
|
"<div class=\"nice-help-popup\">\n" +
|
|
5876
6020
|
"<span ng-bind-html=\"text\">{{ text }}</span>\n" +
|
|
5877
6021
|
"<div data-popper-arrow class=\"nice-help-arrow\"></div>\n" +
|
|
@@ -5909,14 +6053,16 @@ angular.module('niceElements').run(['$templateCache', function($templateCache) {
|
|
|
5909
6053
|
"<div ng-if=\"forma.$error && forma.$dirty\">\n" +
|
|
5910
6054
|
"<div class=\"error-message\" ng-if=\"forma.$dirty && forma.$error.email\" translate translate-context=\"Nice\">Email is not valid.</div>\n" +
|
|
5911
6055
|
"<div class=\"error-message\" ng-if=\"forma.$dirty && forma.$error.pattern\" translate translate-context=\"Nice\">This field requires a specific pattern.</div>\n" +
|
|
5912
|
-
"<div class=\"error-message\" ng-if=\"forma.$error.minlength\"
|
|
6056
|
+
"<div class=\"error-message\" ng-if=\"forma.$error.minlength\">\n" +
|
|
6057
|
+
"<translate translate-context=\"Nice\">Your input is too short. It must contain at least</translate> {{ minlength }} <translate translate-context=\"Nice\">characters</translate>.\n" +
|
|
6058
|
+
"</div>\n" +
|
|
5913
6059
|
"<div class=\"error-message\" ng-if=\"forma.$error.maxlength\" translate translate-context=\"Nice\">Your input is too long</div>\n" +
|
|
5914
6060
|
"<div class=\"error-message\" ng-if=\"forma.$error.required\" ng-if=\"forma.$dirty\" translate translate-context=\"Nice\">This field is required.</div>\n" +
|
|
5915
6061
|
"<div class=\"error-message\" ng-if=\"forma.$error.unique\" translate translate-context=\"Nice\">This field must be unique.</div>\n" +
|
|
5916
6062
|
"</div>\n" +
|
|
5917
6063
|
"</div>\n" +
|
|
5918
6064
|
"</div>\n" +
|
|
5919
|
-
"</ng-form
|
|
6065
|
+
"</ng-form>"
|
|
5920
6066
|
);
|
|
5921
6067
|
|
|
5922
6068
|
|
|
@@ -5964,11 +6110,15 @@ angular.module('niceElements').run(['$templateCache', function($templateCache) {
|
|
|
5964
6110
|
"<div class=\"nice-field col-xs-12\" ng-class=\"fieldWidth ? fieldWidth : 'col-sm-8'\">\n" +
|
|
5965
6111
|
"<div class=\"input-group\" ng-class=\"{'has-warning': !disabled && niceNumberForm.$invalid && niceNumberForm.$dirty}\">\n" +
|
|
5966
6112
|
"<span class=\"input-group-btn\">\n" +
|
|
5967
|
-
"<button class=\"btn btn-default\" type=\"button\" ng-disabled=\"!canSubstract\" ng-click=\"subtract()\" tabindex=\"-1\"
|
|
6113
|
+
"<button class=\"btn btn-default btn-left\" type=\"button\" ng-disabled=\"!canSubstract\" ng-click=\"subtract()\" tabindex=\"-1\">\n" +
|
|
6114
|
+
"<nice-icon icon=\"icon-minus\"></nice-icon>\n" +
|
|
6115
|
+
"</button>\n" +
|
|
5968
6116
|
"</span>\n" +
|
|
5969
6117
|
"<input type=\"number\" step=\"{{ step }}\" ng-change=\"inputChanged()\" class=\"form-control\" max=\"{{ max }}\" min=\"{{ min }}\" ng-model=\"model\">\n" +
|
|
5970
6118
|
"<span class=\"input-group-btn\">\n" +
|
|
5971
|
-
"<button class=\"btn btn-default\" type=\"button\" ng-disabled=\"!canAdd\" ng-click=\"add()\" tabindex=\"-1\"
|
|
6119
|
+
"<button class=\"btn btn-default btn-right\" type=\"button\" ng-disabled=\"!canAdd\" ng-click=\"add()\" tabindex=\"-1\">\n" +
|
|
6120
|
+
"<nice-icon icon=\"icon-plus\"></nice-icon>\n" +
|
|
6121
|
+
"</button>\n" +
|
|
5972
6122
|
"</span>\n" +
|
|
5973
6123
|
"</div>\n" +
|
|
5974
6124
|
"<div class=\"error-messages\" ng-if=\"niceNumberForm.$error && !hideError\" ng-class=\"{ 'floating-error': floatingError }\">\n" +
|
|
@@ -6058,9 +6208,13 @@ angular.module('niceElements').run(['$templateCache', function($templateCache) {
|
|
|
6058
6208
|
"</div>\n" +
|
|
6059
6209
|
"<div class=\"nice-field col-xs-12\" ng-class=\"[fieldWidth ? fieldWidth : 'col-sm-8', { 'nice-disabled': isDisabled }]\">\n" +
|
|
6060
6210
|
"<div class=\"input-group\">\n" +
|
|
6061
|
-
"<button class=\"btn btn-default btn-left\" ng-click=\"sub()\" type=\"button\" ng-disabled=\"isDisabled\" tabindex=\"-1\"
|
|
6211
|
+
"<button class=\"btn btn-default btn-left\" ng-click=\"sub()\" type=\"button\" ng-disabled=\"isDisabled\" tabindex=\"-1\">\n" +
|
|
6212
|
+
"<nice-icon icon=\"icon-minus\"></nice-icon>\n" +
|
|
6213
|
+
"</button>\n" +
|
|
6062
6214
|
"<input class=\"value form-control\" ng-model=\"model\" type=\"number\" ng-change=\"handleChange()\" ng-disabled=\"isDisabled\">\n" +
|
|
6063
|
-
"<button class=\"btn btn-default btn-right\" ng-click=\"add()\" type=\"button\" ng-disabled=\"isDisabled\" tabindex=\"-1\"
|
|
6215
|
+
"<button class=\"btn btn-default btn-right\" ng-click=\"add()\" type=\"button\" ng-disabled=\"isDisabled\" tabindex=\"-1\">\n" +
|
|
6216
|
+
"<nice-icon icon=\"icon-plus\"></nice-icon>\n" +
|
|
6217
|
+
"</button>\n" +
|
|
6064
6218
|
"</div>\n" +
|
|
6065
6219
|
"</div>\n" +
|
|
6066
6220
|
"</div>\n" +
|
|
@@ -6083,11 +6237,11 @@ angular.module('niceElements').run(['$templateCache', function($templateCache) {
|
|
|
6083
6237
|
" \">\n" +
|
|
6084
6238
|
"<input class=\"form-control\" type=\"text\" id=\"{{ id }}\" ng-model=\"modelString\" ng-keypress=\"keypress($event)\" placeholder=\"{{ placeholder }}\" ng-disabled=\"isDisabled\" ng-change=\"updateSearch()\" ng-required=\"required\" tabindex=\"{{ tabIndex }}\">\n" +
|
|
6085
6239
|
"<span class=\"input-group-addon clickable\" ng-click=\"search()\" ng-if=\"!model\">\n" +
|
|
6086
|
-
"<
|
|
6087
|
-
"<
|
|
6240
|
+
"<nice-icon ng-show=\"!loading\" icon=\"icon-search\"></nice-icon>\n" +
|
|
6241
|
+
"<nice-icon ng-show=\"loading\" icon=\"icon-loader\" class=\"d-block nice-animation-spin\"></nice-icon>\n" +
|
|
6088
6242
|
"</span>\n" +
|
|
6089
6243
|
"<span class=\"input-group-addon clickable\" ng-click=\"remove()\" ng-if=\"model\">\n" +
|
|
6090
|
-
"<
|
|
6244
|
+
"<nice-icon ng-show=\"!loading\" icon=\"icon-x\"></nice-icon>\n" +
|
|
6091
6245
|
"</span>\n" +
|
|
6092
6246
|
"</div>\n" +
|
|
6093
6247
|
"</div>\n" +
|
|
@@ -6120,8 +6274,8 @@ angular.module('niceElements').run(['$templateCache', function($templateCache) {
|
|
|
6120
6274
|
"<div class=\"nice-search-button input-group\" ng-class=\"{ 'disabled': isDisabled, 'has-warning': !isDisabled && form.$invalid && form.$dirty, 'has-success': !isDisabled && form.$valid && form.$dirty}\">\n" +
|
|
6121
6275
|
"<input class=\"form-control\" type=\"text\" id=\"{{ id }}\" ng-model=\"model\" placeholder=\"{{ placeholder }}\" ng-disabled=\"isDisabled\" ng-change=\"updateSearch()\" ng-focus=\"onFocus()\" tabindex=\"{{ tabIndex }}\">\n" +
|
|
6122
6276
|
"<span class=\"input-group-addon clickable\" ng-click=\"onFocus()\">\n" +
|
|
6123
|
-
"<
|
|
6124
|
-
"<
|
|
6277
|
+
"<nice-icon ng-show=\"!loading\" icon=\"icon-search\"></nice-icon>\n" +
|
|
6278
|
+
"<nice-icon ng-show=\"loading\" icon=\"icon-loader\" class=\"d-block nice-animation-spin\"></nice-icon>\n" +
|
|
6125
6279
|
"</span>\n" +
|
|
6126
6280
|
"</div>\n" +
|
|
6127
6281
|
"<div class=\"nice-search-dropdown-wrapper\">\n" +
|
|
@@ -7041,28 +7195,28 @@ angular.module('niceElements').run(['$templateCache', function($templateCache) {
|
|
|
7041
7195
|
" 'disabled': isDisabled\n" +
|
|
7042
7196
|
" }\">\n" +
|
|
7043
7197
|
"<input type=\"text\" class=\"form-control\" ng-model=\"modelString\" ng-keyup=\"$event.keyCode == 13 && validateDate()\" ng-blur=\"validateDate()\">\n" +
|
|
7044
|
-
"<span class=\"input-group-addon clickable\" ng-click=\"open = !open\"
|
|
7198
|
+
"<span class=\"input-group-addon clickable\" ng-click=\"open = !open\">\n" +
|
|
7199
|
+
"<nice-icon icon=\"icon-clock\"></nice-icon>\n" +
|
|
7200
|
+
"</span>\n" +
|
|
7045
7201
|
"</div>\n" +
|
|
7046
7202
|
"<div class=\"nice-time-picker-dropdown\" ng-if=\"open\">\n" +
|
|
7047
|
-
"<div
|
|
7048
|
-
"<
|
|
7049
|
-
"<
|
|
7050
|
-
"</
|
|
7051
|
-
"<div class=\"
|
|
7052
|
-
"<button ng-click=\"
|
|
7053
|
-
"
|
|
7054
|
-
"</
|
|
7055
|
-
"<div class=\"row numbers\">\n" +
|
|
7056
|
-
"<div class=\"col-xs-6\">{{ hours }}</div>\n" +
|
|
7057
|
-
"<div class=\"col-xs-6\">{{ minutes }}</div>\n" +
|
|
7058
|
-
"</div>\n" +
|
|
7059
|
-
"<div class=\"row\">\n" +
|
|
7060
|
-
"<div class=\"col-xs-6\">\n" +
|
|
7061
|
-
"<button ng-click=\"changeHour(false)\"><i class=\"fa fa-chevron-down\"></i></button>\n" +
|
|
7062
|
-
"</div>\n" +
|
|
7063
|
-
"<div class=\"col-xs-6\">\n" +
|
|
7064
|
-
"<button ng-click=\"changeMinutes(false)\"><i class=\"fa fa-chevron-down\"></i></button>\n" +
|
|
7203
|
+
"<div>\n" +
|
|
7204
|
+
"<button class=\"btn btn-sm btn-block btn-default\" ng-click=\"changeHour(true)\">\n" +
|
|
7205
|
+
"<nice-icon icon=\"icon-chevron-up\"></nice-icon>\n" +
|
|
7206
|
+
"</button>\n" +
|
|
7207
|
+
"<div class=\"numbers\">{{ hours }}</div>\n" +
|
|
7208
|
+
"<button class=\"btn btn-sm btn-block btn-default\" ng-click=\"changeHour(false)\">\n" +
|
|
7209
|
+
"<nice-icon icon=\"icon-chevron-down\"></nice-icon>\n" +
|
|
7210
|
+
"</button>\n" +
|
|
7065
7211
|
"</div>\n" +
|
|
7212
|
+
"<div>\n" +
|
|
7213
|
+
"<button class=\"btn btn-sm btn-block btn-default\" ng-click=\"changeMinutes(true)\">\n" +
|
|
7214
|
+
"<nice-icon icon=\"icon-chevron-up\"></nice-icon>\n" +
|
|
7215
|
+
"</button>\n" +
|
|
7216
|
+
"<div class=\"numbers\">{{ minutes }}</div>\n" +
|
|
7217
|
+
"<button class=\"btn btn-sm btn-block btn-default\" ng-click=\"changeMinutes(false)\">\n" +
|
|
7218
|
+
"<nice-icon icon=\"icon-chevron-down\"></nice-icon>\n" +
|
|
7219
|
+
"</button>\n" +
|
|
7066
7220
|
"</div>\n" +
|
|
7067
7221
|
"</div>\n" +
|
|
7068
7222
|
"</div>\n" +
|
|
@@ -7087,14 +7241,17 @@ angular.module('niceElements').run(['$templateCache', function($templateCache) {
|
|
|
7087
7241
|
"<nice-help class=\"nice-title-help\" ng-if=\"help\" text=\"{{ help }}\"></nice-help>\n" +
|
|
7088
7242
|
"</div>\n" +
|
|
7089
7243
|
"<div class=\"nice-field col-xs-12\" ng-class=\"[fieldWidth ? fieldWidth : 'col-sm-8', { 'nice-disabled': isDisabled }]\">\n" +
|
|
7090
|
-
"<
|
|
7244
|
+
"<div class=\"nice-upload-area\">\n" +
|
|
7091
7245
|
"<div class=\"input-area\" ng-class=\"{ 'dragging': dragging || draggingGlobal }\">\n" +
|
|
7092
7246
|
"<div class=\"middle-text\" ng-if=\"!imageSource && !loading\">\n" +
|
|
7247
|
+
"<nice-icon icon=\"icon-upload\"></nice-icon>\n" +
|
|
7093
7248
|
"<div class=\"text text-placeholder\" ng-if=\"!dragging\">{{ text }}</div>\n" +
|
|
7094
7249
|
"<div class=\"text text-placeholder\" ng-if=\"dragging\" translate translate-group=\"Nice\">Drop file here</div>\n" +
|
|
7095
7250
|
"<div class=\"error\" ng-if=\"error\">{{ error }}</div>\n" +
|
|
7096
7251
|
"</div>\n" +
|
|
7097
7252
|
"<img ng-if=\"imageSource\" data-ng-src=\"{{ imageSource }}\">\n" +
|
|
7253
|
+
"</div>\n" +
|
|
7254
|
+
"<input class=\"input-file\" type=\"file\" accept=\"{{ accept }}\" ng-model=\"file\" ng-disabled=\"isDisabled || loading\">\n" +
|
|
7098
7255
|
"<nice-loader fulldiv=\"true\" ng-if=\"loading\"></nice-loader>\n" +
|
|
7099
7256
|
"</div>\n" +
|
|
7100
7257
|
"</div>\n" +
|
|
@@ -7112,8 +7269,8 @@ angular.module('niceElements').run(['$templateCache', function($templateCache) {
|
|
|
7112
7269
|
"</div>\n" +
|
|
7113
7270
|
"<div class=\"nice-field col-xs-12\" ng-class=\"fieldWidth ? fieldWidth : 'col-sm-8'\">\n" +
|
|
7114
7271
|
"<div class=\"yesno-wrapper noselect\" ng-class=\"{ 'disabled': isDisabled }\">\n" +
|
|
7115
|
-
"<
|
|
7116
|
-
"<
|
|
7272
|
+
"<button class=\"yesno-yes-bg\" ng-click=\"switch()\" tabindex=\"-1\">{{ yes }}</button>\n" +
|
|
7273
|
+
"<button class=\"yesno-no-bg\" ng-click=\"switch()\" tabindex=\"-1\">{{ no }}</button>\n" +
|
|
7117
7274
|
"<button class=\"yesno-button btn btn-primary\" ng-class=\"buttonClass\" ng-click=\"switch()\">{{ state }}</button>\n" +
|
|
7118
7275
|
"</div>\n" +
|
|
7119
7276
|
"</div>\n" +
|