Skip to content

Commit

Permalink
Upgrade to Architect 2.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Aaron Conran committed Nov 5, 2012
1 parent a828754 commit 97c188c
Show file tree
Hide file tree
Showing 15 changed files with 191 additions and 190 deletions.
7 changes: 4 additions & 3 deletions Kiva.xds
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"urlPrefix": "http://localhost/Code/sample-apps/Kiva",
"spacesToIndent": 4,
"exportPath": "",
"sdkPath": "",
"lineEnding": "CRLF",
"genTimestamps": false,
"cacheBust": false,
Expand All @@ -14,10 +15,10 @@
"saveOnDeploy": false,
"appName": "MyApp"
},
"xdsVersion": "2.0.0",
"xdsBuild": 557,
"xdsVersion": "2.1.0",
"xdsBuild": 670,
"schemaVersion": 1,
"upgradeVersion": 210000000495,
"upgradeVersion": 210000000498,
"framework": "touch20",
"topInstanceFileMap": {
"513759c1-12e2-4a8a-b5b8-6051975b79d7": {
Expand Down
4 changes: 2 additions & 2 deletions app.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* File: app.js
*
* This file was generated by Sencha Architect version 2.0.0.
* This file was generated by Sencha Architect version 2.1.0.
* http://www.sencha.com/products/architect/
*
* This file requires use of the Sencha Touch 2.0.x library, under independent license.
Expand Down Expand Up @@ -45,7 +45,7 @@ Ext.application({
],

launch: function() {


Ext.create('Kiva.view.Main', {fullscreen: true});
}

Expand Down
128 changes: 64 additions & 64 deletions app/controller/Loans.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* File: app/controller/Loans.js
*
* This file was generated by Sencha Architect version 2.0.0.
* This file was generated by Sencha Architect version 2.1.0.
* http://www.sencha.com/products/architect/
*
* This file requires use of the Sencha Touch 2.0.x library, under independent license.
Expand All @@ -25,36 +25,36 @@ Ext.define('Kiva.controller.Loans', {
refreshButton: 'button[iconCls=refresh]'
},

control: {
"loanslist": {
select: 'onListTap'
},
"detail": {
hideanimationstart: 'onDetailHideAnimationStart'
},
"searchfield": {
action: 'onSearch'
},
"selectfield": {
change: 'onSelectChange'
},
"button[iconCls=refresh]": {
tap: 'onRefreshButtonTap'
}
control: {
"loanslist": {
select: 'onListTap'
},
"detail": {
hideanimationstart: 'onDetailHideAnimationStart'
},
"searchfield": {
action: 'onSearch'
},
"selectfield": {
change: 'onSelectChange'
},
"button[iconCls=refresh]": {
tap: 'onRefreshButtonTap'
}
}
},

onListTap: function(dataview, record, options) {
if (!this.view) {
this.view = Ext.create('Kiva.view.Detail');
}

this.view.setLoan(record);

if (!this.view.getParent()) {
Ext.Viewport.add(this.view);
}

onListTap: function() {
if (!this.view) {
this.view = Ext.create('Kiva.view.Detail');
}

this.view.setLoan(record);

if (!this.view.getParent()) {
Ext.Viewport.add(this.view);
}

this.view.show();
},

Expand All @@ -63,42 +63,42 @@ Ext.define('Kiva.controller.Loans', {
},

onSearch: function(textfield, e, options) {
var field = textfield;

this.doFilter({
q: field.getValue()
var field = textfield;

this.doFilter({
q: field.getValue()
});
},

onSelectChange: function(selectfield, newValue, oldValue, options) {
var field = selectfield;

if (!field.initialized) {
return;
}

var config = {};
config[field.getName()] = field.getValue();
var field = selectfield;

if (!field.initialized) {
return;
}

var config = {};
config[field.getName()] = field.getValue();
this.doFilter(config);
},

onRefreshButtonTap: function(button, e, options) {
var store = Ext.getStore('Loans'),
hasValue = Boolean(this.getSearchField().getValue().length);

if (!hasValue) {
store.clearFilter();
}

var store = Ext.getStore('Loans'),
hasValue = Boolean(this.getSearchField().getValue().length);

if (!hasValue) {
store.clearFilter();
}

store.load();
},

init: function(application) {
Ext.getStore('Loans').on({
scope: this,

beforeload: this.onBeforeStoreLoad,
load: this.onStoreLoad
Ext.getStore('Loans').on({
scope: this,

beforeload: this.onBeforeStoreLoad,
load: this.onStoreLoad
});
},

Expand All @@ -111,18 +111,18 @@ Ext.define('Kiva.controller.Loans', {
},

doFilter: function(values) {
var store = Ext.getStore('Loans'),
filters = [];

Ext.iterate(values, function(field, value) {
filters.push({
property: field,
value : value
});
});

store.clearFilter();
store.filter(filters);
var store = Ext.getStore('Loans'),
filters = [];

Ext.iterate(values, function(field, value) {
filters.push({
property: field,
value : value
});
});

store.clearFilter();
store.filter(filters);
store.load();
}

Expand Down
6 changes: 3 additions & 3 deletions app/model/Loan.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* File: app/model/Loan.js
*
* This file was generated by Sencha Architect version 2.0.0.
* This file was generated by Sencha Architect version 2.1.0.
* http://www.sencha.com/products/architect/
*
* This file requires use of the Sencha Touch 2.0.x library, under independent license.
Expand Down Expand Up @@ -63,16 +63,16 @@ Ext.define('Kiva.model.Loan', {
type: 'int'
},
{
mapping: 'description.texts.en',
name: 'description',
mapping: 'description.texts.en',
type: 'string'
},
{
convert: function(v, rec) {
return "http://kiva.org/img/w80h80/" + v + ".jpg";
},
mapping: 'image.id',
name: 'image',
mapping: 'image.id',
type: 'string'
},
{
Expand Down
2 changes: 1 addition & 1 deletion app/store/Loans.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* File: app/store/Loans.js
*
* This file was generated by Sencha Architect version 2.0.0.
* This file was generated by Sencha Architect version 2.1.0.
* http://www.sencha.com/products/architect/
*
* This file requires use of the Sencha Touch 2.0.x library, under independent license.
Expand Down
Loading

0 comments on commit 97c188c

Please sign in to comment.