From c2e97df2f1e1819bb6d8213c381868a85c323e0f Mon Sep 17 00:00:00 2001 From: phamt Date: Tue, 3 Aug 2010 14:16:24 +0000 Subject: [PATCH] Changed drop down menu to radio buttons. git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@6955 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-UI/js/monitor/monitor.js | 42 ++++++++++++++----------------- xCAT-UI/js/provision/provision.js | 39 +++++++++++++--------------- 2 files changed, 36 insertions(+), 45 deletions(-) diff --git a/xCAT-UI/js/monitor/monitor.js b/xCAT-UI/js/monitor/monitor.js index f3a9488cf..6da02b0c8 100644 --- a/xCAT-UI/js/monitor/monitor.js +++ b/xCAT-UI/js/monitor/monitor.js @@ -64,42 +64,38 @@ function loadMonitorPage() { tab.add('monitorTab', 'Monitor', monitorForm); /** - * Resources + * Monitor resources */ var resrcForm = $('
'); // Create info bar - var resrcInfoBar = createInfoBar('Select a platform to view its resources'); + var resrcInfoBar = createInfoBar('Monitor resources'); resrcForm.append(resrcInfoBar); - // Create drop-down menu - // Hardware available to provision - ipmi, blade, hmc, ivm, fsp, and zvm - var div = $('
'); - var label = $('Select the hardware:'); - var hw = $(''); - var ipmi = $(''); - var blade = $(''); - var hmc = $(''); - var ivm = $(''); - var fsp = $(''); - var zvm = $(''); - hw.append(ipmi); - hw.append(blade); - hw.append(hmc); - hw.append(ivm); - hw.append(fsp); - hw.append(zvm); - div.append(label); - div.append(hw); - resrcForm.append(div); + // Create radio buttons for platforms + var hwList =$('
    Select a platform to view its resources:
'); + var ipmi = $('
  • ipmi
  • '); + var blade = $('
  • blade
  • '); + var hmc = $('
  • hmc
  • '); + var ivm = $('
  • ivm
  • '); + var fsp = $('
  • fsp
  • '); + var zvm = $('
  • zvm
  • '); + hwList.append(ipmi); + hwList.append(blade); + hwList.append(hmc); + hwList.append(ivm); + hwList.append(fsp); + hwList.append(zvm); + resrcForm.append(hwList); + /** * Ok */ var okBtn = createButton('Ok'); okBtn.bind('click', function(event) { // Get hardware that was selected - var hw = $(this).parent().find('select').val(); + var hw = $(this).parent().find('input[name="hw"]:checked').val(); // Generate new tab ID var newTabId = hw + 'ResourceTab'; diff --git a/xCAT-UI/js/provision/provision.js b/xCAT-UI/js/provision/provision.js index 2b18e8aaf..918f9c040 100644 --- a/xCAT-UI/js/provision/provision.js +++ b/xCAT-UI/js/provision/provision.js @@ -55,27 +55,22 @@ function loadProvisionPage() { tab.init(); $('#content').append(tab.object()); - // Create drop down menu for platforms - var div = $('
    '); - provForm.append(div); + // Create radio buttons for platforms + var hwList =$('
      Select a platform to provision:
    '); + var ipmi = $('
  • ipmi
  • '); + var blade = $('
  • blade
  • '); + var hmc = $('
  • hmc
  • '); + var ivm = $('
  • ivm
  • '); + var fsp = $('
  • fsp
  • '); + var zvm = $('
  • zvm
  • '); - var label = $('Select a platform to provision:'); - var hw = $(''); - var ipmi = $(''); - var blade = $(''); - var hmc = $(''); - var ivm = $(''); - var fsp = $(''); - var zvm = $(''); - - hw.append(ipmi); - hw.append(blade); - hw.append(hmc); - hw.append(ivm); - hw.append(fsp); - hw.append(zvm); - div.append(label); - div.append(hw); + hwList.append(ipmi); + hwList.append(blade); + hwList.append(hmc); + hwList.append(ivm); + hwList.append(fsp); + hwList.append(zvm); + provForm.append(hwList); /** * Ok @@ -83,8 +78,8 @@ function loadProvisionPage() { var okBtn = createButton('Ok'); okBtn.bind('click', function(event) { // Get hardware that was selected - var hw = $(this).parent().find('select').val(); - + var hw = $(this).parent().find('input[name="hw"]:checked').val(); + // Generate new tab ID var instance = 0; var newTabId = hw + 'ProvisionTab' + instance;