the node name may contain special char(such as '.','#'),so we can not use the node name as an id.

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@6852 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
xq2005 2010-07-26 07:25:27 +00:00
parent 6065a1fed2
commit 8273bc95a0
3 changed files with 12 additions and 5 deletions

View File

@ -29,7 +29,7 @@ hmcPlugin.prototype.loadInventory = function(data) {
var inv = data.rsp;
// Remove loader
var loaderId = node + 'TabLoader';
var loaderId = tabId + 'TabLoader';
$('#' + loaderId).remove();
// Create division to hold inventory

View File

@ -290,7 +290,7 @@ zvmPlugin.prototype.loadInventory = function(data) {
var inv = data.rsp[0].split(node + ':');
// Remove loader
var loaderId = node + 'TabLoader';
var loaderId = tabId + 'TabLoader';
$('#' + loaderId).remove();
// Create status bar

View File

@ -634,14 +634,20 @@ function loadNode(e) {
}
// Get tab area where a new tab will be inserted
// the node name may contain special char(such as '.','#'), so we can not use the node name as a id.
var myTab = getNodesTab();
var newTabId = node + 'Tab';
var inst = 0;
var newTabId = 'NodeTab' + inst;
while ($('#' + newTabId).length) {
// If one already exists, generate another one
inst = inst + 1;
newTabId = 'NodeTab' + inst;
}
// Reset node process
$.cookie(node + 'Processes', 0);
// Add new tab, only if one does not exist
var loader = createLoader(node + 'TabLoader');
var loader = createLoader(newTabId + 'TabLoader');
loader = $('<center></center>').append(loader);
myTab.add(newTabId, node, loader);
@ -661,6 +667,7 @@ function loadNode(e) {
});
// Select new tab
// tabid may contains special char, so we had to use the index
myTab.select(newTabId);
}