[PATCH] Bug 440 Fix

From: Yu Xin Huo <huoyuxin@linux.vnet.ibm.com> Signed-off-by: Yu Xin Huo <huoyuxin@linux.vnet.ibm.com> --- ui/js/widgets/select-menu.js | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ui/js/widgets/select-menu.js b/ui/js/widgets/select-menu.js index ad53200..c4b0209 100644 --- a/ui/js/widgets/select-menu.js +++ b/ui/js/widgets/select-menu.js @@ -36,8 +36,10 @@ var selectedClass = 'active'; var itemTag = 'li'; var item; + that.listControl.find('li').remove(); + that.label.text(""); + that.target.val(""); if (options.length > 0) { - that.listControl.find('li').remove(); $.each(options, function(index, option) { item = $('<' + itemTag + '>' + option.label +'</' + itemTag + '>'); item.data('value', option.value); @@ -58,8 +60,6 @@ that.target.change(); } }); - } else { - kimchi.message.error.code('KCHAPI6006E'); } }, -- 1.7.1

On 09/19/2014 08:01 AM, huoyuxin@linux.vnet.ibm.com wrote:
From: Yu Xin Huo <huoyuxin@linux.vnet.ibm.com>
Signed-off-by: Yu Xin Huo <huoyuxin@linux.vnet.ibm.com> --- ui/js/widgets/select-menu.js | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/ui/js/widgets/select-menu.js b/ui/js/widgets/select-menu.js index ad53200..c4b0209 100644 --- a/ui/js/widgets/select-menu.js +++ b/ui/js/widgets/select-menu.js @@ -36,8 +36,10 @@ var selectedClass = 'active'; var itemTag = 'li'; var item; + that.listControl.find('li').remove(); + that.label.text(""); + that.target.val(""); if (options.length > 0) { - that.listControl.find('li').remove(); $.each(options, function(index, option) { item = $('<' + itemTag + '>' + option.label +'</' + itemTag + '>'); item.data('value', option.value); @@ -58,8 +60,6 @@ that.target.change(); } }); - } else { - kimchi.message.error.code('KCHAPI6006E'); } },
It does not fix the bug - only prevent the message to be shown. The right behavior would be only list storage pools that have free volumes.
participants (2)
-
Aline Manera
-
huoyuxin@linux.vnet.ibm.com