nice-elements 1.5.0 → 1.6.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/.vscode/settings.json +3 -0
- package/CHANGELOG.md +20 -0
- package/README.md +48 -1
- package/bower.json +1 -1
- package/dist/nice.js +144 -100
- package/dist/nice.min.js +1 -1
- package/dist/style.css +870 -66
- package/dist/style.css.map +3 -1
- package/dist/style.min.css +2 -2
- package/package.json +1 -1
- package/src/components/nice-calendar/nice-calendar.html +10 -37
- package/src/components/nice-calendar/nice-calendar.scss +25 -24
- package/src/components/nice-checkbox/nice-checkbox.html +2 -2
- package/src/components/nice-checkbox/nice-checkbox.scss +5 -4
- package/src/components/nice-choice/nice-choice.html +1 -1
- package/src/components/nice-choice/nice-choice.scss +22 -22
- package/src/components/nice-date/nice-date.html +14 -34
- package/src/components/nice-date/nice-date.scss +41 -17
- package/src/components/nice-datetimerange-picker/nice-datetimerange-picker.html +4 -34
- package/src/components/nice-datetimerange-picker-2/nice-datetimerange-picker-2.scss +18 -14
- package/src/components/nice-dropdown/nice-dropdown.js +5 -0
- package/src/components/nice-dropdown/nice-dropdown.scss +5 -4
- package/src/components/nice-dropdown-old/nice-dropdown-old.scss +27 -26
- package/src/components/nice-number/nice-number.html +2 -2
- package/src/components/nice-number/nice-number.scss +9 -0
- package/src/components/nice-popup/nice-popup.js +3 -0
- package/src/components/nice-popup/nice-popup.scss +4 -0
- package/src/components/nice-quantity/nice-quantity.html +3 -10
- package/src/components/nice-quantity/nice-quantity.scss +17 -10
- package/src/components/nice-search2/nice-search2.html +2 -12
- package/src/components/nice-search2/nice-search2.js +34 -27
- package/src/components/nice-upload/nice-upload.html +4 -5
- package/src/components/nice-upload/nice-upload.js +73 -41
- package/src/components/nice-upload/nice-upload.scss +32 -13
- package/src/components/nice-yesno/nice-yesno.html +1 -1
- package/src/components/nice-yesno/nice-yesno.scss +23 -15
- package/src/styles/_nice-buttons.scss +335 -0
- package/src/styles/_nice-common.scss +84 -47
- package/src/styles/_nice-spacing.scss +58 -0
- package/src/styles/_nice.scss +2 -0
- package/src/styles/_variables.scss +108 -32
package/dist/nice.js
CHANGED
|
@@ -2329,6 +2329,11 @@ angular.module('niceElements')
|
|
|
2329
2329
|
}
|
|
2330
2330
|
};
|
|
2331
2331
|
|
|
2332
|
+
// ------------------- On blur -------------------
|
|
2333
|
+
$scope.onBlur = function () {
|
|
2334
|
+
$scope.close();
|
|
2335
|
+
};
|
|
2336
|
+
|
|
2332
2337
|
|
|
2333
2338
|
// ----------------------------------- Scroll to hover -----------------------------------
|
|
2334
2339
|
$scope.scrollToHover = function (notSmooth) {
|
|
@@ -4082,6 +4087,7 @@ angular.module('niceElements')
|
|
|
4082
4087
|
placement: '@', // Describes the preferred placement of the popper
|
|
4083
4088
|
strategy: '@',
|
|
4084
4089
|
showArrow: '@',
|
|
4090
|
+
onChange: '&?',
|
|
4085
4091
|
},
|
|
4086
4092
|
controller: function ($scope, $element, $timeout) {
|
|
4087
4093
|
$scope.isOpen = false;
|
|
@@ -4167,11 +4173,13 @@ angular.module('niceElements')
|
|
|
4167
4173
|
|
|
4168
4174
|
$scope.close = function () {
|
|
4169
4175
|
$scope.isOpen = false;
|
|
4176
|
+
if ($scope.onChange) $scope.onChange($scope.isOpen);
|
|
4170
4177
|
};
|
|
4171
4178
|
|
|
4172
4179
|
$scope.open = function () {
|
|
4173
4180
|
$scope.popper.update();
|
|
4174
4181
|
$scope.isOpen = true;
|
|
4182
|
+
if ($scope.onChange) $scope.onChange($scope.isOpen);
|
|
4175
4183
|
$timeout(function () {
|
|
4176
4184
|
$scope.popper.update();
|
|
4177
4185
|
});
|
|
@@ -4564,7 +4572,7 @@ angular.module('niceElements')
|
|
|
4564
4572
|
isInline: '=',
|
|
4565
4573
|
help: '@'
|
|
4566
4574
|
},
|
|
4567
|
-
controller: function($scope, $timeout, $element) {
|
|
4575
|
+
controller: function ($scope, $timeout, $element) {
|
|
4568
4576
|
$scope.loading = false;
|
|
4569
4577
|
$scope.isOpen = false;
|
|
4570
4578
|
$scope.debounce = null;
|
|
@@ -4578,7 +4586,7 @@ angular.module('niceElements')
|
|
|
4578
4586
|
|
|
4579
4587
|
// Setup popper
|
|
4580
4588
|
// https://popper.js.org/docs/v2/constructors/
|
|
4581
|
-
$scope.setupPopper = function() {
|
|
4589
|
+
$scope.setupPopper = function () {
|
|
4582
4590
|
var button = $element[0].getElementsByClassName('nice-search-button')[0];
|
|
4583
4591
|
var tooltip = $element[0].getElementsByClassName('nice-search-dropdown-wrapper')[0];
|
|
4584
4592
|
$scope.popper = Popper.createPopper(button, tooltip, {
|
|
@@ -4596,13 +4604,13 @@ angular.module('niceElements')
|
|
|
4596
4604
|
enabled: true,
|
|
4597
4605
|
phase: "beforeWrite",
|
|
4598
4606
|
requires: ["computeStyles"],
|
|
4599
|
-
fn: function(e) {
|
|
4607
|
+
fn: function (e) {
|
|
4600
4608
|
var state = e.state;
|
|
4601
4609
|
state.styles.popper.width = state.rects.reference.width + "px";
|
|
4602
4610
|
},
|
|
4603
|
-
effect: function(e) {
|
|
4611
|
+
effect: function (e) {
|
|
4604
4612
|
var state = e.state;
|
|
4605
|
-
state.elements.popper.style.width = state.elements.reference.offsetWidth
|
|
4613
|
+
state.elements.popper.style.width = state.elements.reference.offsetWidth + "px";
|
|
4606
4614
|
}
|
|
4607
4615
|
}
|
|
4608
4616
|
],
|
|
@@ -4611,10 +4619,11 @@ angular.module('niceElements')
|
|
|
4611
4619
|
|
|
4612
4620
|
$timeout(function () {
|
|
4613
4621
|
$scope.setupPopper();
|
|
4614
|
-
})
|
|
4615
|
-
|
|
4622
|
+
});
|
|
4623
|
+
|
|
4624
|
+
|
|
4616
4625
|
// ------------------- On focus -------------------
|
|
4617
|
-
$scope.onFocus = function() {
|
|
4626
|
+
$scope.onFocus = function () {
|
|
4618
4627
|
if ($scope.showDropdown && $scope.results.length == 0) {
|
|
4619
4628
|
$scope.getData($scope.model);
|
|
4620
4629
|
}
|
|
@@ -4626,23 +4635,29 @@ angular.module('niceElements')
|
|
|
4626
4635
|
};
|
|
4627
4636
|
|
|
4628
4637
|
|
|
4638
|
+
// ------------------- On blur -------------------
|
|
4639
|
+
$scope.onBlur = function () {
|
|
4640
|
+
$scope.close();
|
|
4641
|
+
};
|
|
4642
|
+
|
|
4643
|
+
|
|
4629
4644
|
// ------------------- On focus -------------------
|
|
4630
|
-
$scope.open = function() {
|
|
4645
|
+
$scope.open = function () {
|
|
4631
4646
|
$scope.isOpen = true;
|
|
4632
|
-
$timeout(function() {
|
|
4647
|
+
$timeout(function () {
|
|
4633
4648
|
if ($scope.popper) $scope.popper.update();
|
|
4634
4649
|
});
|
|
4635
4650
|
};
|
|
4636
4651
|
|
|
4637
4652
|
|
|
4638
4653
|
// ------------------- On blur -------------------
|
|
4639
|
-
$scope.close = function() {
|
|
4654
|
+
$scope.close = function () {
|
|
4640
4655
|
$scope.isOpen = false;
|
|
4641
4656
|
|
|
4642
4657
|
var input = $element[0].getElementsByTagName('input')[0];
|
|
4643
4658
|
if (input) input.blur();
|
|
4644
4659
|
|
|
4645
|
-
$timeout(function() {
|
|
4660
|
+
$timeout(function () {
|
|
4646
4661
|
$scope.popper.update();
|
|
4647
4662
|
})
|
|
4648
4663
|
};
|
|
@@ -4654,7 +4669,7 @@ angular.module('niceElements')
|
|
|
4654
4669
|
$timeout.cancel($scope.debounce);
|
|
4655
4670
|
}
|
|
4656
4671
|
|
|
4657
|
-
$scope.debounce = $timeout(function() {
|
|
4672
|
+
$scope.debounce = $timeout(function () {
|
|
4658
4673
|
if ($scope.onChange) $scope.onChange({ model: $scope.model });
|
|
4659
4674
|
$scope.getData($scope.model);
|
|
4660
4675
|
}, $scope.debounceTime);
|
|
@@ -4662,14 +4677,14 @@ angular.module('niceElements')
|
|
|
4662
4677
|
|
|
4663
4678
|
|
|
4664
4679
|
// ------------------- Get data -------------------
|
|
4665
|
-
$scope.getData = function(keywords) {
|
|
4680
|
+
$scope.getData = function (keywords) {
|
|
4666
4681
|
if ($scope.refreshFunction != null) {
|
|
4667
4682
|
$scope.loading = true;
|
|
4668
4683
|
$scope.requestNumber += 1;
|
|
4669
4684
|
var requestNumber = angular.copy($scope.requestNumber);
|
|
4670
|
-
$scope.refreshFunction(keywords).then(function(results) {
|
|
4671
|
-
if ($scope.requestNumber == requestNumber) {
|
|
4672
|
-
$timeout(function() {
|
|
4685
|
+
$scope.refreshFunction(keywords).then(function (results) {
|
|
4686
|
+
if ($scope.requestNumber == requestNumber) {
|
|
4687
|
+
$timeout(function () {
|
|
4673
4688
|
$scope.open();
|
|
4674
4689
|
$scope.loading = false;
|
|
4675
4690
|
|
|
@@ -4681,7 +4696,7 @@ angular.module('niceElements')
|
|
|
4681
4696
|
}
|
|
4682
4697
|
});
|
|
4683
4698
|
}
|
|
4684
|
-
}, function(error) {
|
|
4699
|
+
}, function (error) {
|
|
4685
4700
|
$scope.loading = false;
|
|
4686
4701
|
$scope.close();
|
|
4687
4702
|
});
|
|
@@ -4693,7 +4708,7 @@ angular.module('niceElements')
|
|
|
4693
4708
|
|
|
4694
4709
|
|
|
4695
4710
|
// ------------------------ If search button is clicked set focus or make request ------------------------
|
|
4696
|
-
$scope.search = function() {
|
|
4711
|
+
$scope.search = function () {
|
|
4697
4712
|
if (!$scope.isDisabled) {
|
|
4698
4713
|
if ($scope.showDropdown) {
|
|
4699
4714
|
$scope.updateSearch();
|
|
@@ -4720,7 +4735,7 @@ angular.module('niceElements')
|
|
|
4720
4735
|
|
|
4721
4736
|
|
|
4722
4737
|
// ----------------------------------- Scroll to hover -----------------------------------
|
|
4723
|
-
$scope.scrollToHover = function(notSmooth) {
|
|
4738
|
+
$scope.scrollToHover = function (notSmooth) {
|
|
4724
4739
|
var dropdownMenu = $element[0].getElementsByClassName("nice-dropdown")[0];
|
|
4725
4740
|
var hoverItem = dropdownMenu.getElementsByClassName("active")[0];
|
|
4726
4741
|
if (hoverItem) {
|
|
@@ -4739,10 +4754,10 @@ angular.module('niceElements')
|
|
|
4739
4754
|
// Arrow Up
|
|
4740
4755
|
if (event.keyCode == 38) {
|
|
4741
4756
|
event.preventDefault();
|
|
4742
|
-
$timeout(function() {
|
|
4743
|
-
if (
|
|
4757
|
+
$timeout(function () {
|
|
4758
|
+
if ($scope.selectedIndex > 0) {
|
|
4744
4759
|
$scope.selectedIndex -= 1;
|
|
4745
|
-
$timeout(function() {
|
|
4760
|
+
$timeout(function () {
|
|
4746
4761
|
$scope.scrollToHover();
|
|
4747
4762
|
});
|
|
4748
4763
|
}
|
|
@@ -4752,10 +4767,10 @@ angular.module('niceElements')
|
|
|
4752
4767
|
// Arrow Down
|
|
4753
4768
|
if (event.keyCode == 40) {
|
|
4754
4769
|
event.preventDefault();
|
|
4755
|
-
$timeout(function() {
|
|
4770
|
+
$timeout(function () {
|
|
4756
4771
|
if ($scope.results && $scope.selectedIndex < $scope.results.length - 1) {
|
|
4757
4772
|
$scope.selectedIndex += 1;
|
|
4758
|
-
$timeout(function() {
|
|
4773
|
+
$timeout(function () {
|
|
4759
4774
|
$scope.scrollToHover();
|
|
4760
4775
|
});
|
|
4761
4776
|
}
|
|
@@ -4765,14 +4780,14 @@ angular.module('niceElements')
|
|
|
4765
4780
|
// Enter
|
|
4766
4781
|
if (event.keyCode == 13) {
|
|
4767
4782
|
event.preventDefault();
|
|
4768
|
-
$timeout(function() {
|
|
4783
|
+
$timeout(function () {
|
|
4769
4784
|
$scope.selectItem($scope.results[$scope.selectedIndex], $scope.selectedIndex);
|
|
4770
4785
|
});
|
|
4771
4786
|
}
|
|
4772
4787
|
|
|
4773
4788
|
// Escape
|
|
4774
4789
|
if (event.keyCode == 27) {
|
|
4775
|
-
$timeout(function() {
|
|
4790
|
+
$timeout(function () {
|
|
4776
4791
|
$scope.close();
|
|
4777
4792
|
});
|
|
4778
4793
|
}
|
|
@@ -5001,8 +5016,8 @@ angular.module('niceElements')
|
|
|
5001
5016
|
* @description
|
|
5002
5017
|
* # niceUpload
|
|
5003
5018
|
*/
|
|
5004
|
-
|
|
5005
|
-
|
|
5019
|
+
angular.module('niceElements')
|
|
5020
|
+
.directive('niceUpload', function ($timeout, gettextCatalog) {
|
|
5006
5021
|
return {
|
|
5007
5022
|
restrict: 'E',
|
|
5008
5023
|
replace: true,
|
|
@@ -5025,7 +5040,7 @@ angular.module('niceElements')
|
|
|
5025
5040
|
help: '@'
|
|
5026
5041
|
},
|
|
5027
5042
|
|
|
5028
|
-
link: function(scope, element, attrs){
|
|
5043
|
+
link: function (scope, element, attrs) {
|
|
5029
5044
|
if (!attrs.title) { attrs.title = ''; }
|
|
5030
5045
|
if (!attrs.text) { attrs.text = gettextCatalog.getString('Click to upload file', null, 'Nice'); }
|
|
5031
5046
|
if (!attrs.fieldWidth) { attrs.fieldWidth = 'col-sm-8'; }
|
|
@@ -5033,17 +5048,46 @@ angular.module('niceElements')
|
|
|
5033
5048
|
attrs.noMargin = angular.isDefined(attrs.noMargin);
|
|
5034
5049
|
var maxImageSize = 1000000; // 1MB
|
|
5035
5050
|
|
|
5036
|
-
|
|
5051
|
+
scope.startDragging = function () { $timeout(function () { scope.dragging = true; }); }
|
|
5052
|
+
scope.endDragging = function () { $timeout(function () { scope.dragging = false; }); }
|
|
5053
|
+
scope.startDraggingGlobal = function () { $timeout(function () { scope.draggingGlobal = true; }); }
|
|
5054
|
+
scope.endDraggingGlobal = function () { $timeout(function () { scope.dragging = false; scope.draggingGlobal = false; }); }
|
|
5055
|
+
|
|
5056
|
+
scope.dragging = false;
|
|
5057
|
+
scope.draggingGlobal = false;
|
|
5058
|
+
var inputElement = element[0].querySelector(".input-file");
|
|
5059
|
+
// document.addEventListener("dragenter", scope.startDraggingGlobal);
|
|
5060
|
+
// document.addEventListener("drop", scope.endDraggingGlobal);
|
|
5061
|
+
// document.addEventListener("dragend", scope.endDraggingGlobal);
|
|
5062
|
+
// document.addEventListener("mouseleave", scope.endDraggingGlobal);
|
|
5063
|
+
// document.addEventListener("dragleave", scope.endDragging);
|
|
5064
|
+
inputElement.addEventListener("dragenter", scope.startDragging);
|
|
5065
|
+
inputElement.addEventListener("dragleave", scope.endDragging);
|
|
5066
|
+
inputElement.addEventListener("dragend", scope.endDraggingGlobal);
|
|
5067
|
+
inputElement.addEventListener("drop", scope.endDraggingGlobal);
|
|
5068
|
+
|
|
5069
|
+
scope.$on('$destroy', function () {
|
|
5070
|
+
// document.removeEventListener("dragenter", scope.startDraggingGlobal);
|
|
5071
|
+
// document.removeEventListener("drop", scope.endDraggingGlobal);
|
|
5072
|
+
// document.removeEventListener("dragend", scope.endDraggingGlobal);
|
|
5073
|
+
// document.removeEventListener("mouseleave", scope.endDraggingGlobal);
|
|
5074
|
+
// document.removeEventListener("dragleave", scope.endDraggingGlobal);
|
|
5075
|
+
inputElement.removeEventListener("dragenter", scope.startDragging);
|
|
5076
|
+
inputElement.removeEventListener("dragleave", scope.endDragging);
|
|
5077
|
+
inputElement.removeEventListener("dragend", scope.endDraggingGlobal);
|
|
5078
|
+
inputElement.removeEventListener("drop", scope.endDraggingGlobal);
|
|
5079
|
+
});
|
|
5037
5080
|
|
|
5081
|
+
|
|
5082
|
+
element.bind("change", function (changeEvent) {
|
|
5038
5083
|
if (scope.callbackUrl != undefined) {
|
|
5039
5084
|
scope.callbackUrl(URL.createObjectURL(changeEvent.target.files[0]));
|
|
5040
5085
|
}
|
|
5041
5086
|
|
|
5042
5087
|
$timeout(function () {
|
|
5043
|
-
var inputObj = changeEvent.target;
|
|
5044
|
-
|
|
5045
5088
|
scope.loading = true;
|
|
5046
5089
|
scope.error = null;
|
|
5090
|
+
var inputObj = changeEvent.target;
|
|
5047
5091
|
var reader = new FileReader();
|
|
5048
5092
|
|
|
5049
5093
|
if (inputObj.files) {
|
|
@@ -5051,44 +5095,47 @@ angular.module('niceElements')
|
|
|
5051
5095
|
var fileSize = inputObj.files[0].size; // in bytes
|
|
5052
5096
|
|
|
5053
5097
|
reader.onload = function (event) {
|
|
5054
|
-
$timeout(function(){
|
|
5098
|
+
$timeout(function () {
|
|
5055
5099
|
// file size must be smaller than 1MB.
|
|
5056
|
-
if (fileSize
|
|
5057
|
-
|
|
5058
|
-
|
|
5059
|
-
|
|
5060
|
-
|
|
5061
|
-
|
|
5062
|
-
|
|
5063
|
-
|
|
5100
|
+
if (fileSize > maxImageSize) {
|
|
5101
|
+
scope.error = gettextCatalog.getString("File must be smaller than 1MB", null, "Nice");
|
|
5102
|
+
scope.loading = false;
|
|
5103
|
+
scope.imageSource = null;
|
|
5104
|
+
return;
|
|
5105
|
+
}
|
|
5106
|
+
|
|
5107
|
+
if (scope.callbackFunction != undefined) {
|
|
5108
|
+
scope.loading = false;
|
|
5109
|
+
scope.imageSource = null;
|
|
5110
|
+
scope.callbackFunction(event.target.result);
|
|
5111
|
+
scope.text = inputObj.files[0].name;
|
|
5112
|
+
scope.form.$setDirty();
|
|
5113
|
+
}
|
|
5064
5114
|
|
|
5065
|
-
|
|
5115
|
+
if (scope.callbackFile != undefined) {
|
|
5116
|
+
scope.loading = false;
|
|
5117
|
+
scope.text = inputObj.files[0].name;
|
|
5118
|
+
scope.callbackFile(inputObj.files[0]);
|
|
5119
|
+
scope.form.$setDirty();
|
|
5120
|
+
}
|
|
5121
|
+
|
|
5122
|
+
if (scope.uploadFunction != undefined) {
|
|
5123
|
+
scope.uploadFunction(inputObj.files[0]).then(function (response) {
|
|
5066
5124
|
scope.loading = false;
|
|
5067
|
-
scope.
|
|
5068
|
-
scope.
|
|
5125
|
+
scope.imageSource = event.target.result;
|
|
5126
|
+
scope.model = response.data.url;
|
|
5069
5127
|
scope.form.$setDirty();
|
|
5070
|
-
}
|
|
5071
|
-
|
|
5072
|
-
|
|
5073
|
-
scope.
|
|
5074
|
-
|
|
5075
|
-
|
|
5076
|
-
scope.model = response.data.url;
|
|
5077
|
-
scope.form.$setDirty();
|
|
5078
|
-
}, function (error) {
|
|
5079
|
-
// Handle upload function error
|
|
5080
|
-
scope.error = error;
|
|
5081
|
-
scope.loading = false;
|
|
5082
|
-
scope.imageSource = null;
|
|
5083
|
-
});
|
|
5084
|
-
} else {
|
|
5085
|
-
// console.error("No upload function set!");
|
|
5086
|
-
}
|
|
5128
|
+
}, function (error) {
|
|
5129
|
+
// Handle upload function error
|
|
5130
|
+
scope.error = error;
|
|
5131
|
+
scope.loading = false;
|
|
5132
|
+
scope.imageSource = null;
|
|
5133
|
+
});
|
|
5087
5134
|
} else {
|
|
5088
|
-
//
|
|
5089
|
-
|
|
5090
|
-
|
|
5091
|
-
|
|
5135
|
+
// console.error("No upload function set!");
|
|
5136
|
+
if (event.target.result.substring(0, 10) == "data:image") {
|
|
5137
|
+
scope.imageSource = event.target.result;
|
|
5138
|
+
}
|
|
5092
5139
|
}
|
|
5093
5140
|
});
|
|
5094
5141
|
};
|
|
@@ -5109,8 +5156,8 @@ angular.module('niceElements')
|
|
|
5109
5156
|
});
|
|
5110
5157
|
},
|
|
5111
5158
|
|
|
5112
|
-
controller: function($scope) {
|
|
5113
|
-
$scope.$watch("model", function(value){
|
|
5159
|
+
controller: function ($scope) {
|
|
5160
|
+
$scope.$watch("model", function (value) {
|
|
5114
5161
|
$scope.imageSource = angular.copy($scope.model);
|
|
5115
5162
|
});
|
|
5116
5163
|
}
|
|
@@ -5297,9 +5344,9 @@ angular.module('niceElements').run(['$templateCache', function($templateCache) {
|
|
|
5297
5344
|
"<div class=\"nice-calendar-wrapper\">\n" +
|
|
5298
5345
|
"<div class=\"nice-calendar-weeks\">\n" +
|
|
5299
5346
|
"<div class=\"header\">\n" +
|
|
5300
|
-
"<
|
|
5347
|
+
"<button class=\"btn\" ng-click=\"previous()\" title=\"{{ 'Previous month' | translate:'Nice' }}\"><i class=\"fa fa-angle-left\"></i></button>\n" +
|
|
5301
5348
|
"<span title=\"{{ month.format('M.YYYY' )}}\">{{ month.format(\"MMMM, YYYY\" )}}</span>\n" +
|
|
5302
|
-
"<
|
|
5349
|
+
"<button class=\"btn\" ng-click=\"next()\" title=\"{{ 'Next month' | translate:'Nice' }}\"><i class=\"fa fa-angle-right\"></i></button>\n" +
|
|
5303
5350
|
"</div>\n" +
|
|
5304
5351
|
"<div class=\"week names\">\n" +
|
|
5305
5352
|
"<span class=\"day\" translate translate-context=\"Nice\">Mon</span>\n" +
|
|
@@ -5311,7 +5358,7 @@ angular.module('niceElements').run(['$templateCache', function($templateCache) {
|
|
|
5311
5358
|
"<span class=\"day weekend\" translate translate-context=\"Nice\">Sun</span>\n" +
|
|
5312
5359
|
"</div>\n" +
|
|
5313
5360
|
"<div class=\"week\" ng-repeat=\"week in weeks\">\n" +
|
|
5314
|
-
"<
|
|
5361
|
+
"<button class=\"day\" title=\"{{ day.date.format('D.M.YYYY') }}\" ng-class=\"{\n" +
|
|
5315
5362
|
" today: day.isToday,\n" +
|
|
5316
5363
|
" 'different-month': !day.isCurrentMonth,\n" +
|
|
5317
5364
|
" 'start-selected': isSameDay(day.date, startDate),\n" +
|
|
@@ -5328,7 +5375,7 @@ angular.module('niceElements').run(['$templateCache', function($templateCache) {
|
|
|
5328
5375
|
" \" ng-click=\"select(day)\" ng-repeat=\"day in week.days\">\n" +
|
|
5329
5376
|
"{{ day.number }}\n" +
|
|
5330
5377
|
"<p class=\"popup\" ng-if=\"!hideHover\">{{ popupText }}</p>\n" +
|
|
5331
|
-
"</
|
|
5378
|
+
"</button>\n" +
|
|
5332
5379
|
"</div>\n" +
|
|
5333
5380
|
"</div>\n" +
|
|
5334
5381
|
"<div class=\"nice-calendar-time\" ng-if=\"time\">\n" +
|
|
@@ -5371,11 +5418,11 @@ angular.module('niceElements').run(['$templateCache', function($templateCache) {
|
|
|
5371
5418
|
|
|
5372
5419
|
$templateCache.put('src/components/nice-checkbox/nice-checkbox.html',
|
|
5373
5420
|
"<div class=\"nice-component nice-checkbox\" ng-class=\"{ 'checked': model, 'margin-bottom-0' : noMargin }\" ng-click=\"toggle()\">\n" +
|
|
5374
|
-
"<
|
|
5421
|
+
"<button class=\"btn checkbox\">\n" +
|
|
5375
5422
|
"<svg class=\"check\" viewBox=\"-281 373 48 48\">\n" +
|
|
5376
5423
|
"<path class=\"check-stroke\" d=\"M-273.2,398.2l10,9.9 l22.4-22.3\"></path>\n" +
|
|
5377
5424
|
"</svg>\n" +
|
|
5378
|
-
"</
|
|
5425
|
+
"</button>\n" +
|
|
5379
5426
|
"<div ng-if=\"title\" class=\"message\">{{ title }}</div>\n" +
|
|
5380
5427
|
"</div>"
|
|
5381
5428
|
);
|
|
@@ -5391,7 +5438,7 @@ angular.module('niceElements').run(['$templateCache', function($templateCache) {
|
|
|
5391
5438
|
"<div class=\"nice-field col-xs-12\" ng-class=\"fieldWidth ? fieldWidth : 'col-sm-8'\">\n" +
|
|
5392
5439
|
"<ul class=\"list-unstyled\" ng-class=\"{ 'disabled': isDisabled }\">\n" +
|
|
5393
5440
|
"<li ng-repeat=\"item in internalList\" ng-class=\"{ 'selected' : isItemSelected(item) }\" ng-click=\"toggle(item)\">\n" +
|
|
5394
|
-
"<
|
|
5441
|
+
"<button class=\"choice-checkbox\" ng-class=\"{'circle' : !multiple }\"><i class=\"fa fa-check\"></i></button>\n" +
|
|
5395
5442
|
"<div ng-transclude class=\"choice-label\">{{ getLabel(item) }}</div>\n" +
|
|
5396
5443
|
"</li>\n" +
|
|
5397
5444
|
"</ul>\n" +
|
|
@@ -5452,7 +5499,7 @@ angular.module('niceElements').run(['$templateCache', function($templateCache) {
|
|
|
5452
5499
|
"</div>\n" +
|
|
5453
5500
|
"<div ng-class=\"{ 'nice-date-dropdown-wrapper': !inline }\">\n" +
|
|
5454
5501
|
"<div ng-class=\"{ 'nice-date-dropdown': !inline }\" ng-if=\"inline || isOpen\">\n" +
|
|
5455
|
-
"<div class=\"nice-date-date\" ng-class=\"{ 'with-time': time }\">\n" +
|
|
5502
|
+
"<div class=\"nice-date-date\" ng-class=\"{ 'with-time': time }\" role=\"grid\">\n" +
|
|
5456
5503
|
"<div class=\"nice-date-header\">\n" +
|
|
5457
5504
|
"<span>\n" +
|
|
5458
5505
|
"<select class=\"year-picker\" ng-model=\"innerDate.year\" ng-change=\"handleDateChange()\" ng-options=\"year for year in years\">\n" +
|
|
@@ -5460,22 +5507,24 @@ angular.module('niceElements').run(['$templateCache', function($templateCache) {
|
|
|
5460
5507
|
"<select class=\"month-picker\" ng-model=\"innerDate.month\" ng-change=\"handleDateChange()\" ng-options=\"month.value as month.name for month in months\">\n" +
|
|
5461
5508
|
"</select>\n" +
|
|
5462
5509
|
"</span>\n" +
|
|
5463
|
-
"<
|
|
5464
|
-
"<
|
|
5465
|
-
"<
|
|
5510
|
+
"<button class=\"btn btn-default-naked\" ng-click=\"previous()\"><i class=\"fa fa-angle-left\"></i></button>\n" +
|
|
5511
|
+
"<button class=\"btn btn-default-naked\" ng-click=\"today()\"><i class=\"fa fa-circle\"></i></button>\n" +
|
|
5512
|
+
"<button class=\"btn btn-default-naked\" ng-click=\"next()\"><i class=\"fa fa-angle-right\"></i></button>\n" +
|
|
5466
5513
|
"</div>\n" +
|
|
5467
5514
|
"<div class=\"nice-date-week names\">\n" +
|
|
5468
5515
|
"<span class=\"nice-date-day\" ng-class=\"{ 'weekend': $index == 6 || $index == 5 }\" ng-repeat=\"day in weekdays\">{{ day }}</span>\n" +
|
|
5469
5516
|
"</div>\n" +
|
|
5470
|
-
"<div class=\"nice-date-week\" ng-repeat=\"week in weeks\">\n" +
|
|
5471
|
-
"<
|
|
5517
|
+
"<div class=\"nice-date-week\" role=\"row\" ng-repeat=\"week in weeks\">\n" +
|
|
5518
|
+
"<button class=\"nice-date-day\" role=\"gridcell\" title=\"{{ day.value }}\" ng-class=\"{\n" +
|
|
5472
5519
|
" 'today': day.isToday,\n" +
|
|
5473
5520
|
" 'different-month': !day.isCurrentMonth,\n" +
|
|
5474
5521
|
" 'selected': isSameDay(model, day.date),\n" +
|
|
5475
5522
|
" 'weekend': day.isWeekday,\n" +
|
|
5476
5523
|
" 'disabled': day.isDisabled,\n" +
|
|
5477
5524
|
" 'between': isBetween(day.date, model, nextDate)\n" +
|
|
5478
|
-
" }\" ng-click=\"select(day)\" ng-repeat=\"day in week.days\"
|
|
5525
|
+
" }\" ng-click=\"select(day)\" ng-repeat=\"day in week.days\">\n" +
|
|
5526
|
+
"{{ day.number }}\n" +
|
|
5527
|
+
"</button>\n" +
|
|
5479
5528
|
"</div>\n" +
|
|
5480
5529
|
"</div>\n" +
|
|
5481
5530
|
"<div class=\"nice-date-time\" ng-if=\"time\">\n" +
|
|
@@ -5575,12 +5624,12 @@ angular.module('niceElements').run(['$templateCache', function($templateCache) {
|
|
|
5575
5624
|
"<div class=\"nice-field col-xs-12\" ng-class=\"[fieldWidth ? fieldWidth : 'col-sm-8', { 'nice-disabled': isDisabled }]\">\n" +
|
|
5576
5625
|
"<div ng-form=\"formDatetimeRangePicker\"></div>\n" +
|
|
5577
5626
|
"<div class=\"dropdown\">\n" +
|
|
5578
|
-
"<
|
|
5627
|
+
"<div class=\"dropdown-toggle\" id=\"dropdown{{randNum}}\" role=\"button\" ng-click=\"openDtpRange()\">\n" +
|
|
5579
5628
|
"<div class=\"input-group\">\n" +
|
|
5580
5629
|
"<input type=\"text\" class=\"form-control\" value=\"{{value}}\" ng-click=\"openDtpRange()\">\n" +
|
|
5581
5630
|
"<span class=\"input-group-addon clickable\"><i class=\"fa\" ng-class=\"{'fa-clock-o': date=='false', 'fa-calendar': date!='false'}\"></i></span>\n" +
|
|
5582
5631
|
"</div>\n" +
|
|
5583
|
-
"</
|
|
5632
|
+
"</div>\n" +
|
|
5584
5633
|
"</div>\n" +
|
|
5585
5634
|
"<div class=\"dtp-range-wrapper\" ng-show=\"showDtpRange\">\n" +
|
|
5586
5635
|
"<div class=\"dtp-layer\">\n" +
|
|
@@ -5915,11 +5964,11 @@ angular.module('niceElements').run(['$templateCache', function($templateCache) {
|
|
|
5915
5964
|
"<div class=\"nice-field col-xs-12\" ng-class=\"fieldWidth ? fieldWidth : 'col-sm-8'\">\n" +
|
|
5916
5965
|
"<div class=\"input-group\" ng-class=\"{'has-warning': !disabled && niceNumberForm.$invalid && niceNumberForm.$dirty}\">\n" +
|
|
5917
5966
|
"<span class=\"input-group-btn\">\n" +
|
|
5918
|
-
"<button class=\"btn btn-default\" type=\"button\" ng-disabled=\"!canSubstract\" ng-click=\"subtract()\">-</button>\n" +
|
|
5967
|
+
"<button class=\"btn btn-default\" type=\"button\" ng-disabled=\"!canSubstract\" ng-click=\"subtract()\" tabindex=\"-1\">-</button>\n" +
|
|
5919
5968
|
"</span>\n" +
|
|
5920
5969
|
"<input type=\"number\" step=\"{{ step }}\" ng-change=\"inputChanged()\" class=\"form-control\" max=\"{{ max }}\" min=\"{{ min }}\" ng-model=\"model\">\n" +
|
|
5921
5970
|
"<span class=\"input-group-btn\">\n" +
|
|
5922
|
-
"<button class=\"btn btn-default\" type=\"button\" ng-disabled=\"!canAdd\" ng-click=\"add()\">+</button>\n" +
|
|
5971
|
+
"<button class=\"btn btn-default\" type=\"button\" ng-disabled=\"!canAdd\" ng-click=\"add()\" tabindex=\"-1\">+</button>\n" +
|
|
5923
5972
|
"</span>\n" +
|
|
5924
5973
|
"</div>\n" +
|
|
5925
5974
|
"<div class=\"error-messages\" ng-if=\"niceNumberForm.$error && !hideError\" ng-class=\"{ 'floating-error': floatingError }\">\n" +
|
|
@@ -6009,17 +6058,13 @@ angular.module('niceElements').run(['$templateCache', function($templateCache) {
|
|
|
6009
6058
|
"</div>\n" +
|
|
6010
6059
|
"<div class=\"nice-field col-xs-12\" ng-class=\"[fieldWidth ? fieldWidth : 'col-sm-8', { 'nice-disabled': isDisabled }]\">\n" +
|
|
6011
6060
|
"<div class=\"input-group\">\n" +
|
|
6012
|
-
"<
|
|
6013
|
-
"<button class=\"btn btn-primary btn-left\" ng-click=\"sub()\" type=\"button\" ng-disabled=\"isDisabled\">-</button>\n" +
|
|
6014
|
-
"</span>\n" +
|
|
6061
|
+
"<button class=\"btn btn-default btn-left\" ng-click=\"sub()\" type=\"button\" ng-disabled=\"isDisabled\" tabindex=\"-1\">-</button>\n" +
|
|
6015
6062
|
"<input class=\"value form-control\" ng-model=\"model\" type=\"number\" ng-change=\"handleChange()\" ng-disabled=\"isDisabled\">\n" +
|
|
6016
|
-
"<
|
|
6017
|
-
"<button class=\"btn btn-primary btn-right\" ng-click=\"add()\" type=\"button\" ng-disabled=\"isDisabled\">+</button>\n" +
|
|
6018
|
-
"</span>\n" +
|
|
6063
|
+
"<button class=\"btn btn-default btn-right\" ng-click=\"add()\" type=\"button\" ng-disabled=\"isDisabled\" tabindex=\"-1\">+</button>\n" +
|
|
6019
6064
|
"</div>\n" +
|
|
6020
6065
|
"</div>\n" +
|
|
6021
6066
|
"</div>\n" +
|
|
6022
|
-
"</div
|
|
6067
|
+
"</div>"
|
|
6023
6068
|
);
|
|
6024
6069
|
|
|
6025
6070
|
|
|
@@ -6073,7 +6118,7 @@ angular.module('niceElements').run(['$templateCache', function($templateCache) {
|
|
|
6073
6118
|
"</div>\n" +
|
|
6074
6119
|
"<div class=\"nice-field col-xs-12\" ng-class=\"[fieldWidth ? fieldWidth : 'col-sm-8', { 'nice-disabled': isDisabled }]\" click-outside=\"close()\">\n" +
|
|
6075
6120
|
"<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" +
|
|
6076
|
-
"<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" +
|
|
6121
|
+
"<input class=\"form-control\" type=\"text\" id=\"{{ id }}\" ng-model=\"model\" placeholder=\"{{ placeholder }}\" ng-disabled=\"isDisabled\" ng-change=\"updateSearch()\" ng-focus=\"onFocus()\" ng-blur=\"onBlur()\" tabindex=\"{{ tabIndex }}\">\n" +
|
|
6077
6122
|
"<span class=\"input-group-addon clickable\" ng-click=\"onFocus()\">\n" +
|
|
6078
6123
|
"<i ng-show=\"!loading\" class=\"fa fa-search\"></i>\n" +
|
|
6079
6124
|
"<i ng-show=\"loading\" class=\"fa fa-refresh fa-spin\"></i>\n" +
|
|
@@ -7043,15 +7088,14 @@ angular.module('niceElements').run(['$templateCache', function($templateCache) {
|
|
|
7043
7088
|
"</div>\n" +
|
|
7044
7089
|
"<div class=\"nice-field col-xs-12\" ng-class=\"[fieldWidth ? fieldWidth : 'col-sm-8', { 'nice-disabled': isDisabled }]\">\n" +
|
|
7045
7090
|
"<input class=\"input-file\" type=\"file\" accept=\"{{ accept }}\" ng-model=\"file\" ng-disabled=\"isDisabled\">\n" +
|
|
7046
|
-
"<div class=\"input-area\">\n" +
|
|
7091
|
+
"<div class=\"input-area\" ng-class=\"{ 'dragging': dragging || draggingGlobal }\">\n" +
|
|
7047
7092
|
"<div class=\"middle-text\" ng-if=\"!imageSource && !loading\">\n" +
|
|
7048
|
-
"<div class=\"text\">{{ text }}</div>\n" +
|
|
7093
|
+
"<div class=\"text text-placeholder\" ng-if=\"!dragging\">{{ text }}</div>\n" +
|
|
7094
|
+
"<div class=\"text text-placeholder\" ng-if=\"dragging\" translate translate-group=\"Nice\">Drop file here</div>\n" +
|
|
7049
7095
|
"<div class=\"error\" ng-if=\"error\">{{ error }}</div>\n" +
|
|
7050
7096
|
"</div>\n" +
|
|
7051
7097
|
"<img ng-if=\"imageSource\" data-ng-src=\"{{ imageSource }}\">\n" +
|
|
7052
|
-
"
|
|
7053
|
-
"<div class=\"loading\" ng-if=\"loading\">\n" +
|
|
7054
|
-
"<nice-loader></nice-loader>\n" +
|
|
7098
|
+
"<nice-loader fulldiv=\"true\" ng-if=\"loading\"></nice-loader>\n" +
|
|
7055
7099
|
"</div>\n" +
|
|
7056
7100
|
"</div>\n" +
|
|
7057
7101
|
"</div>\n" +
|
|
@@ -7070,7 +7114,7 @@ angular.module('niceElements').run(['$templateCache', function($templateCache) {
|
|
|
7070
7114
|
"<div class=\"yesno-wrapper noselect\" ng-class=\"{ 'disabled': isDisabled }\">\n" +
|
|
7071
7115
|
"<div class=\"yesno-yes-bg\" ng-click=\"switch()\">{{ yes }}</div>\n" +
|
|
7072
7116
|
"<div class=\"yesno-no-bg\" ng-click=\"switch()\">{{ no }}</div>\n" +
|
|
7073
|
-
"<
|
|
7117
|
+
"<button class=\"yesno-button btn btn-primary\" ng-class=\"buttonClass\" ng-click=\"switch()\">{{ state }}</button>\n" +
|
|
7074
7118
|
"</div>\n" +
|
|
7075
7119
|
"</div>\n" +
|
|
7076
7120
|
"</div>\n" +
|