@qooxdoo/framework 7.1.0 → 7.2.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/CHANGELOG.md +3 -0
- package/Manifest.json +22 -22
- package/lib/compiler/compile-info.json +66 -66
- package/lib/compiler/index.js +406 -335
- package/lib/resource/qx/tool/cli/templates/loader/loader-browser.tmpl.js +1 -2
- package/lib/resource/qx/tool/cli/templates/skeleton/mobile/source/theme/custom/css/custom.css.map +1 -1
- package/lib/resource/qx/tool/schema/compile-1-0-0.json +11 -1
- package/npm-shrinkwrap.json +793 -744
- package/package.json +9 -8
- package/source/class/qx/Interface.js +13 -15
- package/source/class/qx/dev/unit/MTestLoader.js +25 -33
- package/source/class/qx/dev/unit/TestResult.js +9 -13
- package/source/class/qx/event/handler/Focus.js +1 -1
- package/source/class/qx/html/Element.js +1 -1
- package/source/class/qx/html/Node.js +0 -1
- package/source/class/qx/io/request/AbstractRequest.js +42 -66
- package/source/class/qx/test/Interface.js +70 -6
- package/source/class/qx/test/Mixin.js +20 -17
- package/source/class/qx/test/Promise.js +67 -91
- package/source/class/qx/test/bom/History.js +11 -19
- package/source/class/qx/test/bom/WebWorker.js +7 -15
- package/source/class/qx/test/bom/media/MediaTestCase.js +10 -18
- package/source/class/qx/test/bom/media/Video.js +10 -18
- package/source/class/qx/test/bom/rest/Resource.js +3 -7
- package/source/class/qx/test/bom/rest/ResourceWithRemote.js +40 -56
- package/source/class/qx/test/bom/webfonts/Validator.js +12 -20
- package/source/class/qx/test/core/Object.js +3 -7
- package/source/class/qx/test/data/controller/List.js +18 -22
- package/source/class/qx/test/data/marshal/Json.js +10 -14
- package/source/class/qx/test/data/store/Json.js +337 -428
- package/source/class/qx/test/data/store/Jsonp.js +46 -66
- package/source/class/qx/test/data/store/RestWithRemote.js +10 -18
- package/source/class/qx/test/html/Element.js +4 -8
- package/source/class/qx/test/html/Iframe.js +48 -60
- package/source/class/qx/test/io/jsonrpc/Client.js +1 -1
- package/source/class/qx/test/io/request/JsonpWithRemote.js +6 -10
- package/source/class/qx/test/io/request/MRequest.js +13 -25
- package/source/class/qx/test/io/request/Xhr.js +5 -9
- package/source/class/qx/test/io/request/XhrWithRemote.js +50 -78
- package/source/class/qx/test/io/rest/Resource.js +3 -7
- package/source/class/qx/test/io/rest/ResourceWithRemote.js +41 -57
- package/source/class/qx/test/mobile/basic/Image.js +16 -24
- package/source/class/qx/test/mobile/container/Navigation.js +3 -7
- package/source/class/qx/test/mobile/container/Scroll.js +8 -12
- package/source/class/qx/test/mobile/page/Page.js +24 -44
- package/source/class/qx/test/performance/Property.js +2 -2
- package/source/class/qx/test/ui/basic/Image.js +32 -52
- package/source/class/qx/test/ui/core/Blocker.js +6 -14
- package/source/class/qx/test/ui/embed/Iframe.js +13 -21
- package/source/class/qx/test/ui/form/FileSelectorButton.js +32 -0
- package/source/class/qx/test/ui/form/FormValidator.js +147 -211
- package/source/class/qx/test/ui/form/Label.js +8 -16
- package/source/class/qx/test/ui/root/Inline.js +9 -13
- package/source/class/qx/test/ui/table/Table.js +6 -14
- package/source/class/qx/test/ui/toolbar/OverflowHandling.js +18 -30
- package/source/class/qx/test/ui/virtual/Pane.js +3 -7
- package/source/class/qx/test/util/DynamicScriptLoader.js +23 -42
- package/source/class/qx/theme/iconfont/LoadMaterialIcons.js +4 -4
- package/source/class/qx/theme/iconfont/LoadMaterialIconsOutlined.js +4 -4
- package/source/class/qx/theme/iconfont/LoadMaterialIconsRound.js +4 -4
- package/source/class/qx/theme/iconfont/LoadMaterialIconsSharp.js +4 -4
- package/source/class/qx/theme/iconfont/LoadMaterialIconsTwoTone.js +4 -4
- package/source/class/qx/theme/tangible/Appearance.js +22 -3
- package/source/class/qx/theme/tangible/ColorEngine.js +3 -3
- package/source/class/qx/theme/tangible/Decoration.js +3 -3
- package/source/class/qx/tool/cli/Watch.js +3 -7
- package/source/class/qx/tool/cli/api/AbstractApi.js +1 -1
- package/source/class/qx/tool/cli/api/CompilerApi.js +3 -7
- package/source/class/qx/tool/cli/commands/Compile.js +9 -1
- package/source/class/qx/tool/cli/commands/Lint.js +21 -17
- package/source/class/qx/tool/compiler/ClassFile.js +22 -12
- package/source/class/qx/tool/compiler/Es6ify.js +12 -5
- package/source/class/qx/tool/compiler/TargetError.js +3 -4
- package/source/class/qx/tool/compiler/app/Application.js +14 -0
- package/source/class/qx/tool/compiler/app/WebFont.js +8 -6
- package/source/class/qx/tool/compiler/targets/SourceCodeCopier.js +1 -1
- package/source/class/qx/tool/compiler/targets/Target.js +7 -5
- package/source/class/qx/tool/compiler/targets/meta/AbstractJavascriptMeta.js +1 -1
- package/source/class/qx/tool/compiler/targets/meta/Browserify.js +88 -52
- package/source/class/qx/tool/compiler/targets/meta/Uglify.js +11 -3
- package/source/class/qx/tool/utils/Json.js +1 -1
- package/source/class/qx/tool/utils/Website.js +2 -2
- package/source/class/qx/ui/basic/Label.js +13 -17
- package/source/class/qx/ui/core/MPlacement.js +13 -21
- package/source/class/qx/ui/core/Widget.js +2 -3
- package/source/class/qx/ui/core/scroll/NativeScrollBar.js +3 -7
- package/source/class/qx/ui/core/scroll/ScrollBar.js +3 -7
- package/source/class/qx/ui/embed/Iframe.js +40 -50
- package/source/class/qx/ui/form/AbstractField.js +8 -12
- package/source/class/qx/ui/form/ComboBox.js +7 -15
- package/source/class/qx/ui/form/DateField.js +9 -18
- package/source/class/qx/ui/form/FileSelectorButton.js +157 -0
- package/source/class/qx/ui/form/Spinner.js +7 -15
- package/source/class/qx/ui/form/TextArea.js +3 -7
- package/source/class/qx/ui/form/VirtualComboBox.js +8 -16
- package/source/class/qx/ui/form/VirtualSelectBox.js +21 -37
- package/source/class/qx/ui/layout/Canvas.js +2 -2
- package/source/class/qx/ui/mobile/container/MIScroll.js +3 -7
- package/source/class/qx/ui/progressive/headfoot/Progress.js +22 -34
- package/source/class/qx/ui/progressive/renderer/table/Row.js +1 -1
- package/source/class/qx/ui/splitpane/Pane.js +14 -22
- package/source/class/qx/ui/table/MTableContextMenu.js +63 -71
- package/source/class/qx/ui/table/Table.js +3 -7
- package/source/class/qx/ui/table/model/Abstract.js +5 -2
- package/source/class/qx/ui/table/pane/Scroller.js +8 -12
- package/source/class/qx/ui/toolbar/FileSelectorButton.js +57 -0
- package/source/class/qx/ui/toolbar/Part.js +3 -7
- package/source/class/qx/ui/tree/VirtualTree.js +5 -9
- package/source/class/qx/ui/treevirtual/MNode.js +5 -3
- package/source/class/qx/ui/treevirtual/TreeVirtual.js +3 -7
- package/source/class/qx/ui/virtual/core/Pane.js +30 -42
- package/source/class/qx/util/DynamicScriptLoader.js +31 -43
- package/source/resource/qx/iconfont/MaterialIcons/materialicons-v126.eot +0 -0
- package/source/resource/qx/iconfont/MaterialIcons/{materialicons-v70.ttf → materialicons-v126.ttf} +0 -0
- package/source/resource/qx/iconfont/MaterialIcons/materialicons-v126.woff +0 -0
- package/source/resource/qx/iconfont/MaterialIcons/materialicons-v126.woff2 +0 -0
- package/source/resource/qx/iconfont/MaterialIcons/materialiconsoutlined-v101.eot +0 -0
- package/source/resource/qx/iconfont/MaterialIcons/materialiconsoutlined-v101.otf +0 -0
- package/source/resource/qx/iconfont/MaterialIcons/materialiconsoutlined-v101.woff +0 -0
- package/source/resource/qx/iconfont/MaterialIcons/materialiconsoutlined-v101.woff2 +0 -0
- package/source/resource/qx/iconfont/MaterialIcons/materialiconsround-v100.eot +0 -0
- package/source/resource/qx/iconfont/MaterialIcons/materialiconsround-v100.otf +0 -0
- package/source/resource/qx/iconfont/MaterialIcons/materialiconsround-v100.woff +0 -0
- package/source/resource/qx/iconfont/MaterialIcons/materialiconsround-v100.woff2 +0 -0
- package/source/resource/qx/iconfont/MaterialIcons/materialiconssharp-v101.eot +0 -0
- package/source/resource/qx/iconfont/MaterialIcons/materialiconssharp-v101.otf +0 -0
- package/source/resource/qx/iconfont/MaterialIcons/materialiconssharp-v101.woff +0 -0
- package/source/resource/qx/iconfont/MaterialIcons/materialiconssharp-v101.woff2 +0 -0
- package/source/resource/qx/iconfont/MaterialIcons/materialiconstwotone-v104.eot +0 -0
- package/source/resource/qx/iconfont/MaterialIcons/materialiconstwotone-v104.otf +0 -0
- package/source/resource/qx/iconfont/MaterialIcons/materialiconstwotone-v104.woff +0 -0
- package/source/resource/qx/iconfont/MaterialIcons/materialiconstwotone-v104.woff2 +0 -0
- package/source/resource/qx/tool/cli/templates/loader/loader-browser.tmpl.js +1 -2
- package/source/resource/qx/tool/schema/compile-1-0-0.json +11 -1
- package/source/resource/qx/iconfont/MaterialIcons/materialicons-v70.eot +0 -0
- package/source/resource/qx/iconfont/MaterialIcons/materialicons-v70.woff +0 -0
- package/source/resource/qx/iconfont/MaterialIcons/materialicons-v70.woff2 +0 -0
- package/source/resource/qx/iconfont/MaterialIcons/materialiconsoutlined-v38.eot +0 -0
- package/source/resource/qx/iconfont/MaterialIcons/materialiconsoutlined-v38.otf +0 -0
- package/source/resource/qx/iconfont/MaterialIcons/materialiconsoutlined-v38.woff +0 -0
- package/source/resource/qx/iconfont/MaterialIcons/materialiconsoutlined-v38.woff2 +0 -0
- package/source/resource/qx/iconfont/MaterialIcons/materialiconsround-v37.eot +0 -0
- package/source/resource/qx/iconfont/MaterialIcons/materialiconsround-v37.otf +0 -0
- package/source/resource/qx/iconfont/MaterialIcons/materialiconsround-v37.woff +0 -0
- package/source/resource/qx/iconfont/MaterialIcons/materialiconsround-v37.woff2 +0 -0
- package/source/resource/qx/iconfont/MaterialIcons/materialiconssharp-v38.eot +0 -0
- package/source/resource/qx/iconfont/MaterialIcons/materialiconssharp-v38.otf +0 -0
- package/source/resource/qx/iconfont/MaterialIcons/materialiconssharp-v38.woff +0 -0
- package/source/resource/qx/iconfont/MaterialIcons/materialiconssharp-v38.woff2 +0 -0
- package/source/resource/qx/iconfont/MaterialIcons/materialiconstwotone-v36.eot +0 -0
- package/source/resource/qx/iconfont/MaterialIcons/materialiconstwotone-v36.otf +0 -0
- package/source/resource/qx/iconfont/MaterialIcons/materialiconstwotone-v36.woff +0 -0
- package/source/resource/qx/iconfont/MaterialIcons/materialiconstwotone-v36.woff2 +0 -0
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
/* ************************************************************************
|
|
2
|
+
|
|
3
|
+
qooxdoo
|
|
4
|
+
|
|
5
|
+
https://qooxdoo.org
|
|
6
|
+
|
|
7
|
+
Copyright:
|
|
8
|
+
2022 OETIKER+PARTNER AG
|
|
9
|
+
|
|
10
|
+
License:
|
|
11
|
+
MIT: https://opensource.org/licenses/MIT
|
|
12
|
+
See the LICENSE file in the project's top-level directory for details.
|
|
13
|
+
|
|
14
|
+
Authors:
|
|
15
|
+
* Tobias Oetiker (oetiker)
|
|
16
|
+
|
|
17
|
+
************************************************************************ */
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* The FileSelectorButton opens a window and lets the user pick one or several
|
|
21
|
+
* files from the local filesystem. A FileList is returned which allows access
|
|
22
|
+
* to the content of the selected files from javascript. The file(s) can now be
|
|
23
|
+
* processed in javascript, or it/they can be uploaded to a server.
|
|
24
|
+
*
|
|
25
|
+
* *Example*
|
|
26
|
+
*
|
|
27
|
+
* Post the content of the file to the server.
|
|
28
|
+
*
|
|
29
|
+
* ```javascript
|
|
30
|
+
* let button = new qx.ui.form.FileSelectorButton("Select File");
|
|
31
|
+
* button.addListener('changeFileSelection',function(e){
|
|
32
|
+
* let fileList = e.getData();
|
|
33
|
+
* let form = new FormData();
|
|
34
|
+
* form.append('file',fileList[0]);
|
|
35
|
+
* let req = new qx.io.request.Xhr("upload",'POST').set({
|
|
36
|
+
* requestData: form
|
|
37
|
+
* });
|
|
38
|
+
* req.addListener('success',(e) => {
|
|
39
|
+
* let response = req.getResponse();
|
|
40
|
+
* });
|
|
41
|
+
* });
|
|
42
|
+
* ```
|
|
43
|
+
*
|
|
44
|
+
* Process the file directly in javascript using the FileReader API.
|
|
45
|
+
*
|
|
46
|
+
* ```javascript
|
|
47
|
+
* let button = new qx.ui.form.FileSelectorButton("Select File");
|
|
48
|
+
* button.addListener('changeFileSelection',function(e){
|
|
49
|
+
* let fileList = e.getData();
|
|
50
|
+
* const reader = new FileReader();
|
|
51
|
+
* reader.addEventListener('load', () => {
|
|
52
|
+
* let response = reader.result;
|
|
53
|
+
* console.log("The first 4 chrs are: " + response);
|
|
54
|
+
* });
|
|
55
|
+
* const file = fileList[0];
|
|
56
|
+
* reader.readAsText(file.slice(0,4));
|
|
57
|
+
* });
|
|
58
|
+
|
|
59
|
+
*
|
|
60
|
+
* [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/File_API/Using_files_from_web_applications)
|
|
61
|
+
*/
|
|
62
|
+
|
|
63
|
+
let InputElementIdCounter = 0;
|
|
64
|
+
qx.Class.define("qx.ui.form.FileSelectorButton", {
|
|
65
|
+
extend: qx.ui.form.Button,
|
|
66
|
+
events: {
|
|
67
|
+
/**
|
|
68
|
+
* The event is fired when the file selection changes.
|
|
69
|
+
*
|
|
70
|
+
* The method {@link qx.event.type.Data#getData} returns the
|
|
71
|
+
* current [fileList](https://developer.mozilla.org/en-US/docs/Web/API/FileList)
|
|
72
|
+
*/
|
|
73
|
+
changeFileSelection: "qx.event.type.Data"
|
|
74
|
+
},
|
|
75
|
+
properties: {
|
|
76
|
+
/**
|
|
77
|
+
* What type of files should be offered in the fileselection dialog.
|
|
78
|
+
* Use a comma separated list of [Unique file type specifiers](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/file#unique_file_type_specifiers). If you dont set anything, all files
|
|
79
|
+
* are allowed.
|
|
80
|
+
*
|
|
81
|
+
* *Example*
|
|
82
|
+
*
|
|
83
|
+
* `.doc,.docx,application/msword`
|
|
84
|
+
*/
|
|
85
|
+
accept: {
|
|
86
|
+
nullable: true,
|
|
87
|
+
check: "String",
|
|
88
|
+
apply: "_applyAttribute"
|
|
89
|
+
},
|
|
90
|
+
/**
|
|
91
|
+
* Specify that the camera should be used for getting the "file". The
|
|
92
|
+
* value defines which camera should be used for capturing images.
|
|
93
|
+
* `user` indicates the user-facing camera.
|
|
94
|
+
* `environment` indicates the camera facing away from the user.
|
|
95
|
+
*/
|
|
96
|
+
capture: {
|
|
97
|
+
nullable: true,
|
|
98
|
+
check: ["user", "environment"],
|
|
99
|
+
apply: "_applyAttribute"
|
|
100
|
+
},
|
|
101
|
+
/**
|
|
102
|
+
* Set to "true" if you want to allow the selection of multiple files.
|
|
103
|
+
*/
|
|
104
|
+
multiple: {
|
|
105
|
+
nullable: true,
|
|
106
|
+
check: "Boolean",
|
|
107
|
+
apply: "_applyAttribute"
|
|
108
|
+
},
|
|
109
|
+
/**
|
|
110
|
+
* If present, indicates that only directories should be available for
|
|
111
|
+
* selection.
|
|
112
|
+
*/
|
|
113
|
+
directoriesOnly: {
|
|
114
|
+
nullable: true,
|
|
115
|
+
check: "Boolean",
|
|
116
|
+
apply: "_applyAttribute"
|
|
117
|
+
}
|
|
118
|
+
},
|
|
119
|
+
members: {
|
|
120
|
+
__inputObject: null,
|
|
121
|
+
|
|
122
|
+
_applyAttribute: function (value, old, attr) {
|
|
123
|
+
if (attr === "directoriesOnly") {
|
|
124
|
+
// while the name of the attribute indicates that this only
|
|
125
|
+
// works for webkit borwsers, this is not the case. These
|
|
126
|
+
// days the attribute is supported by
|
|
127
|
+
// [everyone](https://caniuse.com/?search=webkitdirectory).
|
|
128
|
+
attr = "webkitdirectory";
|
|
129
|
+
}
|
|
130
|
+
this.__inputObject.setAttribute(attr, value);
|
|
131
|
+
},
|
|
132
|
+
|
|
133
|
+
_createContentElement: function () {
|
|
134
|
+
let id = "qxFileSelector_" + InputElementIdCounter++;
|
|
135
|
+
let input = (this.__inputObject = new qx.html.Input(
|
|
136
|
+
"file",
|
|
137
|
+
{ display: "none" },
|
|
138
|
+
{ id: id }
|
|
139
|
+
));
|
|
140
|
+
let label = new qx.html.Element("label", {}, { for: id });
|
|
141
|
+
label.addListenerOnce(
|
|
142
|
+
"appear",
|
|
143
|
+
e => {
|
|
144
|
+
label.add(input);
|
|
145
|
+
}
|
|
146
|
+
);
|
|
147
|
+
input.addListenerOnce("appear", e => {
|
|
148
|
+
let inputEl = input.getDomElement();
|
|
149
|
+
inputEl.addEventListener("change", e => {
|
|
150
|
+
this.fireDataEvent("changeFileSelection", inputEl.files);
|
|
151
|
+
inputEl.value = "";
|
|
152
|
+
});
|
|
153
|
+
});
|
|
154
|
+
return label;
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
});
|
|
@@ -116,21 +116,13 @@ qx.Class.define("qx.ui.form.Spinner", {
|
|
|
116
116
|
|
|
117
117
|
// forward the focusin and focusout events to the textfield. The textfield
|
|
118
118
|
// is not focusable so the events need to be forwarded manually.
|
|
119
|
-
this.addListener(
|
|
120
|
-
"focusin",
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
);
|
|
126
|
-
|
|
127
|
-
this.addListener(
|
|
128
|
-
"focusout",
|
|
129
|
-
function (e) {
|
|
130
|
-
textField.fireNonBubblingEvent("focusout", qx.event.type.Focus);
|
|
131
|
-
},
|
|
132
|
-
this
|
|
133
|
-
);
|
|
119
|
+
this.addListener("focusin", e => {
|
|
120
|
+
textField.fireNonBubblingEvent("focusin", qx.event.type.Focus);
|
|
121
|
+
});
|
|
122
|
+
|
|
123
|
+
this.addListener("focusout", e => {
|
|
124
|
+
textField.fireNonBubblingEvent("focusout", qx.event.type.Focus);
|
|
125
|
+
});
|
|
134
126
|
},
|
|
135
127
|
|
|
136
128
|
/*
|
|
@@ -193,13 +193,9 @@ qx.Class.define("qx.ui.form.TextArea", {
|
|
|
193
193
|
|
|
194
194
|
// On init, the clone is not yet present. Try again on appear.
|
|
195
195
|
} else {
|
|
196
|
-
this.getContentElement().addListenerOnce(
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
this.__autoSize();
|
|
200
|
-
},
|
|
201
|
-
this
|
|
202
|
-
);
|
|
196
|
+
this.getContentElement().addListenerOnce("appear", () => {
|
|
197
|
+
this.__autoSize();
|
|
198
|
+
});
|
|
203
199
|
}
|
|
204
200
|
}
|
|
205
201
|
},
|
|
@@ -46,22 +46,14 @@ qx.Class.define("qx.ui.form.VirtualComboBox", {
|
|
|
46
46
|
|
|
47
47
|
// forward the focusin and focusout events to the textfield. The textfield
|
|
48
48
|
// is not focusable so the events need to be forwarded manually.
|
|
49
|
-
this.addListener(
|
|
50
|
-
"focusin",
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
this.addListener(
|
|
58
|
-
"focusout",
|
|
59
|
-
function (e) {
|
|
60
|
-
textField.fireNonBubblingEvent("focusout", qx.event.type.Focus);
|
|
61
|
-
this.fireNonBubblingEvent("blur", qx.event.type.Focus);
|
|
62
|
-
},
|
|
63
|
-
this
|
|
64
|
-
);
|
|
49
|
+
this.addListener("focusin", e => {
|
|
50
|
+
textField.fireNonBubblingEvent("focusin", qx.event.type.Focus);
|
|
51
|
+
});
|
|
52
|
+
|
|
53
|
+
this.addListener("focusout", e => {
|
|
54
|
+
textField.fireNonBubblingEvent("focusout", qx.event.type.Focus);
|
|
55
|
+
this.fireNonBubblingEvent("blur", qx.event.type.Focus);
|
|
56
|
+
});
|
|
65
57
|
},
|
|
66
58
|
|
|
67
59
|
properties: {
|
|
@@ -511,46 +511,30 @@ qx.Class.define("qx.ui.form.VirtualSelectBox", {
|
|
|
511
511
|
this._add(input);
|
|
512
512
|
|
|
513
513
|
var dropdown = this.getChildControl("dropdown");
|
|
514
|
-
dropdown.addListener(
|
|
515
|
-
|
|
516
|
-
function () {
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
}, 0);
|
|
521
|
-
},
|
|
522
|
-
this
|
|
523
|
-
);
|
|
514
|
+
dropdown.addListener("appear", () => {
|
|
515
|
+
// we must delay so that the focus is only set once the list is ready
|
|
516
|
+
window.setTimeout(function () {
|
|
517
|
+
input.focus();
|
|
518
|
+
}, 0);
|
|
519
|
+
});
|
|
524
520
|
|
|
525
|
-
dropdown.addListener(
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
this.setValue(sel);
|
|
533
|
-
},
|
|
534
|
-
this
|
|
535
|
-
);
|
|
521
|
+
dropdown.addListener("disappear", () => {
|
|
522
|
+
input.blur();
|
|
523
|
+
// clear filter
|
|
524
|
+
var sel = this.getValue();
|
|
525
|
+
input.resetValue();
|
|
526
|
+
this.setValue(sel);
|
|
527
|
+
});
|
|
536
528
|
|
|
537
|
-
input.addListener(
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
this.close();
|
|
541
|
-
},
|
|
542
|
-
this
|
|
543
|
-
);
|
|
529
|
+
input.addListener("blur", e => {
|
|
530
|
+
this.close();
|
|
531
|
+
});
|
|
544
532
|
|
|
545
|
-
input.addListener(
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
}
|
|
551
|
-
},
|
|
552
|
-
this
|
|
553
|
-
);
|
|
533
|
+
input.addListener("changeValue", e => {
|
|
534
|
+
if (this.__filterUpdateRunning === 0) {
|
|
535
|
+
this.__updateDelegate();
|
|
536
|
+
}
|
|
537
|
+
});
|
|
554
538
|
},
|
|
555
539
|
|
|
556
540
|
__getHighlightStyleFromAppearance() {
|
|
@@ -235,7 +235,7 @@ qx.Class.define("qx.ui.layout.Canvas", {
|
|
|
235
235
|
if (left == null && right == null) {
|
|
236
236
|
switch (child.getAlignX()) {
|
|
237
237
|
case "center":
|
|
238
|
-
left = (availWidth - size.width) / 2 - marginRight;
|
|
238
|
+
left = Math.round((availWidth - size.width) / 2 - marginRight);
|
|
239
239
|
break;
|
|
240
240
|
case "right":
|
|
241
241
|
right = 0;
|
|
@@ -286,7 +286,7 @@ qx.Class.define("qx.ui.layout.Canvas", {
|
|
|
286
286
|
if (top == null && bottom == null) {
|
|
287
287
|
switch (child.getAlignY()) {
|
|
288
288
|
case "middle":
|
|
289
|
-
top = (availHeight - size.height) / 2 - marginBottom;
|
|
289
|
+
top = Math.round((availHeight - size.height) / 2 - marginBottom);
|
|
290
290
|
break;
|
|
291
291
|
case "bottom":
|
|
292
292
|
bottom = 0;
|
|
@@ -165,13 +165,9 @@ qx.Mixin.define("qx.ui.mobile.container.MIScroll", {
|
|
|
165
165
|
loader.open("GET", path);
|
|
166
166
|
loader.send();
|
|
167
167
|
} else {
|
|
168
|
-
this.addListenerOnce(
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
this._setScroll(this.__createScrollInstance());
|
|
172
|
-
},
|
|
173
|
-
this
|
|
174
|
-
);
|
|
168
|
+
this.addListenerOnce("appear", () => {
|
|
169
|
+
this._setScroll(this.__createScrollInstance());
|
|
170
|
+
});
|
|
175
171
|
}
|
|
176
172
|
},
|
|
177
173
|
|
|
@@ -124,45 +124,33 @@ qx.Class.define("qx.ui.progressive.headfoot.Progress", {
|
|
|
124
124
|
|
|
125
125
|
// Listen for the "renderStart" event, to save the number of elements on
|
|
126
126
|
// the queue, and to set ourself visible
|
|
127
|
-
progressive.addListener(
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
this.show();
|
|
132
|
-
},
|
|
133
|
-
this
|
|
134
|
-
);
|
|
127
|
+
progressive.addListener("renderStart", e => {
|
|
128
|
+
this.__total = e.getData().initial;
|
|
129
|
+
this.show();
|
|
130
|
+
});
|
|
135
131
|
|
|
136
132
|
// Listen for the "progress" event, to update the progress bar
|
|
137
|
-
progressive.addListener(
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
var
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
this.__progressBar.setMinWidth(barWidth);
|
|
151
|
-
this.__percentDone.setLabel(percent);
|
|
152
|
-
}
|
|
133
|
+
progressive.addListener("progress", e => {
|
|
134
|
+
var complete = 1.0 - e.getData().remaining / this.__total;
|
|
135
|
+
var mySize = this.getBounds();
|
|
136
|
+
if (mySize) {
|
|
137
|
+
var barWidth = Math.floor(
|
|
138
|
+
(mySize.width - this.__percentDone.getBounds().width) * complete
|
|
139
|
+
);
|
|
140
|
+
|
|
141
|
+
var percent = Math.floor(complete * 100) + "%";
|
|
142
|
+
|
|
143
|
+
if (!isNaN(barWidth)) {
|
|
144
|
+
this.__progressBar.setMinWidth(barWidth);
|
|
145
|
+
this.__percentDone.setLabel(percent);
|
|
153
146
|
}
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
);
|
|
147
|
+
}
|
|
148
|
+
});
|
|
157
149
|
|
|
158
150
|
// Listen for the "renderEnd" event to make ourself invisible
|
|
159
|
-
progressive.addListener(
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
this.exclude();
|
|
163
|
-
},
|
|
164
|
-
this
|
|
165
|
-
);
|
|
151
|
+
progressive.addListener("renderEnd", e => {
|
|
152
|
+
this.exclude();
|
|
153
|
+
});
|
|
166
154
|
}
|
|
167
155
|
},
|
|
168
156
|
|
|
@@ -285,7 +285,7 @@ qx.Class.define("qx.ui.progressive.renderer.table.Row", {
|
|
|
285
285
|
dataIndex: i,
|
|
286
286
|
cellData: data[i],
|
|
287
287
|
height: height,
|
|
288
|
-
rowRenderer: this
|
|
288
|
+
rowRenderer: this // useful, e.g., for getting default row height
|
|
289
289
|
};
|
|
290
290
|
|
|
291
291
|
// Render this cell
|
|
@@ -156,32 +156,24 @@ qx.Class.define("qx.ui.splitpane.Pane", {
|
|
|
156
156
|
var splitter = this.getChildControl("splitter");
|
|
157
157
|
var splitterWidth = splitter.getWidth();
|
|
158
158
|
if (!splitterWidth) {
|
|
159
|
-
splitter.addListenerOnce(
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
this.__setBlockerPosition();
|
|
163
|
-
},
|
|
164
|
-
this
|
|
165
|
-
);
|
|
159
|
+
splitter.addListenerOnce("appear", () => {
|
|
160
|
+
this.__setBlockerPosition();
|
|
161
|
+
});
|
|
166
162
|
}
|
|
167
163
|
|
|
168
164
|
// resize listener to remove the blocker in case the splitter
|
|
169
165
|
// is removed.
|
|
170
|
-
splitter.addListener(
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
}
|
|
182
|
-
},
|
|
183
|
-
this
|
|
184
|
-
);
|
|
166
|
+
splitter.addListener("resize", e => {
|
|
167
|
+
var bounds = e.getData();
|
|
168
|
+
if (
|
|
169
|
+
this.getChildControl("splitter").isKnobVisible() &&
|
|
170
|
+
(bounds.height == 0 || bounds.width == 0)
|
|
171
|
+
) {
|
|
172
|
+
this.__blocker.hide();
|
|
173
|
+
} else {
|
|
174
|
+
this.__blocker.show();
|
|
175
|
+
}
|
|
176
|
+
});
|
|
185
177
|
},
|
|
186
178
|
|
|
187
179
|
/**
|
|
@@ -24,77 +24,69 @@ qx.Mixin.define("qx.ui.table.MTableContextMenu", {
|
|
|
24
24
|
// Add an event listener to handle context menu events. The actual menu
|
|
25
25
|
// is built by a function registered with a call to
|
|
26
26
|
// setContextMenuHandler(col, handler).
|
|
27
|
-
this.addListener(
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
// Dispose of
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
)
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
return;
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
// Set the context menu
|
|
94
|
-
this.setContextMenu(contextMenu);
|
|
95
|
-
},
|
|
96
|
-
this
|
|
97
|
-
);
|
|
27
|
+
this.addListener("cellContextmenu", e => {
|
|
28
|
+
var contextMenu = this.getContextMenu();
|
|
29
|
+
|
|
30
|
+
// Dispose of any previously existing context menu
|
|
31
|
+
if (contextMenu && !contextMenu.isDisposed()) {
|
|
32
|
+
// Dispose of the context menu.
|
|
33
|
+
contextMenu.hide();
|
|
34
|
+
this.setContextMenu(null);
|
|
35
|
+
this.getApplicationRoot().remove(contextMenu);
|
|
36
|
+
contextMenu.dispose();
|
|
37
|
+
contextMenu = null;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
// Get the context menu handler for the column on which the context
|
|
41
|
+
// menu request was issued.
|
|
42
|
+
var col = e.getColumn();
|
|
43
|
+
var contextMenuHandler = this.getContextMenuHandler(col);
|
|
44
|
+
|
|
45
|
+
// If there's no context menu handler for this column, we have nothing
|
|
46
|
+
// to do.
|
|
47
|
+
if (typeof contextMenuHandler !== "function") {
|
|
48
|
+
return;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
// Get the context object for the handler function
|
|
52
|
+
var handlerContext = this.__contextMenuHandlerContext[col];
|
|
53
|
+
|
|
54
|
+
// Get the data model
|
|
55
|
+
var tableModel = this.getTableModel();
|
|
56
|
+
|
|
57
|
+
// Create a context menu for this tree.
|
|
58
|
+
contextMenu = new qx.ui.menu.Menu();
|
|
59
|
+
|
|
60
|
+
// Don't display context menus from the context menu
|
|
61
|
+
contextMenu.addListener("contextmenu", function (e) {
|
|
62
|
+
e.preventDefault();
|
|
63
|
+
});
|
|
64
|
+
|
|
65
|
+
// This prevents the display of context menu on table header cells
|
|
66
|
+
contextMenu.addListenerOnce("disappear", () => {
|
|
67
|
+
this.setContextMenu(null);
|
|
68
|
+
});
|
|
69
|
+
|
|
70
|
+
// Call the context menu handler for this column.
|
|
71
|
+
var bShowContextMenu = contextMenuHandler.call(
|
|
72
|
+
handlerContext,
|
|
73
|
+
col,
|
|
74
|
+
e.getRow(),
|
|
75
|
+
this,
|
|
76
|
+
tableModel,
|
|
77
|
+
contextMenu
|
|
78
|
+
);
|
|
79
|
+
|
|
80
|
+
// If we were told not to display the context menu...
|
|
81
|
+
if (!bShowContextMenu) {
|
|
82
|
+
// ... then we're all done here.
|
|
83
|
+
contextMenu.dispose();
|
|
84
|
+
return;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
// Set the context menu
|
|
88
|
+
this.setContextMenu(contextMenu);
|
|
89
|
+
});
|
|
98
90
|
|
|
99
91
|
// Provide an array in which context menu handlers will be stored. The
|
|
100
92
|
// array is indexed by column number.
|
|
@@ -1720,13 +1720,9 @@ qx.Class.define("qx.ui.table.Table", {
|
|
|
1720
1720
|
// if the dom element is not available, the table hasn't been rendered
|
|
1721
1721
|
if (!elem) {
|
|
1722
1722
|
// postpone the scroll until the table has appeared
|
|
1723
|
-
this.addListenerOnce(
|
|
1724
|
-
|
|
1725
|
-
|
|
1726
|
-
this.scrollCellVisible(col, row);
|
|
1727
|
-
},
|
|
1728
|
-
this
|
|
1729
|
-
);
|
|
1723
|
+
this.addListenerOnce("appear", () => {
|
|
1724
|
+
this.scrollCellVisible(col, row);
|
|
1725
|
+
});
|
|
1730
1726
|
}
|
|
1731
1727
|
|
|
1732
1728
|
var columnModel = this.getTableColumnModel();
|
|
@@ -73,7 +73,8 @@ qx.Class.define("qx.ui.table.model.Abstract", {
|
|
|
73
73
|
* current implementations so only introduce the change from QX v8.
|
|
74
74
|
* Ref: https://github.com/qooxdoo/qooxdoo/pull/10377#discussion_r818697343
|
|
75
75
|
*/
|
|
76
|
-
THROW_ON_MODEL_CHANGE_DURING_EDIT:
|
|
76
|
+
THROW_ON_MODEL_CHANGE_DURING_EDIT:
|
|
77
|
+
parseInt(qx.core.Environment.get("qx.version"), 10) >= 8
|
|
77
78
|
},
|
|
78
79
|
|
|
79
80
|
members: {
|
|
@@ -320,7 +321,9 @@ qx.Class.define("qx.ui.table.model.Abstract", {
|
|
|
320
321
|
return;
|
|
321
322
|
}
|
|
322
323
|
if (this.getTable() && this.getTable().isEditing()) {
|
|
323
|
-
throw new Error(
|
|
324
|
+
throw new Error(
|
|
325
|
+
"A cell is currently being edited. Commit or cancel the edit before setting the table data"
|
|
326
|
+
);
|
|
324
327
|
}
|
|
325
328
|
}
|
|
326
329
|
},
|