portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From smi...@apache.org
Subject svn commit: r566684 - in /portals/jetspeed-2/branches/JETSPEED-2.1.3/src/webapp/javascript/jetspeed/desktop: core.js core.src.js
Date Thu, 16 Aug 2007 12:39:42 GMT
Author: smilek
Date: Thu Aug 16 05:39:41 2007
New Revision: 566684

URL: http://svn.apache.org/viewvc?view=rev&rev=566684
Log:
added 'Clear' button to title bar of 'Dojo Debug' window

Modified:
    portals/jetspeed-2/branches/JETSPEED-2.1.3/src/webapp/javascript/jetspeed/desktop/core.js
    portals/jetspeed-2/branches/JETSPEED-2.1.3/src/webapp/javascript/jetspeed/desktop/core.src.js

Modified: portals/jetspeed-2/branches/JETSPEED-2.1.3/src/webapp/javascript/jetspeed/desktop/core.js
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/branches/JETSPEED-2.1.3/src/webapp/javascript/jetspeed/desktop/core.js?view=diff&rev=566684&r1=566683&r2=566684
==============================================================================
--- portals/jetspeed-2/branches/JETSPEED-2.1.3/src/webapp/javascript/jetspeed/desktop/core.js
(original)
+++ portals/jetspeed-2/branches/JETSPEED-2.1.3/src/webapp/javascript/jetspeed/desktop/core.js
Thu Aug 16 05:39:41 2007
@@ -1270,7 +1270,7 @@
 _13a.properties[jetspeed.id.PORTLET_PROP_WINDOW_HEIGHT_TO_FIT]=_13e;
 if(_13d&&jetspeed.prefs.windowTiling){
 var _148=_13a.properties[jetspeed.id.PORTLET_PROP_COLUMN];
-if(_148==null||_148==""||_148<0||_148>=_135.length){
+if(_148==null||_148==""||_148<0){
 var _149=-1;
 for(var j=0;j<_135.length;j++){
 if(_149==-1||_138[j].length<_149){
@@ -1278,6 +1278,10 @@
 _148=j;
 }
 }
+}else{
+if(_148>=_135.length){
+_148=_135.length-1;
+}
 }
 _138[_148].push(_13a.id);
 var _14b=_136+new Number(_148);
@@ -3717,6 +3721,14 @@
 }
 _407.notifySuccess(_40a,_406.url,_408);
 this.initialized=true;
+var _40b=jetspeed.debugWindow();
+var _40c="javascript: void(document.getElementById('"+jetspeed.debug.debugContainerId+"').innerHTML='')";
+var _40d="";
+for(var i=0;i<20;i++){
+_40d+="&nbsp;";
+}
+var _40f=_40b.title+_40d+"<a href=\""+_40c+"\"><span style=\"font-size: xx-small;
font-weight: normal\">Clear</span></a>";
+_40b.titleBarText.innerHTML=_40f;
 }
 }};
 

Modified: portals/jetspeed-2/branches/JETSPEED-2.1.3/src/webapp/javascript/jetspeed/desktop/core.src.js
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/branches/JETSPEED-2.1.3/src/webapp/javascript/jetspeed/desktop/core.src.js?view=diff&rev=566684&r1=566683&r2=566684
==============================================================================
--- portals/jetspeed-2/branches/JETSPEED-2.1.3/src/webapp/javascript/jetspeed/desktop/core.src.js
(original)
+++ portals/jetspeed-2/branches/JETSPEED-2.1.3/src/webapp/javascript/jetspeed/desktop/core.src.js
Thu Aug 16 05:39:41 2007
@@ -1756,7 +1756,7 @@
                     if ( portletWindowPositionStatic && jetspeed.prefs.windowTiling
)
                     {
                         var portletColumnIndex = pFrag.properties[ jetspeed.id.PORTLET_PROP_COLUMN
];
-                        if ( portletColumnIndex == null || portletColumnIndex == "" || portletColumnIndex
< 0 || portletColumnIndex >= columnsInLayout.length )
+                        if ( portletColumnIndex == null || portletColumnIndex == "" || portletColumnIndex
< 0 )
                         {
                             var minPortlets = -1; 
                             for ( var j = 0 ; j < columnsInLayout.length ; j++ )
@@ -1768,6 +1768,11 @@
                                 }
                             }
                         }
+                        else if ( portletColumnIndex >= columnsInLayout.length )
+                        {
+                            portletColumnIndex = columnsInLayout.length -1;
+                        }
+                        
                         portletsByColumn[portletColumnIndex].push( pFrag.id );
                         var portletPageColumnIndex = pageColumnStartIndex + new Number( portletColumnIndex
);
                         portletPageColumnKey = portletPageColumnIndex.toString();
@@ -4892,13 +4897,18 @@
             if ( jetspeed.altDebugWindowContent )
                 content = jetspeed.altDebugWindowContent();
             else
-            {
                 content += '<div id="' + jetspeed.debug.debugContainerId + '"></div>';
-            }
             if ( ! contentListener )
                 contentListener = new jetspeed.om.BasicContentListener();
             contentListener.notifySuccess( content, bindArgs.url, domainModelObject ) ;
             this.initialized = true;
+            var window = jetspeed.debugWindow();
+            var clearJS = "javascript: void(document.getElementById('" + jetspeed.debug.debugContainerId
+ "').innerHTML='')";
+            var indent = "";
+            for ( var i = 0 ; i < 20 ; i++ )
+                indent += "&nbsp;";
+            var titleWithClearAnchor = window.title + indent + '<a href="' + clearJS +
'"><span style="font-size: xx-small; font-weight: normal">Clear</span></a>';
+            window.titleBarText.innerHTML = titleWithClearAnchor;
         }
     }
 };



---------------------------------------------------------------------
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