portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From woon...@apache.org
Subject svn commit: r773845 - /portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/javascript/jetspeed/desktop/core.src.js
Date Tue, 12 May 2009 10:58:25 GMT
Author: woonsan
Date: Tue May 12 10:58:24 2009
New Revision: 773845

URL: http://svn.apache.org/viewvc?rev=773845&view=rev
Log:
JS2-1003: Fixing a bug in javascript array index usage and optimizing not to create element
when there's no head contribution.
However, no progress in fixing this issue.

Modified:
    portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/javascript/jetspeed/desktop/core.src.js

Modified: portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/javascript/jetspeed/desktop/core.src.js
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/javascript/jetspeed/desktop/core.src.js?rev=773845&r1=773844&r2=773845&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/javascript/jetspeed/desktop/core.src.js
(original)
+++ portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/javascript/jetspeed/desktop/core.src.js
Tue May 12 10:58:24 2009
@@ -600,7 +600,7 @@
                         var found = false;
                         for (var j = 0; j < headTagElemsByMergeHintArray.length; j++)
                         {
-                            var existingLine = headTagElemsByMergeHintArray.textContent;
+                            var existingLine = headTagElemsByMergeHintArray[j].textContent;
                             if (existingLine && existingLine.indexOf(lines[i]) >=
0)
                             {
                                 found = true;
@@ -4141,7 +4141,11 @@
             offset += "</JS_PORTLET_HEAD_ELEMENTS>".length;
             headElementsContent = portletContent.substring( 0, offset );
             portletContent = portletContent.substring( offset );
-            jetspeed.contributeHeadElements( dojo.dom.createDocumentFromText( headElementsContent
).documentElement );
+            var reEmpty = /^<JS_PORTLET_HEAD_ELEMENTS>\s*<\/JS_PORTLET_HEAD_ELEMENTS>$/;
+            if (!reEmpty.test(headElementsContent))
+            {
+                jetspeed.contributeHeadElements( dojo.dom.createDocumentFromText( headElementsContent
).documentElement );
+            }
         }
         var portletTitle = null;
         if ( http != null )



---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org


Mime
View raw message