From 3a3400b844a073ac55ec403624860f0556fe3cbf Mon Sep 17 00:00:00 2001 From: Daniel Molina Date: Fri, 29 Aug 2014 17:12:57 +0200 Subject: [PATCH] feature #3162: Add azure and softlayer to the host creation form --- src/sunstone/public/js/plugins/hosts-tab.js | 170 ++++++++++++-------- 1 file changed, 103 insertions(+), 67 deletions(-) diff --git a/src/sunstone/public/js/plugins/hosts-tab.js b/src/sunstone/public/js/plugins/hosts-tab.js index 8bebd92041..698f923f4b 100644 --- a/src/sunstone/public/js/plugins/hosts-tab.js +++ b/src/sunstone/public/js/plugins/hosts-tab.js @@ -20,84 +20,107 @@ var HOST_HISTORY_LENGTH = 40; var create_host_tmpl = '
\ -
\ -

'+tr("Create Host")+'

\ -
\ +
\ +

'+tr("Create Host")+'

\
\ -
\ +
\ +
\
\
\ -
\ - \ - \ -
\ -
\ - \ -
\ -
\ +
\ + \ + \ +
\ +
\ + \ +
\
\ +
\
\ -
\ - '+tr("Drivers")+'\
\ -
\ -
\ -
\ - \ - \ -
\ -
\ - \ - \ -
\ +
\ + \ + \
\ -
\ -
\ - \ - \ + \ + \ + \ + \ + \ + \ \ - \ -
\ -
\ - \ - \ + \ +
\ +
\ + \ + \ +
\
\
\ +
\ +
\ +
\ + '+tr("Drivers")+'\ +
\ +
\ +
\ +
\ + \ + \ +
\ +
\ + \ + \ +
\ +
\ +
\ +
\ +
\ +
\ + \ + \ +
\ +
\ + \ + \ +
\ +
\ +
\
\ -
\ -
\ -
\ - \ - \ -
\ -
\ - \ - \ -
\ -
\ -
\ -
\ -
\ + \ +
\
\
\ \ @@ -908,6 +931,19 @@ function setupCreateHostDialog(){ $create_host_dialog.addClass("reveal-modal medium").attr("data-reveal", ""); $create_host_dialog.foundation() + $(".drivers", $create_host_dialog).hide(); + + $("#host_type_mad", $create_host_dialog).on("change", function(){ + $("#vmm_mad", $create_host_dialog).val(this.value).change(); + $("#im_mad", $create_host_dialog).val(this.value).change(); + + if (this.value == "custom") { + $(".drivers", $create_host_dialog).show(); + } else { + $(".drivers", $create_host_dialog).hide(); + } + }) + // Show custom driver input only when custom is selected in selects $('input[name="custom_vmm_mad"],'+ 'input[name="custom_im_mad"],'+