Author: pranayp
Date: Tue Jul 5 13:41:14 2016 New Revision: 1751469 URL: http://svn.apache.org/viewvc?rev=1751469&view=rev Log: [OFBIZ-7636] No functional changes. framework ftl reformatting for better code readability. Thanks Vaibhav Jain for the contribution. Modified: ofbiz/trunk/framework/common/template/ChangePassword.ftl ofbiz/trunk/framework/common/template/GetSecurityQuestion.ftl ofbiz/trunk/framework/common/template/Login.ftl ofbiz/trunk/framework/common/template/ViewBlocked.ftl ofbiz/trunk/framework/common/template/includes/AjaxAutocompleteOptions.ftl ofbiz/trunk/framework/common/template/includes/CcYears.ftl ofbiz/trunk/framework/common/template/includes/CommonMacros.ftl ofbiz/trunk/framework/common/template/includes/Countries.ftl ofbiz/trunk/framework/common/template/includes/GenericLink.ftl ofbiz/trunk/framework/common/template/includes/GeoLocation.ftl ofbiz/trunk/framework/common/template/includes/GoogleGeoLocation.ftl ofbiz/trunk/framework/common/template/includes/HtmlHeaderForAjax.ftl ofbiz/trunk/framework/common/template/includes/HtmlTemplate.ftl ofbiz/trunk/framework/common/template/includes/InsertDropDown.ftl ofbiz/trunk/framework/common/template/includes/ListLocales.ftl ofbiz/trunk/framework/common/template/includes/ListVisualThemes.ftl ofbiz/trunk/framework/common/template/includes/Lookup.ftl ofbiz/trunk/framework/common/template/includes/LookupFooter.ftl ofbiz/trunk/framework/common/template/includes/Messages.ftl ofbiz/trunk/framework/common/template/includes/ReportTemplate.fo.ftl ofbiz/trunk/framework/common/template/includes/ServerHour24HourFormatJs.ftl ofbiz/trunk/framework/common/template/includes/SetDependentDropdownValuesJs.ftl ofbiz/trunk/framework/common/template/includes/SetMultipleSelectJs.ftl ofbiz/trunk/framework/common/template/includes/SetMultipleSelectJsList.ftl ofbiz/trunk/framework/common/template/includes/Simple.fo.ftl ofbiz/trunk/framework/common/template/includes/Simple.ftl ofbiz/trunk/framework/common/template/includes/Simple.xls.ftl ofbiz/trunk/framework/common/template/includes/States.ftl ofbiz/trunk/framework/common/template/includes/TimeDuration.ftl ofbiz/trunk/framework/common/template/includes/ViewCertificate.ftl Modified: ofbiz/trunk/framework/common/template/ChangePassword.ftl URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/template/ChangePassword.ftl?rev=1751469&r1=1751468&r2=1751469&view=diff ============================================================================== --- ofbiz/trunk/framework/common/template/ChangePassword.ftl (original) +++ ofbiz/trunk/framework/common/template/ChangePassword.ftl Tue Jul 5 13:41:14 2016 @@ -66,7 +66,9 @@ under the License. </tr> <tr> <td class="label">${uiLabelMap.SecurityAnswer}</td> - <td><input type="text" class='inputBox' name="securityAnswer" id="SECURITY_ANSWER" value="" maxlength="100" /></td> + <td> + <input type="text" class='inputBox' name="securityAnswer" id="SECURITY_ANSWER" value="" maxlength="100" /> + </td> </tr> </#if> <tr> Modified: ofbiz/trunk/framework/common/template/GetSecurityQuestion.ftl URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/template/GetSecurityQuestion.ftl?rev=1751469&r1=1751468&r2=1751469&view=diff ============================================================================== --- ofbiz/trunk/framework/common/template/GetSecurityQuestion.ftl (original) +++ ofbiz/trunk/framework/common/template/GetSecurityQuestion.ftl Tue Jul 5 13:41:14 2016 @@ -34,9 +34,9 @@ under the License. <tr> <td class="label">${uiLabelMap.SecurityQuestion}</td> <td> - ${securityQuestion.description!} - <input type="hidden" name="securityQuestion" value="${securityQuestion.enumId!}" /> - <input type="hidden" name="USERNAME" value="${userLoginId!}" /> + ${securityQuestion.description!} + <input type="hidden" name="securityQuestion" value="${securityQuestion.enumId!}" /> + <input type="hidden" name="USERNAME" value="${userLoginId!}" /> </td> </tr> <tr> @@ -74,4 +74,4 @@ under the License. </form> </div> </div> -</center> \ No newline at end of file +</center> Modified: ofbiz/trunk/framework/common/template/Login.ftl URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/template/Login.ftl?rev=1751469&r1=1751468&r2=1751469&view=diff ============================================================================== --- ofbiz/trunk/framework/common/template/Login.ftl (original) +++ ofbiz/trunk/framework/common/template/Login.ftl Tue Jul 5 13:41:14 2016 @@ -43,14 +43,14 @@ under the License. <td><input type="password" name="PASSWORD" value="" size="20"/></td> </tr> <#if ("Y" == useMultitenant) > - <#if !requestAttributes.userTenantId??> - <tr> - <td class="label">${uiLabelMap.CommonTenantId}</td> - <td><input type="text" name="userTenantId" value="${parameters.userTenantId!}" size="20"/></td> - </tr> - <#else> - <input type="hidden" name="userTenantId" value="${requestAttributes.userTenantId!}"/> - </#if> + <#if !requestAttributes.userTenantId??> + <tr> + <td class="label">${uiLabelMap.CommonTenantId}</td> + <td><input type="text" name="userTenantId" value="${parameters.userTenantId!}" size="20"/></td> + </tr> + <#else> + <input type="hidden" name="userTenantId" value="${requestAttributes.userTenantId!}"/> + </#if> </#if> <tr> <td colspan="2" align="center"> Modified: ofbiz/trunk/framework/common/template/ViewBlocked.ftl URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/template/ViewBlocked.ftl?rev=1751469&r1=1751468&r2=1751469&view=diff ============================================================================== --- ofbiz/trunk/framework/common/template/ViewBlocked.ftl (original) +++ ofbiz/trunk/framework/common/template/ViewBlocked.ftl Tue Jul 5 13:41:14 2016 @@ -23,8 +23,8 @@ under the License. <h3>${uiLabelMap.CommonViewBlocked}</h3> </div> <div class="screenlet-body"> - ${errorMessage!} - <br /> + ${errorMessage!} + <br /> </div> </div> </center> Modified: ofbiz/trunk/framework/common/template/includes/AjaxAutocompleteOptions.ftl URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/template/includes/AjaxAutocompleteOptions.ftl?rev=1751469&r1=1751468&r2=1751469&view=diff ============================================================================== --- ofbiz/trunk/framework/common/template/includes/AjaxAutocompleteOptions.ftl (original) +++ ofbiz/trunk/framework/common/template/includes/AjaxAutocompleteOptions.ftl Tue Jul 5 13:41:14 2016 @@ -17,56 +17,57 @@ specific language governing permissions under the License. --> <#if description??> - <#if autocompleteOptions??> - <#list autocompleteOptions as autocompleteOption> - <#assign displayString = ""/> - <#list displayFieldsSet as key> - <#assign field = autocompleteOption.get(key)!> - <#if field?has_content> - <#if (key != context.returnField)> - <#assign displayString = displayString + field + " "> - </#if> - </#if> - </#list> - <#if (displayString?trim?has_content )>${displayString?trim}</#if> - </#list> - </#if> + <#if autocompleteOptions??> + <#list autocompleteOptions as autocompleteOption> + <#assign displayString = ""/> + <#list displayFieldsSet as key> + <#assign field = autocompleteOption.get(key)!> + <#if field?has_content> + <#if (key != context.returnField)> + <#assign displayString = displayString + field + " "> + </#if> + </#if> + </#list> + <#if (displayString?trim?has_content )>${displayString?trim}</#if> + </#list> + </#if> <#else> <script type="text/javascript"> -var autocomp = [ - <#if autocompleteOptions?has_content> - <#if !displayReturnField??> - <#assign displayReturnField = Static["org.ofbiz.entity.util.EntityUtilProperties"].getPropertyValue("widget", "widget.autocompleter.displayReturnField", delegator)> - </#if> - <#list autocompleteOptions as autocompleteOption> - { - <#assign displayString = ""/> - <#assign returnField = ""/> - <#list displayFieldsSet as key> - <#assign field = autocompleteOption.get(key)!> - <#if field?has_content> - <#if (key == context.returnField)> + var autocomp = [ + <#if autocompleteOptions?has_content> + <#if !displayReturnField??> + <#assign displayReturnField = Static[ + "org.ofbiz.entity.util.EntityUtilProperties"].getPropertyValue( + "widget", "widget.autocompleter.displayReturnField", delegator)> + </#if> + <#list autocompleteOptions as autocompleteOption> + { + <#assign displayString = ""/> + <#assign returnField = ""/> + <#list displayFieldsSet as key> + <#assign field = autocompleteOption.get(key)!> + <#if field?has_content> + <#if (key == context.returnField)> <#assign returnField = field/> - <#else> + <#else> <#assign displayString = displayString + StringUtil.wrapString(field?string) + " "> + </#if> </#if> - </#if> - </#list> - <#if ("Y" == displayReturnField)> - <#assign displayString = displayString + "[" + returnField + "]"> - </#if> - "id": "${returnField}", - "label": "<#if (displayString?trim?has_content )>${displayString?trim}<#else>${returnField}</#if>", - "value": "${returnField}" - }<#if autocompleteOption_has_next>,</#if> - </#list> - <#else> - { - "id": "", - "label": "${uiLabelMap.CommonNoRecordFound}", - "value": "" - } - </#if> - ]; + </#list> + <#if ("Y" == displayReturnField)> + <#assign displayString = displayString + "[" + returnField + "]"> + </#if> + "id": "${returnField}", + "label": "<#if (displayString?trim?has_content )>${displayString?trim}<#else>${returnField}</#if>", + "value": "${returnField}" + }<#if autocompleteOption_has_next>,</#if> + </#list> + <#else> + { + "id": "", + "label": "${uiLabelMap.CommonNoRecordFound}", + "value": "" + } + </#if>]; </script> </#if> Modified: ofbiz/trunk/framework/common/template/includes/CcYears.ftl URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/template/includes/CcYears.ftl?rev=1751469&r1=1751468&r2=1751469&view=diff ============================================================================== --- ofbiz/trunk/framework/common/template/includes/CcYears.ftl (original) +++ ofbiz/trunk/framework/common/template/includes/CcYears.ftl Tue Jul 5 13:41:14 2016 @@ -21,6 +21,6 @@ under the License. <option></option> <#list 0..10 as i> - <#assign expireYear = thisYear + i> - <option value="${expireYear}">${expireYear}</option> + <#assign expireYear = thisYear + i> + <option value="${expireYear}">${expireYear}</option> </#list> \ No newline at end of file Modified: ofbiz/trunk/framework/common/template/includes/CommonMacros.ftl URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/template/includes/CommonMacros.ftl?rev=1751469&r1=1751468&r2=1751469&view=diff ============================================================================== --- ofbiz/trunk/framework/common/template/includes/CommonMacros.ftl (original) +++ ofbiz/trunk/framework/common/template/includes/CommonMacros.ftl Tue Jul 5 13:41:14 2016 @@ -24,63 +24,71 @@ your template file: --> <#assign - dayValueList = Static["org.ofbiz.service.calendar.ExpressionUiHelper"].getDayValueList(locale) - monthValueList = Static["org.ofbiz.service.calendar.ExpressionUiHelper"].getMonthValueList(locale) -/> + dayValueList = Static["org.ofbiz.service.calendar.ExpressionUiHelper"].getDayValueList(locale) + monthValueList = Static["org.ofbiz.service.calendar.ExpressionUiHelper"].getMonthValueList(locale)/> <#macro NullMacro></#macro> <#macro DateField formName="" fieldName="" fieldValue="" fieldClass=""> <#if javaScriptEnabled> - <@htmlTemplate.renderDateTimeField name="${fieldName}" event="${event!}" action="${action!}" className="${fieldClass!''}" alert="" title="Format: yyyy-MM-dd HH:mm:ss.SSS" value="${fieldValue!''}" size="25" maxlength="30" id="${fieldName}1" dateType="date" shortDateInput=false timeDropdownParamName="" defaultDateTimeString="" localizedIconTitle="" timeDropdown="" timeHourName="" classString="" hour1="" hour2="" timeMinutesName="" minutes="" isTwelveHour="" ampmName="" amSelected="" pmSelected="" compositeType="" formName=""/> + <@htmlTemplate.renderDateTimeField name="${fieldName}" event="${event!}" action="${action!}" + className="${fieldClass!''}" alert="" title="Format: yyyy-MM-dd HH:mm:ss.SSS" value="${fieldValue!''}" + size="25" maxlength="30" id="${fieldName}1" dateType="date" shortDateInput=false timeDropdownParamName="" + defaultDateTimeString="" localizedIconTitle="" timeDropdown="" timeHourName="" classString="" + hour1="" hour2="" timeMinutesName="" minutes="" isTwelveHour="" ampmName="" amSelected="" + pmSelected="" compositeType="" formName=""/> <#else> - <input type="text" name="${fieldName}"<#if fieldValue?has_content> value="${fieldValue}"</#if><#if fieldClass?has_content> class="${fieldClass}"</#if> maxlength="25" size="25"/> + <input type="text" name="${fieldName}"<#if fieldValue?has_content> + value="${fieldValue}"</#if><#if fieldClass?has_content> class="${fieldClass}"</#if> maxlength="25" + size="25"/> </#if> - <span class="tooltip">${uiLabelMap.CommonFormatDateTime}</span> +<span class="tooltip">${uiLabelMap.CommonFormatDateTime}</span> <#if fieldClass == "required"> - <span class="tooltip">${uiLabelMap.CommonRequired}</span> + <span class="tooltip">${uiLabelMap.CommonRequired}</span> </#if> </#macro> <#macro MonthField fieldName="" fieldValue=-1 fieldClass=""> - <select name="${fieldName}"<#if fieldClass?has_content> class="${fieldClass}"</#if>> - <#list monthValueList as monthValue> - <option value="${monthValue.value}"<#if monthValue.value == fieldValue> selected="selected"</#if>>${monthValue.description}</option> - </#list> - </select> +<select name="${fieldName}"<#if fieldClass?has_content> class="${fieldClass}"</#if>> + <#list monthValueList as monthValue> + <option value="${monthValue.value}"<#if monthValue.value == fieldValue> + selected="selected"</#if>>${monthValue.description}</option> + </#list> +</select> <#if fieldClass == "required"> - <span class="tooltip">${uiLabelMap.CommonRequired}</span> + <span class="tooltip">${uiLabelMap.CommonRequired}</span> </#if> </#macro> <#macro HourOfDayField fieldName="" fieldValue=-1 fieldClass=""> - <select name="${fieldName}"<#if fieldClass?has_content> class="${fieldClass}"</#if>> - <#list 0..23 as i> - <option value="${i}"<#if i == fieldValue> selected="selected"</#if>>${i}</option> - </#list> - </select> +<select name="${fieldName}"<#if fieldClass?has_content> class="${fieldClass}"</#if>> + <#list 0..23 as i> + <option value="${i}"<#if i == fieldValue> selected="selected"</#if>>${i}</option> + </#list> +</select> <#if fieldClass == "required"> - <span class="tooltip">${uiLabelMap.CommonRequired}</span> + <span class="tooltip">${uiLabelMap.CommonRequired}</span> </#if> </#macro> <#macro MinuteField fieldName="" fieldValue=-1 fieldClass=""> - <select name="${fieldName}"<#if fieldClass?has_content> class="${fieldClass}"</#if>> - <#list 0..59 as i> - <option value="${i}"<#if i == fieldValue> selected="selected"</#if>>${i}</option> - </#list> - </select> +<select name="${fieldName}"<#if fieldClass?has_content> class="${fieldClass}"</#if>> + <#list 0..59 as i> + <option value="${i}"<#if i == fieldValue> selected="selected"</#if>>${i}</option> + </#list> +</select> <#if fieldClass == "required"> <span class="tooltip">${uiLabelMap.CommonRequired}</span> </#if> </#macro> <#macro DayOfWeekField fieldName="" fieldValue=-1 fieldClass=""> - <select name="${fieldName}"<#if fieldClass?has_content> class="${fieldClass}"</#if>> - <#list dayValueList as dayValue> - <option value="${dayValue.value}"<#if dayValue.value == fieldValue> selected="selected"</#if>>${dayValue.description}</option> - </#list> - </select> +<select name="${fieldName}"<#if fieldClass?has_content> class="${fieldClass}"</#if>> + <#list dayValueList as dayValue> + <option value="${dayValue.value}"<#if dayValue.value == fieldValue> + selected="selected"</#if>>${dayValue.description}</option> + </#list> +</select> <#if fieldClass == "required"> <span class="tooltip">${uiLabelMap.CommonRequired}</span> </#if> @@ -99,7 +107,8 @@ your template file: <#macro fieldErrors fieldName> <#if errorMessageList?has_content> - <#assign fieldMessages = Static["org.ofbiz.base.util.MessageString"].getMessagesForField(fieldName, true, errorMessageList)> + <#assign fieldMessages = Static["org.ofbiz.base.util.MessageString"].getMessagesForField( + fieldName, true, errorMessageList)> <ul> <#list fieldMessages as errorMsg> <li class="errorMessage">${errorMsg}</li> @@ -110,7 +119,8 @@ your template file: <#macro fieldErrorsMulti fieldName1 fieldName2 fieldName3 fieldName4> <#if errorMessageList?has_content> - <#assign fieldMessages = Static["org.ofbiz.base.util.MessageString"].getMessagesForField(fieldName1, fieldName2, fieldName3, fieldName4, true, errorMessageList)> + <#assign fieldMessages = Static["org.ofbiz.base.util.MessageString"].getMessagesForField( + fieldName1, fieldName2, fieldName3, fieldName4, true, errorMessageList)> <ul> <#list fieldMessages as errorMsg> <li class="errorMessage">${errorMsg}</li> Modified: ofbiz/trunk/framework/common/template/includes/Countries.ftl URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/template/includes/Countries.ftl?rev=1751469&r1=1751468&r2=1751469&view=diff ============================================================================== --- ofbiz/trunk/framework/common/template/includes/Countries.ftl (original) +++ ofbiz/trunk/framework/common/template/includes/Countries.ftl Tue Jul 5 13:41:14 2016 @@ -18,9 +18,9 @@ under the License. --> <#assign countries = Static["org.ofbiz.common.CommonWorkers"].getCountryList(delegator)> <#list countries as country> - <#if defaultCountryGeoId??> - <option value='${country.geoId}' ${(country.geoId==defaultCountryGeoId)?string("selected=\"selected\"","")}>${country.get("geoName",locale)?default(country.geoId)}</option> - <#else> - <option value='${country.geoId}'>${country.get("geoName",locale)?default(country.geoId)}</option> - </#if> + <#if defaultCountryGeoId??> + <option value='${country.geoId}' ${(country.geoId==defaultCountryGeoId)?string("selected=\"selected\"","")}>${country.get("geoName",locale)?default(country.geoId)}</option> + <#else> + <option value='${country.geoId}'>${country.get("geoName",locale)?default(country.geoId)}</option> + </#if> </#list> Modified: ofbiz/trunk/framework/common/template/includes/GenericLink.ftl URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/template/includes/GenericLink.ftl?rev=1751469&r1=1751468&r2=1751469&view=diff ============================================================================== --- ofbiz/trunk/framework/common/template/includes/GenericLink.ftl (original) +++ ofbiz/trunk/framework/common/template/includes/GenericLink.ftl Tue Jul 5 13:41:14 2016 @@ -18,16 +18,18 @@ under the License. --> <#if requestParameters?? && genericLinkName?? && genericLinkTarget?? && genericLinkText??> -<form name="${genericLinkName}" <#if genericLinkWindow??>target="${genericLinkWindow}"</#if> action="<@ofbizUrl>${genericLinkTarget}</@ofbizUrl>" method="post"> -<#if (!excludeParameters?? || excludeParameters != "N") && requestParameters??> -<#assign requestParameterKeys = requestParameters.keySet().iterator()> -<#list requestParameterKeys as requestParameterKey> -<#assign requestParameterValue = requestParameters.get(requestParameterKey)> -<#if requestParameterValue?? && requestParameterValue?has_content> -<input type="hidden" name="${requestParameterKey}" value="${requestParameterValue}"/> -</#if> -</#list> -</#if> -<a href="javascript:document.${genericLinkName}.submit();" <#if genericLinkStyle??>class="${genericLinkStyle}"</#if>>${genericLinkText}</a> -</form> + <form name="${genericLinkName}" <#if genericLinkWindow??>target="${genericLinkWindow}"</#if> + action="<@ofbizUrl>${genericLinkTarget}</@ofbizUrl>" method="post"> + <#if (!excludeParameters?? || excludeParameters != "N") && requestParameters??> + <#assign requestParameterKeys = requestParameters.keySet().iterator()> + <#list requestParameterKeys as requestParameterKey> + <#assign requestParameterValue = requestParameters.get(requestParameterKey)> + <#if requestParameterValue?? && requestParameterValue?has_content> + <input type="hidden" name="${requestParameterKey}" value="${requestParameterValue}"/> + </#if> + </#list> + </#if> + <a href="javascript:document.${genericLinkName}.submit();" + <#if genericLinkStyle??>class="${genericLinkStyle}"</#if>>${genericLinkText}</a> + </form> </#if> Modified: ofbiz/trunk/framework/common/template/includes/GeoLocation.ftl URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/template/includes/GeoLocation.ftl?rev=1751469&r1=1751468&r2=1751469&view=diff ============================================================================== --- ofbiz/trunk/framework/common/template/includes/GeoLocation.ftl (original) +++ ofbiz/trunk/framework/common/template/includes/GeoLocation.ftl Tue Jul 5 13:41:14 2016 @@ -17,127 +17,132 @@ specific language governing permissions under the License. --> <#if geoChart?has_content> - <#-- ================================= Golbal Init ======================================--> - <#if geoChart.id?has_content> - <#assign id = geoChart.id> - <#else> - <#assign id = "map_canvas"> - </#if> - - <#if geoChart.center?has_content> - <#assign center = geoChart.center> - <#assign zoom = geoChart.center.zoom> - <#elseif geoChart.points?has_content> - <#assign center = geoChart.points[0]> - <#assign zoom = 15> <#-- 0=World, 19=max zoom in --> - <#else> - <#-- hardcoded in GEOPT_ADDRESS_GOOGLE, simpler --> +<#-- ================================= Golbal Init ======================================--> + <#if geoChart.id?has_content> + <#assign id = geoChart.id> + <#else> + <#assign id = "map_canvas"> + </#if> + + <#if geoChart.center?has_content> + <#assign center = geoChart.center> + <#assign zoom = geoChart.center.zoom> + <#elseif geoChart.points?has_content> + <#assign center = geoChart.points[0]> + <#assign zoom = 15> <#-- 0=World, 19=max zoom in --> + <#else> + <#-- hardcoded in GEOPT_ADDRESS_GOOGLE, simpler --> + </#if> + +<#-- ================================= Google Maps Init ======================================--> + <#if geoChart.dataSourceId?has_content> + <#if geoChart.dataSourceId?substring(geoChart.dataSourceId?length-6 , geoChart.dataSourceId?length) == "GOOGLE"> + <div id="${id}" + style="border:1px solid #979797; background-color:#e5e3df; width:${geoChart.width}; height:${geoChart.height}; margin:2em auto;"> + <div style="padding:1em; color:gray;">${uiLabelMap.CommonLoading}</div> + </div> + <script src="https://maps.googleapis.com/maps/api/js?sensor=false" type="text/javascript"></script> </#if> - - <#-- ================================= Google Maps Init ======================================--> - <#if geoChart.dataSourceId?has_content> - <#if geoChart.dataSourceId?substring(geoChart.dataSourceId?length-6 , geoChart.dataSourceId?length) == "GOOGLE"> - <div id="${id}" style="border:1px solid #979797; background-color:#e5e3df; width:${geoChart.width}; height:${geoChart.height}; margin:2em auto;"> - <div style="padding:1em; color:gray;">${uiLabelMap.CommonLoading}</div> - </div> - <script src="https://maps.googleapis.com/maps/api/js?sensor=false" type="text/javascript"></script> - </#if> - <#-- ================================= Here we go with different types of maps renderer ======================================--> - <#if geoChart.dataSourceId == "GEOPT_GOOGLE"> - <script type="text/javascript"> - function showAllMarkers(map, points) { - if (points.length > 1) { - var latlngbounds = new google.maps.LatLngBounds(); - for (var i = 0; i < latlngs.length; i++) { + <#-- ========================== Here we go with different types of maps renderer ===========================--> + <#if geoChart.dataSourceId == "GEOPT_GOOGLE"> + <script type="text/javascript"> + function showAllMarkers(map, points) { + if (points.length > 1) { + var latlngbounds = new google.maps.LatLngBounds(); + for (var i = 0; i < latlngs.length; i++) { latlngbounds.extend(latlngs[i]); - } - map.fitBounds(latlngbounds); } + map.fitBounds(latlngbounds); } - - var map = new google.maps.Map(document.getElementById("${id}"), - <#if geoChart.points?has_content> - { center: new google.maps.LatLng(${center.lat}, ${center.lon}), - zoom: ${zoom}, - mapTypeId: google.maps.MapTypeId.ROADMAP - }); - <#list geoChart.points as point> - var marker_${point_index} = new google.maps.Marker({ + } + + var map = new google.maps.Map(document.getElementById("${id}"), + <#if geoChart.points?has_content> + { + center: new google.maps.LatLng(${center.lat}, ${center.lon}), + zoom: ${zoom}, + mapTypeId: google.maps.MapTypeId.ROADMAP + }); + <#list geoChart.points as point> + var marker_${point_index} = new google.maps.Marker({ position: new google.maps.LatLng(${point.lat}, ${point.lon}), map: map + }); + <#if point.link?has_content> + var infoWindow = new google.maps.InfoWindow(); + google.maps.event.addListener(marker_${point_index}, "click", function () { + infoWindow.setContent(( + "<div style=\"width:210px; padding-right:10px;\"><a href=${point.link.url}>${point.link.label}</a></div>")); + infoWindow.setPosition(marker_${point_index}.getPosition()); + infoWindow.open(map); }); - <#if point.link?has_content> - var infoWindow = new google.maps.InfoWindow(); - google.maps.event.addListener(marker_${point_index}, "click", function() { - infoWindow.setContent(("<div style=\"width:210px; padding-right:10px;\"><a href=${point.link.url}>${point.link.label}</a></div>")); - infoWindow.setPosition(marker_${point_index}.getPosition()); - infoWindow.open(map); - }); - </#if> - </#list> - var latlngs = [ - <#list geoChart.points as point> - new google.maps.LatLng(${point.lat}, ${point.lon})<#if point_has_next>,</#if> - </#list> - ]; - showAllMarkers(map, latlngs); </#if> - </script> - <#elseif geoChart.dataSourceId == "GEOPT_YAHOO"> - <#elseif geoChart.dataSourceId == "GEOPT_MICROSOFT"> - <#elseif geoChart.dataSourceId == "GEOPT_MAPTP"> - <#elseif geoChart.dataSourceId == "GEOPT_ADDRESS_GOOGLE"> - <script type="text/javascript"> - var geocoder = new google.maps.Geocoder(); - var map = new google.maps.Map(document.getElementById("${id}"), - { center: new google.maps.LatLng(38, 15), - zoom: 15, // 0=World, 19=max zoom in - mapTypeId: google.maps.MapTypeId.ROADMAP - }); - geocoder.geocode({'address': "${pointAddress}"}, function(result, status) { + </#list> + var latlngs = [ + <#list geoChart.points as point> + new google.maps.LatLng(${point.lat}, ${point.lon})<#if point_has_next>,</#if> + </#list>]; + showAllMarkers(map, latlngs); + </#if> + </script> + <#elseif geoChart.dataSourceId == "GEOPT_YAHOO"> + <#elseif geoChart.dataSourceId == "GEOPT_MICROSOFT"> + <#elseif geoChart.dataSourceId == "GEOPT_MAPTP"> + <#elseif geoChart.dataSourceId == "GEOPT_ADDRESS_GOOGLE"> + <script type="text/javascript"> + var geocoder = new google.maps.Geocoder(); + var map = new google.maps.Map(document.getElementById("${id}"), + { + center: new google.maps.LatLng(38, 15), + zoom: 15, // 0=World, 19=max zoom in + mapTypeId: google.maps.MapTypeId.ROADMAP + }); + geocoder.geocode({'address': "${pointAddress}"}, function (result, status) { if (status != google.maps.GeocoderStatus.OK) { - showErrorAlert("${uiLabelMap.CommonErrorMessage2}","${uiLabelMap.CommonAddressNotFound}"); + showErrorAlert("${uiLabelMap.CommonErrorMessage2}", "${uiLabelMap.CommonAddressNotFound}"); } else { - var position = result[0].geometry.location; - map.setCenter(position); - map.fitBounds(result[0].geometry.viewport); - var marker = new google.maps.Marker({ - position: position, - map: map - }); + var position = result[0].geometry.location; + map.setCenter(position); + map.fitBounds(result[0].geometry.viewport); + var marker = new google.maps.Marker({ + position: position, + map: map + }); } - }); - </script> - <#elseif geoChart.dataSourceId == "GEOPT_OSM"> - <div id="${id}" style="border:1px solid #979797; background-color:#e5e3df; width:${geoChart.width}; height:${geoChart.height}; margin:2em auto;"></div> - <#-- due to https://github.com/openlayers/openlayers/issues/1025 rather use a local version loaded by framework/common/widget/CommonScreens.xml --> - <#-- script src="//www.openlayers.org/api/OpenLayers.js"></script--> - <script type="text/javascript"> - map = new OpenLayers.Map("${id}"); - map.addLayer(new OpenLayers.Layer.OSM()); - var zoom = ${zoom}; - var center= new OpenLayers.LonLat(${center.lon},${center.lat}) + }); + </script> + <#elseif geoChart.dataSourceId == "GEOPT_OSM"> + <div id="${id}" style="border:1px solid #979797; background-color:#e5e3df; width:${geoChart.width}; height:${geoChart.height}; margin:2em auto;"></div> + <#-- + due to https://github.com/openlayers/openlayers/issues/1025 + rather use a local version loaded by framework/common/widget/CommonScreens.xml --> + <#-- script src="//www.openlayers.org/api/OpenLayers.js"></script--> + <script type="text/javascript"> + map = new OpenLayers.Map("${id}"); + map.addLayer(new OpenLayers.Layer.OSM()); + var zoom = ${zoom}; + var center = new OpenLayers.LonLat(${center.lon},${center.lat}) .transform(new OpenLayers.Projection("EPSG:4326"), // transform from WGS 1984 - map.getProjectionObject() // to Spherical Mercator Projection - ); - var markers = new OpenLayers.Layer.Markers("Markers"); - map.addLayer(markers); - <#if geoChart.points?has_content> - <#list geoChart.points as point> - markers.addMarker(new OpenLayers.Marker(new OpenLayers.LonLat(${point.lon} ,${point.lat}).transform( - new OpenLayers.Projection("EPSG:4326"), map.getProjectionObject()))); - </#list> - </#if> - map.addControl(new OpenLayers.Control.PanZoomBar()); - map.addControl(new OpenLayers.Control.NavToolbar()); - - map.setCenter(center, zoom); - var newBound = markers.getDataExtent(); - map.zoomToExtent(newBound); - </script> - </#if> + map.getProjectionObject() // to Spherical Mercator Projection + ); + var markers = new OpenLayers.Layer.Markers("Markers"); + map.addLayer(markers); + <#if geoChart.points?has_content> + <#list geoChart.points as point> + markers.addMarker(new OpenLayers.Marker(new OpenLayers.LonLat(${point.lon},${point.lat}).transform( + new OpenLayers.Projection("EPSG:4326"), map.getProjectionObject()))); + </#list> + </#if> + map.addControl(new OpenLayers.Control.PanZoomBar()); + map.addControl(new OpenLayers.Control.NavToolbar()); + + map.setCenter(center, zoom); + var newBound = markers.getDataExtent(); + map.zoomToExtent(newBound); + </script> </#if> + </#if> <#else> <h2>${uiLabelMap.CommonNoGeolocationAvailable}</h2> </#if> Modified: ofbiz/trunk/framework/common/template/includes/GoogleGeoLocation.ftl URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/template/includes/GoogleGeoLocation.ftl?rev=1751469&r1=1751468&r2=1751469&view=diff ============================================================================== --- ofbiz/trunk/framework/common/template/includes/GoogleGeoLocation.ftl (original) +++ ofbiz/trunk/framework/common/template/includes/GoogleGeoLocation.ftl Tue Jul 5 13:41:14 2016 @@ -23,29 +23,30 @@ under the License. var geocoder = new google.maps.Geocoder(); var center = new google.maps.LatLng(${latitude!38}, ${longitude!15}); var map = new google.maps.Map(document.getElementById("map"), - { center: center, - zoom: 15, // 0=World, 19=max zoom in - mapTypeId: google.maps.MapTypeId.ROADMAP - }); + { + center: center, + zoom: 15, // 0=World, 19=max zoom in + mapTypeId: google.maps.MapTypeId.ROADMAP + }); var marker = new google.maps.Marker({ - position: center, - map: map, - draggable: true + position: center, + map: map, + draggable: true }); - + document.getElementById("lat").value = center.lat().toFixed(5); document.getElementById("lng").value = center.lng().toFixed(5); - google.maps.event.addListener(marker, "dragend", function() { - var point = marker.getPosition(); - map.panTo(point); - document.getElementById("lat").value = point.lat().toFixed(5); - document.getElementById("lng").value = point.lng().toFixed(5); + google.maps.event.addListener(marker, "dragend", function () { + var point = marker.getPosition(); + map.panTo(point); + document.getElementById("lat").value = point.lat().toFixed(5); + document.getElementById("lng").value = point.lng().toFixed(5); }); - - - google.maps.event.addListener(map, "moveend", function() { + + + google.maps.event.addListener(map, "moveend", function () { map.clearOverlays(); var center = map.getCenter(); var marker = new GMarker(center, {draggable: true}); @@ -53,8 +54,8 @@ under the License. document.getElementById("lat").value = center.lat().toFixed(5); document.getElementById("lng").value = center.lng().toFixed(5); }); - - google.maps.event.addListener(marker, "dragend", function() { + + google.maps.event.addListener(marker, "dragend", function () { var point = marker.getPoint(); map.panTo(point); document.getElementById("lat").value = point.lat().toFixed(5); @@ -64,54 +65,55 @@ under the License. function showAddress(address) { var map = new google.maps.Map(document.getElementById("map"), - { center: new google.maps.LatLng(${latitude!38}, ${longitude!15}), - zoom: 15, // 0=World, 19=max zoom in - mapTypeId: google.maps.MapTypeId.ROADMAP - }); + { + center: new google.maps.LatLng(${latitude!38}, ${longitude!15}), + zoom: 15, // 0=World, 19=max zoom in + mapTypeId: google.maps.MapTypeId.ROADMAP + }); var geocoder = new google.maps.Geocoder(); if (geocoder) { - geocoder.geocode({'address': address}, function(result, status) { - if (status != google.maps.GeocoderStatus.OK) { - showErrorAlert("${uiLabelMap.CommonErrorMessage2}","${uiLabelMap.CommonAddressNotFound}"); - } else { - var point = result[0].geometry.location; - var lat = point.lat().toFixed(5); - var lng = point.lng().toFixed(5); - document.getElementById("lat").value = lat; - document.getElementById("lng").value = lng; - //map.clearOverlays() - map.setCenter(point, 14); - - var marker = new google.maps.Marker({ - position: new google.maps.LatLng(lat, lng), - map: map, - draggable: true - }); - - google.maps.event.addListener(marker, "dragend", function() { - var point = marker.getPosition(); - map.panTo(point); - document.getElementById("lat").value = point.lat().toFixed(5); - document.getElementById("lng").value = point.lng().toFixed(5); - }); + geocoder.geocode({'address': address}, function (result, status) { + if (status != google.maps.GeocoderStatus.OK) { + showErrorAlert("${uiLabelMap.CommonErrorMessage2}", "${uiLabelMap.CommonAddressNotFound}"); + } else { + var point = result[0].geometry.location; + var lat = point.lat().toFixed(5); + var lng = point.lng().toFixed(5); + document.getElementById("lat").value = lat; + document.getElementById("lng").value = lng; + //map.clearOverlays() + map.setCenter(point, 14); - google.maps.event.addListener(map, "moveend", function() { - //map.clearOverlays(); - var center = map.getCenter(); - var marker = new google.maps.Marker(center, {draggable: true}); - map.addOverlay(marker); - document.getElementById("lat").value = center.lat().toFixed(5); - document.getElementById("lng").value = center.lng().toFixed(5); - }); + var marker = new google.maps.Marker({ + position: new google.maps.LatLng(lat, lng), + map: map, + draggable: true + }); - google.maps.event.addListener(marker, "dragend", function() { - var pt = marker.getPoint(); - map.panTo(pt); - document.getElementById("lat").value = pt.lat().toFixed(5); - document.getElementById("lng").value = pt.lng().toFixed(5); - }); - } - }); + google.maps.event.addListener(marker, "dragend", function () { + var point = marker.getPosition(); + map.panTo(point); + document.getElementById("lat").value = point.lat().toFixed(5); + document.getElementById("lng").value = point.lng().toFixed(5); + }); + + google.maps.event.addListener(map, "moveend", function () { + //map.clearOverlays(); + var center = map.getCenter(); + var marker = new google.maps.Marker(center, {draggable: true}); + map.addOverlay(marker); + document.getElementById("lat").value = center.lat().toFixed(5); + document.getElementById("lng").value = center.lng().toFixed(5); + }); + + google.maps.event.addListener(marker, "dragend", function () { + var pt = marker.getPoint(); + map.panTo(pt); + document.getElementById("lat").value = pt.lat().toFixed(5); + document.getElementById("lng").value = pt.lng().toFixed(5); + }); + } + }); } } </script> Modified: ofbiz/trunk/framework/common/template/includes/HtmlHeaderForAjax.ftl URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/template/includes/HtmlHeaderForAjax.ftl?rev=1751469&r1=1751468&r2=1751469&view=diff ============================================================================== --- ofbiz/trunk/framework/common/template/includes/HtmlHeaderForAjax.ftl (original) +++ ofbiz/trunk/framework/common/template/includes/HtmlHeaderForAjax.ftl Tue Jul 5 13:41:14 2016 @@ -19,7 +19,7 @@ under the License. <#assign docLangAttr = locale.toString()?replace("_", "-")> <#assign langDir = "ltr"> <#if "ar.iw"?contains(docLangAttr?substring(0, 2))> - <#assign langDir = "rtl"> + <#assign langDir = "rtl"> </#if> <html lang="${docLangAttr}" dir="${langDir}" xmlns="http://www.w3.org/1999/xhtml"> <head> Modified: ofbiz/trunk/framework/common/template/includes/HtmlTemplate.ftl URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/template/includes/HtmlTemplate.ftl?rev=1751469&r1=1751468&r2=1751469&view=diff ============================================================================== --- ofbiz/trunk/framework/common/template/includes/HtmlTemplate.ftl (original) +++ ofbiz/trunk/framework/common/template/includes/HtmlTemplate.ftl Tue Jul 5 13:41:14 2016 @@ -20,50 +20,50 @@ under the License. <#include "component://widget/templates/HtmlFormMacroLibrary.ftl"/> <#macro lookupField className="" alert="" name="" value="" size="20" maxlength="20" id="" event="" action="" readonly="" autocomplete="" descriptionFieldName="" formName="" fieldFormName="" targetParameterIter="" imgSrc="" ajaxUrl="" ajaxEnabled="" presentation="layer" width="" height="" position="topleft" fadeBackground="true" clearText="" showDescription="" initiallyCollapsed="" tabindex=""> - <#if (!ajaxEnabled?has_content)> - <#assign javascriptEnabled = Static["org.ofbiz.base.util.UtilHttp"].isJavaScriptEnabled(request) /> - <#if (javascriptEnabled)> - <#local ajaxEnabled = true> - </#if> - </#if> - <#if (!id?has_content)> - <#local id = Static["org.ofbiz.base.util.UtilHttp"].getNextUniqueId(request) /> - </#if> - <#if "true" == readonly> - <#local readonly = true/> - <#else> - <#local readonly = false /> - </#if> - <#if userPreferences.VISUAL_THEME == "BIZZNESS_TIME"> - <#local position = "center" /> - </#if> - <@renderLookupField name formName fieldFormName className alert value size maxlength id event action readonly autocomplete descriptionFieldName targetParameterIter imgSrc ajaxUrl ajaxEnabled presentation width height position fadeBackground clearText showDescription initiallyCollapsed tabindex/> + <#if (!ajaxEnabled?has_content)> + <#assign javascriptEnabled = Static["org.ofbiz.base.util.UtilHttp"].isJavaScriptEnabled(request) /> + <#if (javascriptEnabled)> + <#local ajaxEnabled = true> + </#if> + </#if> + <#if (!id?has_content)> + <#local id = Static["org.ofbiz.base.util.UtilHttp"].getNextUniqueId(request) /> + </#if> + <#if "true" == readonly> + <#local readonly = true/> + <#else> + <#local readonly = false /> + </#if> + <#if userPreferences.VISUAL_THEME == "BIZZNESS_TIME"> + <#local position = "center" /> + </#if> + <@renderLookupField name formName fieldFormName className alert value size maxlength id event action readonly autocomplete descriptionFieldName targetParameterIter imgSrc ajaxUrl ajaxEnabled presentation width height position fadeBackground clearText showDescription initiallyCollapsed tabindex/> </#macro> <#macro nextPrev commonUrl="" ajaxEnabled=false javaScriptEnabled=false paginateStyle="nav-pager" paginateFirstStyle="nav-first" viewIndex=0 highIndex=0 listSize=0 viewSize=1 ajaxFirstUrl="" firstUrl="" paginateFirstLabel="" paginatePreviousStyle="nav-previous" ajaxPreviousUrl="" previousUrl="" paginatePreviousLabel="" pageLabel="" ajaxSelectUrl="" selectUrl="" ajaxSelectSizeUrl="" selectSizeUrl="" commonDisplaying="" paginateNextStyle="nav-next" ajaxNextUrl="" nextUrl="" paginateNextLabel="" paginateLastStyle="nav-last" ajaxLastUrl="" lastUrl="" paginateLastLabel="" paginateViewSizeLabel="" > - <#local javaScriptEnabled = javaScriptEnabled /> - <#if (!javaScriptEnabled)> - <#local javaScriptEnabled = Static["org.ofbiz.base.util.UtilHttp"].isJavaScriptEnabled(request) /> - </#if> - <#if (commonUrl?has_content)> - <#if (!firstUrl?has_content)> - <#local firstUrl=commonUrl+"VIEW_SIZE=${viewSize}&VIEW_INDEX=${viewIndexFirst}"/> - </#if> - <#if (!previousUrl?has_content)> - <#local previousUrl=commonUrl+"VIEW_SIZE=${viewSize}&VIEW_INDEX=${viewIndexPrevious}"/> - </#if> - <#if (!nextUrl?has_content)> - <#local nextUrl=commonUrl+"VIEW_SIZE=${viewSize}&VIEW_INDEX=${viewIndexNext}"/> - </#if> - <#if (!lastUrl?has_content)> - <#local lastUrl=commonUrl+"VIEW_SIZE=${viewSize}&VIEW_INDEX=${viewIndexLast}"/> - </#if> - <#if (!selectUrl?has_content)> - <#local selectUrl=commonUrl+"VIEW_SIZE=${viewSize}&VIEW_INDEX="/> - </#if> - <#if (!selectSizeUrl?has_content)> - <#local selectSizeUrl=commonUrl+"VIEW_SIZE='+this.value+'&VIEW_INDEX=0"/> - </#if> + <#local javaScriptEnabled = javaScriptEnabled /> + <#if (!javaScriptEnabled)> + <#local javaScriptEnabled = Static["org.ofbiz.base.util.UtilHttp"].isJavaScriptEnabled(request) /> + </#if> + <#if (commonUrl?has_content)> + <#if (!firstUrl?has_content)> + <#local firstUrl=commonUrl+"VIEW_SIZE=${viewSize}&VIEW_INDEX=${viewIndexFirst}"/> + </#if> + <#if (!previousUrl?has_content)> + <#local previousUrl=commonUrl+"VIEW_SIZE=${viewSize}&VIEW_INDEX=${viewIndexPrevious}"/> + </#if> + <#if (!nextUrl?has_content)> + <#local nextUrl=commonUrl+"VIEW_SIZE=${viewSize}&VIEW_INDEX=${viewIndexNext}"/> + </#if> + <#if (!lastUrl?has_content)> + <#local lastUrl=commonUrl+"VIEW_SIZE=${viewSize}&VIEW_INDEX=${viewIndexLast}"/> + </#if> + <#if (!selectUrl?has_content)> + <#local selectUrl=commonUrl+"VIEW_SIZE=${viewSize}&VIEW_INDEX="/> + </#if> + <#if (!selectSizeUrl?has_content)> + <#local selectSizeUrl=commonUrl+"VIEW_SIZE='+this.value+'&VIEW_INDEX=0"/> </#if> - <@renderNextPrev paginateStyle paginateFirstStyle viewIndex highIndex listSize viewSize ajaxEnabled javaScriptEnabled ajaxFirstUrl firstUrl uiLabelMap.CommonFirst paginatePreviousStyle ajaxPreviousUrl previousUrl uiLabelMap.CommonPrevious uiLabelMap.CommonPage ajaxSelectUrl selectUrl ajaxSelectSizeUrl selectSizeUrl commonDisplaying paginateNextStyle ajaxNextUrl nextUrl uiLabelMap.CommonNext paginateLastStyle ajaxLastUrl lastUrl uiLabelMap.CommonLast uiLabelMap.CommonItemsPerPage/> + </#if> + <@renderNextPrev paginateStyle paginateFirstStyle viewIndex highIndex listSize viewSize ajaxEnabled javaScriptEnabled ajaxFirstUrl firstUrl uiLabelMap.CommonFirst paginatePreviousStyle ajaxPreviousUrl previousUrl uiLabelMap.CommonPrevious uiLabelMap.CommonPage ajaxSelectUrl selectUrl ajaxSelectSizeUrl selectSizeUrl commonDisplaying paginateNextStyle ajaxNextUrl nextUrl uiLabelMap.CommonNext paginateLastStyle ajaxLastUrl lastUrl uiLabelMap.CommonLast uiLabelMap.CommonItemsPerPage/> </#macro> Modified: ofbiz/trunk/framework/common/template/includes/InsertDropDown.ftl URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/template/includes/InsertDropDown.ftl?rev=1751469&r1=1751468&r2=1751469&view=diff ============================================================================== --- ofbiz/trunk/framework/common/template/includes/InsertDropDown.ftl (original) +++ ofbiz/trunk/framework/common/template/includes/InsertDropDown.ftl Tue Jul 5 13:41:14 2016 @@ -20,18 +20,20 @@ under the License. ${StringUtil.wrapString(topLine.textBegin!)} <#assign listSize = topLine.dropDownList.size()> <#if topLine.dropDownList.size() gt 1> -<form method="post" action="<@ofbizUrl>${topLine.action}</@ofbizUrl>" onsubmit="javascript:submitFormDisableSubmits(this)" name="${topLine.action}" id="${topLine.action}"> - <#if topLine.hiddenFieldList??> - <#list topLine.hiddenFieldList as field> - <input type="hidden" name="${field.name}" value="${field.value}"/> - </#list> - </#if> - <select name="${topLine.selectionName!}" onchange="javascript:document.${topLine.action}.submit();"> - <#list topLine.dropDownList as option> - <option <#if option.key == topLine.selectedKey >selected="selected"</#if> value="${option.key!}">${option.value!}</option> - </#list> - </select> -</form> + <form method="post" action="<@ofbizUrl>${topLine.action}</@ofbizUrl>" + onsubmit="javascript:submitFormDisableSubmits(this)" name="${topLine.action}" id="${topLine.action}"> + <#if topLine.hiddenFieldList??> + <#list topLine.hiddenFieldList as field> + <input type="hidden" name="${field.name}" value="${field.value}"/> + </#list> + </#if> + <select name="${topLine.selectionName!}" onchange="javascript:document.${topLine.action}.submit();"> + <#list topLine.dropDownList as option> + <option <#if option.key == topLine.selectedKey >selected="selected"</#if> + value="${option.key!}">${option.value!}</option> + </#list> + </select> + </form> <#else> ${topLine.dropDownList[0].value!} </#if> Modified: ofbiz/trunk/framework/common/template/includes/ListLocales.ftl URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/template/includes/ListLocales.ftl?rev=1751469&r1=1751468&r2=1751469&view=diff ============================================================================== --- ofbiz/trunk/framework/common/template/includes/ListLocales.ftl (original) +++ ofbiz/trunk/framework/common/template/includes/ListLocales.ftl Tue Jul 5 13:41:14 2016 @@ -28,17 +28,19 @@ under the License. <#assign altRow = true> <#assign availableLocales = Static["org.ofbiz.base.util.UtilMisc"].availableLocales()/> <#list availableLocales as availableLocale> - <#assign altRow = !altRow> - <#assign langAttr = availableLocale.toString()?replace("_", "-")> - <#assign langDir = "ltr"> - <#if "ar.iw"?contains(langAttr?substring(0, 2))> - <#assign langDir = "rtl"> - </#if> - <tr <#if altRow>class="alternate-row"</#if>> - <td lang="${langAttr}" dir="${langDir}"> - <a href="<@ofbizUrl>setSessionLocale</@ofbizUrl>?newLocale=${availableLocale.toString()}">${availableLocale.getDisplayName(availableLocale)} - [${langAttr}]</a> - </td> - </tr> + <#assign altRow = !altRow> + <#assign langAttr = availableLocale.toString()?replace("_", "-")> + <#assign langDir = "ltr"> + <#if "ar.iw"?contains(langAttr?substring(0, 2))> + <#assign langDir = "rtl"> + </#if> + <tr <#if altRow>class="alternate-row"</#if>> + <td lang="${langAttr}" dir="${langDir}"> + <a href="<@ofbizUrl>setSessionLocale</@ofbizUrl>?newLocale=${availableLocale.toString()}"> + ${availableLocale.getDisplayName(availableLocale)} + - [${langAttr}]</a> + </td> + </tr> </#list> </table> </div> Modified: ofbiz/trunk/framework/common/template/includes/ListVisualThemes.ftl URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/template/includes/ListVisualThemes.ftl?rev=1751469&r1=1751468&r2=1751469&view=diff ============================================================================== --- ofbiz/trunk/framework/common/template/includes/ListVisualThemes.ftl (original) +++ ofbiz/trunk/framework/common/template/includes/ListVisualThemes.ftl Tue Jul 5 13:41:14 2016 @@ -25,20 +25,20 @@ margin: 1em; --> <script type="text/javascript" src="/images/jquery/plugins/fancybox/jquery.fancybox-1.3.4.pack.js"></script> -<link rel="stylesheet" href="/images/jquery/plugins/fancybox/jquery.fancybox-1.3.4.css" type="text/css" media="screen" /> +<link rel="stylesheet" href="/images/jquery/plugins/fancybox/jquery.fancybox-1.3.4.css" type="text/css" media="screen"/> <script type="text/javascript"> - $(document).ready(function() { + $(document).ready(function () { $("a#single_image").fancybox(); $("a#inline").fancybox({ 'hideOnContentClick': true }); $("a.group").fancybox({ - 'transitionIn' : 'elastic', - 'transitionOut' : 'elastic', - 'speedIn' : 600, - 'speedOut' : 200, - 'overlayShow' : false + 'transitionIn': 'elastic', + 'transitionOut': 'elastic', + 'speedIn': 600, + 'speedOut': 200, + 'overlayShow': false }); }); </script> @@ -57,16 +57,19 @@ margin: 1em; <table cellspacing="0" class="basic-table"> <#list visualThemes as visualTheme> <#assign screenshots = delegator.findByAnd("VisualThemeResource", Static["org.ofbiz.base.util.UtilMisc"].toMap( - "visualThemeId", "${visualTheme.visualThemeId}", - "resourceTypeEnumId", "VT_SCREENSHOT"), orderByList, false)> + "visualThemeId", "${visualTheme.visualThemeId}", + "resourceTypeEnumId", "VT_SCREENSHOT"), orderByList, false)> <tr<#if visualTheme.visualThemeId == visualThemeId> class="selected"</#if>> <td> - <form name="SetUserPreferences_${visualTheme.visualThemeId}" method="post" action="<@ofbizUrl>setUserPreference</@ofbizUrl>"> + <form name="SetUserPreferences_${visualTheme.visualThemeId}" method="post" + action="<@ofbizUrl>setUserPreference</@ofbizUrl>"> <input type="hidden" name="userPrefGroupTypeId" value="GLOBAL_PREFERENCES"/> <input type="hidden" name="userPrefTypeId" value="VISUAL_THEME"/> <input type="hidden" name="userPrefValue" value="${visualTheme.visualThemeId}"/> </form> - <a href="javascript:document.forms['SetUserPreferences_${visualTheme.visualThemeId}'].submit()">${visualTheme.get("description", locale)?default(visualTheme.visualThemeId)}</a> + <a href="javascript:document.forms['SetUserPreferences_${visualTheme.visualThemeId}'].submit()"> + ${visualTheme.get("description", locale)?default(visualTheme.visualThemeId)} + </a> </td> <td> <#if visualTheme.visualThemeId == visualThemeId>${uiLabelMap.CommonVisualThemeSelected}<#else> </#if> @@ -74,9 +77,11 @@ margin: 1em; <td> <#if screenshots?has_content> <#list screenshots as screenshot> - <a id="single_image" href="<@ofbizContentUrl>${screenshot.resourceValue}</@ofbizContentUrl>"><img src="<@ofbizContentUrl>${screenshot.resourceValue}</@ofbizContentUrl>" width="150" alt=""/></a> + <a id="single_image" href="<@ofbizContentUrl>${screenshot.resourceValue}</@ofbizContentUrl>"><img + src="<@ofbizContentUrl>${screenshot.resourceValue}</@ofbizContentUrl>" width="150" + alt=""/></a> </#list> - <#else> + <#else> ${uiLabelMap.CommonVisualThemeNoScreenshots} </#if> </td> Modified: ofbiz/trunk/framework/common/template/includes/Lookup.ftl URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/template/includes/Lookup.ftl?rev=1751469&r1=1751468&r2=1751469&view=diff ============================================================================== --- ofbiz/trunk/framework/common/template/includes/Lookup.ftl (original) +++ ofbiz/trunk/framework/common/template/includes/Lookup.ftl Tue Jul 5 13:41:14 2016 @@ -21,90 +21,93 @@ under the License. <#assign initialLocale = locale.toString()> <#assign langDir = "ltr"> <#if "ar.iw"?contains(docLangAttr?substring(0, 2))> - <#assign langDir = "rtl"> + <#assign langDir = "rtl"> </#if> <html lang="${docLangAttr}" dir="${langDir}" xmlns="http://www.w3.org/1999/xhtml"> <head> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> - <title>${title!}</title> - <#-- the trick "<scr" + "ipt below is because browsers should not parse the contents of CDATA elements, but apparently they do. --> - <script language="JavaScript" type="text/javascript">//<![CDATA[ - var jQueryLibLoaded = false; - function initJQuery() { - if (typeof(jQuery) == 'undefined') { - if (!jQueryLibLoaded) { - jQueryLibLoaded = true; - document.write("<scr" + "ipt type=\"text/javascript\" src=\"<@ofbizContentUrl>/images/jquery/jquery-1.11.0.min.js</@ofbizContentUrl>\"></scr" + "ipt>"); - document.write("<scr" + "ipt type=\"text/javascript\" src=\"<@ofbizContentUrl>/images/jquery/jquery-migrate-1.2.1.js</@ofbizContentUrl>\"></scr" + "ipt>"); - } - setTimeout("initJQuery()", 50); - } - } - initJQuery(); - //]]></script> - <script language="javascript" src="<@ofbizContentUrl>/images/selectall.js</@ofbizContentUrl>" type="text/javascript"></script> - <#if layoutSettings.javaScripts?has_content> - <#--layoutSettings.javaScripts is a list of java scripts. --> - <#-- use a Set to make sure each javascript is declared only once, but iterate the list to maintain the correct order --> - <#assign javaScriptsSet = Static["org.ofbiz.base.util.UtilMisc"].toSet(layoutSettings.javaScripts)/> - <#list layoutSettings.javaScripts as javaScript> - <#if javaScriptsSet.contains(javaScript)> - <#assign nothing = javaScriptsSet.remove(javaScript)/> - <script src="<@ofbizContentUrl>${StringUtil.wrapString(javaScript)}</@ofbizContentUrl>" type="text/javascript"></script> - </#if> - </#list> - </#if> - <#if layoutSettings.styleSheets?has_content> - <#list layoutSettings.styleSheets as styleSheet> - <link rel="stylesheet" href="<@ofbizContentUrl>${styleSheet}</@ofbizContentUrl>" type="text/css"/> - </#list> - </#if> - <#if layoutSettings.VT_STYLESHEET?has_content> - <#list layoutSettings.VT_STYLESHEET as styleSheet> - <link rel="stylesheet" href="<@ofbizContentUrl>${styleSheet}</@ofbizContentUrl>" type="text/css"/> - </#list> - </#if> - <#if layoutSettings.VT_HELPSTYLESHEET?has_content && lookupType?has_content> - <#list layoutSettings.VT_HELPSTYLESHEET as styleSheet> - <link rel="stylesheet" href="<@ofbizContentUrl>${styleSheet}</@ofbizContentUrl>" type="text/css"/> - </#list> - </#if> - <#if layoutSettings.rtlStyleSheets?has_content && langDir == "rtl"> - <#list layoutSettings.rtlStyleSheets as styleSheet> - <link rel="stylesheet" href="<@ofbizContentUrl>${styleSheet}</@ofbizContentUrl>" type="text/css"/> - </#list> - </#if> - <#if layoutSettings.VT_RTL_STYLESHEET?has_content && langDir == "rtl"> - <#list layoutSettings.VT_RTL_STYLESHEET as styleSheet> - <link rel="stylesheet" href="<@ofbizContentUrl>${styleSheet}</@ofbizContentUrl>" type="text/css"/> - </#list> - </#if> + <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> + <title>${title!}</title> + <#-- the trick "<scr" + "ipt below is because browsers should not parse the contents of CDATA elements, but apparently they do. --> + <script language="JavaScript" type="text/javascript">//<![CDATA[ + var jQueryLibLoaded = false; + function initJQuery() { + if (typeof(jQuery) == 'undefined') { + if (!jQueryLibLoaded) { + jQueryLibLoaded = true; + document.write("<scr" + "ipt type=\"text/javascript\" src=\"<@ofbizContentUrl>/images/jquery/jquery-1.11.0.min.js</@ofbizContentUrl>\"></scr" + "ipt>"); + document.write("<scr" + "ipt type=\"text/javascript\" src=\"<@ofbizContentUrl>/images/jquery/jquery-migrate-1.2.1.js</@ofbizContentUrl>\"></scr" + "ipt>"); + } + setTimeout("initJQuery()", 50); + } + } + initJQuery(); + //]]> + </script> + <script language="javascript" src="<@ofbizContentUrl>/images/selectall.js</@ofbizContentUrl>" + type="text/javascript"></script> + <#if layoutSettings.javaScripts?has_content> + <#--layoutSettings.javaScripts is a list of java scripts. --> + <#-- use a Set to make sure each javascript is declared only once, but iterate the list to maintain the correct order --> + <#assign javaScriptsSet = Static["org.ofbiz.base.util.UtilMisc"].toSet(layoutSettings.javaScripts)/> + <#list layoutSettings.javaScripts as javaScript> + <#if javaScriptsSet.contains(javaScript)> + <#assign nothing = javaScriptsSet.remove(javaScript)/> + <script src="<@ofbizContentUrl>${StringUtil.wrapString(javaScript)}</@ofbizContentUrl>" + type="text/javascript"></script> + </#if> + </#list> + </#if> + <#if layoutSettings.styleSheets?has_content> + <#list layoutSettings.styleSheets as styleSheet> + <link rel="stylesheet" href="<@ofbizContentUrl>${styleSheet}</@ofbizContentUrl>" type="text/css"/> + </#list> + </#if> + <#if layoutSettings.VT_STYLESHEET?has_content> + <#list layoutSettings.VT_STYLESHEET as styleSheet> + <link rel="stylesheet" href="<@ofbizContentUrl>${styleSheet}</@ofbizContentUrl>" type="text/css"/> + </#list> + </#if> + <#if layoutSettings.VT_HELPSTYLESHEET?has_content && lookupType?has_content> + <#list layoutSettings.VT_HELPSTYLESHEET as styleSheet> + <link rel="stylesheet" href="<@ofbizContentUrl>${styleSheet}</@ofbizContentUrl>" type="text/css"/> + </#list> + </#if> + <#if layoutSettings.rtlStyleSheets?has_content && langDir == "rtl"> + <#list layoutSettings.rtlStyleSheets as styleSheet> + <link rel="stylesheet" href="<@ofbizContentUrl>${styleSheet}</@ofbizContentUrl>" type="text/css"/> + </#list> + </#if> + <#if layoutSettings.VT_RTL_STYLESHEET?has_content && langDir == "rtl"> + <#list layoutSettings.VT_RTL_STYLESHEET as styleSheet> + <link rel="stylesheet" href="<@ofbizContentUrl>${styleSheet}</@ofbizContentUrl>" type="text/css"/> + </#list> + </#if> - <script language="JavaScript" type="text/javascript"> - // This code inserts the value lookedup by a popup window back into the associated form element - var re_id = new RegExp('id=(\\d+)'); - var num_id = (re_id.exec(String(window.location)) - ? new Number(RegExp.$1) : 0); - var obj_caller = (window.opener ? window.opener.lookups[num_id] : null); - if (obj_caller == null) - obj_caller = window.opener; + <script language="JavaScript" type="text/javascript"> + // This code inserts the value lookedup by a popup window back into the associated form element + var re_id = new RegExp('id=(\\d+)'); + var num_id = (re_id.exec(String(window.location)) + ? new Number(RegExp.$1) : 0); + var obj_caller = (window.opener ? window.opener.lookups[num_id] : null); + if (obj_caller == null) + obj_caller = window.opener; - // function passing selected value to calling window - function set_multivalues(value) { - obj_caller.target.value = value; - var thisForm = obj_caller.target.form; - var evalString = ""; + // function passing selected value to calling window + function set_multivalues(value) { + obj_caller.target.value = value; + var thisForm = obj_caller.target.form; + var evalString = ""; - if (arguments.length > 2 ) { - for(var i=1; i < arguments.length; i=i+2) { - evalString = "setSourceColor(thisForm." + arguments[i] + ")"; - eval(evalString); - evalString = "thisForm." + arguments[i] + ".value='" + arguments[i+1] + "'"; - eval(evalString); - } - } - window.close(); - } - </script> + if (arguments.length > 2) { + for (var i = 1; i < arguments.length; i = i + 2) { + evalString = "setSourceColor(thisForm." + arguments[i] + ")"; + eval(evalString); + evalString = "thisForm." + arguments[i] + ".value='" + arguments[i + 1] + "'"; + eval(evalString); + } + } + window.close(); + } + </script> </head> <body style="background-color: WHITE;"> Modified: ofbiz/trunk/framework/common/template/includes/LookupFooter.ftl URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/template/includes/LookupFooter.ftl?rev=1751469&r1=1751468&r2=1751469&view=diff ============================================================================== --- ofbiz/trunk/framework/common/template/includes/LookupFooter.ftl (original) +++ ofbiz/trunk/framework/common/template/includes/LookupFooter.ftl Tue Jul 5 13:41:14 2016 @@ -16,5 +16,5 @@ KIND, either express or implied. See th specific language governing permissions and limitations under the License. --> -</body> + </body> </html> Modified: ofbiz/trunk/framework/common/template/includes/Messages.ftl URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/template/includes/Messages.ftl?rev=1751469&r1=1751468&r2=1751469&view=diff ============================================================================== --- ofbiz/trunk/framework/common/template/includes/Messages.ftl (original) +++ ofbiz/trunk/framework/common/template/includes/Messages.ftl Tue Jul 5 13:41:14 2016 @@ -21,7 +21,7 @@ under the License. <#if requestAttributes.eventMessageList?has_content><#assign eventMessageList=requestAttributes.eventMessageList></#if> <#if requestAttributes.serviceValidationException??><#assign serviceValidationException = requestAttributes.serviceValidationException></#if> <#if requestAttributes.uiLabelMap?has_content><#assign uiLabelMap = requestAttributes.uiLabelMap></#if> - + <#if !errorMessage?has_content> <#assign errorMessage = requestAttributes._ERROR_MESSAGE_!> </#if> @@ -34,10 +34,11 @@ under the License. <#if !eventMessageList?has_content> <#assign eventMessageList = requestAttributes._EVENT_MESSAGE_LIST_!> </#if> - + <#-- display the error messages --> <#if (errorMessage?has_content || errorMessageList?has_content)> - <div id="content-messages" class="content-messages errorMessage" onclick="document.getElementById('content-messages').parentNode.removeChild(this)"> + <div id="content-messages" class="content-messages errorMessage" + onclick="document.getElementById('content-messages').parentNode.removeChild(this)"> <#noescape><p>${uiLabelMap.CommonFollowingErrorsOccurred}:</p></#noescape> <#if errorMessage?has_content> <p>${StringUtil.wrapString(errorMessage)}</p> @@ -53,25 +54,30 @@ under the License. <#assign jGrowlWidth = Static["org.ofbiz.entity.util.EntityUtilProperties"].getPropertyValue("widget", "widget.jgrowl.width", delegator)> <#assign jGrowlHeight = Static["org.ofbiz.entity.util.EntityUtilProperties"].getPropertyValue("widget", "widget.jgrowl.height", delegator)> <#assign jGrowlSpeed = Static["org.ofbiz.entity.util.EntityUtilProperties"].getPropertyValue("widget", "widget.jgrowl.speed", delegator)> - - <script>showjGrowl("${uiLabelMap.CommonShowAll}","${uiLabelMap.CommonCollapse}", "${uiLabelMap.CommonHideAllNotifications}", "${jGrowlPosition}", "${jGrowlWidth}", "${jGrowlHeight}", "${jGrowlSpeed}");</script> + + <script>showjGrowl( + "${uiLabelMap.CommonShowAll}", "${uiLabelMap.CommonCollapse}", "${uiLabelMap.CommonHideAllNotifications}", + "${jGrowlPosition}", "${jGrowlWidth}", "${jGrowlHeight}", "${jGrowlSpeed}");</script> <#-- display the event messages --> <#if (eventMessage?has_content || eventMessageList?has_content)> - <div id="content-messages" class="content-messages eventMessage" onclick="document.getElementById('content-messages').parentNode.removeChild(this)"> - <#noescape><p>${uiLabelMap.CommonFollowingOccurred}:</p></#noescape> - <#if eventMessage?has_content> - <p>${StringUtil.wrapString(eventMessage)}</p> - </#if> - <#if eventMessageList?has_content> - <#list eventMessageList as eventMsg> - <p>${StringUtil.wrapString(eventMsg)}</p> - </#list> - </#if> - </div> - <#assign jGrowlPosition = Static["org.ofbiz.entity.util.EntityUtilProperties"].getPropertyValue("widget", "widget.jgrowl.position", delegator)> - <#assign jGrowlWidth = Static["org.ofbiz.entity.util.EntityUtilProperties"].getPropertyValue("widget", "widget.jgrowl.width", delegator)> - <#assign jGrowlHeight = Static["org.ofbiz.entity.util.EntityUtilProperties"].getPropertyValue("widget", "widget.jgrowl.height", delegator)> - <#assign jGrowlSpeed = Static["org.ofbiz.entity.util.EntityUtilProperties"].getPropertyValue("widget", "widget.jgrowl.speed", delegator)> - <script>showjGrowl("${uiLabelMap.CommonShowAll}","${uiLabelMap.CommonCollapse}", "${uiLabelMap.CommonHideAllNotifications}", "${jGrowlPosition}", "${jGrowlWidth}", "${jGrowlHeight}", "${jGrowlSpeed}");</script> + <div id="content-messages" class="content-messages eventMessage" + onclick="document.getElementById('content-messages').parentNode.removeChild(this)"> + <#noescape><p>${uiLabelMap.CommonFollowingOccurred}:</p></#noescape> + <#if eventMessage?has_content> + <p>${StringUtil.wrapString(eventMessage)}</p> + </#if> + <#if eventMessageList?has_content> + <#list eventMessageList as eventMsg> + <p>${StringUtil.wrapString(eventMsg)}</p> + </#list> + </#if> + </div> + <#assign jGrowlPosition = Static["org.ofbiz.entity.util.EntityUtilProperties"].getPropertyValue("widget", "widget.jgrowl.position", delegator)> + <#assign jGrowlWidth = Static["org.ofbiz.entity.util.EntityUtilProperties"].getPropertyValue("widget", "widget.jgrowl.width", delegator)> + <#assign jGrowlHeight = Static["org.ofbiz.entity.util.EntityUtilProperties"].getPropertyValue("widget", "widget.jgrowl.height", delegator)> + <#assign jGrowlSpeed = Static["org.ofbiz.entity.util.EntityUtilProperties"].getPropertyValue("widget", "widget.jgrowl.speed", delegator)> + <script>showjGrowl( + "${uiLabelMap.CommonShowAll}", "${uiLabelMap.CommonCollapse}", "${uiLabelMap.CommonHideAllNotifications}", + "${jGrowlPosition}", "${jGrowlWidth}", "${jGrowlHeight}", "${jGrowlSpeed}");</script> </#if> </#escape> Modified: ofbiz/trunk/framework/common/template/includes/ReportTemplate.fo.ftl URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/template/includes/ReportTemplate.fo.ftl?rev=1751469&r1=1751468&r2=1751469&view=diff ============================================================================== --- ofbiz/trunk/framework/common/template/includes/ReportTemplate.fo.ftl (original) +++ ofbiz/trunk/framework/common/template/includes/ReportTemplate.fo.ftl Tue Jul 5 13:41:14 2016 @@ -17,78 +17,79 @@ specific language governing permissions under the License. --> <#escape x as x?xml> -<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" - <#-- inheritance --> - <#if defaultFontFamily?has_content>font-family="${defaultFontFamily}"</#if> -> + <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" + <#-- inheritance --> + <#if defaultFontFamily?has_content>font-family="${defaultFontFamily}"</#if>> <fo:layout-master-set> - <fo:simple-page-master master-name="main-page" - page-width="8.5in" page-height="11in" - margin-top="0.4in" margin-bottom="0.4in" - margin-left="0.6in" margin-right="0.4in"> - <#-- main body --> - <fo:region-body margin-top="1.5in" margin-bottom="0.4in"/> - <#-- the header --> - <fo:region-before extent="1.2in"/> - <#-- the footer --> - <fo:region-after extent="0.4in"/> - </fo:simple-page-master> - <fo:simple-page-master master-name="main-page-landscape" - page-width="11in" page-height="8.5in" - margin-top="0.4in" margin-bottom="0.4in" - margin-left="0.6in" margin-right="0.4in"> - <#-- main body --> - <fo:region-body margin-top="1.2in" margin-bottom="0.4in"/> - <#-- the header --> - <fo:region-before extent="1.2in"/> - <#-- the footer --> - <fo:region-after extent="0.4in"/> - </fo:simple-page-master> + <fo:simple-page-master master-name="main-page" + page-width="8.5in" page-height="11in" + margin-top="0.4in" margin-bottom="0.4in" + margin-left="0.6in" margin-right="0.4in"> + <#-- main body --> + <fo:region-body margin-top="1.5in" margin-bottom="0.4in"/> + <#-- the header --> + <fo:region-before extent="1.2in"/> + <#-- the footer --> + <fo:region-after extent="0.4in"/> + </fo:simple-page-master> + <fo:simple-page-master master-name="main-page-landscape" + page-width="11in" page-height="8.5in" + margin-top="0.4in" margin-bottom="0.4in" + margin-left="0.6in" margin-right="0.4in"> + <#-- main body --> + <fo:region-body margin-top="1.2in" margin-bottom="0.4in"/> + <#-- the header --> + <fo:region-before extent="1.2in"/> + <#-- the footer --> + <fo:region-after extent="0.4in"/> + </fo:simple-page-master> </fo:layout-master-set> <fo:page-sequence master-reference="${pageLayoutName?default("main-page")}"> - <#-- Header --> - <#-- The elements it it are positioned using a table composed by one row - composed by two cells (each 50% of the total table that is 100% of the page): - in the left side cell the "topLeft" template is included - in the right side cell the "topRight" template is included - --> - <#if sections.get("topLeft")?has_content || sections.get("topRight")?has_content> - <fo:static-content flow-name="xsl-region-before"> - <fo:table table-layout="fixed" width="100%"> - <fo:table-column column-number="1" column-width="proportional-column-width(50)"/> - <fo:table-column column-number="2" column-width="proportional-column-width(50)"/> - <fo:table-body> - <fo:table-row> - <#if sections.get("topLeft")?has_content> - <fo:table-cell> - ${sections.render("topLeft")} - </fo:table-cell> - </#if> - <#if sections.get("topRight")?has_content> - <fo:table-cell> - ${sections.render("topRight")} - </fo:table-cell> - </#if> - </fo:table-row> - </fo:table-body> - </fo:table> - </fo:static-content> - </#if> - - <#-- the footer --> - <fo:static-content flow-name="xsl-region-after"> - <fo:block font-size="10pt" text-align="center" space-before="10pt"> - ${uiLabelMap.CommonPage} <fo:page-number/> ${uiLabelMap.CommonOf} <fo:page-number-citation ref-id="theEnd"/> - </fo:block> + <#-- Header --> + <#-- The elements it it are positioned using a table composed by one row + composed by two cells (each 50% of the total table that is 100% of the page): + in the left side cell the "topLeft" template is included + in the right side cell the "topRight" template is included + --> + <#if sections.get("topLeft")?has_content || sections.get("topRight")?has_content> + <fo:static-content flow-name="xsl-region-before"> + <fo:table table-layout="fixed" width="100%"> + <fo:table-column column-number="1" column-width="proportional-column-width(50)"/> + <fo:table-column column-number="2" column-width="proportional-column-width(50)"/> + <fo:table-body> + <fo:table-row> + <#if sections.get("topLeft")?has_content> + <fo:table-cell> + ${sections.render("topLeft")} + </fo:table-cell> + </#if> + <#if sections.get("topRight")?has_content> + <fo:table-cell> + ${sections.render("topRight")} + </fo:table-cell> + </#if> + </fo:table-row> + </fo:table-body> + </fo:table> </fo:static-content> + </#if> + + <#-- the footer --> + <fo:static-content flow-name="xsl-region-after"> + <fo:block font-size="10pt" text-align="center" space-before="10pt"> + ${uiLabelMap.CommonPage} + <fo:page-number/> ${uiLabelMap.CommonOf} + <fo:page-number-citation ref-id="theEnd"/> + </fo:block> + </fo:static-content> - <#-- the body --> - <fo:flow flow-name="xsl-region-body"> -${sections.render("body")} - <fo:block id="theEnd"/> <#-- marks the end of the pages and used to identify page-number at the end --> - </fo:flow> + <#-- the body --> + <fo:flow flow-name="xsl-region-body"> + ${sections.render("body")} + <fo:block id="theEnd"/> <#-- marks the end of the pages and used to identify page-number at the end --> + </fo:flow> </fo:page-sequence> -</fo:root> + </fo:root> </#escape> Modified: ofbiz/trunk/framework/common/template/includes/ServerHour24HourFormatJs.ftl URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/template/includes/ServerHour24HourFormatJs.ftl?rev=1751469&r1=1751468&r2=1751469&view=diff ============================================================================== --- ofbiz/trunk/framework/common/template/includes/ServerHour24HourFormatJs.ftl (original) +++ ofbiz/trunk/framework/common/template/includes/ServerHour24HourFormatJs.ftl Tue Jul 5 13:41:14 2016 @@ -17,24 +17,30 @@ specific language governing permissions under the License. --> <script type="text/javascript"> -jQuery(document).ready(function() { - window.setInterval(function(){clock()}, 1000); - var serverTimestamp = 0; - var date; - function clock() { - if (jQuery("#${clockField}").text() === "${uiLabelMap.CommonServerHour}:") { - waitSpinnerShow(); - serverTimestamp = getServiceResult("getServerTimestampAsLong")['serverTimestamp']; - serverTimeZone = getServiceResult("getServerTimeZone")['serverTimeZone'];; - initTimeZone(); - date = new timezoneJS.Date(serverTimestamp, serverTimeZone); - waitSpinnerHide(); - } else { - date.setSeconds(date.getSeconds() + 1); - } - // dateFormat does not respect the timezone :/ Fortunately toString is what we want :) - //jQuery("#${clockField}").text("${uiLabelMap.CommonServerHour}: " + dateFormat(date, "yyyy-mm-dd HH:MM:ss")); - jQuery("#${clockField}").text("${uiLabelMap.CommonServerHour}: " + date.toString()); - } -}) + jQuery(document).ready(function () { + window.setInterval(function () { + clock() + }, 1000); + var serverTimestamp = 0; + var date; + + function clock() { + if (jQuery("#${clockField}").text() === "${uiLabelMap.CommonServerHour}:") { + waitSpinnerShow(); + serverTimestamp = getServiceResult("getServerTimestampAsLong")['serverTimestamp']; + serverTimeZone = getServiceResult("getServerTimeZone")['serverTimeZone']; + ; + initTimeZone(); + date = new timezoneJS.Date(serverTimestamp, serverTimeZone); + waitSpinnerHide(); + } else { + date.setSeconds(date.getSeconds() + 1); + } + // dateFormat does not respect the timezone :/ Fortunately toString is what we want :) + //jQuery("#${clockField} + ").text("${uiLabelMap.CommonServerHour} + : " + dateFormat(date, "yyyy-mm-dd HH:MM:ss")); + jQuery("#${clockField}").text("${uiLabelMap.CommonServerHour}: " + date.toString()); + } + }) </script> \ No newline at end of file Modified: ofbiz/trunk/framework/common/template/includes/SetDependentDropdownValuesJs.ftl URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/template/includes/SetDependentDropdownValuesJs.ftl?rev=1751469&r1=1751468&r2=1751469&view=diff ============================================================================== --- ofbiz/trunk/framework/common/template/includes/SetDependentDropdownValuesJs.ftl (original) +++ ofbiz/trunk/framework/common/template/includes/SetDependentDropdownValuesJs.ftl Tue Jul 5 13:41:14 2016 @@ -18,15 +18,15 @@ under the License. --> <#assign requestName><@ofbizUrl>${requestName}</@ofbizUrl></#assign> <script type="text/javascript"> -jQuery(document).ready(function() { - if (jQuery('#${dependentForm}').length && jQuery('#${dependentForm}_${mainId}').length) { - jQuery('#${dependentForm}_${mainId}').change(function(e, data) { - getDependentDropdownValues('${requestName}', '${paramKey}', '${dependentForm}_${mainId}', '${dependentForm}_${dependentId}', '${responseName}', '${dependentKeyName}', '${descName}'); - }); - getDependentDropdownValues('${requestName}', '${paramKey}', '${dependentForm}_${mainId}', '${dependentForm}_${dependentId}', '${responseName}', '${dependentKeyName}', '${descName}', '${selectedDependentOption}'); - <#if focusFieldName??> - jQuery('#${focusFieldName}').focus(); - </#if> - } -}) + jQuery(document).ready(function () { + if (jQuery('#${dependentForm}').length && jQuery('#${dependentForm}_${mainId}').length) { + jQuery('#${dependentForm}_${mainId}').change(function (e, data) { + getDependentDropdownValues('${requestName}', '${paramKey}', '${dependentForm}_${mainId}', '${dependentForm}_${dependentId}', '${responseName}', '${dependentKeyName}', '${descName}'); + }); + getDependentDropdownValues('${requestName}', '${paramKey}', '${dependentForm}_${mainId}', '${dependentForm}_${dependentId}', '${responseName}', '${dependentKeyName}', '${descName}', '${selectedDependentOption}'); + <#if focusFieldName??> + jQuery('#${focusFieldName}').focus(); + </#if> + } + }) </script> |
Free forum by Nabble | Edit this page |