瀏覽代碼

Yemi - Add support for "onbeforesubmit" callback

Vijayakrishnan 4 年之前
父節點
當前提交
ecac795f33
共有 1 個文件被更改,包括 5 次插入0 次删除
  1. 5 0
      public/js/yemi.js

+ 5 - 0
public/js/yemi.js

@@ -389,6 +389,11 @@ var initMoes = function() {
                     return;
                 }
 
+                // check and trigger onbeforesubmit
+                if($(form).is('[onbeforesubmit]')) {
+                    window[$(form).attr('onbeforesubmit')].call($(realForm)[0]);
+                }
+
                 // submit
                 moe.isProcessing = true;
                 var data = {};