@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.
Files changed (153) hide show
  1. package/CHANGELOG.md +3 -0
  2. package/Manifest.json +22 -22
  3. package/lib/compiler/compile-info.json +66 -66
  4. package/lib/compiler/index.js +406 -335
  5. package/lib/resource/qx/tool/cli/templates/loader/loader-browser.tmpl.js +1 -2
  6. package/lib/resource/qx/tool/cli/templates/skeleton/mobile/source/theme/custom/css/custom.css.map +1 -1
  7. package/lib/resource/qx/tool/schema/compile-1-0-0.json +11 -1
  8. package/npm-shrinkwrap.json +793 -744
  9. package/package.json +9 -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 +1 -1
  68. package/source/class/qx/tool/cli/api/CompilerApi.js +3 -7
  69. package/source/class/qx/tool/cli/commands/Compile.js +9 -1
  70. package/source/class/qx/tool/cli/commands/Lint.js +21 -17
  71. package/source/class/qx/tool/compiler/ClassFile.js +22 -12
  72. package/source/class/qx/tool/compiler/Es6ify.js +12 -5
  73. package/source/class/qx/tool/compiler/TargetError.js +3 -4
  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 +7 -5
  78. package/source/class/qx/tool/compiler/targets/meta/AbstractJavascriptMeta.js +1 -1
  79. package/source/class/qx/tool/compiler/targets/meta/Browserify.js +88 -52
  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/ComboBox.js +7 -15
  91. package/source/class/qx/ui/form/DateField.js +9 -18
  92. package/source/class/qx/ui/form/FileSelectorButton.js +157 -0
  93. package/source/class/qx/ui/form/Spinner.js +7 -15
  94. package/source/class/qx/ui/form/TextArea.js +3 -7
  95. package/source/class/qx/ui/form/VirtualComboBox.js +8 -16
  96. package/source/class/qx/ui/form/VirtualSelectBox.js +21 -37
  97. package/source/class/qx/ui/layout/Canvas.js +2 -2
  98. package/source/class/qx/ui/mobile/container/MIScroll.js +3 -7
  99. package/source/class/qx/ui/progressive/headfoot/Progress.js +22 -34
  100. package/source/class/qx/ui/progressive/renderer/table/Row.js +1 -1
  101. package/source/class/qx/ui/splitpane/Pane.js +14 -22
  102. package/source/class/qx/ui/table/MTableContextMenu.js +63 -71
  103. package/source/class/qx/ui/table/Table.js +3 -7
  104. package/source/class/qx/ui/table/model/Abstract.js +5 -2
  105. package/source/class/qx/ui/table/pane/Scroller.js +8 -12
  106. package/source/class/qx/ui/toolbar/FileSelectorButton.js +57 -0
  107. package/source/class/qx/ui/toolbar/Part.js +3 -7
  108. package/source/class/qx/ui/tree/VirtualTree.js +5 -9
  109. package/source/class/qx/ui/treevirtual/MNode.js +5 -3
  110. package/source/class/qx/ui/treevirtual/TreeVirtual.js +3 -7
  111. package/source/class/qx/ui/virtual/core/Pane.js +30 -42
  112. package/source/class/qx/util/DynamicScriptLoader.js +31 -43
  113. package/source/resource/qx/iconfont/MaterialIcons/materialicons-v126.eot +0 -0
  114. package/source/resource/qx/iconfont/MaterialIcons/{materialicons-v70.ttf → materialicons-v126.ttf} +0 -0
  115. package/source/resource/qx/iconfont/MaterialIcons/materialicons-v126.woff +0 -0
  116. package/source/resource/qx/iconfont/MaterialIcons/materialicons-v126.woff2 +0 -0
  117. package/source/resource/qx/iconfont/MaterialIcons/materialiconsoutlined-v101.eot +0 -0
  118. package/source/resource/qx/iconfont/MaterialIcons/materialiconsoutlined-v101.otf +0 -0
  119. package/source/resource/qx/iconfont/MaterialIcons/materialiconsoutlined-v101.woff +0 -0
  120. package/source/resource/qx/iconfont/MaterialIcons/materialiconsoutlined-v101.woff2 +0 -0
  121. package/source/resource/qx/iconfont/MaterialIcons/materialiconsround-v100.eot +0 -0
  122. package/source/resource/qx/iconfont/MaterialIcons/materialiconsround-v100.otf +0 -0
  123. package/source/resource/qx/iconfont/MaterialIcons/materialiconsround-v100.woff +0 -0
  124. package/source/resource/qx/iconfont/MaterialIcons/materialiconsround-v100.woff2 +0 -0
  125. package/source/resource/qx/iconfont/MaterialIcons/materialiconssharp-v101.eot +0 -0
  126. package/source/resource/qx/iconfont/MaterialIcons/materialiconssharp-v101.otf +0 -0
  127. package/source/resource/qx/iconfont/MaterialIcons/materialiconssharp-v101.woff +0 -0
  128. package/source/resource/qx/iconfont/MaterialIcons/materialiconssharp-v101.woff2 +0 -0
  129. package/source/resource/qx/iconfont/MaterialIcons/materialiconstwotone-v104.eot +0 -0
  130. package/source/resource/qx/iconfont/MaterialIcons/materialiconstwotone-v104.otf +0 -0
  131. package/source/resource/qx/iconfont/MaterialIcons/materialiconstwotone-v104.woff +0 -0
  132. package/source/resource/qx/iconfont/MaterialIcons/materialiconstwotone-v104.woff2 +0 -0
  133. package/source/resource/qx/tool/cli/templates/loader/loader-browser.tmpl.js +1 -2
  134. package/source/resource/qx/tool/schema/compile-1-0-0.json +11 -1
  135. package/source/resource/qx/iconfont/MaterialIcons/materialicons-v70.eot +0 -0
  136. package/source/resource/qx/iconfont/MaterialIcons/materialicons-v70.woff +0 -0
  137. package/source/resource/qx/iconfont/MaterialIcons/materialicons-v70.woff2 +0 -0
  138. package/source/resource/qx/iconfont/MaterialIcons/materialiconsoutlined-v38.eot +0 -0
  139. package/source/resource/qx/iconfont/MaterialIcons/materialiconsoutlined-v38.otf +0 -0
  140. package/source/resource/qx/iconfont/MaterialIcons/materialiconsoutlined-v38.woff +0 -0
  141. package/source/resource/qx/iconfont/MaterialIcons/materialiconsoutlined-v38.woff2 +0 -0
  142. package/source/resource/qx/iconfont/MaterialIcons/materialiconsround-v37.eot +0 -0
  143. package/source/resource/qx/iconfont/MaterialIcons/materialiconsround-v37.otf +0 -0
  144. package/source/resource/qx/iconfont/MaterialIcons/materialiconsround-v37.woff +0 -0
  145. package/source/resource/qx/iconfont/MaterialIcons/materialiconsround-v37.woff2 +0 -0
  146. package/source/resource/qx/iconfont/MaterialIcons/materialiconssharp-v38.eot +0 -0
  147. package/source/resource/qx/iconfont/MaterialIcons/materialiconssharp-v38.otf +0 -0
  148. package/source/resource/qx/iconfont/MaterialIcons/materialiconssharp-v38.woff +0 -0
  149. package/source/resource/qx/iconfont/MaterialIcons/materialiconssharp-v38.woff2 +0 -0
  150. package/source/resource/qx/iconfont/MaterialIcons/materialiconstwotone-v36.eot +0 -0
  151. package/source/resource/qx/iconfont/MaterialIcons/materialiconstwotone-v36.otf +0 -0
  152. package/source/resource/qx/iconfont/MaterialIcons/materialiconstwotone-v36.woff +0 -0
  153. package/source/resource/qx/iconfont/MaterialIcons/materialiconstwotone-v36.woff2 +0 -0
@@ -432,11 +432,13 @@ qx.Class.define("qx.tool.compiler.targets.Target", {
432
432
  new qx.tool.compiler.targets.meta.PolyfillJs(appMeta)
433
433
  );
434
434
 
435
- // Add browserified CommonJS modules, if any
436
- if (appMeta.getEnvironmentValue("qx.compiler.applicationType") == "browser") {
437
- bootPackage.addJavascriptMeta(
438
- new qx.tool.compiler.targets.meta.Browserify(appMeta));
439
- }
435
+ // Add browserified CommonJS modules, if any. The Browserify
436
+ // class will always bundle local modules specified for an
437
+ // application in compile.json, but will not bundle `require()`d
438
+ // modules that are Node modules.
439
+ bootPackage.addJavascriptMeta(
440
+ new qx.tool.compiler.targets.meta.Browserify(appMeta)
441
+ );
440
442
 
441
443
  /*
442
444
  * Assemble the Parts
@@ -22,7 +22,7 @@
22
22
 
23
23
  const fs = qx.tool.utils.Promisify.fs;
24
24
  const path = require("upath");
25
- const sourceMap = require("source-map");
25
+ const sourceMap = require("source-map-js");
26
26
 
27
27
  /**
28
28
  * An AbstractJavascriptMeta provides an abstraction of some source code, and might be
@@ -24,7 +24,7 @@ const fs = qx.tool.utils.Promisify.fs;
24
24
  const path = require("upath");
25
25
 
26
26
  /**
27
- *
27
+ *
28
28
  */
29
29
  qx.Class.define("qx.tool.compiler.targets.meta.Browserify", {
30
30
  extend: qx.tool.compiler.targets.meta.AbstractJavascriptMeta,
@@ -36,7 +36,7 @@ qx.Class.define("qx.tool.compiler.targets.meta.Browserify", {
36
36
  },
37
37
 
38
38
  members: {
39
- __appMeta : null,
39
+ __appMeta: null,
40
40
 
41
41
  /**
42
42
  * @Override
@@ -45,37 +45,50 @@ qx.Class.define("qx.tool.compiler.targets.meta.Browserify", {
45
45
  let hasCommonjsModules = false;
46
46
  let commonjsModules = new Set();
47
47
  let references = {};
48
+ const localModules =
49
+ this.__appMeta.getApplication().getLocalModules() || {};
48
50
  const db = this.__appMeta.getAnalyser().getDatabase();
49
51
 
50
- // Get a Set of unique `require`d CommonJS module names from all classes
51
- for (let className in db.classInfo) {
52
- let classInfo = db.classInfo[className];
53
- if (classInfo.commonjsModules) {
54
- Object.keys(classInfo.commonjsModules).forEach(
55
- moduleName =>
56
- {
52
+ // Only include discovered `require()`d Node modules if the
53
+ // target application type is browser.
54
+ if (
55
+ this.__appMeta.getEnvironmentValue("qx.compiler.applicationType") ==
56
+ "browser"
57
+ ) {
58
+ // Get a Set of unique `require`d CommonJS module names from
59
+ // all classes
60
+ for (let className in db.classInfo) {
61
+ let classInfo = db.classInfo[className];
62
+ if (classInfo.commonjsModules) {
63
+ Object.keys(classInfo.commonjsModules).forEach(moduleName => {
64
+ // Ignore this found `require()` if its a local modules
65
+ if (moduleName in localModules) {
66
+ return;
67
+ }
68
+
57
69
  // Add this module name to the set of module names
58
70
  commonjsModules.add(moduleName);
59
71
 
60
72
  // Add the list of references from which this module was require()d
61
- if (! references[moduleName]) {
73
+ if (!references[moduleName]) {
62
74
  references[moduleName] = new Set();
63
75
  }
64
- references[moduleName].add([ ...classInfo.commonjsModules[moduleName] ]);
76
+ references[moduleName].add([
77
+ ...classInfo.commonjsModules[moduleName]
78
+ ]);
65
79
 
66
80
  // There is at least one module
67
81
  hasCommonjsModules = true;
68
82
  });
83
+ }
69
84
  }
70
85
  }
71
86
 
72
- // If there are any CommonJS modules required, browserify them
73
- if (hasCommonjsModules) {
74
- await this.__browserify(
75
- commonjsModules,
76
- references,
77
- ws
78
- );
87
+ // If there are any CommonJS modules required to be bundled, or
88
+ // any local modules specified for the application in
89
+ // compile.json, browserify them
90
+ if (hasCommonjsModules || localModules) {
91
+ await this.__browserify(commonjsModules, references, localModules, ws);
79
92
  }
80
93
 
81
94
  await new Promise(resolve => {
@@ -83,8 +96,9 @@ qx.Class.define("qx.tool.compiler.targets.meta.Browserify", {
83
96
  });
84
97
  },
85
98
 
86
- async __browserify(commonjsModules, references, ws) {
87
- let b;
99
+ async __browserify(commonjsModules, references, localModules, ws) {
100
+ const babelify = require("babelify");
101
+ const preset = require("@babel/preset-env");
88
102
  const browserify = require("browserify");
89
103
  const builtins = require("browserify/lib/builtins.js");
90
104
 
@@ -95,42 +109,64 @@ qx.Class.define("qx.tool.compiler.targets.meta.Browserify", {
95
109
  // Convert the Set of CommonJS module names to an array
96
110
  commonjsModules = [...commonjsModules];
97
111
 
98
- return new Promise(resolve =>
99
- {
100
- b = browserify(
101
- [],
102
- {
103
- builtins : builtins,
104
- ignoreMissing : true,
105
- insertGlobals : true,
106
- detectGlobals : true
107
- });
108
- b._mdeps.on("missing", (id, parent) => {
109
- let message = [];
110
-
111
- message.push(`ERROR: could not locate require()d module: "${id}"`);
112
- message.push(" required from:");
113
- [ ...references[id] ].forEach(refs => {
114
- refs.forEach(ref =>
115
- {
116
- message.push(` ${ref}`);
117
- });
118
- });
112
+ return new Promise(resolve => {
113
+ let b = browserify([], {
114
+ builtins: builtins,
115
+ ignoreMissing: true,
116
+ insertGlobals: true,
117
+ detectGlobals: true
118
+ });
119
+
120
+ b._mdeps.on("missing", (id, parent) => {
121
+ let message = [];
122
+
123
+ message.push(`ERROR: could not locate require()d module: "${id}"`);
124
+ message.push(" required from:");
119
125
 
120
- qx.tool.compiler.Console.error(message.join("\n"));
126
+ try {
127
+ [...references[id]].forEach(refs => {
128
+ refs.forEach(ref => {
129
+ message.push(` ${ref}`);
130
+ });
121
131
  });
132
+ } catch (e) {
133
+ message.push(` <compile.json:application.localModules'>`);
134
+ }
135
+
136
+ qx.tool.compiler.Console.error(message.join("\n"));
137
+ });
138
+
139
+ // Include any dynamically determined `require()`d modules
140
+ if (commonjsModules.length > 0) {
122
141
  b.require(commonjsModules);
123
- b.bundle((e, output) => {
124
- if (e) {
125
- // We've already handled the case of missing module. This is something else.
126
- qx.tool.compiler.Console.error(`Failed: ${e}`);
127
- throw(e);
128
- }
129
-
130
- ws.write(output);
131
- resolve(null);
132
- });
142
+ }
143
+
144
+ // Include any local modules specified for the application
145
+ // in compile.json
146
+ if (localModules) {
147
+ for (let requireName in localModules) {
148
+ b.require(localModules[requireName], { expose: requireName });
149
+ }
150
+ }
151
+
152
+ // Ensure ES6 local modules are converted to CommonJS format
153
+ b.transform(babelify, {
154
+ presets: [preset],
155
+ sourceMaps: false,
156
+ global: true
133
157
  });
158
+
159
+ b.bundle((e, output) => {
160
+ if (e) {
161
+ // We've already handled the case of missing module. This is something else.
162
+ qx.tool.compiler.Console.error(`Failed: ${e}`);
163
+ throw e;
164
+ }
165
+
166
+ ws.write(output);
167
+ resolve(null);
168
+ });
169
+ });
134
170
  },
135
171
 
136
172
  /**
@@ -124,10 +124,18 @@ qx.Class.define("qx.tool.compiler.targets.meta.Uglify", {
124
124
  throw new Error("UglifyJS failed to minimise: " + (err.message || err));
125
125
  }
126
126
  await fs.writeFileAsync(outJsFilename, result.code, { encoding: "utf8" });
127
- await fs.writeFileAsync(outJsFilename + ".map", result.map, { encoding: "utf8" });
127
+ await fs.writeFileAsync(outJsFilename + ".map", result.map, {
128
+ encoding: "utf8"
129
+ });
128
130
  if (this._appMeta.getTarget().isSaveUnminified()) {
129
- await fs.writeFileAsync(outJsFilename + ".unminified", inSourceCode, { encoding: "utf8" });
130
- await fs.writeFileAsync(outJsFilename + ".unminified.map", JSON.stringify(inSourceMap, null, 2), { encoding: "utf8" });
131
+ await fs.writeFileAsync(outJsFilename + ".unminified", inSourceCode, {
132
+ encoding: "utf8"
133
+ });
134
+ await fs.writeFileAsync(
135
+ outJsFilename + ".unminified.map",
136
+ JSON.stringify(inSourceMap, null, 2),
137
+ { encoding: "utf8" }
138
+ );
131
139
  }
132
140
 
133
141
  this.fireDataEvent("minifiedApplication", {
@@ -23,7 +23,7 @@
23
23
  * *********************************************************************** */
24
24
 
25
25
  const Ajv = require("ajv");
26
- const betterAjvErrors = require("better-ajv-errors");
26
+ const betterAjvErrors = require("better-ajv-errors").default;
27
27
  const fs = qx.tool.utils.Promisify.fs;
28
28
 
29
29
  qx.Class.define("qx.tool.utils.Json", {
@@ -25,8 +25,8 @@ const rimraf = require("rimraf");
25
25
  const dot = require("dot");
26
26
  require("jstransformer-dot");
27
27
  const metalsmith = require("metalsmith");
28
- const layouts = require("metalsmith-layouts");
29
- const markdown = require("metalsmith-markdown");
28
+ const layouts = require("@metalsmith/layouts");
29
+ const markdown = require("@metalsmith/markdown");
30
30
  //const filenames = require("metalsmith-filenames");
31
31
  //var permalinks = require("metalsmith-permalinks");
32
32
  /**
@@ -415,23 +415,19 @@ qx.Class.define("qx.ui.basic.Label", {
415
415
 
416
416
  if (value != null) {
417
417
  value.bind("enabled", this, "enabled");
418
- this.__tapListenerId = this.addListener(
419
- "tap",
420
- function () {
421
- // only focus focusable elements [BUG #3555]
422
- if (value.isFocusable()) {
423
- value.focus.apply(value);
424
- }
425
- // furthermore toggle if possible [BUG #6881]
426
- if (
427
- "toggleValue" in value &&
428
- typeof value.toggleValue === "function"
429
- ) {
430
- value.toggleValue();
431
- }
432
- },
433
- this
434
- );
418
+ this.__tapListenerId = this.addListener("tap", () => {
419
+ // only focus focusable elements [BUG #3555]
420
+ if (value.isFocusable()) {
421
+ value.focus.apply(value);
422
+ }
423
+ // furthermore toggle if possible [BUG #6881]
424
+ if (
425
+ "toggleValue" in value &&
426
+ typeof value.toggleValue === "function"
427
+ ) {
428
+ value.toggleValue();
429
+ }
430
+ });
435
431
  }
436
432
  },
437
433
 
@@ -461,20 +461,16 @@ qx.Mixin.define("qx.ui.core.MPlacement", {
461
461
  );
462
462
 
463
463
  // Remove the listener when the element disappears.
464
- this.addListener(
465
- "disappear",
466
- function () {
467
- if (this.__ptwLiveUpdater) {
468
- qx.event.Idle.getInstance().removeListener(
469
- "interval",
470
- this.__ptwLiveUpdater
471
- );
472
-
473
- this.__ptwLiveUpdater = null;
474
- }
475
- },
476
- this
477
- );
464
+ this.addListener("disappear", () => {
465
+ if (this.__ptwLiveUpdater) {
466
+ qx.event.Idle.getInstance().removeListener(
467
+ "interval",
468
+ this.__ptwLiveUpdater
469
+ );
470
+
471
+ this.__ptwLiveUpdater = null;
472
+ }
473
+ });
478
474
  }
479
475
 
480
476
  this._place(coords);
@@ -532,13 +528,9 @@ qx.Mixin.define("qx.ui.core.MPlacement", {
532
528
  }
533
529
 
534
530
  if (size == null) {
535
- this.addListenerOnce(
536
- "appear",
537
- function () {
538
- this.__getPlacementSize(callback);
539
- },
540
- this
541
- );
531
+ this.addListenerOnce("appear", () => {
532
+ this.__getPlacementSize(callback);
533
+ });
542
534
  } else {
543
535
  callback.call(this, size);
544
536
  }
@@ -2109,13 +2109,12 @@ qx.Class.define("qx.ui.core.Widget", {
2109
2109
  var manager = qx.locale.Manager.getInstance();
2110
2110
  this.__toolTipTextListenerId = manager.addListener(
2111
2111
  "changeLocale",
2112
- function () {
2112
+ () => {
2113
2113
  var toolTipText = this.getToolTipText();
2114
2114
  if (toolTipText && toolTipText.translate) {
2115
2115
  this.setToolTipText(toolTipText.translate());
2116
2116
  }
2117
- },
2118
- this
2117
+ }
2119
2118
  );
2120
2119
  }
2121
2120
  },
@@ -71,13 +71,9 @@ qx.Class.define("qx.ui.core.scroll.NativeScrollBar", {
71
71
  }
72
72
 
73
73
  // prevent drag & drop on scrolling
74
- this.addListener(
75
- "track",
76
- function (e) {
77
- e.stopPropagation();
78
- },
79
- this
80
- );
74
+ this.addListener("track", e => {
75
+ e.stopPropagation();
76
+ });
81
77
  },
82
78
 
83
79
  events: {
@@ -81,13 +81,9 @@ qx.Class.define("qx.ui.core.scroll.ScrollBar", {
81
81
  }
82
82
 
83
83
  // prevent drag & drop on scrolling
84
- this.addListener(
85
- "track",
86
- function (e) {
87
- e.stopPropagation();
88
- },
89
- this
90
- );
84
+ this.addListener("track", e => {
85
+ e.stopPropagation();
86
+ });
91
87
  },
92
88
 
93
89
  events: {
@@ -92,64 +92,54 @@ qx.Class.define("qx.ui.embed.Iframe", {
92
92
  this.__blockerElement = this._createBlockerElement();
93
93
 
94
94
  if (qx.core.Environment.get("ecmascript.mutationobserver")) {
95
- this.addListenerOnce(
96
- "appear",
97
- function () {
98
- var element = this.getContentElement().getDomElement();
99
-
100
- // Mutation record check callback
101
- var isDOMNodeInserted = function (mutationRecord) {
102
- var i;
103
- // 'our' iframe was either added...
104
- if (mutationRecord.addedNodes) {
105
- for (i = mutationRecord.addedNodes.length; i >= 0; --i) {
106
- if (mutationRecord.addedNodes[i] == element) {
107
- return true;
108
- }
95
+ this.addListenerOnce("appear", () => {
96
+ var element = this.getContentElement().getDomElement();
97
+
98
+ // Mutation record check callback
99
+ var isDOMNodeInserted = function (mutationRecord) {
100
+ var i;
101
+ // 'our' iframe was either added...
102
+ if (mutationRecord.addedNodes) {
103
+ for (i = mutationRecord.addedNodes.length; i >= 0; --i) {
104
+ if (mutationRecord.addedNodes[i] == element) {
105
+ return true;
109
106
  }
110
107
  }
111
- // ...or removed
112
- if (mutationRecord.removedNodes) {
113
- for (i = mutationRecord.removedNodes.length; i >= 0; --i) {
114
- if (mutationRecord.removedNodes[i] == element) {
115
- return true;
116
- }
108
+ }
109
+ // ...or removed
110
+ if (mutationRecord.removedNodes) {
111
+ for (i = mutationRecord.removedNodes.length; i >= 0; --i) {
112
+ if (mutationRecord.removedNodes[i] == element) {
113
+ return true;
117
114
  }
118
115
  }
119
- return false;
120
- };
116
+ }
117
+ return false;
118
+ };
121
119
 
122
- var observer = new MutationObserver(
123
- function (mutationRecords) {
124
- if (mutationRecords.some(isDOMNodeInserted)) {
125
- this._syncSourceAfterDOMMove();
126
- }
127
- }.bind(this)
128
- );
129
-
130
- // Observe parent element
131
- var parent = this.getLayoutParent()
132
- .getContentElement()
133
- .getDomElement();
134
- observer.observe(parent, { childList: true, subtree: true });
135
- },
136
- this
137
- );
120
+ var observer = new MutationObserver(
121
+ function (mutationRecords) {
122
+ if (mutationRecords.some(isDOMNodeInserted)) {
123
+ this._syncSourceAfterDOMMove();
124
+ }
125
+ }.bind(this)
126
+ );
127
+
128
+ // Observe parent element
129
+ var parent = this.getLayoutParent().getContentElement().getDomElement();
130
+ observer.observe(parent, { childList: true, subtree: true });
131
+ });
138
132
  }
139
133
  // !qx.core.Environment.get("ecmascript.mutationobserver")
140
134
  else {
141
- this.addListenerOnce(
142
- "appear",
143
- function () {
144
- var element = this.getContentElement().getDomElement();
145
- qx.bom.Event.addNativeListener(
146
- element,
147
- "DOMNodeInserted",
148
- this._onDOMNodeInserted
149
- );
150
- },
151
- this
152
- );
135
+ this.addListenerOnce("appear", () => {
136
+ var element = this.getContentElement().getDomElement();
137
+ qx.bom.Event.addNativeListener(
138
+ element,
139
+ "DOMNodeInserted",
140
+ this._onDOMNodeInserted
141
+ );
142
+ });
153
143
 
154
144
  this._onDOMNodeInserted = qx.lang.Function.listener(
155
145
  this._syncSourceAfterDOMMove,
@@ -994,18 +994,14 @@ qx.Class.define("qx.ui.form.AbstractField", {
994
994
  /* qx Bug #8870: Firefox 35 will not display a text area's
995
995
  placeholder text if the attribute is set before the
996
996
  element is added to the DOM. This is fixed in FF 36. */
997
- this.addListenerOnce(
998
- "appear",
999
- function () {
1000
- this.getContentElement()
1001
- .getDomElement()
1002
- .removeAttribute("placeholder");
1003
- this.getContentElement()
1004
- .getDomElement()
1005
- .setAttribute("placeholder", value);
1006
- },
1007
- this
1008
- );
997
+ this.addListenerOnce("appear", () => {
998
+ this.getContentElement()
999
+ .getDomElement()
1000
+ .removeAttribute("placeholder");
1001
+ this.getContentElement()
1002
+ .getDomElement()
1003
+ .setAttribute("placeholder", value);
1004
+ });
1009
1005
  }
1010
1006
  }
1011
1007
  }
@@ -53,21 +53,13 @@ qx.Class.define("qx.ui.form.ComboBox", {
53
53
 
54
54
  // forward the focusin and focusout events to the textfield. The textfield
55
55
  // is not focusable so the events need to be forwarded manually.
56
- this.addListener(
57
- "focusin",
58
- function (e) {
59
- textField.fireNonBubblingEvent("focusin", qx.event.type.Focus);
60
- },
61
- this
62
- );
63
-
64
- this.addListener(
65
- "focusout",
66
- function (e) {
67
- textField.fireNonBubblingEvent("focusout", qx.event.type.Focus);
68
- },
69
- this
70
- );
56
+ this.addListener("focusin", e => {
57
+ textField.fireNonBubblingEvent("focusin", qx.event.type.Focus);
58
+ });
59
+
60
+ this.addListener("focusout", e => {
61
+ textField.fireNonBubblingEvent("focusout", qx.event.type.Focus);
62
+ });
71
63
  },
72
64
 
73
65
  /*
@@ -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
  },