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

Yu Xin Huo huoyuxin at linux.vnet.ibm.com
Wed Aug 20 09:11:32 UTC 2014


When error occurs, the button is still "Creating" and disabled, we 
should change it back to "Create" and enable it for user to continue to 
operate.


On 8/19/2014 1: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>
> ---
>   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.")",

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ovirt.org/pipermail/kimchi-devel/attachments/20140820/902020cb/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: hhjfgaci.png
Type: image/png
Size: 157416 bytes
Desc: not available
URL: <http://lists.ovirt.org/pipermail/kimchi-devel/attachments/20140820/902020cb/attachment.png>


More information about the Kimchi-devel mailing list