Author: kien_nguyen
Date: 2011-01-11 06:02:12 -0500 (Tue, 11 Jan 2011)
New Revision: 5729
Modified:
portal/branches/branch-GTNPORTAL-1745/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_en.properties
portal/branches/branch-GTNPORTAL-1745/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_vi.properties
portal/branches/branch-GTNPORTAL-1745/web/portal/src/main/webapp/groovy/portal/webui/application/UIGadget.gtmpl
portal/branches/branch-GTNPORTAL-1745/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIGadget.java
Log:
GTNPORTAL-1751 Dashboard shouldnt hide the gadget removed from Application Registry
Modified:
portal/branches/branch-GTNPORTAL-1745/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_en.properties
===================================================================
---
portal/branches/branch-GTNPORTAL-1745/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_en.properties 2011-01-11
10:48:36 UTC (rev 5728)
+++
portal/branches/branch-GTNPORTAL-1745/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_en.properties 2011-01-11
11:02:12 UTC (rev 5729)
@@ -1407,6 +1407,7 @@
UIGadget.tooltip.Unmaximize=Restore Down
UIGadget.tooltip.editGadget=Edit Gadget
UIGadget.tooltip.deleteGadget=Delete Gadget
+UIGadget.message.isLossData=This gadget may be deleted from database or there is database
error that prevent to read content of gadget
UIListPermissionSelectorPopup.title.ListPermissionSelector=Select Permission
Modified:
portal/branches/branch-GTNPORTAL-1745/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_vi.properties
===================================================================
---
portal/branches/branch-GTNPORTAL-1745/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_vi.properties 2011-01-11
10:48:36 UTC (rev 5728)
+++
portal/branches/branch-GTNPORTAL-1745/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_vi.properties 2011-01-11
11:02:12 UTC (rev 5729)
@@ -1342,6 +1342,7 @@
UIGadget.tooltip.Unmaximize=Thu nhỏ cửa sổ
UIGadget.tooltip.editGadget=Sửa Gadget
UIGadget.tooltip.deleteGadget=Xóa Gadget
+UIGadget.message.isLossData=Gadget này có thể đã bị xóa khỏi cơ sở dữ liệu hoặc việc đọc
gadget từ cơ sở dữ liệu xảy ra lỗi
UIListPermissionSelectorPopup.title.ListPermissionSelector=Lựa chọn quyền
UIUserToolBarDashboard.page.ClickAndType=Nhấp chuột và điền tên trang
Modified:
portal/branches/branch-GTNPORTAL-1745/web/portal/src/main/webapp/groovy/portal/webui/application/UIGadget.gtmpl
===================================================================
---
portal/branches/branch-GTNPORTAL-1745/web/portal/src/main/webapp/groovy/portal/webui/application/UIGadget.gtmpl 2011-01-11
10:48:36 UTC (rev 5728)
+++
portal/branches/branch-GTNPORTAL-1745/web/portal/src/main/webapp/groovy/portal/webui/application/UIGadget.gtmpl 2011-01-11
11:02:12 UTC (rev 5729)
@@ -2,25 +2,32 @@
import org.exoplatform.web.application.JavascriptManager;
import org.exoplatform.portal.webui.application.GadgetUtil;
- def rcontext = _ctx.getRequestContext();
- JavascriptManager jsmanager = rcontext.getJavascriptManager();
- def hostName = GadgetUtil.getRelGadgetServerUrl();
- def url = uicomponent.getUrl();
- def metadata = uicomponent.getMetadata();
- def posX = uicomponent.getProperties().getIntValue("locationX") +
"px";
- def posY = uicomponent.getProperties().getIntValue("locationY") +
"px";
- def zIndex = uicomponent.getProperties().getIntValue("zIndex");
- def id = uicomponent.getId();
- def isDev = uicomponent.isGadgetDeveloper();
- def noCache = uicomponent.isNoCache();
- def isDebug = uicomponent.isDebug();
- def view = uicomponent.getView();
- def userPref = uicomponent.getUserPref();
- jsmanager.importJavascript("eXo.gadget.UIGadget");
- rcontext.getJavascriptManager().addCustomizedOnLoadScript("eXo.gadget.UIGadget.confirmDeleteGadget
= '" + _ctx.appRes("UIGadgetContainerManagement.confirm.DeleteGadget")
+ "';");
- jsmanager.addCustomizedOnLoadScript("eXo.gadget.UIGadget.createGadget('$url','content-$id',
$metadata, $userPref, '$view', '$hostName', " + (isDev ? 1 : 0)
- + ", " + (isDebug ? 1 : 0) + ",
" + (noCache ? 1 : 0) + ");");
-
+ def rcontext = _ctx.getRequestContext();
+ JavascriptManager jsmanager = rcontext.getJavascriptManager();
+ def hostName = GadgetUtil.getRelGadgetServerUrl();
+ def url = null;
+ def metadata = "";
+ def posX = uicomponent.getProperties().getIntValue("locationX") +
"px";
+ def posY = uicomponent.getProperties().getIntValue("locationY") +
"px";
+ def zIndex = uicomponent.getProperties().getIntValue("zIndex");
+ def id = uicomponent.getId() != null ? uicomponent.getId() : "UIGadget";
+ def isDev = uicomponent.isGadgetDeveloper();
+ def noCache = uicomponent.isNoCache();
+ def isDebug = uicomponent.isDebug();
+ def view = uicomponent.getView();
+ def userPref = null;
+
+ def isLossData = uicomponent.isLossData();
+ if(!isLossData) {
+ url = uicomponent.getUrl();
+ metadata = uicomponent.getMetadata();
+ userPref = uicomponent.getUserPref();
+ jsmanager.importJavascript("eXo.gadget.UIGadget");
+
rcontext.getJavascriptManager().addCustomizedOnLoadScript("eXo.gadget.UIGadget.confirmDeleteGadget
= '" + _ctx.appRes("UIGadgetContainerManagement.confirm.DeleteGadget")
+ "';");
+
jsmanager.addCustomizedOnLoadScript("eXo.gadget.UIGadget.createGadget('$url','content-$id',
$metadata, $userPref, '$view', '$hostName', " + (isDev ? 1 : 0)
+ + ", " + (isDebug ? 1 : 0) +
", " + (noCache ? 1 : 0) + ");");
+ }
+
boolean isMini =
Boolean.parseBoolean(uicomponent.getProperties().get("minimized"));
String miniTitle = _ctx.appRes("UIGadget.tooltip.Minimize");
String unminiTitle = _ctx.appRes("UIGadget.tooltip.Unminimize");
@@ -43,7 +50,7 @@
<div class="EditGadget IconControl"
onclick="eXo.gadget.UIGadget.editGadget('$id')"
onmousedown="event.cancelBubble=true;"
title="<%=_ctx.appRes("UIGadget.tooltip.editGadget")%>"><span></span></div>
<% } %>
<div
class="GadgetDragHandleArea"><span></span></div>
- <div class="GadgetTitle" style="display: none; float: none; width:
auto; margin-right: 75px"><%= uicomponent.getApplicationName()
%></div>
+ <div class="GadgetTitle" style="display: <%=isLossData ?
"block" : "none"; %> ; float: none; width: auto; margin-right:
75px"><%= uicomponent.getApplicationName() %></div>
</div>
</div>
</div>
@@ -57,8 +64,12 @@
</div>
<div class="MLGadget">
<div class="MRGadget">
- <div id="content-$id" class="MCGadget"></div>
- </div>
+ <% if(isLossData) {%>
+ <div id="content-$id"
class="MCGadget"><%=_ctx.appRes("UIGadget.message.isLossData")%></div>
+ <% } else {%>
+ <div id="content-$id"
class="MCGadget"></div>
+ <% } %>
+ </div>
</div>
<div class="BLGadget">
<div class="BRGadget">
Modified:
portal/branches/branch-GTNPORTAL-1745/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIGadget.java
===================================================================
---
portal/branches/branch-GTNPORTAL-1745/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIGadget.java 2011-01-11
10:48:36 UTC (rev 5728)
+++
portal/branches/branch-GTNPORTAL-1745/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIGadget.java 2011-01-11
11:02:12 UTC (rev 5729)
@@ -260,25 +260,6 @@
}
}
- @Override
- public boolean isRendered()
- {
- try
- {
- DataStorage service = getApplicationComponent(DataStorage.class);
- service.load(state, ApplicationType.GADGET);
- if (getApplication() == null)
- {
- throw new Exception();
- }
- }
- catch (Exception e)
- {
- return false;
- }
- return super.isRendered();
- }
-
public boolean isLossData()
{
try
Show replies by date