[Kimchi-devel] [PATCH] Remove button "Cancel" from modal dialog
Hongliang Wang
hlwang at linux.vnet.ibm.com
Thu May 15 03:12:13 UTC 2014
On 05/15/2014 04:40 AM, Crístian Viana wrote:
> Only one of the modal dialogs in Kimchi has a "Cancel" button along with
> the form submit button. That button layout is inconsistent with the rest of
> the application and it provides the same functionality as the "X" button
> present at the top of every dialog.
>
> Remove the button "Cancel" from the dialog "Edit template".
Good point to keep consistent! And be aware of that the confirmation
dialog still has "Cancel" Button with "X" button at the right top
corner. For that case, seems putting "OK" and "Cancel" Buttons at the
same line is a good choice. I'll send a patch for confirmation dialog to
remove "X" button.
>
> Signed-off-by: Crístian Viana <vianac at linux.vnet.ibm.com>
Reviewed-by: Hongliang Wang <hlwang at linux.vnet.ibm.com>
> ---
> ui/js/src/kimchi.template_edit_main.js | 4 ----
> ui/pages/template-edit.html.tmpl | 1 -
> 2 files changed, 5 deletions(-)
>
> diff --git a/ui/js/src/kimchi.template_edit_main.js b/ui/js/src/kimchi.template_edit_main.js
> index f0f4718..9ff8bcc 100644
> --- a/ui/js/src/kimchi.template_edit_main.js
> +++ b/ui/js/src/kimchi.template_edit_main.js
> @@ -104,10 +104,6 @@ kimchi.template_edit_main = function() {
> });
> });
>
> - $('#tmpl-edit-button-cancel').on('click', function() {
> - kimchi.window.close();
> - });
> -
> $('#template-edit-storagePool').change(function() {
> storagepool = $(this).val();
> var storageArray = storagepool.split("/");
> diff --git a/ui/pages/template-edit.html.tmpl b/ui/pages/template-edit.html.tmpl
> index 434d938..8a4f0e4 100644
> --- a/ui/pages/template-edit.html.tmpl
> +++ b/ui/pages/template-edit.html.tmpl
> @@ -141,7 +141,6 @@
> </div>
> <footer>
> <div class="btn-group">
> - <a id="tmpl-edit-button-cancel" class="btn-normal" href="javascript:void(0);"><span class="text">$_("Cancel")</span></a>
> <a id="tmpl-edit-button-save" class="btn-normal" href="javascript:void(0);"><span class="text">$_("Save")</span></a>
> </div>
> </footer>
More information about the Kimchi-devel
mailing list