CS-14339, CS-14241

In instance wizard, use configuration value for max. custom disk
offering size, instead of hardcoding the max size to 100 GB
This commit is contained in:
Brian Federle 2012-05-14 11:45:21 -07:00
parent 3046c38f59
commit 0bc65768b7
3 changed files with 9 additions and 2 deletions

View File

@ -197,7 +197,7 @@
<!-- Slider -->
<label class="size">1 GB</label>
<div class="slider custom-size"></div>
<label class="size">100 GB</label>
<label class="size max"><span></span> GB</label>
<input type="text" class="required digits" name="size" value="1" />
<label class="size">GB</label>

View File

@ -65,6 +65,9 @@
action: {
custom: cloudStack.instanceWizard({
maxDiskOfferingSize: function() {
return g_capabilities.customdiskofferingmaxsize;
},
steps: [
// Step 1: Setup
function(args) {

View File

@ -702,11 +702,15 @@
$futureSteps.removeClass('loaded');
});
var maxCustomDiskSize = args.maxDiskOfferingSize ?
args.maxDiskOfferingSize() : 100;
// Setup tabs and slider
$wizard.find('.section.custom-size .size.max span').html(maxCustomDiskSize);
$wizard.find('.tab-view').tabs();
$wizard.find('.slider').slider({
min: 1,
max: 100,
max: maxCustomDiskSize,
start: function(event) {
$wizard.find('div.data-disk-offering div.custom-size input[type=radio]').click();
},