partkeepr

fork of partkeepr
git clone https://git.e1e0.net/partkeepr.git
Log | Files | Refs | Submodules | README | LICENSE

commit e464f18c4358efe86c83564535d161d26fd38ea3
parent b2ed56354adf7a99318771345d8d40c2ef4f611d
Author: Felicitus <privat@timohummel.com>
Date:   Sun, 22 May 2011 19:53:13 +0200

Misc frontend fixes

Diffstat:
Mfrontend/js/de.RaumZeitLabor.PartDB2/CategoryEditor/CategoryEditor.js | 2++
Mfrontend/js/de.RaumZeitLabor.PartDB2/PartsManager/PartsManagerTree.js | 14++++++++------
Mfrontend/js/de.RaumZeitLabor.PartDB2/PartsManager/PartsManagerWindow.js | 4++++
3 files changed, 14 insertions(+), 6 deletions(-)

diff --git a/frontend/js/de.RaumZeitLabor.PartDB2/CategoryEditor/CategoryEditor.js b/frontend/js/de.RaumZeitLabor.PartDB2/CategoryEditor/CategoryEditor.js @@ -148,6 +148,7 @@ de.RaumZeitLabor.PartDB2.CategoryEditor = Ext.extend(Ext.form.FormPanel, { this.categoryComboBox.parentId = Ext.getCmp("parts-tree").getRootNode().id; this.categoryComboBox.setValue(Ext.getCmp("parts-tree").getRootNode().text); } + Ext.getCmp("parts-manager-window").showCategoryEditor(); this.show(); }, editCategory: function (id) { @@ -195,6 +196,7 @@ de.RaumZeitLabor.PartDB2.CategoryEditor = Ext.extend(Ext.form.FormPanel, { this.categoryComboBox.setValue(response.parentName); + Ext.getCmp("parts-manager-window").showCategoryEditor(); this.show(); } }); \ No newline at end of file diff --git a/frontend/js/de.RaumZeitLabor.PartDB2/PartsManager/PartsManagerTree.js b/frontend/js/de.RaumZeitLabor.PartDB2/PartsManager/PartsManagerTree.js @@ -47,27 +47,29 @@ de.RaumZeitLabor.PartDB2.PartsManagerTree = Ext.extend(Ext.tree.TreePanel, { }, addCategory: function () { - Ext.getCmp("category-details").createCategory(); + Ext.getCmp("card-category-editor").createCategory(); }, onSelectionChange: function (sm, node) { if (node) { this.selectedNode = node.id; Ext.getCmp("category-edit-button").enable(); + + Ext.getCmp("parts-manager-window").showPartsList(); + + Ext.getCmp("parts-list").setLimitCategory(node.attributes.id); + Ext.getCmp("parts-list").store.load(); + Ext.getCmp("parts-list").show(); } else { Ext.getCmp("category-edit-button").disable(); } - Ext.getCmp("parts-manager-window").showPartsList(); - Ext.getCmp("parts-list").setLimitCategory(node.attributes.id); - Ext.getCmp("parts-list").store.load(); - Ext.getCmp("parts-list").show(); }, editCategory: function () { var category = this.getSelectionModel().getSelectedNode().id; - Ext.getCmp("category-details").editCategory(category); + Ext.getCmp("card-category-editor").editCategory(category); }, loadTree: function () { var call = new org.jerrymouse.service.Call( diff --git a/frontend/js/de.RaumZeitLabor.PartDB2/PartsManager/PartsManagerWindow.js b/frontend/js/de.RaumZeitLabor.PartDB2/PartsManager/PartsManagerWindow.js @@ -49,6 +49,10 @@ de.RaumZeitLabor.PartDB2.PartsManagerWindow = Ext.extend(org.jerrymouse.gui.widg showPartsList: function () { Ext.getCmp("parts-mananger-window-card").getLayout().setActiveItem("parts-list"); this.partsList.show(); + }, + showCategoryEditor: function () { + Ext.getCmp("parts-mananger-window-card").getLayout().setActiveItem("card-category-editor"); + Ext.getCmp("card-category-editor").doLayout(); } });