Author: kien_nguyen
Date: 2010-04-12 07:16:17 -0400 (Mon, 12 Apr 2010)
New Revision: 2585
Modified:
portal/trunk/gadgets/core/src/main/java/containers/default/container.js
portal/trunk/portlet/dashboard/src/main/webapp/groovy/gadget/webui/component/UIGadgetViewMode.gtmpl
portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/gadget/Gadgets.js
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIGadget.java
Log:
GTNPORTAL-1014 Returned currentView does not match enum view
Modified: portal/trunk/gadgets/core/src/main/java/containers/default/container.js
===================================================================
--- portal/trunk/gadgets/core/src/main/java/containers/default/container.js 2010-04-12
10:20:18 UTC (rev 2584)
+++ portal/trunk/gadgets/core/src/main/java/containers/default/container.js 2010-04-12
11:16:17 UTC (rev 2585)
@@ -119,7 +119,7 @@
"urlTemplate" :
"http://%host%/eXoGadgetServer/gadgets/home?{var}",
"aliases": ["DASHBOARD", "default"]
},
- "HOME" : {
+ "CANVAS" : {
"isOnlyVisible" : true,
"urlTemplate" :
"http://%host%/eXoGadgetServer/gadgets/canvas?{var}",
"aliases" : ["FULL_PAGE"]
Modified:
portal/trunk/portlet/dashboard/src/main/webapp/groovy/gadget/webui/component/UIGadgetViewMode.gtmpl
===================================================================
---
portal/trunk/portlet/dashboard/src/main/webapp/groovy/gadget/webui/component/UIGadgetViewMode.gtmpl 2010-04-12
10:20:18 UTC (rev 2584)
+++
portal/trunk/portlet/dashboard/src/main/webapp/groovy/gadget/webui/component/UIGadgetViewMode.gtmpl 2010-04-12
11:16:17 UTC (rev 2585)
@@ -13,7 +13,7 @@
def userPref = null;//uicomponent.getUserPref() ;
JavascriptManager jsmanager = rcontext.getJavascriptManager();
jsmanager.importJavascript("eXo.gadget.UIGadget") ;
- jsmanager.addCustomizedOnLoadScript("eXo.gadget.UIGadget.createGadget('$url','$id',
$metadata, $userPref, 'canvas', '$hostName');") ;
+ jsmanager.addCustomizedOnLoadScript("eXo.gadget.UIGadget.createGadget('$url','$id',
$metadata, $userPref, 'CANVAS', '$hostName');") ;
java.util.Map<String, String> metadataMap = GadgetUtil.getMapMetadata(url) ;
String height = "auto" ;
if(metadataMap.containsKey("height") &&
Integer.parseInt(metadataMap.get("height")) > 0)
Modified: portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/gadget/Gadgets.js
===================================================================
---
portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/gadget/Gadgets.js 2010-04-12
10:20:18 UTC (rev 2584)
+++
portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/gadget/Gadgets.js 2010-04-12
11:16:17 UTC (rev 2585)
@@ -256,8 +256,8 @@
var portletFrag = DOMUtil.findAncestorByClass(uiGadget, "PORTLET-FRAGMENT")
;
if (!portletFrag) return;
var maximize = "maximize";
- if(view == 'canvas') maximize = "maximize";
- else if(view == 'home') maximize = "unmaximize";
+ if(view == 'CANVAS') maximize = "maximize";
+ else if(view == 'HOME') maximize = "unmaximize";
var compId = portletFrag.parentNode.id;
var uicomp = DOMUtil.getChildrenByTagName(portletFrag, "div")[0];
var href = eXo.env.server.portalBaseURL + "?portal:componentId=" + compId ;
Modified:
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIGadget.java
===================================================================
---
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIGadget.java 2010-04-12
10:20:18 UTC (rev 2584)
+++
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIGadget.java 2010-04-12
11:16:17 UTC (rev 2585)
@@ -88,7 +88,7 @@
public static final String HOME_VIEW = "HOME";
- public static final String CANVAS_VIEW = "HOME";
+ public static final String CANVAS_VIEW = "CANVAS";
public String view = HOME_VIEW;