[Kimchi-devel] [PATCH] Issue #473: Update selectMenu method to set a default value.
Rodrigo Trujillo
rodrigo.trujillo at linux.vnet.ibm.com
Tue Nov 11 19:44:42 UTC 2014
Reviewed-by: Rodrigo Trujillo <rodrigo.trujillo at linux.vnet.ibm.com>
Tested-by: Rodrigo Trujillo <rodrigo.trujillo at linux.vnet.ibm.com>
On 11/11/2014 03:47 PM, Paulo Vital wrote:
> On all pages with selectMenu (combobox) the user had to choose an
> option to effectively store its value in the form.
>
> This patch updates the function to use the first option as default
> value. With this patch, user can skip the combo selection if want
> use the first option.
>
> Signed-off-by: Paulo Vital <pvital at linux.vnet.ibm.com>
> ---
> ui/js/widgets/select-menu.js | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/ui/js/widgets/select-menu.js b/ui/js/widgets/select-menu.js
> index c4b0209..4a79605 100644
> --- a/ui/js/widgets/select-menu.js
> +++ b/ui/js/widgets/select-menu.js
> @@ -46,6 +46,7 @@
> if(option.value === value) {
> item.addClass(selectedClass);
> that.label.text(option.label);
> + that.target.val(option.value);
> }
> that.listControl.append(item);
> });
More information about the Kimchi-devel
mailing list