views: [
'Decshee.member.view.AddInPanel',
'Decshee.member.view.List',
- 'Decshee.member.view.Edit'
+ 'Decshee.member.view.Edit',
+ 'Decshee.member.view.ViewerComboBox'
],
stores: [
- 'Decshee.member.store.Store'
+ 'Decshee.member.store.Store',
+ 'Decshee.member.store.Viewers'
],
models: [
- 'Decshee.member.model.Model'
+ 'Decshee.member.model.Model',
+ 'Decshee.member.model.Viewer'
],
init: function() {
--- /dev/null
+{
+ success: true,
+ viewers: [
+ {
+ id: 1,
+ caption: 'ビュー1',
+ filter: null,
+ group: null,
+ sort: null
+ },
+ {
+ id: 2,
+ caption: 'ビュー2',
+ filter: null,
+ group: null,
+ sort: null
+ },
+ {
+ id: 3,
+ caption: 'ビュー3',
+ filter: null,
+ group: null,
+ sort: null
+ }
+ ]
+}
--- /dev/null
+Ext.define(
+ 'Decshee.member.model.Viewer',
+ {
+ extend: 'Ext.data.Model',
+
+ fields: [
+ 'caption',
+ 'filter',
+ 'group',
+ 'sort'
+ ]
+ }
+);
\ No newline at end of file
--- /dev/null
+Ext.define(
+ 'Decshee.member.store.Viewers',
+ {
+ extend: 'Ext.data.Store',
+ model: 'Decshee.member.model.Viewer',
+ autoLoad: true,
+
+ proxy: {
+ type: 'ajax',
+ api: {
+ read: 'addins/member/data/viewers.json'
+ },
+
+ reader: {
+ type: 'json',
+ root: 'viewers',
+ successProperty: 'success'
+ }
+ }
+ }
+);
\ No newline at end of file
initComponent: function() {
console.log('[START]Decshee.member.view.List.initComponent');
- this.dockedItems = [
+ this.tbar = [
{
- xtype: 'toolbar',
- items: [
- {
- iconCls: 'icon-add',
- text: '追加',
- scope: this,
- itemId: 'addButton',
- action: 'add'
- },
- {
- iconCls: 'icon-delete',
- text: '削除',
- disabled: true,
- scope: this,
- itemId: 'deleteButton',
- action: 'delete'
- }
- ]
- }
+ iconCls: 'icon-add',
+ text: '追加',
+ scope: this,
+ itemId: 'addButton',
+ action: 'add'
+ },
+ {
+ iconCls: 'icon-delete',
+ text: '削除',
+ disabled: true,
+ scope: this,
+ itemId: 'deleteButton',
+ action: 'delete'
+ },
+ { xtype: 'tbfill' },
+ { xtype: 'memberviewercombobox' }
];
this.columns = [
--- /dev/null
+Ext.define(
+ 'Decshee.member.view.ViewerComboBox',
+ {
+ extend: 'Ext.form.field.ComboBox',
+ alias : 'widget.memberviewercombobox',
+ fieldLabel : 'ビュー選択',
+ displayField: 'caption',
+ width: 200,
+ labelWidth: 60,
+ store : 'Decshee.member.store.Viewers'
+ }
+);