Updated Branches:
  refs/heads/master 713418c0a -> bfbf634c0

CS-16573: cloudstack UI - user page - listView - encode data passed to API call.


Project: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/commit/bfbf634c
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/tree/bfbf634c
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/diff/bfbf634c

Branch: refs/heads/master
Commit: bfbf634c0fd4fc2eadcaf15f39cec63f588fe7c4
Parents: 713418c
Author: Jessica Wang <[email protected]>
Authored: Mon Oct 29 17:03:15 2012 -0700
Committer: Jessica Wang <[email protected]>
Committed: Wed Oct 31 15:14:52 2012 -0700

----------------------------------------------------------------------
 ui/scripts/accounts.js |   25 ++++++++++---------------
 1 files changed, 10 insertions(+), 15 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/bfbf634c/ui/scripts/accounts.js
----------------------------------------------------------------------
diff --git a/ui/scripts/accounts.js b/ui/scripts/accounts.js
index a74389d..0ba3e3f 100644
--- a/ui/scripts/accounts.js
+++ b/ui/scripts/accounts.js
@@ -787,24 +787,19 @@
             firstname: { label: 'label.first.name' },
             lastname: { label: 'label.last.name' }
           },
-          dataProvider: function(args) {
-            var array1 = [];
-            if(args.filterBy != null) {
-              if(args.filterBy.search != null && args.filterBy.search.by != 
null && args.filterBy.search.value != null) {
-                switch(args.filterBy.search.by) {
-                case "name":
-                  if(args.filterBy.search.value.length > 0)
-                    array1.push("&keyword=" + args.filterBy.search.value);
-                  break;
-                }
-              }
-            }
-
+          dataProvider: function(args) {    
             var accountObj = args.context.accounts[0];
+                                               
                                                if(isAdmin() || 
isDomainAdmin()) {
+                                                 var data = {
+                                                         domainid: 
accountObj.domainid,
+                                                               account: 
accountObj.name                                                                
+                                                       };
+                                                       
listViewDataProvider(args, data);               
+                                                       
                                                        $.ajax({
-                                                               url: 
createURL("listUsers&domainid=" + accountObj.domainid + "&account=" + 
todb(accountObj.name) + "&page=" + args.page + "&pagesize=" + pageSize + 
array1.join("")),
-                                                               dataType: 
"json",
+                                                               url: 
createURL('listUsers'),
+                                                               data: data,
                                                                success: 
function(json) {
                                                                        
args.response.success({
                                                                                
actionFilter: userActionfilter,

Reply via email to