rave-commits mailing list archives

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

URL: http://svn.apache.org/viewvc?rev=1132763&view=rev
Log:
Disabling deletion for now.  Will revisit in 0.2.  Need to revise assumptions on widget identification
in the page.


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
    incubator/rave/trunk/rave-portal/src/main/webapp/script/rave_api.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=1132763&r1=1132762&r2=1132763&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 20:51:13
2011
@@ -68,10 +68,11 @@
 				<span id="widget-${regionWidget.id}-toolbar" style="float:right;">
 				  <button id="widget-${regionWidget.id}-max" 
 							 class="widget-toolbar-btn"
-							 onclick="rave.toolbarMaximize(this)"></button>
+							 onclick="rave.toolbarMaximize(this,{myRegionWidgetId:${regionWidget.id},myRegionId:${region.id},myPageId:${defaultPage.id}})">
+				  </button>
 				  <button id="widget-${regionWidget.id}-remove" 
 							 class="widget-toolbar-btn"
-							 onclick="rave.toolbarDelete(this,${regionWidget.id},${region.id},${defaultPage.id})">
+							 onclick="rave.toolbarDelete(this,{myRegionWidgetId:${regionWidget.id},myRegionId:${region.id},myPageId:${defaultPage.id}})">
 				  </button>
 				  <script>
 					 //This decorates the toolbar buttons.  As currently written,

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=1132763&r1=1132762&r2=1132763&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 20:51:13 2011
@@ -111,23 +111,26 @@ var rave = rave || (function() {
 	 var toolbar = (function() {
 		  function init(){
 		  }
-		  function maximizeAction(button){
-				alert("Maximize: "+button.id+" not yet implemented.");
-				
+		  function maximizeAction(button,args) {
+				alert("Maximize button not yet implemented");
+				console.log("RegionWidgetId, RegionId, and PageId:"+args.myRegionWidgetId+" "+args.myRegionId+"
"+args.myPageId);
 		  };
-		  function deleteAction(button,myRegionWidgetId,myRegionId,myPageId){
-//				alert("Delete:"+button.id+" "+myRegionWidgetId+" "+myRegionId+" "+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: myRegionWidgetId, 
-					 pageId : myPageId,
+					 regionWidgetId: args.myRegionWidgetId, 
+					 pageId : args.myPageId,
 					 region: {
-						  id : myRegionId
+						  id : args.myRegionId
 					 },
 					 succCB: function() {
-						  $("#widget-wrapper-"+myRegionWidgetId).remove();
+						  $("#widget-wrapper-"+args.myRegionWidgetId).remove();
 					 }
 				});
-				rave.mapGadgetToRegion(myRegionWidgetId, myRegionId);
+				*/
+
 		  };
 		  return {
 				maximizeAction : maximizeAction,
@@ -198,8 +201,9 @@ var rave = rave || (function() {
 	  */
 	 function mapGadgetToRegion(widgetId, regionId) {
 	     delete widgetRegionMap[widgetId];
-	     if (arguments.length > 1 && regionId != null)
+	     if (arguments.length > 1 && regionId != null) {
 	         widgetRegionMap[widgetId] = regionId;
+		  }
 	 }
 	 
 	 /**

Modified: incubator/rave/trunk/rave-portal/src/main/webapp/script/rave_api.js
URL: http://svn.apache.org/viewvc/incubator/rave/trunk/rave-portal/src/main/webapp/script/rave_api.js?rev=1132763&r1=1132762&r2=1132763&view=diff
==============================================================================
--- incubator/rave/trunk/rave-portal/src/main/webapp/script/rave_api.js (original)
+++ incubator/rave/trunk/rave-portal/src/main/webapp/script/rave_api.js Mon Jun  6 20:51:13
2011
@@ -46,6 +46,7 @@ rave.api = rave.api || (function() {
                         }
                     }
             ).error(handleError);
+				console.log("moveWidgetOnPage parameters: WidgetID: "+widgetObjectId+" "+"toRegion: "+toRegionObjectId+"
"+"fromRegion: "+fromRegionObjectId);
         }
 
         function addWidgetToPage(args) {



Mime
View raw message