[Kimchi-devel] [PATCH] Bugfix UI: Change button text to indicate user network is generating

Hongliang Wang hlwang at linux.vnet.ibm.com
Wed Aug 20 02:32:54 UTC 2014


On 08/19/2014 01:42 PM, Wen Wang wrote:
> From: Wen Wang <wenwang at linux.vnet.ibm.com>
>
> When network is generating, if the network is not up, we bring the
> network up first, then we create the network. During the time we bring
> the network up(less than 10s), we change the text as well as the layout
> of the button to indicate this process is working.
>
> Signed-off-by: Wen Wang <wenwang at linux.vnet.ibm.com>
Reviewed-by: Hongliang Wang <hlwang at linux.vnet.ibm.com>
> ---
>   ui/js/src/kimchi.network.js |    3 +++
>   ui/pages/i18n.json.tmpl     |    1 +
>   2 files changed, 4 insertions(+), 0 deletions(-)
>
> diff --git a/ui/js/src/kimchi.network.js b/ui/js/src/kimchi.network.js
> index c8f983f..cee5864 100644
> --- a/ui/js/src/kimchi.network.js
> +++ b/ui/js/src/kimchi.network.js
> @@ -270,6 +270,8 @@ kimchi.openNetworkDialog = function(okCallback) {
>           title : i18n.KCHNET6003M
>       });
>       $("#networkFormOk").on("click", function() {
> +        $("#networkFormOk").button("disable");
> +        $("#networkFormOk span").text(i18n.KCHAPI6008M);
>           okCallback();
>       });
>       $("#enableVlan").on("click", function() {
> @@ -337,6 +339,7 @@ kimchi.cleanNetworkDialog = function() {
>       $("#networkDestinationLabel").text($("#networkDestinationID li:first-child").text());
>       $("#networkFormOk").off("click");
>       $("#networkFormOk").button("disable");
> +    $("#networkFormOk span").text(i18n.KCHAPI6005M);
>       $("#networkVlanID").toggle(false);
>       $("#labelNetworkVlanID").toggle(false);
>       $("#enableVlan").prop("checked", false);
> diff --git a/ui/pages/i18n.json.tmpl b/ui/pages/i18n.json.tmpl
> index ccfb081..cbcd077 100644
> --- a/ui/pages/i18n.json.tmpl
> +++ b/ui/pages/i18n.json.tmpl
> @@ -49,6 +49,7 @@
>       "KCHAPI6005M": "$_("Create")",
>       "KCHAPI6006M": "$_("Warning")",
>       "KCHAPI6007M": "$_("Save")",
> +    "KCHAPI6008M": "$_("Creating...")",
>
>       "KCHGRD6001M": "$_("Loading...")",
>       "KCHGRD6002M": "$_("An error occurs while checking for packages update.")",




More information about the Kimchi-devel mailing list