
From: Wen Wang <wenwang@linux.vnet.ibm.com> This patch fix the bug that value of "Disk(GB)" input box is changing with the item of "Storage Pool" in "Templates" --> "Actions" --> "Edit" -->"Edit Templates" dialogue. This might be comfusing to user when changing the "Storage Pool", "Disk(GB)" is changed with it without even notice. This might confuse the users and is not necessary. Solved by removing the change. Signed-off-by: Wen Wang <wenwang@linux.vnet.ibm.com> --- ui/js/src/kimchi.template_edit_main.js | 25 ------------------------- 1 files changed, 0 insertions(+), 25 deletions(-) diff --git a/ui/js/src/kimchi.template_edit_main.js b/ui/js/src/kimchi.template_edit_main.js index cb43091..61d23b4 100644 --- a/ui/js/src/kimchi.template_edit_main.js +++ b/ui/js/src/kimchi.template_edit_main.js @@ -117,31 +117,6 @@ kimchi.template_edit_main = function() { }); }); - $('#template-edit-storagePool').change(function() { - storagepool = $(this).val(); - var storageArray = storagepool.split("/"); - if (storageArray.length > 3) { - volumeName = storageArray.pop(); - poolName = storageArray.pop(); - kimchi.getStoragePoolVolume(poolName, volumeName, function(result) { - $('input[name="disks"]', templateEditForm).val(result.capacity / Math.pow(1024,3)); - $('input[name="disks"]', templateEditForm).attr('disabled','disabled'); - return false; - }, function (err) { - kimchi.message.error(err.responseJSON.reason); - }); - } else { - if (origPool == storagepool) { - // Previous disk size value - $('input[name="disks"]', templateEditForm).val(origDisks[0].size); - } else { - // Default disk size value - $('input[name="disks"]', templateEditForm).val(10); - } - $('input[name="disks"]', templateEditForm).removeAttr('disabled'); - } - }); - $('#tmpl-edit-button-save').on('click', function() { var editableFields = [ 'name', 'cpus', 'memory', 'storagepool', 'disks', 'graphics']; var data = {}; -- 1.7.1