[icinga-checkins] icinga.org: icinga-web/next: Servicemenu column totally disappearing after last column was moved to grid

git at icinga.org git at icinga.org
Tue Apr 2 16:22:03 CEST 2013


Module: icinga-web
Branch: next
Commit: 914b8447e7b173053dabfc8df7c82f9e80faf2e6
URL:    https://git.icinga.org/?p=icinga-web.git;a=commit;h=914b8447e7b173053dabfc8df7c82f9e80faf2e6

Author: Marius Hein <marius.hein at netways.de>
Date:   Tue Apr  2 16:21:12 2013 +0200

Servicemenu column totally disappearing after last column was moved to grid

Fix purging of action grid preferences. Create purge button in settings menu.
Bug already fixed by JM in RowActionPanel.js (Adds reset context menu
if no sub menu items left) - Thanks for that.

fixes #3432

---

 .../Cronks/lib/js/Cronk/grid/MetaGridPanel.js      |    9 +++++++++
 .../js/Cronk/grid/components/JsonActionPanel.js    |    2 +-
 .../lib/js/Cronk/grid/plugins/RowActionPanel.js    |   12 ++++++++++--
 pub/styles/icinga-icons.css                        |    2 +-
 4 files changed, 21 insertions(+), 4 deletions(-)

diff --git a/app/modules/Cronks/lib/js/Cronk/grid/MetaGridPanel.js b/app/modules/Cronks/lib/js/Cronk/grid/MetaGridPanel.js
index 4a2383b..a6eed39 100644
--- a/app/modules/Cronks/lib/js/Cronk/grid/MetaGridPanel.js
+++ b/app/modules/Cronks/lib/js/Cronk/grid/MetaGridPanel.js
@@ -597,6 +597,15 @@ Ext.ns("Cronk.grid");
                                 });
                             },
                             scope: this
+                        }, {
+                            // Fixes #3432
+                            text: _('Reset grid action icons'),
+                            iconCls: 'icinga-icon-bin',
+                            scope: this,
+                            handler: function(button, event) {
+                                var actionPanel = this.rowActionPanel.getPanel();
+                                actionPanel.removeAllOverrides();
+                            }
                         }]
                     }
                 }],
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 5cd8a47..f801d929 100644
--- a/app/modules/Cronks/lib/js/Cronk/grid/components/JsonActionPanel.js
+++ b/app/modules/Cronks/lib/js/Cronk/grid/components/JsonActionPanel.js
@@ -320,7 +320,7 @@ Ext.ns("Cronk.grid.components");
                     },
                     scope: this
                 }, {
-                    text: _("Reset this grid"),
+                    text: _("Reset grid action icons"),
                     iconCls: "icinga-icon-bin",
                     handler: function(button, event) {
                         this.removeAllOverrides(this.getGridIdentifier());
diff --git a/app/modules/Cronks/lib/js/Cronk/grid/plugins/RowActionPanel.js b/app/modules/Cronks/lib/js/Cronk/grid/plugins/RowActionPanel.js
index a08c3e4..f66dbeb 100644
--- a/app/modules/Cronks/lib/js/Cronk/grid/plugins/RowActionPanel.js
+++ b/app/modules/Cronks/lib/js/Cronk/grid/plugins/RowActionPanel.js
@@ -239,10 +239,10 @@ Ext.ns("Cronk.grid.plugins");
                     if (this.panel.hasSubItems() === true) {
                         cm.addColumn(subEventColumn, idx++);
                     } else {
+                        // This fixes #3432
                         cm.addColumn(subEventColumn, idx++);
                         subEventColumn.on("click",function(el,grid,idx,ev) {
                             var menu = this.panel.createContextMenu();
-                            AppKit.log(menu);
                             menu.items.removeAt(0);
                             menu.show(ev.target);
                             ev.preventDefault();
@@ -463,7 +463,15 @@ Ext.ns("Cronk.grid.plugins");
             var id=Ext.id(null, "action-component-");
             this.elementCache[rowIndex] = id;
             rowParams.body = String.format('<div id="{0}"></div>', id);
-        }   
+        },
+
+        /**
+         * Getter for realizing action panel
+         * @returns {JsonActionPanel}
+         */
+        getPanel: function() {
+            return this.panel;
+        }
     });
     
 })();
\ No newline at end of file
diff --git a/pub/styles/icinga-icons.css b/pub/styles/icinga-icons.css
index 9124c83..4dd56ca 100644
--- a/pub/styles/icinga-icons.css
+++ b/pub/styles/icinga-icons.css
@@ -61,7 +61,7 @@
 .icinga-action-events { background-image: url(../images/icons/external.png) !important; background-repeat: no-repeat; }
 
 /*
- *	Default iconset
+ * Default iconset
  */
 .icinga-icon-accept { background-image: url(../images/icons/tick-circle-frame.png) !important; background-repeat: no-repeat; }
 .icinga-icon-cancel { background-image: url(../images/icons/cross-circle-frame.png) !important; background-repeat: no-repeat; }





More information about the icinga-checkins mailing list