@qooxdoo/framework 7.0.0 → 7.2.0

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.
Files changed (160) hide show
  1. package/CHANGELOG.md +10 -2
  2. package/Manifest.json +22 -22
  3. package/README.md +2 -4
  4. package/lib/compiler/compile-info.json +60 -58
  5. package/lib/compiler/index.js +1973 -1625
  6. package/lib/resource/qx/tool/cli/templates/loader/loader-browser.tmpl.js +1 -2
  7. package/lib/resource/qx/tool/schema/compile-1-0-0.json +11 -1
  8. package/npm-shrinkwrap.json +1738 -788
  9. package/package.json +10 -8
  10. package/source/class/qx/Interface.js +13 -15
  11. package/source/class/qx/dev/unit/MTestLoader.js +25 -33
  12. package/source/class/qx/dev/unit/TestResult.js +9 -13
  13. package/source/class/qx/event/handler/Focus.js +1 -1
  14. package/source/class/qx/html/Element.js +1 -1
  15. package/source/class/qx/html/Node.js +0 -1
  16. package/source/class/qx/io/request/AbstractRequest.js +42 -66
  17. package/source/class/qx/test/Interface.js +70 -6
  18. package/source/class/qx/test/Mixin.js +20 -17
  19. package/source/class/qx/test/Promise.js +67 -91
  20. package/source/class/qx/test/bom/History.js +11 -19
  21. package/source/class/qx/test/bom/WebWorker.js +7 -15
  22. package/source/class/qx/test/bom/media/MediaTestCase.js +10 -18
  23. package/source/class/qx/test/bom/media/Video.js +10 -18
  24. package/source/class/qx/test/bom/rest/Resource.js +3 -7
  25. package/source/class/qx/test/bom/rest/ResourceWithRemote.js +40 -56
  26. package/source/class/qx/test/bom/webfonts/Validator.js +12 -20
  27. package/source/class/qx/test/core/Object.js +3 -7
  28. package/source/class/qx/test/data/controller/List.js +18 -22
  29. package/source/class/qx/test/data/marshal/Json.js +10 -14
  30. package/source/class/qx/test/data/store/Json.js +337 -428
  31. package/source/class/qx/test/data/store/Jsonp.js +46 -66
  32. package/source/class/qx/test/data/store/RestWithRemote.js +10 -18
  33. package/source/class/qx/test/html/Element.js +4 -8
  34. package/source/class/qx/test/html/Iframe.js +48 -60
  35. package/source/class/qx/test/io/jsonrpc/Client.js +1 -1
  36. package/source/class/qx/test/io/request/JsonpWithRemote.js +6 -10
  37. package/source/class/qx/test/io/request/MRequest.js +13 -25
  38. package/source/class/qx/test/io/request/Xhr.js +5 -9
  39. package/source/class/qx/test/io/request/XhrWithRemote.js +50 -78
  40. package/source/class/qx/test/io/rest/Resource.js +3 -7
  41. package/source/class/qx/test/io/rest/ResourceWithRemote.js +41 -57
  42. package/source/class/qx/test/mobile/basic/Image.js +16 -24
  43. package/source/class/qx/test/mobile/container/Navigation.js +3 -7
  44. package/source/class/qx/test/mobile/container/Scroll.js +8 -12
  45. package/source/class/qx/test/mobile/page/Page.js +24 -44
  46. package/source/class/qx/test/performance/Property.js +2 -2
  47. package/source/class/qx/test/ui/basic/Image.js +32 -52
  48. package/source/class/qx/test/ui/core/Blocker.js +6 -14
  49. package/source/class/qx/test/ui/embed/Iframe.js +13 -21
  50. package/source/class/qx/test/ui/form/FileSelectorButton.js +32 -0
  51. package/source/class/qx/test/ui/form/FormValidator.js +147 -211
  52. package/source/class/qx/test/ui/form/Label.js +8 -16
  53. package/source/class/qx/test/ui/root/Inline.js +9 -13
  54. package/source/class/qx/test/ui/table/Table.js +6 -14
  55. package/source/class/qx/test/ui/toolbar/OverflowHandling.js +18 -30
  56. package/source/class/qx/test/ui/virtual/Pane.js +3 -7
  57. package/source/class/qx/test/util/DynamicScriptLoader.js +23 -42
  58. package/source/class/qx/theme/iconfont/LoadMaterialIcons.js +4 -4
  59. package/source/class/qx/theme/iconfont/LoadMaterialIconsOutlined.js +4 -4
  60. package/source/class/qx/theme/iconfont/LoadMaterialIconsRound.js +4 -4
  61. package/source/class/qx/theme/iconfont/LoadMaterialIconsSharp.js +4 -4
  62. package/source/class/qx/theme/iconfont/LoadMaterialIconsTwoTone.js +4 -4
  63. package/source/class/qx/theme/tangible/Appearance.js +22 -3
  64. package/source/class/qx/theme/tangible/ColorEngine.js +3 -3
  65. package/source/class/qx/theme/tangible/Decoration.js +3 -3
  66. package/source/class/qx/tool/cli/Watch.js +3 -7
  67. package/source/class/qx/tool/cli/api/AbstractApi.js +4 -1
  68. package/source/class/qx/tool/cli/api/CompilerApi.js +3 -7
  69. package/source/class/qx/tool/cli/commands/Compile.js +10 -1
  70. package/source/class/qx/tool/cli/commands/Lint.js +35 -21
  71. package/source/class/qx/tool/compiler/ClassFile.js +82 -2
  72. package/source/class/qx/tool/compiler/Es6ify.js +12 -5
  73. package/source/class/qx/tool/compiler/TargetError.js +26 -0
  74. package/source/class/qx/tool/compiler/app/Application.js +14 -0
  75. package/source/class/qx/tool/compiler/app/WebFont.js +8 -6
  76. package/source/class/qx/tool/compiler/targets/SourceCodeCopier.js +1 -1
  77. package/source/class/qx/tool/compiler/targets/Target.js +8 -0
  78. package/source/class/qx/tool/compiler/targets/meta/AbstractJavascriptMeta.js +2 -2
  79. package/source/class/qx/tool/compiler/targets/meta/Browserify.js +179 -0
  80. package/source/class/qx/tool/compiler/targets/meta/Uglify.js +11 -3
  81. package/source/class/qx/tool/utils/Json.js +1 -1
  82. package/source/class/qx/tool/utils/Website.js +2 -2
  83. package/source/class/qx/ui/basic/Label.js +13 -17
  84. package/source/class/qx/ui/core/MPlacement.js +13 -21
  85. package/source/class/qx/ui/core/Widget.js +2 -3
  86. package/source/class/qx/ui/core/scroll/NativeScrollBar.js +3 -7
  87. package/source/class/qx/ui/core/scroll/ScrollBar.js +3 -7
  88. package/source/class/qx/ui/embed/Iframe.js +40 -50
  89. package/source/class/qx/ui/form/AbstractField.js +8 -12
  90. package/source/class/qx/ui/form/AbstractSelectBox.js +4 -1
  91. package/source/class/qx/ui/form/ComboBox.js +7 -15
  92. package/source/class/qx/ui/form/DateField.js +13 -19
  93. package/source/class/qx/ui/form/FileSelectorButton.js +157 -0
  94. package/source/class/qx/ui/form/Spinner.js +7 -15
  95. package/source/class/qx/ui/form/TextArea.js +3 -7
  96. package/source/class/qx/ui/form/VirtualComboBox.js +8 -16
  97. package/source/class/qx/ui/form/VirtualSelectBox.js +21 -37
  98. package/source/class/qx/ui/layout/Canvas.js +2 -2
  99. package/source/class/qx/ui/mobile/container/MIScroll.js +3 -7
  100. package/source/class/qx/ui/progressive/headfoot/Progress.js +22 -34
  101. package/source/class/qx/ui/progressive/renderer/table/Row.js +2 -1
  102. package/source/class/qx/ui/progressive/renderer/table/cell/Boolean.js +24 -26
  103. package/source/class/qx/ui/progressive/renderer/table/cell/Icon.js +9 -7
  104. package/source/class/qx/ui/progressive/renderer/table/cell/Image.js +16 -13
  105. package/source/class/qx/ui/splitpane/Pane.js +14 -22
  106. package/source/class/qx/ui/table/MTableContextMenu.js +63 -71
  107. package/source/class/qx/ui/table/Table.js +3 -8
  108. package/source/class/qx/ui/table/model/Abstract.js +34 -1
  109. package/source/class/qx/ui/table/model/Remote.js +1 -0
  110. package/source/class/qx/ui/table/model/Simple.js +3 -0
  111. package/source/class/qx/ui/table/pane/Scroller.js +8 -12
  112. package/source/class/qx/ui/toolbar/FileSelectorButton.js +57 -0
  113. package/source/class/qx/ui/toolbar/Part.js +3 -7
  114. package/source/class/qx/ui/tree/VirtualTree.js +5 -9
  115. package/source/class/qx/ui/treevirtual/MNode.js +62 -5
  116. package/source/class/qx/ui/treevirtual/SimpleTreeDataModel.js +11 -3
  117. package/source/class/qx/ui/treevirtual/TreeVirtual.js +3 -7
  118. package/source/class/qx/ui/virtual/core/Pane.js +30 -42
  119. package/source/class/qx/util/DynamicScriptLoader.js +31 -43
  120. package/source/resource/qx/iconfont/MaterialIcons/materialicons-v126.eot +0 -0
  121. package/source/resource/qx/iconfont/MaterialIcons/{materialicons-v70.ttf → materialicons-v126.ttf} +0 -0
  122. package/source/resource/qx/iconfont/MaterialIcons/materialicons-v126.woff +0 -0
  123. package/source/resource/qx/iconfont/MaterialIcons/materialicons-v126.woff2 +0 -0
  124. package/source/resource/qx/iconfont/MaterialIcons/materialiconsoutlined-v101.eot +0 -0
  125. package/source/resource/qx/iconfont/MaterialIcons/materialiconsoutlined-v101.otf +0 -0
  126. package/source/resource/qx/iconfont/MaterialIcons/materialiconsoutlined-v101.woff +0 -0
  127. package/source/resource/qx/iconfont/MaterialIcons/materialiconsoutlined-v101.woff2 +0 -0
  128. package/source/resource/qx/iconfont/MaterialIcons/materialiconsround-v100.eot +0 -0
  129. package/source/resource/qx/iconfont/MaterialIcons/materialiconsround-v100.otf +0 -0
  130. package/source/resource/qx/iconfont/MaterialIcons/materialiconsround-v100.woff +0 -0
  131. package/source/resource/qx/iconfont/MaterialIcons/materialiconsround-v100.woff2 +0 -0
  132. package/source/resource/qx/iconfont/MaterialIcons/materialiconssharp-v101.eot +0 -0
  133. package/source/resource/qx/iconfont/MaterialIcons/materialiconssharp-v101.otf +0 -0
  134. package/source/resource/qx/iconfont/MaterialIcons/materialiconssharp-v101.woff +0 -0
  135. package/source/resource/qx/iconfont/MaterialIcons/materialiconssharp-v101.woff2 +0 -0
  136. package/source/resource/qx/iconfont/MaterialIcons/materialiconstwotone-v104.eot +0 -0
  137. package/source/resource/qx/iconfont/MaterialIcons/materialiconstwotone-v104.otf +0 -0
  138. package/source/resource/qx/iconfont/MaterialIcons/materialiconstwotone-v104.woff +0 -0
  139. package/source/resource/qx/iconfont/MaterialIcons/materialiconstwotone-v104.woff2 +0 -0
  140. package/source/resource/qx/tool/cli/templates/loader/loader-browser.tmpl.js +1 -2
  141. package/source/resource/qx/tool/schema/compile-1-0-0.json +11 -1
  142. package/source/resource/qx/iconfont/MaterialIcons/materialicons-v70.eot +0 -0
  143. package/source/resource/qx/iconfont/MaterialIcons/materialicons-v70.woff +0 -0
  144. package/source/resource/qx/iconfont/MaterialIcons/materialicons-v70.woff2 +0 -0
  145. package/source/resource/qx/iconfont/MaterialIcons/materialiconsoutlined-v38.eot +0 -0
  146. package/source/resource/qx/iconfont/MaterialIcons/materialiconsoutlined-v38.otf +0 -0
  147. package/source/resource/qx/iconfont/MaterialIcons/materialiconsoutlined-v38.woff +0 -0
  148. package/source/resource/qx/iconfont/MaterialIcons/materialiconsoutlined-v38.woff2 +0 -0
  149. package/source/resource/qx/iconfont/MaterialIcons/materialiconsround-v37.eot +0 -0
  150. package/source/resource/qx/iconfont/MaterialIcons/materialiconsround-v37.otf +0 -0
  151. package/source/resource/qx/iconfont/MaterialIcons/materialiconsround-v37.woff +0 -0
  152. package/source/resource/qx/iconfont/MaterialIcons/materialiconsround-v37.woff2 +0 -0
  153. package/source/resource/qx/iconfont/MaterialIcons/materialiconssharp-v38.eot +0 -0
  154. package/source/resource/qx/iconfont/MaterialIcons/materialiconssharp-v38.otf +0 -0
  155. package/source/resource/qx/iconfont/MaterialIcons/materialiconssharp-v38.woff +0 -0
  156. package/source/resource/qx/iconfont/MaterialIcons/materialiconssharp-v38.woff2 +0 -0
  157. package/source/resource/qx/iconfont/MaterialIcons/materialiconstwotone-v36.eot +0 -0
  158. package/source/resource/qx/iconfont/MaterialIcons/materialiconstwotone-v36.otf +0 -0
  159. package/source/resource/qx/iconfont/MaterialIcons/materialiconstwotone-v36.woff +0 -0
  160. package/source/resource/qx/iconfont/MaterialIcons/materialiconstwotone-v36.woff2 +0 -0
@@ -67,21 +67,13 @@ qx.Class.define("qx.ui.form.DateField", {
67
67
 
68
68
  // forward the focusin and focusout events to the textfield. The textfield
69
69
  // is not focusable so the events need to be forwarded manually.
70
- this.addListener(
71
- "focusin",
72
- function (e) {
73
- textField.fireNonBubblingEvent("focusin", qx.event.type.Focus);
74
- },
75
- this
76
- );
77
-
78
- this.addListener(
79
- "focusout",
80
- function (e) {
81
- textField.fireNonBubblingEvent("focusout", qx.event.type.Focus);
82
- },
83
- this
84
- );
70
+ this.addListener("focusin", e => {
71
+ textField.fireNonBubblingEvent("focusin", qx.event.type.Focus);
72
+ });
73
+
74
+ this.addListener("focusout", e => {
75
+ textField.fireNonBubblingEvent("focusout", qx.event.type.Focus);
76
+ });
85
77
 
86
78
  // initializes the DateField with the default format
87
79
  this._setDefaultDateFormat();
@@ -225,10 +217,9 @@ qx.Class.define("qx.ui.form.DateField", {
225
217
  if (qx.core.Environment.get("qx.dynlocale")) {
226
218
  this.__localeListenerId = qx.locale.Manager.getInstance().addListener(
227
219
  "changeLocale",
228
- function () {
220
+ () => {
229
221
  this._setDefaultDateFormat();
230
- },
231
- this
222
+ }
232
223
  );
233
224
  }
234
225
  },
@@ -312,7 +303,10 @@ qx.Class.define("qx.ui.form.DateField", {
312
303
  * Hides the date chooser popup.
313
304
  */
314
305
  close() {
315
- this.getChildControl("popup").hide();
306
+ var popup = this.getChildControl("popup", true);
307
+ if (popup && popup.isVisible()) {
308
+ popup.hide();
309
+ }
316
310
  },
317
311
 
318
312
  /**
@@ -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
- function (e) {
122
- textField.fireNonBubblingEvent("focusin", qx.event.type.Focus);
123
- },
124
- this
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
- "appear",
198
- function () {
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
- function (e) {
52
- textField.fireNonBubblingEvent("focusin", qx.event.type.Focus);
53
- },
54
- this
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
- "appear",
516
- function () {
517
- // we must delay so that the focus is only set once the list is ready
518
- window.setTimeout(function () {
519
- input.focus();
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
- "disappear",
527
- function () {
528
- input.blur();
529
- // clear filter
530
- var sel = this.getValue();
531
- input.resetValue();
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
- "blur",
539
- function (e) {
540
- this.close();
541
- },
542
- this
543
- );
529
+ input.addListener("blur", e => {
530
+ this.close();
531
+ });
544
532
 
545
- input.addListener(
546
- "changeValue",
547
- function (e) {
548
- if (this.__filterUpdateRunning === 0) {
549
- this.__updateDelegate();
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
- "appear",
170
- function () {
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
- "renderStart",
129
- function (e) {
130
- this.__total = e.getData().initial;
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
- "progress",
139
- function (e) {
140
- var complete = 1.0 - e.getData().remaining / this.__total;
141
- var mySize = this.getBounds();
142
- if (mySize) {
143
- var barWidth = Math.floor(
144
- (mySize.width - this.__percentDone.getBounds().width) * complete
145
- );
146
-
147
- var percent = Math.floor(complete * 100) + "%";
148
-
149
- if (!isNaN(barWidth)) {
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
- this
156
- );
147
+ }
148
+ });
157
149
 
158
150
  // Listen for the "renderEnd" event to make ourself invisible
159
- progressive.addListener(
160
- "renderEnd",
161
- function (e) {
162
- this.exclude();
163
- },
164
- this
165
- );
151
+ progressive.addListener("renderEnd", e => {
152
+ this.exclude();
153
+ });
166
154
  }
167
155
  },
168
156
 
@@ -284,7 +284,8 @@ qx.Class.define("qx.ui.progressive.renderer.table.Row", {
284
284
  element: element,
285
285
  dataIndex: i,
286
286
  cellData: data[i],
287
- height: height
287
+ height: height,
288
+ rowRenderer: this // useful, e.g., for getting default row height
288
289
  };
289
290
 
290
291
  // Render this cell
@@ -28,13 +28,13 @@ qx.Class.define("qx.ui.progressive.renderer.table.cell.Boolean", {
28
28
  construct() {
29
29
  super();
30
30
 
31
- this.__resolveImages();
31
+ this._resolveImages();
32
32
 
33
33
  // dynamic theme switch
34
34
  if (qx.core.Environment.get("qx.dyntheme")) {
35
35
  qx.theme.manager.Meta.getInstance().addListener(
36
36
  "changeTheme",
37
- this.__resolveImages,
37
+ this._resolveImages,
38
38
  this
39
39
  );
40
40
  }
@@ -53,19 +53,13 @@ qx.Class.define("qx.ui.progressive.renderer.table.cell.Boolean", {
53
53
  },
54
54
 
55
55
  members: {
56
- __iconUrlTrue: null,
57
- __iconUrlFalse: null,
58
- __numericAllowed: null,
59
- __conditions: null,
60
- __defaultTextAlign: null,
61
- __defaultColor: null,
62
- __defaultFontStyle: null,
63
- __defaultFontWeight: null,
56
+ _iconUrlTrue: null,
57
+ _iconUrlFalse: null,
64
58
 
65
59
  /**
66
60
  * Resolve the boolean images using the alias and resource manager.
67
61
  */
68
- __resolveImages() {
62
+ _resolveImages() {
69
63
  var aliasManager = qx.util.AliasManager.getInstance();
70
64
  var resourceManager = qx.util.ResourceManager.getInstance();
71
65
  var boolTrueImg = aliasManager.resolve(
@@ -76,25 +70,29 @@ qx.Class.define("qx.ui.progressive.renderer.table.cell.Boolean", {
76
70
  "decoration/table/boolean-false.png"
77
71
  );
78
72
 
79
- this.__iconUrlTrue = resourceManager.toUri(boolTrueImg);
80
- this.__iconUrlFalse = resourceManager.toUri(boolFalseImg);
73
+ this._iconUrlTrue = resourceManager.toUri(boolTrueImg);
74
+ this._iconUrlFalse = resourceManager.toUri(boolFalseImg);
81
75
  },
82
76
 
83
- // overridden
84
- _identifyImage(cellInfo) {
85
- var imageData = {
77
+ _getDefaultImageData(cellInfo) {
78
+ return {
86
79
  imageWidth: 11,
87
80
  imageHeight: 11
88
81
  };
82
+ },
83
+
84
+ // overridden
85
+ _identifyImage(cellInfo) {
86
+ var imageData = this._getDefaultImageData(cellInfo);
89
87
 
90
88
  switch (cellInfo.cellData) {
91
89
  case true:
92
- imageData.url = this.__iconUrlTrue;
90
+ imageData.url = this._iconUrlTrue;
93
91
  imageData.extras = "celldata='1' ";
94
92
  break;
95
93
 
96
94
  case false:
97
- imageData.url = this.__iconUrlFalse;
95
+ imageData.url = this._iconUrlFalse;
98
96
  imageData.extras = "celldata='0' ";
99
97
  break;
100
98
 
@@ -115,7 +113,7 @@ qx.Class.define("qx.ui.progressive.renderer.table.cell.Boolean", {
115
113
 
116
114
  if (
117
115
  qx.core.Environment.get("css.alphaimageloaderneeded") &&
118
- /\.png$/i.test(this.__iconUrlTrue)
116
+ /\.png$/i.test(this._iconUrlTrue)
119
117
  ) {
120
118
  imageData.extras +=
121
119
  " this.src='" +
@@ -124,18 +122,18 @@ qx.Class.define("qx.ui.progressive.renderer.table.cell.Boolean", {
124
122
  " var loader = 'DXImageTransform.Microsoft.AlphaImageLoader'; " +
125
123
  " var filters = this.filters.item(loader); " +
126
124
  " filters.src='" +
127
- this.__iconUrlTrue +
125
+ this._iconUrlTrue +
128
126
  "'; " +
129
127
  " filters.sizingMethod = 'scale'; ";
130
128
  } else {
131
- imageData.extras += " this.src='" + this.__iconUrlTrue + "'; ";
129
+ imageData.extras += " this.src='" + this._iconUrlTrue + "'; ";
132
130
  }
133
131
 
134
132
  imageData.extras += " node.nodeValue='1'; " + "} " + "else " + "{";
135
133
 
136
134
  if (
137
135
  qx.core.Environment.get("css.alphaimageloaderneeded") &&
138
- /\.png$/i.test(this.__iconUrlFalse)
136
+ /\.png$/i.test(this._iconUrlFalse)
139
137
  ) {
140
138
  imageData.extras +=
141
139
  " this.src='" +
@@ -144,11 +142,11 @@ qx.Class.define("qx.ui.progressive.renderer.table.cell.Boolean", {
144
142
  " var loader = 'DXImageTransform.Microsoft.AlphaImageLoader'; " +
145
143
  " var filters = this.filters.item(loader); " +
146
144
  " filters.src='" +
147
- this.__iconUrlFalse +
145
+ this._iconUrlFalse +
148
146
  "'; " +
149
147
  " filters.sizingMethod = 'scale'; ";
150
148
  } else {
151
- imageData.extras += " this.src='" + this.__iconUrlFalse + "'; ";
149
+ imageData.extras += " this.src='" + this._iconUrlFalse + "'; ";
152
150
  }
153
151
 
154
152
  imageData.extras += " node.nodeValue='0'; " + "}";
@@ -176,13 +174,13 @@ qx.Class.define("qx.ui.progressive.renderer.table.cell.Boolean", {
176
174
  },
177
175
 
178
176
  destruct() {
179
- this.__iconUrlTrue = this.__iconUrlFalse = null;
177
+ this._iconUrlTrue = this._iconUrlFalse = null;
180
178
 
181
179
  // remove dynamic theme listener
182
180
  if (qx.core.Environment.get("qx.dyntheme")) {
183
181
  qx.theme.manager.Meta.getInstance().removeListener(
184
182
  "changeTheme",
185
- this.__resolveImages,
183
+ this._resolveImages,
186
184
  this
187
185
  );
188
186
  }
@@ -21,6 +21,8 @@
21
21
 
22
22
  /**
23
23
  * Abstract Icon cell renderer.
24
+ *
25
+ * @asset(qx/static/blank.gif)
24
26
  */
25
27
  qx.Class.define("qx.ui.progressive.renderer.table.cell.Icon", {
26
28
  type: "abstract",
@@ -34,14 +36,14 @@ qx.Class.define("qx.ui.progressive.renderer.table.cell.Icon", {
34
36
  var resourceManager = qx.util.ResourceManager.getInstance();
35
37
  var blankImg = aliasManager.resolve("qx/static/blank.gif");
36
38
 
37
- this.__imageBlank = resourceManager.toUri(blankImg);
39
+ this._imageBlank = resourceManager.toUri(blankImg);
38
40
  },
39
41
 
40
42
  members: {
41
43
  /**
42
44
  * A blank image for use as a spacer in place of another image
43
45
  */
44
- __imageBlank: null,
46
+ _imageBlank: null,
45
47
 
46
48
  /**
47
49
  * Retrieve the URI for a blank image
@@ -50,7 +52,7 @@ qx.Class.define("qx.ui.progressive.renderer.table.cell.Icon", {
50
52
  * The URI of the blank image.
51
53
  */
52
54
  getBlankImage() {
53
- return this.__imageBlank;
55
+ return this._imageBlank;
54
56
  },
55
57
 
56
58
  /**
@@ -118,7 +120,7 @@ qx.Class.define("qx.ui.progressive.renderer.table.cell.Icon", {
118
120
  // overridden
119
121
  _getContentHtml(cellInfo) {
120
122
  var html = [];
121
- var imageData = this.__getImageData(cellInfo);
123
+ var imageData = this._getImageData(cellInfo);
122
124
 
123
125
  // Start the image tag
124
126
  html.push("<img ");
@@ -130,7 +132,7 @@ qx.Class.define("qx.ui.progressive.renderer.table.cell.Icon", {
130
132
  ) {
131
133
  html.push(
132
134
  'src="',
133
- this.__imageBlank,
135
+ this._imageBlank,
134
136
  '" style="filter:',
135
137
  "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='",
136
138
  imageData.url,
@@ -192,7 +194,7 @@ qx.Class.define("qx.ui.progressive.renderer.table.cell.Icon", {
192
194
  * @return {Map}
193
195
  * See {@link #_identifyImage}
194
196
  */
195
- __getImageData(cellInfo) {
197
+ _getImageData(cellInfo) {
196
198
  // Query the subclass about image and tooltip
197
199
  var imageData = this._identifyImage(cellInfo);
198
200
 
@@ -206,7 +208,7 @@ qx.Class.define("qx.ui.progressive.renderer.table.cell.Icon", {
206
208
 
207
209
  // If subclass gave null as url, replace with url to empty image
208
210
  if (imageData.url == null) {
209
- imageData.url = this.__imageBlank;
211
+ imageData.url = this._imageBlank;
210
212
  }
211
213
 
212
214
  return imageData;