[icinga-checkins] icinga.org: icinga-web/jmosshammer/test: * Fixed disabled-icon not being displayed in user/role manager, fixed user paging in "add user to role" dialog

git at icinga.org git at icinga.org
Tue Apr 17 10:27:35 CEST 2012


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

Author: Jannis Mosshammer <jannis.mosshammer at netways.de>
Date:   Fri Apr 13 10:00:42 2012 +0200

* Fixed disabled-icon not being displayed in user/role manager, fixed user paging in "add user to role" dialog

---

 app/modules/AppKit/lib/js/admin/RoleManager.js     |    2 +-
 app/modules/AppKit/lib/js/admin/UserManager.js     |    2 +-
 .../lib/js/admin/components/UserSelectionGrid.js   |   13 ++++++++++---
 3 files changed, 12 insertions(+), 5 deletions(-)

diff --git a/app/modules/AppKit/lib/js/admin/RoleManager.js b/app/modules/AppKit/lib/js/admin/RoleManager.js
index b77e8dc..3c0c3ff 100644
--- a/app/modules/AppKit/lib/js/admin/RoleManager.js
+++ b/app/modules/AppKit/lib/js/admin/RoleManager.js
@@ -27,7 +27,7 @@ AppKit.Admin.RoleManager = Ext.extend(Ext.Container, {
                 'description',
                 {name: 'active', type:'boolean'},
                 {name: 'disabled_icon',type:'boolean' , mapping:'active', convert: function(v) {
-                    return '<div style="width:16px;height:16px;margin-left:25px" class="'+(v===0? 'icinga-icon-cancel' : 'icinga-icon-accept')+'"></div>';
+                    return '<div style="width:16px;height:16px;margin-left:25px" class="'+(v == 0 ? 'icinga-icon-cancel' : 'icinga-icon-accept')+'"></div>';
                 }},
                 {name: 'created'},
                 {name: 'modified'},
diff --git a/app/modules/AppKit/lib/js/admin/UserManager.js b/app/modules/AppKit/lib/js/admin/UserManager.js
index a418f63..2359e6c 100644
--- a/app/modules/AppKit/lib/js/admin/UserManager.js
+++ b/app/modules/AppKit/lib/js/admin/UserManager.js
@@ -41,7 +41,7 @@ Ext.ns("AppKit.Admin");
                     name: 'disabled_icon',
                     mapping: 'disabled',
                     convert: function (v) {
-                        return '<div style="width:16px;height:16px;margin-left:25px" class="' + (v === 1 ? 'icinga-icon-cancel' : 'icinga-icon-accept') + '"></div>';
+                        return '<div style="width:16px;height:16px;margin-left:25px" class="' + (v == 1 ? 'icinga-icon-cancel' : 'icinga-icon-accept') + '"></div>';
                     }
                 }, {
                     name: 'created'
diff --git a/app/modules/AppKit/lib/js/admin/components/UserSelectionGrid.js b/app/modules/AppKit/lib/js/admin/components/UserSelectionGrid.js
index d2ed85a..a4f7203 100644
--- a/app/modules/AppKit/lib/js/admin/components/UserSelectionGrid.js
+++ b/app/modules/AppKit/lib/js/admin/components/UserSelectionGrid.js
@@ -24,7 +24,7 @@ Ext.ns("AppKit.Admin.Components");
                 displayInfo: true,
                 pageSize: 25,
                 displayMsg: _('Displaying users') + ' {0} - {1} ' + _('of') + ' {2}',
-                emptyMsg: _('No roles to display')
+                emptyMsg: _('No user to display')
             });
         },
 
@@ -77,7 +77,13 @@ Ext.ns("AppKit.Admin.Components");
         showUserSelectionDialog: function () {
             var groupsStore = new Ext.data.JsonStore({
                 url: this.userProviderURI,
+                baseParams: {
+                    start: 0,
+                    limit: 25
+                },
+                totalProperty: 'totalCount',
                 proxy: new Ext.data.HttpProxy({
+                    
                     api: {
                         read: {
                             method: 'GET',
@@ -100,9 +106,9 @@ Ext.ns("AppKit.Admin.Components");
                     name: 'active'
                 }, {
                     name: 'disabled_icon',
-                    mapping: 'active',
+                    mapping: 'disabled',
                     convert: function (v) {
-                        return '<div style="width:16px;height:16px;margin-left:25px" class="' + (v === 1 ? 'icinga-icon-cancel' : 'icinga-icon-accept') + '"></div>';
+                        return '<div style="width:16px;height:16px;margin-left:25px" class="' + (v == 1 ? 'icinga-icon-cancel' : 'icinga-icon-accept') + '"></div>';
                     }
                 }]
             });
@@ -116,6 +122,7 @@ Ext.ns("AppKit.Admin.Components");
                     emptyMsg: _('No users to display')
                 }),
                 store: groupsStore,
+
                 viewConfig: {
                     forceFit: true
                 },





More information about the icinga-checkins mailing list