jsuites 4.15.0 → 4.15.1
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/TODO.md +4 -1
- package/dist/jsuites.basic.js +43 -16
- package/dist/jsuites.css +4 -4
- package/dist/jsuites.js +42 -15
- package/dist/jsuites.layout.js +1 -0
- package/package.json +1 -1
package/TODO.md
CHANGED
package/dist/jsuites.basic.js
CHANGED
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
|
|
18
18
|
var jSuites = {};
|
|
19
19
|
|
|
20
|
-
var Version = '4.15.
|
|
20
|
+
var Version = '4.15.1';
|
|
21
21
|
|
|
22
22
|
var Events = function() {
|
|
23
23
|
|
|
@@ -2051,17 +2051,20 @@ jSuites.calendar.getDateString = function(value, options) {
|
|
|
2051
2051
|
}
|
|
2052
2052
|
|
|
2053
2053
|
// Convert to number of hours
|
|
2054
|
-
if (
|
|
2055
|
-
var result =
|
|
2056
|
-
if (
|
|
2057
|
-
|
|
2058
|
-
if (
|
|
2059
|
-
var
|
|
2060
|
-
|
|
2061
|
-
|
|
2062
|
-
|
|
2054
|
+
if (format.indexOf('[h]') >= 0) {
|
|
2055
|
+
var result = 0;
|
|
2056
|
+
if (value && jSuites.isNumeric(value)) {
|
|
2057
|
+
result = parseFloat(24 * Number(value));
|
|
2058
|
+
if (format.indexOf('mm') >= 0) {
|
|
2059
|
+
var h = (''+result).split('.');
|
|
2060
|
+
if (h[1]) {
|
|
2061
|
+
var d = 60 * parseFloat('0.' + h[1])
|
|
2062
|
+
d = parseFloat(d.toFixed(2));
|
|
2063
|
+
} else {
|
|
2064
|
+
var d = 0;
|
|
2065
|
+
}
|
|
2066
|
+
result = parseInt(h[0]) + ':' + jSuites.two(d);
|
|
2063
2067
|
}
|
|
2064
|
-
result = parseInt(h[0]) + ':' + jSuites.two(d);
|
|
2065
2068
|
}
|
|
2066
2069
|
return result;
|
|
2067
2070
|
}
|
|
@@ -3539,7 +3542,7 @@ jSuites.dropdown = (function(el, options) {
|
|
|
3539
3542
|
|
|
3540
3543
|
// Header
|
|
3541
3544
|
obj.header = document.createElement('input');
|
|
3542
|
-
obj.header.className = 'jdropdown-header';
|
|
3545
|
+
obj.header.className = 'jdropdown-header jss_object';
|
|
3543
3546
|
obj.header.type = 'text';
|
|
3544
3547
|
obj.header.setAttribute('autocomplete', 'off');
|
|
3545
3548
|
obj.header.onfocus = function() {
|
|
@@ -7111,6 +7114,31 @@ jSuites.mask = (function() {
|
|
|
7111
7114
|
return v;
|
|
7112
7115
|
}
|
|
7113
7116
|
|
|
7117
|
+
var extractDate = function() {
|
|
7118
|
+
var v = '';
|
|
7119
|
+
if (! (this.date[0] && this.date[1] && this.date[2]) && (this.date[3] || this.date[4])) {
|
|
7120
|
+
if (this.mask.toLowerCase().indexOf('[h]') !== -1) {
|
|
7121
|
+
v = parseInt(this.date[3]);
|
|
7122
|
+
} else {
|
|
7123
|
+
v = parseInt(this.date[3]) % 24;
|
|
7124
|
+
}
|
|
7125
|
+
if (this.date[4]) {
|
|
7126
|
+
v += parseFloat(this.date[4] / 60);
|
|
7127
|
+
}
|
|
7128
|
+
v /= 24;
|
|
7129
|
+
} else if (this.date[0] || this.date[1] || this.date[2] || this.date[3] || this.date[4] || this.date[5]) {
|
|
7130
|
+
if (this.date[0] && this.date[1] && ! this.date[2]) {
|
|
7131
|
+
this.date[2] = 1;
|
|
7132
|
+
}
|
|
7133
|
+
var t = jSuites.calendar.now(this.date);
|
|
7134
|
+
v = jSuites.calendar.dateToNum(t);
|
|
7135
|
+
if (this.date[4]) {
|
|
7136
|
+
v += parseFloat(this.date[4] / 60);
|
|
7137
|
+
}
|
|
7138
|
+
}
|
|
7139
|
+
return v;
|
|
7140
|
+
}
|
|
7141
|
+
|
|
7114
7142
|
var isBlank = function(v) {
|
|
7115
7143
|
return v === null || v === '' || v === undefined ? true : false;
|
|
7116
7144
|
}
|
|
@@ -8279,7 +8307,9 @@ jSuites.mask = (function() {
|
|
|
8279
8307
|
var t = options.mask.split(';');
|
|
8280
8308
|
options.mask = t[0];
|
|
8281
8309
|
}
|
|
8310
|
+
options.mask = options.mask.replace(new RegExp(/\[h]/),'|h|');
|
|
8282
8311
|
options.mask = options.mask.replace(new RegExp(/\[.*?\]/),'');
|
|
8312
|
+
options.mask = options.mask.replace(new RegExp(/\|h\|/),'[h]');
|
|
8283
8313
|
}
|
|
8284
8314
|
|
|
8285
8315
|
// Get decimal
|
|
@@ -8306,9 +8336,7 @@ jSuites.mask = (function() {
|
|
|
8306
8336
|
if (jSuites.isNumeric(v)) {
|
|
8307
8337
|
value = v;
|
|
8308
8338
|
} else {
|
|
8309
|
-
var value =
|
|
8310
|
-
var t = jSuites.calendar.now(o.date);
|
|
8311
|
-
value = jSuites.calendar.dateToNum(t);
|
|
8339
|
+
var value = extractDate.call(o);
|
|
8312
8340
|
}
|
|
8313
8341
|
} else {
|
|
8314
8342
|
var value = Extract.call(options, v);
|
|
@@ -8383,7 +8411,6 @@ jSuites.mask = (function() {
|
|
|
8383
8411
|
if (t) {
|
|
8384
8412
|
value = t;
|
|
8385
8413
|
}
|
|
8386
|
-
|
|
8387
8414
|
if (options.mask && fullMask) {
|
|
8388
8415
|
fillWithBlanks = true;
|
|
8389
8416
|
}
|
package/dist/jsuites.css
CHANGED
|
@@ -1726,10 +1726,10 @@ div[data-before]:before {
|
|
|
1726
1726
|
.jmodal_title[data-icon]:before {
|
|
1727
1727
|
content: attr(data-icon);
|
|
1728
1728
|
font-family: 'Material Icons' !important;
|
|
1729
|
-
width:
|
|
1730
|
-
height:
|
|
1731
|
-
font-size:
|
|
1732
|
-
padding-right:
|
|
1729
|
+
width: 48px;
|
|
1730
|
+
height: 48px;
|
|
1731
|
+
font-size: 48px;
|
|
1732
|
+
padding-right: 10px;
|
|
1733
1733
|
}
|
|
1734
1734
|
|
|
1735
1735
|
.jmodal_content {
|
package/dist/jsuites.js
CHANGED
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
|
|
18
18
|
var jSuites = {};
|
|
19
19
|
|
|
20
|
-
var Version = '4.15.
|
|
20
|
+
var Version = '4.15.1';
|
|
21
21
|
|
|
22
22
|
var Events = function() {
|
|
23
23
|
|
|
@@ -2062,17 +2062,20 @@ jSuites.calendar.getDateString = function(value, options) {
|
|
|
2062
2062
|
}
|
|
2063
2063
|
|
|
2064
2064
|
// Convert to number of hours
|
|
2065
|
-
if (
|
|
2066
|
-
var result =
|
|
2067
|
-
if (
|
|
2068
|
-
|
|
2069
|
-
if (
|
|
2070
|
-
var
|
|
2071
|
-
|
|
2072
|
-
|
|
2073
|
-
|
|
2065
|
+
if (format.indexOf('[h]') >= 0) {
|
|
2066
|
+
var result = 0;
|
|
2067
|
+
if (value && jSuites.isNumeric(value)) {
|
|
2068
|
+
result = parseFloat(24 * Number(value));
|
|
2069
|
+
if (format.indexOf('mm') >= 0) {
|
|
2070
|
+
var h = (''+result).split('.');
|
|
2071
|
+
if (h[1]) {
|
|
2072
|
+
var d = 60 * parseFloat('0.' + h[1])
|
|
2073
|
+
d = parseFloat(d.toFixed(2));
|
|
2074
|
+
} else {
|
|
2075
|
+
var d = 0;
|
|
2076
|
+
}
|
|
2077
|
+
result = parseInt(h[0]) + ':' + jSuites.two(d);
|
|
2074
2078
|
}
|
|
2075
|
-
result = parseInt(h[0]) + ':' + jSuites.two(d);
|
|
2076
2079
|
}
|
|
2077
2080
|
return result;
|
|
2078
2081
|
}
|
|
@@ -7536,6 +7539,31 @@ jSuites.mask = (function() {
|
|
|
7536
7539
|
return v;
|
|
7537
7540
|
}
|
|
7538
7541
|
|
|
7542
|
+
var extractDate = function() {
|
|
7543
|
+
var v = '';
|
|
7544
|
+
if (! (this.date[0] && this.date[1] && this.date[2]) && (this.date[3] || this.date[4])) {
|
|
7545
|
+
if (this.mask.toLowerCase().indexOf('[h]') !== -1) {
|
|
7546
|
+
v = parseInt(this.date[3]);
|
|
7547
|
+
} else {
|
|
7548
|
+
v = parseInt(this.date[3]) % 24;
|
|
7549
|
+
}
|
|
7550
|
+
if (this.date[4]) {
|
|
7551
|
+
v += parseFloat(this.date[4] / 60);
|
|
7552
|
+
}
|
|
7553
|
+
v /= 24;
|
|
7554
|
+
} else if (this.date[0] || this.date[1] || this.date[2] || this.date[3] || this.date[4] || this.date[5]) {
|
|
7555
|
+
if (this.date[0] && this.date[1] && ! this.date[2]) {
|
|
7556
|
+
this.date[2] = 1;
|
|
7557
|
+
}
|
|
7558
|
+
var t = jSuites.calendar.now(this.date);
|
|
7559
|
+
v = jSuites.calendar.dateToNum(t);
|
|
7560
|
+
if (this.date[4]) {
|
|
7561
|
+
v += parseFloat(this.date[4] / 60);
|
|
7562
|
+
}
|
|
7563
|
+
}
|
|
7564
|
+
return v;
|
|
7565
|
+
}
|
|
7566
|
+
|
|
7539
7567
|
var isBlank = function(v) {
|
|
7540
7568
|
return v === null || v === '' || v === undefined ? true : false;
|
|
7541
7569
|
}
|
|
@@ -8704,7 +8732,9 @@ jSuites.mask = (function() {
|
|
|
8704
8732
|
var t = options.mask.split(';');
|
|
8705
8733
|
options.mask = t[0];
|
|
8706
8734
|
}
|
|
8735
|
+
options.mask = options.mask.replace(new RegExp(/\[h]/),'|h|');
|
|
8707
8736
|
options.mask = options.mask.replace(new RegExp(/\[.*?\]/),'');
|
|
8737
|
+
options.mask = options.mask.replace(new RegExp(/\|h\|/),'[h]');
|
|
8708
8738
|
}
|
|
8709
8739
|
|
|
8710
8740
|
// Get decimal
|
|
@@ -8731,9 +8761,7 @@ jSuites.mask = (function() {
|
|
|
8731
8761
|
if (jSuites.isNumeric(v)) {
|
|
8732
8762
|
value = v;
|
|
8733
8763
|
} else {
|
|
8734
|
-
var value =
|
|
8735
|
-
var t = jSuites.calendar.now(o.date);
|
|
8736
|
-
value = jSuites.calendar.dateToNum(t);
|
|
8764
|
+
var value = extractDate.call(o);
|
|
8737
8765
|
}
|
|
8738
8766
|
} else {
|
|
8739
8767
|
var value = Extract.call(options, v);
|
|
@@ -8808,7 +8836,6 @@ jSuites.mask = (function() {
|
|
|
8808
8836
|
if (t) {
|
|
8809
8837
|
value = t;
|
|
8810
8838
|
}
|
|
8811
|
-
|
|
8812
8839
|
if (options.mask && fullMask) {
|
|
8813
8840
|
fillWithBlanks = true;
|
|
8814
8841
|
}
|
package/dist/jsuites.layout.js
CHANGED
|
@@ -3040,6 +3040,7 @@ jSuites.template = (function(el, options) {
|
|
|
3040
3040
|
var searchContainer = document.createElement('div');
|
|
3041
3041
|
searchContainer.className = 'jtemplate-results';
|
|
3042
3042
|
obj.searchInput = document.createElement('input');
|
|
3043
|
+
obj.searchInput .className = 'jss_object';
|
|
3043
3044
|
obj.searchInput.onkeyup = function(e) {
|
|
3044
3045
|
// Clear current trigger
|
|
3045
3046
|
if (searchTimer) {
|
package/package.json
CHANGED