partkeepr

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

commit 97f497705f09954f7c90d4753ff5023a7459726b
parent 11d9c4ffcd62250128f89f1c6e210ba8311e2500
Author: Felicitus <felicitus@felicitus.org>
Date:   Wed, 25 Nov 2015 19:14:31 +0100

Refactored app item launching, fixed system notice button

Diffstat:
Msrc/PartKeepr/FrontendBundle/Resources/public/js/Components/Widgets/SystemNoticeButton.js | 5++---
Msrc/PartKeepr/FrontendBundle/Resources/public/js/PartKeepr.js | 11++++++-----
2 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/src/PartKeepr/FrontendBundle/Resources/public/js/Components/Widgets/SystemNoticeButton.js b/src/PartKeepr/FrontendBundle/Resources/public/js/Components/Widgets/SystemNoticeButton.js @@ -23,6 +23,6 @@ Ext.define('PartKeepr.SystemNoticeButton', { * @return nothing */ onClick: function () { - PartKeepr.getApplication().menuBar.showSystemNotices(); + PartKeepr.getApplication().openAppItem("PartKeepr.SystemNoticeEditorComponent"); } -});- \ No newline at end of file +}); diff --git a/src/PartKeepr/FrontendBundle/Resources/public/js/PartKeepr.js b/src/PartKeepr/FrontendBundle/Resources/public/js/PartKeepr.js @@ -48,14 +48,15 @@ Ext.application({ this.loginManager.login(); }, onAppMenuClick: function (item) { - var target = item.target["$className"]; - + this.openAppItem(item.target["$className"]); + }, + openAppItem: function (target) { targetClass = Ext.ClassManager.get(target); var config = { - title: item.target.title, - closable: item.target.closable, - iconCls: item.target.iconCls + title: targetClass.title, + closable: targetClass.closable, + iconCls: targetClass.iconCls }; var j = Ext.create(target, config);