Skip to content

Commit

Permalink
#40 loadBatchRoute Sort
Browse files Browse the repository at this point in the history
  • Loading branch information
Pipi authored and Pipi committed Sep 27, 2013
1 parent f87eb4a commit 57fc833
Show file tree
Hide file tree
Showing 3 changed files with 247 additions and 213 deletions.
6 changes: 6 additions & 0 deletions extjs-app/metadata/controller/BatchEditorController
Original file line number Diff line number Diff line change
Expand Up @@ -537,6 +537,9 @@
" Ext.Msg.alert(\"Success\", action.result.message);",
"\t\tthat.getBatchRouteGrid().loadBatchRoute(that.getBatchForm().getRecord().data.id);",
" that.getBatchViewer().down('form[itemId=batchRouteForm]').getForm().reset(true);",
" that.getBatchViewer().down('form[itemId=batchRouteForm]').getForm().setValues({",
" 'batch.id': that.getBatchForm().getRecord().data.id",
" });",
" },",
" failure: function(form,action) {",
" console.log('Updating Failed!');",
Expand Down Expand Up @@ -575,6 +578,9 @@
" Ext.Msg.alert(\"Success\", action.result.message);",
" that.getBatchRouteGrid().loadBatchRoute(that.getBatchForm().getRecord().data.id);",
" that.getBatchViewer().down('form[itemId=batchRouteForm]').getForm().reset(true);",
" that.getBatchViewer().down('form[itemId=batchRouteForm]').getForm().setValues({",
" 'batch.id': that.getBatchForm().getRecord().data.id",
" });",
" },",
" failure: function(form,action) {",
" console.log('Deleting Failed!');",
Expand Down
11 changes: 9 additions & 2 deletions extjs-app/metadata/view/BatchRouteGrid
Original file line number Diff line number Diff line change
Expand Up @@ -229,11 +229,18 @@
],
"implHandler": [
"console.log(\"View-batchRouteGrid.loadBatchRoute\");",
"",
"var store = this.getStore();",
"",
"store.removeAll();",
"store.load({",
" params:{'batch.id':batchId}",
"});"
" params:{'batch.id':batchId},",
" callback:function(records, operation, success){",
"\t\tstore.sort(store.sorters.items[0]);",
" }",
"});",
"",
""
]
},
"designerId": "5a5a9244-095f-4a4a-9b5c-a64e8ca4f17d"
Expand Down
Loading

0 comments on commit 57fc833

Please sign in to comment.