소스 검색

Moe feature: [hook]

Vijayakrishnan 3 년 전
부모
커밋
25ea908c43
2개의 변경된 파일11개의 추가작업 그리고 0개의 파일을 삭제
  1. 0 0
      public/js/yemi.js
  2. 11 0
      yemi.js

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 0 - 0
public/js/yemi.js


+ 11 - 0
yemi.js

@@ -321,6 +321,7 @@ var initMoes = function() {
         var redir = $(form).attr('redir'); // OPTIONAL
         var target = $(form).attr('target'); // OPTIONAL
         var noreload = $(form).is('[noreload]'); // OPTIONAL
+        var hook = $(form).attr('hook'); // OPTIONAL
         var submit = moe.find('[submit]'); // REQUIRED
         var cancel = moe.find('[cancel]')[0]; // OPTIONAL
 
@@ -507,6 +508,11 @@ var initMoes = function() {
                         }
                         if (justLog) { // this is to test!
                             console.log('RETURNED', data);
+                        } else if (hook) {
+                            $(cancel).trigger('click.moe');
+                            hideMoeFormMask();
+                            hideMask();
+                            runMCHook(hook);
                         } else if(isDynamicStagPopupPresent()) {
                             refreshDynamicStagPopup();
                         } else if (redir) {
@@ -548,6 +554,11 @@ var initMoes = function() {
                         }
                         if (justLog) { // this is to test!
                             console.log('RETURNED', data);
+                        } else if (hook) {
+                            $(cancel).trigger('click.moe');
+                            hideMoeFormMask();
+                            hideMask();
+                            runMCHook(hook);
                         } else if(isDynamicStagPopupPresent()) {
                             refreshDynamicStagPopup();
                         } else if (redir) {

이 변경점에서 너무 많은 파일들이 변경되어 몇몇 파일들은 표시되지 않았습니다.