nice-elements 1.10.3 → 1.10.5
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 -0
- package/README.md +1 -1
- package/bower.json +1 -1
- package/dist/nice.js +198 -143
- package/dist/nice.min.js +1 -1
- package/dist/style.css +17 -2
- package/dist/style.css.map +1 -1
- package/dist/style.min.css +2 -2
- package/eslint.config.mjs +28 -0
- package/package.json +4 -1
- package/src/components/nice-button/nice-button.js +0 -1
- package/src/components/nice-calendar/nice-calendar.html +1 -1
- package/src/components/nice-calendar/nice-calendar.js +3 -1
- package/src/components/nice-checkbox/nice-checkbox.html +1 -1
- package/src/components/nice-checkbox/nice-checkbox.js +1 -0
- package/src/components/nice-choice/nice-choice.html +1 -1
- package/src/components/nice-choice/nice-choice.js +1 -0
- package/src/components/nice-comment/nice-comment.html +2 -2
- package/src/components/nice-comment/nice-comment.js +3 -1
- package/src/components/nice-date/nice-date.html +3 -2
- package/src/components/nice-date/nice-date.js +3 -1
- package/src/components/nice-date-input/nice-date-input.html +1 -1
- package/src/components/nice-date-input/nice-date-input.js +3 -1
- package/src/components/nice-date-range/nice-date-range.html +1 -1
- package/src/components/nice-date-range/nice-date-range.js +9 -7
- package/src/components/nice-datetime-picker/nice-datetime-picker.html +1 -1
- package/src/components/nice-datetime-picker/nice-datetime-picker.js +3 -1
- package/src/components/nice-datetimerange-picker/nice-datetimerange-picker.html +1 -1
- package/src/components/nice-datetimerange-picker/nice-datetimerange-picker.js +3 -1
- package/src/components/nice-datetimerange-picker-2/nice-datetimerange-picker-2.html +1 -1
- package/src/components/nice-datetimerange-picker-2/nice-datetimerange-picker-2.js +3 -1
- package/src/components/nice-dropdown/nice-dropdown.html +3 -2
- package/src/components/nice-dropdown/nice-dropdown.js +13 -6
- package/src/components/nice-dropdown/nice-dropdown.scss +13 -1
- package/src/components/nice-dropdown-date/nice-dropdown-date.html +1 -1
- package/src/components/nice-dropdown-date/nice-dropdown-date.js +10 -8
- package/src/components/nice-dropdown-old/nice-dropdown-old.html +1 -1
- package/src/components/nice-dropdown-old/nice-dropdown-old.js +1 -0
- package/src/components/nice-dtp/nice-dtp.js +3 -1
- package/src/components/nice-input/nice-input.html +1 -1
- package/src/components/nice-input/nice-input.js +1 -0
- package/src/components/nice-label/nice-label.html +1 -1
- package/src/components/nice-label/nice-label.js +3 -1
- package/src/components/nice-number/nice-number.html +1 -1
- package/src/components/nice-number/nice-number.js +1 -0
- package/src/components/nice-percent/nice-percent.html +1 -1
- package/src/components/nice-percent/nice-percent.js +1 -0
- package/src/components/nice-progress-bar/nice-progress-bar.html +1 -1
- package/src/components/nice-progress-bar/nice-progress-bar.js +1 -0
- package/src/components/nice-quantity/nice-quantity.html +1 -1
- package/src/components/nice-quantity/nice-quantity.js +2 -0
- package/src/components/nice-search/nice-search.html +1 -1
- package/src/components/nice-search/nice-search.js +1 -0
- package/src/components/nice-search2/nice-search2.html +1 -1
- package/src/components/nice-search2/nice-search2.js +1 -0
- package/src/components/nice-slot/nice-slot.html +1 -1
- package/src/components/nice-slot/nice-slot.js +3 -1
- package/src/components/nice-time-picker/nice-time-picker.html +1 -1
- package/src/components/nice-time-picker/nice-time-picker.js +3 -1
- package/src/components/nice-toggle/nice-toggle.html +2 -2
- package/src/components/nice-toggle/nice-toggle.js +4 -2
- package/src/components/nice-toggle/nice-toggle.scss +4 -0
- package/src/components/nice-upload/nice-upload.html +2 -2
- package/src/components/nice-upload/nice-upload.js +3 -1
- package/src/components/nice-wrapper/nice-wrapper.html +1 -1
- package/src/components/nice-wrapper/nice-wrapper.js +1 -0
- package/src/components/nice-yesno/nice-yesno.html +1 -1
- package/src/components/nice-yesno/nice-yesno.js +23 -21
- package/src/services/nice-service.js +5 -2
package/dist/nice.js
CHANGED
|
@@ -18,7 +18,7 @@ angular.module('niceElements')
|
|
|
18
18
|
label: '@'
|
|
19
19
|
},
|
|
20
20
|
link: function postLink(scope, element, attrs) {
|
|
21
|
-
if (angular.isDefined(scope.model)){
|
|
21
|
+
if (angular.isDefined(scope.model)) {
|
|
22
22
|
scope.model = false;
|
|
23
23
|
}
|
|
24
24
|
}
|
|
@@ -40,7 +40,6 @@ angular.module('niceElements')
|
|
|
40
40
|
transclude: true,
|
|
41
41
|
replace: true,
|
|
42
42
|
scope: {
|
|
43
|
-
title: '@',
|
|
44
43
|
icon: '@?',
|
|
45
44
|
noMargin: '=',
|
|
46
45
|
niceClick: '&',
|
|
@@ -81,6 +80,7 @@ angular.module('niceElements')
|
|
|
81
80
|
restrict: "E",
|
|
82
81
|
templateUrl: "src/components/nice-calendar/nice-calendar.html",
|
|
83
82
|
scope: {
|
|
83
|
+
niceTitle: '@',
|
|
84
84
|
title: '@',
|
|
85
85
|
fieldWidth: '@',
|
|
86
86
|
labelWidth: '@',
|
|
@@ -95,7 +95,8 @@ angular.module('niceElements')
|
|
|
95
95
|
isDisabled: '=',
|
|
96
96
|
help: '@',
|
|
97
97
|
isInline: '=',
|
|
98
|
-
onChange: '&?'
|
|
98
|
+
onChange: '&?',
|
|
99
|
+
required: '='
|
|
99
100
|
},
|
|
100
101
|
link: function (scope, element) {
|
|
101
102
|
// ------------------ Init default values ------------------
|
|
@@ -417,6 +418,7 @@ angular.module('niceElements')
|
|
|
417
418
|
restrict: 'E',
|
|
418
419
|
scope: {
|
|
419
420
|
model: '=',
|
|
421
|
+
niceTitle: '@',
|
|
420
422
|
title: '@',
|
|
421
423
|
titleOnLeft: '=',
|
|
422
424
|
noMargin: '@',
|
|
@@ -451,6 +453,7 @@ angular.module('niceElements')
|
|
|
451
453
|
templateUrl: 'src/components/nice-choice/nice-choice.html',
|
|
452
454
|
restrict: 'E',
|
|
453
455
|
scope: {
|
|
456
|
+
niceTitle: '@',
|
|
454
457
|
title: '@',
|
|
455
458
|
model: '=',
|
|
456
459
|
list: '=',
|
|
@@ -656,14 +659,14 @@ angular.module('niceElements')
|
|
|
656
659
|
* # clickOutside
|
|
657
660
|
*/
|
|
658
661
|
angular.module('niceElements')
|
|
659
|
-
.directive('clickOutside', function($document, $parse, $timeout){
|
|
662
|
+
.directive('clickOutside', function ($document, $parse, $timeout) {
|
|
660
663
|
return {
|
|
661
664
|
restrict: 'A',
|
|
662
665
|
link: function ($scope, elem, attr) {
|
|
663
666
|
$scope.isOpen = false;
|
|
664
667
|
|
|
665
668
|
// watch for is open
|
|
666
|
-
attr.$observe('isOpen', function(value){
|
|
669
|
+
attr.$observe('isOpen', function (value) {
|
|
667
670
|
$scope.isOpen = value == 'true';
|
|
668
671
|
});
|
|
669
672
|
|
|
@@ -718,7 +721,7 @@ angular.module('niceElements')
|
|
|
718
721
|
// if we have got this far, then we are good to go with processing the command passed in via the click-outside attribute
|
|
719
722
|
$timeout(function () {
|
|
720
723
|
fn = $parse(attr['clickOutside']);
|
|
721
|
-
fn($scope, {event: e});
|
|
724
|
+
fn($scope, { event: e });
|
|
722
725
|
});
|
|
723
726
|
}
|
|
724
727
|
}
|
|
@@ -752,7 +755,7 @@ angular.module('niceElements')
|
|
|
752
755
|
});
|
|
753
756
|
}
|
|
754
757
|
};
|
|
755
|
-
});
|
|
758
|
+
});
|
|
756
759
|
'use strict';
|
|
757
760
|
|
|
758
761
|
/**
|
|
@@ -769,6 +772,7 @@ angular.module('niceElements')
|
|
|
769
772
|
scope: {
|
|
770
773
|
model: '=',
|
|
771
774
|
title: '@?',
|
|
775
|
+
niceTitle: '@?',
|
|
772
776
|
isDisabled: '=',
|
|
773
777
|
placeholder: '@',
|
|
774
778
|
noTextLabel: '@',
|
|
@@ -777,7 +781,8 @@ angular.module('niceElements')
|
|
|
777
781
|
labelWidth: '@',
|
|
778
782
|
help: '@',
|
|
779
783
|
isInline: '=',
|
|
780
|
-
rows: '@'
|
|
784
|
+
rows: '@',
|
|
785
|
+
required: '='
|
|
781
786
|
},
|
|
782
787
|
link: function postLink(scope, element, attrs) {
|
|
783
788
|
if (scope.model == null) { scope.model = ''; }
|
|
@@ -843,6 +848,7 @@ angular.module('niceElements')
|
|
|
843
848
|
time: '=?', // default: false, is time picker enabled?
|
|
844
849
|
minDate: '@', // default: undefined
|
|
845
850
|
maxDate: '@', // default: undefined
|
|
851
|
+
niceTitle: '@',
|
|
846
852
|
title: '@', // default: ''
|
|
847
853
|
noMargin: '@', // default: false, if noMargin==true then entire directive can be injected inside other divs
|
|
848
854
|
fieldWidth: '@', // default: 'col-sm-8', bootstrap classes that defines width of field
|
|
@@ -850,7 +856,8 @@ angular.module('niceElements')
|
|
|
850
856
|
isDisabled: '=',
|
|
851
857
|
help: '@',
|
|
852
858
|
isInline: '=',
|
|
853
|
-
onChange: '&?'
|
|
859
|
+
onChange: '&?',
|
|
860
|
+
required: '='
|
|
854
861
|
},
|
|
855
862
|
controller: function ($scope, $timeout) {
|
|
856
863
|
$scope.formatDate = "DD.MM.YYYY";
|
|
@@ -943,13 +950,14 @@ angular.module('niceElements')
|
|
|
943
950
|
*/
|
|
944
951
|
angular.module('niceElements')
|
|
945
952
|
|
|
946
|
-
.directive('niceDateRange', function() {
|
|
953
|
+
.directive('niceDateRange', function () {
|
|
947
954
|
return {
|
|
948
955
|
restrict: 'E',
|
|
949
956
|
transclude: true,
|
|
950
957
|
templateUrl: 'src/components/nice-date-range/nice-date-range.html',
|
|
951
958
|
scope: {
|
|
952
959
|
model: '=',
|
|
960
|
+
niceTitle: '@',
|
|
953
961
|
title: '@',
|
|
954
962
|
fieldWidth: '@',
|
|
955
963
|
format: '@',
|
|
@@ -960,19 +968,20 @@ angular.module('niceElements')
|
|
|
960
968
|
startOfTheYear: '@',
|
|
961
969
|
help: '@',
|
|
962
970
|
isInline: '=',
|
|
963
|
-
onChange: '&?'
|
|
971
|
+
onChange: '&?',
|
|
972
|
+
required: '='
|
|
964
973
|
},
|
|
965
974
|
|
|
966
|
-
link: function(scope, attrs){
|
|
975
|
+
link: function (scope, attrs) {
|
|
967
976
|
if (!attrs.title) { attrs.title = ''; }
|
|
968
977
|
if (!attrs.fieldWidth) { attrs.fieldWidth = 'col-sm-8'; }
|
|
969
978
|
if (!attrs.labelWidth) { attrs.labelWidth = 'col-sm-4'; }
|
|
970
979
|
if (!attrs.format) { attrs.format = 'dd.MM.yyyy'; }
|
|
971
980
|
attrs.noMargin = angular.isDefined(attrs.noMargin);
|
|
972
981
|
|
|
973
|
-
if(!angular.isDefined(scope.model)) {
|
|
982
|
+
if (!angular.isDefined(scope.model)) {
|
|
974
983
|
var model = null;
|
|
975
|
-
if(!angular.isDefined(scope.startOfTheYear)){
|
|
984
|
+
if (!angular.isDefined(scope.startOfTheYear)) {
|
|
976
985
|
model = {
|
|
977
986
|
startDate: moment().format(),
|
|
978
987
|
endDate: moment().format()
|
|
@@ -988,7 +997,7 @@ angular.module('niceElements')
|
|
|
988
997
|
}
|
|
989
998
|
},
|
|
990
999
|
|
|
991
|
-
controller: function($scope) {
|
|
1000
|
+
controller: function ($scope) {
|
|
992
1001
|
$scope.opts = {
|
|
993
1002
|
locale: {
|
|
994
1003
|
applyClass: 'btn-green',
|
|
@@ -1004,7 +1013,7 @@ angular.module('niceElements')
|
|
|
1004
1013
|
$scope.opts.ranges[gettextCatalog.getString("Last 30 days", null, "Nice")] = [moment().subtract(30, 'days'), moment()];
|
|
1005
1014
|
$scope.opts.ranges[gettextCatalog.getString("This month", null, "Nice")] = [moment().startOf('month'), moment().endOf('month')];
|
|
1006
1015
|
|
|
1007
|
-
if(angular.isDefined($scope.format)) $scope.opts.format = format;
|
|
1016
|
+
if (angular.isDefined($scope.format)) $scope.opts.format = format;
|
|
1008
1017
|
}
|
|
1009
1018
|
|
|
1010
1019
|
};
|
|
@@ -1026,6 +1035,7 @@ angular.module('niceElements')
|
|
|
1026
1035
|
transclude: true,
|
|
1027
1036
|
templateUrl: 'src/components/nice-date/nice-date.html',
|
|
1028
1037
|
scope: {
|
|
1038
|
+
niceTitle: '@',
|
|
1029
1039
|
title: '@', // default: ''
|
|
1030
1040
|
noMargin: '@', // default: false, if noMargin==true then entire directive can be injected inside other divs
|
|
1031
1041
|
fieldWidth: '@', // default: 'col-sm-8', bootstrap classes that defines width of field
|
|
@@ -1040,7 +1050,8 @@ angular.module('niceElements')
|
|
|
1040
1050
|
nextDate: '=',
|
|
1041
1051
|
isDisabled: '=',
|
|
1042
1052
|
isInline: '=',
|
|
1043
|
-
onChange: '&?'
|
|
1053
|
+
onChange: '&?',
|
|
1054
|
+
required: '='
|
|
1044
1055
|
},
|
|
1045
1056
|
controller: function ($scope, $element, $timeout, gettextCatalog) {
|
|
1046
1057
|
$scope.isOpen = false;
|
|
@@ -1365,6 +1376,7 @@ angular.module('niceElements').directive('niceDatetimePicker', function () {
|
|
|
1365
1376
|
okText: '@',
|
|
1366
1377
|
cancelText: '@',
|
|
1367
1378
|
shortTime: '@', // default: false,
|
|
1379
|
+
niceTitle: '@',
|
|
1368
1380
|
title: '@', // default: ''
|
|
1369
1381
|
noMargin: '@', // default: false, if noMargin==true then entire directive can be injected inside other divs
|
|
1370
1382
|
fieldWidth: '@', // default: 'col-sm-8', bootstrap classes that defines width of field
|
|
@@ -1372,7 +1384,8 @@ angular.module('niceElements').directive('niceDatetimePicker', function () {
|
|
|
1372
1384
|
isDisabled: '=',
|
|
1373
1385
|
help: '@',
|
|
1374
1386
|
isInline: '=',
|
|
1375
|
-
onChange: '&?'
|
|
1387
|
+
onChange: '&?',
|
|
1388
|
+
required: '='
|
|
1376
1389
|
},
|
|
1377
1390
|
controller: function ($scope, gettextCatalog) {
|
|
1378
1391
|
console.warn("[NICE ELEMENTS] nice-datetime-picker component is deprecated!");
|
|
@@ -1445,6 +1458,7 @@ angular.module('niceElements')
|
|
|
1445
1458
|
time: '=?', // default: false, is time picker enabled?
|
|
1446
1459
|
minDate: '@', // default: undefined
|
|
1447
1460
|
maxDate: '@', // default: undefined
|
|
1461
|
+
niceTitle: '@',
|
|
1448
1462
|
title: '@', // default: ''
|
|
1449
1463
|
noMargin: '@', // default: false, if noMargin==true then entire directive can be injected inside other divs
|
|
1450
1464
|
fieldWidth: '@', // default: 'col-sm-8', bootstrap classes that defines width of field
|
|
@@ -1452,7 +1466,8 @@ angular.module('niceElements')
|
|
|
1452
1466
|
isDisabled: '=',
|
|
1453
1467
|
help: '@',
|
|
1454
1468
|
isInline: '=',
|
|
1455
|
-
onChange: '&?'
|
|
1469
|
+
onChange: '&?',
|
|
1470
|
+
required: '='
|
|
1456
1471
|
},
|
|
1457
1472
|
templateUrl: 'src/components/nice-datetimerange-picker-2/nice-datetimerange-picker-2.html',
|
|
1458
1473
|
controller: function ($element, $timeout, $scope) {
|
|
@@ -1626,6 +1641,7 @@ angular.module('niceElements')
|
|
|
1626
1641
|
okText: '@',
|
|
1627
1642
|
cancelText: '@',
|
|
1628
1643
|
shortTime: '@', // default: false,
|
|
1644
|
+
niceTitle: '@',
|
|
1629
1645
|
title: '@', // default: ''
|
|
1630
1646
|
noMargin: '@', // default: false, if noMargin==true then entire directive can be injected inside other divs
|
|
1631
1647
|
fieldWidth: '@', // default: 'col-sm-8', bootstrap classes that defines width of field
|
|
@@ -1634,7 +1650,8 @@ angular.module('niceElements')
|
|
|
1634
1650
|
isDisabled: '=',
|
|
1635
1651
|
help: '@',
|
|
1636
1652
|
isInline: '=',
|
|
1637
|
-
onChange: '&?'
|
|
1653
|
+
onChange: '&?',
|
|
1654
|
+
required: '='
|
|
1638
1655
|
},
|
|
1639
1656
|
templateUrl: 'src/components/nice-datetimerange-picker/nice-datetimerange-picker.html',
|
|
1640
1657
|
link: {
|
|
@@ -1862,6 +1879,7 @@ angular.module('niceElements')
|
|
|
1862
1879
|
templateUrl: "src/components/nice-dropdown-date/nice-dropdown-date.html",
|
|
1863
1880
|
scope: {
|
|
1864
1881
|
model: '=',
|
|
1882
|
+
niceTitle: '@',
|
|
1865
1883
|
title: '@',
|
|
1866
1884
|
fieldWidth: '@',
|
|
1867
1885
|
labelWidth: '@',
|
|
@@ -1872,7 +1890,8 @@ angular.module('niceElements')
|
|
|
1872
1890
|
mature: '@',
|
|
1873
1891
|
help: '@',
|
|
1874
1892
|
isInline: '=',
|
|
1875
|
-
onChange: '&?'
|
|
1893
|
+
onChange: '&?',
|
|
1894
|
+
required: '='
|
|
1876
1895
|
},
|
|
1877
1896
|
link: function ($scope) {
|
|
1878
1897
|
$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];
|
|
@@ -1893,10 +1912,10 @@ angular.module('niceElements')
|
|
|
1893
1912
|
|
|
1894
1913
|
|
|
1895
1914
|
// Set the years drop down from attributes or defaults
|
|
1896
|
-
|
|
1897
|
-
|
|
1898
|
-
|
|
1899
|
-
|
|
1915
|
+
const currentYear = parseInt($scope.startingYear, 10) || new Date().getFullYear();
|
|
1916
|
+
const numYears = parseInt($scope.numYears, 10) || 100;
|
|
1917
|
+
const oldestYear = currentYear - numYears;
|
|
1918
|
+
let newestYear = currentYear;
|
|
1900
1919
|
|
|
1901
1920
|
|
|
1902
1921
|
// If mature
|
|
@@ -1930,7 +1949,7 @@ angular.module('niceElements')
|
|
|
1930
1949
|
|
|
1931
1950
|
// validate that the date selected is accurate
|
|
1932
1951
|
$scope.checkDate = function () {
|
|
1933
|
-
|
|
1952
|
+
const date = moment($scope.dateFields.day + "." + ($scope.dateFields.month + 1) + "." + $scope.dateFields.year, "D.M.YYYY");
|
|
1934
1953
|
|
|
1935
1954
|
if (date.isValid()) {
|
|
1936
1955
|
// Format
|
|
@@ -1957,14 +1976,14 @@ angular.module('niceElements')
|
|
|
1957
1976
|
|
|
1958
1977
|
// Set current date
|
|
1959
1978
|
if (!$scope.model) {
|
|
1960
|
-
|
|
1979
|
+
const date = moment();
|
|
1961
1980
|
$scope.dateFields.day = date.get('date');
|
|
1962
1981
|
$scope.dateFields.month = date.get('month');
|
|
1963
1982
|
$scope.dateFields.year = date.get('year');
|
|
1964
1983
|
if ($scope.mature) $scope.dateFields.year -= 18;
|
|
1965
1984
|
$scope.checkDate();
|
|
1966
1985
|
} else {
|
|
1967
|
-
|
|
1986
|
+
const date = moment($scope.model);
|
|
1968
1987
|
$scope.dateFields.day = date.get('date');
|
|
1969
1988
|
$scope.dateFields.month = date.get('month');
|
|
1970
1989
|
$scope.dateFields.year = date.get('year');
|
|
@@ -1988,6 +2007,7 @@ angular.module('niceElements')
|
|
|
1988
2007
|
restrict: 'E',
|
|
1989
2008
|
transclude: true,
|
|
1990
2009
|
scope: {
|
|
2010
|
+
niceTitle: '@',
|
|
1991
2011
|
title: '@', // Title of the field
|
|
1992
2012
|
model: '=', // Aka model
|
|
1993
2013
|
list: '=', // List of options
|
|
@@ -2322,6 +2342,7 @@ angular.module('niceElements')
|
|
|
2322
2342
|
'option': '?niceDropdownOption'
|
|
2323
2343
|
},
|
|
2324
2344
|
scope: {
|
|
2345
|
+
niceTitle: '@',
|
|
2325
2346
|
title: '@', // Title of the field
|
|
2326
2347
|
model: '=', // Aka model
|
|
2327
2348
|
list: '=', // List of options
|
|
@@ -2502,15 +2523,21 @@ angular.module('niceElements')
|
|
|
2502
2523
|
|
|
2503
2524
|
// ----------------------------------- Focus input -----------------------------------
|
|
2504
2525
|
$scope.focusInput = function () {
|
|
2505
|
-
|
|
2506
|
-
|
|
2507
|
-
|
|
2508
|
-
|
|
2509
|
-
});
|
|
2510
|
-
}
|
|
2526
|
+
$timeout(function () {
|
|
2527
|
+
const input = $element[0].getElementsByClassName("search-bar-input")[0];
|
|
2528
|
+
if (input) input.focus();
|
|
2529
|
+
});
|
|
2511
2530
|
};
|
|
2512
2531
|
|
|
2513
2532
|
|
|
2533
|
+
// $scope.onInputFocus = function () {
|
|
2534
|
+
// $timeout(function () {
|
|
2535
|
+
// const input = $element[0].getElementsByClassName("btn-dropdown")[0];
|
|
2536
|
+
// if (input) input.focus();
|
|
2537
|
+
// });
|
|
2538
|
+
// }
|
|
2539
|
+
|
|
2540
|
+
|
|
2514
2541
|
// ------------------- On blur -------------------
|
|
2515
2542
|
$scope.onBlur = function () {
|
|
2516
2543
|
$scope.close();
|
|
@@ -2824,11 +2851,13 @@ angular.module('niceElements')
|
|
|
2824
2851
|
okText: '@',
|
|
2825
2852
|
cancelText: '@',
|
|
2826
2853
|
shortTime: '@', // default: false,
|
|
2854
|
+
niceTitle: '@',
|
|
2827
2855
|
title: '@', // default: ''
|
|
2828
2856
|
noMargin: '@', // default: false, if noMargin==true then entire directive can be injected inside other divs
|
|
2829
2857
|
fieldWidth: '@', // default: 'col-sm-8', bootstrap classes that defines width of field
|
|
2830
2858
|
labelWidth: '@', // default: 'col-sm-4', bootstrap classes that defines width of label
|
|
2831
|
-
closed: '='
|
|
2859
|
+
closed: '=',
|
|
2860
|
+
required: '='
|
|
2832
2861
|
},
|
|
2833
2862
|
templateUrl: 'src/components/nice-dtp/nice-dtp.html',
|
|
2834
2863
|
controller: function ($scope, $element, $attrs, gettextCatalog) {
|
|
@@ -3716,6 +3745,7 @@ angular.module('niceElements')
|
|
|
3716
3745
|
isDisabled: '=',
|
|
3717
3746
|
type: '@',
|
|
3718
3747
|
title: '@?',
|
|
3748
|
+
niceTitle: '@?',
|
|
3719
3749
|
regex: '@?',
|
|
3720
3750
|
regexRaw: '@?',
|
|
3721
3751
|
regexError: '@?',
|
|
@@ -3832,7 +3862,7 @@ angular.module('niceElements')
|
|
|
3832
3862
|
}
|
|
3833
3863
|
|
|
3834
3864
|
$scope.$watch('model', function (value_new, value_old) {
|
|
3835
|
-
if ($scope.type == "number" && value_old && value_old[value_old.length-1] == ".") {
|
|
3865
|
+
if ($scope.type == "number" && value_old && value_old[value_old.length - 1] == ".") {
|
|
3836
3866
|
|
|
3837
3867
|
} else {
|
|
3838
3868
|
$scope.internalModel = angular.copy($scope.model);
|
|
@@ -3860,9 +3890,9 @@ angular.module('niceElements')
|
|
|
3860
3890
|
}
|
|
3861
3891
|
});
|
|
3862
3892
|
|
|
3863
|
-
$scope.handleChange = function() {
|
|
3893
|
+
$scope.handleChange = function () {
|
|
3864
3894
|
if ($scope.onChange) {
|
|
3865
|
-
$timeout(function() {
|
|
3895
|
+
$timeout(function () {
|
|
3866
3896
|
$scope.onChange({ model: $scope.model });
|
|
3867
3897
|
})
|
|
3868
3898
|
}
|
|
@@ -3966,10 +3996,12 @@ angular.module('niceElements')
|
|
|
3966
3996
|
fieldWidth: '@',
|
|
3967
3997
|
labelWidth: '@',
|
|
3968
3998
|
value: '@',
|
|
3999
|
+
niceTitle: '@',
|
|
3969
4000
|
title: '@',
|
|
3970
4001
|
noMargin: '@',
|
|
3971
4002
|
isInline: '=',
|
|
3972
|
-
help: '@'
|
|
4003
|
+
help: '@',
|
|
4004
|
+
required: '='
|
|
3973
4005
|
},
|
|
3974
4006
|
link: function postLink(scope, element, attrs) {
|
|
3975
4007
|
if (!attrs.fieldWidth) { attrs.fieldWidth = 'col-sm-8'; }
|
|
@@ -4056,42 +4088,42 @@ angular.module('niceElements')
|
|
|
4056
4088
|
|
|
4057
4089
|
var messageElements = [];
|
|
4058
4090
|
|
|
4059
|
-
var notify = function(args, t){
|
|
4091
|
+
var notify = function (args, t) {
|
|
4060
4092
|
|
|
4061
|
-
if (typeof args !== 'object'){
|
|
4062
|
-
args = {message:args};
|
|
4093
|
+
if (typeof args !== 'object') {
|
|
4094
|
+
args = { message: args };
|
|
4063
4095
|
}
|
|
4064
4096
|
|
|
4065
4097
|
args.template = args.template ? args.template : 'src/components/nice-notification/nice-notification.html';
|
|
4066
4098
|
args.delay = !angular.isUndefined(args.delay) ? args.delay : delay;
|
|
4067
4099
|
args.type = t ? t : '';
|
|
4068
4100
|
|
|
4069
|
-
$http.get(args.template,{cache: $templateCache}).success(function(template) {
|
|
4101
|
+
$http.get(args.template, { cache: $templateCache }).success(function (template) {
|
|
4070
4102
|
|
|
4071
4103
|
var scope = $rootScope.$new();
|
|
4072
4104
|
scope.message = $sce.trustAsHtml(args.message);
|
|
4073
4105
|
scope.title = $sce.trustAsHtml(args.title);
|
|
4074
|
-
scope.t = args.type.substr(0,1);
|
|
4106
|
+
scope.t = args.type.substr(0, 1);
|
|
4075
4107
|
scope.delay = args.delay;
|
|
4076
4108
|
|
|
4077
|
-
if (typeof args.scope === 'object'){
|
|
4078
|
-
for (var key in args.scope){
|
|
4109
|
+
if (typeof args.scope === 'object') {
|
|
4110
|
+
for (var key in args.scope) {
|
|
4079
4111
|
scope[key] = args.scope[key];
|
|
4080
4112
|
}
|
|
4081
4113
|
}
|
|
4082
4114
|
|
|
4083
|
-
var reposite = function() {
|
|
4115
|
+
var reposite = function () {
|
|
4084
4116
|
var j = 0;
|
|
4085
4117
|
var k = 0;
|
|
4086
4118
|
var lastTop = startTop;
|
|
4087
4119
|
var lastRight = startRight;
|
|
4088
|
-
for(var i = messageElements.length - 1; i >= 0; i
|
|
4120
|
+
for (var i = messageElements.length - 1; i >= 0; i--) {
|
|
4089
4121
|
var element = messageElements[i];
|
|
4090
4122
|
var elHeight = parseInt(element[0].offsetHeight);
|
|
4091
4123
|
var elWidth = parseInt(element[0].offsetWidth);
|
|
4092
4124
|
if ((top + elHeight) > window.innerHeight) {
|
|
4093
4125
|
lastTop = startTop;
|
|
4094
|
-
k
|
|
4126
|
+
k++;
|
|
4095
4127
|
j = 0;
|
|
4096
4128
|
}
|
|
4097
4129
|
var top = lastTop + (j === 0 ? 0 : verticalSpacing);
|
|
@@ -4101,22 +4133,22 @@ angular.module('niceElements')
|
|
|
4101
4133
|
element.css('right', right + 'px');
|
|
4102
4134
|
|
|
4103
4135
|
lastTop = top + elHeight;
|
|
4104
|
-
j
|
|
4136
|
+
j++;
|
|
4105
4137
|
}
|
|
4106
4138
|
};
|
|
4107
4139
|
|
|
4108
4140
|
var templateElement = $compile(template)(scope);
|
|
4109
4141
|
templateElement.addClass(args.type);
|
|
4110
|
-
templateElement.bind('transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd click', function(e){
|
|
4142
|
+
templateElement.bind('transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd click', function (e) {
|
|
4111
4143
|
e = e.originalEvent || e;
|
|
4112
|
-
if (e.type === 'click' || (e.propertyName === 'opacity' && e.elapsedTime >= 0.4)){
|
|
4144
|
+
if (e.type === 'click' || (e.propertyName === 'opacity' && e.elapsedTime >= 0.4)) {
|
|
4113
4145
|
templateElement.remove();
|
|
4114
4146
|
messageElements.splice(messageElements.indexOf(templateElement), 1);
|
|
4115
4147
|
reposite();
|
|
4116
4148
|
}
|
|
4117
4149
|
});
|
|
4118
4150
|
|
|
4119
|
-
$timeout(function() {
|
|
4151
|
+
$timeout(function () {
|
|
4120
4152
|
templateElement.addClass('killed');
|
|
4121
4153
|
templateElement.remove();
|
|
4122
4154
|
messageElements.splice(messageElements.indexOf(templateElement), 1);
|
|
@@ -4128,34 +4160,34 @@ angular.module('niceElements')
|
|
|
4128
4160
|
|
|
4129
4161
|
$timeout(reposite);
|
|
4130
4162
|
|
|
4131
|
-
}).error(function(data){
|
|
4132
|
-
throw new Error('Template ('+args.template+') could not be loaded. ' + data);
|
|
4163
|
+
}).error(function (data) {
|
|
4164
|
+
throw new Error('Template (' + args.template + ') could not be loaded. ' + data);
|
|
4133
4165
|
});
|
|
4134
4166
|
|
|
4135
4167
|
};
|
|
4136
4168
|
|
|
4137
|
-
notify.config = function(args){
|
|
4138
|
-
|
|
4139
|
-
|
|
4169
|
+
notify.config = function (args) {
|
|
4170
|
+
startTop = args.top ? args.top : startTop;
|
|
4171
|
+
verticalSpacing = args.verticalSpacing ? args.verticalSpacing : verticalSpacing;
|
|
4140
4172
|
};
|
|
4141
4173
|
|
|
4142
|
-
notify.primary = function() {
|
|
4174
|
+
notify.primary = function () {
|
|
4143
4175
|
this(args, '');
|
|
4144
4176
|
};
|
|
4145
4177
|
|
|
4146
|
-
notify.error = function(args) {
|
|
4178
|
+
notify.error = function (args) {
|
|
4147
4179
|
this(args, 'error');
|
|
4148
4180
|
};
|
|
4149
4181
|
|
|
4150
|
-
notify.success = function(args) {
|
|
4182
|
+
notify.success = function (args) {
|
|
4151
4183
|
this(args, 'success');
|
|
4152
4184
|
};
|
|
4153
4185
|
|
|
4154
|
-
notify.info = function(args) {
|
|
4186
|
+
notify.info = function (args) {
|
|
4155
4187
|
this(args, 'info');
|
|
4156
4188
|
};
|
|
4157
4189
|
|
|
4158
|
-
notify.warning = function(args) {
|
|
4190
|
+
notify.warning = function (args) {
|
|
4159
4191
|
this(args, 'warning');
|
|
4160
4192
|
};
|
|
4161
4193
|
|
|
@@ -4180,6 +4212,7 @@ angular.module('niceElements')
|
|
|
4180
4212
|
valid: '=',
|
|
4181
4213
|
isDisabled: '=',
|
|
4182
4214
|
title: '@?',
|
|
4215
|
+
niceTitle: '@?',
|
|
4183
4216
|
min: '@',
|
|
4184
4217
|
max: '@',
|
|
4185
4218
|
defaultValue: '@',
|
|
@@ -4296,7 +4329,7 @@ angular.module('niceElements')
|
|
|
4296
4329
|
$scope.$watch("model", function (oldModel, newModel) {
|
|
4297
4330
|
$scope.check();
|
|
4298
4331
|
if ($scope.onChange && oldModel != newModel) {
|
|
4299
|
-
$timeout(function() {
|
|
4332
|
+
$timeout(function () {
|
|
4300
4333
|
$scope.onChange({ model: $scope.model });
|
|
4301
4334
|
})
|
|
4302
4335
|
}
|
|
@@ -4351,6 +4384,7 @@ angular.module('niceElements')
|
|
|
4351
4384
|
valid: '=',
|
|
4352
4385
|
isDisabled: '=',
|
|
4353
4386
|
title: '@?',
|
|
4387
|
+
niceTitle: '@?',
|
|
4354
4388
|
required: '=',
|
|
4355
4389
|
fieldWidth: '@',
|
|
4356
4390
|
labelWidth: '@',
|
|
@@ -4589,12 +4623,13 @@ angular.module('niceElements')
|
|
|
4589
4623
|
* # niceProgressBar
|
|
4590
4624
|
*/
|
|
4591
4625
|
angular.module('niceElements')
|
|
4592
|
-
.directive('niceProgressBar', function() {
|
|
4626
|
+
.directive('niceProgressBar', function () {
|
|
4593
4627
|
return {
|
|
4594
4628
|
restrict: 'E',
|
|
4595
4629
|
replace: true,
|
|
4596
4630
|
templateUrl: 'src/components/nice-progress-bar/nice-progress-bar.html',
|
|
4597
4631
|
scope: {
|
|
4632
|
+
niceTitle: '@',
|
|
4598
4633
|
title: '@',
|
|
4599
4634
|
noMargin: '@',
|
|
4600
4635
|
value: '=',
|
|
@@ -4604,29 +4639,29 @@ angular.module('niceElements')
|
|
|
4604
4639
|
help: '@'
|
|
4605
4640
|
},
|
|
4606
4641
|
|
|
4607
|
-
controller: function($scope, $element, $timeout) {
|
|
4642
|
+
controller: function ($scope, $element, $timeout) {
|
|
4608
4643
|
$scope.width = 0;
|
|
4609
|
-
$scope.resize = function(){
|
|
4610
|
-
$timeout(function() {
|
|
4644
|
+
$scope.resize = function () {
|
|
4645
|
+
$timeout(function () {
|
|
4611
4646
|
$scope.width = $element[0].getElementsByClassName("progress")[0].offsetWidth;
|
|
4612
|
-
},100);
|
|
4647
|
+
}, 100);
|
|
4613
4648
|
};
|
|
4614
|
-
window.onresize = function() {
|
|
4649
|
+
window.onresize = function () {
|
|
4615
4650
|
$scope.resize();
|
|
4616
4651
|
};
|
|
4617
4652
|
$scope.resize();
|
|
4618
4653
|
|
|
4619
|
-
|
|
4620
4654
|
|
|
4621
|
-
|
|
4655
|
+
|
|
4656
|
+
$scope.$watch("value", function (valueNew, valueOld) {
|
|
4622
4657
|
$scope.calculate();
|
|
4623
4658
|
});
|
|
4624
4659
|
|
|
4625
|
-
$scope.$watch("max", function(valueNew, valueOld){
|
|
4660
|
+
$scope.$watch("max", function (valueNew, valueOld) {
|
|
4626
4661
|
$scope.calculate();
|
|
4627
4662
|
});
|
|
4628
4663
|
|
|
4629
|
-
$scope.calculate = function(){
|
|
4664
|
+
$scope.calculate = function () {
|
|
4630
4665
|
$scope.percentage = ($scope.value / $scope.max) * 100;
|
|
4631
4666
|
};
|
|
4632
4667
|
|
|
@@ -4649,6 +4684,7 @@ angular.module('niceElements')
|
|
|
4649
4684
|
templateUrl: 'src/components/nice-quantity/nice-quantity.html',
|
|
4650
4685
|
restrict: 'E',
|
|
4651
4686
|
scope: {
|
|
4687
|
+
niceTitle: '@',
|
|
4652
4688
|
title: '@',
|
|
4653
4689
|
model: '=',
|
|
4654
4690
|
min: '=?',
|
|
@@ -4660,6 +4696,7 @@ angular.module('niceElements')
|
|
|
4660
4696
|
isDisabled: '=',
|
|
4661
4697
|
isInline: '=',
|
|
4662
4698
|
help: '@',
|
|
4699
|
+
required: '='
|
|
4663
4700
|
},
|
|
4664
4701
|
controller: function ($scope) {
|
|
4665
4702
|
$scope.min = Number($scope.min) || 0;
|
|
@@ -4709,6 +4746,7 @@ angular.module('niceElements')
|
|
|
4709
4746
|
model: '=',
|
|
4710
4747
|
isDisabled: '=',
|
|
4711
4748
|
title: '@?',
|
|
4749
|
+
niceTitle: '@?',
|
|
4712
4750
|
placeholder: '@',
|
|
4713
4751
|
required: '=',
|
|
4714
4752
|
fieldWidth: '@',
|
|
@@ -4950,6 +4988,7 @@ angular.module('niceElements')
|
|
|
4950
4988
|
isDisabled: '=',
|
|
4951
4989
|
showDropdown: '=',
|
|
4952
4990
|
title: '@?',
|
|
4991
|
+
niceTitle: '@?',
|
|
4953
4992
|
placeholder: '@',
|
|
4954
4993
|
fieldWidth: '@',
|
|
4955
4994
|
labelWidth: '@',
|
|
@@ -5213,10 +5252,12 @@ angular.module('niceElements')
|
|
|
5213
5252
|
scope: {
|
|
5214
5253
|
fieldWidth: '@',
|
|
5215
5254
|
labelWidth: '@',
|
|
5255
|
+
niceTitle: '@',
|
|
5216
5256
|
title: '@',
|
|
5217
5257
|
noMargin: '@',
|
|
5218
5258
|
isInline: '=',
|
|
5219
|
-
help: '@'
|
|
5259
|
+
help: '@',
|
|
5260
|
+
required: '='
|
|
5220
5261
|
},
|
|
5221
5262
|
link: function postLink(scope, element, attrs) {
|
|
5222
5263
|
if (!attrs.fieldWidth) { attrs.fieldWidth = 'col-sm-8'; }
|
|
@@ -5273,7 +5314,7 @@ angular.module('niceElements')
|
|
|
5273
5314
|
controller: function ($scope, $transclude) {
|
|
5274
5315
|
$scope.hasActions = $transclude().length > 0;
|
|
5275
5316
|
|
|
5276
|
-
$scope.setOrder = function(key) {
|
|
5317
|
+
$scope.setOrder = function (key) {
|
|
5277
5318
|
if (!$scope.canOrder) return;
|
|
5278
5319
|
if ($scope.order == "!" + key) {
|
|
5279
5320
|
$scope.order = null;
|
|
@@ -5285,18 +5326,18 @@ angular.module('niceElements')
|
|
|
5285
5326
|
if ($scope.orderChanged) $scope.orderChanged($scope.order);
|
|
5286
5327
|
}
|
|
5287
5328
|
|
|
5288
|
-
$scope.rowStyle = function(column, row) {
|
|
5329
|
+
$scope.rowStyle = function (column, row) {
|
|
5289
5330
|
if (!column.valueStyle) return;
|
|
5290
5331
|
return column.valueStyle(row[column.key], row);
|
|
5291
|
-
}
|
|
5292
|
-
|
|
5293
|
-
$scope.rowClass = function(column, row) {
|
|
5332
|
+
}
|
|
5333
|
+
|
|
5334
|
+
$scope.rowClass = function (column, row) {
|
|
5294
5335
|
if (!column.valueClass) return;
|
|
5295
5336
|
return column.valueClass(row[column.key], row);
|
|
5296
5337
|
}
|
|
5297
|
-
|
|
5298
|
-
$scope.handleFreeze = function(column, isFirst, isLast, index) {
|
|
5299
|
-
return {
|
|
5338
|
+
|
|
5339
|
+
$scope.handleFreeze = function (column, isFirst, isLast, index) {
|
|
5340
|
+
return {
|
|
5300
5341
|
'nice-table-freeze-left': ($scope.freezeFirst && isFirst) || column.freeze,
|
|
5301
5342
|
'nice-table-freeze-right': $scope.freezeLast && isLast && !$scope.hasActions
|
|
5302
5343
|
}
|
|
@@ -5317,6 +5358,7 @@ angular.module('niceElements')
|
|
|
5317
5358
|
return {
|
|
5318
5359
|
scope: {
|
|
5319
5360
|
model: '=',
|
|
5361
|
+
niceTitle: '@',
|
|
5320
5362
|
title: '@',
|
|
5321
5363
|
isDisabled: '=',
|
|
5322
5364
|
noMargin: '@',
|
|
@@ -5324,7 +5366,8 @@ angular.module('niceElements')
|
|
|
5324
5366
|
labelWidth: '@',
|
|
5325
5367
|
onChange: '&?',
|
|
5326
5368
|
isInline: '=',
|
|
5327
|
-
help: '@'
|
|
5369
|
+
help: '@',
|
|
5370
|
+
required: '='
|
|
5328
5371
|
},
|
|
5329
5372
|
restrict: 'E',
|
|
5330
5373
|
templateUrl: 'src/components/nice-time-picker/nice-time-picker.html',
|
|
@@ -5482,6 +5525,7 @@ angular.module('niceElements')
|
|
|
5482
5525
|
restrict: 'E',
|
|
5483
5526
|
scope: {
|
|
5484
5527
|
model: '=',
|
|
5528
|
+
niceTitle: '@',
|
|
5485
5529
|
title: '@',
|
|
5486
5530
|
isDisabled: '=',
|
|
5487
5531
|
fieldWidth: '@',
|
|
@@ -5491,7 +5535,8 @@ angular.module('niceElements')
|
|
|
5491
5535
|
isInline: '=',
|
|
5492
5536
|
isBlock: '=',
|
|
5493
5537
|
titleRight: '=',
|
|
5494
|
-
help: '@'
|
|
5538
|
+
help: '@',
|
|
5539
|
+
required: '='
|
|
5495
5540
|
},
|
|
5496
5541
|
controller: function ($scope, $timeout) {
|
|
5497
5542
|
if (!$scope.title) { $scope.title = ''; }
|
|
@@ -5511,7 +5556,7 @@ angular.module('niceElements')
|
|
|
5511
5556
|
}
|
|
5512
5557
|
}
|
|
5513
5558
|
|
|
5514
|
-
$timeout(function() {
|
|
5559
|
+
$timeout(function () {
|
|
5515
5560
|
if ($scope.onChange) $scope.onChange({ model: $scope.model });
|
|
5516
5561
|
$scope.formToggle.$setDirty();
|
|
5517
5562
|
});
|
|
@@ -5561,6 +5606,7 @@ angular.module('niceElements')
|
|
|
5561
5606
|
templateUrl: 'src/components/nice-upload/nice-upload.html',
|
|
5562
5607
|
scope: {
|
|
5563
5608
|
model: '=',
|
|
5609
|
+
niceTitle: '@',
|
|
5564
5610
|
title: '@',
|
|
5565
5611
|
text: '@',
|
|
5566
5612
|
fieldWidth: '@',
|
|
@@ -5574,7 +5620,8 @@ angular.module('niceElements')
|
|
|
5574
5620
|
isDisabled: '=',
|
|
5575
5621
|
isInline: '=',
|
|
5576
5622
|
help: '@',
|
|
5577
|
-
maxFileSize: '@'
|
|
5623
|
+
maxFileSize: '@',
|
|
5624
|
+
required: '=',
|
|
5578
5625
|
},
|
|
5579
5626
|
|
|
5580
5627
|
link: function (scope, element, attrs) {
|
|
@@ -5722,6 +5769,7 @@ angular.module('niceElements')
|
|
|
5722
5769
|
'footer': '?niceWrapperFooter'
|
|
5723
5770
|
},
|
|
5724
5771
|
scope: {
|
|
5772
|
+
niceTitle: '@',
|
|
5725
5773
|
title: '@',
|
|
5726
5774
|
subtitle: '@',
|
|
5727
5775
|
collapsable: '=',
|
|
@@ -5764,6 +5812,7 @@ angular.module('niceElements')
|
|
|
5764
5812
|
modelValue: '=',
|
|
5765
5813
|
yes: '@',
|
|
5766
5814
|
no: '@',
|
|
5815
|
+
niceTitle: '@',
|
|
5767
5816
|
title: '@',
|
|
5768
5817
|
isDisabled: '=',
|
|
5769
5818
|
fieldWidth: '@',
|
|
@@ -5773,26 +5822,27 @@ angular.module('niceElements')
|
|
|
5773
5822
|
noMargin: '@',
|
|
5774
5823
|
onChange: '&?',
|
|
5775
5824
|
isInline: '=',
|
|
5776
|
-
help: '@'
|
|
5825
|
+
help: '@',
|
|
5826
|
+
required: '='
|
|
5777
5827
|
},
|
|
5778
|
-
controller: function($scope, gettextCatalog) {
|
|
5828
|
+
controller: function ($scope, gettextCatalog) {
|
|
5779
5829
|
if (!$scope.yes) { $scope.yes = gettextCatalog.getString('Yes', null, "Nice"); }
|
|
5780
5830
|
if (!$scope.no) { $scope.no = gettextCatalog.getString('No', null, "Nice"); }
|
|
5781
5831
|
if (!$scope.title) { $scope.title = ''; }
|
|
5782
5832
|
if (!$scope.fieldWidth) { $scope.fieldWidth = 'col-sm-8'; }
|
|
5783
5833
|
if (!$scope.labelWidth) { $scope.labelWidth = 'col-sm-4'; }
|
|
5784
|
-
if(!angular.isDefined($scope.model) && !angular.isDefined($scope.options)) $scope.model = !angular.isDefined($scope.defaultFalse);
|
|
5785
|
-
if(!angular.isDefined($scope.modelValue) && angular.isDefined($scope.options)) $scope.modelValue = $scope.options[0];
|
|
5834
|
+
if (!angular.isDefined($scope.model) && !angular.isDefined($scope.options)) $scope.model = !angular.isDefined($scope.defaultFalse);
|
|
5835
|
+
if (!angular.isDefined($scope.modelValue) && angular.isDefined($scope.options)) $scope.modelValue = $scope.options[0];
|
|
5786
5836
|
|
|
5787
5837
|
$scope.defaultFalse = angular.isDefined($scope.defaultFalse);
|
|
5788
5838
|
$scope.noMargin = angular.isDefined($scope.noMargin);
|
|
5789
5839
|
|
|
5790
5840
|
$scope.buttonClass = "";
|
|
5791
|
-
|
|
5841
|
+
|
|
5792
5842
|
|
|
5793
5843
|
// ------------------------- Set overlay button position based on passed state in $scope.model -------------------------
|
|
5794
|
-
$scope.setButtonPosition = function(state) {
|
|
5795
|
-
if(state) {
|
|
5844
|
+
$scope.setButtonPosition = function (state) {
|
|
5845
|
+
if (state) {
|
|
5796
5846
|
$scope.buttonClass = "yesno-button-yes";
|
|
5797
5847
|
} else {
|
|
5798
5848
|
$scope.buttonClass = "yesno-button-no";
|
|
@@ -5800,48 +5850,48 @@ angular.module('niceElements')
|
|
|
5800
5850
|
};
|
|
5801
5851
|
|
|
5802
5852
|
// ------------------------- Watch for changes from outside -------------------------
|
|
5803
|
-
$scope.$watch('model', function(value_new, value_old){
|
|
5804
|
-
if(angular.isDefined($scope.model)){
|
|
5853
|
+
$scope.$watch('model', function (value_new, value_old) {
|
|
5854
|
+
if (angular.isDefined($scope.model)) {
|
|
5805
5855
|
$scope.setButtonLabel($scope.model);
|
|
5806
5856
|
$scope.setButtonPosition($scope.model);
|
|
5807
5857
|
}
|
|
5808
5858
|
});
|
|
5809
5859
|
|
|
5810
5860
|
// ------------------------- Watch for model value -------------------------
|
|
5811
|
-
$scope.$watch('modelValue', function(value_new, value_old){
|
|
5812
|
-
if($scope.options){
|
|
5861
|
+
$scope.$watch('modelValue', function (value_new, value_old) {
|
|
5862
|
+
if ($scope.options) {
|
|
5813
5863
|
$scope.model = $scope.modelValue == $scope.options[0];
|
|
5814
5864
|
}
|
|
5815
5865
|
});
|
|
5816
5866
|
|
|
5817
5867
|
// ------------------------- Set button label -------------------------
|
|
5818
|
-
$scope.setButtonLabel = function(state){
|
|
5868
|
+
$scope.setButtonLabel = function (state) {
|
|
5819
5869
|
if (state) {
|
|
5820
5870
|
$scope.state = $scope.yes;
|
|
5821
5871
|
} else {
|
|
5822
5872
|
$scope.state = $scope.no;
|
|
5823
5873
|
}
|
|
5824
5874
|
};
|
|
5825
|
-
|
|
5875
|
+
|
|
5826
5876
|
// ------------------------- Set width -------------------------
|
|
5827
|
-
$scope.setWidth = function(width, el){
|
|
5877
|
+
$scope.setWidth = function (width, el) {
|
|
5828
5878
|
el.style.width = width;
|
|
5829
5879
|
};
|
|
5830
|
-
|
|
5880
|
+
|
|
5831
5881
|
|
|
5832
5882
|
// ------------------------- Switch -------------------------
|
|
5833
|
-
$scope.switch = function(){
|
|
5834
|
-
if(!$scope.isDisabled){
|
|
5883
|
+
$scope.switch = function () {
|
|
5884
|
+
if (!$scope.isDisabled) {
|
|
5835
5885
|
$scope.model = !$scope.model;
|
|
5836
|
-
|
|
5837
|
-
if($scope.options){
|
|
5838
|
-
if($scope.model){
|
|
5886
|
+
|
|
5887
|
+
if ($scope.options) {
|
|
5888
|
+
if ($scope.model) {
|
|
5839
5889
|
$scope.modelValue = $scope.options[0];
|
|
5840
5890
|
} else {
|
|
5841
5891
|
$scope.modelValue = $scope.options[1];
|
|
5842
5892
|
}
|
|
5843
5893
|
}
|
|
5844
|
-
|
|
5894
|
+
|
|
5845
5895
|
if ($scope.onChange) $scope.onChange({ model: $scope.model });
|
|
5846
5896
|
$scope.formYesno.$setDirty();
|
|
5847
5897
|
}
|
|
@@ -5900,12 +5950,15 @@ angular.module('niceElements').filter('niceHighlight', function () {
|
|
|
5900
5950
|
* Service in the niceElements.
|
|
5901
5951
|
*/
|
|
5902
5952
|
angular.module('niceElements')
|
|
5903
|
-
.service('NiceService', function () {
|
|
5953
|
+
.service('NiceService', function ($rootScope) {
|
|
5904
5954
|
var service = {
|
|
5905
5955
|
name: "Nice elements",
|
|
5906
|
-
version: "1.10.
|
|
5956
|
+
version: "1.10.5",
|
|
5907
5957
|
getHeader: function () {
|
|
5908
5958
|
return {};
|
|
5959
|
+
},
|
|
5960
|
+
toast: function (message, type) {
|
|
5961
|
+
$rootScope.$broadcast('toast', message, type);
|
|
5909
5962
|
}
|
|
5910
5963
|
};
|
|
5911
5964
|
|
|
@@ -5979,7 +6032,7 @@ angular.module('niceElements')
|
|
|
5979
6032
|
};
|
|
5980
6033
|
});
|
|
5981
6034
|
|
|
5982
|
-
angular.module('niceElements').run(['$templateCache', function($templateCache) {
|
|
6035
|
+
angular.module('niceElements').run(['$templateCache', function ($templateCache) {
|
|
5983
6036
|
'use strict';
|
|
5984
6037
|
|
|
5985
6038
|
$templateCache.put('src/components/nice-button-toggle/nice-button-toggle.html',
|
|
@@ -6007,7 +6060,7 @@ angular.module('niceElements').run(['$templateCache', function($templateCache) {
|
|
|
6007
6060
|
$templateCache.put('src/components/nice-calendar/nice-calendar.html',
|
|
6008
6061
|
"<div class=\"nice-component nice-calendar\" ng-form=\"formCalendar\" ng-class=\"{ 'margin-bottom-0': noMargin, 'nice-component-inline': isInline }\">\n" +
|
|
6009
6062
|
"<div class=\"row\">\n" +
|
|
6010
|
-
"<nice-title text=\"title\" help=\"help\" required=\"required\" label-width=\"labelWidth\"></nice-title>\n" +
|
|
6063
|
+
"<nice-title text=\"title || niceTitle\" help=\"help\" required=\"required\" label-width=\"labelWidth\"></nice-title>\n" +
|
|
6011
6064
|
"<div class=\"nice-field col-xs-12\" ng-class=\"[fieldWidth ? fieldWidth : 'col-sm-8', { 'nice-disabled': isDisabled }]\">\n" +
|
|
6012
6065
|
"<div class=\"disabled-shield\" ng-if=\"isDisabled\"></div>\n" +
|
|
6013
6066
|
"<div class=\"nice-calendar-wrapper\">\n" +
|
|
@@ -6104,7 +6157,7 @@ angular.module('niceElements').run(['$templateCache', function($templateCache) {
|
|
|
6104
6157
|
"<button type=\"button\" class=\"btn nice-checkbox-checkbox\" ng-disabled=\"isDisabled\">\n" +
|
|
6105
6158
|
"<nice-icon class=\"nice-checkbox-check\" icon=\"icon-check\"></nice-icon>\n" +
|
|
6106
6159
|
"</button>\n" +
|
|
6107
|
-
"<div ng-if=\"title\" class=\"nice-checkbox-message\" ng-class=\"{ 'nice-disabled': isDisabled }\">{{ title }}</div>\n" +
|
|
6160
|
+
"<div ng-if=\"title || niceTitle\" class=\"nice-checkbox-message\" ng-class=\"{ 'nice-disabled': isDisabled }\">{{ title || niceTitle }}</div>\n" +
|
|
6108
6161
|
"</div>"
|
|
6109
6162
|
);
|
|
6110
6163
|
|
|
@@ -6112,7 +6165,7 @@ angular.module('niceElements').run(['$templateCache', function($templateCache) {
|
|
|
6112
6165
|
$templateCache.put('src/components/nice-choice/nice-choice.html',
|
|
6113
6166
|
"<div class=\"nice-component nice-choice\" ng-class=\"{ 'margin-bottom-0' : noMargin, 'nice-component-inline': isInline }\" ng-form=\"formChoice\">\n" +
|
|
6114
6167
|
"<div class=\"row\">\n" +
|
|
6115
|
-
"<nice-title text=\"title\" help=\"help\" required=\"required\" label-width=\"labelWidth\"></nice-title>\n" +
|
|
6168
|
+
"<nice-title text=\"title || niceTitle\" help=\"help\" required=\"required\" label-width=\"labelWidth\"></nice-title>\n" +
|
|
6116
6169
|
"<div class=\"nice-field col-xs-12\" ng-class=\"fieldWidth ? fieldWidth : 'col-sm-8'\">\n" +
|
|
6117
6170
|
"<ul class=\"list-unstyled\" ng-class=\"{ 'disabled': isDisabled }\">\n" +
|
|
6118
6171
|
"<li ng-repeat=\"item in internalList\" ng-class=\"{ 'selected' : isItemSelected(item) }\" ng-click=\"toggle(item)\">\n" +
|
|
@@ -6132,9 +6185,9 @@ angular.module('niceElements').run(['$templateCache', function($templateCache) {
|
|
|
6132
6185
|
$templateCache.put('src/components/nice-comment/nice-comment.html',
|
|
6133
6186
|
"<div class=\"nice-component nice-comment\" ng-class=\"{ 'margin-bottom-0' : noMargin, 'nice-component-inline': isInline }\">\n" +
|
|
6134
6187
|
"<div class=\"row\">\n" +
|
|
6135
|
-
"<nice-title text=\"title\" help=\"help\" required=\"required\" label-width=\"labelWidth\"></nice-title>\n" +
|
|
6188
|
+
"<nice-title text=\"title || niceTitle\" help=\"help\" required=\"required\" label-width=\"labelWidth\"></nice-title>\n" +
|
|
6136
6189
|
"<div class=\"nice-field col-xs-12\" ng-class=\"[fieldWidth ? fieldWidth : 'col-sm-8', { 'nice-disabled': isDisabled }]\" ng-click=\"edit()\">\n" +
|
|
6137
|
-
"<textarea ng-class=\"{'editing': editing}\" class=\"form-control\" ng-model=\"model\" placeholder=\"{{placeholder}}\" rows=\"{{rows}}\" ng-blur=\"save()\" ng-disabled=\"isDisabled\"></textarea>\n" +
|
|
6190
|
+
"<textarea ng-class=\"{'editing': editing}\" class=\"form-control\" ng-model=\"model\" placeholder=\"{{placeholder}}\" rows=\"{{rows}}\" ng-blur=\"save()\" ng-required=\"required\" ng-disabled=\"isDisabled\"></textarea>\n" +
|
|
6138
6191
|
"</div>\n" +
|
|
6139
6192
|
"</div>\n" +
|
|
6140
6193
|
"</div>"
|
|
@@ -6144,7 +6197,7 @@ angular.module('niceElements').run(['$templateCache', function($templateCache) {
|
|
|
6144
6197
|
$templateCache.put('src/components/nice-date-input/nice-date-input.html',
|
|
6145
6198
|
"<div class=\"nice-component nice-date-input\" ng-form=\"niceDateInputForm\" ng-class=\"{ 'margin-bottom-0': noMargin, 'nice-component-inline': isInline, 'error': niceDateInputForm.$invalid }\">\n" +
|
|
6146
6199
|
"<div class=\"row\">\n" +
|
|
6147
|
-
"<nice-title text=\"title\" help=\"help\" required=\"required\" label-width=\"labelWidth\"></nice-title>\n" +
|
|
6200
|
+
"<nice-title text=\"title || niceTitle\" help=\"help\" required=\"required\" label-width=\"labelWidth\"></nice-title>\n" +
|
|
6148
6201
|
"<div class=\"nice-field col-xs-12\" ng-class=\"[fieldWidth ? fieldWidth : 'col-sm-8', { 'nice-disabled': isDisabled }]\">\n" +
|
|
6149
6202
|
"<div class=\"input-group nice-date-input\" ng-show=\"date\" ng-class=\"{ 'has-warning': !disabled && niceDateInputForm.$invalid && niceDateInputForm.$dirty }\">\n" +
|
|
6150
6203
|
"<input type=\"text\" class=\"form-control\" ng-model=\"modelDate\" ng-blur=\"dateBlur($event)\" ng-disabled=\"isDisabled\">\n" +
|
|
@@ -6185,7 +6238,7 @@ angular.module('niceElements').run(['$templateCache', function($templateCache) {
|
|
|
6185
6238
|
$templateCache.put('src/components/nice-date-range/nice-date-range.html',
|
|
6186
6239
|
"<ng-form class=\"nice-component nice-date-range\" ng-class=\"{ 'margin-bottom-0' : noMargin, 'nice-component-inline': isInline }\" name=\"form\">\n" +
|
|
6187
6240
|
"<div class=\"row\">\n" +
|
|
6188
|
-
"<nice-title text=\"title\" help=\"help\" required=\"required\" label-width=\"labelWidth\"></nice-title>\n" +
|
|
6241
|
+
"<nice-title text=\"title || niceTitle\" help=\"help\" required=\"required\" label-width=\"labelWidth\"></nice-title>\n" +
|
|
6189
6242
|
"<div class=\"nice-field col-xs-12\" ng-class=\"fieldWidth ? fieldWidth : 'col-sm-8'\">\n" +
|
|
6190
6243
|
"<div class=\"input-group\">\n" +
|
|
6191
6244
|
"<input date-range-picker class=\"form-control date-picker\" type=\"text\" options=\"opts\" ng-model=\"model\">\n" +
|
|
@@ -6203,7 +6256,7 @@ angular.module('niceElements').run(['$templateCache', function($templateCache) {
|
|
|
6203
6256
|
"<div class=\"nice-component nice-date\" ng-form=\"forma\" ng-class=\"{ 'margin-bottom-0': noMargin, 'nice-component-inline': isInline }\">\n" +
|
|
6204
6257
|
"<div class=\"nice-date-background\" ng-click=\"toggleOpen()\" ng-if=\"isOpen && !inline\"></div>\n" +
|
|
6205
6258
|
"<div class=\"row\">\n" +
|
|
6206
|
-
"<nice-title text=\"title\" help=\"help\" required=\"required\" label-width=\"labelWidth\"></nice-title>\n" +
|
|
6259
|
+
"<nice-title text=\"title || niceTitle\" help=\"help\" required=\"required\" label-width=\"labelWidth\"></nice-title>\n" +
|
|
6207
6260
|
"<div class=\"nice-field col-xs-12\" ng-class=\"[fieldWidth ? fieldWidth : 'col-sm-8', { 'nice-disabled': isDisabled }]\">\n" +
|
|
6208
6261
|
"<div class=\"disabled-shield\" ng-if=\"isDisabled\"></div>\n" +
|
|
6209
6262
|
"<div class=\"nice-date-button input-group\" ng-class=\"{ 'open': isOpen }\" ng-show=\"!inline\" ng-click=\"toggleOpen()\">\n" +
|
|
@@ -6220,7 +6273,8 @@ angular.module('niceElements').run(['$templateCache', function($templateCache) {
|
|
|
6220
6273
|
"<div class=\"nice-date-header\">\n" +
|
|
6221
6274
|
"<span>\n" +
|
|
6222
6275
|
"<select class=\"year-picker\" ng-model=\"innerDate.year\" ng-change=\"handleDateChange()\" ng-options=\"year for year in years\" ng-disabled=\"isDisabled\">\n" +
|
|
6223
|
-
"</select
|
|
6276
|
+
"</select>\n" +
|
|
6277
|
+
"<span>,</span>\n" +
|
|
6224
6278
|
"<select class=\"month-picker\" ng-model=\"innerDate.month\" ng-change=\"handleDateChange()\" ng-options=\"month.value as month.name for month in months\" ng-disabled=\"isDisabled\">\n" +
|
|
6225
6279
|
"</select>\n" +
|
|
6226
6280
|
"</span>\n" +
|
|
@@ -6273,7 +6327,7 @@ angular.module('niceElements').run(['$templateCache', function($templateCache) {
|
|
|
6273
6327
|
"<div class=\"nice-component nice-datetime-picker\" name=\"form\" ng-class=\"{ 'margin-bottom-0': noMargin, 'nice-component-inline': isInline }\">\n" +
|
|
6274
6328
|
"<div class=\"nice-dtp-background\" ng-click=\"closeDtp(true)\" ng-if=\"isOpen\"></div>\n" +
|
|
6275
6329
|
"<div class=\"row\">\n" +
|
|
6276
|
-
"<nice-title text=\"title\" help=\"help\" required=\"required\" label-width=\"labelWidth\"></nice-title>\n" +
|
|
6330
|
+
"<nice-title text=\"title || niceTitle\" help=\"help\" required=\"required\" label-width=\"labelWidth\"></nice-title>\n" +
|
|
6277
6331
|
"<div class=\"nice-field col-xs-12\" ng-class=\"[fieldWidth ? fieldWidth : 'col-sm-8', { 'nice-disabled': isDisabled }]\">\n" +
|
|
6278
6332
|
"<div ng-form=\"formDatetimePicker\"></div>\n" +
|
|
6279
6333
|
"<div class=\"input-group\" id=\"dropdown{{randNum}}\">\n" +
|
|
@@ -6298,7 +6352,7 @@ angular.module('niceElements').run(['$templateCache', function($templateCache) {
|
|
|
6298
6352
|
"<div class=\"nice-component nice-datetimerange-picker-2\" ng-form=\"formDateRangePicker\" ng-class=\"{ 'margin-bottom-0': noMargin, 'nice-component-inline': isInline }\">\n" +
|
|
6299
6353
|
"<div class=\"nice-dtp-background\" ng-click=\"close()\" ng-if=\"isOpen\"></div>\n" +
|
|
6300
6354
|
"<div class=\"row\">\n" +
|
|
6301
|
-
"<nice-title text=\"title\" help=\"help\" required=\"required\" label-width=\"labelWidth\"></nice-title>\n" +
|
|
6355
|
+
"<nice-title text=\"title || niceTitle\" help=\"help\" required=\"required\" label-width=\"labelWidth\"></nice-title>\n" +
|
|
6302
6356
|
"<div class=\"nice-field col-xs-12\" ng-class=\"[fieldWidth ? fieldWidth : 'col-sm-8', { 'nice-disabled': isDisabled }]\">\n" +
|
|
6303
6357
|
"<div class=\"nice-daterange-picker-button input-group\" ng-class=\"{ 'open': isOpen }\" ng-click=\"open()\">\n" +
|
|
6304
6358
|
"<input type=\"text\" class=\"form-control\" value=\"{{ modelFormat }}\" readonly=\"readonly\" ng-disabled=\"isDisabled\">\n" +
|
|
@@ -6338,7 +6392,7 @@ angular.module('niceElements').run(['$templateCache', function($templateCache) {
|
|
|
6338
6392
|
"<div class=\"nice-component nice-datetime-picker nice-datetimerange-picker\" name=\"form\" ng-class=\"{ 'margin-bottom-0': noMargin, 'nice-component-inline': isInline }\">\n" +
|
|
6339
6393
|
"<div class=\"nice-dtp-background\" ng-click=\"cancelClick()\" ng-if=\"showDtpRange\"></div>\n" +
|
|
6340
6394
|
"<div class=\"row\">\n" +
|
|
6341
|
-
"<nice-title text=\"title\" help=\"help\" required=\"required\" label-width=\"labelWidth\"></nice-title>\n" +
|
|
6395
|
+
"<nice-title text=\"title || niceTitle\" help=\"help\" required=\"required\" label-width=\"labelWidth\"></nice-title>\n" +
|
|
6342
6396
|
"<div class=\"nice-field col-xs-12\" ng-class=\"[fieldWidth ? fieldWidth : 'col-sm-8', { 'nice-disabled': isDisabled }]\">\n" +
|
|
6343
6397
|
"<div ng-form=\"formDatetimeRangePicker\"></div>\n" +
|
|
6344
6398
|
"<div class=\"dropdown\">\n" +
|
|
@@ -6383,7 +6437,7 @@ angular.module('niceElements').run(['$templateCache', function($templateCache) {
|
|
|
6383
6437
|
$templateCache.put('src/components/nice-dropdown-date/nice-dropdown-date.html',
|
|
6384
6438
|
"<div class=\"nice-component nice-dropdown-date\" ng-form=\"dropdownDateForm\" ng-class=\"{ 'margin-bottom-0': noMargin, 'nice-component-inline': isInline }\">\n" +
|
|
6385
6439
|
"<div class=\"row\">\n" +
|
|
6386
|
-
"<nice-title text=\"title\" help=\"help\" required=\"required\" label-width=\"labelWidth\"></nice-title>\n" +
|
|
6440
|
+
"<nice-title text=\"title || niceTitle\" help=\"help\" required=\"required\" label-width=\"labelWidth\"></nice-title>\n" +
|
|
6387
6441
|
"<div class=\"nice-field col-xs-12\" ng-class=\"[\r" +
|
|
6388
6442
|
"\n" +
|
|
6389
6443
|
" fieldWidth ? fieldWidth : 'col-sm-8',\r" +
|
|
@@ -6417,7 +6471,7 @@ angular.module('niceElements').run(['$templateCache', function($templateCache) {
|
|
|
6417
6471
|
$templateCache.put('src/components/nice-dropdown-old/nice-dropdown-old.html',
|
|
6418
6472
|
"<div class=\"nice-component nice-dropdown-old\" ng-class=\"{ 'margin-bottom-0': noMargin, 'nice-component-inline': isInline }\">\n" +
|
|
6419
6473
|
"<div class=\"row\">\n" +
|
|
6420
|
-
"<nice-title text=\"title\" help=\"help\" required=\"required\" label-width=\"labelWidth\"></nice-title>\n" +
|
|
6474
|
+
"<nice-title text=\"title || niceTitle\" help=\"help\" required=\"required\" label-width=\"labelWidth\"></nice-title>\n" +
|
|
6421
6475
|
"<div class=\"nice-field col-xs-12\" ng-class=\"fieldWidth ? fieldWidth : 'col-sm-8'\">\n" +
|
|
6422
6476
|
"<div ng-class=\"addButtonEnable && !isDisabled ? 'input-group': ''\">\n" +
|
|
6423
6477
|
"<div class=\"btn-group\" dropdown is-open=\"status.isopen\" ng-class=\"{ 'disabled': isDisabled || emptyList }\">\n" +
|
|
@@ -6455,10 +6509,11 @@ angular.module('niceElements').run(['$templateCache', function($templateCache) {
|
|
|
6455
6509
|
$templateCache.put('src/components/nice-dropdown/nice-dropdown.html',
|
|
6456
6510
|
"<div class=\"nice-component nice-dropdown\" ng-class=\"{ 'margin-bottom-0': noMargin, 'nice-component-inline': isInline }\" ng-form=\"formDropdown\">\n" +
|
|
6457
6511
|
"<div class=\"row\">\n" +
|
|
6458
|
-
"<nice-title text=\"title\" help=\"help\" required=\"required\" label-width=\"labelWidth\"></nice-title>\n" +
|
|
6512
|
+
"<nice-title text=\"title || niceTitle\" help=\"help\" required=\"required\" label-width=\"labelWidth\"></nice-title>\n" +
|
|
6459
6513
|
"<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" +
|
|
6460
6514
|
"<div class=\"nice-field-wrapper\">\n" +
|
|
6461
6515
|
"<button type=\"button\" class=\"btn btn-dropdown\" type=\"button\" ng-ref=\"dropdown-button\" ng-click=\"toggle()\" ng-disabled=\"isDisabled || emptyList\" aria-expanded=\"{{ isOpen }}\" aria-haspopup=\"true\" aria-controls=\"menu\" id=\"nice-dropdown-{{ id }}\">\n" +
|
|
6516
|
+
"<input class=\"hidden-input\" ng-model=\"model\" ng-required=\"required\" ng-disabled=\"disabled\" tabindex=\"-1\">\n" +
|
|
6462
6517
|
"<div class=\"btn-dropdown-inside\" ng-transclude=\"button\" ng-if=\"selected != null\">\n" +
|
|
6463
6518
|
"<span ng-if=\"!multiple\">{{ selected[objValue] }}</span>\n" +
|
|
6464
6519
|
"<span ng-if=\"multiple\">\n" +
|
|
@@ -6474,7 +6529,7 @@ angular.module('niceElements').run(['$templateCache', function($templateCache) {
|
|
|
6474
6529
|
"<div class=\"nice-dropdown-menu-wrapper\">\n" +
|
|
6475
6530
|
"<div class=\"nice-dropdown-menu\" ng-if=\"isOpen\">\n" +
|
|
6476
6531
|
"<div class=\"search-bar\" ng-if=\"!noSearch && searchFunction\">\n" +
|
|
6477
|
-
"<input ng-model=\"internal.search\" ng-model-options=\"{ debounce: 500 }\" ng-change=\"handleSearch()\" placeholder=\"{{ searchText }}\">\n" +
|
|
6532
|
+
"<input class=\"search-bar-input\" ng-model=\"internal.search\" ng-model-options=\"{ debounce: 500 }\" ng-change=\"handleSearch()\" placeholder=\"{{ searchText }}\">\n" +
|
|
6478
6533
|
"<div class=\"count\" ng-if=\"internalList && internalList._metadata && enableLoadMore\">{{ internalList.length }}/{{ internalList._metadata.count }}</div>\n" +
|
|
6479
6534
|
"<nice-icon ng-if=\"!internal.search\" class=\"icon\" icon=\"icon-search\"></nice-icon>\n" +
|
|
6480
6535
|
"<nice-icon ng-if=\"internal.search\" class=\"icon\" icon=\"icon-x\" ng-click=\"clearSearch()\"></nice-icon>\n" +
|
|
@@ -6615,7 +6670,7 @@ angular.module('niceElements').run(['$templateCache', function($templateCache) {
|
|
|
6615
6670
|
$templateCache.put('src/components/nice-input/nice-input.html',
|
|
6616
6671
|
"<ng-form class=\"nice-component nice-input\" ng-class=\"{ 'margin-bottom-0' : noMargin, 'nice-component-inline': isInline }\" name=\"forma\">\n" +
|
|
6617
6672
|
"<div class=\"row\">\n" +
|
|
6618
|
-
"<nice-title text=\"title\" help=\"help\" required=\"required\" label-width=\"labelWidth\"></nice-title>\n" +
|
|
6673
|
+
"<nice-title text=\"title || niceTitle\" help=\"help\" required=\"required\" label-width=\"labelWidth\"></nice-title>\n" +
|
|
6619
6674
|
"<div class=\"nice-field col-xs-12\" ng-class=\"fieldWidth ? fieldWidth : 'col-sm-8'\">\n" +
|
|
6620
6675
|
"<div class=\"input-group\" ng-class=\"{\r" +
|
|
6621
6676
|
"\n" +
|
|
@@ -6664,7 +6719,7 @@ angular.module('niceElements').run(['$templateCache', function($templateCache) {
|
|
|
6664
6719
|
$templateCache.put('src/components/nice-label/nice-label.html',
|
|
6665
6720
|
"<div class=\"nice-component nice-label\" ng-class=\"{ 'margin-bottom-0' : noMargin, 'nice-component-inline': isInline }\">\n" +
|
|
6666
6721
|
"<div class=\"row\">\n" +
|
|
6667
|
-
"<nice-title text=\"title\" help=\"help\" required=\"required\" label-width=\"labelWidth\"></nice-title>\n" +
|
|
6722
|
+
"<nice-title text=\"title || niceTitle\" help=\"help\" required=\"required\" label-width=\"labelWidth\"></nice-title>\n" +
|
|
6668
6723
|
"<div class=\"nice-field col-xs-12\" ng-class=\"fieldWidth ? fieldWidth : 'col-xs-8'\">\n" +
|
|
6669
6724
|
"<p class=\"value\">{{ value }}</p>\n" +
|
|
6670
6725
|
"</div>\n" +
|
|
@@ -6703,7 +6758,7 @@ angular.module('niceElements').run(['$templateCache', function($templateCache) {
|
|
|
6703
6758
|
$templateCache.put('src/components/nice-number/nice-number.html',
|
|
6704
6759
|
"<div class=\"nice-component nice-number\" ng-form=\"niceNumberForm\" ng-class=\"{ 'margin-bottom-0' : noMargin, 'nice-component-inline': isInline }\">\n" +
|
|
6705
6760
|
"<div ng-class=\"{'row' : !disableRow}\">\n" +
|
|
6706
|
-
"<nice-title text=\"title\" help=\"help\" required=\"required\" label-width=\"labelWidth\"></nice-title>\n" +
|
|
6761
|
+
"<nice-title text=\"title || niceTitle\" help=\"help\" required=\"required\" label-width=\"labelWidth\"></nice-title>\n" +
|
|
6707
6762
|
"<div class=\"nice-field col-xs-12\" ng-class=\"[fieldWidth ? fieldWidth : 'col-sm-8', { 'nice-disabled': isDisabled }]\">\n" +
|
|
6708
6763
|
"<div class=\"input-group\" ng-class=\"{'has-warning': !isDisabled && niceNumberForm.$invalid && niceNumberForm.$dirty}\">\n" +
|
|
6709
6764
|
"<span class=\"input-group-btn\">\n" +
|
|
@@ -6742,7 +6797,7 @@ angular.module('niceElements').run(['$templateCache', function($templateCache) {
|
|
|
6742
6797
|
$templateCache.put('src/components/nice-percent/nice-percent.html',
|
|
6743
6798
|
"<ng-form class=\"nice-component nice-input\" ng-class=\"{ 'margin-bottom-0' : noMargin, 'nice-component-inline': isInline }\" name=\"form\">\n" +
|
|
6744
6799
|
"<div class=\"row\">\n" +
|
|
6745
|
-
"<nice-title text=\"title\" help=\"help\" required=\"required\" label-width=\"labelWidth\"></nice-title>\n" +
|
|
6800
|
+
"<nice-title text=\"title || niceTitle\" help=\"help\" required=\"required\" label-width=\"labelWidth\"></nice-title>\n" +
|
|
6746
6801
|
"<div class=\"nice-field col-xs-12\" ng-class=\"fieldWidth ? fieldWidth : 'col-sm-8'\">\n" +
|
|
6747
6802
|
"<div class=\"input-group has-feedback symbol\" ng-class=\"{\r" +
|
|
6748
6803
|
"\n" +
|
|
@@ -6788,7 +6843,7 @@ angular.module('niceElements').run(['$templateCache', function($templateCache) {
|
|
|
6788
6843
|
$templateCache.put('src/components/nice-progress-bar/nice-progress-bar.html',
|
|
6789
6844
|
"<div class=\"nice-component nice-progress-bar\" ng-class=\"{ 'margin-bottom-0': noMargin, 'nice-component-inline': isInline }\">\n" +
|
|
6790
6845
|
"<div class=\"row\">\n" +
|
|
6791
|
-
"<nice-title text=\"title\" help=\"help\" required=\"required\" label-width=\"labelWidth\"></nice-title>\n" +
|
|
6846
|
+
"<nice-title text=\"title || niceTitle\" help=\"help\" required=\"required\" label-width=\"labelWidth\"></nice-title>\n" +
|
|
6792
6847
|
"<div class=\"nice-field col-xs-12\" ng-class=\"fieldWidth ? fieldWidth : 'col-sm-8'\">\n" +
|
|
6793
6848
|
"<div class=\"progress\">\n" +
|
|
6794
6849
|
"<div class=\"progress-value\">{{ value }} / {{ max }}</div>\n" +
|
|
@@ -6805,7 +6860,7 @@ angular.module('niceElements').run(['$templateCache', function($templateCache) {
|
|
|
6805
6860
|
$templateCache.put('src/components/nice-quantity/nice-quantity.html',
|
|
6806
6861
|
"<div class=\"nice-component nice-quantity\" ng-class=\"{ 'margin-bottom-0': noMargin, 'nice-component-inline': isInline }\">\n" +
|
|
6807
6862
|
"<div class=\"row\">\n" +
|
|
6808
|
-
"<nice-title text=\"title\" help=\"help\" required=\"required\" label-width=\"labelWidth\"></nice-title>\n" +
|
|
6863
|
+
"<nice-title text=\"title || niceTitle\" help=\"help\" required=\"required\" label-width=\"labelWidth\"></nice-title>\n" +
|
|
6809
6864
|
"<div class=\"nice-field col-xs-12\" ng-class=\"[fieldWidth ? fieldWidth : 'col-sm-8', { 'nice-disabled': isDisabled }]\">\n" +
|
|
6810
6865
|
"<div class=\"input-group\">\n" +
|
|
6811
6866
|
"<span class=\"input-group-btn\">\n" +
|
|
@@ -6829,7 +6884,7 @@ angular.module('niceElements').run(['$templateCache', function($templateCache) {
|
|
|
6829
6884
|
$templateCache.put('src/components/nice-search/nice-search.html',
|
|
6830
6885
|
"<ng-form class=\"nice-component nice-input nice-search\" ng-class=\"{ 'margin-bottom-0': noMargin, 'nice-component-inline': isInline}\" name=\"form\">\n" +
|
|
6831
6886
|
"<div class=\"row\">\n" +
|
|
6832
|
-
"<nice-title text=\"title\" help=\"help\" required=\"required\" label-width=\"labelWidth\"></nice-title>\n" +
|
|
6887
|
+
"<nice-title text=\"title || niceTitle\" help=\"help\" required=\"required\" label-width=\"labelWidth\"></nice-title>\n" +
|
|
6833
6888
|
"<div class=\"nice-field col-xs-12\" ng-class=\"[fieldWidth ? fieldWidth : 'col-sm-8', { 'nice-disabled': isDisabled }]\">\n" +
|
|
6834
6889
|
"<div class=\"input-group\" ng-class=\"{ 'disabled': isDisabled }\">\n" +
|
|
6835
6890
|
"<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" +
|
|
@@ -6863,7 +6918,7 @@ angular.module('niceElements').run(['$templateCache', function($templateCache) {
|
|
|
6863
6918
|
$templateCache.put('src/components/nice-search2/nice-search2.html',
|
|
6864
6919
|
"<ng-form class=\"nice-component nice-input nice-search2\" ng-class=\"{ 'margin-bottom-0' : noMargin, 'nice-component-inline': isInline }\" name=\"form\">\n" +
|
|
6865
6920
|
"<div class=\"row\">\n" +
|
|
6866
|
-
"<nice-title text=\"title\" help=\"help\" required=\"required\" label-width=\"labelWidth\"></nice-title>\n" +
|
|
6921
|
+
"<nice-title text=\"title || niceTitle\" help=\"help\" required=\"required\" label-width=\"labelWidth\"></nice-title>\n" +
|
|
6867
6922
|
"<div class=\"nice-field col-xs-12\" ng-class=\"[fieldWidth ? fieldWidth : 'col-sm-8', { 'nice-disabled': isDisabled }]\" click-outside=\"close()\">\n" +
|
|
6868
6923
|
"<div class=\"nice-search-button input-group\" ng-class=\"{ 'disabled': isDisabled }\">\n" +
|
|
6869
6924
|
"<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" +
|
|
@@ -6893,7 +6948,7 @@ angular.module('niceElements').run(['$templateCache', function($templateCache) {
|
|
|
6893
6948
|
$templateCache.put('src/components/nice-slot/nice-slot.html',
|
|
6894
6949
|
"<div class=\"nice-component nice-slot\" ng-class=\"{ 'margin-bottom-0' : noMargin, 'nice-component-inline': isInline }\">\n" +
|
|
6895
6950
|
"<div class=\"row\">\n" +
|
|
6896
|
-
"<nice-title text=\"title\" help=\"help\" required=\"required\" label-width=\"labelWidth\"></nice-title>\n" +
|
|
6951
|
+
"<nice-title text=\"title || niceTitle\" help=\"help\" required=\"required\" label-width=\"labelWidth\"></nice-title>\n" +
|
|
6897
6952
|
"<div class=\"nice-field col-xs-12\" ng-class=\"fieldWidth ? fieldWidth : 'col-xs-8'\">\n" +
|
|
6898
6953
|
"<ng-transclude></ng-transclude>\n" +
|
|
6899
6954
|
"</div>\n" +
|
|
@@ -7914,7 +7969,7 @@ angular.module('niceElements').run(['$templateCache', function($templateCache) {
|
|
|
7914
7969
|
$templateCache.put('src/components/nice-time-picker/nice-time-picker.html',
|
|
7915
7970
|
"<div class=\"nice-component nice-time-picker\" ng-form=\"forma\" ng-class=\"{ 'margin-bottom-0': noMargin, 'nice-component-inline': isInline }\">\n" +
|
|
7916
7971
|
"<div class=\"row\">\n" +
|
|
7917
|
-
"<nice-title text=\"title\" help=\"help\" required=\"required\" label-width=\"labelWidth\"></nice-title>\n" +
|
|
7972
|
+
"<nice-title text=\"title || niceTitle\" help=\"help\" required=\"required\" label-width=\"labelWidth\"></nice-title>\n" +
|
|
7918
7973
|
"<div class=\"nice-field col-xs-12\" ng-class=\"fieldWidth ? fieldWidth : 'col-sm-8'\">\n" +
|
|
7919
7974
|
"<div class=\"input-group\" ng-class=\"{\r" +
|
|
7920
7975
|
"\n" +
|
|
@@ -7973,9 +8028,9 @@ angular.module('niceElements').run(['$templateCache', function($templateCache) {
|
|
|
7973
8028
|
|
|
7974
8029
|
|
|
7975
8030
|
$templateCache.put('src/components/nice-toggle/nice-toggle.html',
|
|
7976
|
-
"<div class=\"nice-component nice-toggle\" ng-class=\"{ 'margin-bottom-0'
|
|
8031
|
+
"<div class=\"nice-component nice-toggle\" ng-class=\"{ 'margin-bottom-0': noMargin, 'title-right': titleRight, 'nice-component-inline': isInline, 'nice-component-block': isBlock, 'active': model }\" ng-form=\"formToggle\">\n" +
|
|
7977
8032
|
"<div class=\"row\">\n" +
|
|
7978
|
-
"<nice-title text=\"title\" help=\"help\" required=\"required\" label-width=\"labelWidth\"></nice-title>\n" +
|
|
8033
|
+
"<nice-title text=\"title || niceTitle\" help=\"help\" required=\"required\" label-width=\"labelWidth\"></nice-title>\n" +
|
|
7979
8034
|
"<div class=\"nice-field col-xs-12\" ng-class=\"[fieldWidth ? fieldWidth : 'col-sm-8', { 'nice-disabled': isDisabled }]\">\n" +
|
|
7980
8035
|
"<button type=\"button\" class=\"nice-toggle-field\" ng-click=\"toggle()\" ng-disabled=\"isDisabled\">\n" +
|
|
7981
8036
|
"<div class=\"nice-toggle-field-handle\">{{ state }}</div>\n" +
|
|
@@ -7989,7 +8044,7 @@ angular.module('niceElements').run(['$templateCache', function($templateCache) {
|
|
|
7989
8044
|
$templateCache.put('src/components/nice-upload/nice-upload.html',
|
|
7990
8045
|
"<ng-form class=\"nice-component nice-upload\" ng-class=\"{ 'margin-bottom-0' : noMargin, 'nice-component-inline': isInline }\" name=\"form\">\n" +
|
|
7991
8046
|
"<div class=\"row\">\n" +
|
|
7992
|
-
"<nice-title text=\"title\" help=\"help\" required=\"required\" label-width=\"labelWidth\"></nice-title>\n" +
|
|
8047
|
+
"<nice-title text=\"title || niceTitle\" help=\"help\" required=\"required\" label-width=\"labelWidth\"></nice-title>\n" +
|
|
7993
8048
|
"<div class=\"nice-field col-xs-12\" ng-class=\"[fieldWidth ? fieldWidth : 'col-sm-8', { 'nice-disabled': isDisabled }]\">\n" +
|
|
7994
8049
|
"<div class=\"nice-upload-area\">\n" +
|
|
7995
8050
|
"<div class=\"input-area\" ng-class=\"{ 'dragging': dragging || draggingGlobal }\">\n" +
|
|
@@ -8001,7 +8056,7 @@ angular.module('niceElements').run(['$templateCache', function($templateCache) {
|
|
|
8001
8056
|
"</div>\n" +
|
|
8002
8057
|
"<img ng-if=\"imageSource\" data-ng-src=\"{{ imageSource }}\">\n" +
|
|
8003
8058
|
"</div>\n" +
|
|
8004
|
-
"<input class=\"input-file\" type=\"file\" accept=\"{{ accept }}\" ng-model=\"file\" ng-disabled=\"isDisabled || loading\">\n" +
|
|
8059
|
+
"<input class=\"input-file\" type=\"file\" accept=\"{{ accept }}\" ng-model=\"file\" ng-required=\"required\" ng-disabled=\"isDisabled || loading\">\n" +
|
|
8005
8060
|
"<nice-loader fulldiv=\"true\" ng-if=\"loading\"></nice-loader>\n" +
|
|
8006
8061
|
"</div>\n" +
|
|
8007
8062
|
"</div>\n" +
|
|
@@ -8014,7 +8069,7 @@ angular.module('niceElements').run(['$templateCache', function($templateCache) {
|
|
|
8014
8069
|
"<div class=\"nice-wrapper\" ng-class=\"{ 'collapsable': collapsable, 'has-header': hasHeader, 'has-footer': hasFooter, 'nice-wrapper-sticky-footer': stickyFooter, 'nice-wrapper-sticky-header': stickyHeader }\">\n" +
|
|
8015
8070
|
"<div class=\"nice-wrapper-header\" ng-if=\"hasHeader\" ng-click=\"toggle()\">\n" +
|
|
8016
8071
|
"<div class=\"nice-wrapper-info\">\n" +
|
|
8017
|
-
"<div class=\"nice-wrapper-title\" ng-transclude=\"title\">{{ title }}</div>\n" +
|
|
8072
|
+
"<div class=\"nice-wrapper-title\" ng-transclude=\"title\">{{ title || niceTitle }}</div>\n" +
|
|
8018
8073
|
"<div class=\"nice-wrapper-subtitle\" ng-transclude=\"subtitle\">{{ subtitle }}</div>\n" +
|
|
8019
8074
|
"</div>\n" +
|
|
8020
8075
|
"<button type=\"button\" class=\"nice-wrapper-toggle btn btn-icon btn-default-naked\" ng-if=\"collapsable\" ng-class=\"{ 'is-open': isOpen }\">\n" +
|
|
@@ -8030,7 +8085,7 @@ angular.module('niceElements').run(['$templateCache', function($templateCache) {
|
|
|
8030
8085
|
$templateCache.put('src/components/nice-yesno/nice-yesno.html',
|
|
8031
8086
|
"<div class=\"nice-component nice-yesno\" ng-class=\"{ 'margin-bottom-0' : noMargin, 'nice-component-inline': isInline }\" ng-form=\"formYesno\">\n" +
|
|
8032
8087
|
"<div class=\"row\">\n" +
|
|
8033
|
-
"<nice-title text=\"title\" help=\"help\" required=\"required\" label-width=\"labelWidth\"></nice-title>\n" +
|
|
8088
|
+
"<nice-title text=\"title || niceTitle\" help=\"help\" required=\"required\" label-width=\"labelWidth\"></nice-title>\n" +
|
|
8034
8089
|
"<div class=\"nice-field col-xs-12\" ng-class=\"[fieldWidth ? fieldWidth : 'col-sm-8', { 'nice-disabled': isDisabled }]\">\n" +
|
|
8035
8090
|
"<div class=\"yesno-wrapper noselect\">\n" +
|
|
8036
8091
|
"<button type=\"button\" class=\"yesno-yes-bg\" ng-click=\"switch()\" tabindex=\"-1\" ng-disabled=\"isDisabled\">{{ yes }}</button>\n" +
|