[Kimchi-devel] [PATCH] Remove button "Cancel" from modal dialog

Crístian Viana vianac at linux.vnet.ibm.com
Wed May 14 20:40:32 UTC 2014


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".

Signed-off-by: Crístian Viana <vianac 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>
-- 
1.9.0




More information about the Kimchi-devel mailing list