1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-01-11 05:17:41 +03:00

bug #4227: Fix template instantiate when image size is 0

This commit is contained in:
Daniel Molina 2016-01-13 17:45:04 +01:00
parent 346c1cdce9
commit c85877424e
2 changed files with 7 additions and 5 deletions

View File

@ -154,10 +154,12 @@ define(function(require){
$(".diskContainer", context).each(function(){
if ($(this).data("template_disk")) {
disk = $(this).data("template_disk");
original_size = $(this).data("original_size");
size = $("#SIZE", this).val();
if (size) {
disk['SIZE'] = Math.ceil(size * 1024);
if ($("#SIZE", this).is(':enabled')) {
size = $("#SIZE", this).val();
if (size) {
disk['SIZE'] = Math.ceil(size * 1024);
}
}
}

View File

@ -58,7 +58,7 @@ define(function(require) {
}
});
if (opts.startValue) {
if (opts.startValue != undefined) {
slider.foundation('slider', 'set_value', opts.startValue);
input.val(opts.startValue);
}