jsuites 4.16.10 → 4.16.11
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/dist/jsuites.basic.css +5 -0
- package/dist/jsuites.basic.js +6 -4
- package/dist/jsuites.js +29 -20
- package/package.json +1 -1
package/dist/jsuites.basic.css
CHANGED
|
@@ -900,6 +900,7 @@ div[data-before]:before {
|
|
|
900
900
|
color: #555;
|
|
901
901
|
text-decoration: none;
|
|
902
902
|
flex: 1;
|
|
903
|
+
cursor: pointer;
|
|
903
904
|
}
|
|
904
905
|
|
|
905
906
|
.jcontextmenu > div span {
|
|
@@ -910,6 +911,10 @@ div[data-before]:before {
|
|
|
910
911
|
color: #ccc;
|
|
911
912
|
}
|
|
912
913
|
|
|
914
|
+
.jcontextmenu .jcontextmenu-disabled::before {
|
|
915
|
+
color: #ccc;
|
|
916
|
+
}
|
|
917
|
+
|
|
913
918
|
.jcontextmenu > div:hover {
|
|
914
919
|
background: #ebebeb;
|
|
915
920
|
}
|
package/dist/jsuites.basic.js
CHANGED
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
|
|
18
18
|
var jSuites = {};
|
|
19
19
|
|
|
20
|
-
var Version = '4.16.
|
|
20
|
+
var Version = '4.16.11';
|
|
21
21
|
|
|
22
22
|
var Events = function() {
|
|
23
23
|
|
|
@@ -1970,12 +1970,14 @@ jSuites.calendar.toArray = function(value) {
|
|
|
1970
1970
|
|
|
1971
1971
|
// Helper to extract date from a string
|
|
1972
1972
|
jSuites.calendar.extractDateFromString = function(date, format) {
|
|
1973
|
-
|
|
1973
|
+
var o = jSuites.mask(date, { mask: format }, true);
|
|
1974
|
+
|
|
1975
|
+
// Check if in format Excel (Need difference with format date or type detected is numeric)
|
|
1976
|
+
if (date > 0 && Number(date) == date && (o.values.join("") !== o.value || o.type == "numeric")) {
|
|
1974
1977
|
var d = new Date(Math.round((date - 25569)*86400*1000));
|
|
1975
1978
|
return d.getFullYear() + "-" + jSuites.two(d.getMonth()) + "-" + jSuites.two(d.getDate()) + ' 00:00:00';
|
|
1976
1979
|
}
|
|
1977
|
-
|
|
1978
|
-
var o = jSuites.mask(date, { mask: format }, true);
|
|
1980
|
+
|
|
1979
1981
|
if (o.date[0] && o.date[1]) {
|
|
1980
1982
|
if (! o.date[2]) {
|
|
1981
1983
|
o.date[2] = 1;
|
package/dist/jsuites.js
CHANGED
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
|
|
18
18
|
var jSuites = {};
|
|
19
19
|
|
|
20
|
-
var Version = '4.16.
|
|
20
|
+
var Version = '4.16.11';
|
|
21
21
|
|
|
22
22
|
var Events = function() {
|
|
23
23
|
|
|
@@ -1981,12 +1981,14 @@ jSuites.calendar.toArray = function(value) {
|
|
|
1981
1981
|
|
|
1982
1982
|
// Helper to extract date from a string
|
|
1983
1983
|
jSuites.calendar.extractDateFromString = function(date, format) {
|
|
1984
|
-
|
|
1984
|
+
var o = jSuites.mask(date, { mask: format }, true);
|
|
1985
|
+
|
|
1986
|
+
// Check if in format Excel (Need difference with format date or type detected is numeric)
|
|
1987
|
+
if (date > 0 && Number(date) == date && (o.values.join("") !== o.value || o.type == "numeric")) {
|
|
1985
1988
|
var d = new Date(Math.round((date - 25569)*86400*1000));
|
|
1986
1989
|
return d.getFullYear() + "-" + jSuites.two(d.getMonth()) + "-" + jSuites.two(d.getDate()) + ' 00:00:00';
|
|
1987
1990
|
}
|
|
1988
|
-
|
|
1989
|
-
var o = jSuites.mask(date, { mask: format }, true);
|
|
1991
|
+
|
|
1990
1992
|
if (o.date[0] && o.date[1]) {
|
|
1991
1993
|
if (! o.date[2]) {
|
|
1992
1994
|
o.date[2] = 1;
|
|
@@ -10215,7 +10217,7 @@ jSuites.search = (function(el, options) {
|
|
|
10215
10217
|
}
|
|
10216
10218
|
|
|
10217
10219
|
obj.keyup = function(e) {
|
|
10218
|
-
if (! obj.options.searchByNode) {
|
|
10220
|
+
if (! obj.options.searchByNode && obj.options.input) {
|
|
10219
10221
|
if (obj.options.input.tagName === 'DIV') {
|
|
10220
10222
|
var terms = obj.options.input.innerText;
|
|
10221
10223
|
} else {
|
|
@@ -11479,7 +11481,7 @@ jSuites.tags = (function(el, options) {
|
|
|
11479
11481
|
}
|
|
11480
11482
|
|
|
11481
11483
|
var setFocus = function(node) {
|
|
11482
|
-
if (el.children.length
|
|
11484
|
+
if (el.children.length) {
|
|
11483
11485
|
var range = document.createRange();
|
|
11484
11486
|
var sel = window.getSelection();
|
|
11485
11487
|
if (! node) {
|
|
@@ -11540,25 +11542,27 @@ jSuites.tags = (function(el, options) {
|
|
|
11540
11542
|
*/
|
|
11541
11543
|
var filter = function() {
|
|
11542
11544
|
for (var i = 0; i < el.children.length; i++) {
|
|
11543
|
-
|
|
11544
|
-
|
|
11545
|
-
|
|
11546
|
-
|
|
11547
|
-
|
|
11545
|
+
if (el.children[i].tagName === 'DIV') {
|
|
11546
|
+
// Create label design
|
|
11547
|
+
if (!obj.getValue(i)) {
|
|
11548
|
+
el.children[i].classList.remove('jtags_label');
|
|
11549
|
+
} else {
|
|
11550
|
+
el.children[i].classList.add('jtags_label');
|
|
11548
11551
|
|
|
11549
|
-
|
|
11550
|
-
|
|
11551
|
-
|
|
11552
|
-
|
|
11553
|
-
|
|
11552
|
+
// Validation in place
|
|
11553
|
+
if (typeof (obj.options.validation) == 'function') {
|
|
11554
|
+
if (obj.getValue(i)) {
|
|
11555
|
+
if (!obj.options.validation(el.children[i], el.children[i].innerText, el.children[i].getAttribute('data-value'))) {
|
|
11556
|
+
el.children[i].classList.add('jtags_error');
|
|
11557
|
+
} else {
|
|
11558
|
+
el.children[i].classList.remove('jtags_error');
|
|
11559
|
+
}
|
|
11554
11560
|
} else {
|
|
11555
11561
|
el.children[i].classList.remove('jtags_error');
|
|
11556
11562
|
}
|
|
11557
11563
|
} else {
|
|
11558
11564
|
el.children[i].classList.remove('jtags_error');
|
|
11559
11565
|
}
|
|
11560
|
-
} else {
|
|
11561
|
-
el.children[i].classList.remove('jtags_error');
|
|
11562
11566
|
}
|
|
11563
11567
|
}
|
|
11564
11568
|
}
|
|
@@ -11569,8 +11573,10 @@ jSuites.tags = (function(el, options) {
|
|
|
11569
11573
|
var isEmpty = function() {
|
|
11570
11574
|
// Can't be empty
|
|
11571
11575
|
if (! el.innerText.trim()) {
|
|
11572
|
-
el.
|
|
11573
|
-
|
|
11576
|
+
if (! el.children.length || el.children[0].tagName === 'BR') {
|
|
11577
|
+
el.innerHTML = '';
|
|
11578
|
+
setFocus(createElement());
|
|
11579
|
+
}
|
|
11574
11580
|
} else {
|
|
11575
11581
|
el.classList.remove('jtags-empty');
|
|
11576
11582
|
}
|
|
@@ -11659,6 +11665,9 @@ jSuites.tags = (function(el, options) {
|
|
|
11659
11665
|
if (search) {
|
|
11660
11666
|
search.keydown(e);
|
|
11661
11667
|
}
|
|
11668
|
+
|
|
11669
|
+
// Verify if is empty
|
|
11670
|
+
isEmpty();
|
|
11662
11671
|
}
|
|
11663
11672
|
|
|
11664
11673
|
/**
|
package/package.json
CHANGED