Browse files

upgrade to touch 2.0.2

-clarified comments
-removed bugs fixed in 2.0.2
-removed unnecessary code
  • Loading branch information...
1 parent e8ffe38 commit 1ca7d2dfb1e80433acc4612495d74a3b32833931 Eric Bowden committed Jul 10, 2012
View
36 .project
@@ -1,10 +1,10 @@
{
"expandedState": {
- "data": false,
+ "data": true,
"model": true,
"component": true,
"controller": true,
- "resource": true,
+ "resource": false,
"9c7e563e-7ff0-4ba7-9556-9c0d6c286927": {
"id": "ExtBox1-ext-gen2225",
"expanded": true,
@@ -33,7 +33,7 @@
},
"1b7b0c08-5968-4072-ba7f-815dd2cfe595": {
"id": "ExtBox1-ext-gen25572",
- "expanded": false,
+ "expanded": true,
"cn": [
{
"id": "ExtBox1-ext-gen25582",
@@ -115,13 +115,7 @@
{
"id": "ExtBox1-ext-gen25612",
"expanded": true,
- "cn": [
- {
- "id": "ExtBox1-ext-gen4970",
- "expanded": true,
- "cn": []
- }
- ]
+ "cn": []
},
{
"id": "ExtBox1-ext-gen25607",
@@ -152,7 +146,7 @@
},
"d2bdb0dd-5320-4693-8b47-e897fdfdca71": {
"id": "ExtBox1-ext-gen17065",
- "expanded": false,
+ "expanded": true,
"cn": [
{
"id": "ExtBox1-ext-gen17069",
@@ -243,7 +237,7 @@
},
"2b83fda6-da12-4c2f-a259-389ef8f3e683": {
"id": "ExtBox1-ext-gen25971",
- "expanded": false,
+ "expanded": true,
"cn": [
{
"id": "ExtBox1-ext-gen25975",
@@ -279,13 +273,7 @@
{
"id": "ExtBox1-ext-gen26006",
"expanded": true,
- "cn": [
- {
- "id": "ExtBox1-ext-gen7921",
- "expanded": true,
- "cn": []
- }
- ]
+ "cn": []
},
{
"id": "ExtBox1-ext-gen28867",
@@ -325,7 +313,7 @@
},
"9290d4e2-55ef-4f81-b844-ff9efd351b2b": {
"id": "ExtBox1-ext-gen6975",
- "expanded": false,
+ "expanded": true,
"cn": [
{
"id": "ExtBox1-ext-gen20879",
@@ -510,7 +498,7 @@
"cn": [
{
"id": "ExtBox1-ext-gen6372",
- "expanded": true,
+ "expanded": false,
"cn": [
{
"id": "ExtBox1-ext-gen6485",
@@ -634,7 +622,7 @@
},
{
"id": "ExtBox1-ext-gen25205",
- "expanded": true,
+ "expanded": false,
"cn": [
{
"id": "ExtBox1-ext-gen26154",
@@ -672,7 +660,7 @@
},
"49e77106-a613-44e5-8af8-44300ffc6595": {
"id": "ExtBox1-ext-gen11025",
- "expanded": true,
+ "expanded": false,
"cn": [
{
"id": "ExtBox1-ext-gen11242",
@@ -780,7 +768,7 @@
},
"9492a36c-015b-4b23-8dad-68f6f48b9841": {
"id": "ExtBox1-ext-gen43233",
- "expanded": true,
+ "expanded": false,
"cn": [
{
"id": "ExtBox1-ext-gen43445",
View
2 app.html
@@ -6,7 +6,7 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>LoanShark</title>
- <script src="http://extjs.cachefly.net/touch/sencha-touch-2.0.1.1/sencha-touch-all-debug.js"></script>
+ <script src="lib/sencha-touch-all.js"></script>
<link rel="stylesheet" href="resources/css/application.css">
<script src="override.js"></script>
<script type="text/javascript" src="app.js"></script>
View
4 app/controller/Debt.js
@@ -112,9 +112,9 @@ Ext.define('Payback.controller.Debt', {
//if the person is changed in the record
if (record.isModified('person_id')) {
record.getPerson().debts().remove(record); //remove debts from old
- record.setPerson(values.person_id); //sets new
+ record.setPerson(values.person_id); //sets new person
- // The following two lines work around a bug that causes the Person instance not to be updated correctly
+ //bug in the framework(reported as TOUCH-3106),sets up the Person instance again with the correct person value
delete record.PersonBelongsToInstance;
record.getPerson(); // bug, Sets up the Person instance reference again
}
View
3 app/controller/Payment.js
@@ -97,13 +97,12 @@ Ext.define('Payback.controller.Payment', {
}
},this);*/
- //bug in framework, debt_id is not correctly set in filter, work around is to delete the store and reassociate
+ //bug in framework(reported as TOUCH-3105), debt_id is not correctly set in filter, work around is to delete the store and reassociate
delete debt.paymentsStore;
debt.payments();
}
//update the debt balance on new payments
- //var debtRecord = this.getDebtDetail().getRecord();
debt.set('balance',0); // calls convert field on debt
debt.getPerson().calcBalance(); //calc balance of updated payments and debt in person
View
2 app/store/DebtsStore.js
@@ -28,8 +28,6 @@ Ext.define('Payback.store.DebtsStore', {
storeId: 'Debts',
grouper: {
groupFn: function(record) {
- // console.log(record);
- // debugger;
return record.get('date');
},
direction: 'DESC'
View
2 app/view/ContactDetail.js
@@ -142,7 +142,7 @@ Ext.define('Payback.view.ContactDetail', {
//refresh Debt dataview
this.down('dataview').refresh();
- //get rid of person in dataview when viewed from contact view
+ //remove person label in debt dataview when viewed from contact detail
Ext.select('.x-form .debt-person-label').setStyle({display:'none'});
}
View
27 app/view/DebtDetail.js
@@ -164,34 +164,7 @@ Ext.define('Payback.view.DebtDetail', {
}
]
}
- ],
- listeners: [
- {
- fn: 'onMynumberfieldFocus',
- event: 'focus',
- delegate: '#mynumberfield'
- }
]
- },
-
- onMynumberfieldFocus: function(textfield, e, options) {
-
- //android work around to hide keyboard.
- /*if (Ext.os.is.Android)
- Ext.Viewport.element.on({tap:function(){
- var field = document.createElement('input');
- field.setAttribute('type', 'text');
- document.body.appendChild(field);
-
- setTimeout(function() {
- field.focus();
-
- setTimeout(function() {
- field.setAttribute('style', 'display:none;');
- field.parentNode.removeChild(field);
- }, 100);
- }, 50);
- }, single:true});*/
}
});
View
27 app/view/PaymentDetail.js
@@ -82,34 +82,7 @@ Ext.define('Payback.view.PaymentDetail', {
xtype: 'hiddenfield',
name: 'debt_id'
}
- ],
- listeners: [
- {
- fn: 'onMynumberfield1Focus',
- event: 'focus',
- delegate: '#mynumberfield1'
- }
]
- },
-
- onMynumberfield1Focus: function(textfield, e, options) {
-
- //android work around to hide keyboard.
- /*if (Ext.os.is.Android)
- Ext.Viewport.element.on({tap:function(){
- var field = document.createElement('input');
- field.setAttribute('type', 'text');
- document.body.appendChild(field);
-
- setTimeout(function() {
- field.focus();
-
- setTimeout(function() {
- field.setAttribute('style', 'display:none;');
- field.parentNode.removeChild(field);
- }, 100);
- }, 50);
- }, single:true});*/
}
});
View
8 app/view/myContactListItem.js
@@ -20,7 +20,7 @@ Ext.define('Payback.view.myContactListItem', {
config: {
baseCls: 'x-data-item',
updateRecord: function(newRecord, oldeRecord) {
- //bug in framework, this stops propagation of event in deleteButtonTap and allows the record to be deleted from the store
+ //this stops propagation of event in deleteButtonTap and allows the record to be deleted from the store
this.callParent(arguments);
newRecord.getData(true);
@@ -71,8 +71,8 @@ Ext.define('Payback.view.myContactListItem', {
onContactDeleteButtonTap: function(button, e, options) {
- //bug in framework, stops propagation of event, without this sometimes both the itemtap
- //and deletebuttontap would get fired after a previous record is deleted, this.callParent in updateRecords fixes this also so this might not be needed
+ //stops propagation of event, without this sometimes both the itemtap
+ //and deletebuttontap would get fired after a previous record is deleted from dataview.
e.stopEvent();
var debts = this.getRecord().debts();
@@ -102,7 +102,7 @@ Ext.define('Payback.view.myContactListItem', {
},
updateRecord: function(newRecord, oldeRecord) {
- //bug in framework, this stops propagation of event in deleteButtonTap and allows the record to be deleted from the store
+ //this stops propagation of event in deleteButtonTap and allows the record to be deleted from the store
this.callParent(arguments);
newRecord.getData(true);
View
10 app/view/myDebtListItem.js
@@ -20,7 +20,7 @@ Ext.define('Payback.view.myDebtListItem', {
config: {
baseCls: 'x-data-item',
updateRecord: function(newRecord, oldRecord) {
- //bug in framework, this stops propagation of event in deleteButtonTap and allows the record to be deleted from the store
+ //this stops propagation of event in deleteButtonTap and allows the record to be deleted from the store
this.callParent(arguments);
newRecord.getData(true);
@@ -75,8 +75,8 @@ Ext.define('Payback.view.myDebtListItem', {
onDebtDeleteButtonTap: function(button, e, options) {
- //bug in framework, stops propagation of event, without this sometimes both the itemtap
- //and deletebuttontap would get fired after a previous record is deleted. this.callParent in updateRecords fixes this also so this might not be needed
+ //stops propagation of event, without this sometimes both the itemtap
+ //and deletebuttontap would get fired after a previous record is deleted in dataview
e.stopEvent();
var dataview = this.up('dataview');
@@ -99,14 +99,14 @@ Ext.define('Payback.view.myDebtListItem', {
//update the summary
Payback.app.application.getController('Payback.controller.Summary').updateSummary();
- button.hide(); //bug, button will appear on other debts when deleting a debt from the contact detail
+ button.hide(); //bug in project, sometimes button will appear on other debts when deleting a debt from the contact detail
//refresh DataView
dataview.refresh();
},
updateRecord: function(newRecord, oldRecord) {
- //bug in framework, this stops propagation of event in deleteButtonTap and allows the record to be deleted from the store
+ //this stops propagation of event in deleteButtonTap and allows the record to be deleted from the store
this.callParent(arguments);
newRecord.getData(true);
View
7 app/view/myPaymentListItem.js
@@ -20,7 +20,7 @@ Ext.define('Payback.view.myPaymentListItem', {
config: {
baseCls: 'x-data-item',
updateRecord: function(newRecord, oldeRecord) {
- //bug in framework, this stops propagation of event in deleteButtonTap and allows the record to be deleted from the store
+ //this stops propagation of event in deleteButtonTap and allows the record to be deleted from the store
this.callParent(arguments);
newRecord.getData(true);
@@ -89,13 +89,10 @@ Ext.define('Payback.view.myPaymentListItem', {
//update the summary
Payback.app.application.getController('Payback.controller.Summary').updateSummary();
-
- //refresh DataView
- //dataview.refresh();
},
updateRecord: function(newRecord, oldeRecord) {
- //bug in framework, this stops propagation of event in deleteButtonTap and allows the record to be deleted from the store
+ //this stops propagation of event in deleteButtonTap and allows the record to be deleted from the store
this.callParent(arguments);
newRecord.getData(true);
View
78,528 lib/sencha-touch-all-debug.js
78,528 additions, 0 deletions not shown because the diff is too large. Please use a local Git client to view these changes.
View
18 lib/sencha-touch-all.js
18 additions, 0 deletions not shown because the diff is too large. Please use a local Git client to view these changes.
View
12 metadata/controller/Debt
@@ -112,19 +112,19 @@
" //if the person is changed in the record",
" if (record.isModified('person_id')) {",
" record.getPerson().debts().remove(record); //remove debts from old",
- " record.setPerson(values.person_id); //sets new",
- "",
- " // The following two lines work around a bug that causes the Person instance not to be updated correctly",
+ " record.setPerson(values.person_id); //sets new person",
+ " ",
+ " //bug in the framework(reported as TOUCH-3106),sets up the Person instance again with the correct person value",
" delete record.PersonBelongsToInstance;",
" record.getPerson(); // bug, Sets up the Person instance reference again",
" }",
"",
" record.set('balance',0); //setting the balance calls the convert field again to update the debt",
- " ",
+ "",
" //record.commit(); //bug in the framework(now fixed), saving a record does not remove modified flags",
- " ",
+ "",
" record.save();",
- " ",
+ "",
"} else { //new record ",
" var debt = person.debts().add(values)[0]; //add values",
" person.debts().sync();",
View
11 metadata/controller/Payment
@@ -96,21 +96,20 @@
" var payment = debt.payments().add(values)[0];",
" debt.payments().sync();",
" payment.getDebt(); //bug in framework(reported as TOUCH-3073), associates payment with debt ",
- " ",
+ "",
" //bug in the framework(fixed), this allows the dataview to update the list when a record is added the first time and no other are in the store",
" /*payment.save({",
- " callback:function(){",
- " this.getMyPaymentDataView().refresh();",
- " }",
+ " callback:function(){",
+ " this.getMyPaymentDataView().refresh();",
+ " }",
" },this);*/",
"",
- " //bug in framework, debt_id is not correctly set in filter, work around is to delete the store and reassociate",
+ " //bug in framework(reported as TOUCH-3105), debt_id is not correctly set in filter, work around is to delete the store and reassociate",
" delete debt.paymentsStore; ",
" debt.payments();",
"}",
"",
"//update the debt balance on new payments",
- "//var debtRecord = this.getDebtDetail().getRecord();",
"debt.set('balance',0); // calls convert field on debt",
"debt.getPerson().calcBalance(); //calc balance of updated payments and debt in person",
"",
View
1 metadata/model/Debt
@@ -177,6 +177,7 @@
"codeClass": null,
"userConfig": {
"designer|userClassName": "MyBelongsToAssociation",
+ "designer|displayName": "BelongsToPerson",
"model": "Person",
"foreignKey": "person_id"
},
View
1 metadata/model/Payment
@@ -112,6 +112,7 @@
"codeClass": null,
"userConfig": {
"designer|userClassName": "MyBelongsToAssociation1",
+ "designer|displayName": "BelongsToDebt",
"model": "Debt",
"foreignKey": "debt_id"
},
View
3 metadata/resource/Library
@@ -7,8 +7,7 @@
},
"codeClass": null,
"userConfig": {
- "basePath": "http://extjs.cachefly.net/touch/sencha-touch-2.0.1.1/",
- "debug": true,
+ "basePath": "lib/",
"includeCss": false
},
"customConfigs": [],
View
2 metadata/store/DebtsStore
@@ -47,8 +47,6 @@
"record"
],
"implHandler": [
- " // console.log(record);",
- " // debugger;",
"return record.get('date');"
]
},
View
2 metadata/view/ContactDetail
@@ -304,7 +304,7 @@
"//refresh Debt dataview",
"this.down('dataview').refresh();",
"",
- "//get rid of person in dataview when viewed from contact view",
+ "//remove person label in debt dataview when viewed from contact detail",
"Ext.select('.x-form .debt-person-label').setStyle({display:'none'});"
],
"name": "show"
View
38 metadata/view/DebtDetail
@@ -303,43 +303,7 @@
"labelAlign": "top",
"name": "amount"
},
- "customConfigs": [],
- "cn": [
- {
- "id": "ExtBox1-ext-gen4970",
- "type": "basiceventbinding",
- "reference": {
- "name": "listeners",
- "type": "array"
- },
- "codeClass": null,
- "userConfig": {
- "designer|userClassName": "onMynumberfieldFocus",
- "fn": "onMynumberfieldFocus",
- "implHandler": [
- "",
- "//android work around to hide keyboard.",
- "/*if (Ext.os.is.Android)",
- "Ext.Viewport.element.on({tap:function(){",
- "var field = document.createElement('input');",
- "field.setAttribute('type', 'text');",
- "document.body.appendChild(field);",
- "",
- "setTimeout(function() {",
- "field.focus(); ",
- "",
- "setTimeout(function() {",
- "field.setAttribute('style', 'display:none;');",
- "field.parentNode.removeChild(field);",
- "}, 100);",
- "}, 50);",
- "}, single:true});*/"
- ],
- "name": "focus"
- },
- "customConfigs": []
- }
- ]
+ "customConfigs": []
},
{
"id": "ExtBox1-ext-gen25607",
View
38 metadata/view/PaymentDetail
@@ -133,43 +133,7 @@
"labelAlign": "top",
"name": "amount"
},
- "customConfigs": [],
- "cn": [
- {
- "id": "ExtBox1-ext-gen7921",
- "type": "basiceventbinding",
- "reference": {
- "name": "listeners",
- "type": "array"
- },
- "codeClass": null,
- "userConfig": {
- "designer|userClassName": "onMynumberfield1Focus",
- "fn": "onMynumberfield1Focus",
- "implHandler": [
- "",
- "//android work around to hide keyboard.",
- "/*if (Ext.os.is.Android)",
- "Ext.Viewport.element.on({tap:function(){",
- " var field = document.createElement('input');",
- " field.setAttribute('type', 'text');",
- " document.body.appendChild(field);",
- "",
- " setTimeout(function() {",
- " field.focus(); ",
- "",
- " setTimeout(function() {",
- " field.setAttribute('style', 'display:none;');",
- " field.parentNode.removeChild(field);",
- " }, 100);",
- " }, 50);",
- "}, single:true});*/"
- ],
- "name": "focus"
- },
- "customConfigs": []
- }
- ]
+ "customConfigs": []
},
{
"id": "ExtBox1-ext-gen28867",
View
6 metadata/view/myContactListItem
@@ -70,8 +70,8 @@
"fn": "onContactDeleteButtonTap",
"implHandler": [
"",
- "//bug in framework, stops propagation of event, without this sometimes both the itemtap ",
- "//and deletebuttontap would get fired after a previous record is deleted, this.callParent in updateRecords fixes this also so this might not be needed",
+ "//stops propagation of event, without this sometimes both the itemtap ",
+ "//and deletebuttontap would get fired after a previous record is deleted from dataview.",
"e.stopEvent(); ",
"",
"var debts = this.getRecord().debts();",
@@ -147,7 +147,7 @@
"oldeRecord"
],
"implHandler": [
- "//bug in framework, this stops propagation of event in deleteButtonTap and allows the record to be deleted from the store",
+ "//this stops propagation of event in deleteButtonTap and allows the record to be deleted from the store",
"this.callParent(arguments);",
"",
"newRecord.getData(true);",
View
8 metadata/view/myDebtListItem
@@ -71,8 +71,8 @@
"fn": "onDebtDeleteButtonTap",
"implHandler": [
"",
- "//bug in framework, stops propagation of event, without this sometimes both the itemtap ",
- "//and deletebuttontap would get fired after a previous record is deleted. this.callParent in updateRecords fixes this also so this might not be needed",
+ "//stops propagation of event, without this sometimes both the itemtap ",
+ "//and deletebuttontap would get fired after a previous record is deleted in dataview",
"e.stopEvent(); ",
"",
"var dataview = this.up('dataview');",
@@ -95,7 +95,7 @@
"//update the summary",
"Payback.app.application.getController('Payback.controller.Summary').updateSummary();",
"",
- "button.hide(); //bug, button will appear on other debts when deleting a debt from the contact detail",
+ "button.hide(); //bug in project, sometimes button will appear on other debts when deleting a debt from the contact detail",
"",
"//refresh DataView",
"dataview.refresh();"
@@ -150,7 +150,7 @@
"newRecord, oldRecord"
],
"implHandler": [
- "//bug in framework, this stops propagation of event in deleteButtonTap and allows the record to be deleted from the store",
+ "//this stops propagation of event in deleteButtonTap and allows the record to be deleted from the store",
"this.callParent(arguments);",
"",
"newRecord.getData(true);",
View
7 metadata/view/myPaymentListItem
@@ -90,10 +90,7 @@
"Ext.getCmp('debtHeaderLabel').setHtml(str);",
"",
"//update the summary",
- "Payback.app.application.getController('Payback.controller.Summary').updateSummary();",
- "",
- "//refresh DataView",
- "//dataview.refresh();"
+ "Payback.app.application.getController('Payback.controller.Summary').updateSummary();"
],
"name": "tap"
},
@@ -140,7 +137,7 @@
"oldeRecord"
],
"implHandler": [
- "//bug in framework, this stops propagation of event in deleteButtonTap and allows the record to be deleted from the store",
+ "//this stops propagation of event in deleteButtonTap and allows the record to be deleted from the store",
"this.callParent(arguments);",
"",
"newRecord.getData(true);",
View
10 override.js
@@ -1,24 +1,24 @@
//Fixes datepicker display bug
-Ext.dom.Element.override({
+/*Ext.dom.Element.override({
getXY: function() {
var rect = this.dom.getBoundingClientRect(),
round = Math.round;
return [round(rect.left + window.pageXOffset), round(rect.top + window.pageYOffset)];
}
-});
+});*/
//fixes android chrome bugs
if (Ext.os.is.Android4 && Ext.browser.is.Chrome) {
//fixes 2 pixel spacing at bottom of screen
- Ext.viewport.Android.override({
+ /*Ext.viewport.Android.override({
getWindowHeight: function() {
return window.outerHeight;
}
- });
+ });*/
- //Removes 3d rendering,
+ //Removes 3d rendering, this fixes blurriness on android chrome
Ext.os.is.Android2 = true;
//fixes keyboard issues on chrome

0 comments on commit 1ca7d2d

Please sign in to comment.