rave-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From scot...@apache.org
Subject svn commit: r1197542 - /incubator/rave/trunk/rave-portal-resources/src/main/webapp/script/rave_opensocial.js
Date Fri, 04 Nov 2011 12:54:03 GMT
Author: scottbw
Date: Fri Nov  4 12:54:03 2011
New Revision: 1197542

URL: http://svn.apache.org/viewvc?rev=1197542&view=rev
Log:
Fix for RAVE-338; setting iFrame width to 100% enables resetting the widget width after maximising/minimizing.
(Tested on Firefox, Opera, Safari and Chrome) 

Modified:
    incubator/rave/trunk/rave-portal-resources/src/main/webapp/script/rave_opensocial.js

Modified: incubator/rave/trunk/rave-portal-resources/src/main/webapp/script/rave_opensocial.js
URL: http://svn.apache.org/viewvc/incubator/rave/trunk/rave-portal-resources/src/main/webapp/script/rave_opensocial.js?rev=1197542&r1=1197541&r2=1197542&view=diff
==============================================================================
--- incubator/rave/trunk/rave-portal-resources/src/main/webapp/script/rave_opensocial.js (original)
+++ incubator/rave/trunk/rave-portal-resources/src/main/webapp/script/rave_opensocial.js Fri
Nov  4 12:54:03 2011
@@ -166,7 +166,15 @@ rave.opensocial = rave.opensocial || (fu
         var renderParams = {};
         var size = getSizeFromElement(gadget.regionWidgetId, view);
         renderParams[osapi.container.RenderParam.VIEW] = view;
-        renderParams[osapi.container.RenderParam.WIDTH] = size.width;
+        // 
+        // If size.width is passed to the WIDTH param this causes odd behaviour
+        // in Firefox and Opera. By using "100%" instead the gadget fills the 
+        // wrapper width even after maximizing/minimizing or changes in the region 
+        // width caused by other widgets being moved or added
+        //
+        // renderParams[osapi.container.RenderParam.WIDTH] = size.width;
+        //
+        renderParams[osapi.container.RenderParam.WIDTH] = "100%";
         renderParams[osapi.container.RenderParam.HEIGHT] = size.height;
         renderParams[osapi.container.RenderParam.USER_PREFS] = getCompleteUserPrefSet(gadget.userPrefs,
gadget.metadata.userPrefs);
         container.navigateGadget(gadget.site, gadget.widgetUrl, {}, renderParams);



Mime
View raw message