portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tay...@apache.org
Subject svn commit: r912054 - in /portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp: WEB-INF/jetui/yui/jetui.jsp javascript/jetspeed/jetui/jetui-portal.js jetui/css/portal.css jetui/engine/portal.js
Date Sat, 20 Feb 2010 01:13:29 GMT
Author: taylor
Date: Sat Feb 20 01:13:28 2010
New Revision: 912054

URL: http://svn.apache.org/viewvc?rev=912054&view=rev
Log:
tweaking resize feature to work with different decorators and margin settings

Modified:
    portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/jetui/yui/jetui.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/css/portal.css
    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.jsp
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/jetui/yui/jetui.jsp?rev=912054&r1=912053&r2=912054&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/jetui/yui/jetui.jsp
(original)
+++ portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/jetui/yui/jetui.jsp
Sat Feb 20 01:13:28 2010
@@ -103,7 +103,8 @@
 	dragHandleStyle: "<%=pc.getString(PortalConfigurationConstants.JETUI_STYLE_DRAG_HANDLE)%>",
 	portalContextPath: "<%=portalContextPath%>",
 	portalServletPath: "<%=portalServletPath%>",
-	portalPagePath: "<%=portalPagePath%>"
+	portalPagePath: "<%=portalPagePath%>",
+	margins: [7, 4, 0]	
 };
 var JETUI_YUI = {
   base: "<%=request.getContextPath()%>/javascript/yui/build/",

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=912054&r1=912053&r2=912054&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
Sat Feb 20 01:13:28 2010
@@ -146,6 +146,11 @@
         activeWindow : null,
         
         /**
+         * Margins (resizeHandler, PContent left margin, PContent top margin
+         */
+        margins: [7, 4, 0],
+        
+        /**
          * Construction logic executed during instantiation.
          *
          * @method initializer
@@ -156,6 +161,7 @@
                 this.portalContextPath = cfg.portalContextPath;
                 this.portalServletPath = cfg.portalServletPath;
                 this.portalPagePath = cfg.portalPagePath;
+                this.margins = cfg.margins;
             }
         },
         
@@ -823,7 +829,8 @@
 			    	return;
 			    }
 	 		});
-	    	var mt = (mtt*2) + 7; // 7 is approx the diameter of the handle image
+        	var portal = JETUI_YUI.getPortalInstance();
+	 		var mt = (mtt*2) + portal.margins[0]; // TODO: use array index constants
 	    	return mt;
         },
         

Modified: portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/jetui/css/portal.css
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/jetui/css/portal.css?rev=912054&r1=912053&r2=912054&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/jetui/css/portal.css
(original)
+++ portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/jetui/css/portal.css
Sat Feb 20 01:13:28 2010
@@ -15,12 +15,12 @@
     border: 1px dotted black;
 }
 .jstbToggle1 {
-    background:transparent url("/jetspeed/jetui/css/layout_sprite.png") no-repeat -20px -120px;
+    background:transparent url("layout_sprite.png") no-repeat -20px -120px;
 	height: 14px;
     width: 18px;
 }
 .jstbToggle2 {
-    background:transparent url("/jetspeed/jetui/css/layout_sprite.png") no-repeat -20px -140px;
+    background:transparent url("layout_sprite.png") no-repeat -20px -140px;
 	height: 14px;
     width: 18px;    
 }
@@ -37,7 +37,7 @@
    cursor: move;
 }
 .resizeHandle {
-    background:transparent url("/jetspeed/jetui/css/layout_sprite.png") no-repeat -20px -60px;
+    background:transparent url("layout_sprite.png") no-repeat -20px -60px;
 	height:14px;
     width: 14px;
     cursor: move;    

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=912054&r1=912053&r2=912054&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
Sat Feb 20 01:13:28 2010
@@ -243,8 +243,8 @@
 		    	box.setStyle('height', height);
 	    	}	    	
 	    	if (!Y.Lang.isNull(content)) {
-		    	content.setStyle('width', (drag.mouseXY[0] - left - 4) + "px"); // TODO: calculate
padding, border (4)
-		    	content.setStyle('height', height );
+		    	content.setStyle('width', (drag.mouseXY[0] - left - portal.margins[1]) + "px"); 
+		    	content.setStyle('height', (drag.mouseXY[1] - top - portal.margins[2]) + "px");
 	    	}	    	
 	    	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