You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by lo...@apache.org on 2017/02/01 13:23:55 UTC

svn commit: r1781244 - /myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/META-INF/resources/tobago/standard/script/tobago.js

Author: lofwyr
Date: Wed Feb  1 13:23:55 2017
New Revision: 1781244

URL: http://svn.apache.org/viewvc?rev=1781244&view=rev
Log:
TOBAGO-1687: After a Download/Non Faces Response no AJAX is possible

Modified:
    myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/META-INF/resources/tobago/standard/script/tobago.js

Modified: myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/META-INF/resources/tobago/standard/script/tobago.js
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/META-INF/resources/tobago/standard/script/tobago.js?rev=1781244&r1=1781243&r2=1781244&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/META-INF/resources/tobago/standard/script/tobago.js (original)
+++ myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/META-INF/resources/tobago/standard/script/tobago.js Wed Feb  1 13:23:55 2017
@@ -318,6 +318,9 @@ var Tobago = {
           try {
             // console.debug("submit form with action: " + Tobago.action.value);
             form.get(0).submit();
+            // reset the source field after submit, to be prepared for possible next AJAX with transition=false
+            $sourceHidden.prop("disabled", true);
+            $sourceHidden.val();
             if (Tobago.browser.isMsie) {
               // without this "redundant" code the animation will not be animated in IE (tested with 6,7,8,9,10,11)
               var image = jQuery(".tobago-page-overlayCenter img");
@@ -330,7 +333,11 @@ var Tobago = {
           }
         }
         if (options.target) {
-          form.attr("target", oldTarget);
+          if (oldTarget) {
+            form.attr("target", oldTarget);
+          } else {
+            form.removeAttr("target");
+          }
         }
         if (options.target || !transition || !onSubmitResult) {
           this.isSubmit = false;