merged changes from trunk into branch (RAVE-625)

git-svn-id: https://svn.apache.org/repos/asf/rave/branches/model_interfaces@1354135 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/rave-portal-resources/src/main/webapp/static/css/rave-css.less b/rave-portal-resources/src/main/webapp/static/css/rave-css.less
index 86cdb70..5945c4e 100644
--- a/rave-portal-resources/src/main/webapp/static/css/rave-css.less
+++ b/rave-portal-resources/src/main/webapp/static/css/rave-css.less
@@ -77,15 +77,31 @@
     top: 51px;

 }

 

+.canvas-overlay{

+	position: absolute;

+	left:0;

+	margin-top: -20px;

+	width: 100%;

+	z-index:10;

+    opacity:0.8;

+    background: #fff;

+}

 .widget-wrapper-canvas {

     position: absolute;

-    z-index: 1000;

-    left: 0.25%;

-    top: 72px;

-    width: 99.5%;

-    height: 100%;

+    z-index: 999;

+    left: 1.25%;

+    top: 50px;

+    width: 97.5%;

+    /*height: 100%;*/

+    margin-bottom: 20px;

     opacity: 1;

     vertical-align: top;

+    border: 1px solid #cfcfcf;

+    .border-radius(5px);

+    /*using prefixes for browser specific styles*/

+    box-shadow: 1px 1px 3px rgba(0,0,0,.25);

+    -webkit-box-shadow: 1px 1px 5px rgba(0,0,0,.25);

+    -moz-box-shadow: 2px 2px 2px rgba(0,0,0,.25);

 }

 

 .widget-wrapper {

diff --git a/rave-portal-resources/src/main/webapp/static/script/rave.js b/rave-portal-resources/src/main/webapp/static/script/rave.js
index 20e0bd9..4bd3acb 100644
--- a/rave-portal-resources/src/main/webapp/static/script/rave.js
+++ b/rave-portal-resources/src/main/webapp/static/script/rave.js
@@ -399,7 +399,7 @@
 
         function minimizeAction(args, view_params) {
             var regionWidgetId = args.data.id;
-            $(".dnd-overlay").remove();
+            $(".dnd-overlay, .canvas-overlay").remove();
             getNonLockedRegions().sortable("option", "disabled", false);
             // display the widget in normal view
             $("#widget-" + regionWidgetId + "-wrapper").removeClass("widget-wrapper-canvas").addClass("widget-wrapper");
@@ -733,8 +733,21 @@
             jqElm.prepend(overlay[0]);
         }
 
+        function addCanvasOverlay(jqElm){
+            var overlay = $('<div></div>');
+            var styleMap = {
+                height:$('body').height()-40
+             };
+
+            // style it and give it the marker class
+            $(overlay).css(styleMap);
+            $(overlay).addClass("canvas-overlay");
+            // add it to the dom before the iframe so it covers it
+            jqElm.prepend(overlay[0]);
+        }
+
         function openFullScreenOverlay(regionWidgetId) {
-            addOverlay($("#pageContent"));
+            addCanvasOverlay($("#pageContent"));
             getNonLockedRegions().sortable("option", "disabled", true);
             $("#widget-" + regionWidgetId + "-wrapper").removeClass("widget-wrapper").addClass("widget-wrapper-canvas");
             // hide the widget menu
diff --git a/rave-portal-resources/src/main/webapp/static/script/rave_opensocial.js b/rave-portal-resources/src/main/webapp/static/script/rave_opensocial.js
index 52594f2..bbf8733 100644
--- a/rave-portal-resources/src/main/webapp/static/script/rave_opensocial.js
+++ b/rave-portal-resources/src/main/webapp/static/script/rave_opensocial.js
@@ -178,6 +178,10 @@
             // display the gadget in custom edit prefs view
             renderGadgetView(rave.opensocial.VIEW_NAMES.PREFERENCES, this);
         };
+        gadget.renderView = function(viewName) {
+            // render the gadget in the view supplied.  This can be used to render a gadget in any custom-defined view
+            renderGadgetView(viewName, this);
+        };
 
         // if the gadget has prefences to edit, or has the Preferences view
         // enable the edit prefs menu item