Author: mwringe
Date: 2012-02-21 16:23:23 -0500 (Tue, 21 Feb 2012)
New Revision: 8449
Modified:
portal/trunk/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_en.properties
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIPortletForm.java
Log:
GTNPORTAL-2356: default numbers in the UIPortletForm to include 'px' if they are
not already set. Add to the input box string that 'px' is expected.
Modified:
portal/trunk/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_en.properties
===================================================================
---
portal/trunk/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_en.properties 2012-02-21
18:10:25 UTC (rev 8448)
+++
portal/trunk/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_en.properties 2012-02-21
21:23:23 UTC (rev 8449)
@@ -75,6 +75,8 @@
PositiveNumberFormatValidator.msg.Invalid-number=The "{0}" field must contain a
positive number.
+NumberRangeValidator.msg.Invalid-number=The number in field "{0}" must be
between {1} and {2}.
+
#############################################################################
# Empty Iterator Validator #
#############################################################################
@@ -318,8 +320,8 @@
UIPortletForm.title=View/Edit Portlet
UIPortletForm.label.title=Portlet Title :
-UIPortletForm.label.width=#{word.width}:
-UIPortletForm.label.height=#{word.height}:
+UIPortletForm.label.width=#{word.width} (px):
+UIPortletForm.label.height=#{word.height} (px):
UIPortletForm.label.showInfoBar=Show Info Bar :
UIPortletForm.label.windowId=Window Id :
UIPortletForm.label.showPortletMode=Show Portlet Mode :
Modified:
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIPortletForm.java
===================================================================
---
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIPortletForm.java 2012-02-21
18:10:25 UTC (rev 8448)
+++
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIPortletForm.java 2012-02-21
21:23:23 UTC (rev 8449)
@@ -102,10 +102,10 @@
new UIFormStringInput("title", "title",
null).addValidator(StringLengthValidator.class, 3,
60).addValidator(NotHTMLTagValidator.class,
"UIPortletForm.msg.InvalidPortletTitle"))
.addUIFormInput(
- new UIFormStringInput("width", "width",
null).addValidator(ExpressionValidator.class, "(^([1-9]\\d*)px$)?",
+ new UIFormStringInput("width", "width",
null).addValidator(ExpressionValidator.class, "(^([1-9]\\d*)(px$|$))?",
"UIPortletForm.msg.InvalidWidthHeight")).addUIFormInput(
new UIFormStringInput("height", "height",
null).addValidator(ExpressionValidator.class,
- "(^([1-9]\\d*)px$)?",
"UIPortletForm.msg.InvalidWidthHeight")).addUIFormInput(
+ "(^([1-9]\\d*)(px$|$))?",
"UIPortletForm.msg.InvalidWidthHeight")).addUIFormInput(
new UIFormCheckBoxInput("showInfoBar", "showInfoBar",
false)).addUIFormInput(
new UIFormCheckBoxInput("showPortletMode",
"showPortletMode", false)).addUIFormInput(
new UIFormCheckBoxInput("showWindowState",
"showWindowState", false)).addUIFormInput(
@@ -385,6 +385,10 @@
}
else
{
+ if (!width.endsWith("px"))
+ {
+ width.concat("px");
+ }
uiPortlet.setWidth(width);
}
@@ -395,6 +399,10 @@
}
else
{
+ if (!height.endsWith("px"))
+ {
+ height.concat("px");
+ }
uiPortlet.setHeight(height);
}
Show replies by date