You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by we...@apache.org on 2011/09/27 09:49:09 UTC
svn commit: r1176253 -
/myfaces/core/branches/2.0.x/api/src/main/javascript/META-INF/resources/myfaces/_impl/_util/_Dom.js
Author: werpu
Date: Tue Sep 27 07:49:08 2011
New Revision: 1176253
URL: http://svn.apache.org/viewvc?rev=1176253&view=rev
Log:
https://issues.apache.org/jira/browse/MYFACES-3321
fixes a jsf.js double import issue
Modified:
myfaces/core/branches/2.0.x/api/src/main/javascript/META-INF/resources/myfaces/_impl/_util/_Dom.js
Modified: myfaces/core/branches/2.0.x/api/src/main/javascript/META-INF/resources/myfaces/_impl/_util/_Dom.js
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2.0.x/api/src/main/javascript/META-INF/resources/myfaces/_impl/_util/_Dom.js?rev=1176253&r1=1176252&r2=1176253&view=diff
==============================================================================
--- myfaces/core/branches/2.0.x/api/src/main/javascript/META-INF/resources/myfaces/_impl/_util/_Dom.js (original)
+++ myfaces/core/branches/2.0.x/api/src/main/javascript/META-INF/resources/myfaces/_impl/_util/_Dom.js Tue Sep 27 07:49:08 2011
@@ -117,7 +117,7 @@ myfaces._impl.core._Runtime.singletonExt
//we have to move this into an inner if because chrome otherwise chokes
//due to changing the and order instead of relying on left to right
if ((src.indexOf("ln=scripts") == -1 && src.indexOf("ln=javax.faces") == -1) || (src.indexOf("/jsf.js") == -1
- && src.indexOf("/jsf-uncompressed.js") == -1))
+ && src.indexOf("/jsf-uncompressed.js") == -1)) {
if (finalScripts.length) {
//script source means we have to eval the existing
//scripts before running the include
@@ -125,7 +125,11 @@ myfaces._impl.core._Runtime.singletonExt
finalScripts = [];
}
- this._RT.loadScriptEval(src, item.getAttribute('type'), false, "UTF-8", false);
+ //if jsf.js is already registered we do not replace it anymore
+ if(!window.jsf) {
+ this._RT.loadScriptEval(src, item.getAttribute('type'), false, "UTF-8", false);
+ }
+ }
//TODO handle embedded scripts
} else {
// embedded script auto eval