forked from nelstrom/Tabs-and-Toolbars
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add About/Bookmarks cards to MoreCard.
- Loading branch information
Showing
6 changed files
with
54 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,5 +5,4 @@ Ext.define('Sencha.controller.Main', { | |
refs: {}, | ||
control: {} | ||
} | ||
|
||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
Ext.define('Sencha.store.MoreCards', { | ||
extend: 'Ext.data.Store', | ||
|
||
config: { | ||
fields: ['title', 'xtype'], | ||
data: [ | ||
{ title: 'About', xtype: 'aboutcard' }, | ||
{ title: 'Bookmarks', xtype: 'bookmarkscard' } | ||
] | ||
} | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
Ext.define('Sencha.view.About', { | ||
extend: 'Ext.Panel', | ||
xtype: 'aboutcard', | ||
|
||
config: { | ||
title: 'About', | ||
html: 'Made from coffee', | ||
styleHtmlContent: true | ||
} | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
Ext.define('Sencha.view.Bookmarks', { | ||
extend: 'Ext.Panel', | ||
xtype: 'bookmarkscard', | ||
|
||
config: { | ||
title: 'Bookmarks', | ||
html: 'Your bookmarks go here', | ||
styleHtmlContent: true | ||
} | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,27 @@ | ||
Ext.define('Sencha.view.More', { | ||
extend: 'Ext.Panel', | ||
extend: 'Ext.navigation.View', | ||
xtype: 'morecard', | ||
requires: [ | ||
'Ext.dataview.List', | ||
'Sencha.view.About', | ||
'Sencha.view.Bookmarks' | ||
], | ||
|
||
config: { | ||
iconCls: 'more', | ||
title: 'More', | ||
items: [{ | ||
title: 'More', | ||
xtype: 'list', | ||
itemTpl: '{title}', | ||
store: 'MoreCards', | ||
listeners: { | ||
itemtap: function(list, index, item, record) { | ||
this.up('morecard').push({ | ||
xtype: record.data.xtype | ||
}); | ||
} | ||
} | ||
}] | ||
} | ||
}); |