Skip to content

Commit 0463d7a

Browse files
committed
app read button
1 parent b59c76a commit 0463d7a

File tree

5 files changed

+24
-5
lines changed

5 files changed

+24
-5
lines changed

public/app/controller/MN/MNM001.js

+4-1
Original file line numberDiff line numberDiff line change
@@ -36,14 +36,17 @@ Ext.define('Frontend.controller.MN.MNM001', {
3636
'mnm001panel commonbuttonupdate': {
3737
click: this.doUpdate
3838
},
39+
'mnm001panel commonbuttonread': {
40+
click: this.doRead
41+
},
3942
'mnm001combobox': {
4043
select:this.comboboxSelect
4144
},
4245
'mnm001panel': {
4346
selectionchange: this.onGridSelection,
4447
render: this.onPanelRendered
4548
}
46-
})
49+
})
4750
//store 可以不用使用refs 就取得實體並且可進行資料操作
4851
this.store=this.getStore("MN.MNM001.Store");
4952
this.model=this.getModel("MN.MNM001.MenuGroup");

public/app/controller/US/USM002.js

+3
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@ Ext.define('Frontend.controller.US.USM002', {
3030
'usm002panel commonbuttonupdate': {
3131
click: this.doUpdate
3232
},
33+
'usm002panel commonbuttonread': {
34+
click: this.doRead
35+
},
3336
'usm002panel': {
3437
selectionchange: this.onGridSelection,
3538
render: this.onPanelRendered

public/app/controller/common/Standard.js

+4
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@ Ext.define('Frontend.controller.common.Standard', {
1515
}
1616
});
1717
},
18+
doRead: function() {
19+
console.log("doRead")
20+
this.store.load();
21+
},
1822
doCreate: function() {
1923
this.store.insert(0, this.model);
2024
},

public/app/view/common/button/Read.js

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
Ext.define('Frontend.view.common.button.Read' ,{
2+
extend: 'Ext.button.Button',
3+
alias : 'widget.commonbuttonread',
4+
text: 'Read'
5+
});
+8-4
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,22 @@
11
Ext.define('Frontend.view.common.toolbar.Standard' ,{
22
extend: 'Ext.toolbar.Toolbar',
33
alias : 'widget.commontoolbarstandard',
4-
requires: [
4+
requires: [
55
'Frontend.view.common.button.Create',
66
'Frontend.view.common.button.Delete',
7-
'Frontend.view.common.button.Update'
7+
'Frontend.view.common.button.Update',
8+
'Frontend.view.common.button.Read'
89
],
910
items:[{
10-
xtype:'commonbuttoncreate'
11+
xtype:'commonbuttoncreate'
1112
},
1213
{
13-
xtype:'commonbuttondelete'
14+
xtype:'commonbuttondelete'
1415
},
1516
{
1617
xtype:'commonbuttonupdate'
18+
},
19+
{
20+
xtype:'commonbuttonread'
1721
}]
1822
});

0 commit comments

Comments
 (0)