[icinga-checkins] icinga.org: icinga-web/master: grid templates: Allow xtype for for custom menus, thanks eric

git at icinga.org git at icinga.org
Fri Oct 19 12:26:02 CEST 2012


Module: icinga-web
Branch: master
Commit: 68cfc430496296fd58167f77ddfa73fa2effb42f
URL:    https://git.icinga.org/?p=icinga-web.git;a=commit;h=68cfc430496296fd58167f77ddfa73fa2effb42f

Author: Marius Hein <marius.hein at netways.de>
Date:   Fri Oct 19 12:25:36 2012 +0200

grid templates: Allow xtype for for custom menus, thanks eric

---

 .../js/Cronk/grid/components/JsonActionPanel.js    |   11 ++++++-----
 1 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/app/modules/Cronks/lib/js/Cronk/grid/components/JsonActionPanel.js b/app/modules/Cronks/lib/js/Cronk/grid/components/JsonActionPanel.js
index 6ecf302..5cd8a47 100644
--- a/app/modules/Cronks/lib/js/Cronk/grid/components/JsonActionPanel.js
+++ b/app/modules/Cronks/lib/js/Cronk/grid/components/JsonActionPanel.js
@@ -546,7 +546,7 @@ Ext.ns("Cronk.grid.components");
                     
                 }, this);
                 
-                if (items.length) {
+                if (items.length || group.xtype) {
                     
                     // Copy, because we're loosing our objects after
                     // deleting items
@@ -560,9 +560,10 @@ Ext.ns("Cronk.grid.components");
                     var componentGroup = null;
                     
                     if (this.menuOrganizations.indexOf(this.organizeAs) > -1) {
-                        groupConfig.menu = new Ext.menu.Menu({
-                            items: items
-                        });
+                        groupConfig.menu = {
+                            items: items,
+                            xtype: group.xtype || 'menu'
+                        };
                         
 //                        groupConfig.menu.on("afterrender", function(menu) {
 //                            Ext.fly(menu.getEl()).select("img.x-menu-item-icon").remove();
@@ -711,4 +712,4 @@ Ext.ns("Cronk.grid.components");
         }
     });
     
-})();
\ No newline at end of file
+})();





More information about the icinga-checkins mailing list