neo.mjs 6.8.2 → 6.9.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.
- package/.github/PULL_REQUEST_TEMPLATE.md +1 -1
- package/apps/ServiceWorker.mjs +2 -2
- package/apps/learnneo/app.mjs +6 -0
- package/apps/learnneo/index.html +11 -0
- package/apps/learnneo/model/Content.mjs +44 -0
- package/apps/learnneo/neo-config.json +6 -0
- package/apps/learnneo/store/Content.mjs +24 -0
- package/apps/learnneo/view/Viewport.mjs +34 -0
- package/apps/learnneo/view/ViewportController.mjs +19 -0
- package/apps/learnneo/view/home/ContentTreeList.mjs +41 -0
- package/apps/learnneo/view/home/MainContainer.mjs +51 -0
- package/apps/learnneo/view/home/MainContainerController.mjs +50 -0
- package/apps/route/app.mjs +6 -0
- package/apps/route/index.html +11 -0
- package/apps/route/neo-config.json +6 -0
- package/apps/route/view/ButtonBar.mjs +57 -0
- package/apps/route/view/CenterContainer.mjs +37 -0
- package/apps/route/view/FooterContainer.mjs +47 -0
- package/apps/route/view/HeaderContainer.mjs +47 -0
- package/apps/route/view/MainView.mjs +66 -0
- package/apps/route/view/MainViewController.mjs +210 -0
- package/apps/route/view/MetaContainer.mjs +52 -0
- package/apps/route/view/Viewport.mjs +15 -0
- package/apps/route/view/center/CardAdministration.mjs +36 -0
- package/apps/route/view/center/CardAdministrationDenied.mjs +26 -0
- package/apps/route/view/center/CardContact.mjs +29 -0
- package/apps/route/view/center/CardHome.mjs +26 -0
- package/apps/route/view/center/CardSection1.mjs +26 -0
- package/apps/route/view/center/CardSection2.mjs +27 -0
- package/examples/ConfigurationViewport.mjs +1 -1
- package/examples/ServiceWorker.mjs +2 -2
- package/examples/form/field/select/MainContainer.mjs +7 -2
- package/examples/table/container/MainContainer.mjs +4 -2
- package/examples/table/container/MainModel.mjs +3 -0
- package/examples/table/container/MainStore.mjs +10 -10
- package/examples/todoList/version1/MainComponent.mjs +5 -5
- package/examples/toolbar/paging/view/MainContainer.mjs +31 -3
- package/package.json +1 -1
- package/resources/data/learnneo/content.json +27 -0
- package/resources/data/learnneo/pages/whyneo.md +76 -0
- package/resources/scss/src/apps/route/CenterContainer.scss +29 -0
- package/resources/scss/src/apps/route/HeaderContainer.scss +122 -0
- package/resources/scss/src/apps/route/MainView.scss +3 -0
- package/resources/scss/src/apps/route/MetaContainer.scss +44 -0
- package/resources/scss/src/apps/route/_all.scss +1 -0
- package/resources/scss/src/form/field/Picker.scss +0 -1
- package/src/DefaultConfig.mjs +2 -2
- package/src/Neo.mjs +15 -14
- package/src/button/Base.mjs +2 -2
- package/src/component/Base.mjs +41 -50
- package/src/container/Base.mjs +59 -2
- package/src/controller/Base.mjs +84 -4
- package/src/controller/Component.mjs +22 -7
- package/src/core/Observable.mjs +50 -9
- package/src/dialog/Base.mjs +1 -4
- package/src/form/field/FileUpload.mjs +11 -0
- package/src/form/field/Picker.mjs +0 -17
- package/src/form/field/Range.mjs +8 -0
- package/src/form/field/Text.mjs +29 -0
- package/src/form/field/trigger/Picker.mjs +7 -0
- package/src/main/DomEvents.mjs +9 -3
- package/src/manager/DomEvent.mjs +3 -0
- package/src/menu/List.mjs +1 -1
- package/src/table/View.mjs +78 -53
- package/src/toolbar/Paging.mjs +68 -76
- package/src/tooltip/Base.mjs +111 -11
@@ -0,0 +1,210 @@
|
|
1
|
+
import Component from '../../../src/controller/Component.mjs';
|
2
|
+
|
3
|
+
/**
|
4
|
+
* @class Route.view.MainContainerController
|
5
|
+
* @extends Neo.controller.Component
|
6
|
+
*/
|
7
|
+
class MainContainerController extends Component {
|
8
|
+
static config = {
|
9
|
+
/**
|
10
|
+
* @member {String} className='Route.view.MainContainerController'
|
11
|
+
* @protected
|
12
|
+
*/
|
13
|
+
className: 'Route.view.MainContainerController',
|
14
|
+
|
15
|
+
|
16
|
+
routes: {
|
17
|
+
'/home': 'handleHomeRoute',
|
18
|
+
'/section1': 'handleSection1Route',
|
19
|
+
'/section2': 'handleSection2Route',
|
20
|
+
'/contact': 'handleContactRoute',
|
21
|
+
'/users/{userId}': { handler: 'handleUserRoute', preHandler: 'doPrehandling' },
|
22
|
+
// '/users/{userId}' : {handler: 'handleUserRoute', preHandler: 'doPrehandling'}, //example
|
23
|
+
// '/users/{userId}/posts/{postId}' : {handler:'handleUserPostsRoute', preHandler: 'doPrehandlingFalse'}, //example
|
24
|
+
// default: 'doDefaultHandling' //optional - example
|
25
|
+
},
|
26
|
+
|
27
|
+
//Demo data
|
28
|
+
data: {
|
29
|
+
users: [{ id: 1, name: 'Joe Doe' }, { id: 2, name: 'Max Mustermann' }],
|
30
|
+
activeUser: 0
|
31
|
+
}
|
32
|
+
}
|
33
|
+
|
34
|
+
onConstructed() {
|
35
|
+
super.onConstructed();
|
36
|
+
}
|
37
|
+
|
38
|
+
/**
|
39
|
+
* Card sort order
|
40
|
+
* 0 - Contact
|
41
|
+
* 1 - Administration
|
42
|
+
* 2 - Section 1
|
43
|
+
* 3 - Section 2
|
44
|
+
* 4 - Home
|
45
|
+
*/
|
46
|
+
|
47
|
+
|
48
|
+
doPrehandling(value, oldValue, params = null) {
|
49
|
+
const userId = parseInt(params);
|
50
|
+
if (userId > 0 && userId === this.data.activeUser) {
|
51
|
+
return true;
|
52
|
+
}
|
53
|
+
|
54
|
+
const centerContainer = this.getReference('center-container');
|
55
|
+
centerContainer.layout.activeIndex = 5;
|
56
|
+
|
57
|
+
return false;
|
58
|
+
|
59
|
+
}
|
60
|
+
|
61
|
+
/**
|
62
|
+
* @param {Object} data
|
63
|
+
*/
|
64
|
+
onSwitchButtonCardContact(data) {
|
65
|
+
Neo.Main.redirectTo({ url: '#/contact' });
|
66
|
+
this.#removeFromButtonSelection();
|
67
|
+
this.#addButtonSelection(data);
|
68
|
+
}
|
69
|
+
|
70
|
+
/**
|
71
|
+
* @param {Object} data
|
72
|
+
*/
|
73
|
+
onSwitchButtonAdministration(data) {
|
74
|
+
|
75
|
+
Neo.Main.redirectTo({ url: `#/users/${this.data.activeUser}` });
|
76
|
+
this.#removeFromButtonSelection();
|
77
|
+
this.#addButtonSelection(data);
|
78
|
+
|
79
|
+
}
|
80
|
+
|
81
|
+
/**
|
82
|
+
* @param {Object} data
|
83
|
+
*/
|
84
|
+
onSwitchButtonCardSection1(data) {
|
85
|
+
Neo.Main.redirectTo({ url: '#/section1' });
|
86
|
+
this.#removeFromButtonSelection();
|
87
|
+
this.#addButtonSelection(data);
|
88
|
+
|
89
|
+
}
|
90
|
+
|
91
|
+
/**
|
92
|
+
* @param {Object} data
|
93
|
+
*/
|
94
|
+
onSwitchButtonCardSection2(data) {
|
95
|
+
Neo.Main.redirectTo({ url: '#/section2' });
|
96
|
+
this.#removeFromButtonSelection();
|
97
|
+
this.#addButtonSelection(data);
|
98
|
+
}
|
99
|
+
|
100
|
+
/**
|
101
|
+
* @param {Object} data
|
102
|
+
*/
|
103
|
+
onSwitchButtonCardHome(data) {
|
104
|
+
Neo.Main.redirectTo({ url: '#/home' });
|
105
|
+
this.#removeFromButtonSelection();
|
106
|
+
this.#addButtonSelection(data);
|
107
|
+
}
|
108
|
+
|
109
|
+
/**
|
110
|
+
* @param {Object} data
|
111
|
+
*/
|
112
|
+
onSwitchButtonMetaUser1(data) {
|
113
|
+
const currentUser = this.data.activeUser;
|
114
|
+
this.data.activeUser = 1;
|
115
|
+
this.#removeMetaButtonSelection();
|
116
|
+
this.#setUsername();
|
117
|
+
data.component?.addCls('route_meta_button_grant_selected');
|
118
|
+
}
|
119
|
+
|
120
|
+
/**
|
121
|
+
* @param {Object} data
|
122
|
+
*/
|
123
|
+
onSwitchButtonMetaUser2(data) {
|
124
|
+
const currentUser = this.data.activeUser;
|
125
|
+
this.data.activeUser = 2;
|
126
|
+
this.#removeMetaButtonSelection();
|
127
|
+
this.#setUsername();
|
128
|
+
data.component?.addCls('route_meta_button_grant_selected');
|
129
|
+
}
|
130
|
+
|
131
|
+
/**
|
132
|
+
* @param {Object} data
|
133
|
+
*/
|
134
|
+
onSwitchButtonMetaReset(data) {
|
135
|
+
const currentUser = this.data.activeUser;
|
136
|
+
this.data.activeUser = 0;
|
137
|
+
this.#setUsername();
|
138
|
+
this.#removeMetaButtonSelection();
|
139
|
+
}
|
140
|
+
|
141
|
+
handleHomeRoute(value, oldValue, params = null) {
|
142
|
+
const centerContainer = this.getReference('center-container');
|
143
|
+
centerContainer.layout.activeIndex = 4;
|
144
|
+
}
|
145
|
+
|
146
|
+
handleSection1Route(value, oldValue, params = null) {
|
147
|
+
const centerContainer = this.getReference('center-container');
|
148
|
+
centerContainer.layout.activeIndex = 2;
|
149
|
+
}
|
150
|
+
|
151
|
+
handleSection2Route(value, oldValue, params = null) {
|
152
|
+
const centerContainer = this.getReference('center-container');
|
153
|
+
centerContainer.layout.activeIndex = 3;
|
154
|
+
}
|
155
|
+
|
156
|
+
handleContactRoute(value, oldValue, params = null) {
|
157
|
+
const centerContainer = this.getReference('center-container');
|
158
|
+
centerContainer.layout.activeIndex = 0;
|
159
|
+
}
|
160
|
+
|
161
|
+
handleUserRoute(value, oldValue, params = null) {
|
162
|
+
const centerContainer = this.getReference('center-container');
|
163
|
+
centerContainer.layout.activeIndex = 1
|
164
|
+
}
|
165
|
+
|
166
|
+
#removeFromButtonSelection() {
|
167
|
+
const buttonbar = this.getReference('buttonbar');
|
168
|
+
buttonbar.items.forEach(element => {
|
169
|
+
element.removeCls('route_button_selected');
|
170
|
+
});
|
171
|
+
|
172
|
+
const footer = this.getReference('footer-container');
|
173
|
+
footer.items.forEach(element => {
|
174
|
+
element.removeCls('route_button_selected');
|
175
|
+
});
|
176
|
+
|
177
|
+
}
|
178
|
+
|
179
|
+
#addButtonSelection(data) {
|
180
|
+
data.component?.addCls('route_button_selected');
|
181
|
+
}
|
182
|
+
|
183
|
+
#removeMetaButtonSelection(user) {
|
184
|
+
const buttonbar = this.getReference('metabar');
|
185
|
+
buttonbar.items.forEach(element => {
|
186
|
+
element.removeCls('route_meta_button_grant_selected');
|
187
|
+
});
|
188
|
+
this.#removeFromButtonSelection();
|
189
|
+
const data = {
|
190
|
+
component: this.getReference('home_button')
|
191
|
+
}
|
192
|
+
this.#addButtonSelection(data);
|
193
|
+
Neo.Main.redirectTo({ url: '#/home' });
|
194
|
+
|
195
|
+
}
|
196
|
+
|
197
|
+
#setUsername() {
|
198
|
+
const user = this.data.users.find(item => { return item.id === this.data.activeUser });
|
199
|
+
|
200
|
+
const centerContainer = this.getReference('center-container');
|
201
|
+
const adminPage = centerContainer.items[1];
|
202
|
+
adminPage.username = user ? user.name : '';
|
203
|
+
|
204
|
+
}
|
205
|
+
|
206
|
+
}
|
207
|
+
|
208
|
+
Neo.applyClassConfig(MainContainerController);
|
209
|
+
|
210
|
+
export default MainContainerController;
|
@@ -0,0 +1,52 @@
|
|
1
|
+
import Container from '../../../src/container/Base.mjs';
|
2
|
+
import Button from '../../../src/button/Base.mjs';
|
3
|
+
|
4
|
+
/**
|
5
|
+
* @class Route.view.MetaContainer
|
6
|
+
* @extends Neo.container.Base
|
7
|
+
*/
|
8
|
+
class MetaContainer extends Container {
|
9
|
+
static config = {
|
10
|
+
/**
|
11
|
+
* @member {String} className='Route.view.MetaContainer'
|
12
|
+
* @protected
|
13
|
+
*/
|
14
|
+
className: 'Route.view.MetaContainer',
|
15
|
+
|
16
|
+
baseCls: ['route_meta', 'route_meta_color','route_meta_center', 'neo-container'],
|
17
|
+
|
18
|
+
height: 55,
|
19
|
+
/**
|
20
|
+
* @member {Object[]} items
|
21
|
+
*/
|
22
|
+
items: [
|
23
|
+
{
|
24
|
+
module: Button,
|
25
|
+
flex: 'none',
|
26
|
+
handler: 'onSwitchButtonMetaUser1',
|
27
|
+
cls: ['route_meta_button_grant', 'neo-button'],
|
28
|
+
text: 'User 1'
|
29
|
+
},
|
30
|
+
{
|
31
|
+
module: Button,
|
32
|
+
flex: 'none',
|
33
|
+
handler: 'onSwitchButtonMetaUser2',
|
34
|
+
cls: ['route_meta_button_grant', 'neo-button'],
|
35
|
+
text: 'User 2'
|
36
|
+
},
|
37
|
+
{
|
38
|
+
module: Button,
|
39
|
+
flex: 'none',
|
40
|
+
handler: 'onSwitchButtonMetaReset',
|
41
|
+
cls: ['route_meta_button_remove', 'neo-button'],
|
42
|
+
text: 'Reset User'
|
43
|
+
}
|
44
|
+
],
|
45
|
+
layout: { ntype: 'hbox', align: 'stretch' },
|
46
|
+
|
47
|
+
}
|
48
|
+
}
|
49
|
+
|
50
|
+
Neo.applyClassConfig(MetaContainer);
|
51
|
+
|
52
|
+
export default MetaContainer;
|
@@ -0,0 +1,15 @@
|
|
1
|
+
|
2
|
+
import Base from '../../../src/container/Viewport.mjs';
|
3
|
+
import MainView from './MainView.mjs';
|
4
|
+
|
5
|
+
class Viewport extends Base {
|
6
|
+
static config = {
|
7
|
+
className: 'Route.view.Viewport',
|
8
|
+
autoMount: true,
|
9
|
+
layout: { ntype: 'fit' },
|
10
|
+
items: [{ module: MainView }]
|
11
|
+
}
|
12
|
+
|
13
|
+
}
|
14
|
+
Neo.applyClassConfig(Viewport);
|
15
|
+
export default Viewport;
|
@@ -0,0 +1,36 @@
|
|
1
|
+
import Container from '../../../../src/container/Base.mjs';
|
2
|
+
import Label from '../../../../src/component/Label.mjs';
|
3
|
+
|
4
|
+
/**
|
5
|
+
* @class Route.view.center.CardAdministration
|
6
|
+
* @extends Neo.container.Base
|
7
|
+
*/
|
8
|
+
class CardAdministration extends Container {
|
9
|
+
static config = {
|
10
|
+
/**
|
11
|
+
* @member {String} className='Route.view.center.CardAdministration'
|
12
|
+
* @protected
|
13
|
+
*/
|
14
|
+
className: 'Route.view.center.CardAdministration',
|
15
|
+
baseCls: ['route_card_simple_page', 'neo-container'],
|
16
|
+
|
17
|
+
username_: '',
|
18
|
+
/**
|
19
|
+
* @member {Object[]} items
|
20
|
+
*/
|
21
|
+
|
22
|
+
vdom: {
|
23
|
+
tag: 'h1',
|
24
|
+
innerHTML: 'Access Granted.'
|
25
|
+
}
|
26
|
+
}
|
27
|
+
|
28
|
+
|
29
|
+
afterSetUsername(value, oldValue){
|
30
|
+
this.vdom.innerHTML = `Access Granted to ${this.username}.`;
|
31
|
+
}
|
32
|
+
}
|
33
|
+
|
34
|
+
Neo.applyClassConfig(CardAdministration);
|
35
|
+
|
36
|
+
export default CardAdministration;
|
@@ -0,0 +1,26 @@
|
|
1
|
+
import Container from '../../../../src/container/Base.mjs';
|
2
|
+
import Label from '../../../../src/component/Label.mjs';
|
3
|
+
|
4
|
+
/**
|
5
|
+
* @class Route.view.center.CardAdministrationDenied
|
6
|
+
* @extends Neo.container.Base
|
7
|
+
*/
|
8
|
+
class CardAdministrationDenied extends Container {
|
9
|
+
static config = {
|
10
|
+
/**
|
11
|
+
* @member {String} className='Route.view.center.CardAdministrationDenied'
|
12
|
+
* @protected
|
13
|
+
*/
|
14
|
+
className: 'Route.view.center.CardAdministrationDenied',
|
15
|
+
baseCls: ['route_card_simple_page','neo-container'],
|
16
|
+
|
17
|
+
vdom: {
|
18
|
+
tag: 'h1',
|
19
|
+
innerHTML: 'Access Denied.'
|
20
|
+
}
|
21
|
+
}
|
22
|
+
}
|
23
|
+
|
24
|
+
Neo.applyClassConfig(CardAdministrationDenied);
|
25
|
+
|
26
|
+
export default CardAdministrationDenied;
|
@@ -0,0 +1,29 @@
|
|
1
|
+
import Container from '../../../../src/container/Base.mjs';
|
2
|
+
import Label from '../../../../src/component/Label.mjs';
|
3
|
+
|
4
|
+
/**
|
5
|
+
* @class Route.view.center.CardContact
|
6
|
+
* @extends Neo.container.Base
|
7
|
+
*/
|
8
|
+
class CardContact extends Container {
|
9
|
+
static config = {
|
10
|
+
/**
|
11
|
+
* @member {String} className='Route.view.center.CardContact'
|
12
|
+
* @protected
|
13
|
+
*/
|
14
|
+
className: 'Route.view.center.CardContact',
|
15
|
+
baseCls: ['route_card_simple_page', 'neo-container'],
|
16
|
+
|
17
|
+
items: [
|
18
|
+
{ cls : ['route_card_simple_page'], vdom: { cn: [
|
19
|
+
{tag: 'h1',innerHTML: 'Contact' },
|
20
|
+
{tag: 'a', href: 'https://github.com/neomjs/neo', target: '_blank', innerHTML: 'please visit https://github.com/neomjs/neo'}
|
21
|
+
] } }
|
22
|
+
]
|
23
|
+
}
|
24
|
+
|
25
|
+
}
|
26
|
+
|
27
|
+
Neo.applyClassConfig(CardContact);
|
28
|
+
|
29
|
+
export default CardContact;
|
@@ -0,0 +1,26 @@
|
|
1
|
+
import Container from '../../../../src/container/Base.mjs';
|
2
|
+
import Label from '../../../../src/component/Label.mjs';
|
3
|
+
|
4
|
+
/**
|
5
|
+
* @class Route.view.center.CardHome
|
6
|
+
* @extends Neo.container.Base
|
7
|
+
*/
|
8
|
+
class CardHome extends Container {
|
9
|
+
static config = {
|
10
|
+
/**
|
11
|
+
* @member {String} className='Route.view.center.CardHome'
|
12
|
+
* @protected
|
13
|
+
*/
|
14
|
+
className: 'Route.view.center.CardHome',
|
15
|
+
baseCls: ['route_card_simple_page','neo-container'],
|
16
|
+
|
17
|
+
vdom: {
|
18
|
+
tag: 'h1',
|
19
|
+
innerHTML: 'This is the landing page of the example.'
|
20
|
+
}
|
21
|
+
}
|
22
|
+
}
|
23
|
+
|
24
|
+
Neo.applyClassConfig(CardHome);
|
25
|
+
|
26
|
+
export default CardHome;
|
@@ -0,0 +1,26 @@
|
|
1
|
+
import Container from '../../../../src/container/Base.mjs';
|
2
|
+
import Label from '../../../../src/component/Label.mjs';
|
3
|
+
|
4
|
+
/**
|
5
|
+
* @class Route.view.center.CardSection1
|
6
|
+
* @extends Neo.container.Base
|
7
|
+
*/
|
8
|
+
class CardSection1 extends Container {
|
9
|
+
static config = {
|
10
|
+
/**
|
11
|
+
* @member {String} className='Route.view.center.CardSection1'
|
12
|
+
* @protected
|
13
|
+
*/
|
14
|
+
className: 'Route.view.center.CardSection1',
|
15
|
+
baseCls: ['route_card_simple_page','neo-container'],
|
16
|
+
|
17
|
+
vdom: {
|
18
|
+
tag: 'h1',
|
19
|
+
innerHTML: 'This is section 1 of the example.'
|
20
|
+
}
|
21
|
+
}
|
22
|
+
}
|
23
|
+
|
24
|
+
Neo.applyClassConfig(CardSection1);
|
25
|
+
|
26
|
+
export default CardSection1;
|
@@ -0,0 +1,27 @@
|
|
1
|
+
import Container from '../../../../src/container/Base.mjs';
|
2
|
+
import Label from '../../../../src/component/Label.mjs';
|
3
|
+
|
4
|
+
/**
|
5
|
+
* @class Route.view.center.CardSection2
|
6
|
+
* @extends Neo.container.Base
|
7
|
+
*/
|
8
|
+
class CardSection2 extends Container {
|
9
|
+
static config = {
|
10
|
+
/**
|
11
|
+
* @member {String} className='Route.view.center.CardSection2'
|
12
|
+
* @protected
|
13
|
+
*/
|
14
|
+
className: 'Route.view.center.CardSection2',
|
15
|
+
baseCls: ['route_card_simple_page','neo-container'],
|
16
|
+
|
17
|
+
vdom: {
|
18
|
+
tag: 'h1',
|
19
|
+
innerHTML: 'This is section 2 of the example.'
|
20
|
+
}
|
21
|
+
|
22
|
+
}
|
23
|
+
}
|
24
|
+
|
25
|
+
Neo.applyClassConfig(CardSection2);
|
26
|
+
|
27
|
+
export default CardSection2;
|
@@ -107,7 +107,7 @@ class ConfigurationViewport extends Viewport {
|
|
107
107
|
|
108
108
|
items: [{
|
109
109
|
module: Container,
|
110
|
-
layout: {ntype: 'vbox'},
|
110
|
+
layout: {ntype: 'vbox', align: null},
|
111
111
|
style : {overflowY: 'auto', padding: '10px'},
|
112
112
|
cls : ['neo-configuration-panel-body'],
|
113
113
|
itemDefaults: {
|
@@ -15,8 +15,7 @@ class MainContainer extends ConfigurationViewport {
|
|
15
15
|
className : 'Neo.examples.form.field.select.MainContainer',
|
16
16
|
autoMount : true,
|
17
17
|
configItemLabelWidth : 160,
|
18
|
-
exampleContainerConfig: {style: {position: 'relative'}}
|
19
|
-
layout : {ntype: 'hbox', align: 'stretch'}
|
18
|
+
exampleContainerConfig: {style: {position: 'relative'}}
|
20
19
|
}
|
21
20
|
|
22
21
|
createConfigurationComponents() {
|
@@ -111,6 +110,12 @@ class MainContainer extends ConfigurationViewport {
|
|
111
110
|
labelText: 'placeholderText',
|
112
111
|
listeners: {change: me.onConfigChange.bind(me, 'placeholderText')},
|
113
112
|
value : me.exampleComponent.placeholderText
|
113
|
+
}, {
|
114
|
+
module : CheckBox,
|
115
|
+
checked : me.exampleComponent.readOnly,
|
116
|
+
labelText: 'readOnly',
|
117
|
+
listeners: {change: me.onConfigChange.bind(me, 'readOnly')},
|
118
|
+
style : {marginTop: '10px'}
|
114
119
|
}, {
|
115
120
|
module : CheckBox,
|
116
121
|
checked : me.exampleComponent.typeAhead,
|
@@ -122,7 +122,8 @@ class MainContainer extends ConfigurationViewport {
|
|
122
122
|
{dataField: 'githubId', text: 'Github Id'},
|
123
123
|
{dataField: 'country', text: 'Country'},
|
124
124
|
{
|
125
|
-
|
125
|
+
dataField: 'edit',
|
126
|
+
text : 'Edit Action',
|
126
127
|
renderer: ({ column, index }) => {
|
127
128
|
const
|
128
129
|
widgetId = `${column.id}-widget-${index}`,
|
@@ -138,7 +139,8 @@ class MainContainer extends ConfigurationViewport {
|
|
138
139
|
}
|
139
140
|
},
|
140
141
|
{
|
141
|
-
|
142
|
+
dataField: 'menu',
|
143
|
+
text : 'Menu',
|
142
144
|
renderer({ column, record, index }) {
|
143
145
|
const
|
144
146
|
widgetId = `${column.id}-widget-${index}`,
|
@@ -16,36 +16,36 @@ class MainStore extends Store {
|
|
16
16
|
firstname: 'Tobias',
|
17
17
|
githubId : 'tobiu',
|
18
18
|
lastname : 'Uhlig'
|
19
|
-
},
|
20
|
-
{
|
19
|
+
}, {
|
21
20
|
country : 'USA',
|
22
21
|
firstname: 'Rich',
|
23
22
|
githubId : 'rwaters',
|
24
23
|
lastname : 'Waters'
|
25
|
-
},
|
26
|
-
{
|
24
|
+
}, {
|
27
25
|
country : 'Germany',
|
28
26
|
firstname: 'Nils',
|
29
27
|
githubId : 'mrsunshine',
|
30
28
|
lastname : 'Dehl'
|
31
|
-
},
|
32
|
-
{
|
29
|
+
}, {
|
33
30
|
country : 'USA',
|
34
31
|
firstname: 'Gerard',
|
35
32
|
githubId : 'camtnbikerrwc',
|
36
33
|
lastname : 'Horan'
|
37
|
-
},
|
38
|
-
{
|
34
|
+
}, {
|
39
35
|
country : 'Slovakia',
|
40
36
|
firstname: 'Jozef',
|
41
37
|
githubId : 'jsakalos',
|
42
38
|
lastname : 'Sakalos'
|
43
|
-
},
|
44
|
-
{
|
39
|
+
}, {
|
45
40
|
country : 'Germany',
|
46
41
|
firstname: 'Bastian',
|
47
42
|
githubId : 'bhaustein',
|
48
43
|
lastname : 'Haustein'
|
44
|
+
}, {
|
45
|
+
colspan : {firstname: 3},
|
46
|
+
country : 'Germany',
|
47
|
+
firstname: 'Colspan 3',
|
48
|
+
githubId : 'random'
|
49
49
|
}]
|
50
50
|
}
|
51
51
|
}
|
@@ -17,9 +17,9 @@ class MainComponent extends Component {
|
|
17
17
|
width : 300,
|
18
18
|
|
19
19
|
/**
|
20
|
-
* @member {Object[]}
|
20
|
+
* @member {Object[]} items
|
21
21
|
*/
|
22
|
-
|
22
|
+
items: [
|
23
23
|
{id: 1, done: true, text: 'Todo Item 1'},
|
24
24
|
{id: 2, done: false, text: 'Todo Item 2'},
|
25
25
|
{id: 3, done: false, text: 'Todo Item 3'}
|
@@ -51,14 +51,14 @@ class MainComponent extends Component {
|
|
51
51
|
{input: me.onInputFieldChange, delegate: 'todo-input'}
|
52
52
|
]);
|
53
53
|
|
54
|
-
me.createItems(me.
|
54
|
+
me.createItems(me.items || []);
|
55
55
|
}
|
56
56
|
|
57
|
-
createItems(
|
57
|
+
createItems(items) {
|
58
58
|
let me = this,
|
59
59
|
cls;
|
60
60
|
|
61
|
-
|
61
|
+
items.forEach(item => {
|
62
62
|
cls = ['todo-item'];
|
63
63
|
|
64
64
|
if (item.done) {
|
@@ -28,12 +28,14 @@ class MainContainer extends Viewport {
|
|
28
28
|
items: ['->', {
|
29
29
|
handler: 'onAddUserButtonClick',
|
30
30
|
iconCls: 'fa fa-circle-plus',
|
31
|
-
text : 'Add User'
|
31
|
+
text : 'Add User',
|
32
|
+
tooltip: 'Open a dialog and edit a new user'
|
32
33
|
}, {
|
33
34
|
handler: 'onShowFiltersButtonClick',
|
34
35
|
iconCls: 'fa fa-filter',
|
35
36
|
style : {marginLeft: '2px'},
|
36
|
-
text : 'Show Filters'
|
37
|
+
text : 'Show Filters',
|
38
|
+
tooltip: 'Show filters for the user'
|
37
39
|
}]
|
38
40
|
}, {
|
39
41
|
module : UserTableContainer,
|
@@ -44,7 +46,33 @@ class MainContainer extends Viewport {
|
|
44
46
|
}, {
|
45
47
|
module: PagingToolbar,
|
46
48
|
bind : {store: 'stores.users'},
|
47
|
-
flex : 'none'
|
49
|
+
flex : 'none',
|
50
|
+
|
51
|
+
// We want to apply custom configs to the provided item references
|
52
|
+
items: {
|
53
|
+
'nav-button-first': {
|
54
|
+
tooltip: 'Go to first page'
|
55
|
+
},
|
56
|
+
'nav-button-prev' : {
|
57
|
+
tooltip: 'Go to previous page'
|
58
|
+
},
|
59
|
+
'nav-button-next' : {
|
60
|
+
tooltip: 'Go to next page'
|
61
|
+
},
|
62
|
+
'nav-button-last' : {
|
63
|
+
tooltip: 'Go to last page'
|
64
|
+
},
|
65
|
+
|
66
|
+
// These two have been moved to the start of the Toolbar by their weights
|
67
|
+
label: {
|
68
|
+
style : {marginLeft: 0},
|
69
|
+
weight: -10000
|
70
|
+
},
|
71
|
+
rowsPerPage: {
|
72
|
+
tooltip: 'Set the number of rows to display in a page',
|
73
|
+
weight : -999
|
74
|
+
}
|
75
|
+
}
|
48
76
|
}],
|
49
77
|
/**
|
50
78
|
* @member {Object} layout={ntype:'vbox',align:'stretch'}
|