[icinga-checkins] icinga.org: icinga-web/next: Fix order/ direction being both usable for order direction

git at icinga.org git at icinga.org
Thu Mar 21 17:08:10 CET 2013


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

Author: Jannis Mosshammer <jannis.mosshammer at netways.de>
Date:   Thu Mar 21 17:06:53 2013 +0100

Fix order/direction being both usable for order direction

We must decide on a valid value, but to allow old templates to be used
without changes, direction is now used when order is not able.

fixes #3886

---

 .../Cronks/lib/js/Cronk/grid/MetaGridPanel.js      |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/app/modules/Cronks/lib/js/Cronk/grid/MetaGridPanel.js b/app/modules/Cronks/lib/js/Cronk/grid/MetaGridPanel.js
index 5075498..a005293 100644
--- a/app/modules/Cronks/lib/js/Cronk/grid/MetaGridPanel.js
+++ b/app/modules/Cronks/lib/js/Cronk/grid/MetaGridPanel.js
@@ -169,6 +169,7 @@ Ext.ns("Cronk.grid");
             
             this.fieldIterator(function (fieldName, field) {
                 if (field.order['default'] === true) {
+                    field.order.order = field.order.order || field.order.direction;
                     storeConfig.sortInfo = {
                         direction: (field.order.order ? field.order.order.toUpperCase() : 'ASC'),
                         field: fieldName





More information about the icinga-checkins mailing list