ofbiz-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From adri...@apache.org
Subject svn commit: r1211698 - in /ofbiz/branches/20111115ScreenWidgetRedesign/framework/widget: ./ src/org/ofbiz/widget/screen/MacroScreenRenderer.java templates/htmlFormMacroLibrary.ftl templates/htmlScreenMacroLibrary.ftl
Date Wed, 07 Dec 2011 23:10:20 GMT
Author: adrianc
Date: Wed Dec  7 23:10:19 2011
New Revision: 1211698

URL: http://svn.apache.org/viewvc?rev=1211698&view=rev
Log:
Screen Widget Redesign - merged trunk changes with branch.

Modified:
    ofbiz/branches/20111115ScreenWidgetRedesign/framework/widget/   (props changed)
    ofbiz/branches/20111115ScreenWidgetRedesign/framework/widget/src/org/ofbiz/widget/screen/MacroScreenRenderer.java
    ofbiz/branches/20111115ScreenWidgetRedesign/framework/widget/templates/htmlFormMacroLibrary.ftl
    ofbiz/branches/20111115ScreenWidgetRedesign/framework/widget/templates/htmlScreenMacroLibrary.ftl

Propchange: ofbiz/branches/20111115ScreenWidgetRedesign/framework/widget/
------------------------------------------------------------------------------
--- svn:mergeinfo (added)
+++ svn:mergeinfo Wed Dec  7 23:10:19 2011
@@ -0,0 +1,5 @@
+/ofbiz/branches/addbirt/framework/widget:831210-885099,885686-886087
+/ofbiz/branches/dojo1.4/framework/widget:951708-952957
+/ofbiz/branches/jquery/framework/widget:952958-1044489
+/ofbiz/branches/multitenant20100310/framework/widget:921280-927264
+/ofbiz/trunk/framework/widget:1204170,1206013,1209250

Modified: ofbiz/branches/20111115ScreenWidgetRedesign/framework/widget/src/org/ofbiz/widget/screen/MacroScreenRenderer.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/20111115ScreenWidgetRedesign/framework/widget/src/org/ofbiz/widget/screen/MacroScreenRenderer.java?rev=1211698&r1=1211697&r2=1211698&view=diff
==============================================================================
--- ofbiz/branches/20111115ScreenWidgetRedesign/framework/widget/src/org/ofbiz/widget/screen/MacroScreenRenderer.java
(original)
+++ ofbiz/branches/20111115ScreenWidgetRedesign/framework/widget/src/org/ofbiz/widget/screen/MacroScreenRenderer.java
Wed Dec  7 23:10:19 2011
@@ -613,19 +613,17 @@ public class MacroScreenRenderer impleme
                     fullUrlString = request.getRequestURI() + "?" + queryString;
                 }
             }
-            if (!collapsed) {
-                StringWriter sb = new StringWriter();
-                if (navMenu != null) {
-                    MenuStringRenderer savedRenderer = (MenuStringRenderer) context.get("menuStringRenderer");
-                    MenuStringRenderer renderer = new ScreenletMenuRenderer(request, response);
-                    context.put("menuStringRenderer", renderer);
-                    navMenu.renderWidgetString(sb, context, this);
-                    context.put("menuStringRenderer", savedRenderer);
-                } else if (navForm != null) {
-                    renderScreenletPaginateMenu(sb, context, navForm);
-                }
-                menuString = sb.toString();
+            StringWriter sb = new StringWriter();
+            if (navMenu != null) {
+                MenuStringRenderer savedRenderer = (MenuStringRenderer) context.get("menuStringRenderer");
+                MenuStringRenderer renderer = new ScreenletMenuRenderer(request, response);
+                context.put("menuStringRenderer", renderer);
+                navMenu.renderWidgetString(sb, context, this);
+                context.put("menuStringRenderer", savedRenderer);
+            } else if (navForm != null) {
+                renderScreenletPaginateMenu(sb, context, navForm);
             }
+            menuString = sb.toString();
         }
 
         Map<String, Object> parameters = FastMap.newInstance();

Modified: ofbiz/branches/20111115ScreenWidgetRedesign/framework/widget/templates/htmlFormMacroLibrary.ftl
URL: http://svn.apache.org/viewvc/ofbiz/branches/20111115ScreenWidgetRedesign/framework/widget/templates/htmlFormMacroLibrary.ftl?rev=1211698&r1=1211697&r2=1211698&view=diff
==============================================================================
--- ofbiz/branches/20111115ScreenWidgetRedesign/framework/widget/templates/htmlFormMacroLibrary.ftl
(original)
+++ ofbiz/branches/20111115ScreenWidgetRedesign/framework/widget/templates/htmlFormMacroLibrary.ftl
Wed Dec  7 23:10:19 2011
@@ -137,17 +137,23 @@ under the License.
 
                   jQuery("#${id}").change(function() {
                       var ofbizTime = "<#if shortDateInput?exists && shortDateInput>yyyy-MM-dd<#else>yyyy-MM-dd
HH:mm:ss</#if>";
-                      var dateObj = Date.parseExact(this.value, ofbizTime);
-                      var dateFormat = Date.CultureInfo.formatPatterns.shortDate<#if shortDateInput?exists
&& !shortDateInput> + " " + Date.CultureInfo.formatPatterns.longTime</#if>;
-                      var formatedObj = dateObj.toString(dateFormat);
-                      jQuery("#${id}_i18n").val(formatedObj);
+                      var newValue = ""
+                      if (this.value != "") {
+                          var dateObj = Date.parseExact(this.value, ofbizTime);
+                          var dateFormat = Date.CultureInfo.formatPatterns.shortDate<#if
shortDateInput?exists && !shortDateInput> + " " + Date.CultureInfo.formatPatterns.longTime</#if>;
+                          newValue = dateObj.toString(dateFormat);
+                      }
+                      jQuery("#${id}_i18n").val(newValue);
                   });
                   jQuery("#${id}_i18n").change(function() {
                       var dateFormat = Date.CultureInfo.formatPatterns.shortDate<#if shortDateInput?exists
&& !shortDateInput> + " " + Date.CultureInfo.formatPatterns.longTime</#if>;
-                      var dateObj = Date.parseExact(this.value, dateFormat);
-                      var ofbizTime = "<#if shortDateInput?exists && shortDateInput>yyyy-MM-dd<#else>yyyy-MM-dd
HH:mm:ss</#if>";
-                      var formatedObj = dateObj.toString(ofbizTime);
-                      jQuery("#${id}").val(formatedObj);
+                      var newValue = ""
+                      if (this.value != "") {
+                          var dateObj = Date.parseExact(this.value, dateFormat);
+                          var ofbizTime = "<#if shortDateInput?exists && shortDateInput>yyyy-MM-dd<#else>yyyy-MM-dd
HH:mm:ss</#if>";
+                          newValue = dateObj.toString(ofbizTime);
+                      }
+                      jQuery("#${id}").val(newValue);
                   });
               } else {
                   <#-- fallback if no language specific js date file is found -->
@@ -691,9 +697,9 @@ Parameter: lastViewName, String, optiona
 <li class="${paginateNextStyle}<#if highIndex lt listSize>"><a href="<#if
ajaxEnabled>javascript:ajaxUpdateAreas('${ajaxNextUrl}')<#else>${nextUrl}</#if>">${paginateNextLabel}</a><#else>-disabled"><span>${paginateNextLabel}</span></#if></li>
 <li class="${paginateLastStyle}<#if highIndex lt listSize>"><a href="<#if
ajaxEnabled>javascript:ajaxUpdateAreas('${ajaxLastUrl}')<#else>${lastUrl}</#if>">${paginateLastLabel}</a><#else>-disabled"><span>${paginateLastLabel}</span></#if></li>
 <#if javaScriptEnabled><li class="nav-pagesize"><select name="pageSize" size="1"
onchange="<#if ajaxEnabled>javascript:ajaxUpdateAreas('${ajaxSelectSizeUrl}')<#else>location.href='${selectSizeUrl}';</#if>"><#rt/>
-<#assign availPageSizes = [20, 30, 50, 100, 200]>
+<#assign availPageSizes = [viewSize, 20, 30, 50, 100, 200]>
 <#list availPageSizes as ps>
-  <option <#if viewSize == ps>selected="selected" </#if> value="${ps}">${ps}</option>
+  <option<#if viewSize == ps> selected="selected" </#if> value="${ps}">${ps}</option>
 </#list>
 </select> ${paginateViewSizeLabel}</li></#if>
 <li class="nav-displaying">${commonDisplaying}</li>

Modified: ofbiz/branches/20111115ScreenWidgetRedesign/framework/widget/templates/htmlScreenMacroLibrary.ftl
URL: http://svn.apache.org/viewvc/ofbiz/branches/20111115ScreenWidgetRedesign/framework/widget/templates/htmlScreenMacroLibrary.ftl?rev=1211698&r1=1211697&r2=1211698&view=diff
==============================================================================
--- ofbiz/branches/20111115ScreenWidgetRedesign/framework/widget/templates/htmlScreenMacroLibrary.ftl
(original)
+++ ofbiz/branches/20111115ScreenWidgetRedesign/framework/widget/templates/htmlScreenMacroLibrary.ftl
Wed Dec  7 23:10:19 2011
@@ -157,9 +157,12 @@ expanded"><a <#if javaScriptEnabled>oncl
 </#if>
 >&nbsp;</a></li>
 </#if>
+<#--
 <#if !collapsed>
 ${menuString}
 </#if>
+ -->
+${menuString}
 </ul><br class="clear" /></div>
 </#if>
 <div <#if collapsibleAreaId?has_content> id="${collapsibleAreaId}" <#if collapsed>
style="display: none;"</#if></#if><#if padded> class="screenlet-body"<#else>
class="screenlet-body no-padding"</#if>>



Mime
View raw message