rave-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mpie...@apache.org
Subject svn commit: r1132804 - in /incubator/rave/trunk/rave-portal/src/main/webapp: WEB-INF/views/home.jsp script/rave.js
Date Mon, 06 Jun 2011 22:19:38 GMT
Author: mpierce
Date: Mon Jun  6 22:19:37 2011
New Revision: 1132804

URL: http://svn.apache.org/viewvc?rev=1132804&view=rev
Log:
Fixing the delete bug [Rave-41] introduced by my earlier code reorganization.  Gadgets could
not be deleted after dragging them into a new column (regionId becomes out of synch). This
was fixed by commit #1130207, broken by commit #1132706, (re)fixed here.


Modified:
    incubator/rave/trunk/rave-portal/src/main/webapp/WEB-INF/views/home.jsp
    incubator/rave/trunk/rave-portal/src/main/webapp/script/rave.js

Modified: incubator/rave/trunk/rave-portal/src/main/webapp/WEB-INF/views/home.jsp
URL: http://svn.apache.org/viewvc/incubator/rave/trunk/rave-portal/src/main/webapp/WEB-INF/views/home.jsp?rev=1132804&r1=1132803&r2=1132804&view=diff
==============================================================================
--- incubator/rave/trunk/rave-portal/src/main/webapp/WEB-INF/views/home.jsp (original)
+++ incubator/rave/trunk/rave-portal/src/main/webapp/WEB-INF/views/home.jsp Mon Jun  6 22:19:37
2011
@@ -90,6 +90,7 @@
 					 primary: "ui-icon-close"
 					 }
 					 });
+					 rave.mapGadgetToRegion("${regionWidget.id}", "${region.id}");
 				  </script>
 
 				</span>

Modified: incubator/rave/trunk/rave-portal/src/main/webapp/script/rave.js
URL: http://svn.apache.org/viewvc/incubator/rave/trunk/rave-portal/src/main/webapp/script/rave.js?rev=1132804&r1=1132803&r2=1132804&view=diff
==============================================================================
--- incubator/rave/trunk/rave-portal/src/main/webapp/script/rave.js (original)
+++ incubator/rave/trunk/rave-portal/src/main/webapp/script/rave.js Mon Jun  6 22:19:37 2011
@@ -116,20 +116,16 @@ var rave = rave || (function() {
 				console.log("RegionWidgetId, RegionId, and PageId:"+args.myRegionWidgetId+" "+args.myRegionId+"
"+args.myPageId);
 		  };
 		  function deleteAction(button,args) {
-				alert("Delete:"+button.id+" not yet implemented.");
-				
-				/* TODO: Disabling for now. The underlying assumptions will probably be revised for 0.2
 				rave.api.rpc.removeWidget({
 					 regionWidgetId: args.myRegionWidgetId, 
 					 pageId : args.myPageId,
 					 region: {
-						  id : args.myRegionId
+						  id : rave.getGadgetRegion(args.myRegionWidgetId)
 					 },
 					 succCB: function() {
 						  $("#widget-wrapper-"+args.myRegionWidgetId).remove();
 					 }
 				});
-				*/
 
 		  };
 		  return {
@@ -211,6 +207,7 @@ var rave = rave || (function() {
       * @param widgetId: id of the widget. (not DOM id)
       */
 	 function getGadgetRegion(widgetId) {
+		  console.log("Gadget id and region id: "+widgetId+" "+widgetRegionMap[widgetId])
          return widgetRegionMap[widgetId];
      }
 



Mime
View raw message