portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tay...@apache.org
Subject svn commit: r889984 - in /portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp: WEB-INF/jetui/yui/jetui.jsp jetui/engine/portal.js
Date Sat, 12 Dec 2009 21:35:59 GMT
Author: taylor
Date: Sat Dec 12 21:35:59 2009
New Revision: 889984

URL: http://svn.apache.org/viewvc?rev=889984&view=rev
Log:
https://issues.apache.org/jira/browse/JS2-1084
bug in move from /ui pipeline, moves not persisting

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/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=889984&r1=889983&r2=889984&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 Dec 12 21:35:59 2009
@@ -139,7 +139,8 @@
 		request.setAttribute("coordinate", columnLayout.getCoordinate(maximized));
 %>
 <div id="column_id_0>" 
-     class="portal-layout-column" 
+     class="portal-layout-column"
+	 locked='<%=maximized.isLocked() %>'> 
      style="float:left; width:100%; background-color: #ffffff;">
 <jsp:include page="jetui-portlet.jsp"/>
 </div>  
@@ -156,6 +157,7 @@
 %>
 <div id="column_id_<%=index%>" 
      class="portal-layout-column" column='<%=index%>'
+	 locked='false' 
      style="float:<%=columnFloat%>; min-height: 100px; width:<%=columnWidth%>;">
 
 <%      

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=889984&r1=889983&r2=889984&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 Dec 12 21:35:59 2009
@@ -134,7 +134,7 @@
 	var draggablePortlets = Y.Node.all(config.portletStyle);    
     draggablePortlets.each(function(v, k) {
         var portlet = new Y.JetUI.Portlet();
-    	Y.log("portlet = " + v.getAttribute("name") + v.getAttribute("id") + "locked = " + v.getAttribute("locked"));
+    	//Y.log("portlet = " + v.getAttribute("name") + v.getAttribute("id") + "locked = " +
v.getAttribute("locked"));
         portlet.set("name", v.getAttribute("name"));
         portlet.set("id", v.getAttribute("id"));
         portlet.set("toolbar", Boolean(v.getAttribute("locked").toLowerCase() === 'true'));
@@ -142,7 +142,6 @@
         portlet.set("column", v.getAttribute("column"));
         portlet.set("row", v.getAttribute("row"));
         v.data = portlet;
-        Y.log("toolbar = " + portlet.get("toolbar"));
         var dragGroups = ['portlets'];
         var dragMode = 'intersect';
         var dropGroups  = ['portlets', 'toolbars'];
@@ -169,7 +168,7 @@
     
     var dropLayouts = Y.Node.all(config.layoutStyle); 
     dropLayouts.each(function(v, k) {
-    	Y.log("layout = " + v.getAttribute("name") + v.getAttribute("id"));
+    	//Y.log("layout = " + v.getAttribute("name") + v.getAttribute("id"));
         var layout = new Y.JetUI.Layout();
         layout.set("name", v.getAttribute("name"));
         layout.set("id", v.getAttribute("id"));
@@ -180,7 +179,7 @@
         layout.set("column", v.getAttribute("column"));        
         layout.set("row", 0);
         v.data = layout;
-        layout.info();
+        //layout.info();
         if (v.get('children').size() == 0)
         {
 	    	var drop = new Y.DD.Drop({
@@ -216,10 +215,13 @@
     
     var onClickRemove = function(e) {
     	var uri = document.location.href;
-    	uri = uri.replace("/portal", "/ajaxapi");
+    	if (uri.indexOf("/portal") > -1)    	
+    		uri = uri.replace("/portal", "/ajaxapi");
+    	else
+    		uri = uri.replace("/ui", "/ajaxapi");
     	var windowId =  e.currentTarget.getAttribute('id');
     	windowId = windowId.replace("jetspeed-close-", "");
-    	var uri = uri + "?action=remove&id=" + windowId;
+    	var uri = uri + "?action=remove&id=" + windowId;    	
         Y.on('io:complete', onRemoveComplete, this, [windowId]); 
         var request = Y.io(uri); 
     };
@@ -268,11 +270,10 @@
     var onMoveComplete = function(id, o, args) { 
     	var id = id; // Transaction ID. 
     	var data = o.responseText; // Response data.
-    	Y.log("move result = " + data);
+    	//Y.log("move result = " + data);
     	var dataIn = Y.DataType.XML.parse(data),
     		schema = {  resultListLocator: "status", resultFields: [{key:"status"}] },
     		dataOut = Y.DataSchema.XML.apply(schema, dataIn);
-		Y.log("data = " + dataOut)                
     	var widgetId = args[0];
     };     
     
@@ -302,7 +303,10 @@
     var persistMove = function(drag) {
         if (drag.data.get("toolbar") == false) {
         	var uri = document.location.href;
-        	uri = uri.replace("/portal", "/ajaxapi");
+        	if (uri.indexOf("/portal") > -1)
+        		uri = uri.replace("/portal", "/ajaxapi");
+        	else
+        		uri = uri.replace("/ui", "/ajaxapi");
         	var windowId =  drag.getAttribute('id');
         	var oldColumn = drag.data.get('column');
         	var oldRow = drag.data.get('row');        	
@@ -355,7 +359,6 @@
         //  drag.get('node').setStyle('border', '1px dotted #black');        
         portal.lastX = drag.mouseXY[0];
         portal.lastY = drag.mouseXY[1];
-        //Y.log("starting drag " + portal.lastX +  " , " + portal.lastY);
     });
 
     Y.DD.DDM.on('drag:over', function(e) {



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