You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by ma...@apache.org on 2009/02/16 11:04:57 UTC

svn commit: r744872 - in /myfaces/trinidad/trunk/trinidad-impl/src/main/javascript/META-INF/adf/jsLibs: Core.js xhr/RequestQueue.js

Author: matzew
Date: Mon Feb 16 10:04:55 2009
New Revision: 744872

URL: http://svn.apache.org/viewvc?rev=744872&view=rev
Log:
TRINIDAD-1395 - Trinidad does not work with T-Online Browser

Modified:
    myfaces/trinidad/trunk/trinidad-impl/src/main/javascript/META-INF/adf/jsLibs/Core.js
    myfaces/trinidad/trunk/trinidad-impl/src/main/javascript/META-INF/adf/jsLibs/xhr/RequestQueue.js

Modified: myfaces/trinidad/trunk/trinidad-impl/src/main/javascript/META-INF/adf/jsLibs/Core.js
URL: http://svn.apache.org/viewvc/myfaces/trinidad/trunk/trinidad-impl/src/main/javascript/META-INF/adf/jsLibs/Core.js?rev=744872&r1=744871&r2=744872&view=diff
==============================================================================
--- myfaces/trinidad/trunk/trinidad-impl/src/main/javascript/META-INF/adf/jsLibs/Core.js (original)
+++ myfaces/trinidad/trunk/trinidad-impl/src/main/javascript/META-INF/adf/jsLibs/Core.js Mon Feb 16 10:04:55 2009
@@ -1895,8 +1895,8 @@
         }
       }
       // IE BUG, see TRINIDAD-704
-      if(_agent.isIE && window.external)
-        window.external.AutoCompleteSaveForm(form);
+      if(_agent.isIE)
+        _autoCompleteForm(form);
 
       try
       {
@@ -1948,6 +1948,20 @@
 }
 
 /**
+ * Internet Explorer has a bug, that the autocomplete does not work when
+ * using JavaScript to submit a form.
+ */
+function _autoCompleteForm(form)
+{
+  var theExternal = window.external;
+
+  if (theExternal && (typeof theExternal.AutoCompleteSaveForm != "undefined"))
+  {
+    theExternal.AutoCompleteSaveForm(form);
+  }
+}
+
+/**
  * This function is called when enter key is hit on any form input element.
  * @src if non-null, the ID of the object to fire
  */

Modified: myfaces/trinidad/trunk/trinidad-impl/src/main/javascript/META-INF/adf/jsLibs/xhr/RequestQueue.js
URL: http://svn.apache.org/viewvc/myfaces/trinidad/trunk/trinidad-impl/src/main/javascript/META-INF/adf/jsLibs/xhr/RequestQueue.js?rev=744872&r1=744871&r2=744872&view=diff
==============================================================================
--- myfaces/trinidad/trunk/trinidad-impl/src/main/javascript/META-INF/adf/jsLibs/xhr/RequestQueue.js (original)
+++ myfaces/trinidad/trunk/trinidad-impl/src/main/javascript/META-INF/adf/jsLibs/xhr/RequestQueue.js Mon Feb 16 10:04:55 2009
@@ -145,14 +145,28 @@
     var content = this._getPostbackContent(actionForm, params);
 
     // IE BUG, see TRINIDAD-704
-    if(_agent.isIE && window.external)
-      window.external.AutoCompleteSaveForm(actionForm);
+    if(_agent.isIE)
+      this._autoCompleteForm(actionForm);
 
     this.sendRequest(context, method, actionForm.action, content, headerParams);
   }
 }
 
 /**
+ * Internet Explorer has a bug, that the autocomplete does not work when
+ * using JavaScript to submit a form.
+ */
+TrRequestQueue.prototype._autoCompleteForm = function(form)
+{
+  var theExternal = window.external;
+
+  if (theExternal && (typeof theExternal.AutoCompleteSaveForm != "undefined"))
+  {
+    theExternal.AutoCompleteSaveForm(form);
+  }
+}
+
+/**
  * Returns true if the form has a "file" input that contains
  * anything to upload.
  */
@@ -481,8 +495,8 @@
     this._iframeLoadCallback = TrUIUtils.createCallback(this, this._handleIFrameLoad);
 
   // IE BUG, see TRINIDAD-704
-  if(_agent.isIE && window.external)
-    window.external.AutoCompleteSaveForm(htmlForm);
+  if(_agent.isIE)
+    this._autoCompleteForm(htmlForm);
 
   try
   {