gatein SVN: r3921 - in portal/trunk/webui: portal/src/main/java/org/exoplatform/portal/webui/portal and 1 other directory.
by do-not-reply@jboss.org
Author: thomas.heute(a)jboss.com
Date: 2010-08-24 14:32:48 -0400 (Tue, 24 Aug 2010)
New Revision: 3921
Modified:
portal/trunk/webui/eXo/src/main/java/org/exoplatform/webui/organization/UIUserProfileInputSet.java
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UILanguageSelector.java
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UIPortalForm.java
Log:
GTNPORTAL-1301: Show "Simplified Chinese" for zh_CN and "Traditional Chinese" for zh_TW
Avoiding JDK 6 feature
Modified: portal/trunk/webui/eXo/src/main/java/org/exoplatform/webui/organization/UIUserProfileInputSet.java
===================================================================
--- portal/trunk/webui/eXo/src/main/java/org/exoplatform/webui/organization/UIUserProfileInputSet.java 2010-08-24 17:05:59 UTC (rev 3920)
+++ portal/trunk/webui/eXo/src/main/java/org/exoplatform/webui/organization/UIUserProfileInputSet.java 2010-08-24 18:32:48 UTC (rev 3921)
@@ -46,6 +46,7 @@
import java.util.List;
import java.util.Locale;
import java.util.ResourceBundle;
+import java.util.MissingResourceException;
/**
* Created by The eXo Platform SARL Author : Dang Van Minh minhdv81(a)yahoo.com
@@ -153,7 +154,6 @@
{
LocaleConfig config = i.next();
Locale locale = config.getLocale();
- displayName = capitalizeFirstLetter(locale.getDisplayName(currentLocale));
language = locale.getLanguage();
country = locale.getCountry();
@@ -164,18 +164,22 @@
ResourceBundle localeResourceBundle;
+
+ displayName = null;
try
{
localeResourceBundle = getResourceBundle(currentLocale);
String key = "Locale." + language;
- if (localeResourceBundle.containsKey(key))
- {
- displayName = localeResourceBundle.getString(key);
- }
+ String translation = localeResourceBundle.getString(key);
+ displayName = translation;
}
+ catch (MissingResourceException e)
+ {
+ displayName = capitalizeFirstLetter(locale.getDisplayName(currentLocale));
+ }
catch (Exception e)
{
- // ignore, use default displayName
+
}
option = new SelectItemOption<String>(displayName, language);
@@ -282,4 +286,5 @@
ResourceBundle res = service.getResourceBundle("locale.portal.webui", locale);
return res;
}
+
}
Modified: portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UILanguageSelector.java
===================================================================
--- portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UILanguageSelector.java 2010-08-24 17:05:59 UTC (rev 3920)
+++ portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UILanguageSelector.java 2010-08-24 18:32:48 UTC (rev 3921)
@@ -43,6 +43,7 @@
import java.util.List;
import java.util.Locale;
import java.util.ResourceBundle;
+import java.util.MissingResourceException;
@ComponentConfig(template = "system:/groovy/portal/webui/portal/UILanguageSelector.gtmpl", events = {
@EventConfig(listeners = UILanguageSelector.SaveActionListener.class),
@@ -73,45 +74,48 @@
String key = "Locale." + lang;
String displayName = null;
- if (currentLocaleResourceBundle.containsKey(key))
+ try
{
- displayName = currentLocaleResourceBundle.getString(key);
+ String translation = currentLocaleResourceBundle.getString(key);
+ displayName = translation;
}
- else
+ catch (MissingResourceException e)
{
displayName = capitalizeFirstLetter(locale.getDisplayLanguage(currentLocale));
}
-
+
String localedName = null;
- if (localeResourceBundle.containsKey(key))
+ try
{
- localedName = localeResourceBundle.getString(key);
+ String translation = localeResourceBundle.getString(key);
+ localedName = translation;
}
- else
+ catch (MissingResourceException e)
{
localedName = capitalizeFirstLetter(locale.getDisplayLanguage(locale));
}
-
if (country != null && country.length() > 0)
{
lang = lang + "_" + country;
key = "Locale." + lang;
-
- if (currentLocaleResourceBundle.containsKey(key))
+
+ try
{
- displayName = currentLocaleResourceBundle.getString(key);
+ String translation = currentLocaleResourceBundle.getString(key);
+ displayName = translation;
}
- else
+ catch (MissingResourceException e)
{
displayName = capitalizeFirstLetter(locale.getDisplayLanguage(currentLocale)) + " - " + capitalizeFirstLetter(locale.getDisplayCountry(currentLocale));
}
-
- if (localeResourceBundle.containsKey(key))
- {
- localedName = localeResourceBundle.getString(key);
+
+ try
+ {
+ String translation = localeResourceBundle.getString(key);
+ localedName = translation;
}
- else
+ catch (MissingResourceException e)
{
localedName = capitalizeFirstLetter(locale.getDisplayLanguage(locale)) + " - " + capitalizeFirstLetter(locale.getDisplayCountry(locale));
}
@@ -204,4 +208,4 @@
}
-}
\ No newline at end of file
+}
Modified: portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UIPortalForm.java
===================================================================
--- portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UIPortalForm.java 2010-08-24 17:05:59 UTC (rev 3920)
+++ portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UIPortalForm.java 2010-08-24 18:32:48 UTC (rev 3921)
@@ -75,6 +75,7 @@
import java.util.List;
import java.util.Locale;
import java.util.ResourceBundle;
+import java.util.MissingResourceException;
@ComponentConfigs({
@ComponentConfig(lifecycle = UIFormLifecycle.class, template = "system:/groovy/webui/form/UIFormTabPane.gtmpl", events = {
@@ -196,7 +197,6 @@
while (iterator.hasNext())
{
LocaleConfig localeConfig = (LocaleConfig)iterator.next();
- String displayName = capitalizeFirstLetter(localeConfig.getLocale().getDisplayName(currentLocale));
ResourceBundle localeResourceBundle = getResourceBundle(currentLocale);
String key = "Locale." + localeConfig.getLocale().getLanguage();
@@ -205,10 +205,16 @@
key += "_" + localeConfig.getLocale().getCountry();
}
- if (localeResourceBundle.containsKey(key))
+ String displayName = null;
+ try
{
- displayName = localeResourceBundle.getString(key);
+ String translation = localeResourceBundle.getString(key);
+ displayName = translation;
}
+ catch (MissingResourceException e)
+ {
+ displayName = capitalizeFirstLetter(localeConfig.getLocale().getDisplayName(currentLocale));;
+ }
SelectItemOption<String> option =
new SelectItemOption<String>(displayName, localeConfig
14 years, 4 months
gatein SVN: r3920 - exo/portal/branches/3.1.x/gadgets/eXoGadgets/src/main/webapp/gadgets/rssAggregator.
by do-not-reply@jboss.org
Author: hoang_to
Date: 2010-08-24 13:05:59 -0400 (Tue, 24 Aug 2010)
New Revision: 3920
Modified:
exo/portal/branches/3.1.x/gadgets/eXoGadgets/src/main/webapp/gadgets/rssAggregator/script.js
Log:
EXOGTN-34: Rss gadget displays blank screen when feed URL is invalid rss link
Modified: exo/portal/branches/3.1.x/gadgets/eXoGadgets/src/main/webapp/gadgets/rssAggregator/script.js
===================================================================
--- exo/portal/branches/3.1.x/gadgets/eXoGadgets/src/main/webapp/gadgets/rssAggregator/script.js 2010-08-24 16:58:54 UTC (rev 3919)
+++ exo/portal/branches/3.1.x/gadgets/eXoGadgets/src/main/webapp/gadgets/rssAggregator/script.js 2010-08-24 17:05:59 UTC (rev 3920)
@@ -83,16 +83,20 @@
}
}
-RssAggregator.prototype.renderFeed = function(feed) {
- this.feed = feed;
- gadgets.window.setTitle("RSS: " + feed.Title);
+RssAggregator.prototype.renderFeed = function(feedObj) {
+ if(feedObj.rc != 200 && feedObj.data == undefined) {
+ document.write("the url: " + feedurl + " is down or invalid");
+ return;
+ }
+ this.feed = feedObj.data;
+ gadgets.window.setTitle("RSS: " + this.feed.Title);
var feedEl = _gel("feedContainer");
var bullet = "<img src='" + this.getFavicon(feedurl) + "' alt='' border=0 align='absmiddle' style='height:16;width:16;' onerror='this.style.visibility=\"hidden\";'> ";
- if (feed != null) {
+ if (this.feed != null) {
// Access the data for a given entry
- if (feed.Entry) {
- for (var i = 0; i < feed.Entry.length; i++) {
+ if (this.feed.Entry) {
+ for (var i = 0; i < this.feed.Entry.length; i++) {
var itemEl = document.createElement('div');
var item_title = document.createElement('div');
var item_more = document.createElement('div');
@@ -116,10 +120,10 @@
item_date.className = 'date';
item_link.className = 'link';
- item_title.innerHTML = bullet + "<a id='link_title_"+i+"' class='titlelink' href='" + feed.Entry[i].Link + "' onclick='rssAggregator.toggleDescription("+i+");return false;'>" + feed.Entry[i].Title + "</a>";
- item_date.innerHTML = this.timeToPrettyString(feed.Entry[i].Date);
+ item_title.innerHTML = bullet + "<a id='link_title_"+i+"' class='titlelink' href='" + this.feed.Entry[i].Link + "' onclick='rssAggregator.toggleDescription("+i+");return false;'>" + this.feed.Entry[i].Title + "</a>";
+ item_date.innerHTML = this.timeToPrettyString(this.feed.Entry[i].Date);
- item_desc.innerHTML = feed.Entry[i].Summary;
+ item_desc.innerHTML = this.feed.Entry[i].Summary;
item_link.innerHTML = this.generateLinkContent(i);
@@ -146,6 +150,10 @@
}
RssAggregator.prototype.refreshFeed = function() {
- _IG_FetchFeedAsJSON(prefs.getString("rssurl"), function(feed) {rssAggregator.renderFeed(feed);}, entries, true);
+ var params = {};
+ params[gadgets.io.RequestParameters.CONTENT_TYPE] = gadgets.io.ContentType.FEED;
+ params[gadgets.io.RequestParameters.NUM_ENTRIES] = entries;
+ params[gadgets.io.RequestParameters.GET_SUMMARIES] = true;
+ gadgets.io.makeRequest(prefs.getString("rssurl"), function(feedObj) {rssAggregator.renderFeed(feedObj);}, params);
}
14 years, 4 months
gatein SVN: r3919 - exo/portal/branches/3.1.x/component/management/src/main/java/org/exoplatform/management/data.
by do-not-reply@jboss.org
Author: hoang_to
Date: 2010-08-24 12:58:54 -0400 (Tue, 24 Aug 2010)
New Revision: 3919
Modified:
exo/portal/branches/3.1.x/component/management/src/main/java/org/exoplatform/management/data/RestResource.java
Log:
EXOGTN-33: RestResource can't get parameter in a HTTP POST/PUT request
Modified: exo/portal/branches/3.1.x/component/management/src/main/java/org/exoplatform/management/data/RestResource.java
===================================================================
--- exo/portal/branches/3.1.x/component/management/src/main/java/org/exoplatform/management/data/RestResource.java 2010-08-24 16:52:51 UTC (rev 3918)
+++ exo/portal/branches/3.1.x/component/management/src/main/java/org/exoplatform/management/data/RestResource.java 2010-08-24 16:58:54 UTC (rev 3919)
@@ -26,6 +26,8 @@
import org.exoplatform.management.spi.ManagedPropertyMetaData;
import org.exoplatform.management.spi.ManagedResource;
import org.exoplatform.management.spi.ManagedTypeMetaData;
+import org.exoplatform.services.rest.impl.ApplicationContextImpl;
+import org.exoplatform.services.rest.impl.MultivaluedMapImpl;
import javax.ws.rs.GET;
import javax.ws.rs.POST;
@@ -38,6 +40,10 @@
import javax.ws.rs.core.MultivaluedMap;
import javax.ws.rs.core.Response;
import javax.ws.rs.core.UriInfo;
+import javax.ws.rs.ext.MessageBodyReader;
+
+import java.lang.reflect.ParameterizedType;
+import java.lang.reflect.Type;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
@@ -126,6 +132,8 @@
@Produces(MediaType.APPLICATION_JSON)
public Object get(@Context UriInfo info, @PathParam("name") String name)
{
+ MultivaluedMap<String, String> parameters = info.getQueryParameters();
+
// Try first to get a property
RestResourceProperty property = properties.get(name);
if (property != null)
@@ -133,12 +141,12 @@
MethodInvoker getter = property.getGetterInvoker();
if (getter != null)
{
- return safeInvoke(getter, info.getQueryParameters());
+ return safeInvoke(getter, parameters);
}
}
//
- return tryInvoke(name, info, ImpactType.READ);
+ return tryInvoke(name, parameters, ImpactType.READ);
}
@PUT
@@ -146,6 +154,7 @@
@Produces(MediaType.APPLICATION_JSON)
public Object put(@Context UriInfo info, @PathParam("name") String name)
{
+ MultivaluedMap<String, String> parameters = getParameters(info);
// Try first to get a property
RestResourceProperty property = properties.get(name);
if (property != null)
@@ -153,12 +162,12 @@
MethodInvoker setter = property.getSetterInvoker();
if (setter != null)
{
- return safeInvoke(setter, info.getQueryParameters());
+ return safeInvoke(setter, parameters);
}
}
//
- return tryInvoke(name, info, ImpactType.IDEMPOTENT_WRITE);
+ return tryInvoke(name, parameters, ImpactType.IDEMPOTENT_WRITE);
}
@POST
@@ -166,7 +175,7 @@
@Produces(MediaType.APPLICATION_JSON)
public Object post(@Context UriInfo info, @PathParam("name") String name)
{
- return tryInvoke(name, info, ImpactType.WRITE);
+ return tryInvoke(name, getParameters(info), ImpactType.WRITE);
}
/**
@@ -177,10 +186,8 @@
* @param impact the expected impact
* @return a suitable response
*/
- private Object tryInvoke(String methodName, UriInfo info, ImpactType impact)
+ private Object tryInvoke(String methodName, MultivaluedMap<String, String> parameters, ImpactType impact)
{
- MultivaluedMap<String, String> parameters = info.getQueryParameters();
-
//
RestResourceMethod method = lookupMethod(methodName, parameters.keySet(), impact);
@@ -237,4 +244,32 @@
managedResource.afterInvoke(resource);
}
}
+
+ @SuppressWarnings("unchecked")
+ private MultivaluedMap<String, String> getParameters(UriInfo info)
+ {
+ MultivaluedMap<String, String> parameters = info.getQueryParameters();
+ ApplicationContextImpl context = (ApplicationContextImpl)info;
+
+ Type formType = (ParameterizedType)MultivaluedMapImpl.class.getGenericInterfaces()[0];
+ MediaType contentType = context.getHttpHeaders().getMediaType();
+ if (contentType == null) {
+ contentType = MediaType.APPLICATION_FORM_URLENCODED_TYPE;
+ }
+
+ MultivaluedMap<String, String> form = new MultivaluedMapImpl();
+ try {
+ MessageBodyReader reader =
+ context.getProviders().getMessageBodyReader(MultivaluedMap.class, formType, null, contentType);
+ if (reader != null) {
+ form = (MultivaluedMap<String, String>)reader.readFrom(MultivaluedMap.class, formType, null, contentType, context
+ .getHttpHeaders().getRequestHeaders(), context.getContainerRequest().getEntityStream());
+ }
+ } catch (Exception e) {
+ }
+
+ parameters.putAll(form);
+ return parameters;
+ }
+
}
14 years, 4 months
gatein SVN: r3918 - in exo/portal/branches/3.1.x: webui/portal/src/main/java/org/exoplatform/portal/webui/application and 1 other directory.
by do-not-reply@jboss.org
Author: hoang_to
Date: 2010-08-24 12:52:51 -0400 (Tue, 24 Aug 2010)
New Revision: 3918
Modified:
exo/portal/branches/3.1.x/web/portal/src/main/webapp/groovy/portal/webui/application/UIPortlet.gtmpl
exo/portal/branches/3.1.x/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIPortletLifecycle.java
Log:
EXOGTN-29: GateIn should use the portlet title set in RenderResponse for the title on infor bar
Modified: exo/portal/branches/3.1.x/web/portal/src/main/webapp/groovy/portal/webui/application/UIPortlet.gtmpl
===================================================================
--- exo/portal/branches/3.1.x/web/portal/src/main/webapp/groovy/portal/webui/application/UIPortlet.gtmpl 2010-08-24 16:50:59 UTC (rev 3917)
+++ exo/portal/branches/3.1.x/web/portal/src/main/webapp/groovy/portal/webui/application/UIPortlet.gtmpl 2010-08-24 16:52:51 UTC (rev 3918)
@@ -37,12 +37,14 @@
<div class="FixHeight">
<%
if(hasPermission) {
- try {
- String portletName = uicomponent.getProducedOfferedPortlet().getInfo().getName();
- print _ctx.getRequestContext().getApplicationResourceBundle().getString("UIPortlet.description." + portletName);
- } catch(Exception e){
- print uicomponent.getDisplayName();
- }
+ if(portletTitle == null || portletTitle.trim().length() < 1) {
+ try {
+ String portletName = uicomponent.getProducedOfferedPortlet().getInfo().getName();
+ print _ctx.getRequestContext().getApplicationResourceBundle().getString("UIPortlet.description." + portletName);
+ } catch(Exception e){
+ print uicomponent.getDisplayName();
+ }
+ } else print portletTitle;
} else print "<div class='ProtectedContent'>"+_ctx.appRes("UIPortlet.label.protectedContent")+"</div>";
%>
</div>
@@ -60,10 +62,12 @@
if(portalMode != uiPortalApp.CONTAINER_BLOCK_EDIT_MODE && portalMode != uiPortalApp.APP_BLOCK_EDIT_MODE) {
if(uicomponent.getShowInfoBar()) {
- String title = uicomponent.getTitle();
- if(title == null || title.trim().length() < 1)
+ String title = portletTitle;
+ if(title == null || title.trim().length() < 1)
+ title = uicomponent.getTitle();
+ if(title == null || title.trim().length() < 1)
title = uicomponent.getDisplayName();
- if(title == null || title.trim().length() < 1)
+ if(title == null || title.trim().length() < 1)
title = portletId;
/*Begin Window Portlet Bar*/
String visibility = "visible";
@@ -288,7 +292,9 @@
String portletIcon = uicomponent.getIcon();
if(portletIcon == null) portletIcon = "PortletIcon";
- String title = uicomponent.getDisplayTitle();
+ String title = portletTitle;
+ if(title == null || title.trim().length() < 1)
+ title = uicomponent.getDisplayTitle();
if(title.length() > 30) title = title.substring(0,27) + "...";
%>
<div class="PortletIcon $portletIcon"><%=hasPermission ? title : _ctx.appRes("UIPortlet.label.protectedContent")%></div>
Modified: exo/portal/branches/3.1.x/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIPortletLifecycle.java
===================================================================
--- exo/portal/branches/3.1.x/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIPortletLifecycle.java 2010-08-24 16:50:59 UTC (rev 3917)
+++ exo/portal/branches/3.1.x/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIPortletLifecycle.java 2010-08-24 16:52:51 UTC (rev 3918)
@@ -325,12 +325,6 @@
}
//
- if (portletTitle == null)
- {
- portletTitle = "Portlet";
- }
-
- //
if (context.useAjax() && !prcontext.getFullRender())
{
if (markup != null)
14 years, 4 months
gatein SVN: r3917 - exo/portal/branches/3.1.x/webui/portal/src/main/java/org/exoplatform/portal/webui/application.
by do-not-reply@jboss.org
Author: hoang_to
Date: 2010-08-24 12:50:59 -0400 (Tue, 24 Aug 2010)
New Revision: 3917
Modified:
exo/portal/branches/3.1.x/webui/portal/src/main/java/org/exoplatform/portal/webui/application/ExoPortletInvocationContext.java
Log:
EXOGTN-27: Portlet Mode handling does not work correctly
Modified: exo/portal/branches/3.1.x/webui/portal/src/main/java/org/exoplatform/portal/webui/application/ExoPortletInvocationContext.java
===================================================================
--- exo/portal/branches/3.1.x/webui/portal/src/main/java/org/exoplatform/portal/webui/application/ExoPortletInvocationContext.java 2010-08-24 16:49:43 UTC (rev 3916)
+++ exo/portal/branches/3.1.x/webui/portal/src/main/java/org/exoplatform/portal/webui/application/ExoPortletInvocationContext.java 2010-08-24 16:50:59 UTC (rev 3917)
@@ -199,7 +199,7 @@
}
Mode mode = renderURL.getMode();
- if (mode != null && !mode.equals(Mode.VIEW))
+ if (mode != null)
{
appendParameter(baseURL, Constants.PORTLET_MODE_PARAMETER, mode.toString());
}
14 years, 4 months
gatein SVN: r3916 - in exo/portal/branches/3.1.x/web: portal/src/main/webapp/groovy/webui/form and 1 other directory.
by do-not-reply@jboss.org
Author: hoang_to
Date: 2010-08-24 12:49:43 -0400 (Tue, 24 Aug 2010)
New Revision: 3916
Modified:
exo/portal/branches/3.1.x/web/eXoResources/src/main/webapp/javascript/eXo/portal/UIPortalControl.js
exo/portal/branches/3.1.x/web/portal/src/main/webapp/groovy/webui/form/UISearchForm.gtmpl
Log:
EXOGTN-26: Search form in User/Group management does not support 'Enter' as key assist
Modified: exo/portal/branches/3.1.x/web/eXoResources/src/main/webapp/javascript/eXo/portal/UIPortalControl.js
===================================================================
--- exo/portal/branches/3.1.x/web/eXoResources/src/main/webapp/javascript/eXo/portal/UIPortalControl.js 2010-08-24 16:45:50 UTC (rev 3915)
+++ exo/portal/branches/3.1.x/web/eXoResources/src/main/webapp/javascript/eXo/portal/UIPortalControl.js 2010-08-24 16:49:43 UTC (rev 3916)
@@ -58,21 +58,31 @@
}
};
-UIPortalControl.prototype.onEnterPress = function(e) {
- var e = window.event || e;
- var uiPortalLoginFormAction = document.getElementById("UIPortalLoginFormAction");
- if(uiPortalLoginFormAction) {
- var code;
- if(!e) e = window.event;
- if(e.keyCode) code = e.keyCode;
- else if (e.which) code = e.which;
- if(code ==13) {
- if(this.t != 13) {
- uiPortalLoginFormAction.onclick() ;
- }
- this.t = code;
- }
- }
+/**
+ * Process enter key press
+ * @param {Event} e this event
+ * @param {String} executeScript javascript command to execute if enter key was pressed
+ */
+UIPortalControl.prototype.onEnterPress = function(e, executeScript) {
+ var e = window.event || e;
+ var code;
+ if(!e) e = window.event;
+ if(e.keyCode) code = e.keyCode;
+ else if (e.which) code = e.which;
+ if(code ==13) {
+ if(this.t != 13) {
+ var uiPortalLoginFormAction = document.getElementById("UIPortalLoginFormAction");
+ if(uiPortalLoginFormAction) {
+ uiPortalLoginFormAction.onclick() ;
+ }
+ else
+ {
+ if(executeScript)
+ eval(executeScript);
+ }
+ }
+ this.t = code;
+ }
};
/*********** Scroll Manager *************/
Modified: exo/portal/branches/3.1.x/web/portal/src/main/webapp/groovy/webui/form/UISearchForm.gtmpl
===================================================================
--- exo/portal/branches/3.1.x/web/portal/src/main/webapp/groovy/webui/form/UISearchForm.gtmpl 2010-08-24 16:45:50 UTC (rev 3915)
+++ exo/portal/branches/3.1.x/web/portal/src/main/webapp/groovy/webui/form/UISearchForm.gtmpl 2010-08-24 16:49:43 UTC (rev 3916)
@@ -6,19 +6,21 @@
<div class="MiddleBar">
<div class="UISearchForm">
<%uiform.begin()%>
- <div class="QuickSet">
+ <%String quickSearchlink = uicomponent.event("QuickSearch") ;%>
+ <script type="text/javascript">
+ var executeScript = "<%=quickSearchlink%>";
+ </script>
+ <div class="QuickSet" onkeypress="eXo.portal.UIPortalControl.onEnterPress(event, executeScript)">
<div class="SearchTitle"><%=_ctx.appRes("UISearch.label.Search")%>:</div>
<%
QuickSearchInputSet = uiform.getQuickSearchInputSet();
for(field in QuickSearchInputSet.getChildren()) {
uiform.renderField(field)
}
- String quickSearchlink = uicomponent.event("QuickSearch");
%>
<a class="SimpleSearchIcon" href="$quickSearchlink" title="<%= _ctx.appRes("UISearch.label.QuickSearch") %>">
<span></span>
</a>
-
</div>
<%uiform.end()%>
</div>
14 years, 4 months
gatein SVN: r3915 - exo/portal/branches/3.1.x/portlet/exoadmin/src/main/java/org/exoplatform/applicationregistry/webui/component.
by do-not-reply@jboss.org
Author: hoang_to
Date: 2010-08-24 12:45:50 -0400 (Tue, 24 Aug 2010)
New Revision: 3915
Modified:
exo/portal/branches/3.1.x/portlet/exoadmin/src/main/java/org/exoplatform/applicationregistry/webui/component/UIPortletManagement.java
Log:
EXOGTN-23: Exceptions are not properly handled in Application Registry Service
Modified: exo/portal/branches/3.1.x/portlet/exoadmin/src/main/java/org/exoplatform/applicationregistry/webui/component/UIPortletManagement.java
===================================================================
--- exo/portal/branches/3.1.x/portlet/exoadmin/src/main/java/org/exoplatform/applicationregistry/webui/component/UIPortletManagement.java 2010-08-24 16:32:56 UTC (rev 3914)
+++ exo/portal/branches/3.1.x/portlet/exoadmin/src/main/java/org/exoplatform/applicationregistry/webui/component/UIPortletManagement.java 2010-08-24 16:45:50 UTC (rev 3915)
@@ -313,17 +313,38 @@
public String getDisplayName()
{
- return getMetaValue(MetaInfo.DISPLAY_NAME, name_);
+ try
+ {
+ return getMetaValue(MetaInfo.DISPLAY_NAME, name_);
+ }
+ catch (Exception ex)
+ {
+ return "COULD NOT GET DISPLAY NAME OF THE PORTLET";
+ }
}
public String getDescription()
{
- return getMetaValue(MetaInfo.DESCRIPTION, name_);
+ try
+ {
+ return getMetaValue(MetaInfo.DESCRIPTION, name_);
+ }
+ catch (Exception ex)
+ {
+ return "COULD NOT GET DESCRIPTION OF THE PORTLET";
+ }
}
public PreferencesInfo getPortletPreferences()
{
- return portletInfo_.getPreferences();
+ try
+ {
+ return portletInfo_.getPreferences();
+ }
+ catch (Exception ex)
+ {
+ return null;
+ }
}
private String getMetaValue(String metaKey, String defaultValue)
14 years, 4 months
gatein SVN: r3914 - exo/portal/branches/3.1.x/webui/core/src/main/java/org/exoplatform/webui/form/validator.
by do-not-reply@jboss.org
Author: hoang_to
Date: 2010-08-24 12:32:56 -0400 (Tue, 24 Aug 2010)
New Revision: 3914
Modified:
exo/portal/branches/3.1.x/webui/core/src/main/java/org/exoplatform/webui/form/validator/DateTimeValidator.java
Log:
EXOGTN-20: Fix error in validator of Start/End Publication Date
Modified: exo/portal/branches/3.1.x/webui/core/src/main/java/org/exoplatform/webui/form/validator/DateTimeValidator.java
===================================================================
--- exo/portal/branches/3.1.x/webui/core/src/main/java/org/exoplatform/webui/form/validator/DateTimeValidator.java 2010-08-24 16:25:52 UTC (rev 3913)
+++ exo/portal/branches/3.1.x/webui/core/src/main/java/org/exoplatform/webui/form/validator/DateTimeValidator.java 2010-08-24 16:32:56 UTC (rev 3914)
@@ -73,17 +73,16 @@
{
// Specify whether or not date/time parsing is to be lenient.
sdf.setLenient(false);
- Date stDate = sdf.parse(s);
- s = stFormat.format(stDate);
+ sdf.parse(s);
}
catch (Exception e)
{
- throw new MessageException(new ApplicationMessage("DateTimeValidator.msg.Invalid-input", args));
+ throw new MessageException(new ApplicationMessage("DateTimeValidator.msg.Invalid-input", args, ApplicationMessage.WARNING));
}
if (s.matches(DATETIME_REGEX) && isValidDateTime(s))
return;
- throw new MessageException(new ApplicationMessage("DateTimeValidator.msg.Invalid-input", args));
+ throw new MessageException(new ApplicationMessage("DateTimeValidator.msg.Invalid-input", args, ApplicationMessage.WARNING));
}
private boolean isValidDateTime(String dateTime)
14 years, 4 months
gatein SVN: r3913 - exo/portal/branches/3.1.x/webui/portal/src/main/java/org/exoplatform/portal/webui/application.
by do-not-reply@jboss.org
Author: hoang_to
Date: 2010-08-24 12:25:52 -0400 (Tue, 24 Aug 2010)
New Revision: 3913
Modified:
exo/portal/branches/3.1.x/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIGadget.java
Log:
EXOGTN-19: Refresh problem on gadget after saving user preference
Modified: exo/portal/branches/3.1.x/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIGadget.java
===================================================================
--- exo/portal/branches/3.1.x/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIGadget.java 2010-08-24 16:20:28 UTC (rev 3912)
+++ exo/portal/branches/3.1.x/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIGadget.java 2010-08-24 16:25:52 UTC (rev 3913)
@@ -366,11 +366,7 @@
public void addUserPref(String addedUserPref) throws Exception
{
DataStorage service = getApplicationComponent(DataStorage.class);
- org.exoplatform.portal.pom.spi.gadget.Gadget gadget = service.load(state, ApplicationType.GADGET);
- if (gadget == null)
- {
- gadget = new org.exoplatform.portal.pom.spi.gadget.Gadget();
- }
+ org.exoplatform.portal.pom.spi.gadget.Gadget gadget = new org.exoplatform.portal.pom.spi.gadget.Gadget();
//
gadget.addUserPref(addedUserPref);
14 years, 4 months
gatein SVN: r3912 - exo/portal/branches/3.1.x/web/eXoResources/src/main/webapp/javascript/eXo/portal.
by do-not-reply@jboss.org
Author: hoang_to
Date: 2010-08-24 12:20:28 -0400 (Tue, 24 Aug 2010)
New Revision: 3912
Modified:
exo/portal/branches/3.1.x/web/eXoResources/src/main/webapp/javascript/eXo/portal/UIPortal.js
Log:
EXOGTN-18: Edit/Delete icons on portlets 's info bar are not showed in IE7 when the language is Arabic
Modified: exo/portal/branches/3.1.x/web/eXoResources/src/main/webapp/javascript/eXo/portal/UIPortal.js
===================================================================
--- exo/portal/branches/3.1.x/web/eXoResources/src/main/webapp/javascript/eXo/portal/UIPortal.js 2010-08-24 16:18:03 UTC (rev 3911)
+++ exo/portal/branches/3.1.x/web/eXoResources/src/main/webapp/javascript/eXo/portal/UIPortal.js 2010-08-24 16:20:28 UTC (rev 3912)
@@ -98,6 +98,56 @@
}
newLayer.parentNode.style.top = -height + "px";
editBlock.style.display = "block";
+
+ //resize width of portlet/container control if IE + LTR align BEGIN
+
+ var uiInfoBar = DOMUtil.findFirstDescendantByClass(editBlock, "div", "UIInfoBar");
+
+ if( uiInfoBar && (eXo.core.Browser.isIE6() || (eXo.core.Browser.isIE7() && eXo.core.I18n.isRT()))){
+ //resize width of portlet/container only one time
+ if(uiInfoBar.style.width == ""){
+ var dragControlArea = DOMUtil.findFirstDescendantByClass(uiInfoBar, "div", "DragControlArea");
+
+ var portletIcon = DOMUtil.findFirstDescendantByClass(uiInfoBar, "div", "PortletIcon");
+ var editPortletPropertiesIcon = DOMUtil.findFirstDescendantByClass(uiInfoBar, "a", "EditPortletPropertiesIcon");
+ var deletePortletIcon = DOMUtil.findFirstDescendantByClass(uiInfoBar, "a", "DeletePortletIcon");
+
+ var contarnerIcon = DOMUtil.findFirstDescendantByClass(uiInfoBar, "div", "ContainerIcon");
+ var editContainerIcon = DOMUtil.findFirstDescendantByClass(uiInfoBar, "a", "EditContainerIcon");
+ var deleteContainerIcon = DOMUtil.findFirstDescendantByClass(uiInfoBar, "a", "DeleteContainerIcon");
+
+ var uiInfoBarWidth = dragControlArea.offsetWidth;
+
+ if(DOMUtil.hasClass(portlet, "UIPortlet")){
+ uiInfoBarWidth += portletIcon.offsetWidth;
+
+ if(editPortletPropertiesIcon){
+ uiInfoBarWidth += editPortletPropertiesIcon.offsetWidth;
+ }
+
+ if(deletePortletIcon){
+ uiInfoBarWidth += deletePortletIcon.offsetWidth;
+ }
+ }
+
+ if(DOMUtil.hasClass(portlet, "UIContainer")){
+ uiInfoBarWidth += contarnerIcon.offsetWidth
+
+ if(editContainerIcon){
+ uiInfoBarWidth += editContainerIcon.offsetWidth;
+ }
+
+ if(deleteContainerIcon){
+ uiInfoBarWidth += deleteContainerIcon.offsetWidth;
+ }
+ }
+
+ uiInfoBar.style.width= uiInfoBarWidth + 35 + "px";
+ }
+
+ }
+ //resize width of portlet/container control if IE + LTR align END
+
} else {
editBlock.style.display = "none";
if(!DOMUtil.hasClass(portlet, "UIPortlet")) {
14 years, 4 months