[icinga-checkins] icinga.org: icinga-web/r1.8: Cronk/grid/filter/ApiComboBox: Enable paging with 20 items max

git at icinga.org git at icinga.org
Thu Nov 29 17:39:09 CET 2012


Module: icinga-web
Branch: r1.8
Commit: 0aa9f9eca5715dd67c323acff60dd8bbf7ae4c63
URL:    https://git.icinga.org/?p=icinga-web.git;a=commit;h=0aa9f9eca5715dd67c323acff60dd8bbf7ae4c63

Author: Eric Lippmann <eric.lippmann at netways.de>
Date:   Tue Nov 27 17:21:47 2012 +0100

Cronk/grid/filter/ApiComboBox: Enable paging with 20 items max

---

 .../Cronks/lib/js/Cronk/grid/filter/ApiComboBox.js |   13 +++++++++++--
 1 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/app/modules/Cronks/lib/js/Cronk/grid/filter/ApiComboBox.js b/app/modules/Cronks/lib/js/Cronk/grid/filter/ApiComboBox.js
index 3b98118..e846180 100644
--- a/app/modules/Cronks/lib/js/Cronk/grid/filter/ApiComboBox.js
+++ b/app/modules/Cronks/lib/js/Cronk/grid/filter/ApiComboBox.js
@@ -37,6 +37,9 @@ Ext.ns('Cronk.grid.filter');
         def_webpath: '/modules/web/api/json',
         def_sortorder: 'asc',
 
+        minListWidth: 240,
+        pageSize: 20,
+
         constructor: function (cfg, meta) {
 
             var kf = meta.api_keyfield; // ValueField
@@ -78,11 +81,17 @@ Ext.ns('Cronk.grid.filter');
 
                 root: 'result',
 
+                paramNames: {
+                    start : 'limit_start'
+                },
+
                 baseParams: {
                     target: meta.api_target,
                     order_col: (meta.api_order_col || meta.api_keyfield),
                     order_dir: (meta.api_order_dir || this.def_sortorder),
-                    columns: cols
+                    columns: cols,
+                    limit_start: 0,
+                    limit: 20
                 },
 
                 idProperty: (meta.api_id || meta.api_keyfield),
@@ -129,4 +138,4 @@ Ext.ns('Cronk.grid.filter');
         }
     });
 
-})();
\ No newline at end of file
+})();





More information about the icinga-checkins mailing list