You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rave.apache.org by sc...@apache.org on 2012/08/03 11:51:25 UTC
svn commit: r1368856 -
/rave/trunk/rave-portal-resources/src/main/webapp/static/script/rave_api.js
Author: scottbw
Date: Fri Aug 3 09:51:24 2012
New Revision: 1368856
URL: http://svn.apache.org/viewvc?rev=1368856&view=rev
Log:
added a successCallback handler to addWidgetToPage RPC method, passing along the regionWidgetId. This is used to allow chaining a rendering action to the method (see RAVE-743)
Modified:
rave/trunk/rave-portal-resources/src/main/webapp/static/script/rave_api.js
Modified: rave/trunk/rave-portal-resources/src/main/webapp/static/script/rave_api.js
URL: http://svn.apache.org/viewvc/rave/trunk/rave-portal-resources/src/main/webapp/static/script/rave_api.js?rev=1368856&r1=1368855&r2=1368856&view=diff
==============================================================================
--- rave/trunk/rave-portal-resources/src/main/webapp/static/script/rave_api.js (original)
+++ rave/trunk/rave-portal-resources/src/main/webapp/static/script/rave_api.js Fri Aug 3 09:51:24 2012
@@ -257,6 +257,10 @@ rave.api = rave.api || (function() {
if (addedWidget != undefined && addedWidget.title != undefined && addedWidget.title.length > 0) {
widgetTitle = addedWidget.title;
+ }
+ // if a callback is supplied, invoke it with the regionwidget id
+ if (args.successCallback && addedWidget != undefined){
+ args.successCallback(result.result.id);
}
rave.showInfoMessage(widgetTitle + ' ' + rave.getClientMessage("widget.add_suffix"));
}