portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tay...@apache.org
Subject svn commit: r929319 - in /portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp: WEB-INF/jetui/yui/jetui-portlet.jsp javascript/jetspeed/jetui/jetui-portal.js jetui/engine/portal.js
Date Tue, 30 Mar 2010 22:18:23 GMT
Author: taylor
Date: Tue Mar 30 22:18:22 2010
New Revision: 929319

URL: http://svn.apache.org/viewvc?rev=929319&view=rev
Log:
https://issues.apache.org/jira/browse/JS2-1112
- bug fixes for 2.2.1 release
- make sure css and images are properly cached
- general code cleanup
- autoscrollable divs in detached portlets
- ensure all operations (resize) are secured

Modified:
    portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/jetui/yui/jetui-portlet.jsp
    portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/javascript/jetspeed/jetui/jetui-portal.js
    portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/jetui/engine/portal.js

Modified: portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/jetui/yui/jetui-portlet.jsp
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/jetui/yui/jetui-portlet.jsp?rev=929319&r1=929318&r2=929319&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/jetui/yui/jetui-portlet.jsp
(original)
+++ portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/jetui/yui/jetui-portlet.jsp
Tue Mar 30 22:18:22 2010
@@ -86,7 +86,7 @@ if (request.getUserPrincipal() != null &
                 </div>
               </div>
                <div class="PContentBorder">
-<% if (request.getUserPrincipal() != null && detached != null) 
+<% if (detached != null) 
 {
 	PortletWindow win = rc.getPortletWindow(fragment.getId());
 	if (win.getWindowState().equals(WindowState.MINIMIZED))

Modified: portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/javascript/jetspeed/jetui/jetui-portal.js
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/javascript/jetspeed/jetui/jetui-portal.js?rev=929319&r1=929318&r2=929319&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/javascript/jetspeed/jetui/jetui-portal.js
(original)
+++ portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/javascript/jetspeed/jetui/jetui-portal.js
Tue Mar 30 22:18:22 2010
@@ -295,7 +295,6 @@ YUI.add('jetui-portal', function(Y) {
             var i = 0;
             while (i < Y.DD.DDM.targets.length) {
                 if (Y.DD.DDM.targets[i] == e.drop) {
-                	Y.log("found it!");
                     Y.DD.DDM.targets.splice(i, 1);
                     break;
                 }
@@ -863,7 +862,6 @@ YUI.add('jetui-portal', function(Y) {
             	return; // clicking on active window, do nothing
             }
         	active.setStyle('zIndex', portal.calculateNextZIndex());
-        	Y.log("current target = " + active);
             var title = active.one(".portlet .PTitle");
             if (!Y.Lang.isNull(title)) {
             	//var unselect = title.getComputedStyle('background'); // this deadended for
me, was not working

Modified: portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/jetui/engine/portal.js
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/jetui/engine/portal.js?rev=929319&r1=929318&r2=929319&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/jetui/engine/portal.js
(original)
+++ portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/jetui/engine/portal.js
Tue Mar 30 22:18:22 2010
@@ -68,6 +68,7 @@ YUI(JETUI_YUI).use('jetui-portal', 'cons
 	        groups: ['toolbars']        
 	    });
     }
+    var first = null, firstDetached = null;
 	var draggablePortlets = Y.Node.all(config.portletStyle);    
     draggablePortlets.each(function(v, k) {
     	if (v.getAttribute("id") != "jsPortletTemplate")
@@ -81,6 +82,9 @@ YUI(JETUI_YUI).use('jetui-portal', 'cons
 		        dragMode = 'point';
 		        dropGroups = [];
 		        portal.addResizeHandle(v, false);
+		        if (firstDetached == null) {
+		        	first = firstDetached = v;
+		        }
 	        }
 	        if (portlet.get("tool") == false)
 	        {
@@ -96,12 +100,16 @@ YUI(JETUI_YUI).use('jetui-portal', 'cons
 		            node: v,
 		            groups: dropGroups            
 		        });
+		    	if (first == null)
+		    		first = v;
 	        }	        
 	        v.on('click', onClickPortlet);		        
 	        // portlet.info();
     	}
     });
     
+    portal.activateWindow(first);
+    
     var dropLayouts = Y.Node.all(config.layoutStyle); 
     dropLayouts.each(function(v, k) {
         var layout = Y.JetUI.Layout.attach(v);
@@ -228,7 +236,6 @@ YUI(JETUI_YUI).use('jetui-portal', 'cons
         	srcNode.get('children').setStyle('visibility', 'hidden');
             srcNode.addClass('moving');        	
         }
-        //  drag.get('node').setStyle('border', '1px dotted #black');        
         portal.lastX = drag.mouseXY[0];
         portal.lastY = drag.mouseXY[1];
     });
@@ -244,20 +251,10 @@ YUI(JETUI_YUI).use('jetui-portal', 'cons
 	    	var top =  parseInt(dragWindow.getStyle('top'));
 	    	var width = (drag.mouseXY[0] - left) + "px";
 	    	var height = (drag.mouseXY[1] - top) + "px";
-//	    	dragWindow.setStyle('width', width);
-//	    	dragWindow.setStyle('height', height);
-	    	
-//	    	if (!Y.Lang.isNull(box)) {
-//		    	box.setStyle('width', width);
-//		    	box.setStyle('height', height);
-//	    	}	    	
 	    	if (!Y.Lang.isNull(content)) {
-//		    	content.setStyle('width', (drag.mouseXY[0] - left - portal.margins[1]) + "px");

-//		    	content.setStyle('height', (drag.mouseXY[1] - top - portal.margins[2]) + "px");
 		    	content.setStyle('width', width);
 		    	content.setStyle('height', height);
 	    	}	    	
-//	    	var region = dragParent.get('region');
         }
     });
     



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