cavalion-vcl 1.1.80 → 1.1.82
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 +30 -0
- package/package.json +1 -1
- package/src/Application.js +60 -1
- package/src/Component.js +6 -8
- package/src/Control.js +39 -5
- package/src/Factory.js +1 -0
- package/src/data/Array.js +32 -2
- package/src/prototypes/App.console.js +1 -0
- package/src/prototypes/App.v1.js +1 -1
- package/src/prototypes/blocks/App.js +5 -0
- package/src/prototypes/cavalion-blocks.js +2 -2
- package/src/prototypes/ui/forms/Home.js +1 -1
- package/src/prototypes/ui/forms/Home.tabs.js +9 -0
- package/src/prototypes/ui/forms/Home.tree.js +51 -56
- package/src/prototypes/ui/forms/Portal.js +50 -50
- package/src/prototypes/ui/forms/View.js +1 -97
- package/src/prototypes/ui/forms/util/Console.js +2 -2
- package/src/ui/Ace.js +2 -1
- package/src/ui/Console.js +13 -11
- package/src/ui/List.js +26 -19
- package/src/ui/ListColumn.js +1 -1
- package/src/ui/ListRow.js +1 -1
- package/src/ui/Panel.js +7 -1
- package/src/ui/Tab.js +5 -1
- package/src/ui/Tabs.js +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,33 @@
|
|
|
1
|
+
### `2024/07/07` - 1.1.82
|
|
2
|
+
|
|
3
|
+
* **cavalion-blocks<>:**
|
|
4
|
+
* Emits container-ready
|
|
5
|
+
* **prototypes/ui/forms/Home.tree**:
|
|
6
|
+
* Scrolls new tree nodes into view upon creation
|
|
7
|
+
* **Component**:
|
|
8
|
+
* Adjusts Component.prototype.revertPropertyValue() so that it returns the value which has been set
|
|
9
|
+
* ** Control**:
|
|
10
|
+
* Introduces Control.prototype.syncClasses()
|
|
11
|
+
* Fixes issues with qsn and qsna
|
|
12
|
+
* Introduces reflectActionEvent, which is overridden by Ace, in order to block content from overwriting value/text
|
|
13
|
+
* **Tabs**:
|
|
14
|
+
* Adds support for deselecting tabs with alt-modifier
|
|
15
|
+
* **List**:
|
|
16
|
+
* Improves event columnsChanged
|
|
17
|
+
* **Console**
|
|
18
|
+
* Adds support for logging to console
|
|
19
|
+
* **Array**
|
|
20
|
+
* fixes a bug in getAttributeNames(), I just don't understand why it surfaced all the sudden, feel like it should've bothered me way before
|
|
21
|
+
|
|
22
|
+
### `2024/05/20` - 1.1.81
|
|
23
|
+
|
|
24
|
+
* **Panel**:
|
|
25
|
+
- Refines zoom calculations to recursively retrieve zoom factor from parent elements
|
|
26
|
+
* **ListColumn**:
|
|
27
|
+
- Animates the automatic adjustment of column width
|
|
28
|
+
* **data/Array**:
|
|
29
|
+
- Enhances/optimizes prototype.**splice()** in order to avoid "_RangeError: Maximum call stack size exceeded_"-exception while adding "100s of 1000s" of items
|
|
30
|
+
|
|
1
31
|
### `2024/03/28` - 1.1.80
|
|
2
32
|
|
|
3
33
|
* **Component**: Enhances querying attributes: now supports use of regexp, eg: app.qs("*[attr=/value/]")
|
package/package.json
CHANGED
package/src/Application.js
CHANGED
|
@@ -8,6 +8,8 @@ define(function(require) {
|
|
|
8
8
|
var CssRules = require("./CssRules");
|
|
9
9
|
|
|
10
10
|
var instances = [];
|
|
11
|
+
|
|
12
|
+
|
|
11
13
|
|
|
12
14
|
return (Application = Application(require, {
|
|
13
15
|
inherits: Component,
|
|
@@ -26,7 +28,64 @@ define(function(require) {
|
|
|
26
28
|
writeStorage: function(key, value, callback, errback) {
|
|
27
29
|
var app = this.get();
|
|
28
30
|
return app.writeStorage.apply(app, arguments);
|
|
31
|
+
},
|
|
32
|
+
|
|
33
|
+
updateFavicons(htmldoc, basePath, sizes) {
|
|
34
|
+
const head = htmldoc.head;
|
|
35
|
+
const faviconTypes = {
|
|
36
|
+
"16x16": "image/png",
|
|
37
|
+
"32x32": "image/png",
|
|
38
|
+
"192x192": "image/png",
|
|
39
|
+
"512x512": "image/png",
|
|
40
|
+
"ico": "image/x-icon",
|
|
41
|
+
"apple-touch-icon": "image/png"
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
// Ensure the basePath is an absolute URL relative to the htmldoc's location
|
|
45
|
+
const absolutePath = new URL(basePath, htmldoc.location).href;
|
|
46
|
+
|
|
47
|
+
// Keep track of existing links to remove those not needed anymore
|
|
48
|
+
const existingLinks = Array.from(htmldoc.querySelectorAll('link[rel="icon"], link[rel="apple-touch-icon"], link[rel="manifest"]'));
|
|
49
|
+
|
|
50
|
+
// Create or update favicon links
|
|
51
|
+
sizes.forEach(size => {
|
|
52
|
+
let type = faviconTypes[size] || "image/png";
|
|
53
|
+
let rel = size === "ico" ? "icon" : (size === "apple-touch-icon" ? "apple-touch-icon" : "icon");
|
|
54
|
+
let href = `${absolutePath}/favicon${size === "ico" ? "" : `-${size}`}.${size === "ico" ? "ico" : "png"}`;
|
|
55
|
+
let link = htmldoc.querySelector(`link[rel="${rel}"][sizes="${size}"]`);
|
|
56
|
+
|
|
57
|
+
if (!link) {
|
|
58
|
+
link = htmldoc.createElement("link");
|
|
59
|
+
link.rel = rel;
|
|
60
|
+
if (size !== "ico" && size !== "apple-touch-icon") {
|
|
61
|
+
link.sizes = size;
|
|
62
|
+
}
|
|
63
|
+
link.type = type;
|
|
64
|
+
link.href = href;
|
|
65
|
+
head.appendChild(link);
|
|
66
|
+
} else {
|
|
67
|
+
link.href = href;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
// Remove the link from the existingLinks array as it is being reused
|
|
71
|
+
existingLinks.splice(existingLinks.indexOf(link), 1);
|
|
72
|
+
});
|
|
73
|
+
|
|
74
|
+
// Create or update manifest link
|
|
75
|
+
let manifestLink = htmldoc.querySelector('link[rel="manifest"]');
|
|
76
|
+
if (!manifestLink) {
|
|
77
|
+
manifestLink = htmldoc.createElement("link");
|
|
78
|
+
manifestLink.rel = "manifest";
|
|
79
|
+
manifestLink.href = `${absolutePath}/site.webmanifest`;
|
|
80
|
+
head.appendChild(manifestLink);
|
|
81
|
+
} else {
|
|
82
|
+
manifestLink.href = `${absolutePath}/site.webmanifest`;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
// Remove all remaining existing links that were not reused
|
|
86
|
+
existingLinks.forEach(link => head.removeChild(link));
|
|
29
87
|
}
|
|
88
|
+
|
|
30
89
|
},
|
|
31
90
|
prototype: {
|
|
32
91
|
_dispatcher: null,
|
|
@@ -252,7 +311,7 @@ define(function(require) {
|
|
|
252
311
|
document.querySelector("html head").appendChild(link);
|
|
253
312
|
}
|
|
254
313
|
link.setAttribute("href", value);
|
|
255
|
-
this._icon = value;
|
|
314
|
+
// Application.updateFavicons(document, this._icon = value, ["16x16", "32x32", "192x192", "512x512", "ico", "apple-touch-icon"]);
|
|
256
315
|
}
|
|
257
316
|
},
|
|
258
317
|
getCssRules: function() {
|
package/src/Component.js
CHANGED
|
@@ -487,18 +487,15 @@ define(function (require) {
|
|
|
487
487
|
},
|
|
488
488
|
revertPropertyValue: function (name) {
|
|
489
489
|
var property = this.defineProperties()[name];
|
|
490
|
-
|
|
490
|
+
var value = this.getPropertyValue(name);
|
|
491
|
+
property.set(this, value);
|
|
492
|
+
return value;
|
|
491
493
|
},
|
|
492
494
|
getPropertyValue: function (name) {
|
|
493
495
|
return this['@properties'] ? this['@properties'][name] : undefined;
|
|
494
496
|
},
|
|
495
497
|
|
|
496
498
|
vars: function(key, value) {
|
|
497
|
-
/*-
|
|
498
|
-
this.vars("control")
|
|
499
|
-
this.vars("resource")
|
|
500
|
-
this.vars(["resource", true])
|
|
501
|
-
*/
|
|
502
499
|
if(arguments.length === 0) {
|
|
503
500
|
return this.getVars();
|
|
504
501
|
}
|
|
@@ -506,7 +503,6 @@ define(function (require) {
|
|
|
506
503
|
return this.setVar("" + key, value);
|
|
507
504
|
}
|
|
508
505
|
if(arguments.length === 3) {
|
|
509
|
-
value = arguments[3];
|
|
510
506
|
return this.getVar.apply(this, arguments);
|
|
511
507
|
}
|
|
512
508
|
if(key instanceof Array) {
|
|
@@ -561,7 +557,9 @@ define(function (require) {
|
|
|
561
557
|
if(fallback_to_owner === true && this._owner !== null) {
|
|
562
558
|
r = this._owner.getVar(namePath, true, defaultValue);
|
|
563
559
|
} else if(arguments.length === 3) {
|
|
564
|
-
r = defaultValue
|
|
560
|
+
if((r = defaultValue) !== undefined) {
|
|
561
|
+
this.setVar(namePath, defaultValue);
|
|
562
|
+
}
|
|
565
563
|
}
|
|
566
564
|
}
|
|
567
565
|
return r;
|
package/src/Control.js
CHANGED
|
@@ -552,6 +552,15 @@ define(function(require) {
|
|
|
552
552
|
},
|
|
553
553
|
finalizeNodes: function() {},
|
|
554
554
|
|
|
555
|
+
qsn: function() {
|
|
556
|
+
const node = this.nodeNeeded();
|
|
557
|
+
return node.qs.apply(node, arguments);
|
|
558
|
+
},
|
|
559
|
+
qsna: function() {
|
|
560
|
+
const node = this.nodeNeeded();
|
|
561
|
+
return node.qsa.apply(node, arguments);
|
|
562
|
+
},
|
|
563
|
+
|
|
555
564
|
createDragger: function() {
|
|
556
565
|
return new Dragger(this);
|
|
557
566
|
},
|
|
@@ -922,6 +931,28 @@ define(function(require) {
|
|
|
922
931
|
});
|
|
923
932
|
this.applyClasses();
|
|
924
933
|
},
|
|
934
|
+
syncClasses: function(classes, values) {
|
|
935
|
+
/*- The syncClasses method synchronizes the presence of specified CSS classes on an element based on corresponding boolean values or functions.
|
|
936
|
+
**Parameters**:
|
|
937
|
+
- classes (Array of Strings): An array of class names to be synchronized.
|
|
938
|
+
- values (Array of Booleans/Functions): An array where each value determines whether the corresponding class should be present. If a function is provided, it is called with the element, class name, and current presence of the class, and should return a boolean.
|
|
939
|
+
**Returns** (Boolean): true if any class was added or removed; otherwise, false. */
|
|
940
|
+
let changed = false;
|
|
941
|
+
values.map((v, i) => {
|
|
942
|
+
const cl = classes[i];
|
|
943
|
+
const has = this.hasClass(cl);
|
|
944
|
+
const should = typeof v === "function" ? v(this, cl, has) : !!v;
|
|
945
|
+
|
|
946
|
+
if(has && !should) {
|
|
947
|
+
this.removeClass(cl);
|
|
948
|
+
changed = true;
|
|
949
|
+
} else if(!has && should) {
|
|
950
|
+
this.addClass(cl);
|
|
951
|
+
changed = true;
|
|
952
|
+
}
|
|
953
|
+
});
|
|
954
|
+
return changed;
|
|
955
|
+
},
|
|
925
956
|
hasState: function(state) {
|
|
926
957
|
/** @param state {String} ControlState * @returns
|
|
927
958
|
*/
|
|
@@ -1653,11 +1684,7 @@ this._updateCalls = this._updateCalls || 0; this._updateCalls++;
|
|
|
1653
1684
|
if(this._action !== null) {
|
|
1654
1685
|
this._actionListeners = this._action.on({
|
|
1655
1686
|
"change"(evt) {
|
|
1656
|
-
|
|
1657
|
-
if(evt && evt.what.includes && evt.what.includes("content")) {
|
|
1658
|
-
me._node.innerHTML = me.getInnerHtml();
|
|
1659
|
-
}
|
|
1660
|
-
}
|
|
1687
|
+
me.reflectActionEvent(evt);
|
|
1661
1688
|
me.update(); },
|
|
1662
1689
|
"destroy"() { me.setAction(null); }
|
|
1663
1690
|
});
|
|
@@ -1668,6 +1695,13 @@ this._updateCalls = this._updateCalls || 0; this._updateCalls++;
|
|
|
1668
1695
|
}
|
|
1669
1696
|
}
|
|
1670
1697
|
},
|
|
1698
|
+
reflectActionEvent(evt) {
|
|
1699
|
+
if(this._node) {
|
|
1700
|
+
if(evt && evt.what.includes && evt.what.includes("content")) {
|
|
1701
|
+
this._node.innerHTML = this.getInnerHtml();
|
|
1702
|
+
}
|
|
1703
|
+
}
|
|
1704
|
+
},
|
|
1671
1705
|
|
|
1672
1706
|
|
|
1673
1707
|
// PROPERTIES
|
package/src/Factory.js
CHANGED
|
@@ -157,6 +157,7 @@ define(function(require) {
|
|
|
157
157
|
return this.doLoad(source, success, failure);
|
|
158
158
|
},
|
|
159
159
|
doLoad: function(source, success, failure) {
|
|
160
|
+
this._source = source;
|
|
160
161
|
if(typeof failure === "function") {
|
|
161
162
|
try {
|
|
162
163
|
return this.doLoad_(source, success, failure);
|
package/src/data/Array.js
CHANGED
|
@@ -113,7 +113,7 @@ define(function(require) {
|
|
|
113
113
|
}
|
|
114
114
|
});
|
|
115
115
|
}
|
|
116
|
-
});
|
|
116
|
+
}, this);
|
|
117
117
|
|
|
118
118
|
return keys;
|
|
119
119
|
},
|
|
@@ -267,7 +267,37 @@ define(function(require) {
|
|
|
267
267
|
splice: function() {
|
|
268
268
|
this.assertArray();
|
|
269
269
|
try {
|
|
270
|
-
return window.Array.prototype.splice.apply(this._array,
|
|
270
|
+
// return window.Array.prototype.splice.apply(this._array,
|
|
271
|
+
// this._array.length === 0 ?
|
|
272
|
+
// [0, 0].concat(js.copy_args(arguments).slice(2)) :
|
|
273
|
+
// arguments);
|
|
274
|
+
|
|
275
|
+
const MAX_SEGMENT_SIZE = 15000;
|
|
276
|
+
|
|
277
|
+
// Voorbereiding van argumenten en controleer de conditie
|
|
278
|
+
let args;
|
|
279
|
+
if (this._array.length === 0) {
|
|
280
|
+
args = [0, 0, ...js.copy_args(arguments).slice(2)];
|
|
281
|
+
} else {
|
|
282
|
+
args = window.Array.prototype.slice.call(arguments);
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
// Het eerste deel van de argumenten dat niet de daadwerkelijke elementen van res bevat
|
|
286
|
+
const initialArgs = args.slice(0, 2);
|
|
287
|
+
// De elementen van res die toegevoegd moeten worden
|
|
288
|
+
const elementsToAdd = args.slice(2);
|
|
289
|
+
|
|
290
|
+
// Voer de splice in segmenten uit als het aantal elementen groter is dan MAX_SEGMENT_SIZE
|
|
291
|
+
while (elementsToAdd.length > 0) {
|
|
292
|
+
// Bepaal het huidige segment
|
|
293
|
+
const currentSegment = elementsToAdd.splice(0, MAX_SEGMENT_SIZE);
|
|
294
|
+
// Voer splice uit voor het huidige segment
|
|
295
|
+
window.Array.prototype.splice.apply(this._array, [...initialArgs, ...currentSegment]);
|
|
296
|
+
// Update initialArgs voor volgende iteraties: stel startIndex bij en reset deleteCount naar 0
|
|
297
|
+
initialArgs[0] += MAX_SEGMENT_SIZE; // Verplaats de startindex
|
|
298
|
+
initialArgs[1] = 0; // Geen elementen te verwijderen in volgende segmenten
|
|
299
|
+
}
|
|
300
|
+
|
|
271
301
|
} finally {
|
|
272
302
|
this.arrayChanged();
|
|
273
303
|
}
|
package/src/prototypes/App.v1.js
CHANGED
|
@@ -64,7 +64,7 @@ var FormContainer = require("vcl/ui/FormContainer");
|
|
|
64
64
|
'vertical-align': "top",
|
|
65
65
|
'&.disabled': "color:gray;",
|
|
66
66
|
'&:not(:active)': "margin-bottom:4px;",
|
|
67
|
-
'&:active
|
|
67
|
+
'&:active': "margin-bottom:0;margin-top:2px;border:2px solid rgb(57,121,217); padding-left:8px; padding-right:6px; background:-webkit-linear-gradient(top, rgb(255, 255, 255) 10%, rgb(227, 227, 227) 100%);"
|
|
68
68
|
}
|
|
69
69
|
}
|
|
70
70
|
}, [
|
|
@@ -9,17 +9,17 @@
|
|
|
9
9
|
- vars.onLoad
|
|
10
10
|
|
|
11
11
|
*/
|
|
12
|
-
|
|
13
12
|
["vcl/ui/Panel", {
|
|
14
13
|
align: "client",
|
|
15
14
|
onNodeCreated() {
|
|
16
15
|
var uri = this.vars("uri") || js.sf("%s<%s>", this.getSpecializer(), this.vars("specializer") || this._name);
|
|
17
|
-
var onLoad = this.vars("onLoad");
|
|
18
16
|
require("B").instantiate(uri, { owner: this }).then(_ => {
|
|
17
|
+
const onLoad = this.vars("onLoad");
|
|
19
18
|
_.setParent(this); // TODO why can't this be in property decl?
|
|
20
19
|
if(onLoad) {
|
|
21
20
|
onLoad.apply(this, [_]);
|
|
22
21
|
}
|
|
22
|
+
this.emit("container-ready", [_]);
|
|
23
23
|
});
|
|
24
24
|
}
|
|
25
25
|
}];
|
|
@@ -18,7 +18,7 @@ var Node = require("vcl/ui/Node");
|
|
|
18
18
|
}
|
|
19
19
|
}, [
|
|
20
20
|
[("#menubar"), { visible: false }],
|
|
21
|
-
[("#client"), { css: "border-left: none;"}],
|
|
21
|
+
[("#client"), { css: "border-left: none;" }],
|
|
22
22
|
[("#left"), {}, [
|
|
23
23
|
[("vcl/ui/Tree"), "tree", {
|
|
24
24
|
onSelectionChange: function(selection) {
|
|
@@ -379,16 +379,11 @@ var Handlers = {
|
|
|
379
379
|
|
|
380
380
|
if(message.activate !== false) {
|
|
381
381
|
scope.tree.setSelection([node]);
|
|
382
|
+
node.update(() => node.scrollIntoView());
|
|
382
383
|
} else if(message.lazyLoad !== true) {
|
|
383
384
|
container.forceLoad();
|
|
384
385
|
}
|
|
385
386
|
|
|
386
|
-
// parent && parent.setTimeout("update", () => {
|
|
387
|
-
// // Hmprf, what is going on here?
|
|
388
|
-
// parent._parent.updateChildren(true, true);
|
|
389
|
-
// parent._parent.updateChildren(true, true);
|
|
390
|
-
// }, 500);
|
|
391
|
-
|
|
392
387
|
return true;
|
|
393
388
|
}
|
|
394
389
|
}
|
|
@@ -397,56 +392,56 @@ var Handlers = {
|
|
|
397
392
|
onDispatchChildEvent: Handlers["client.onDispatchChildEvent"]
|
|
398
393
|
}],
|
|
399
394
|
[("#tree"), {
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
// "background-color": "#f0f0f0"
|
|
432
|
-
// "background-color": "silver"
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
// color: "inherit"
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
// "background-color": "#f0f0f0",
|
|
440
|
-
// color: "inherit"
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
395
|
+
// css: {
|
|
396
|
+
// "margin": "8px",
|
|
397
|
+
// "padding-left": "16px",
|
|
398
|
+
// ".{./Node}": {
|
|
399
|
+
// "&.loading": {
|
|
400
|
+
// ">.selection": {
|
|
401
|
+
// "background-image": "url(/shared/vcl/images/loading.gif)",
|
|
402
|
+
// "background-repeat": "no-repeat",
|
|
403
|
+
// "background-position": "10px 5px",
|
|
404
|
+
// // "opacity": "0.5"
|
|
405
|
+
// },
|
|
406
|
+
// "&.selected >.text": {
|
|
407
|
+
// "font-weight": "normal"
|
|
408
|
+
// }
|
|
409
|
+
// },
|
|
410
|
+
// ">.text": {
|
|
411
|
+
// "&:focus": {
|
|
412
|
+
// outline: "none"
|
|
413
|
+
// },
|
|
414
|
+
// // "padding-top": "2px"
|
|
415
|
+
// },
|
|
416
|
+
// ">.selection": {
|
|
417
|
+
// //height: "20px"
|
|
418
|
+
// color: "red"
|
|
419
|
+
// },
|
|
420
|
+
// "&.disabled": {
|
|
421
|
+
// cursor: "default",
|
|
422
|
+
// color: "silver"
|
|
423
|
+
// },
|
|
424
|
+
// "&.selected": {
|
|
425
|
+
// ">.selection": {
|
|
426
|
+
// // "background-color": "#f0f0f0"
|
|
427
|
+
// // "background-color": "silver"
|
|
428
|
+
// },
|
|
429
|
+
// ">.icon": {
|
|
430
|
+
// // color: "inherit"
|
|
431
|
+
// },
|
|
432
|
+
// ">.text": {
|
|
433
|
+
// "font-weight": "bold",
|
|
434
|
+
// // "background-color": "#f0f0f0",
|
|
435
|
+
// // color: "inherit"
|
|
436
|
+
// "&:hover": {
|
|
437
|
+
// ">.close": {
|
|
438
|
+
// visibility: "inherit",
|
|
439
|
+
// }
|
|
440
|
+
// }
|
|
441
|
+
// }
|
|
442
|
+
// }
|
|
443
|
+
// }
|
|
444
|
+
// },
|
|
450
445
|
onNodesNeeded: Handlers["tree.onNodesNeeded"],
|
|
451
446
|
onSelectionChange: Handlers["tree.onSelectionChange"]
|
|
452
447
|
}]
|
|
@@ -16,57 +16,57 @@ var Component = require("vcl/Component");
|
|
|
16
16
|
[["ui/Form"], {
|
|
17
17
|
css: {
|
|
18
18
|
// TODO refactor to higher level (one inmem-css-decl please)
|
|
19
|
-
"#tabs": {
|
|
20
|
-
"padding-top": "2px",
|
|
21
|
-
"margin-left": "32px",
|
|
22
|
-
".{./Tab}": {
|
|
23
|
-
display: "inline-block",
|
|
24
|
-
border: "1px solid transparent",
|
|
25
|
-
"border-top-left-radius": "3px",
|
|
26
|
-
"border-top-right-radius": "3px",
|
|
27
|
-
"border-bottom": "none",
|
|
28
|
-
padding: "3px 8px 2px 8px",
|
|
29
|
-
// "margin-left": "3px",
|
|
30
|
-
// "margin-right": "3px",
|
|
31
|
-
cursor: "pointer",
|
|
32
|
-
"background-color": "#f0f0f0",
|
|
33
|
-
"border-color": "gray",
|
|
34
|
-
color: "gray",
|
|
35
|
-
"vertical-align": "bottom",
|
|
36
|
-
"&:hover": {
|
|
37
|
-
// "padding-top": "4px",
|
|
38
|
-
color: "black",
|
|
39
|
-
padding: "3px 8px 3px 8px",
|
|
40
|
-
"margin-top": "0"
|
|
41
|
-
},
|
|
42
|
-
"&.selected": {
|
|
43
|
-
// "padding-top": "4px",
|
|
44
|
-
"background-color": "#fcfcfc",
|
|
45
|
-
"border-color": "gray",
|
|
46
|
-
"margin-top": "0",
|
|
47
|
-
padding: "3px 8px 3px 8px",
|
|
48
|
-
color: "black"
|
|
49
|
-
},
|
|
50
|
-
"&.disabled": {
|
|
51
|
-
cursor: "default",
|
|
52
|
-
color: "silver"
|
|
53
|
-
},
|
|
54
|
-
".hidden": {
|
|
55
|
-
display: "none"
|
|
56
|
-
}
|
|
57
|
-
},
|
|
58
|
-
"&.bottom": {
|
|
59
|
-
"background-color": "#dfdfdf",
|
|
60
|
-
"border-top": "1px solid #a3a3a3",
|
|
61
|
-
"padding-top": "0px",
|
|
62
|
-
"padding-bottom": "1px",
|
|
63
|
-
".{./Tab}": {
|
|
64
|
-
border: "1px solid transparent",
|
|
65
|
-
"border-top": "none"
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
},
|
|
69
19
|
"#top": {
|
|
20
|
+
"#tabs": {
|
|
21
|
+
"padding-top": "2px",
|
|
22
|
+
"margin-left": "32px",
|
|
23
|
+
".{./Tab}": {
|
|
24
|
+
display: "inline-block",
|
|
25
|
+
border: "1px solid transparent",
|
|
26
|
+
"border-top-left-radius": "3px",
|
|
27
|
+
"border-top-right-radius": "3px",
|
|
28
|
+
"border-bottom": "none",
|
|
29
|
+
padding: "3px 8px 2px 8px",
|
|
30
|
+
// "margin-left": "3px",
|
|
31
|
+
// "margin-right": "3px",
|
|
32
|
+
cursor: "pointer",
|
|
33
|
+
"background-color": "#f0f0f0",
|
|
34
|
+
"border-color": "gray",
|
|
35
|
+
color: "gray",
|
|
36
|
+
"vertical-align": "bottom",
|
|
37
|
+
"&:hover": {
|
|
38
|
+
// "padding-top": "4px",
|
|
39
|
+
color: "black",
|
|
40
|
+
// padding: "3px 8px 3px 8px",
|
|
41
|
+
// "margin-top": "0"
|
|
42
|
+
},
|
|
43
|
+
"&.selected": {
|
|
44
|
+
// "padding-top": "4px",
|
|
45
|
+
"background-color": "#fcfcfc",
|
|
46
|
+
"border-color": "gray",
|
|
47
|
+
"margin-top": "0",
|
|
48
|
+
padding: "3px 8px 3px 8px",
|
|
49
|
+
color: "black"
|
|
50
|
+
},
|
|
51
|
+
"&.disabled": {
|
|
52
|
+
cursor: "default",
|
|
53
|
+
color: "silver"
|
|
54
|
+
},
|
|
55
|
+
".hidden": {
|
|
56
|
+
display: "none"
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
"&.bottom": {
|
|
60
|
+
"background-color": "#dfdfdf",
|
|
61
|
+
"border-top": "1px solid #a3a3a3",
|
|
62
|
+
"padding-top": "0px",
|
|
63
|
+
"padding-bottom": "1px",
|
|
64
|
+
".{./Tab}": {
|
|
65
|
+
border: "1px solid transparent",
|
|
66
|
+
"border-top": "none"
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
70
|
// "background-color": "rgba(232, 240, 254)",
|
|
71
71
|
"padding-bottom": "8px",
|
|
72
72
|
"padding-top": "8px",
|
|
@@ -1,102 +1,6 @@
|
|
|
1
1
|
"use js";
|
|
2
2
|
|
|
3
|
-
[["ui/Form"], {
|
|
4
|
-
css: {
|
|
5
|
-
// TODO refactor to be 'singleton' (iykwim)
|
|
6
|
-
'#menubar#menubar#menubar': {
|
|
7
|
-
'&.loading': "background: url(/shared/vcl/images/loading.gif) no-repeat 50% 50%;",
|
|
8
|
-
'&.nested-in-tabs': {
|
|
9
|
-
'': "padding: 2px; border: none;",
|
|
10
|
-
'.{Button}': "padding:2px 5px;"
|
|
11
|
-
},
|
|
12
|
-
'padding': "4px",
|
|
13
|
-
'overflow': "hidden",
|
|
14
|
-
'border-bottom': "1px solid #f0f0f0",
|
|
15
|
-
'.disabled.disabled.disabled.disabled.disabled': "color:silver;cursor:default;",
|
|
16
|
-
'.right': "float: right;",
|
|
17
|
-
'.{Button}': {
|
|
18
|
-
outline: "none",
|
|
19
|
-
'&:not(.right)': "margin-right: 8px;",
|
|
20
|
-
'background': "none",
|
|
21
|
-
'background-color': "transparent",
|
|
22
|
-
'border': "none",
|
|
23
|
-
'text-shadow': "none",
|
|
24
|
-
'&.link': {
|
|
25
|
-
'color': "blue",
|
|
26
|
-
'text-decoration': "underline"
|
|
27
|
-
},
|
|
28
|
-
'box-shadow': "none",
|
|
29
|
-
cursor: "pointer",
|
|
30
|
-
padding: "2px 4px 2px 4px",
|
|
31
|
-
'&.disabled': {
|
|
32
|
-
color: "silver",
|
|
33
|
-
cursor: "default"
|
|
34
|
-
},
|
|
35
|
-
'&:hover': "background-color: #f0f0f0;",
|
|
36
|
-
'&.pressed': "background-color: #f0f0f0;color:rgb(56, 121, 217);",
|
|
37
|
-
'&:not(.disabled):active': {
|
|
38
|
-
color: "rgb(56, 121, 217)",
|
|
39
|
-
'background-color': "#f0f0f0"
|
|
40
|
-
},
|
|
41
|
-
'&.selected': "background-color: rgb(56, 121, 217); color: white;"
|
|
42
|
-
},
|
|
43
|
-
'.{Tab}': {
|
|
44
|
-
cursor: "pointer",
|
|
45
|
-
padding: "2px 4px 2px 4px",
|
|
46
|
-
display: "inline-block",
|
|
47
|
-
'margin-right': "8px",
|
|
48
|
-
'border-radius': "3px",
|
|
49
|
-
'&.selected': "background-color: rgb(56, 121, 217); color: white;",
|
|
50
|
-
'&:not(.disabled):active': {
|
|
51
|
-
color: "rgb(56, 121, 217)",
|
|
52
|
-
'background-color': "#f0f0f0"
|
|
53
|
-
}
|
|
54
|
-
},
|
|
55
|
-
|
|
56
|
-
'.submit.submit.submit': {
|
|
57
|
-
'&:not(:active)': "background-color:limegreen;color:white;",
|
|
58
|
-
'&:active': "color:green;"
|
|
59
|
-
},
|
|
60
|
-
'.cancel.cancel.cancel': {
|
|
61
|
-
'&:not(:active)': "background-color:red;color:#f0f0f0;",
|
|
62
|
-
'&:active': "color:red;"
|
|
63
|
-
}
|
|
64
|
-
},
|
|
65
|
-
'#left': {
|
|
66
|
-
'#left_content': {
|
|
67
|
-
'padding': "8px",
|
|
68
|
-
'padding-left': "16px",
|
|
69
|
-
'min-height': "96px",
|
|
70
|
-
},
|
|
71
|
-
'#menubar': {
|
|
72
|
-
'position': "static",
|
|
73
|
-
'padding': "8px 0 10px 0",
|
|
74
|
-
'.{./Button}': {
|
|
75
|
-
'cursor': "pointer",
|
|
76
|
-
'outline': "none",
|
|
77
|
-
'padding': "2px",
|
|
78
|
-
'background': "none",
|
|
79
|
-
'border': "none",
|
|
80
|
-
'background-color': "transparent",
|
|
81
|
-
'color': "blue",
|
|
82
|
-
'text-shadow': "none",
|
|
83
|
-
'text-decoration': "underline",
|
|
84
|
-
'box-shadow': "none",
|
|
85
|
-
'margin-top': "2px",
|
|
86
|
-
'&.disabled': {
|
|
87
|
-
'color': "silver",
|
|
88
|
-
'cursor': "default"
|
|
89
|
-
},
|
|
90
|
-
'&:not(.disabled):active': {
|
|
91
|
-
'color': "rgb(56, 121, 217)",
|
|
92
|
-
'background-color': "#f0f0f0"
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
},
|
|
97
|
-
'#description': "color: gray;"
|
|
98
|
-
}
|
|
99
|
-
}, [
|
|
3
|
+
[["ui/Form"], {}, [
|
|
100
4
|
["vcl/ui/Panel", ("left"), { align: "left", width: 325 }, [
|
|
101
5
|
["vcl/ui/Panel", ("left_content"), { align: "top", autoSize: "height" }, [
|
|
102
6
|
["vcl/ui/Element", ("description"), {
|
|
@@ -80,8 +80,8 @@ var cl = console.log;
|
|
|
80
80
|
|
|
81
81
|
var down;
|
|
82
82
|
// FIXME overriding dispatcher, Application.prototype.dispatchEvent(...)
|
|
83
|
-
|
|
84
|
-
|
|
83
|
+
this.app()._dispatcher.override({
|
|
84
|
+
dispatch: function (component, name, evt) {
|
|
85
85
|
if(evt.keyCode === 27 /* Escape */) {
|
|
86
86
|
if (sizer._control !== null) {
|
|
87
87
|
if (name === "keydown" && evt.ctrlKey === false) {
|
package/src/ui/Ace.js
CHANGED
|
@@ -133,7 +133,8 @@ function(require, Ace, ace, DefaultCommands, Panel, Type, Text) {
|
|
|
133
133
|
setMode: function (mode) {
|
|
134
134
|
this.getEditor().session.setMode("ace/mode/" + mode);
|
|
135
135
|
},
|
|
136
|
-
|
|
136
|
+
|
|
137
|
+
reflectActionEvent(evt) {},
|
|
137
138
|
getDiffs: function(originalText) {
|
|
138
139
|
var dmp = new Text.dmp();
|
|
139
140
|
var editor = this.getEditor();
|
package/src/ui/Console.js
CHANGED
|
@@ -15,7 +15,8 @@ define(function(require) {
|
|
|
15
15
|
'collapsed': "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAANH2lDQ1BJQ0MgUHJvZmlsZQAAeJyV13k0lH0bB/DrnhnGMsYYO2Fkl31fsm+JsmZLSXaGmZAkZUnKm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6G+3X1GFaMM+YHnSld7i/va1hXBiGGOIZxRnvGWiZZpvPMeOYY5gVcEG6ExRPvjv/M6s06QQghrLIlELmIRezq7E0cbhwLnGl/md7JO/fLs7UgIlj+y7LNuuRfjsOkDP80/FvwL79vNGu1yn7b/S33n93+L7U+A348/tZ/VxvW83e3sTf+lJus9FtuNv2G3QuaG3qvZG74LSFuCL5XuWG4+vi64qc9G44bR5sTX71oyW5tfx32RqCj/h21s6wrvruhJ6xXvC+g3/hj4oDe4MnP+7+UfJ0f6hgRGg0YMx+XnMB+c5gsnoqf9vm+bUZ6lnl2cu71j3vz2Qv2CxOLcUuGPyV+Di1HrfCsXFxlW41bXVi7Qkui0QDW5yUAAGAyopApwSRLI+N/Ge7+3xVIPrjxDgQAcF5Bu+wAgAgAm8AIKEAGCgQDCSzBCIwB1mc1AAB6AsB5RwCAmsUj0X9/bqhXeCgAgBGFejjYz8c3lGRApZK9SEaUQOrBUK9gGZJ5kIecDElJQUEdAOA/QDcDSMfdcGMAAACOSURBVBiVbY+xDcIwFETfTyawF4iUjk3YiI4yayBRhiGYAKWgo7BcUNDFCFlIQP6nArnwlffeFSd9329EZE0lqjo0IrIDPhV+77ru2M7znL33DliV1My20zRdG4BlWfbAs+C3EMIJoAGIMSYzOxTrAdC/AJBzHs3soaqXEML517eF8HbOvcxsTCml2qtqvtDEQyHTPrvpAAAAAElFTkSuQmCC"
|
|
17
17
|
};
|
|
18
|
-
|
|
18
|
+
|
|
19
|
+
var MAX_HISTORY_LENGTH = 1024;
|
|
19
20
|
var Console = {
|
|
20
21
|
inherits: Panel,
|
|
21
22
|
prototype: {
|
|
@@ -252,10 +253,11 @@ define(function(require) {
|
|
|
252
253
|
} else {
|
|
253
254
|
sel = this._nodes.console.qsa(":scope > .node").map(n => n._line._value);
|
|
254
255
|
}
|
|
255
|
-
|
|
256
|
+
if(evt.shiftKey === true) {
|
|
257
|
+
console.log(sel);
|
|
258
|
+
}
|
|
256
259
|
this.print(sel);
|
|
257
|
-
}
|
|
258
|
-
if(evt.keyCode === 76) {
|
|
260
|
+
} else if(evt.keyCode === 76) {
|
|
259
261
|
if(evt.shiftKey === true) {
|
|
260
262
|
|
|
261
263
|
} else {
|
|
@@ -275,9 +277,9 @@ define(function(require) {
|
|
|
275
277
|
if(!this._Q) {
|
|
276
278
|
const v = this._nodes.input.value;
|
|
277
279
|
|
|
278
|
-
this._Q = this._history.filter(s => !v || s.startsWith(v));
|
|
279
|
-
this._Q = this._Q.concat(this._history.filter(s => s.includes(v)));
|
|
280
|
-
|
|
280
|
+
this._Q = this._history.filter((s, i, a) => (!i || a[i - 1] !== s) && (!v || s.startsWith(v)));
|
|
281
|
+
this._Q = this._Q.concat(this._history.filter(s => s.includes(v))).reverse().filter(Array.fn.unique).reverse();
|
|
282
|
+
|
|
281
283
|
if(this._Q.length === 0) {
|
|
282
284
|
this._Q = [v];
|
|
283
285
|
}
|
|
@@ -371,8 +373,8 @@ define(function(require) {
|
|
|
371
373
|
var history = JSON.parse(localStorage.getItem(key)) || [];
|
|
372
374
|
if (history[history.length - 1] !== text) {
|
|
373
375
|
history.push(text);
|
|
374
|
-
if (history.length >
|
|
375
|
-
history.splice(0, history.length -
|
|
376
|
+
if (history.length > MAX_HISTORY_LENGTH) {
|
|
377
|
+
history.splice(0, history.length - MAX_HISTORY_LENGTH);
|
|
376
378
|
}
|
|
377
379
|
localStorage.setItem(key, JSON.stringify(history));
|
|
378
380
|
}
|
|
@@ -395,8 +397,8 @@ define(function(require) {
|
|
|
395
397
|
var history = this._history || [];
|
|
396
398
|
if (history[history.length - 1] !== text) {
|
|
397
399
|
history.push(text);
|
|
398
|
-
if (history.length >
|
|
399
|
-
history.splice(0, history.length -
|
|
400
|
+
if (history.length > MAX_HISTORY_LENGTH) {
|
|
401
|
+
history.splice(0, history.length - MAX_HISTORY_LENGTH);
|
|
400
402
|
}
|
|
401
403
|
this.writeStorage("history", history);
|
|
402
404
|
}
|
package/src/ui/List.js
CHANGED
|
@@ -19,7 +19,7 @@ define(function(require) {
|
|
|
19
19
|
// require("stylesheet!./List.less");
|
|
20
20
|
|
|
21
21
|
// TODO centralize/utilize :-p
|
|
22
|
-
const capitalize = (s) =>
|
|
22
|
+
const capitalize = (s) => js.sf("%s%s", s.charAt(0).toUpperCase(),
|
|
23
23
|
s.substring(1));
|
|
24
24
|
|
|
25
25
|
const workaroundColumnAlignment = (list) => {
|
|
@@ -49,25 +49,25 @@ define(function(require) {
|
|
|
49
49
|
this._selection = [];
|
|
50
50
|
},
|
|
51
51
|
|
|
52
|
-
|
|
52
|
+
'@css': {
|
|
53
53
|
overflow: "hidden",
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
54
|
+
'overflow-x': "auto",
|
|
55
|
+
'&.busy': {
|
|
56
|
+
'background': "url(/shared/vcl/images/loading.gif) no-repeat 4px 32px",
|
|
57
|
+
'.body': {
|
|
58
58
|
visibility: "hidden"
|
|
59
59
|
}
|
|
60
60
|
},
|
|
61
|
-
|
|
61
|
+
'.body': {
|
|
62
62
|
overflow: "auto",
|
|
63
63
|
position: "absolute",
|
|
64
64
|
left: "0",
|
|
65
65
|
top: "0px",
|
|
66
66
|
right: "0",
|
|
67
67
|
bottom: "0",
|
|
68
|
-
|
|
69
|
-
//
|
|
70
|
-
|
|
68
|
+
'line-height': "13px",
|
|
69
|
+
// 'background-color': "white",
|
|
70
|
+
'.scroll': {
|
|
71
71
|
position: "absolute",
|
|
72
72
|
width: "1px",
|
|
73
73
|
height: "1px",
|
|
@@ -75,7 +75,9 @@ define(function(require) {
|
|
|
75
75
|
'z-index': 2
|
|
76
76
|
}
|
|
77
77
|
},
|
|
78
|
-
|
|
78
|
+
'&.header-invisible .{./ListHeader}': "height:0;",
|
|
79
|
+
'.{./ListColumn}': "transition: width 400ms, max-width 400ms",
|
|
80
|
+
'.ListCell': "transition: width 400ms, max-width 400ms"
|
|
79
81
|
},
|
|
80
82
|
MAX_AUTOCOLUMNS: 50,
|
|
81
83
|
|
|
@@ -201,8 +203,8 @@ define(function(require) {
|
|
|
201
203
|
var bw = thisObj.getBodyWidth();
|
|
202
204
|
var bh = thisObj.getBodyHeight();
|
|
203
205
|
var s = thisObj._nodes.scroll.style;
|
|
204
|
-
s.left =
|
|
205
|
-
s.top =
|
|
206
|
+
s.left = js.sf("%dpx", bw);
|
|
207
|
+
s.top = js.sf("%dpx", bh + rect.top);
|
|
206
208
|
|
|
207
209
|
thisObj._body.setBounds(rect.left, rect.top - 3, undefined, undefined, bw, bh);
|
|
208
210
|
}];
|
|
@@ -360,7 +362,11 @@ workaroundColumnAlignment(this);
|
|
|
360
362
|
return r;
|
|
361
363
|
},
|
|
362
364
|
|
|
363
|
-
notifyEvent: function(event, data) {
|
|
365
|
+
notifyEvent: function(event, data) {
|
|
366
|
+
if(event === "columnsChanged") {
|
|
367
|
+
this.fire("onColumnsChanged", data)
|
|
368
|
+
}
|
|
369
|
+
},
|
|
364
370
|
render_: function(bodyUpdateRows/*TODO*/) {
|
|
365
371
|
if(bodyUpdateRows) return this._body.updateRows();
|
|
366
372
|
|
|
@@ -425,7 +431,7 @@ workaroundColumnAlignment(this);
|
|
|
425
431
|
value = "-";
|
|
426
432
|
} else if(column._wantsNullValues || (value !== null && value !== undefined)) {
|
|
427
433
|
if(column._displayFormat !== "") {
|
|
428
|
-
value =
|
|
434
|
+
value = js.sf(column._displayFormat, value);
|
|
429
435
|
}
|
|
430
436
|
if(column._onGetValue !== null) {
|
|
431
437
|
value = column.fire("onGetValue", [
|
|
@@ -483,11 +489,11 @@ workaroundColumnAlignment(this);
|
|
|
483
489
|
formatDate: function(value, opts) {
|
|
484
490
|
if(!(value instanceof Date)) value = new Date(value);
|
|
485
491
|
if(opts && opts.utc) {
|
|
486
|
-
return
|
|
492
|
+
return js.sf("%d/%02d/%02d %02d:%02d", value.getUTCFullYear(), value.getUTCMonth() + 1,
|
|
487
493
|
value.getUTCDate(), value.getUTCHours(), value.getUTCMinutes());
|
|
488
494
|
}
|
|
489
495
|
|
|
490
|
-
return
|
|
496
|
+
return js.sf("%d/%02d/%02d %02d:%02d", value.getFullYear(), value.getMonth() + 1,
|
|
491
497
|
value.getDate(), value.getHours(), value.getMinutes());
|
|
492
498
|
},
|
|
493
499
|
|
|
@@ -725,6 +731,7 @@ workaroundColumnAlignment(this);
|
|
|
725
731
|
column.setContent(s);
|
|
726
732
|
column.setList(this);
|
|
727
733
|
onInit && onInit.apply(this, [column]);
|
|
734
|
+
changed = true;
|
|
728
735
|
}
|
|
729
736
|
attributes.push(attrs[i]);
|
|
730
737
|
}
|
|
@@ -739,7 +746,7 @@ workaroundColumnAlignment(this);
|
|
|
739
746
|
// }
|
|
740
747
|
|
|
741
748
|
if(changed === true) {
|
|
742
|
-
this.notifyEvent("columnsChanged");
|
|
749
|
+
this.notifyEvent("columnsChanged", [], true);
|
|
743
750
|
}
|
|
744
751
|
} else {
|
|
745
752
|
this.destroyColumns();
|
|
@@ -862,7 +869,7 @@ workaroundColumnAlignment(this);
|
|
|
862
869
|
var value = this._source.getAttributeValue(column._attribute, row, true);
|
|
863
870
|
if(column._wantsNullValues || (value !== null && value !== undefined)) {
|
|
864
871
|
if(column._displayFormat !== "") {
|
|
865
|
-
value =
|
|
872
|
+
value = js.sf(column._displayFormat, value);
|
|
866
873
|
}
|
|
867
874
|
if(column._onGetValue !== null) {
|
|
868
875
|
value = column.fire("onGetValue", [value, row, this._source]);
|
package/src/ui/ListColumn.js
CHANGED
|
@@ -66,7 +66,7 @@ define(function(require) {
|
|
|
66
66
|
constructor: function(owner) {
|
|
67
67
|
this._rule = Stylesheet.createCssRule("width: 130px;", 5);
|
|
68
68
|
// this._rule.style.setProperty("display", "none", "important");
|
|
69
|
-
|
|
69
|
+
this._rule.style.setProperty("transition", "width 250ms, max-width 250ms");
|
|
70
70
|
},
|
|
71
71
|
destroy: function() {
|
|
72
72
|
/**
|
package/src/ui/ListRow.js
CHANGED
|
@@ -43,7 +43,7 @@ define(function(require) {
|
|
|
43
43
|
var html = [];
|
|
44
44
|
|
|
45
45
|
for(var i = 0; i < columns.length; ++i) {
|
|
46
|
-
html.push(
|
|
46
|
+
html.push(js.sf(
|
|
47
47
|
"<div style=\"height: %dpx;\" class=\"%s %s\">" +
|
|
48
48
|
// "<div style='float: left; padding: 5px;'></div>" +
|
|
49
49
|
"</div>",
|
package/src/ui/Panel.js
CHANGED
|
@@ -221,7 +221,7 @@ define(function (require) {
|
|
|
221
221
|
var cs = this.getComputedStyle();
|
|
222
222
|
var w = parseFloat(cs.width);
|
|
223
223
|
var h = parseFloat(cs.height);
|
|
224
|
-
var f = this._zoom < 1 ? -1 : 1;
|
|
224
|
+
var f = (this._zoom < 1 ? -1 : 1) * this.getZoom(true);
|
|
225
225
|
var cr;
|
|
226
226
|
|
|
227
227
|
if(this._zoom < 1) {
|
|
@@ -846,6 +846,12 @@ define(function (require) {
|
|
|
846
846
|
isHeightStored: function () {
|
|
847
847
|
return this._align !== "left" && this._align !== "right" && this._align !== "client" && this._autoSize !== "height" && this._autoSize !== "both";
|
|
848
848
|
},
|
|
849
|
+
getZoom: function(parents) {
|
|
850
|
+
if(parents && this._parent !== null) {
|
|
851
|
+
return this._zoom * this._parent.getZoom(parents);
|
|
852
|
+
}
|
|
853
|
+
return this._zoom;
|
|
854
|
+
},
|
|
849
855
|
setZoom: function(f) {
|
|
850
856
|
if(this._zoom !== f) {
|
|
851
857
|
if(!this.hasClass("animated")) {
|
package/src/ui/Tab.js
CHANGED
|
@@ -102,7 +102,11 @@ define(function(require) {
|
|
|
102
102
|
} else if(evt.target.classList.contains("menu")) {
|
|
103
103
|
this.dispatch("menuclick", evt);
|
|
104
104
|
} else {
|
|
105
|
-
this.
|
|
105
|
+
if(this.isSelected() && evt.altKey === true) {
|
|
106
|
+
this.setSelected(false);
|
|
107
|
+
} else {
|
|
108
|
+
this.setSelected(this._groupIndex < -1 ? !this.getSelected() : true);
|
|
109
|
+
}
|
|
106
110
|
//this._node.childNodes[0].blur();
|
|
107
111
|
}
|
|
108
112
|
}
|