Commit a00f8ee0 authored by Frank Bergmann's avatar Frank Bergmann

- Sencha Touch TS:

  Renamed stores
parent 2b41f33b
Ext.application({
name: 'PO',
models: ['Note'],
stores: ['Notes', 'Users', 'Contacts'],
models: ['Note','User'],
stores: ['NoteStore', 'UserStore', 'ContactStore'],
views: ['UserList', 'UserDetail', 'BlogList', 'UserNavigationView'],
controllers: ['UserNavigationController'],
......
......@@ -12,11 +12,12 @@ Ext.define('PO.controller.UserNavigationController', {
}
},
showDetail: function() {
showDetail: function(list, record) {
console.log('disclose details');
var view = this.getUserNavigationView();
view.push({
xtype: 'userDetail'
xtype: 'userDetail',
data: record.data
});
}
......
Ext.define('PO.store.Contacts', {
Ext.define('PO.store.ContactStore', {
extend: 'Ext.data.Store',
config: {
fields: ['first_names', 'last_name'],
......
Ext.define('PO.store.Notes', {
Ext.define('PO.store.NoteStore', {
extend: 'Ext.data.Store',
requires: 'Ext.DateExtras',
config: {
......
Ext.define('PO.store.Users', {
Ext.define('PO.store.UserStore', {
extend: 'Ext.data.Store',
requires: ['PO.model.User'],
config: {
fields: ['first_names', 'last_name'],
model: 'PO.model.User',
autoLoad: true,
sorters: 'last_name',
......
......@@ -6,7 +6,7 @@ Ext.define('PO.view.UserDetail', {
styleHtmlContent: true,
scrollable: 'vertical',
title: 'User Details',
html: 'Hello World'
tpl: 'Hello, {first_names}'
}
});
Ext.define('PO.view.UserList', {
extend: 'Ext.List',
xtype: 'userList',
requires: ['PO.store.Users'],
requires: ['PO.store.UserStore'],
config: {
......@@ -11,7 +11,7 @@ Ext.define('PO.view.UserList', {
disclosure: true,
grouped: true,
indexBar: true,
store: 'Users',
store: 'UserStore',
onItemDisclosure: true
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment