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

git at icinga.org git at icinga.org
Thu Apr 4 11:52:51 CEST 2013


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

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 a95778b..1c1ccac 100755
--- a/app/modules/Cronks/lib/js/Cronk/grid/MetaGridPanel.js
+++ b/app/modules/Cronks/lib/js/Cronk/grid/MetaGridPanel.js
@@ -168,6 +168,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