Skip to content

Commit e993612

Browse files
committed
move to v7
1 parent 851d4d3 commit e993612

File tree

20 files changed

+632
-485
lines changed

20 files changed

+632
-485
lines changed

Manifest.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"$schema": "https://qooxdoo.org/schema/Manifest-1-0-0.json",
2+
"$schema": "https://qooxdoo.org/schema/Manifest-2-0-0.json",
33
"info": {
44
"name": "widgetbrowser",
55
"summary": "Widget browser",
@@ -40,7 +40,6 @@
4040
}
4141
},
4242
"requires": {
43-
"@qooxdoo/compiler": "^1.0.0",
44-
"@qooxdoo/framework": "^6.0.0"
43+
"@qooxdoo/framework": "^7.0.0"
4544
}
4645
}

qx-lock.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,19 @@
22
"libraries": [
33
{
44
"library_name": "formdemo",
5-
"library_version": "1.0.2",
6-
"path": "qx_packages/qooxdoo_qxl_formdemo_v1_0_2",
5+
"library_version": "2.0.0",
6+
"path": "qx_packages/qooxdoo_qxl_formdemo_v2_0_0",
77
"uri": "qooxdoo/qxl.formdemo",
88
"repo_name": "qooxdoo/qxl.formdemo",
9-
"repo_tag": "v1.0.2"
9+
"repo_tag": "v2.0.0"
1010
},
1111
{
1212
"library_name": "versionlabel",
13-
"library_version": "1.0.4",
14-
"path": "qx_packages/qooxdoo_qxl_versionlabel_v1_0_4",
13+
"library_version": "2.0.0",
14+
"path": "qx_packages/qooxdoo_qxl_versionlabel_v2_0_0",
1515
"uri": "qooxdoo/qxl.versionlabel",
1616
"repo_name": "qooxdoo/qxl.versionlabel",
17-
"repo_tag": "v1.0.4"
17+
"repo_tag": "v2.0.0"
1818
}
1919
],
2020
"version": "2.1.0"

source/class/qxl/widgetbrowser/Application.js

Lines changed: 16 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -20,25 +20,22 @@
2020
* Main Application.
2121
* @asset(qx/icon/*)
2222
*/
23-
qx.Class.define("qxl.widgetbrowser.Application",
24-
{
25-
extend : qx.application.Standalone,
23+
qx.Class.define("qxl.widgetbrowser.Application", {
24+
extend: qx.application.Standalone,
2625

27-
28-
construct: function() {
29-
this.base(arguments);
26+
construct() {
27+
super();
3028
},
3129

32-
members:
33-
{
30+
members: {
3431
__header: null,
3532

3633
__tabs: null,
3734

3835
__scroll: null,
3936

40-
main: function() {
41-
this.base(arguments);
37+
main() {
38+
super.main();
4239

4340
// Enable logging in debug variant
4441
if (qx.core.Environment.get("qx.debug")) {
@@ -51,29 +48,30 @@ qx.Class.define("qxl.widgetbrowser.Application",
5148
var doc = this.getRoot();
5249
var dockLayout = new qx.ui.layout.Dock();
5350
var dockLayoutComposite = new qx.ui.container.Composite(dockLayout);
54-
doc.add(dockLayoutComposite, {edge:0});
51+
doc.add(dockLayoutComposite, { edge: 0 });
5552

5653
this.__header = new qxl.widgetbrowser.view.Header();
57-
dockLayoutComposite.add(this.__header, {edge: "north"});
54+
dockLayoutComposite.add(this.__header, { edge: "north" });
5855

59-
var scroll = this.__scroll = new qx.ui.container.Scroll();
56+
var scroll = (this.__scroll = new qx.ui.container.Scroll());
6057
dockLayoutComposite.add(scroll);
6158

6259
this.__tabs = this._createTabView();
6360
this.__tabs.set({
6461
minWidth: 700,
65-
padding: 15
62+
padding: 15,
6663
});
64+
6765
scroll.add(this.__tabs);
6866
},
6967

70-
_createTabView: function() {
68+
_createTabView() {
7169
this.__tabs = new qxl.widgetbrowser.view.TabView();
7270
return this.__tabs;
7371
},
7472

75-
getScroll: function() {
73+
getScroll() {
7674
return this.__scroll;
77-
}
78-
}
75+
},
76+
},
7977
});

source/class/qxl/widgetbrowser/MControls.js

Lines changed: 22 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,9 @@
1616
1717
************************************************************************ */
1818

19-
qx.Mixin.define("qxl.widgetbrowser.MControls",
20-
{
21-
22-
members:
23-
{
24-
25-
initControls: function(widgets, options) {
19+
qx.Mixin.define("qxl.widgetbrowser.MControls", {
20+
members: {
21+
initControls(widgets, options) {
2622
options = options || {};
2723

2824
var controls = new qx.ui.container.Composite();
@@ -31,8 +27,8 @@ qx.Mixin.define("qxl.widgetbrowser.MControls",
3127

3228
if (options.disabled) {
3329
var toggleDisabled = new qx.ui.form.ToggleButton("Disabled");
34-
toggleDisabled.addListener("changeValue", function() {
35-
widgets.forEach(function(widget, index) {
30+
toggleDisabled.addListener("changeValue", function () {
31+
widgets.forEach(function (widget, index) {
3632
if (widget.setEnabled) {
3733
widget.setEnabled(!this.getValue());
3834
}
@@ -43,8 +39,8 @@ qx.Mixin.define("qxl.widgetbrowser.MControls",
4339

4440
if (options.hovered) {
4541
var toggleHovered = new qx.ui.form.ToggleButton("Hovered");
46-
toggleHovered.addListener("changeValue", function() {
47-
widgets.forEach(function(widget, index) {
42+
toggleHovered.addListener("changeValue", function () {
43+
widgets.forEach(function (widget, index) {
4844
if (this.getValue()) {
4945
widget.addState("hovered");
5046
} else {
@@ -57,8 +53,8 @@ qx.Mixin.define("qxl.widgetbrowser.MControls",
5753

5854
if (options.selected) {
5955
var toggleSelected = new qx.ui.form.ToggleButton("Selected");
60-
toggleSelected.addListener("changeValue", function() {
61-
widgets.forEach(function(widget, index) {
56+
toggleSelected.addListener("changeValue", function () {
57+
widgets.forEach(function (widget, index) {
6258
if (this.getValue()) {
6359
widget.addState("selected");
6460
} else {
@@ -79,8 +75,8 @@ qx.Mixin.define("qxl.widgetbrowser.MControls",
7975
};
8076

8177
var toggleFocused = new qx.ui.form.ToggleButton("Focused");
82-
toggleFocused.addListener("changeValue", function(e) {
83-
widgets.forEach(function(widget, index) {
78+
toggleFocused.addListener("changeValue", function (e) {
79+
widgets.forEach(function (widget, index) {
8480
if (widget instanceof qx.ui.form.RadioButtonGroup) {
8581
var children = widget.getChildren();
8682
children.forEach(function (child) {
@@ -96,10 +92,12 @@ qx.Mixin.define("qxl.widgetbrowser.MControls",
9692

9793
if (options.invalid) {
9894
let toggleInvalid = new qx.ui.form.ToggleButton("Invalid");
99-
toggleInvalid.addListener("changeValue", function(e) {
100-
widgets.forEach(function(widget, index) {
95+
toggleInvalid.addListener("changeValue", function (e) {
96+
widgets.forEach(function (widget, index) {
10197
if (widget.setInvalidMessage && widget.setValid) {
102-
widget.setInvalidMessage("This is invalid message number " + index + ".");
98+
widget.setInvalidMessage(
99+
"This is invalid message number " + index + "."
100+
);
103101
widget.setValid(!this.getValue());
104102
}
105103
}, this);
@@ -109,8 +107,8 @@ qx.Mixin.define("qxl.widgetbrowser.MControls",
109107

110108
if (options.overflow) {
111109
let toggleInvalid = new qx.ui.form.ToggleButton("Overflow");
112-
toggleInvalid.addListener("changeValue", function(e) {
113-
widgets.forEach(function(widget, index) {
110+
toggleInvalid.addListener("changeValue", function (e) {
111+
widgets.forEach(function (widget, index) {
114112
widget.toggleOverflow(widget, e.getData());
115113
}, this);
116114
});
@@ -119,15 +117,15 @@ qx.Mixin.define("qxl.widgetbrowser.MControls",
119117

120118
if (options.hidesome) {
121119
var tb = new qx.ui.form.ToggleButton("Hide some");
122-
tb.addListener("changeValue", function(e) {
123-
widgets.forEach(function(widget, index) {
120+
tb.addListener("changeValue", function (e) {
121+
widgets.forEach(function (widget, index) {
124122
if (widget.canHide) {
125123
e.getData() ? widget.exclude() : widget.show();
126124
}
127125
}, this);
128126
});
129127
controls.add(tb);
130128
}
131-
}
132-
}
129+
},
130+
},
133131
});

source/class/qxl/widgetbrowser/pages/AbstractPage.js

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,25 +16,23 @@
1616
1717
************************************************************************ */
1818

19-
qx.Class.define("qxl.widgetbrowser.pages.AbstractPage",
20-
{
19+
qx.Class.define("qxl.widgetbrowser.pages.AbstractPage", {
2120
type: "abstract",
2221

2322
extend: qx.ui.container.Composite,
2423

25-
construct : function() {
26-
this.base(arguments);
24+
construct() {
25+
super();
2726
this.setLayout(new qx.ui.layout.Canvas());
2827

2928
this._widgets = new qx.type.Array();
3029
},
3130

32-
members :
33-
{
31+
members: {
3432
_widgets: null,
3533

36-
getWidgets: function() {
34+
getWidgets() {
3735
return this._widgets;
38-
}
39-
}
36+
},
37+
},
4038
});

source/class/qxl/widgetbrowser/pages/Basic.js

Lines changed: 20 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -30,41 +30,46 @@
3030
*
3131
*/
3232

33-
qx.Class.define("qxl.widgetbrowser.pages.Basic",
34-
{
33+
qx.Class.define("qxl.widgetbrowser.pages.Basic", {
3534
extend: qxl.widgetbrowser.pages.AbstractPage,
3635

37-
construct: function() {
38-
this.base(arguments);
36+
construct() {
37+
super();
3938

40-
var hbox = this.__hbox = new qx.ui.container.Composite(new qx.ui.layout.HBox(10));
41-
this.add(hbox, {top: 0});
39+
var hbox = (this.__hbox = new qx.ui.container.Composite(
40+
new qx.ui.layout.HBox(10)
41+
));
42+
this.add(hbox, { top: 0 });
4243

4344
this.initWidgets();
4445
},
4546

46-
members :
47-
{
48-
47+
members: {
4948
__hbox: null,
5049

51-
initWidgets: function() {
50+
initWidgets() {
5251
var widgets = this._widgets;
5352

5453
// Label
55-
var label = new qx.ui.basic.Label("Label").set({alignY: "middle"});
54+
var label = new qx.ui.basic.Label("Label").set({ alignY: "middle" });
5655
widgets.push(label);
5756
this.__hbox.add(label);
5857

5958
// Image
60-
var image = new qx.ui.basic.Atom("Image", "icon/32/status/dialog-information.png");
59+
var image = new qx.ui.basic.Atom(
60+
"Image",
61+
"icon/32/status/dialog-information.png"
62+
);
6163
widgets.push(image);
6264
this.__hbox.add(image);
6365

6466
// Atom
65-
var atom = new qx.ui.basic.Atom("Atom", "icon/32/status/dialog-information.png");
67+
var atom = new qx.ui.basic.Atom(
68+
"Atom",
69+
"icon/32/status/dialog-information.png"
70+
);
6671
widgets.push(atom);
6772
this.__hbox.add(atom);
68-
}
69-
}
73+
},
74+
},
7075
});

source/class/qxl/widgetbrowser/pages/Control.js

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -25,25 +25,23 @@
2525
*
2626
*/
2727

28-
qx.Class.define("qxl.widgetbrowser.pages.Control",
29-
{
28+
qx.Class.define("qxl.widgetbrowser.pages.Control", {
3029
extend: qxl.widgetbrowser.pages.AbstractPage,
3130

32-
construct: function() {
33-
this.base(arguments);
31+
construct() {
32+
super();
3433

3534
this.__vbox = new qx.ui.container.Composite(new qx.ui.layout.VBox(20));
36-
this.add(this.__vbox, {top: 0});
35+
this.add(this.__vbox, { top: 0 });
3736

3837
this.initWidgets();
3938
},
4039

41-
members:
42-
{
40+
members: {
4341
__vbox: null,
4442

45-
initWidgets: function() {
46-
var widgets = this._widgets = new qx.type.Array();
43+
initWidgets() {
44+
var widgets = (this._widgets = new qx.type.Array());
4745
var label;
4846

4947
// ColorSelector
@@ -58,21 +56,23 @@ qx.Class.define("qxl.widgetbrowser.pages.Control",
5856
var colorPopup = new qx.ui.control.ColorPopup();
5957
colorPopup.exclude();
6058

61-
var openColorPopup = new qx.ui.form.Button("Open Color Popup").set({maxWidth: 150});
59+
var openColorPopup = new qx.ui.form.Button("Open Color Popup").set({
60+
maxWidth: 150,
61+
});
6262
widgets.push(openColorPopup);
6363
this.__vbox.add(label);
6464
this.__vbox.add(openColorPopup);
65-
openColorPopup.addListener("execute", function() {
65+
openColorPopup.addListener("execute", function () {
6666
colorPopup.placeToWidget(openColorPopup, true);
6767
colorPopup.show();
6868
});
6969

7070
// DateChooser
71-
var dateChooser = new qx.ui.control.DateChooser().set({maxWidth: 240});
71+
var dateChooser = new qx.ui.control.DateChooser().set({ maxWidth: 240 });
7272
label = new qx.ui.basic.Label("DateChooser");
7373
widgets.push(dateChooser);
7474
this.__vbox.add(label);
7575
this.__vbox.add(dateChooser);
76-
}
77-
}
76+
},
77+
},
7878
});

0 commit comments

Comments
 (0)