@qooxdoo/framework 7.4.2 → 7.5.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/Manifest.json +1 -1
- package/bin/deploy/qx +7 -5
- package/lib/compiler/compile-info.json +81 -81
- package/lib/compiler/index.js +496 -453
- package/lib/resource/qx/tool/cli/templates/skeleton/desktop/source/class/custom/Application.tmpl.js +7 -7
- package/lib/resource/qx/tool/cli/templates/skeleton/desktop/source/class/custom/test/DemoTest.tmpl.js +10 -10
- package/lib/resource/qx/tool/cli/templates/skeleton/mobile/source/class/custom/Application.tmpl.js +6 -6
- package/lib/resource/qx/tool/cli/templates/skeleton/mobile/source/class/custom/page/Login.tmpl.js +9 -9
- package/lib/resource/qx/tool/cli/templates/skeleton/mobile/source/class/custom/page/Overview.tmpl.js +5 -5
- package/lib/resource/qx/tool/cli/templates/skeleton/package/source/class/custom/demo/Application.tmpl.js +7 -7
- package/lib/resource/qx/tool/cli/templates/skeleton/package/source/class/custom/test/DemoTest.tmpl.js +10 -10
- package/lib/resource/qx/tool/cli/templates/skeleton/server/source/class/custom/Application.tmpl.js +6 -6
- package/lib/resource/qx/tool/cli/templates/skeleton/server/source/class/custom/test/DemoTest.tmpl.js +12 -12
- package/lib/resource/qx/tool/website/src/about.md +1 -1
- package/package.json +2 -2
- package/source/class/qx/Class.js +3 -3
- package/source/class/qx/bom/Cookie.js +1 -1
- package/source/class/qx/data/Array.js +3 -3
- package/source/class/qx/data/SingleValueBinding.js +1 -1
- package/source/class/qx/dom/Hierarchy.js +2 -2
- package/source/class/qx/event/Manager.js +1 -1
- package/source/class/qx/event/handler/TouchCore.js +1 -1
- package/source/class/qx/html/Jsx.js +1 -1
- package/source/class/qx/lang/Array.js +2 -2
- package/source/class/qx/lang/Function.js +19 -22
- package/source/class/qx/locale/MTranslation.js +4 -4
- package/source/class/qx/locale/Manager.js +7 -7
- package/source/class/qx/module/util/Array.js +2 -2
- package/source/class/qx/test/io/transport/Websocket.js +1 -1
- package/source/class/qx/theme/IndigoDark.js +28 -0
- package/source/class/qx/theme/indigo/AppearanceDark.js +186 -0
- package/source/class/qx/theme/indigo/ColorDark.js +117 -0
- package/source/class/qx/theme/indigo/DecorationDark.js +30 -0
- package/source/class/qx/theme/indigo/ImageDark.js +101 -0
- package/source/class/qx/tool/cli/Application.js +4 -1
- package/source/class/qx/tool/cli/Cli.js +22 -23
- package/source/class/qx/tool/cli/Watch.js +28 -27
- package/source/class/qx/tool/cli/commands/Compile.js +2 -1
- package/source/class/qx/tool/cli/commands/Lint.js +1 -1
- package/source/class/qx/tool/cli/commands/Run.js +6 -7
- package/source/class/qx/tool/cli/commands/Serve.js +29 -36
- package/source/class/qx/tool/cli/commands/Test.js +3 -2
- package/source/class/qx/tool/cli/commands/add/Script.js +3 -1
- package/source/class/qx/tool/cli/commands/package/Install.js +3 -0
- package/source/class/qx/tool/cli/commands/package/Publish.js +16 -4
- package/source/class/qx/tool/compiler/ClassFile.js +2 -1
- package/source/class/qx/tool/compiler/app/Cldr.js +63 -26
- package/source/class/qx/tool/compiler/targets/meta/Browserify.js +19 -9
- package/source/class/qx/ui/basic/Image.js +6 -2
- package/source/class/qx/ui/command/Group.js +2 -2
- package/source/class/qx/ui/command/GroupManager.js +3 -3
- package/source/class/qx/ui/control/ColorSelector.js +1 -1
- package/source/class/qx/ui/core/MMultiSelectionHandling.js +1 -1
- package/source/class/qx/ui/core/SingleSelectionManager.js +1 -1
- package/source/class/qx/ui/core/Widget.js +13 -42
- package/source/class/qx/ui/form/Form.js +1 -1
- package/source/class/qx/ui/list/List.js +1 -1
- package/source/class/qx/ui/mobile/form/Form.js +2 -2
- package/source/class/qx/util/OOUtil.js +1 -1
- package/source/resource/qx/mobile/scss/common/_gradients.scss +1 -1
- package/source/resource/qx/tool/cli/templates/skeleton/desktop/source/class/custom/Application.tmpl.js +7 -7
- package/source/resource/qx/tool/cli/templates/skeleton/desktop/source/class/custom/test/DemoTest.tmpl.js +10 -10
- package/source/resource/qx/tool/cli/templates/skeleton/mobile/source/class/custom/Application.tmpl.js +6 -6
- package/source/resource/qx/tool/cli/templates/skeleton/mobile/source/class/custom/page/Login.tmpl.js +9 -9
- package/source/resource/qx/tool/cli/templates/skeleton/mobile/source/class/custom/page/Overview.tmpl.js +5 -5
- package/source/resource/qx/tool/cli/templates/skeleton/package/source/class/custom/demo/Application.tmpl.js +7 -7
- package/source/resource/qx/tool/cli/templates/skeleton/package/source/class/custom/test/DemoTest.tmpl.js +10 -10
- package/source/resource/qx/tool/cli/templates/skeleton/server/source/class/custom/Application.tmpl.js +6 -6
- package/source/resource/qx/tool/cli/templates/skeleton/server/source/class/custom/test/DemoTest.tmpl.js +12 -12
- package/source/resource/qx/tool/website/src/about.md +1 -1
|
@@ -2122,24 +2122,17 @@ qx.Class.define("qx.ui.core.Widget", {
|
|
|
2122
2122
|
// property apply
|
|
2123
2123
|
_applyTextColor(value, old) {
|
|
2124
2124
|
// empty template
|
|
2125
|
-
},
|
|
2126
|
-
|
|
2127
|
-
// property apply
|
|
2125
|
+
}, // property apply
|
|
2128
2126
|
_applyZIndex(value, old) {
|
|
2129
2127
|
this.getContentElement().setStyle("zIndex", value == null ? 0 : value);
|
|
2130
|
-
},
|
|
2131
|
-
|
|
2132
|
-
// property apply
|
|
2128
|
+
}, // property apply
|
|
2133
2129
|
_applyVisibility(value, old) {
|
|
2134
2130
|
var content = this.getContentElement();
|
|
2135
|
-
|
|
2136
2131
|
if (value === "visible") {
|
|
2137
2132
|
content.show();
|
|
2138
2133
|
} else {
|
|
2139
2134
|
content.hide();
|
|
2140
|
-
}
|
|
2141
|
-
|
|
2142
|
-
// only force a layout update if visibility change from/to "exclude"
|
|
2135
|
+
} // only force a layout update if visibility change from/to "exclude"
|
|
2143
2136
|
var parent = this.$$parent;
|
|
2144
2137
|
if (
|
|
2145
2138
|
parent &&
|
|
@@ -2187,31 +2180,19 @@ qx.Class.define("qx.ui.core.Widget", {
|
|
|
2187
2180
|
// property apply
|
|
2188
2181
|
_applyFont(value, old) {
|
|
2189
2182
|
// empty template
|
|
2190
|
-
},
|
|
2191
|
-
|
|
2192
|
-
|
|
2193
|
-
---------------------------------------------------------------------------
|
|
2194
|
-
DYNAMIC THEME SWITCH SUPPORT
|
|
2195
|
-
---------------------------------------------------------------------------
|
|
2196
|
-
*/
|
|
2197
|
-
|
|
2183
|
+
}, // ---------------------------------------------------------------------------
|
|
2184
|
+
// DYNAMIC THEME SWITCH SUPPORT
|
|
2185
|
+
// ---------------------------------------------------------------------------
|
|
2198
2186
|
// overridden
|
|
2199
2187
|
_onChangeTheme() {
|
|
2200
2188
|
if (this.isDisposed()) {
|
|
2201
2189
|
return;
|
|
2202
2190
|
}
|
|
2203
|
-
|
|
2204
|
-
|
|
2205
|
-
|
|
2206
|
-
// update the appearance
|
|
2207
|
-
this.updateAppearance();
|
|
2208
|
-
|
|
2209
|
-
// DECORATOR //
|
|
2191
|
+
super._onChangeTheme(); // update the appearance
|
|
2192
|
+
this.updateAppearance(); // DECORATOR //
|
|
2210
2193
|
var value = this.getDecorator();
|
|
2211
2194
|
this._applyDecorator(null, value);
|
|
2212
|
-
this._applyDecorator(value);
|
|
2213
|
-
|
|
2214
|
-
// FONT //
|
|
2195
|
+
this._applyDecorator(value); // FONT //
|
|
2215
2196
|
value = this.getFont();
|
|
2216
2197
|
if (qx.lang.Type.isString(value)) {
|
|
2217
2198
|
this._applyFont(value, value);
|
|
@@ -2561,30 +2542,24 @@ qx.Class.define("qx.ui.core.Widget", {
|
|
|
2561
2542
|
syncWidget(jobs) {
|
|
2562
2543
|
// empty implementation
|
|
2563
2544
|
},
|
|
2564
|
-
|
|
2565
2545
|
/*
|
|
2566
2546
|
---------------------------------------------------------------------------
|
|
2567
|
-
|
|
2547
|
+
EVENT SUPPORT
|
|
2568
2548
|
---------------------------------------------------------------------------
|
|
2569
|
-
*/
|
|
2570
|
-
|
|
2571
|
-
/**
|
|
2549
|
+
*/ /**
|
|
2572
2550
|
* Returns the next event target in the parent chain. May
|
|
2573
2551
|
* also return the widget itself if it is not anonymous.
|
|
2574
2552
|
*
|
|
2575
2553
|
* @return {qx.ui.core.Widget} A working event target of this widget.
|
|
2576
2554
|
* May be <code>null</code> as well.
|
|
2577
|
-
*/
|
|
2578
|
-
getEventTarget() {
|
|
2555
|
+
*/ getEventTarget() {
|
|
2579
2556
|
var target = this;
|
|
2580
|
-
|
|
2581
2557
|
while (target.getAnonymous()) {
|
|
2582
2558
|
target = target.getLayoutParent();
|
|
2583
2559
|
if (!target) {
|
|
2584
2560
|
return null;
|
|
2585
2561
|
}
|
|
2586
2562
|
}
|
|
2587
|
-
|
|
2588
2563
|
return target;
|
|
2589
2564
|
},
|
|
2590
2565
|
|
|
@@ -2751,17 +2726,13 @@ qx.Class.define("qx.ui.core.Widget", {
|
|
|
2751
2726
|
// property apply
|
|
2752
2727
|
_applyNativeContextMenu(value, old, name) {
|
|
2753
2728
|
// empty body to allow overriding
|
|
2754
|
-
},
|
|
2755
|
-
|
|
2756
|
-
// property apply
|
|
2729
|
+
}, // property apply
|
|
2757
2730
|
_applyContextMenu(value, old) {
|
|
2758
2731
|
if (old) {
|
|
2759
2732
|
old.removeState("contextmenu");
|
|
2760
|
-
|
|
2761
2733
|
if (old.getOpener() == this) {
|
|
2762
2734
|
old.resetOpener();
|
|
2763
2735
|
}
|
|
2764
|
-
|
|
2765
2736
|
if (!value) {
|
|
2766
2737
|
this.removeListener("contextmenu", this._onContextMenuOpen);
|
|
2767
2738
|
this.removeListener("longtap", this._onContextMenuOpen);
|
|
@@ -346,7 +346,7 @@ qx.Class.define("qx.ui.form.Form", {
|
|
|
346
346
|
* Validates the form using the
|
|
347
347
|
* {@link qx.ui.form.validation.Manager#validate} method.
|
|
348
348
|
*
|
|
349
|
-
* @return {Boolean
|
|
349
|
+
* @return {Boolean|null} The validation result.
|
|
350
350
|
*/
|
|
351
351
|
validate() {
|
|
352
352
|
return this._validationManager.validate();
|
|
@@ -449,7 +449,7 @@ qx.Class.define("qx.ui.list.List", {
|
|
|
449
449
|
/**
|
|
450
450
|
* Returns the selectable model items.
|
|
451
451
|
*
|
|
452
|
-
* @return {qx.data.Array
|
|
452
|
+
* @return {qx.data.Array|null} The selectable items.
|
|
453
453
|
*/
|
|
454
454
|
_getSelectables() {
|
|
455
455
|
return this.getModel();
|
|
@@ -72,7 +72,7 @@ qx.Class.define("qx.ui.mobile.form.Form", {
|
|
|
72
72
|
* {@link qx.ui.form.validation.Manager#validate} method.
|
|
73
73
|
* @lint ignoreDeprecated(alert)
|
|
74
74
|
*
|
|
75
|
-
* @return {Boolean
|
|
75
|
+
* @return {Boolean|null} The validation result.
|
|
76
76
|
*/
|
|
77
77
|
validate() {
|
|
78
78
|
var validateResult = super.validate();
|
|
@@ -135,7 +135,7 @@ qx.Class.define("qx.ui.mobile.form.Form", {
|
|
|
135
135
|
* Gets the item with the given group and rowIndex.
|
|
136
136
|
* @param groupIndex {Integer} the index of the group to which the row belongs to
|
|
137
137
|
* @param rowIndex {Integer} the index of the row inside the target group
|
|
138
|
-
* @return {qx.ui.form.IForm
|
|
138
|
+
* @return {qx.ui.form.IForm|null} The validation result.
|
|
139
139
|
*/
|
|
140
140
|
_getItemByIndex(groupIndex, rowIndex) {
|
|
141
141
|
var groups = this.getGroups();
|
|
@@ -103,7 +103,7 @@ qx.Bootstrap.define("qx.util.OOUtil", {
|
|
|
103
103
|
*
|
|
104
104
|
* @param clazz {Class} class to look for the interface
|
|
105
105
|
* @param iface {Interface} interface to look for
|
|
106
|
-
* @return {Class
|
|
106
|
+
* @return {Class|null} the class which directly implements the given interface
|
|
107
107
|
*/
|
|
108
108
|
getByInterface(clazz, iface) {
|
|
109
109
|
var list, i, l;
|
|
@@ -28,15 +28,15 @@ qx.Class.define("${namespace}.Application",
|
|
|
28
28
|
members :
|
|
29
29
|
{
|
|
30
30
|
/**
|
|
31
|
-
* This method contains the initial application code and gets called
|
|
31
|
+
* This method contains the initial application code and gets called
|
|
32
32
|
* during startup of the application
|
|
33
|
-
*
|
|
33
|
+
*
|
|
34
34
|
* @lint ignoreDeprecated(alert)
|
|
35
35
|
*/
|
|
36
|
-
main
|
|
36
|
+
main()
|
|
37
37
|
{
|
|
38
38
|
// Call super class
|
|
39
|
-
|
|
39
|
+
super.main();
|
|
40
40
|
|
|
41
41
|
// Enable logging in debug variant
|
|
42
42
|
if (qx.core.Environment.get("qx.debug"))
|
|
@@ -54,10 +54,10 @@ qx.Class.define("${namespace}.Application",
|
|
|
54
54
|
*/
|
|
55
55
|
|
|
56
56
|
// Create a button
|
|
57
|
-
|
|
57
|
+
const button1 = new qx.ui.form.Button("Click me", "${namespace_as_path}/test.png");
|
|
58
58
|
|
|
59
59
|
// Document is the application root
|
|
60
|
-
|
|
60
|
+
const doc = this.getRoot();
|
|
61
61
|
|
|
62
62
|
// Add button to document at fixed coordinates
|
|
63
63
|
doc.add(button1, {left: 100, top: 50});
|
|
@@ -69,4 +69,4 @@ qx.Class.define("${namespace}.Application",
|
|
|
69
69
|
});
|
|
70
70
|
}
|
|
71
71
|
}
|
|
72
|
-
});
|
|
72
|
+
});
|
|
@@ -11,13 +11,13 @@
|
|
|
11
11
|
/**
|
|
12
12
|
* This class demonstrates how to define unit tests for your application.
|
|
13
13
|
*
|
|
14
|
-
* Execute <code>qx test</code> to generate a testrunner application
|
|
14
|
+
* Execute <code>qx test</code> to generate a testrunner application
|
|
15
15
|
* and open it from <tt>test/index.html</tt>
|
|
16
16
|
*
|
|
17
|
-
* The methods that contain the tests are instance methods with a
|
|
18
|
-
* <code>test</code> prefix. You can create an arbitrary number of test
|
|
19
|
-
* classes like this one. They can be organized in a regular class hierarchy,
|
|
20
|
-
* i.e. using deeper namespaces and a corresponding file structure within the
|
|
17
|
+
* The methods that contain the tests are instance methods with a
|
|
18
|
+
* <code>test</code> prefix. You can create an arbitrary number of test
|
|
19
|
+
* classes like this one. They can be organized in a regular class hierarchy,
|
|
20
|
+
* i.e. using deeper namespaces and a corresponding file structure within the
|
|
21
21
|
* <tt>test</tt> folder.
|
|
22
22
|
*/
|
|
23
23
|
qx.Class.define("${namespace}.test.DemoTest",
|
|
@@ -31,11 +31,11 @@ qx.Class.define("${namespace}.test.DemoTest",
|
|
|
31
31
|
TESTS
|
|
32
32
|
---------------------------------------------------------------------------
|
|
33
33
|
*/
|
|
34
|
-
|
|
34
|
+
|
|
35
35
|
/**
|
|
36
36
|
* Here are some simple tests
|
|
37
37
|
*/
|
|
38
|
-
testSimple
|
|
38
|
+
testSimple()
|
|
39
39
|
{
|
|
40
40
|
this.assertEquals(4, 3+1, "This should never fail!");
|
|
41
41
|
this.assertFalse(false, "Can false be true?!");
|
|
@@ -44,10 +44,10 @@ qx.Class.define("${namespace}.test.DemoTest",
|
|
|
44
44
|
/**
|
|
45
45
|
* Here are some more advanced tests
|
|
46
46
|
*/
|
|
47
|
-
testAdvanced
|
|
47
|
+
testAdvanced()
|
|
48
48
|
{
|
|
49
|
-
|
|
50
|
-
|
|
49
|
+
let a = 3;
|
|
50
|
+
let b = a;
|
|
51
51
|
this.assertIdentical(a, b, "A rose by any other name is still a rose");
|
|
52
52
|
this.assertInRange(3, 1, 10, "You must be kidding, 3 can never be outside [1,10]!");
|
|
53
53
|
}
|
|
@@ -25,10 +25,10 @@ qx.Class.define("${namespace}.Application",
|
|
|
25
25
|
* This method contains the initial application code and gets called
|
|
26
26
|
* during startup of the application
|
|
27
27
|
*/
|
|
28
|
-
main
|
|
28
|
+
main()
|
|
29
29
|
{
|
|
30
30
|
// Call super class
|
|
31
|
-
|
|
31
|
+
super.main();
|
|
32
32
|
|
|
33
33
|
// Enable logging in debug variant
|
|
34
34
|
if (qx.core.Environment.get("qx.debug"))
|
|
@@ -47,11 +47,11 @@ qx.Class.define("${namespace}.Application",
|
|
|
47
47
|
-------------------------------------------------------------------------
|
|
48
48
|
*/
|
|
49
49
|
|
|
50
|
-
|
|
51
|
-
|
|
50
|
+
const login = new ${namespace}.page.Login();
|
|
51
|
+
const overview = new ${namespace}.page.Overview();
|
|
52
52
|
|
|
53
53
|
// Add the pages to the page manager.
|
|
54
|
-
|
|
54
|
+
const manager = new qx.ui.mobile.page.Manager(false);
|
|
55
55
|
manager.addDetail([
|
|
56
56
|
login,
|
|
57
57
|
overview
|
|
@@ -69,7 +69,7 @@ qx.Class.define("${namespace}.Application",
|
|
|
69
69
|
* Default behaviour when a route matches. Displays the corresponding page on screen.
|
|
70
70
|
* @param data {Map} the animation properties
|
|
71
71
|
*/
|
|
72
|
-
_show
|
|
72
|
+
_show(data) {
|
|
73
73
|
this.show(data.customData);
|
|
74
74
|
}
|
|
75
75
|
}
|
package/source/resource/qx/tool/cli/templates/skeleton/mobile/source/class/custom/page/Login.tmpl.js
CHANGED
|
@@ -15,9 +15,9 @@ qx.Class.define("${namespace}.page.Login",
|
|
|
15
15
|
{
|
|
16
16
|
extend : qx.ui.mobile.page.NavigationPage,
|
|
17
17
|
|
|
18
|
-
construct
|
|
18
|
+
construct()
|
|
19
19
|
{
|
|
20
|
-
|
|
20
|
+
super();
|
|
21
21
|
this.setTitle("Login");
|
|
22
22
|
},
|
|
23
23
|
|
|
@@ -28,22 +28,22 @@ qx.Class.define("${namespace}.page.Login",
|
|
|
28
28
|
|
|
29
29
|
|
|
30
30
|
// overridden
|
|
31
|
-
_initialize
|
|
32
|
-
|
|
31
|
+
_initialize() {
|
|
32
|
+
super._initialize();
|
|
33
33
|
|
|
34
34
|
// Username
|
|
35
|
-
|
|
35
|
+
const user = new qx.ui.mobile.form.TextField();
|
|
36
36
|
user.setRequired(true);
|
|
37
37
|
|
|
38
38
|
// Password
|
|
39
|
-
|
|
39
|
+
const pwd = new qx.ui.mobile.form.PasswordField();
|
|
40
40
|
pwd.setRequired(true);
|
|
41
41
|
|
|
42
42
|
// Login Button
|
|
43
|
-
|
|
43
|
+
const loginButton = new qx.ui.mobile.form.Button("Login");
|
|
44
44
|
loginButton.addListener("tap", this._onButtonTap, this);
|
|
45
45
|
|
|
46
|
-
|
|
46
|
+
const loginForm = this.__form = new qx.ui.mobile.form.Form();
|
|
47
47
|
loginForm.add(user, "Username");
|
|
48
48
|
loginForm.add(pwd, "Password");
|
|
49
49
|
|
|
@@ -56,7 +56,7 @@ qx.Class.define("${namespace}.page.Login",
|
|
|
56
56
|
/**
|
|
57
57
|
* Event handler for <code>tap</code> on the login button.
|
|
58
58
|
*/
|
|
59
|
-
_onButtonTap
|
|
59
|
+
_onButtonTap() {
|
|
60
60
|
// use form validation
|
|
61
61
|
if (this.__form.validate()) {
|
|
62
62
|
qx.core.Init.getApplication().getRouting().executeGet("/overview");
|
|
@@ -15,9 +15,9 @@ qx.Class.define("${namespace}.page.Overview",
|
|
|
15
15
|
{
|
|
16
16
|
extend : qx.ui.mobile.page.NavigationPage,
|
|
17
17
|
|
|
18
|
-
construct
|
|
18
|
+
construct()
|
|
19
19
|
{
|
|
20
|
-
|
|
20
|
+
super();
|
|
21
21
|
this.setTitle("Overview");
|
|
22
22
|
this.setShowBackButton(true);
|
|
23
23
|
this.setBackButtonText("Back");
|
|
@@ -27,16 +27,16 @@ qx.Class.define("${namespace}.page.Overview",
|
|
|
27
27
|
members :
|
|
28
28
|
{
|
|
29
29
|
// overridden
|
|
30
|
-
_initialize
|
|
30
|
+
_initialize()
|
|
31
31
|
{
|
|
32
|
-
|
|
32
|
+
super._initialize(arguments);
|
|
33
33
|
|
|
34
34
|
this.getContent().add(new qx.ui.mobile.basic.Label("Your first app."));
|
|
35
35
|
},
|
|
36
36
|
|
|
37
37
|
|
|
38
38
|
// overridden
|
|
39
|
-
_back
|
|
39
|
+
_back(triggeredByKeyEvent)
|
|
40
40
|
{
|
|
41
41
|
qx.core.Init.getApplication().getRouting().back();
|
|
42
42
|
}
|
|
@@ -24,15 +24,15 @@ qx.Class.define("${namespace}.demo.Application",
|
|
|
24
24
|
members :
|
|
25
25
|
{
|
|
26
26
|
/**
|
|
27
|
-
* This method contains the initial application code and gets called
|
|
27
|
+
* This method contains the initial application code and gets called
|
|
28
28
|
* during startup of the application
|
|
29
|
-
*
|
|
29
|
+
*
|
|
30
30
|
* @lint ignoreDeprecated(alert)
|
|
31
31
|
*/
|
|
32
|
-
main
|
|
32
|
+
main()
|
|
33
33
|
{
|
|
34
34
|
// Call super class
|
|
35
|
-
|
|
35
|
+
super.main();
|
|
36
36
|
|
|
37
37
|
// Enable logging in debug variant
|
|
38
38
|
if (qx.core.Environment.get("qx.debug"))
|
|
@@ -50,10 +50,10 @@ qx.Class.define("${namespace}.demo.Application",
|
|
|
50
50
|
*/
|
|
51
51
|
|
|
52
52
|
// Create a button
|
|
53
|
-
|
|
53
|
+
const button1 = new ${namespace}.Button("Very special button", "${namespace_as_path}/test.png");
|
|
54
54
|
|
|
55
55
|
// Document is the application root
|
|
56
|
-
|
|
56
|
+
const doc = this.getRoot();
|
|
57
57
|
|
|
58
58
|
// Add button to document at fixed coordinates
|
|
59
59
|
doc.add(button1, {left: 100, top: 50});
|
|
@@ -64,4 +64,4 @@ qx.Class.define("${namespace}.demo.Application",
|
|
|
64
64
|
});
|
|
65
65
|
}
|
|
66
66
|
}
|
|
67
|
-
});
|
|
67
|
+
});
|
|
@@ -11,13 +11,13 @@
|
|
|
11
11
|
/**
|
|
12
12
|
* This class demonstrates how to define unit tests for your application.
|
|
13
13
|
*
|
|
14
|
-
* Execute <code>qx test</code> to generate a testrunner application
|
|
14
|
+
* Execute <code>qx test</code> to generate a testrunner application
|
|
15
15
|
* and open it from <tt>test/index.html</tt>
|
|
16
16
|
*
|
|
17
|
-
* The methods that contain the tests are instance methods with a
|
|
18
|
-
* <code>test</code> prefix. You can create an arbitrary number of test
|
|
19
|
-
* classes like this one. They can be organized in a regular class hierarchy,
|
|
20
|
-
* i.e. using deeper namespaces and a corresponding file structure within the
|
|
17
|
+
* The methods that contain the tests are instance methods with a
|
|
18
|
+
* <code>test</code> prefix. You can create an arbitrary number of test
|
|
19
|
+
* classes like this one. They can be organized in a regular class hierarchy,
|
|
20
|
+
* i.e. using deeper namespaces and a corresponding file structure within the
|
|
21
21
|
* <tt>test</tt> folder.
|
|
22
22
|
*/
|
|
23
23
|
qx.Class.define("${namespace}.test.DemoTest",
|
|
@@ -31,11 +31,11 @@ qx.Class.define("${namespace}.test.DemoTest",
|
|
|
31
31
|
TESTS
|
|
32
32
|
---------------------------------------------------------------------------
|
|
33
33
|
*/
|
|
34
|
-
|
|
34
|
+
|
|
35
35
|
/**
|
|
36
36
|
* Here are some simple tests
|
|
37
37
|
*/
|
|
38
|
-
testSimple
|
|
38
|
+
testSimple()
|
|
39
39
|
{
|
|
40
40
|
this.assertEquals(4, 3+1, "This should never fail!");
|
|
41
41
|
this.assertFalse(false, "Can false be true?!");
|
|
@@ -44,10 +44,10 @@ qx.Class.define("${namespace}.test.DemoTest",
|
|
|
44
44
|
/**
|
|
45
45
|
* Here are some more advanced tests
|
|
46
46
|
*/
|
|
47
|
-
testAdvanced
|
|
47
|
+
testAdvanced()
|
|
48
48
|
{
|
|
49
|
-
|
|
50
|
-
|
|
49
|
+
let a = 3;
|
|
50
|
+
let b = a;
|
|
51
51
|
this.assertIdentical(a, b, "A rose by any other name is still a rose");
|
|
52
52
|
this.assertInRange(3, 1, 10, "You must be kidding, 3 can never be outside [1,10]!");
|
|
53
53
|
}
|
|
@@ -34,7 +34,7 @@ qx.Class.define("${namespace}.Application",
|
|
|
34
34
|
* This method contains the initial application code and gets called
|
|
35
35
|
* during startup of the application
|
|
36
36
|
*/
|
|
37
|
-
main
|
|
37
|
+
main()
|
|
38
38
|
{
|
|
39
39
|
if (qx.core.Environment.get("runtime.name") == "rhino") {
|
|
40
40
|
qx.log.Logger.register(qx.log.appender.RhinoConsole);
|
|
@@ -59,10 +59,10 @@ qx.Class.define("${namespace}.Application",
|
|
|
59
59
|
*
|
|
60
60
|
* @param args {String[]} Rhino arguments object
|
|
61
61
|
*/
|
|
62
|
-
_argumentsToSettings
|
|
62
|
+
_argumentsToSettings(args)
|
|
63
63
|
{
|
|
64
|
-
|
|
65
|
-
for (
|
|
64
|
+
let opts;
|
|
65
|
+
for (let i=0, l=args.length; i<l; i++) {
|
|
66
66
|
if (args[i].indexOf("settings=") == 0) {
|
|
67
67
|
opts = args[i].substr(9);
|
|
68
68
|
break;
|
|
@@ -75,8 +75,8 @@ qx.Class.define("${namespace}.Application",
|
|
|
75
75
|
if (opts) {
|
|
76
76
|
opts = opts.replace(/\\\{/g, "{").replace(/\\\}/g, "}");
|
|
77
77
|
opts = qx.lang.Json.parse(opts);
|
|
78
|
-
for (
|
|
79
|
-
|
|
78
|
+
for (let prop in opts) {
|
|
79
|
+
let value = opts[prop];
|
|
80
80
|
if (typeof value == "string") {
|
|
81
81
|
value = value.replace(/\$$/g, " ");
|
|
82
82
|
}
|
|
@@ -11,13 +11,13 @@
|
|
|
11
11
|
/**
|
|
12
12
|
* This class demonstrates how to define unit tests for your application.
|
|
13
13
|
*
|
|
14
|
-
* Execute <code>qx test</code> to generate a testrunner application
|
|
14
|
+
* Execute <code>qx test</code> to generate a testrunner application
|
|
15
15
|
* and open it from <tt>test/index.html</tt>
|
|
16
16
|
*
|
|
17
|
-
* The methods that contain the tests are instance methods with a
|
|
18
|
-
* <code>test</code> prefix. You can create an arbitrary number of test
|
|
19
|
-
* classes like this one. They can be organized in a regular class hierarchy,
|
|
20
|
-
* i.e. using deeper namespaces and a corresponding file structure within the
|
|
17
|
+
* The methods that contain the tests are instance methods with a
|
|
18
|
+
* <code>test</code> prefix. You can create an arbitrary number of test
|
|
19
|
+
* classes like this one. They can be organized in a regular class hierarchy,
|
|
20
|
+
* i.e. using deeper namespaces and a corresponding file structure within the
|
|
21
21
|
* <tt>test</tt> folder.
|
|
22
22
|
*/
|
|
23
23
|
qx.Class.define("${namespace}.test.DemoTest",
|
|
@@ -33,11 +33,11 @@ qx.Class.define("${namespace}.test.DemoTest",
|
|
|
33
33
|
TESTS
|
|
34
34
|
---------------------------------------------------------------------------
|
|
35
35
|
*/
|
|
36
|
-
|
|
36
|
+
|
|
37
37
|
/**
|
|
38
38
|
* Here are some simple tests
|
|
39
39
|
*/
|
|
40
|
-
testSimple
|
|
40
|
+
testSimple()
|
|
41
41
|
{
|
|
42
42
|
this.assertEquals(4, 3+1, "This should never fail!");
|
|
43
43
|
this.assertFalse(false, "Can false be true?!");
|
|
@@ -46,20 +46,20 @@ qx.Class.define("${namespace}.test.DemoTest",
|
|
|
46
46
|
/**
|
|
47
47
|
* Here are some more advanced tests
|
|
48
48
|
*/
|
|
49
|
-
testAdvanced
|
|
49
|
+
testAdvanced()
|
|
50
50
|
{
|
|
51
|
-
|
|
52
|
-
|
|
51
|
+
let a = 3;
|
|
52
|
+
let b = a;
|
|
53
53
|
this.assertIdentical(a, b, "A rose by any other name is still a rose");
|
|
54
54
|
this.assertInRange(3, 1, 10, "You must be kidding, 3 can never be outside [1,10]!");
|
|
55
55
|
},
|
|
56
56
|
|
|
57
|
-
hasNodeJs
|
|
57
|
+
hasNodeJs()
|
|
58
58
|
{
|
|
59
59
|
return qx.core.Environment.get("runtime.name") == "node.js";
|
|
60
60
|
},
|
|
61
61
|
|
|
62
|
-
testNodeJs
|
|
62
|
+
testNodeJs()
|
|
63
63
|
{
|
|
64
64
|
this.require(["nodeJs"]);
|
|
65
65
|
// test node stuff
|
|
@@ -8,7 +8,7 @@ This is the built in web server for Qooxdoo, serving your application.
|
|
|
8
8
|
|
|
9
9
|
You can find Qooxdoo on the web at http://www.qooxdoo.org and on GitHub at http://github.com/qooxdoo/qooxdoo.
|
|
10
10
|
|
|
11
|
-
If you have questions, please ask them at [
|
|
11
|
+
If you have questions, please ask them at [Stack Overflow](https://stackoverflow.com/questions/tagged/qooxdoo) and make sure you use the "qooxdoo" tag when you post.
|
|
12
12
|
|
|
13
13
|
If you want to discuss anything, please contact us using Gitter in the [qooxdoo/qooxdoo](http://gitter.im/qooxdoo/qooxdoo) group, either [via a web browser](http://gitter.im/qooxdoo/qooxdoo) or via the Gitter app.
|
|
14
14
|
|