portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From smi...@apache.org
Subject svn commit: r584012 - /portals/jetspeed-2/branches/JETSPEED-2.1.3/applications/j2-admin/src/webapp/WEB-INF/view/selectors/category-portlet-selector.vm
Date Fri, 12 Oct 2007 00:49:29 GMT
Author: smilek
Date: Thu Oct 11 17:49:28 2007
New Revision: 584012

URL: http://svn.apache.org/viewvc?rev=584012&view=rev
Log:
fixed issues with ie6 (deletion of tbody elements in tables); fixed misuse of layoutid when
adding portlets

Modified:
    portals/jetspeed-2/branches/JETSPEED-2.1.3/applications/j2-admin/src/webapp/WEB-INF/view/selectors/category-portlet-selector.vm

Modified: portals/jetspeed-2/branches/JETSPEED-2.1.3/applications/j2-admin/src/webapp/WEB-INF/view/selectors/category-portlet-selector.vm
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/branches/JETSPEED-2.1.3/applications/j2-admin/src/webapp/WEB-INF/view/selectors/category-portlet-selector.vm?rev=584012&r1=584011&r2=584012&view=diff
==============================================================================
--- portals/jetspeed-2/branches/JETSPEED-2.1.3/applications/j2-admin/src/webapp/WEB-INF/view/selectors/category-portlet-selector.vm
(original)
+++ portals/jetspeed-2/branches/JETSPEED-2.1.3/applications/j2-admin/src/webapp/WEB-INF/view/selectors/category-portlet-selector.vm
Thu Oct 11 17:49:28 2007
@@ -82,7 +82,7 @@
    //dojo.widget.byId("AddPortletDialog").hide();   
    var portletDef = new jetspeed.selector.PortletDef( theNewPortlet );   
    var pagePath = jetspeed.url.removeAllQueryParameters( jetspeed.url.basePortalUrl() + jetspeed.url.path.AJAX_API
+ getReturnPagePath() );
-   jetspeed.selector.addNewPortletDefinition( portletDef, null, pagePath, getAddToLayoutId()
);
+   jetspeed.selector.addNewPortletDefinition( portletDef, pagePath, getAddToLayoutId() );
    selectorPortlets[pID].count = parseInt(selectorPortlets[pID].count) + 1;
    var cell = document.getElementById(theNewPortlet);
    if (cell != null)
@@ -122,24 +122,28 @@
              a.setAttribute("style", "font-weight:normal");
     }
 }
-function createPagination(Pagenumber,PageCount)
+function clearTable( tableNode )
 {
-    var pagtable1 = document.getElementById('pagtable1');   
-    while (pagtable1.hasChildNodes())
-    {
-      pagtable1.removeChild(pagtable1.lastChild);
-    }
-    var pagtable3 = document.getElementById('pagtable3');   
-    while (pagtable3.hasChildNodes())
+    if ( ! tableNode ) return;
+    while ( tableNode.hasChildNodes() )
     {
-      pagtable3.removeChild(pagtable3.lastChild);
+        var lastChild = tableNode.lastChild;
+        var childNodeName = lastChild.nodeName;
+        if ( childNodeName && childNodeName.toLowerCase() == "tbody" )
+            break;
+        tableNode.removeChild( lastChild );
     }
-    
+}
+
+function createPagination(Pagenumber,PageCount)
+{
+    var pagtable1 = document.getElementById('pagtable1');   
+    var pagtable3 = document.getElementById('pagtable3');
     var pagtable = document.getElementById('pagtable2');   
-    while (pagtable.hasChildNodes())
-    {
-      pagtable.removeChild(pagtable.lastChild);
-    }    
+    clearTable( pagtable1 );
+    clearTable( pagtable3 );
+    clearTable( pagtable );
+
     var pgRoww = null;
     var pgCol=null;
     var a = null;    
@@ -236,10 +240,8 @@
   	//getting portlet table and deleting all items
   	//befor adding the new
   	var ptable = document.getElementById('ptable');
-  while (ptable.hasChildNodes())
-  {
-      ptable.removeChild(ptable.lastChild);
-  }
+    clearTable( ptable );
+
   	var outerRow = null;
   	var iz = 0;
   	var ri = 0;
@@ -352,7 +354,7 @@
 {
    var jsLayoutId = jetspeed.url.getQueryParameter( document.location.href, "jslayoutid"
);
    if ( jsLayoutId == null )
-		jsLayoutId = "$jslayoutid";
+		jsLayoutId = "$!jslayoutid";
    return jsLayoutId;
 }
 function getReturnURL()



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