[Kimchi-devel] [PATCH] Bug Fix: Correct select menu to handle empty input
Aline Manera
alinefm at linux.vnet.ibm.com
Tue Sep 23 14:43:24 UTC 2014
On 09/23/2014 07:48 AM, huoyuxin at linux.vnet.ibm.com wrote:
> From: Yu Xin Huo <huoyuxin at linux.vnet.ibm.com>
>
> Signed-off-by: Yu Xin Huo <huoyuxin at 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');
As this message will not be used we can remove it from i18n.tmpl.html
> }
> },
>
More information about the Kimchi-devel
mailing list