From e39d942d9ca1b62223251a89d12938d26ee8911d Mon Sep 17 00:00:00 2001 From: phamt Date: Fri, 3 May 2013 15:02:06 +0000 Subject: [PATCH] Fixed issue in user table so it parses the policy table correctly. Changed the order of the refresh button in the self-service cnfigure page. git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@16176 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-UI/js/configure/users.js | 27 ++++++++++++++++++--------- xCAT-UI/js/custom/zvmUtils.js | 2 +- 2 files changed, 19 insertions(+), 10 deletions(-) diff --git a/xCAT-UI/js/configure/users.js b/xCAT-UI/js/configure/users.js index d534f8dba..dba4dfa2c 100644 --- a/xCAT-UI/js/configure/users.js +++ b/xCAT-UI/js/configure/users.js @@ -84,26 +84,35 @@ function loadUserTable(data){ // Add table rows // Start with the 2nd row (1st row is the headers) for (var i = 1; i < data.rsp.length; i++) { - // Trim returned data - data.rsp[i] = jQuery.trim(data.rsp[i]); - // Split data into columns - var cols = data.rsp[i].split(','); - + // Split into columns + var cols = data.rsp[i].split(','); + // Go through each column - // Column names are: priority, name, host, commands, noderange, parameters, time, rule, comments, disable for (var j = 0; j < cols.length; j++) { + + // If the column is not complete + if (cols[j].count('"') == 1) { + while (cols[j].count('"') != 2) { + // Merge this column with the adjacent one + cols[j] = cols[j] + "," + cols[j + 1]; + + // Remove merged row + cols.splice(j + 1, 1); + } + } + // Replace quote - cols[j] = cols[j].replace(/"/g, ''); + cols[j] = cols[j].replace(new RegExp('"', 'g'), ''); } // Set the highest priority priority = cols[0]; if (priority > topPriority) topPriority = priority; - + // Add check box where name = user name cols.unshift(''); - + // Add row table.add(cols); } diff --git a/xCAT-UI/js/custom/zvmUtils.js b/xCAT-UI/js/custom/zvmUtils.js index ef173a40e..464fe0213 100644 --- a/xCAT-UI/js/custom/zvmUtils.js +++ b/xCAT-UI/js/custom/zvmUtils.js @@ -5898,7 +5898,7 @@ function configProfilePanel(panelId) { }); // Create an action menu - var actionsMenu = createMenu([createLnk, editLnk, deleteLnk, refreshLnk]); + var actionsMenu = createMenu([refreshLnk, createLnk, editLnk, deleteLnk]); actionsMenu.superfish(); actionsMenu.css('display', 'inline-block'); actionBar.append(actionsMenu);