Skip to content

Commit

Permalink
Update mobileapp to Architect 3.0 and Touch 2.3
Browse files Browse the repository at this point in the history
  • Loading branch information
lojjic committed Nov 7, 2013
1 parent e9d2c35 commit 8d72c33
Show file tree
Hide file tree
Showing 100 changed files with 50,819 additions and 20,374 deletions.
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,10 @@
.DS_Store
.idea
.sass-cache
.sencha
.sencha_backup
ext
touch
build
build.xml
build.settings
18 changes: 9 additions & 9 deletions mobileapp/app.js
Original file line number Diff line number Diff line change
@@ -1,29 +1,25 @@
/*
* File: app.js
*
* This file was generated by Sencha Architect version 2.3.0.
* This file was generated by Sencha Architect version 3.0.0.
* http://www.sencha.com/products/architect/
*
* This file requires use of the Sencha Touch 2.2.x library, under independent license.
* License of Sencha Architect does not include license for Sencha Touch 2.2.x. For more
* This file requires use of the Sencha Touch 2.3.x library, under independent license.
* License of Sencha Architect does not include license for Sencha Touch 2.3.x. For more
* details see http://www.sencha.com/license or contact license@sencha.com.
*
* This file will be auto-generated each and everytime you save your project.
*
* Do NOT hand edit this file.
*/

//@require @packageOverrides
// @require @packageOverrides
Ext.Loader.setConfig({

});

Ext.application({

requires: [
'Ext.DateExtras',
'Ext.chart.*'
],
Ext.application({
models: [
'LineItem',
'Orders',
Expand Down Expand Up @@ -56,6 +52,10 @@ Ext.application({
'EmployeeList',
'EmployeeEdit'
],
requires: [
'Ext.DateExtras',
'Ext.plugin.PullRefresh'
],
controllers: [
'NavController'
],
Expand Down
79 changes: 79 additions & 0 deletions mobileapp/app.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
{
"name": "Fulfill",
"indexHtmlPath": "index.html",
"url": null,
"js": [
{
"path": "touch/sencha-touch.js",
"x-bootstrap": true
},
{
"path": "bootstrap.js",
"x-bootstrap": true
},
{
"path": "app.js",
"bundle": true,
"update": "delta"
},
{
"path": "app/override/chart/Legend.js"
}
],
"css": [
{
"path": "resources/css/app.css",
"update": "delta"
},
{
"update": "delta",
"platform": [
"phone",
"tablet",
"desktop"
],
"theme": "Default",
"path": "resources/css/sencha-touch.css",
"_architect_active_theme": true
},
{
"path": "resources/css/app.css"
}
],
"appCache": {
"cache": [
"index.html"
],
"network": [
"*"
],
"fallback": []
},
"resources": [
"resources/images",
"resources/icons",
"resources/startup"
],
"ignore": [
".svn$"
],
"archivePath": "archive",
"requires": [],
"id": "598ebf91-4836-4fa7-8b99-9d9ccc351b6c",
"_architect": {
"_comment": "Please don't edit. This is Architect data.",
"name": "Fulfill",
"css": [
{
"path": "resources/css/app.css"
}
],
"js": [
{
"path": "app/override/chart/Legend.js"
}
],
"resources": [],
"requires": []
}
}
9 changes: 9 additions & 0 deletions mobileapp/app/DirectAPI.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
Ext.define('Fulfill.DirectAPI', {
requires: ['Ext.direct.*']
}, function() {
var Loader = Ext.Loader,
wasLoading = Loader.isLoading;
Loader.loadScriptFile('/directapi', Ext.emptyFn, Ext.emptyFn, null, true);
Loader.isLoading = wasLoading;
Ext.direct.Manager.addProvider(Fulfill.ss.REMOTING_API);
});
19 changes: 19 additions & 0 deletions mobileapp/app/Readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# ./controller

This folder contains the controllers

# ./model

This folder contains the models

# ./view

This folder contains the views

# ./store

This folder contains the stores

# ./form

This folder contains the forms
52 changes: 26 additions & 26 deletions mobileapp/app/controller/NavController.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
/*
* File: app/controller/NavController.js
*
* This file was generated by Sencha Architect version 2.3.0.
* This file was generated by Sencha Architect version 3.0.0.
* http://www.sencha.com/products/architect/
*
* This file requires use of the Sencha Touch 2.2.x library, under independent license.
* License of Sencha Architect does not include license for Sencha Touch 2.2.x. For more
* This file requires use of the Sencha Touch 2.3.x library, under independent license.
* License of Sencha Architect does not include license for Sencha Touch 2.3.x. For more
* details see http://www.sencha.com/license or contact license@sencha.com.
*
* This file will be auto-generated each and everytime you save your project.
Expand Down Expand Up @@ -138,15 +138,15 @@ Ext.define('Fulfill.controller.NavController', {
var nav = this.getOrdersNavView(),
itemPick = nav.getActiveItem(),
record = itemPick.getRecord();

nav.pop();
// setting isPacked prior to popping itemPick off will cause the dataview
// to render offscreen and become jumbled.

// toggle packed status
var shipDate = record.get('packDate'),
lineItemId = record.get('lineItemId');

if (!shipDate) {
Fulfill.ss.DXOrders.packLineItem(lineItemId);
record.set('packDate', new Date());
Expand Down Expand Up @@ -177,7 +177,7 @@ Ext.define('Fulfill.controller.NavController', {
o.unpackedItems.push(record.data);
}
});

if (o.packedItems.length) {
orderConfirm.setData(o);
nav.push(orderConfirm);
Expand All @@ -196,7 +196,7 @@ Ext.define('Fulfill.controller.NavController', {
lineItemIds.push(record.get('lineItemId'));
}
});

// TODO: Loading indicator
Fulfill.ss.DXOrders.shipOrder(orderId, lineItemIds, function(res) {
var ordersStore = Ext.StoreMgr.lookup('ordersStore'),
Expand All @@ -211,7 +211,7 @@ Ext.define('Fulfill.controller.NavController', {
// remove this orderId from the Orders store
}
});

},

onOrderListShow: function(component, eOpts) {
Expand All @@ -233,8 +233,8 @@ Ext.define('Fulfill.controller.NavController', {
buttons = segButton.getItems(),
pressedButtons = segButton.getPressedButtons(),
button = buttons.getAt(filterIndex);


segButton.setPressedButtons([pressedButtons[0]]);
if (filterDisabled) {
pressedButtons = Ext.Array.remove(pressedButtons, button);
Expand All @@ -244,7 +244,7 @@ Ext.define('Fulfill.controller.NavController', {
console.dir(pressedButtons);
segButton.setPressedButtons(pressedButtons);
series.setHiddenByIndex(filterIndex, filterDisabled);

var filters = [];
for (var i = 0, ln = pressedButtons.length; i < ln; i++) {
filters.push(pressedButtons[i].getText());
Expand All @@ -261,7 +261,7 @@ Ext.define('Fulfill.controller.NavController', {

onInventoryShow: function(component, eOpts) {
this.getHome().getTabBar().show();

Ext.StoreManager.lookup('itemsStore').load();
},

Expand Down Expand Up @@ -296,14 +296,14 @@ Ext.define('Fulfill.controller.NavController', {
title: 'New employee'
}),
newEmployee = Ext.create('Fulfill.model.Employee');

home.getTabBar().hide();
this.getNewEmployeeButton().hide();

employeeEdit.setRecord(newEmployee);

this.getRemoveEmployeeButton().hide();

nav.push(employeeEdit);
},

Expand All @@ -316,16 +316,16 @@ Ext.define('Fulfill.controller.NavController', {
properties = employeeEdit.child('#employeeEditProperties'),
name = properties.child('#employeeEditName'),
title = properties.child('#employeeEditTitle');

home.getTabBar().hide();
this.getNewEmployeeButton().hide();

employeeEdit.setRecord(record);
name.setValue(record.get('name'));
title.setValue(record.get('title'));

this.getRemoveEmployeeButton().show();

nav.push(employeeEdit);
},

Expand All @@ -337,27 +337,27 @@ Ext.define('Fulfill.controller.NavController', {
properties = employeeEdit.child('#employeeEditProperties'),
name = properties.child('#employeeEditName').getValue(),
title = properties.child('#employeeEditTitle').getValue();

employee.set({
name: name,
title: title
});

if (isNew) {
var store = Ext.StoreManager.get('employeesStore');
store.add(employee);
}

nav.pop();
},

onRemoveEmployeeTap: function(button, e, eOpts) {
var employee = this.getEmployeeEdit().getRecord(),
nav = this.getEmployeesNavView(),
store = Ext.StoreManager.get('employeesStore');

store.remove(employee);

nav.pop();
}

Expand Down
1 change: 1 addition & 0 deletions mobileapp/app/controller/Readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
This folder contains the controllers
1 change: 1 addition & 0 deletions mobileapp/app/form/Readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
This folder contains the forms
10 changes: 7 additions & 3 deletions mobileapp/app/model/Employee.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
/*
* File: app/model/Employee.js
*
* This file was generated by Sencha Architect version 2.3.0.
* This file was generated by Sencha Architect version 3.0.0.
* http://www.sencha.com/products/architect/
*
* This file requires use of the Sencha Touch 2.2.x library, under independent license.
* License of Sencha Architect does not include license for Sencha Touch 2.2.x. For more
* This file requires use of the Sencha Touch 2.3.x library, under independent license.
* License of Sencha Architect does not include license for Sencha Touch 2.3.x. For more
* details see http://www.sencha.com/license or contact license@sencha.com.
*
* This file will be auto-generated each and everytime you save your project.
Expand All @@ -16,6 +16,10 @@
Ext.define('Fulfill.model.Employee', {
extend: 'Ext.data.Model',

requires: [
'Ext.data.Field'
],

config: {
idProperty: 'employeeId',
fields: [
Expand Down
10 changes: 7 additions & 3 deletions mobileapp/app/model/Item.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
/*
* File: app/model/Item.js
*
* This file was generated by Sencha Architect version 2.3.0.
* This file was generated by Sencha Architect version 3.0.0.
* http://www.sencha.com/products/architect/
*
* This file requires use of the Sencha Touch 2.2.x library, under independent license.
* License of Sencha Architect does not include license for Sencha Touch 2.2.x. For more
* This file requires use of the Sencha Touch 2.3.x library, under independent license.
* License of Sencha Architect does not include license for Sencha Touch 2.3.x. For more
* details see http://www.sencha.com/license or contact license@sencha.com.
*
* This file will be auto-generated each and everytime you save your project.
Expand All @@ -16,6 +16,10 @@
Ext.define('Fulfill.model.Item', {
extend: 'Ext.data.Model',

requires: [
'Ext.data.Field'
],

config: {
fields: [
{
Expand Down
Loading

0 comments on commit 8d72c33

Please sign in to comment.