[Kimchi-devel] [PATCH ][Wok]Ginger Issue #376:Unable to edit the text field or click submit/cancel after press ESC or click outside the error message dialog of Add User.

atreyee at linux.vnet.ibm.com atreyee at linux.vnet.ibm.com
Wed Aug 3 11:56:30 UTC 2016


From: Atreyee Mukhopadhyay <atreyee at linux.vnet.ibm.com>

ESC button click/blur handler was not available for wok.confirm.
---
 ui/js/src/wok.confirm.js | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/ui/js/src/wok.confirm.js b/ui/js/src/wok.confirm.js
index fde76bf..9b2fdaf 100644
--- a/ui/js/src/wok.confirm.js
+++ b/ui/js/src/wok.confirm.js
@@ -32,8 +32,10 @@
  *            the callback function of click the confirm button.
  * @param cancelCallback
  *            The callback function of click the cancel and X button.
+ * @param closeCallback
+ *            The callback function of click the Esc button and blur.
  */
-wok.confirm = function(settings, confirmCallback, cancelCallback) {
+wok.confirm = function(settings, confirmCallback, cancelCallback, closeCallback) {
     "use strict";
     var modalStr = '<div id="wok-confirm-modal" class="modal fade host-modal" tabindex="-1" role="dialog" aria-labelledby="confirmModalLabel" aria-hidden="true"></div>';
     if ($('#wok-confirm-modal ').size() < 1 && $('#modalWindow').size() < 1 ) {
@@ -86,6 +88,9 @@ wok.confirm = function(settings, confirmCallback, cancelCallback) {
         "use strict";
         $('#wok-confirm-modal').removeData('bs.modal');
         $('#wok-confirm-modal').remove();
+        if (closeCallback) {
+            closeCallback();
+        }
     };
 
-};
\ No newline at end of file
+};
-- 
2.1.0




More information about the Kimchi-devel mailing list