[icinga-checkins] icinga.org: icinga-web/master: * Applied UI Guidelines on categoryeditor ( refs #1558)

git at icinga.org git at icinga.org
Thu Feb 23 13:47:36 CET 2012


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

Author: Jannis Mosshammer <jannis.mosshammer at netways.de>
Date:   Thu Feb 23 13:47:00 2012 +0100

* Applied UI Guidelines on categoryeditor (refs #1558)

---

 .../Cronks/lib/js/Cronks/CronkListingPanel.js      |   65 +++++++++----------
 1 files changed, 31 insertions(+), 34 deletions(-)

diff --git a/app/modules/Cronks/lib/js/Cronks/CronkListingPanel.js b/app/modules/Cronks/lib/js/Cronks/CronkListingPanel.js
index 3388272..d469dac 100644
--- a/app/modules/Cronks/lib/js/Cronks/CronkListingPanel.js
+++ b/app/modules/Cronks/lib/js/Cronks/CronkListingPanel.js
@@ -15,8 +15,7 @@ Ext.ns('Icinga.Cronks.System');
         title: _('Add new category'),
         iconCls: 'icinga-icon-category',
         modal: true,
-
-        bbar: ['->'],
+       
 
         constructor: function (config) {
 
@@ -30,20 +29,22 @@ Ext.ns('Icinga.Cronks.System');
         initComponent: function () {
             Icinga.Cronks.System.CategoryEditorForm.superclass.initComponent.call(this);
 
-            this.getBottomToolbar().add({
-                iconCls: 'icinga-action-icon-cancel',
-                text: _('Cancel'),
-                handler: function (b, e) {
-                    this.close();
-                },
-                scope: this
-            }, {
+            this.addButton({
                 iconCls: 'icinga-action-icon-ok',
                 text: _('OK'),
                 handler: function (b, e) {
                     this.doSubmit();
                 },
                 scope: this
+            })
+
+            this.addButton({
+                iconCls: 'icinga-action-icon-cancel',
+                text: _('Cancel'),
+                handler: function (b, e) {
+                    this.close();
+                },
+                scope: this
             });
 
             this.form = this.add({
@@ -184,7 +185,23 @@ Ext.ns('Icinga.Cronks.System');
                 selModel: new Ext.grid.RowSelectionModel({
                     singleSelect: true
                 }),
-
+                buttons: [{
+                    text: _('OK'),
+                    iconCls: 'icinga-icon-accept',
+                    handler: function (b, e) {
+                        this.grid.store.save();
+                        this.hide();
+                    },
+                    scope: this
+                },{
+                    text: _('Cancel'),
+                    iconCls: 'icinga-action-icon-cancel',
+                    handler: function (b, e) {
+                        this.grid.store.rejectChanges();
+                        this.hide();
+                    },
+                    scope: this
+                }],
                 store: new Ext.data.JsonStore({
                     url: AppKit.c.path + '/modules/cronks/provider/categories',
                     writer: writer,
@@ -247,25 +264,14 @@ Ext.ns('Icinga.Cronks.System');
                     forceFit: true
                 },
 
-                bbar: ['->',
-                {
-                    text: _('Cancel'),
-                    iconCls: 'icinga-action-icon-cancel',
-                    handler: function (b, e) {
-                        this.grid.store.rejectChanges();
-                        this.hide();
-                    },
-                    scope: this
-                }, '-',
-                {
+                tbar: [{
                     text: _('Reload'),
-                    iconCls: 'icinga-icon-database-refresh',
+                    iconCls: 'icinga-icon-arrow-refresh',
                     handler: function (b, e) {
                         this.grid.getStore().reload();
                     },
                     scope: this
-                }, '-',
-                {
+                }, '-', {
                     text: _('Add'),
                     iconCls: 'icinga-icon-add',
                     handler: function (b, e) {
@@ -313,15 +319,6 @@ Ext.ns('Icinga.Cronks.System');
                         this.grid.store.remove(record);
                     },
                     scope: this
-                }, '-',
-                {
-                    text: _('OK'),
-                    iconCls: 'icinga-icon-accept',
-                    handler: function (b, e) {
-                        this.grid.store.save();
-                        this.hide();
-                    },
-                    scope: this
                 }]
             }))();
 





More information about the icinga-checkins mailing list