jsuites 4.11.5 → 4.12.2
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 +38 -31
- package/dist/jsuites.basic.js +120 -54
- package/dist/jsuites.css +84 -54
- package/dist/jsuites.js +112 -51
- package/package.json +1 -1
package/dist/jsuites.basic.css
CHANGED
|
@@ -57,6 +57,10 @@ div[data-before]:before {
|
|
|
57
57
|
right: 5px;
|
|
58
58
|
}
|
|
59
59
|
|
|
60
|
+
.jupload:empty:before {
|
|
61
|
+
z-index: 0;
|
|
62
|
+
}
|
|
63
|
+
|
|
60
64
|
.jupload img {
|
|
61
65
|
width: 100%;
|
|
62
66
|
}
|
|
@@ -139,7 +143,35 @@ div[data-before]:before {
|
|
|
139
143
|
border-radius: 1000px;
|
|
140
144
|
}
|
|
141
145
|
|
|
146
|
+
.jtooltip {
|
|
147
|
+
position: fixed;
|
|
148
|
+
top: 10px;
|
|
149
|
+
left: 10px;
|
|
142
150
|
|
|
151
|
+
z-index: 5;
|
|
152
|
+
font-family: initial;
|
|
153
|
+
font-size: 12px;
|
|
154
|
+
color: #000;
|
|
155
|
+
background-color: #fff;
|
|
156
|
+
border: 1px solid black;
|
|
157
|
+
padding: 8px;
|
|
158
|
+
|
|
159
|
+
display: block;
|
|
160
|
+
animation: fadeIn 0.5s
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
.jtooltip:empty {
|
|
164
|
+
display: none;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
@keyframes fadeIn {
|
|
168
|
+
0% {
|
|
169
|
+
opacity: 0;
|
|
170
|
+
}
|
|
171
|
+
100% {
|
|
172
|
+
opacity: 1;
|
|
173
|
+
}
|
|
174
|
+
}
|
|
143
175
|
|
|
144
176
|
/** Animations **/
|
|
145
177
|
.fade-in {
|
|
@@ -821,22 +853,15 @@ div[data-before]:before {
|
|
|
821
853
|
.jcontextmenu > div::before {
|
|
822
854
|
content: attr(data-icon);
|
|
823
855
|
font-family: 'Material Icons' !important;
|
|
824
|
-
font-
|
|
825
|
-
font-style: normal;
|
|
826
|
-
font-size: 16px;
|
|
827
|
-
line-height: 1;
|
|
828
|
-
letter-spacing: normal;
|
|
829
|
-
text-transform: none;
|
|
830
|
-
display: inline-block;
|
|
831
|
-
white-space: nowrap;
|
|
832
|
-
word-wrap: normal;
|
|
833
|
-
direction: ltr;
|
|
834
|
-
-webkit-font-feature-settings: 'liga';
|
|
835
|
-
-webkit-font-smoothing: antialiased;
|
|
856
|
+
font-size: 15px;
|
|
836
857
|
position: absolute;
|
|
837
858
|
left: 9px;
|
|
838
859
|
}
|
|
839
860
|
|
|
861
|
+
.jcontextmenu.symbols > div::before {
|
|
862
|
+
font-family: 'Material Symbols Outlined' !important;
|
|
863
|
+
}
|
|
864
|
+
|
|
840
865
|
.jcontextmenu > div.header {
|
|
841
866
|
display: none;
|
|
842
867
|
}
|
|
@@ -916,25 +941,6 @@ div[data-before]:before {
|
|
|
916
941
|
.jcontextmenu > div.header > a.close {
|
|
917
942
|
text-align: right;
|
|
918
943
|
}
|
|
919
|
-
|
|
920
|
-
.jcontextmenu > div::before {
|
|
921
|
-
content: attr(data-icon);
|
|
922
|
-
font-family: 'Material Icons' !important;
|
|
923
|
-
font-weight: normal;
|
|
924
|
-
font-style: normal;
|
|
925
|
-
font-size: 16px;
|
|
926
|
-
line-height: 1;
|
|
927
|
-
letter-spacing: normal;
|
|
928
|
-
text-transform: none;
|
|
929
|
-
display: inline-block;
|
|
930
|
-
white-space: nowrap;
|
|
931
|
-
word-wrap: normal;
|
|
932
|
-
direction: ltr;
|
|
933
|
-
-webkit-font-feature-settings: 'liga';
|
|
934
|
-
-webkit-font-smoothing: antialiased;
|
|
935
|
-
position: absolute;
|
|
936
|
-
left: 9px;
|
|
937
|
-
}
|
|
938
944
|
.jcontextmenu a {
|
|
939
945
|
font-size: 1.4em;
|
|
940
946
|
text-transform: uppercase;
|
|
@@ -2212,6 +2218,7 @@ div[data-before]:before {
|
|
|
2212
2218
|
padding: 4px;
|
|
2213
2219
|
z-index: 50;
|
|
2214
2220
|
text-align: left;
|
|
2221
|
+
margin-right: 20px;
|
|
2215
2222
|
}
|
|
2216
2223
|
|
|
2217
2224
|
.jtoolbar-floating .jtoolbar-divisor {
|
package/dist/jsuites.basic.js
CHANGED
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
|
|
18
18
|
var jSuites = function(options) {
|
|
19
19
|
var obj = {}
|
|
20
|
-
var version = '4.
|
|
20
|
+
var version = '4.12.2';
|
|
21
21
|
|
|
22
22
|
var find = function(DOMElement, component) {
|
|
23
23
|
if (DOMElement[component.type] && DOMElement[component.type] == component) {
|
|
@@ -55,8 +55,12 @@ var jSuites = function(options) {
|
|
|
55
55
|
y: null,
|
|
56
56
|
}
|
|
57
57
|
|
|
58
|
+
// Tooltip element
|
|
59
|
+
var tooltip = document.createElement('div')
|
|
60
|
+
tooltip.classList.add('jtooltip');
|
|
61
|
+
|
|
58
62
|
// Events
|
|
59
|
-
var
|
|
63
|
+
var mouseDown = function(e) {
|
|
60
64
|
// Check if this is the floating
|
|
61
65
|
var item = jSuites.findElement(e.target, 'jpanel');
|
|
62
66
|
// Jfloating found
|
|
@@ -73,6 +77,7 @@ var jSuites = function(options) {
|
|
|
73
77
|
h: rect.height,
|
|
74
78
|
d: item.style.cursor,
|
|
75
79
|
resizing: item.style.cursor ? true : false,
|
|
80
|
+
actioned: false,
|
|
76
81
|
}
|
|
77
82
|
|
|
78
83
|
// Make sure width and height styling is OK
|
|
@@ -128,9 +133,9 @@ var jSuites = function(options) {
|
|
|
128
133
|
isOpened(element);
|
|
129
134
|
}
|
|
130
135
|
|
|
131
|
-
var
|
|
136
|
+
var mouseUp = function(e) {
|
|
132
137
|
if (editorAction && editorAction.e) {
|
|
133
|
-
if (typeof(editorAction.e.refresh) == 'function') {
|
|
138
|
+
if (typeof(editorAction.e.refresh) == 'function' && state.actioned) {
|
|
134
139
|
editorAction.e.refresh();
|
|
135
140
|
}
|
|
136
141
|
editorAction.e.style.cursor = '';
|
|
@@ -145,7 +150,7 @@ var jSuites = function(options) {
|
|
|
145
150
|
editorAction = false;
|
|
146
151
|
}
|
|
147
152
|
|
|
148
|
-
var
|
|
153
|
+
var mouseMove = function(e) {
|
|
149
154
|
if (editorAction) {
|
|
150
155
|
var x = e.clientX || e.pageX;
|
|
151
156
|
var y = e.clientY || e.pageY;
|
|
@@ -173,6 +178,7 @@ var jSuites = function(options) {
|
|
|
173
178
|
|
|
174
179
|
// Update element
|
|
175
180
|
if (typeof(editorAction.e.refresh) == 'function') {
|
|
181
|
+
state.actioned = true;
|
|
176
182
|
editorAction.e.refresh('position', top, left);
|
|
177
183
|
}
|
|
178
184
|
} else {
|
|
@@ -203,6 +209,7 @@ var jSuites = function(options) {
|
|
|
203
209
|
|
|
204
210
|
// Update element
|
|
205
211
|
if (typeof(editorAction.e.refresh) == 'function') {
|
|
212
|
+
state.actioned = true;
|
|
206
213
|
editorAction.e.refresh('dimensions', width, height);
|
|
207
214
|
}
|
|
208
215
|
}
|
|
@@ -241,7 +248,31 @@ var jSuites = function(options) {
|
|
|
241
248
|
}
|
|
242
249
|
}
|
|
243
250
|
|
|
244
|
-
var
|
|
251
|
+
var mouseOver = function(e) {
|
|
252
|
+
var message = e.target.getAttribute('data-tooltip');
|
|
253
|
+
if (message) {
|
|
254
|
+
// Instructions
|
|
255
|
+
tooltip.innerText = message;
|
|
256
|
+
|
|
257
|
+
// Position
|
|
258
|
+
if (e.changedTouches && e.changedTouches[0]) {
|
|
259
|
+
var x = e.changedTouches[0].clientX;
|
|
260
|
+
var y = e.changedTouches[0].clientY;
|
|
261
|
+
} else {
|
|
262
|
+
var x = e.clientX;
|
|
263
|
+
var y = e.clientY;
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
tooltip.style.top = y + 'px';
|
|
267
|
+
tooltip.style.left = x + 'px';
|
|
268
|
+
document.body.appendChild(tooltip);
|
|
269
|
+
} else if (tooltip.innerText) {
|
|
270
|
+
tooltip.innerText = '';
|
|
271
|
+
document.body.removeChild(tooltip);
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
var dblClick = function(e) {
|
|
245
276
|
var item = jSuites.findElement(e.target, 'jpanel');
|
|
246
277
|
if (item && typeof(item.dblclick) == 'function') {
|
|
247
278
|
// Create edition
|
|
@@ -249,7 +280,7 @@ var jSuites = function(options) {
|
|
|
249
280
|
}
|
|
250
281
|
}
|
|
251
282
|
|
|
252
|
-
var
|
|
283
|
+
var contextMenu = function(e) {
|
|
253
284
|
var item = document.activeElement;
|
|
254
285
|
if (item && typeof(item.contextmenu) == 'function') {
|
|
255
286
|
// Create edition
|
|
@@ -276,7 +307,7 @@ var jSuites = function(options) {
|
|
|
276
307
|
}
|
|
277
308
|
}
|
|
278
309
|
|
|
279
|
-
var
|
|
310
|
+
var keyDown = function(e) {
|
|
280
311
|
var item = document.activeElement;
|
|
281
312
|
if (item) {
|
|
282
313
|
if (e.key == "Delete" && typeof(item.delete) == 'function') {
|
|
@@ -297,12 +328,13 @@ var jSuites = function(options) {
|
|
|
297
328
|
}
|
|
298
329
|
}
|
|
299
330
|
|
|
300
|
-
document.addEventListener('mouseup',
|
|
301
|
-
document.addEventListener("mousedown",
|
|
302
|
-
document.addEventListener('mousemove',
|
|
303
|
-
document.addEventListener('
|
|
304
|
-
document.addEventListener('
|
|
305
|
-
document.addEventListener('
|
|
331
|
+
document.addEventListener('mouseup', mouseUp);
|
|
332
|
+
document.addEventListener("mousedown", mouseDown);
|
|
333
|
+
document.addEventListener('mousemove', mouseMove);
|
|
334
|
+
document.addEventListener('mouseover', mouseOver);
|
|
335
|
+
document.addEventListener('dblclick', dblClick);
|
|
336
|
+
document.addEventListener('keydown', keyDown);
|
|
337
|
+
document.addEventListener('contextmenu', contextMenu);
|
|
306
338
|
document.dictionary = {};
|
|
307
339
|
|
|
308
340
|
obj.version = version;
|
|
@@ -1882,6 +1914,7 @@ jSuites.calendar.prettifyAll = function() {
|
|
|
1882
1914
|
elements[i].innerHTML = jSuites.calendar.prettify(elements[i].getAttribute('data-date'));
|
|
1883
1915
|
} else {
|
|
1884
1916
|
if (elements[i].innerHTML) {
|
|
1917
|
+
elements[i].setAttribute('title', elements[i].innerHTML);
|
|
1885
1918
|
elements[i].setAttribute('data-date', elements[i].innerHTML);
|
|
1886
1919
|
elements[i].innerHTML = jSuites.calendar.prettify(elements[i].innerHTML);
|
|
1887
1920
|
}
|
|
@@ -2305,7 +2338,7 @@ jSuites.color = (function(el, options) {
|
|
|
2305
2338
|
}
|
|
2306
2339
|
|
|
2307
2340
|
obj.select = function(color) {
|
|
2308
|
-
// Remove current
|
|
2341
|
+
// Remove current selected mark
|
|
2309
2342
|
var selected = container.querySelector('.jcolor-selected');
|
|
2310
2343
|
if (selected) {
|
|
2311
2344
|
selected.classList.remove('jcolor-selected');
|
|
@@ -2315,6 +2348,8 @@ jSuites.color = (function(el, options) {
|
|
|
2315
2348
|
if (obj.values[color]) {
|
|
2316
2349
|
obj.values[color].classList.add('jcolor-selected');
|
|
2317
2350
|
}
|
|
2351
|
+
|
|
2352
|
+
obj.options.value = color;
|
|
2318
2353
|
}
|
|
2319
2354
|
|
|
2320
2355
|
/**
|
|
@@ -2936,8 +2971,13 @@ jSuites.contextmenu = (function(el, options) {
|
|
|
2936
2971
|
// Coordinates
|
|
2937
2972
|
if ((obj.options.items && obj.options.items.length > 0) || el.children.length) {
|
|
2938
2973
|
if (e.target) {
|
|
2939
|
-
|
|
2940
|
-
|
|
2974
|
+
if (e.changedTouches && e.changedTouches[0]) {
|
|
2975
|
+
x = e.changedTouches[0].clientX;
|
|
2976
|
+
y = e.changedTouches[0].clientY;
|
|
2977
|
+
} else {
|
|
2978
|
+
var x = e.clientX;
|
|
2979
|
+
var y = e.clientY;
|
|
2980
|
+
}
|
|
2941
2981
|
} else {
|
|
2942
2982
|
var x = e.x;
|
|
2943
2983
|
var y = e.y;
|
|
@@ -2967,6 +3007,10 @@ jSuites.contextmenu = (function(el, options) {
|
|
|
2967
3007
|
}
|
|
2968
3008
|
}
|
|
2969
3009
|
|
|
3010
|
+
obj.isOpened = function() {
|
|
3011
|
+
return el.classList.contains('jcontextmenu-focus') ? true : false;
|
|
3012
|
+
}
|
|
3013
|
+
|
|
2970
3014
|
/**
|
|
2971
3015
|
* Close menu
|
|
2972
3016
|
*/
|
|
@@ -7125,13 +7169,13 @@ jSuites.mask = (function() {
|
|
|
7125
7169
|
|
|
7126
7170
|
// New value
|
|
7127
7171
|
v = (''+v).split(decimal);
|
|
7128
|
-
v[0] = v[0].match(/[\-0-9]+/g
|
|
7172
|
+
v[0] = v[0].match(/[\-0-9]+/g);
|
|
7129
7173
|
if (v[0]) {
|
|
7130
7174
|
v[0] = v[0].join('');
|
|
7131
7175
|
}
|
|
7132
7176
|
if (v[0] || v[1]) {
|
|
7133
7177
|
if (v[1] !== undefined) {
|
|
7134
|
-
v[1] = v[1].match(/[0-9]+/g
|
|
7178
|
+
v[1] = v[1].match(/[0-9]+/g);
|
|
7135
7179
|
if (v[1]) {
|
|
7136
7180
|
v[1] = v[1].join('');
|
|
7137
7181
|
} else {
|
|
@@ -7141,11 +7185,10 @@ jSuites.mask = (function() {
|
|
|
7141
7185
|
} else {
|
|
7142
7186
|
return '';
|
|
7143
7187
|
}
|
|
7144
|
-
|
|
7145
7188
|
return v;
|
|
7146
7189
|
}
|
|
7147
7190
|
|
|
7148
|
-
var FormatValue = function(v) {
|
|
7191
|
+
var FormatValue = function(v, event) {
|
|
7149
7192
|
if (v == '') {
|
|
7150
7193
|
return '';
|
|
7151
7194
|
}
|
|
@@ -7158,10 +7201,6 @@ jSuites.mask = (function() {
|
|
|
7158
7201
|
if (v == '') {
|
|
7159
7202
|
return '';
|
|
7160
7203
|
}
|
|
7161
|
-
// Negative values
|
|
7162
|
-
if (v[0] === '-') {
|
|
7163
|
-
v[0] = '-0';
|
|
7164
|
-
}
|
|
7165
7204
|
// Temporary value
|
|
7166
7205
|
if (v[0]) {
|
|
7167
7206
|
var t = parseFloat(v[0] + '.1');
|
|
@@ -7171,6 +7210,11 @@ jSuites.mask = (function() {
|
|
|
7171
7210
|
} else {
|
|
7172
7211
|
var t = null;
|
|
7173
7212
|
}
|
|
7213
|
+
|
|
7214
|
+
if ((v[0] == '-' || v[0] == '-00') && ! v[1] && (event && event.inputType == "deleteContentBackward")) {
|
|
7215
|
+
return '';
|
|
7216
|
+
}
|
|
7217
|
+
|
|
7174
7218
|
var n = new Intl.NumberFormat(this.locale, o).format(t);
|
|
7175
7219
|
n = n.split(d);
|
|
7176
7220
|
if (typeof(n[1]) !== 'undefined') {
|
|
@@ -7189,7 +7233,7 @@ jSuites.mask = (function() {
|
|
|
7189
7233
|
return n.join('');
|
|
7190
7234
|
}
|
|
7191
7235
|
|
|
7192
|
-
var Format = function(e) {
|
|
7236
|
+
var Format = function(e, event) {
|
|
7193
7237
|
var v = Value.call(e);
|
|
7194
7238
|
if (! v) {
|
|
7195
7239
|
return;
|
|
@@ -7197,7 +7241,7 @@ jSuites.mask = (function() {
|
|
|
7197
7241
|
|
|
7198
7242
|
// Get decimal
|
|
7199
7243
|
var d = getDecimal.call(this);
|
|
7200
|
-
var n = FormatValue.call(this, v);
|
|
7244
|
+
var n = FormatValue.call(this, v, event);
|
|
7201
7245
|
var t = (n.length) - v.length;
|
|
7202
7246
|
var index = Caret.call(e) + t;
|
|
7203
7247
|
// Set value and update caret
|
|
@@ -8021,14 +8065,12 @@ jSuites.mask = (function() {
|
|
|
8021
8065
|
if (o.mask.indexOf('##') !== -1) {
|
|
8022
8066
|
var d = o.mask.split(';');
|
|
8023
8067
|
if (d[0]) {
|
|
8024
|
-
d[0] = d[0].replace('*', '');
|
|
8025
|
-
d[0] = d[0].replace(/_
|
|
8026
|
-
d[0] = d[0].replace(/-/g, '');
|
|
8027
|
-
d[0] = d[0].replace('(','');
|
|
8028
|
-
d[0] = d[0].replace(')','');
|
|
8068
|
+
d[0] = d[0].replace('*', '\t');
|
|
8069
|
+
d[0] = d[0].replace(new RegExp(/_-/g), ' ');
|
|
8029
8070
|
d[0] = d[0].replace('##0.###','##0.000');
|
|
8030
8071
|
d[0] = d[0].replace('##0.##','##0.00');
|
|
8031
8072
|
d[0] = d[0].replace('##0.#','##0.0');
|
|
8073
|
+
d[0] = d[0].replace(new RegExp(/\[.*?\]/),'');
|
|
8032
8074
|
}
|
|
8033
8075
|
o.mask = d[0];
|
|
8034
8076
|
}
|
|
@@ -8041,10 +8083,10 @@ jSuites.mask = (function() {
|
|
|
8041
8083
|
}
|
|
8042
8084
|
// On new input
|
|
8043
8085
|
if (typeof(e) !== 'object' || ! e.inputType || ! e.inputType.indexOf('insert') || ! e.inputType.indexOf('delete')) {
|
|
8044
|
-
// Start
|
|
8086
|
+
// Start transformation
|
|
8045
8087
|
if (o.locale) {
|
|
8046
8088
|
if (o.input) {
|
|
8047
|
-
Format.call(o, o.input);
|
|
8089
|
+
Format.call(o, o.input, e);
|
|
8048
8090
|
} else {
|
|
8049
8091
|
var newValue = FormatValue.call(o, o.value);
|
|
8050
8092
|
}
|
|
@@ -8159,6 +8201,8 @@ jSuites.mask = (function() {
|
|
|
8159
8201
|
if (typeof(options) != 'object') {
|
|
8160
8202
|
return value;
|
|
8161
8203
|
} else {
|
|
8204
|
+
options = Object.assign({}, options);
|
|
8205
|
+
|
|
8162
8206
|
if (! options.options) {
|
|
8163
8207
|
options.options = {};
|
|
8164
8208
|
}
|
|
@@ -8189,9 +8233,14 @@ jSuites.mask = (function() {
|
|
|
8189
8233
|
}
|
|
8190
8234
|
|
|
8191
8235
|
var o = obj(v, options, true);
|
|
8192
|
-
|
|
8193
|
-
|
|
8194
|
-
|
|
8236
|
+
|
|
8237
|
+
if (jSuites.isNumeric(v)) {
|
|
8238
|
+
value = v;
|
|
8239
|
+
} else {
|
|
8240
|
+
var value = getDate.call(o);
|
|
8241
|
+
var t = jSuites.calendar.now(o.date);
|
|
8242
|
+
value = jSuites.calendar.dateToNum(t);
|
|
8243
|
+
}
|
|
8195
8244
|
} else {
|
|
8196
8245
|
var value = Extract.call(options, v);
|
|
8197
8246
|
// Percentage
|
|
@@ -8225,6 +8274,8 @@ jSuites.mask = (function() {
|
|
|
8225
8274
|
if (typeof(options) != 'object') {
|
|
8226
8275
|
return value;
|
|
8227
8276
|
} else {
|
|
8277
|
+
options = Object.assign({}, options);
|
|
8278
|
+
|
|
8228
8279
|
if (! options.options) {
|
|
8229
8280
|
options.options = {};
|
|
8230
8281
|
}
|
|
@@ -8265,10 +8316,11 @@ jSuites.mask = (function() {
|
|
|
8265
8316
|
if (typeof(value) === 'number') {
|
|
8266
8317
|
var t = null;
|
|
8267
8318
|
if (options.mask && fullMask) {
|
|
8268
|
-
var
|
|
8269
|
-
|
|
8270
|
-
|
|
8271
|
-
d = d[
|
|
8319
|
+
var d = getDecimal.call(options, options.mask);
|
|
8320
|
+
if (options.mask.indexOf(d) !== -1) {
|
|
8321
|
+
d = options.mask.split(d);
|
|
8322
|
+
d = (''+d[1].match(/[0-9]+/g))
|
|
8323
|
+
d = d.length;
|
|
8272
8324
|
t = value.toFixed(d);
|
|
8273
8325
|
} else {
|
|
8274
8326
|
t = value.toFixed(0);
|
|
@@ -9172,21 +9224,23 @@ jSuites.tabs = (function(el, options) {
|
|
|
9172
9224
|
// Helpers
|
|
9173
9225
|
var setBorder = function(index) {
|
|
9174
9226
|
if (obj.options.animation) {
|
|
9175
|
-
|
|
9227
|
+
setTimeout(function() {
|
|
9228
|
+
var rect = obj.headers.children[index].getBoundingClientRect();
|
|
9176
9229
|
|
|
9177
|
-
|
|
9178
|
-
|
|
9179
|
-
|
|
9180
|
-
|
|
9181
|
-
|
|
9182
|
-
|
|
9183
|
-
|
|
9230
|
+
if (obj.options.palette == 'modern') {
|
|
9231
|
+
border.style.width = rect.width - 4 + 'px';
|
|
9232
|
+
border.style.left = obj.headers.children[index].offsetLeft + 2 + 'px';
|
|
9233
|
+
} else {
|
|
9234
|
+
border.style.width = rect.width + 'px';
|
|
9235
|
+
border.style.left = obj.headers.children[index].offsetLeft + 'px';
|
|
9236
|
+
}
|
|
9184
9237
|
|
|
9185
|
-
|
|
9186
|
-
|
|
9187
|
-
|
|
9188
|
-
|
|
9189
|
-
|
|
9238
|
+
if (obj.options.position == 'bottom') {
|
|
9239
|
+
border.style.top = '0px';
|
|
9240
|
+
} else {
|
|
9241
|
+
border.style.bottom = '0px';
|
|
9242
|
+
}
|
|
9243
|
+
}, 150);
|
|
9190
9244
|
}
|
|
9191
9245
|
}
|
|
9192
9246
|
|
|
@@ -9303,6 +9357,8 @@ jSuites.tabs = (function(el, options) {
|
|
|
9303
9357
|
obj.options.oncreate(el, div)
|
|
9304
9358
|
}
|
|
9305
9359
|
|
|
9360
|
+
setBorder();
|
|
9361
|
+
|
|
9306
9362
|
return div;
|
|
9307
9363
|
}
|
|
9308
9364
|
|
|
@@ -9397,6 +9453,8 @@ jSuites.tabs = (function(el, options) {
|
|
|
9397
9453
|
}
|
|
9398
9454
|
|
|
9399
9455
|
obj.content.replaceChild(newContent, obj.content.children[position]);
|
|
9456
|
+
|
|
9457
|
+
setBorder();
|
|
9400
9458
|
}
|
|
9401
9459
|
|
|
9402
9460
|
obj.updatePosition = function(f, t) {
|
|
@@ -9722,6 +9780,14 @@ jSuites.toolbar = (function(el, options) {
|
|
|
9722
9780
|
toolbarItem.updateState(el, obj, toolbarItem, a, b);
|
|
9723
9781
|
}
|
|
9724
9782
|
}
|
|
9783
|
+
for (var i = 0; i < toolbarFloating.children.length; i++) {
|
|
9784
|
+
// Toolbar element
|
|
9785
|
+
var toolbarItem = toolbarFloating.children[i];
|
|
9786
|
+
// State management
|
|
9787
|
+
if (typeof(toolbarItem.updateState) == 'function') {
|
|
9788
|
+
toolbarItem.updateState(el, obj, toolbarItem, a, b);
|
|
9789
|
+
}
|
|
9790
|
+
}
|
|
9725
9791
|
}
|
|
9726
9792
|
|
|
9727
9793
|
obj.create = function(items) {
|
package/dist/jsuites.css
CHANGED
|
@@ -57,6 +57,10 @@ div[data-before]:before {
|
|
|
57
57
|
right: 5px;
|
|
58
58
|
}
|
|
59
59
|
|
|
60
|
+
.jupload:empty:before {
|
|
61
|
+
z-index: 0;
|
|
62
|
+
}
|
|
63
|
+
|
|
60
64
|
.jupload img {
|
|
61
65
|
width: 100%;
|
|
62
66
|
}
|
|
@@ -139,7 +143,35 @@ div[data-before]:before {
|
|
|
139
143
|
border-radius: 1000px;
|
|
140
144
|
}
|
|
141
145
|
|
|
146
|
+
.jtooltip {
|
|
147
|
+
position: fixed;
|
|
148
|
+
top: 10px;
|
|
149
|
+
left: 10px;
|
|
142
150
|
|
|
151
|
+
z-index: 5;
|
|
152
|
+
font-family: initial;
|
|
153
|
+
font-size: 12px;
|
|
154
|
+
color: #000;
|
|
155
|
+
background-color: #fff;
|
|
156
|
+
border: 1px solid black;
|
|
157
|
+
padding: 8px;
|
|
158
|
+
|
|
159
|
+
display: block;
|
|
160
|
+
animation: fadeIn 0.5s
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
.jtooltip:empty {
|
|
164
|
+
display: none;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
@keyframes fadeIn {
|
|
168
|
+
0% {
|
|
169
|
+
opacity: 0;
|
|
170
|
+
}
|
|
171
|
+
100% {
|
|
172
|
+
opacity: 1;
|
|
173
|
+
}
|
|
174
|
+
}
|
|
143
175
|
|
|
144
176
|
/** Animations **/
|
|
145
177
|
.fade-in {
|
|
@@ -821,22 +853,15 @@ div[data-before]:before {
|
|
|
821
853
|
.jcontextmenu > div::before {
|
|
822
854
|
content: attr(data-icon);
|
|
823
855
|
font-family: 'Material Icons' !important;
|
|
824
|
-
font-
|
|
825
|
-
font-style: normal;
|
|
826
|
-
font-size: 16px;
|
|
827
|
-
line-height: 1;
|
|
828
|
-
letter-spacing: normal;
|
|
829
|
-
text-transform: none;
|
|
830
|
-
display: inline-block;
|
|
831
|
-
white-space: nowrap;
|
|
832
|
-
word-wrap: normal;
|
|
833
|
-
direction: ltr;
|
|
834
|
-
-webkit-font-feature-settings: 'liga';
|
|
835
|
-
-webkit-font-smoothing: antialiased;
|
|
856
|
+
font-size: 15px;
|
|
836
857
|
position: absolute;
|
|
837
858
|
left: 9px;
|
|
838
859
|
}
|
|
839
860
|
|
|
861
|
+
.jcontextmenu.symbols > div::before {
|
|
862
|
+
font-family: 'Material Symbols Outlined' !important;
|
|
863
|
+
}
|
|
864
|
+
|
|
840
865
|
.jcontextmenu > div.header {
|
|
841
866
|
display: none;
|
|
842
867
|
}
|
|
@@ -916,25 +941,6 @@ div[data-before]:before {
|
|
|
916
941
|
.jcontextmenu > div.header > a.close {
|
|
917
942
|
text-align: right;
|
|
918
943
|
}
|
|
919
|
-
|
|
920
|
-
.jcontextmenu > div::before {
|
|
921
|
-
content: attr(data-icon);
|
|
922
|
-
font-family: 'Material Icons' !important;
|
|
923
|
-
font-weight: normal;
|
|
924
|
-
font-style: normal;
|
|
925
|
-
font-size: 16px;
|
|
926
|
-
line-height: 1;
|
|
927
|
-
letter-spacing: normal;
|
|
928
|
-
text-transform: none;
|
|
929
|
-
display: inline-block;
|
|
930
|
-
white-space: nowrap;
|
|
931
|
-
word-wrap: normal;
|
|
932
|
-
direction: ltr;
|
|
933
|
-
-webkit-font-feature-settings: 'liga';
|
|
934
|
-
-webkit-font-smoothing: antialiased;
|
|
935
|
-
position: absolute;
|
|
936
|
-
left: 9px;
|
|
937
|
-
}
|
|
938
944
|
.jcontextmenu a {
|
|
939
945
|
font-size: 1.4em;
|
|
940
946
|
text-transform: uppercase;
|
|
@@ -1685,38 +1691,61 @@ div[data-before]:before {
|
|
|
1685
1691
|
left:50%;
|
|
1686
1692
|
width:60%;
|
|
1687
1693
|
height:60%;
|
|
1688
|
-
-webkit-box-shadow: 0 2px
|
|
1689
|
-
-moz-box-shadow: 0 2px
|
|
1694
|
+
-webkit-box-shadow: 0 2px 12px rgba(0,0,0,.2);
|
|
1695
|
+
-moz-box-shadow: 0 2px 12px rgba(0,0,0,.2);
|
|
1690
1696
|
border:1px solid #ccc;
|
|
1691
1697
|
background-color:#fff;
|
|
1692
1698
|
transform: translate(-50%, -50%);
|
|
1693
1699
|
box-sizing: border-box;
|
|
1694
|
-
padding-top:50px !important;
|
|
1700
|
+
padding-top: 50px !important;
|
|
1695
1701
|
z-index:9002;
|
|
1696
|
-
border-radius:
|
|
1702
|
+
border-radius: 4px;
|
|
1697
1703
|
}
|
|
1698
1704
|
|
|
1699
1705
|
.jmodal:before {
|
|
1700
|
-
position:absolute;
|
|
1701
|
-
top:0;
|
|
1702
|
-
left:0;
|
|
1703
|
-
width:100%;
|
|
1706
|
+
position: absolute;
|
|
1707
|
+
top: 0;
|
|
1708
|
+
left: 0;
|
|
1709
|
+
width: 100%;
|
|
1704
1710
|
content:attr(title);
|
|
1705
|
-
padding:
|
|
1711
|
+
padding: 25px;
|
|
1712
|
+
padding-bottom: 20px;
|
|
1706
1713
|
box-sizing: border-box;
|
|
1707
|
-
font-size:1.
|
|
1708
|
-
box-shadow: 1px 1px 3px rgba(0,0,0,.2);
|
|
1714
|
+
font-size: 1.4em;
|
|
1709
1715
|
background-color: #fff;
|
|
1710
1716
|
border-radius: 8px 8px 0px 0px;
|
|
1711
1717
|
}
|
|
1712
1718
|
|
|
1713
1719
|
.jmodal_content {
|
|
1714
|
-
padding:
|
|
1715
|
-
overflow-y:auto;
|
|
1716
|
-
max-height:100%;
|
|
1720
|
+
padding: 22px;
|
|
1721
|
+
overflow-y: auto;
|
|
1722
|
+
max-height: 100%;
|
|
1717
1723
|
box-sizing: border-box;
|
|
1718
1724
|
height: -webkit-fill-available;
|
|
1725
|
+
|
|
1726
|
+
scrollbar-width: thin;
|
|
1727
|
+
scrollbar-color: #333 transparent;
|
|
1728
|
+
}
|
|
1729
|
+
|
|
1730
|
+
.jmodal_content::-webkit-scrollbar {
|
|
1731
|
+
height: 12px;
|
|
1732
|
+
}
|
|
1733
|
+
|
|
1734
|
+
.jmodal_content::-webkit-scrollbar {
|
|
1735
|
+
width: 12px;
|
|
1736
|
+
}
|
|
1737
|
+
|
|
1738
|
+
.jmodal_content::-webkit-scrollbar-track {
|
|
1739
|
+
border: 1px solid #fff;
|
|
1740
|
+
background: #eee;
|
|
1741
|
+
}
|
|
1742
|
+
|
|
1743
|
+
.jmodal_content::-webkit-scrollbar-thumb {
|
|
1744
|
+
border: 1px solid #fff;
|
|
1745
|
+
background: #888;
|
|
1719
1746
|
}
|
|
1747
|
+
|
|
1748
|
+
|
|
1720
1749
|
.jmodal.no-title {
|
|
1721
1750
|
padding-top: initial !important;
|
|
1722
1751
|
}
|
|
@@ -1726,16 +1755,16 @@ div[data-before]:before {
|
|
|
1726
1755
|
}
|
|
1727
1756
|
|
|
1728
1757
|
.jmodal:after {
|
|
1729
|
-
content:'';
|
|
1758
|
+
content: '';
|
|
1730
1759
|
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cpath d='M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z'/%3E%3Cpath d='M0 0h24v24H0z' fill='none'/%3E%3C/svg%3E");
|
|
1731
|
-
position:absolute;
|
|
1732
|
-
top:0;
|
|
1733
|
-
right:0;
|
|
1734
|
-
margin:
|
|
1735
|
-
font-size:24px;
|
|
1736
|
-
width:24px;
|
|
1737
|
-
height:24px;
|
|
1738
|
-
cursor:pointer;
|
|
1760
|
+
position: absolute;
|
|
1761
|
+
top: 0;
|
|
1762
|
+
right: 0;
|
|
1763
|
+
margin: 25px;
|
|
1764
|
+
font-size: 24px;
|
|
1765
|
+
width: 24px;
|
|
1766
|
+
height: 24px;
|
|
1767
|
+
cursor: pointer;
|
|
1739
1768
|
text-shadow: 0px 0px 5px #fff;
|
|
1740
1769
|
}
|
|
1741
1770
|
|
|
@@ -2782,6 +2811,7 @@ div[data-before]:before {
|
|
|
2782
2811
|
padding: 4px;
|
|
2783
2812
|
z-index: 50;
|
|
2784
2813
|
text-align: left;
|
|
2814
|
+
margin-right: 20px;
|
|
2785
2815
|
}
|
|
2786
2816
|
|
|
2787
2817
|
.jtoolbar-floating .jtoolbar-divisor {
|
package/dist/jsuites.js
CHANGED
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
|
|
18
18
|
var jSuites = function(options) {
|
|
19
19
|
var obj = {}
|
|
20
|
-
var version = '4.
|
|
20
|
+
var version = '4.12.2';
|
|
21
21
|
|
|
22
22
|
var find = function(DOMElement, component) {
|
|
23
23
|
if (DOMElement[component.type] && DOMElement[component.type] == component) {
|
|
@@ -55,8 +55,12 @@ var jSuites = function(options) {
|
|
|
55
55
|
y: null,
|
|
56
56
|
}
|
|
57
57
|
|
|
58
|
+
// Tooltip element
|
|
59
|
+
var tooltip = document.createElement('div')
|
|
60
|
+
tooltip.classList.add('jtooltip');
|
|
61
|
+
|
|
58
62
|
// Events
|
|
59
|
-
var
|
|
63
|
+
var mouseDown = function(e) {
|
|
60
64
|
// Check if this is the floating
|
|
61
65
|
var item = jSuites.findElement(e.target, 'jpanel');
|
|
62
66
|
// Jfloating found
|
|
@@ -73,6 +77,7 @@ var jSuites = function(options) {
|
|
|
73
77
|
h: rect.height,
|
|
74
78
|
d: item.style.cursor,
|
|
75
79
|
resizing: item.style.cursor ? true : false,
|
|
80
|
+
actioned: false,
|
|
76
81
|
}
|
|
77
82
|
|
|
78
83
|
// Make sure width and height styling is OK
|
|
@@ -128,9 +133,9 @@ var jSuites = function(options) {
|
|
|
128
133
|
isOpened(element);
|
|
129
134
|
}
|
|
130
135
|
|
|
131
|
-
var
|
|
136
|
+
var mouseUp = function(e) {
|
|
132
137
|
if (editorAction && editorAction.e) {
|
|
133
|
-
if (typeof(editorAction.e.refresh) == 'function') {
|
|
138
|
+
if (typeof(editorAction.e.refresh) == 'function' && state.actioned) {
|
|
134
139
|
editorAction.e.refresh();
|
|
135
140
|
}
|
|
136
141
|
editorAction.e.style.cursor = '';
|
|
@@ -145,7 +150,7 @@ var jSuites = function(options) {
|
|
|
145
150
|
editorAction = false;
|
|
146
151
|
}
|
|
147
152
|
|
|
148
|
-
var
|
|
153
|
+
var mouseMove = function(e) {
|
|
149
154
|
if (editorAction) {
|
|
150
155
|
var x = e.clientX || e.pageX;
|
|
151
156
|
var y = e.clientY || e.pageY;
|
|
@@ -173,6 +178,7 @@ var jSuites = function(options) {
|
|
|
173
178
|
|
|
174
179
|
// Update element
|
|
175
180
|
if (typeof(editorAction.e.refresh) == 'function') {
|
|
181
|
+
state.actioned = true;
|
|
176
182
|
editorAction.e.refresh('position', top, left);
|
|
177
183
|
}
|
|
178
184
|
} else {
|
|
@@ -203,6 +209,7 @@ var jSuites = function(options) {
|
|
|
203
209
|
|
|
204
210
|
// Update element
|
|
205
211
|
if (typeof(editorAction.e.refresh) == 'function') {
|
|
212
|
+
state.actioned = true;
|
|
206
213
|
editorAction.e.refresh('dimensions', width, height);
|
|
207
214
|
}
|
|
208
215
|
}
|
|
@@ -241,7 +248,31 @@ var jSuites = function(options) {
|
|
|
241
248
|
}
|
|
242
249
|
}
|
|
243
250
|
|
|
244
|
-
var
|
|
251
|
+
var mouseOver = function(e) {
|
|
252
|
+
var message = e.target.getAttribute('data-tooltip');
|
|
253
|
+
if (message) {
|
|
254
|
+
// Instructions
|
|
255
|
+
tooltip.innerText = message;
|
|
256
|
+
|
|
257
|
+
// Position
|
|
258
|
+
if (e.changedTouches && e.changedTouches[0]) {
|
|
259
|
+
var x = e.changedTouches[0].clientX;
|
|
260
|
+
var y = e.changedTouches[0].clientY;
|
|
261
|
+
} else {
|
|
262
|
+
var x = e.clientX;
|
|
263
|
+
var y = e.clientY;
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
tooltip.style.top = y + 'px';
|
|
267
|
+
tooltip.style.left = x + 'px';
|
|
268
|
+
document.body.appendChild(tooltip);
|
|
269
|
+
} else if (tooltip.innerText) {
|
|
270
|
+
tooltip.innerText = '';
|
|
271
|
+
document.body.removeChild(tooltip);
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
var dblClick = function(e) {
|
|
245
276
|
var item = jSuites.findElement(e.target, 'jpanel');
|
|
246
277
|
if (item && typeof(item.dblclick) == 'function') {
|
|
247
278
|
// Create edition
|
|
@@ -249,7 +280,7 @@ var jSuites = function(options) {
|
|
|
249
280
|
}
|
|
250
281
|
}
|
|
251
282
|
|
|
252
|
-
var
|
|
283
|
+
var contextMenu = function(e) {
|
|
253
284
|
var item = document.activeElement;
|
|
254
285
|
if (item && typeof(item.contextmenu) == 'function') {
|
|
255
286
|
// Create edition
|
|
@@ -276,7 +307,7 @@ var jSuites = function(options) {
|
|
|
276
307
|
}
|
|
277
308
|
}
|
|
278
309
|
|
|
279
|
-
var
|
|
310
|
+
var keyDown = function(e) {
|
|
280
311
|
var item = document.activeElement;
|
|
281
312
|
if (item) {
|
|
282
313
|
if (e.key == "Delete" && typeof(item.delete) == 'function') {
|
|
@@ -297,12 +328,13 @@ var jSuites = function(options) {
|
|
|
297
328
|
}
|
|
298
329
|
}
|
|
299
330
|
|
|
300
|
-
document.addEventListener('mouseup',
|
|
301
|
-
document.addEventListener("mousedown",
|
|
302
|
-
document.addEventListener('mousemove',
|
|
303
|
-
document.addEventListener('
|
|
304
|
-
document.addEventListener('
|
|
305
|
-
document.addEventListener('
|
|
331
|
+
document.addEventListener('mouseup', mouseUp);
|
|
332
|
+
document.addEventListener("mousedown", mouseDown);
|
|
333
|
+
document.addEventListener('mousemove', mouseMove);
|
|
334
|
+
document.addEventListener('mouseover', mouseOver);
|
|
335
|
+
document.addEventListener('dblclick', dblClick);
|
|
336
|
+
document.addEventListener('keydown', keyDown);
|
|
337
|
+
document.addEventListener('contextmenu', contextMenu);
|
|
306
338
|
document.dictionary = {};
|
|
307
339
|
|
|
308
340
|
obj.version = version;
|
|
@@ -1893,6 +1925,7 @@ jSuites.calendar.prettifyAll = function() {
|
|
|
1893
1925
|
elements[i].innerHTML = jSuites.calendar.prettify(elements[i].getAttribute('data-date'));
|
|
1894
1926
|
} else {
|
|
1895
1927
|
if (elements[i].innerHTML) {
|
|
1928
|
+
elements[i].setAttribute('title', elements[i].innerHTML);
|
|
1896
1929
|
elements[i].setAttribute('data-date', elements[i].innerHTML);
|
|
1897
1930
|
elements[i].innerHTML = jSuites.calendar.prettify(elements[i].innerHTML);
|
|
1898
1931
|
}
|
|
@@ -2316,7 +2349,7 @@ jSuites.color = (function(el, options) {
|
|
|
2316
2349
|
}
|
|
2317
2350
|
|
|
2318
2351
|
obj.select = function(color) {
|
|
2319
|
-
// Remove current
|
|
2352
|
+
// Remove current selected mark
|
|
2320
2353
|
var selected = container.querySelector('.jcolor-selected');
|
|
2321
2354
|
if (selected) {
|
|
2322
2355
|
selected.classList.remove('jcolor-selected');
|
|
@@ -2326,6 +2359,8 @@ jSuites.color = (function(el, options) {
|
|
|
2326
2359
|
if (obj.values[color]) {
|
|
2327
2360
|
obj.values[color].classList.add('jcolor-selected');
|
|
2328
2361
|
}
|
|
2362
|
+
|
|
2363
|
+
obj.options.value = color;
|
|
2329
2364
|
}
|
|
2330
2365
|
|
|
2331
2366
|
/**
|
|
@@ -2947,8 +2982,13 @@ jSuites.contextmenu = (function(el, options) {
|
|
|
2947
2982
|
// Coordinates
|
|
2948
2983
|
if ((obj.options.items && obj.options.items.length > 0) || el.children.length) {
|
|
2949
2984
|
if (e.target) {
|
|
2950
|
-
|
|
2951
|
-
|
|
2985
|
+
if (e.changedTouches && e.changedTouches[0]) {
|
|
2986
|
+
x = e.changedTouches[0].clientX;
|
|
2987
|
+
y = e.changedTouches[0].clientY;
|
|
2988
|
+
} else {
|
|
2989
|
+
var x = e.clientX;
|
|
2990
|
+
var y = e.clientY;
|
|
2991
|
+
}
|
|
2952
2992
|
} else {
|
|
2953
2993
|
var x = e.x;
|
|
2954
2994
|
var y = e.y;
|
|
@@ -2978,6 +3018,10 @@ jSuites.contextmenu = (function(el, options) {
|
|
|
2978
3018
|
}
|
|
2979
3019
|
}
|
|
2980
3020
|
|
|
3021
|
+
obj.isOpened = function() {
|
|
3022
|
+
return el.classList.contains('jcontextmenu-focus') ? true : false;
|
|
3023
|
+
}
|
|
3024
|
+
|
|
2981
3025
|
/**
|
|
2982
3026
|
* Close menu
|
|
2983
3027
|
*/
|
|
@@ -7550,13 +7594,13 @@ jSuites.mask = (function() {
|
|
|
7550
7594
|
|
|
7551
7595
|
// New value
|
|
7552
7596
|
v = (''+v).split(decimal);
|
|
7553
|
-
v[0] = v[0].match(/[\-0-9]+/g
|
|
7597
|
+
v[0] = v[0].match(/[\-0-9]+/g);
|
|
7554
7598
|
if (v[0]) {
|
|
7555
7599
|
v[0] = v[0].join('');
|
|
7556
7600
|
}
|
|
7557
7601
|
if (v[0] || v[1]) {
|
|
7558
7602
|
if (v[1] !== undefined) {
|
|
7559
|
-
v[1] = v[1].match(/[0-9]+/g
|
|
7603
|
+
v[1] = v[1].match(/[0-9]+/g);
|
|
7560
7604
|
if (v[1]) {
|
|
7561
7605
|
v[1] = v[1].join('');
|
|
7562
7606
|
} else {
|
|
@@ -7566,11 +7610,10 @@ jSuites.mask = (function() {
|
|
|
7566
7610
|
} else {
|
|
7567
7611
|
return '';
|
|
7568
7612
|
}
|
|
7569
|
-
|
|
7570
7613
|
return v;
|
|
7571
7614
|
}
|
|
7572
7615
|
|
|
7573
|
-
var FormatValue = function(v) {
|
|
7616
|
+
var FormatValue = function(v, event) {
|
|
7574
7617
|
if (v == '') {
|
|
7575
7618
|
return '';
|
|
7576
7619
|
}
|
|
@@ -7583,10 +7626,6 @@ jSuites.mask = (function() {
|
|
|
7583
7626
|
if (v == '') {
|
|
7584
7627
|
return '';
|
|
7585
7628
|
}
|
|
7586
|
-
// Negative values
|
|
7587
|
-
if (v[0] === '-') {
|
|
7588
|
-
v[0] = '-0';
|
|
7589
|
-
}
|
|
7590
7629
|
// Temporary value
|
|
7591
7630
|
if (v[0]) {
|
|
7592
7631
|
var t = parseFloat(v[0] + '.1');
|
|
@@ -7596,6 +7635,11 @@ jSuites.mask = (function() {
|
|
|
7596
7635
|
} else {
|
|
7597
7636
|
var t = null;
|
|
7598
7637
|
}
|
|
7638
|
+
|
|
7639
|
+
if ((v[0] == '-' || v[0] == '-00') && ! v[1] && (event && event.inputType == "deleteContentBackward")) {
|
|
7640
|
+
return '';
|
|
7641
|
+
}
|
|
7642
|
+
|
|
7599
7643
|
var n = new Intl.NumberFormat(this.locale, o).format(t);
|
|
7600
7644
|
n = n.split(d);
|
|
7601
7645
|
if (typeof(n[1]) !== 'undefined') {
|
|
@@ -7614,7 +7658,7 @@ jSuites.mask = (function() {
|
|
|
7614
7658
|
return n.join('');
|
|
7615
7659
|
}
|
|
7616
7660
|
|
|
7617
|
-
var Format = function(e) {
|
|
7661
|
+
var Format = function(e, event) {
|
|
7618
7662
|
var v = Value.call(e);
|
|
7619
7663
|
if (! v) {
|
|
7620
7664
|
return;
|
|
@@ -7622,7 +7666,7 @@ jSuites.mask = (function() {
|
|
|
7622
7666
|
|
|
7623
7667
|
// Get decimal
|
|
7624
7668
|
var d = getDecimal.call(this);
|
|
7625
|
-
var n = FormatValue.call(this, v);
|
|
7669
|
+
var n = FormatValue.call(this, v, event);
|
|
7626
7670
|
var t = (n.length) - v.length;
|
|
7627
7671
|
var index = Caret.call(e) + t;
|
|
7628
7672
|
// Set value and update caret
|
|
@@ -8446,14 +8490,12 @@ jSuites.mask = (function() {
|
|
|
8446
8490
|
if (o.mask.indexOf('##') !== -1) {
|
|
8447
8491
|
var d = o.mask.split(';');
|
|
8448
8492
|
if (d[0]) {
|
|
8449
|
-
d[0] = d[0].replace('*', '');
|
|
8450
|
-
d[0] = d[0].replace(/_
|
|
8451
|
-
d[0] = d[0].replace(/-/g, '');
|
|
8452
|
-
d[0] = d[0].replace('(','');
|
|
8453
|
-
d[0] = d[0].replace(')','');
|
|
8493
|
+
d[0] = d[0].replace('*', '\t');
|
|
8494
|
+
d[0] = d[0].replace(new RegExp(/_-/g), ' ');
|
|
8454
8495
|
d[0] = d[0].replace('##0.###','##0.000');
|
|
8455
8496
|
d[0] = d[0].replace('##0.##','##0.00');
|
|
8456
8497
|
d[0] = d[0].replace('##0.#','##0.0');
|
|
8498
|
+
d[0] = d[0].replace(new RegExp(/\[.*?\]/),'');
|
|
8457
8499
|
}
|
|
8458
8500
|
o.mask = d[0];
|
|
8459
8501
|
}
|
|
@@ -8466,10 +8508,10 @@ jSuites.mask = (function() {
|
|
|
8466
8508
|
}
|
|
8467
8509
|
// On new input
|
|
8468
8510
|
if (typeof(e) !== 'object' || ! e.inputType || ! e.inputType.indexOf('insert') || ! e.inputType.indexOf('delete')) {
|
|
8469
|
-
// Start
|
|
8511
|
+
// Start transformation
|
|
8470
8512
|
if (o.locale) {
|
|
8471
8513
|
if (o.input) {
|
|
8472
|
-
Format.call(o, o.input);
|
|
8514
|
+
Format.call(o, o.input, e);
|
|
8473
8515
|
} else {
|
|
8474
8516
|
var newValue = FormatValue.call(o, o.value);
|
|
8475
8517
|
}
|
|
@@ -8584,6 +8626,8 @@ jSuites.mask = (function() {
|
|
|
8584
8626
|
if (typeof(options) != 'object') {
|
|
8585
8627
|
return value;
|
|
8586
8628
|
} else {
|
|
8629
|
+
options = Object.assign({}, options);
|
|
8630
|
+
|
|
8587
8631
|
if (! options.options) {
|
|
8588
8632
|
options.options = {};
|
|
8589
8633
|
}
|
|
@@ -8655,6 +8699,8 @@ jSuites.mask = (function() {
|
|
|
8655
8699
|
if (typeof(options) != 'object') {
|
|
8656
8700
|
return value;
|
|
8657
8701
|
} else {
|
|
8702
|
+
options = Object.assign({}, options);
|
|
8703
|
+
|
|
8658
8704
|
if (! options.options) {
|
|
8659
8705
|
options.options = {};
|
|
8660
8706
|
}
|
|
@@ -8695,10 +8741,11 @@ jSuites.mask = (function() {
|
|
|
8695
8741
|
if (typeof(value) === 'number') {
|
|
8696
8742
|
var t = null;
|
|
8697
8743
|
if (options.mask && fullMask) {
|
|
8698
|
-
var
|
|
8699
|
-
|
|
8700
|
-
|
|
8701
|
-
d = d[
|
|
8744
|
+
var d = getDecimal.call(options, options.mask);
|
|
8745
|
+
if (options.mask.indexOf(d) !== -1) {
|
|
8746
|
+
d = options.mask.split(d);
|
|
8747
|
+
d = (''+d[1].match(/[0-9]+/g))
|
|
8748
|
+
d = d.length;
|
|
8702
8749
|
t = value.toFixed(d);
|
|
8703
8750
|
} else {
|
|
8704
8751
|
t = value.toFixed(0);
|
|
@@ -10455,21 +10502,23 @@ jSuites.tabs = (function(el, options) {
|
|
|
10455
10502
|
// Helpers
|
|
10456
10503
|
var setBorder = function(index) {
|
|
10457
10504
|
if (obj.options.animation) {
|
|
10458
|
-
|
|
10505
|
+
setTimeout(function() {
|
|
10506
|
+
var rect = obj.headers.children[index].getBoundingClientRect();
|
|
10459
10507
|
|
|
10460
|
-
|
|
10461
|
-
|
|
10462
|
-
|
|
10463
|
-
|
|
10464
|
-
|
|
10465
|
-
|
|
10466
|
-
|
|
10508
|
+
if (obj.options.palette == 'modern') {
|
|
10509
|
+
border.style.width = rect.width - 4 + 'px';
|
|
10510
|
+
border.style.left = obj.headers.children[index].offsetLeft + 2 + 'px';
|
|
10511
|
+
} else {
|
|
10512
|
+
border.style.width = rect.width + 'px';
|
|
10513
|
+
border.style.left = obj.headers.children[index].offsetLeft + 'px';
|
|
10514
|
+
}
|
|
10467
10515
|
|
|
10468
|
-
|
|
10469
|
-
|
|
10470
|
-
|
|
10471
|
-
|
|
10472
|
-
|
|
10516
|
+
if (obj.options.position == 'bottom') {
|
|
10517
|
+
border.style.top = '0px';
|
|
10518
|
+
} else {
|
|
10519
|
+
border.style.bottom = '0px';
|
|
10520
|
+
}
|
|
10521
|
+
}, 150);
|
|
10473
10522
|
}
|
|
10474
10523
|
}
|
|
10475
10524
|
|
|
@@ -10586,6 +10635,8 @@ jSuites.tabs = (function(el, options) {
|
|
|
10586
10635
|
obj.options.oncreate(el, div)
|
|
10587
10636
|
}
|
|
10588
10637
|
|
|
10638
|
+
setBorder();
|
|
10639
|
+
|
|
10589
10640
|
return div;
|
|
10590
10641
|
}
|
|
10591
10642
|
|
|
@@ -10680,6 +10731,8 @@ jSuites.tabs = (function(el, options) {
|
|
|
10680
10731
|
}
|
|
10681
10732
|
|
|
10682
10733
|
obj.content.replaceChild(newContent, obj.content.children[position]);
|
|
10734
|
+
|
|
10735
|
+
setBorder();
|
|
10683
10736
|
}
|
|
10684
10737
|
|
|
10685
10738
|
obj.updatePosition = function(f, t) {
|
|
@@ -11689,6 +11742,14 @@ jSuites.toolbar = (function(el, options) {
|
|
|
11689
11742
|
toolbarItem.updateState(el, obj, toolbarItem, a, b);
|
|
11690
11743
|
}
|
|
11691
11744
|
}
|
|
11745
|
+
for (var i = 0; i < toolbarFloating.children.length; i++) {
|
|
11746
|
+
// Toolbar element
|
|
11747
|
+
var toolbarItem = toolbarFloating.children[i];
|
|
11748
|
+
// State management
|
|
11749
|
+
if (typeof(toolbarItem.updateState) == 'function') {
|
|
11750
|
+
toolbarItem.updateState(el, obj, toolbarItem, a, b);
|
|
11751
|
+
}
|
|
11752
|
+
}
|
|
11692
11753
|
}
|
|
11693
11754
|
|
|
11694
11755
|
obj.create = function(items) {
|
package/package.json
CHANGED