Author: adrianc
Date: Wed Jan 19 07:23:33 2011
New Revision: 1060699
URL:
http://svn.apache.org/viewvc?rev=1060699&view=revLog:
Fixed bug in collapsible screenlet - expand/collapse link wasn't working with JavaScript turned off.
Modified:
ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/MacroScreenRenderer.java
ofbiz/trunk/framework/widget/templates/htmlScreenMacroLibrary.ftl
Modified: ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/MacroScreenRenderer.java
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/MacroScreenRenderer.java?rev=1060699&r1=1060698&r2=1060699&view=diff==============================================================================
--- ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/MacroScreenRenderer.java (original)
+++ ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/MacroScreenRenderer.java Wed Jan 19 07:23:33 2011
@@ -597,7 +597,7 @@ public class MacroScreenRenderer impleme
collapseToolTip = (String) uiLabelMap.get("CommonCollapse");
}
if (!javaScriptEnabled) {
- requestParameters.put(screenlet.getPreferenceKey(context) + "_collapsed", "false");
+ requestParameters.put(screenlet.getPreferenceKey(context) + "_collapsed", collapsed ? "false" : "true");
String queryString = UtilHttp.urlEncodeArgs(requestParameters);
fullUrlString = request.getRequestURI() + "?" + queryString;
}
Modified: ofbiz/trunk/framework/widget/templates/htmlScreenMacroLibrary.ftl
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/templates/htmlScreenMacroLibrary.ftl?rev=1060699&r1=1060698&r2=1060699&view=diff==============================================================================
--- ofbiz/trunk/framework/widget/templates/htmlScreenMacroLibrary.ftl (original)
+++ ofbiz/trunk/framework/widget/templates/htmlScreenMacroLibrary.ftl Wed Jan 19 07:23:33 2011
@@ -117,7 +117,7 @@ under the License.
<#if collapsed>
collapsed"><a <#if javaScriptEnabled>onclick="javascript:toggleScreenlet(this, '${collapsibleAreaId}', '${saveCollapsed?string}', '${expandToolTip}', '${collapseToolTip}');"<#else>href="${fullUrlString}"</#if><#if expandToolTip?has_content> title="${expandToolTip}"</#if>
<#else>
-expanded"><a <#if javaScriptEnabled>onclick="javascript:toggleScreenlet(this, '${collapsibleAreaId}', '${saveCollapsed?string}', '${expandToolTip}', '${collapseToolTip}');"<#else>href="${fullUrlString}"</#if><#if expandToolTip?has_content> title="${expandToolTip}"</#if>
+expanded"><a <#if javaScriptEnabled>onclick="javascript:toggleScreenlet(this, '${collapsibleAreaId}', '${saveCollapsed?string}', '${expandToolTip}', '${collapseToolTip}');"<#else>href="${fullUrlString}"</#if><#if collapseToolTip?has_content> title="${collapseToolTip}"</#if>
</#if>
> </a></li>
</#if>