Added: 
ofbiz/branches/boostrap_theme/themes/bootstrap/includes/templates/htmlFormMacroLibrary.ftl
URL: 
http://svn.apache.org/viewvc/ofbiz/branches/boostrap_theme/themes/bootstrap/includes/templates/htmlFormMacroLibrary.ftl?rev=1641665&view=auto
==============================================================================
--- 
ofbiz/branches/boostrap_theme/themes/bootstrap/includes/templates/htmlFormMacroLibrary.ftl
 (added)
+++ 
ofbiz/branches/boostrap_theme/themes/bootstrap/includes/templates/htmlFormMacroLibrary.ftl
 Tue Nov 25 18:35:47 2014
@@ -0,0 +1,866 @@
+<#--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<#macro renderField text>
+  <#if text??>
+    ${text}<#lt/>
+  </#if>
+</#macro>
+
+<#macro renderDisplayField type imageLocation idName description title class 
alert inPlaceEditorUrl="" inPlaceEditorParams="">
+  <#if type?has_content && type=="image">
+    <img src="${imageLocation}" alt=""><#lt/>
+  <#else>
+    <#if inPlaceEditorUrl?has_content || class?has_content || alert=="true" || 
title?has_content>
+      <span <#if idName?has_content>id="cc_${idName}"</#if> <#if 
title?has_content>title="${title}"</#if> <@renderClass class alert />><#t/>
+    </#if>
+
+    <#if description?has_content>
+      ${description?replace("\n", "<br />")}<#t/>
+    <#else>
+      &nbsp;<#t/>
+    </#if>
+    <#if inPlaceEditorUrl?has_content || class?has_content || alert=="true">
+      </span><#lt/>
+    </#if>
+    <#if inPlaceEditorUrl?has_content && idName?has_content>
+      <script language="JavaScript" type="text/javascript"><#lt/>
+        ajaxInPlaceEditDisplayField('cc_${idName}', '${inPlaceEditorUrl}', 
${inPlaceEditorParams});<#lt/>
+      </script><#lt/>
+    </#if>
+  </#if>
+</#macro>
+<#macro renderHyperlinkField></#macro>
+
+<#macro renderTextField name className alert value textSize maxlength id event 
action disabled clientAutocomplete ajaxUrl ajaxEnabled mask placeholder="">
+  <#if mask?has_content>
+    <script type="text/javascript">
+      jQuery(function($){jQuery("#${id}").mask("${mask}");});
+    </script>
+  </#if>
+  <input type="text" name="${name?default("")?html}"<#t/>
+    <@renderClass className alert />
+    <#if value?has_content> value="${value}"</#if><#rt/>
+    <#if textSize?has_content> size="${textSize}"</#if><#rt/>
+    <#if maxlength?has_content> maxlength="${maxlength}"</#if><#rt/>
+    <#if disabled?has_content && disabled> disabled="disabled"</#if><#rt/>
+    <#if id?has_content> id="${id}"</#if><#rt/>
+    <#if event?has_content && action?has_content> 
${event}="${action}"</#if><#rt/>
+    <#if clientAutocomplete?has_content && clientAutocomplete=="false"> 
autocomplete="off"</#if><#rt/>
+    <#if placeholder?has_content> placeholder="${placeholder}"</#if><#rt/>
+  /><#t/>
+  <#if ajaxEnabled?has_content && ajaxEnabled>
+    <#assign defaultMinLength = 
Static["org.ofbiz.base.util.UtilProperties"].getPropertyValue("widget.properties",
 "widget.autocompleter.defaultMinLength")>
+    <#assign defaultDelay = 
Static["org.ofbiz.base.util.UtilProperties"].getPropertyValue("widget.properties",
 "widget.autocompleter.defaultDelay")>
+    <script language="JavaScript" 
type="text/javascript">ajaxAutoCompleter('${ajaxUrl}', false, 
${defaultMinLength!2}, ${defaultDelay!300});</script><#lt/>
+  </#if>
+</#macro>
+
+<#macro renderTextareaField name className alert cols rows id readonly value 
visualEditorEnable buttons language="">
+  <textarea name="${name}"<#t/>
+    <@renderClass className alert />
+    <#if cols?has_content> cols="${cols}"</#if><#rt/>
+    <#if rows?has_content> rows="${rows}"</#if><#rt/>
+    <#if id?has_content> id="${id}"</#if><#rt/>
+    <#if readonly?has_content && readonly=='readonly'> 
readonly="readonly"</#if><#rt/>
+    <#if maxlength?has_content> maxlength="${maxlength}"</#if><#rt/>
+    ><#t/>
+    <#if value?has_content>${value}</#if><#t/>
+  </textarea><#lt/>
+  <#if visualEditorEnable?has_content>
+    <script language="javascript" 
src="/images/jquery/plugins/elrte-1.3/js/elrte.min.js" 
type="text/javascript"></script><#rt/>
+    <#if language?has_content && language != "en">
+      <script language="javascript" 
src="/images/jquery/plugins/elrte-1.3/js/i18n/elrte.${language!"en"}.js" 
type="text/javascript"></script><#rt/>
+    </#if>
+    <link href="/images/jquery/plugins/elrte-1.3/css/elrte.min.css" 
rel="stylesheet" type="text/css">
+    <script language="javascript" type="text/javascript">
+      var opts = {
+         cssClass : 'el-rte',
+         lang     : '${language!"en"}',
+         toolbar  : '${buttons?default("maxi")}',
+         doctype  : '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 
Transitional//EN">', //'<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 
Transitional//EN">',
+         cssfiles : ['/images/jquery/plugins/elrte-1.3/css/elrte-inner.css']
+      }
+      jQuery('#${id?default("")}').elrte(opts);
+    </script>
+  </#if>
+</#macro>
+
+<#macro renderDateTimeField name className alert title value size maxlength id 
dateType shortDateInput timeDropdownParamName defaultDateTimeString 
localizedIconTitle timeDropdown timeHourName classString hour1 hour2 
timeMinutesName minutes isTwelveHour ampmName amSelected pmSelected 
compositeType formName mask="" event="" action="" step="" timeValues="">
+  <span class="view-calendar">
+    <#if dateType!="time" >
+      <input type="text" name="${name}_i18n" <@renderClass className alert 
/><#rt/>
+        <#if title?has_content> title="${title}"</#if>
+        <#if value?has_content> value="${value}"</#if>
+        <#if size?has_content> size="${size}"</#if><#rt/>
+        <#if maxlength?has_content>  maxlength="${maxlength}"</#if>
+        <#if id?has_content> id="${id}_i18n"</#if>/><#rt/>
+    </#if>
+    <#-- the style attribute is a little bit messy but when using disply:none 
the timepicker is shown on a wrong place -->
+    <input type="text" name="${name}" 
style="height:1px;width:1px;border:none;background-color:transparent" <#if 
event?has_content && action?has_content> ${event}="${action}"</#if> 
<@renderClass className alert /><#rt/>
+      <#if title?has_content> title="${title}"</#if>
+      <#if value?has_content> value="${value}"</#if>
+      <#if size?has_content> size="${size}"</#if><#rt/>
+      <#if maxlength?has_content>  maxlength="${maxlength}"</#if>
+      <#if id?has_content> id="${id}"</#if>/><#rt/>
+    <#if dateType!="time" >
+      <script type="text/javascript">
+        <#-- If language specific lib is found, use date / time converter else 
just copy the value fields -->
+        if (Date.CultureInfo != undefined) {
+          var initDate = <#if 
value?has_content>jQuery("#${id}_i18n").val()<#else>""</#if>;
+          if (initDate != "") {
+            var dateFormat = Date.CultureInfo.formatPatterns.shortDate<#if 
shortDateInput?? && !shortDateInput> + " " + 
Date.CultureInfo.formatPatterns.longTime</#if>;
+            <#-- bad hack because the JS date parser doesn't understand dots 
in the date / time string -->
+            if (initDate.indexOf('.') != -1) {
+              initDate = initDate.substring(0, initDate.indexOf('.'));
+            }
+            var ofbizTime = "<#if shortDateInput?? && 
shortDateInput>yyyy-MM-dd<#else>yyyy-MM-dd HH:mm:ss</#if>";
+            var dateObj = Date.parse(initDate, ofbizTime);
+            var formatedObj = dateObj.toString(dateFormat);
+            jQuery("#${id}_i18n").val(formatedObj);
+          }
+
+          jQuery("#${id}").change(function() {
+            var ofbizTime = "<#if shortDateInput?? && 
shortDateInput>yyyy-MM-dd<#else>yyyy-MM-dd HH:mm:ss</#if>";
+            var newValue = ""
+            if (this.value != "") {
+              var dateObj = Date.parse(this.value, ofbizTime);
+              var dateFormat = Date.CultureInfo.formatPatterns.shortDate<#if 
shortDateInput?? && !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?? && !shortDateInput> + " " + 
Date.CultureInfo.formatPatterns.longTime</#if>,
+            newValue = "",
+            dateObj = Date.parse(this.value, dateFormat),
+            ofbizTime;
+            if (this.value != "" && dateObj !== null) {
+              ofbizTime = "<#if shortDateInput?? && 
shortDateInput>yyyy-MM-dd<#else>yyyy-MM-dd HH:mm:ss</#if>";
+              newValue = dateObj.toString(ofbizTime);
+            }
+            else { // invalid input
+              jQuery("#${id}_i18n").val("");
+            }
+            jQuery("#${id}").val(newValue);
+          });
+        } else {
+          <#-- fallback if no language specific js date file is found -->
+          jQuery("#${id}").change(function() {
+          jQuery("#${id}_i18n").val(this.value);
+        });
+        jQuery("#${id}_i18n").change(function() {
+          jQuery("#${id}").val(this.value);
+        });
+      }
+
+      <#if shortDateInput?? && shortDateInput>
+        jQuery("#${id}").datepicker({
+      <#else>
+        jQuery("#${id}").datetimepicker({
+          showSecond: true,
+          <#-- showMillisec: true, -->
+          timeFormat: 'HH:mm:ss',
+          stepHour: 1,
+          stepMinute: 1,
+          stepSecond: 1,
+      </#if>
+          showOn: 'button',
+          buttonImage: '',
+          buttonText: '',
+          buttonImageOnly: false,
+          dateFormat: 'yy-mm-dd'
+        })
+        <#if mask?has_content>.mask("${mask}")</#if>
+        ;
+        
jQuery('.ui-datepicker-trigger').removeClass('ui-datepicker-trigger').addClass('btn
 btn-primary btn-sm').html('<span class="glyphicon 
glyphicon-calendar"></span>');
+      </script>
+    </#if>
+    <#if timeDropdown?has_content && timeDropdown=="time-dropdown">
+      <select name="${timeHourName}" <#if 
classString?has_content>class="${classString}"</#if>><#rt/>
+        <#if isTwelveHour>
+          <#assign x=11>
+          <#list 0..x as i>
+            <option value="${i}"<#if hour1?has_content><#if i=hour1> 
selected="selected"</#if></#if>>${i}</option><#rt/>
+          </#list>
+        <#else>
+          <#assign x=23>
+          <#list 0..x as i>
+            <option value="${i}"<#if hour2?has_content><#if i=hour2> 
selected="selected"</#if></#if>>${i}</option><#rt/>
+          </#list>
+        </#if>
+        </select>:<select name="${timeMinutesName}" <#if 
classString?has_content>class="${classString}"</#if>><#rt/>
+          <#assign values = 
Static["org.ofbiz.base.util.StringUtil"].toList(timeValues)>
+          <#list values as i>
+            <option value="${i}"<#if minutes?has_content><#if i?number== 
minutes ||((i?number==(60 -step?number)) && (minutes &gt; 60 - 
(step?number/2))) || ((minutes &gt; i?number )&& (minutes &lt; 
i?number+(step?number/2))) || ((minutes &lt; i?number )&& (minutes &gt; 
i?number-(step?number/2)))> selected="selected"</#if></#if>>${i}</option><#rt/>
+          </#list>
+        </select>
+        <#rt/>
+        <#if isTwelveHour>
+          <select name="${ampmName}" <#if 
classString?has_content>class="${classString}"</#if>><#rt/>
+            <option value="AM" <#if amSelected == 
"selected">selected="selected"</#if> >AM</option><#rt/>
+            <option value="PM" <#if pmSelected == 
"selected">selected="selected"</#if>>PM</option><#rt/>
+          </select>
+        <#rt/>
+      </#if>
+    </#if>
+    <input type="hidden" name="${compositeType}" value="Timestamp"/>
+  </span>
+</#macro>
+
+<#macro renderDropDownField name className alert id multiple formName 
otherFieldName event action size firstInList currentValue explicitDescription 
allowEmpty options fieldName otherFieldName otherValue otherFieldSize 
dDFCurrent ajaxEnabled noCurrentSelectedKey ajaxOptions frequency minChars 
choices autoSelect partialSearch partialChars ignoreCase fullSearch>
+  <span class="ui-widget">
+    <select name="${name?default("")}<#rt/>" <@renderClass className alert 
/><#if id?has_content> id="${id}"</#if><#if multiple?has_content> 
multiple="multiple"</#if><#if otherFieldSize gt 0> 
onchange="process_choice(this,document.${formName}.${otherFieldName})"</#if><#if
 event?has_content> ${event}="${action}"</#if><#if size?has_content> 
size="${size}"</#if>>
+      <#if firstInList?has_content && currentValue?has_content && 
!multiple?has_content>
+        <option selected="selected" 
value="${currentValue}">${explicitDescription}</option><#rt/>
+        <option value="${currentValue}">---</option><#rt/>
+      </#if>
+      <#if allowEmpty?has_content || !options?has_content>
+        <option value="">&nbsp;</option>
+      </#if>
+      <#list options as item>
+        <#if multiple?has_content>
+          <option<#if currentValue?has_content && item.selected?has_content> 
selected="${item.selected}" <#elseif !currentValue?has_content && 
noCurrentSelectedKey?has_content && noCurrentSelectedKey == item.key> 
selected="selected" </#if> 
value="${item.key}">${item.description}</option><#rt/>
+        <#else>
+          <option<#if currentValue?has_content && currentValue == item.key && 
dDFCurrent?has_content && "selected" == dDFCurrent> selected="selected"<#elseif 
!currentValue?has_content && noCurrentSelectedKey?has_content && 
noCurrentSelectedKey == item.key> selected="selected"</#if> 
value="${item.key}">${item.description}</option><#rt/>
+        </#if>
+      </#list>
+    </select>
+  </span>
+  <#if otherFieldName?has_content>
+    <noscript><input type='text' name='${otherFieldName}' /></noscript>
+    <script type='text/javascript' language='JavaScript'><!--
+      disa = ' disabled';
+      if(other_choice(document.${formName}.${fieldName}))
+        disa = '';
+      document.write("<input type='text' name='${otherFieldName}' 
value='${otherValue?js_string}' size='${otherFieldSize}'"+disa+" 
onfocus='check_choice(document.${formName}.${fieldName})' />");
+      if(disa && document.styleSheets)
+      document.${formName}.${otherFieldName}.style.visibility  = 'hidden';
+    //--></script>
+  </#if>
+
+  <#if ajaxEnabled>
+    <script language="JavaScript" type="text/javascript">
+      ajaxAutoCompleteDropDown();
+      jQuery(function() {
+        jQuery("#${id}").combobox();
+      });
+    </script>
+  </#if>
+</#macro>
+
+<#macro renderCheckField items className alert id allChecked currentValue name 
event action>
+  <#list items as item>
+    <span <@renderClass className alert />><#rt/>
+      <input type="checkbox"<#if (item_index == 0)> id="${id}"</#if><#rt/>
+        <#if allChecked?has_content && allChecked> checked="checked" <#elseif 
allChecked?has_content && !allChecked>
+          <#elseif currentValue?has_content && currentValue==item.value> 
checked="checked"</#if> 
+          name="${name?default("")?html}" 
value="${item.value?default("")?html}"<#if event?has_content> 
${event}="${action}"</#if>/><#rt/>
+        ${item.description?default("")}
+    </span>
+  </#list>
+</#macro>
+
+<#macro renderRadioField items className alert currentValue 
noCurrentSelectedKey name event action>
+  <#list items as item>
+    <span <@renderClass className alert />><#rt/>
+      <input type="radio"<#if currentValue?has_content><#if 
currentValue==item.key> checked="checked"</#if>
+        <#elseif noCurrentSelectedKey?has_content && noCurrentSelectedKey == 
item.key> checked="checked"</#if> 
+        name="${name?default("")?html}" 
value="${item.key?default("")?html}"<#if event?has_content> 
${event}="${action}"</#if>/><#rt/>
+      ${item.description}
+    </span>
+  </#list>
+</#macro>
+
+<#macro renderSubmitField buttonType className alert formName title name event 
action imgSrc confirmation containerId ajaxUrl>
+  <#if buttonType=="text-link">
+    <a <@renderClass className alert /> 
href="javascript:document.${formName}.submit()" <#if 
confirmation?has_content>onclick="return 
confirm('${confirmation?js_string}');"</#if>><#if 
title?has_content>${title}</#if> </a>
+  <#elseif buttonType=="image">
+    <input type="image" src="${imgSrc}" <@renderClass className alert /><#if 
name?has_content> name="${name}"</#if>
+    <#if title?has_content> alt="${title}"</#if><#if event?has_content> 
${event}="${action}"</#if>
+    <#if confirmation?has_content>onclick="return 
confirm('${confirmation?js_string}');"</#if>/>
+  <#else>
+    <input type="<#if containerId?has_content>button<#else>submit</#if>" 
<@renderClass className alert />
+    <#if name??> name="${name}"</#if><#if title?has_content> 
value="${title}"</#if><#if event?has_content> ${event}="${action}"</#if>
+    <#if containerId?has_content> onclick="<#if confirmation?has_content>if 
(confirm('${confirmation?js_string}')) 
</#if>ajaxSubmitFormUpdateAreas('${containerId}', '${ajaxUrl}')"
+      <#else><#if confirmation?has_content> onclick="return 
confirm('${confirmation?js_string}');"</#if>
+    </#if>/>
+  </#if>
+</#macro>
+
+<#macro renderResetField className alert name title>
+  <input type="reset" <@renderClass className alert /> name="${name}"<#if 
title?has_content> value="${title}"</#if>/>
+</#macro>
+
+<#macro renderHiddenField name value id event action>
+  <input type="hidden" name="${name}"<#if value?has_content> 
value="${value}"</#if><#if id?has_content> id="${id}"</#if><#if 
event?has_content && action?has_content> ${event}="${action}"</#if>/>
+</#macro>
+
+<#macro renderIgnoredField></#macro>
+
+<#macro renderFieldTitle style title id fieldHelpText="" for="" >
+  <label <#if for?has_content>for="${for}"</#if> <#if 
fieldHelpText?has_content> title="${fieldHelpText}"</#if> 
class="control-label"<#if id?has_content> id="${id}"</#if>><#t/>
+    ${title}<#t/>
+  </label><#t/>
+</#macro>
+
+<#macro renderSingleFormFieldTitle></#macro>
+
+<#macro renderFormOpen linkUrl formType targetWindow containerId 
containerStyle autocomplete name viewIndexField viewSizeField viewIndex 
viewSize useRowSubmit>
+  <form method="post" role="form" action="${linkUrl}"<#if formType=="upload"> 
enctype="multipart/form-data"</#if><#if targetWindow?has_content> 
target="${targetWindow}"</#if><#if containerId?has_content> 
id="${containerId}"</#if> class=<#if 
containerStyle?has_content>"${containerStyle}"<#else>"form-horizontal"</#if> 
onsubmit="javascript:submitFormDisableSubmits(this)"<#if 
autocomplete?has_content> autocomplete="${autocomplete}"</#if> 
name="${name}"><#lt/>
+    <#if useRowSubmit?has_content && useRowSubmit>
+      <input type="hidden" name="_useRowSubmit" value="Y"/>
+      <#if linkUrl?index_of("VIEW_INDEX") &lt;= 0 && 
linkUrl?index_of(viewIndexField) &lt;= 0>
+        <input type="hidden" name="${viewIndexField}" value="${viewIndex}"/>
+      </#if>
+      <#if linkUrl?index_of("VIEW_SIZE") &lt;= 0 && 
linkUrl?index_of(viewSizeField) &lt;= 0>
+        <input type="hidden" name="${viewSizeField}" value="${viewSize}"/>
+      </#if>
+    </#if>
+</#macro>
+<#macro renderFormClose focusFieldName formName containerId hasRequiredField>
+  </form><#lt/>
+  <#if focusFieldName?has_content>
+    <script language="JavaScript" type="text/javascript">
+      var form = document.${formName};
+      form.${focusFieldName}.focus();
+      <#-- enable the validation plugin for all generated forms
+      only enable the validation if min one field is marked as 'required' -->
+      if (jQuery(form).find(".required").size() > 0) {
+        jQuery(form).validate();
+      }
+    </script><#lt/>
+  </#if>
+  <#if containerId?has_content && hasRequiredField?has_content>
+    <script type="text/javascript">
+      jQuery("#${containerId}").validate({
+        submitHandler:
+          function(form) {
+            form.submit();
+          }
+      });
+    </script>
+  </#if>
+</#macro>
+<#macro renderMultiFormClose>
+  </form><#lt/>
+</#macro>
+
+<#macro renderFormatListWrapperOpen formName style columnStyles>
+  <table cellspacing="0" class="<#if 
style?has_content>${style}<#else>basic-table form-widget-table 
dark-grid</#if>"><#lt/>
+</#macro>
+
+<#macro renderFormatListWrapperClose formName>
+  </table><#lt/>
+</#macro>
+
+<#macro renderFormatHeaderRowOpen style>
+  <tr class="<#if style?has_content>${style}<#else>header-row</#if>">
+</#macro>
+<#macro renderFormatHeaderRowClose>
+  </tr>
+</#macro>
+<#macro renderFormatHeaderRowCellOpen style positionSpan>
+  <td <#if positionSpan?has_content && positionSpan gt 1 
>colspan="${positionSpan}"</#if><#if style?has_content>class="${style}"</#if>>
+</#macro>
+<#macro renderFormatHeaderRowCellClose>
+  </td>
+</#macro>
+
+<#macro renderFormatHeaderRowFormCellOpen style>
+  <td <#if style?has_content>class="${style}"</#if>>
+</#macro>
+<#macro renderFormatHeaderRowFormCellClose>
+  </td>
+</#macro>
+<#macro renderFormatHeaderRowFormCellTitleSeparator style isLast>
+  <#if style?has_content><span class="${style}"></#if> - <#if 
style?has_content></span></#if>
+</#macro>
+
+<#macro renderFormatItemRowOpen formName itemIndex altRowStyles evenRowStyle 
oddRowStyle>
+  <tr <#if itemIndex?has_content><#if itemIndex%2==0><#if 
evenRowStyle?has_content>class="${evenRowStyle}<#if altRowStyles?has_content> 
${altRowStyles}</#if>"<#elseif 
altRowStyles?has_content>class="${altRowStyles}"</#if><#else><#if 
oddRowStyle?has_content>class="${oddRowStyle}<#if altRowStyles?has_content> 
${altRowStyles}</#if>"<#elseif 
altRowStyles?has_content>class="${altRowStyles}"</#if></#if></#if> >
+</#macro>
+<#macro renderFormatItemRowClose formName>
+  </tr>
+</#macro>
+<#macro renderFormatItemRowCellOpen fieldName style positionSpan>
+  <td <#if positionSpan?has_content && positionSpan gt 
1>colspan="${positionSpan}"</#if><#if style?has_content>class="${style}"</#if>>
+</#macro>
+<#macro renderFormatItemRowCellClose fieldName>
+  </td>
+</#macro>
+<#macro renderFormatItemRowFormCellOpen style>
+  <td<#if style?has_content> class="${style}"</#if>>
+</#macro>
+<#macro renderFormatItemRowFormCellClose>
+  </td>
+</#macro>
+
+<#macro renderFormatSingleWrapperOpen formName style>
+  <#-- <table cellspacing="0" <#if style?has_content>class="${style}"</#if>> 
-->
+</#macro>
+<#macro renderFormatSingleWrapperClose formName>
+  <#--  </table> -->
+</#macro>
+
+<#macro renderFormatFieldRowOpen>
+       <div class="form-group">
+</#macro>
+<#macro renderFormatFieldRowClose>
+  </div>
+</#macro>
+<#macro renderFormatFieldRowTitleCellOpen style>
+       <div class="col-sm-2">
+</#macro>
+<#macro renderFormatFieldRowTitleCellClose>
+       </div>
+</#macro>
+<#macro renderFormatFieldRowSpacerCell></#macro>
+<#macro renderFormatFieldRowWidgetCellOpen positionSpan style>
+       <div class="col-sm-4">
+</#macro>
+<#macro renderFormatFieldRowWidgetCellClose>
+       <#-- </div> -->
+  </div>
+</#macro>
+
+<#--
+    Initial work to convert table based layout for "single" form to divs.
+<#macro renderFormatSingleWrapperOpen style> <div <#if 
style?has_content>class="${style}"</#if> ></#macro>
+<#macro renderFormatSingleWrapperClose> </div></#macro>
+
+<#macro renderFormatFieldRowOpen>  <div></#macro>
+<#macro renderFormatFieldRowClose>  </div></#macro>
+<#macro renderFormatFieldRowTitleCellOpen style>   <div class="<#if 
style?has_content>${style}<#else>label</#if>"></#macro>
+<#macro renderFormatFieldRowTitleCellClose></div></#macro>
+<#macro renderFormatFieldRowSpacerCell></#macro>
+<#macro renderFormatFieldRowWidgetCellOpen positionSpan style>   <div<#if 
positionSpan?has_content && positionSpan gt 0> 
colspan="${1+positionSpan*3}"</#if><#if style?has_content> 
class="${style}"</#if>></#macro>
+<#macro renderFormatFieldRowWidgetCellClose></div></#macro>
+
+-->
+
+
+<#macro renderFormatEmptySpace>&nbsp;</#macro>
+
+<#macro renderTextFindField name value defaultOption opEquals opBeginsWith 
opContains opIsEmpty opNotEqual className alert size maxlength autocomplete 
titleStyle hideIgnoreCase ignCase ignoreCase>
+  <#if opEquals?has_content>
+    <select <#if name?has_content>name="${name}_op"</#if>    
class="selectBox"><#rt/>
+      <option value="equals"<#if defaultOption=="equals"> 
selected="selected"</#if>>${opEquals}</option><#rt/>
+      <option value="like"<#if defaultOption=="like"> 
selected="selected"</#if>>${opBeginsWith}</option><#rt/>
+      <option value="contains"<#if defaultOption=="contains"> 
selected="selected"</#if>>${opContains}</option><#rt/>
+      <option value="empty"<#rt/><#if defaultOption=="empty"> 
selected="selected"</#if>>${opIsEmpty}</option><#rt/>
+      <option value="notEqual"<#if defaultOption=="notEqual"> 
selected="selected"</#if>>${opNotEqual}</option><#rt/>
+    </select>
+  <#else>
+       <input type="hidden" name=<#if name?has_content> "${name}_op"</#if>    
value="${defaultOption}"/><#rt/>
+  </#if>
+       <input type="text" <@renderClass className alert /> name="${name}"<#if 
value?has_content> value="${value}"</#if><#if size?has_content> 
size="${size}"</#if><#if maxlength?has_content> 
maxlength="${maxlength}"</#if><#if autocomplete?has_content> 
autocomplete="off"</#if>/><#rt/>
+    <#if titleStyle?has_content><span class="${titleStyle}" ><#rt/></#if>
+    <#if hideIgnoreCase>
+      <input type="hidden" name="${name}_ic" value=<#if ignCase>"Y"<#else> 
""</#if>/><#rt/>
+    <#else>
+               <input type="checkbox" name="${name}_ic" value="Y" <#if 
ignCase> checked="checked"</#if> /> ${ignoreCase}<#rt/>
+    </#if>
+    <#if titleStyle?has_content></span>
+  </#if>
+</#macro>
+
+<#macro renderDateFindField className alert name localizedInputTitle value 
size maxlength dateType formName defaultDateTimeString imgSrc 
localizedIconTitle titleStyle defaultOptionFrom defaultOptionThru opEquals 
opSameDay opGreaterThanFromDayStart opGreaterThan opGreaterThan opLessThan 
opUpToDay opUpThruDay opIsEmpty>
+  <span class="view-calendar">
+    <input id="${name?html}_fld0_value" type="text" <@renderClass className 
alert /><#if name?has_content> name="${name?html}_fld0_value"</#if><#if 
localizedInputTitle?has_content> title="${localizedInputTitle}"</#if><#if 
value?has_content> value="${value}"</#if><#if size?has_content> 
size="${size}"</#if><#if maxlength?has_content> 
maxlength="${maxlength}"</#if>/><#rt/>
+    <#if dateType != "time">
+      <script type="text/javascript">
+        <#if dateType == "date">
+          jQuery("#${name?html}_fld0_value").datepicker({
+        <#else>
+          jQuery("#${name?html}_fld0_value").datetimepicker({
+            showSecond: true,
+            <#-- showMillisec: true, -->
+            timeFormat: 'HH:mm:ss',
+            stepHour: 1,
+            stepMinute: 5,
+            stepSecond: 10,
+        </#if>
+            showOn: 'button',
+            buttonImage: '',
+            buttonText: '',
+            buttonImageOnly: false,
+            dateFormat: 'yy-mm-dd'
+          });
+      </script>
+      <#rt/>
+    </#if>
+    <#if titleStyle?has_content>
+      <span class="${titleStyle}"><#rt/>
+    </#if>
+    <select<#if name?has_content> name="${name}_fld0_op"</#if> 
class="selectBox"><#rt/>
+      <option value="equals"<#if defaultOptionFrom=="equals"> 
selected="selected"</#if>>${opEquals}</option><#rt/>
+      <option value="sameDay"<#if defaultOptionFrom=="sameDay"> 
selected="selected"</#if>>${opSameDay}</option><#rt/>
+      <option value="greaterThanFromDayStart"<#if 
defaultOptionFrom=="greaterThanFromDayStart"> 
selected="selected"</#if>>${opGreaterThanFromDayStart}</option><#rt/>
+      <option value="greaterThan"<#if defaultOptionFrom=="greaterThan"> 
selected="selected"</#if>>${opGreaterThan}</option><#rt/>
+    </select><#rt/>
+    <#if titleStyle?has_content>
+      </span><#rt/>
+    </#if>
+    <#rt/>
+    <input id="${name?html}_fld1_value" type="text" <@renderClass className 
alert /><#if name?has_content> name="${name}_fld1_value"</#if><#if 
localizedInputTitle??> title="${localizedInputTitle?html}"</#if><#if 
value2?has_content> value="${value2}"</#if><#if size?has_content> 
size="${size}"</#if><#if maxlength?has_content> 
maxlength="${maxlength}"</#if>/><#rt/>
+    <#if dateType != "time">
+      <script type="text/javascript">
+        <#if dateType == "date">
+          jQuery("#${name?html}_fld1_value").datepicker({
+        <#else>
+          jQuery("#${name?html}_fld1_value").datetimepicker({
+            showSecond: true,
+            <#-- showMillisec: true, -->
+            timeFormat: 'HH:mm:ss',
+            stepHour: 1,
+            stepMinute: 5,
+            stepSecond: 10,
+        </#if>
+            showOn: 'button',
+            buttonImage: '',
+            buttonText: '',
+            buttonImageOnly: false,
+            dateFormat: 'yy-mm-dd'
+          });
+      </script>
+      <#rt/>
+    </#if>
+    <#if titleStyle?has_content>
+      <span class="${titleStyle}"><#rt/>
+    </#if>
+    <select name=<#if name?has_content>"${name}_fld1_op"</#if> 
class="selectBox"><#rt/>
+      <option value="opLessThan"<#if defaultOptionThru=="opLessThan"> 
selected="selected"</#if>>${opLessThan}</option><#rt/>
+      <option value="upToDay"<#if defaultOptionThru=="upToDay"> 
selected="selected"</#if>>${opUpToDay}</option><#rt/>
+      <option value="upThruDay"<#if defaultOptionThru=="upThruDay"> 
selected="selected"</#if>>${opUpThruDay}</option><#rt/>
+      <option value="empty"<#if defaultOptionFrom=="empty"> 
selected="selected"</#if>>${opIsEmpty}</option><#rt/>
+    </select><#rt/>
+    <#if titleStyle?has_content>
+      </span>
+    </#if>
+  </span>
+       <script type="text/javascript">
+           jQuery(document).ready(function(){
+               
jQuery('.ui-datepicker-trigger').removeClass('ui-datepicker-trigger').addClass('btn
 btn-primary btn-sm').html('<span class="glyphicon 
glyphicon-calendar"></span>');
+           });
+       </script>
+</#macro>
+
+<#macro renderRangeFindField className alert name value size maxlength 
autocomplete titleStyle defaultOptionFrom opEquals opGreaterThan 
opGreaterThanEquals opLessThan opLessThanEquals value2 defaultOptionThru>
+  <input type="text" <@renderClass className alert /> <#if 
name?has_content>name="${name}_fld0_value"</#if><#if value?has_content> 
value="${value}"</#if><#if size?has_content> size="${size}"</#if><#if 
maxlength?has_content> maxlength="${maxlength}"</#if><#if 
autocomplete?has_content> autocomplete="off"</#if>/><#rt/>
+  <#if titleStyle?has_content>
+    <span class="${titleStyle}" ><#rt/>
+  </#if>
+  <select <#if name?has_content>name="${name}_fld0_op"</#if> 
class="selectBox"><#rt/>
+    <option value="equals"<#if defaultOptionFrom=="equals"> 
selected="selected"</#if>>${opEquals}</option><#rt/>
+    <option value="greaterThan"<#if defaultOptionFrom=="greaterThan"> 
selected="selected"</#if>>${opGreaterThan}</option><#rt/>
+    <option value="greaterThanEqualTo"<#if 
defaultOptionFrom=="greaterThanEqualTo"> 
selected="selected"</#if>>${opGreaterThanEquals}</option><#rt/>
+  </select><#rt/>
+  <#if titleStyle?has_content>
+    </span><#rt/>
+  </#if>
+  <br /><#rt/>
+  <input type="text" <@renderClass className alert /><#if name?has_content> 
name="${name}_fld1_value"</#if><#if value2?has_content> 
value="${value2}"</#if><#if size?has_content> size="${size}"</#if><#if 
maxlength?has_content> maxlength="${maxlength}"</#if><#if 
autocomplete?has_content> autocomplete="off"</#if>/><#rt/>
+  <#if titleStyle?has_content>
+    <span class="${titleStyle}" ><#rt/>
+  </#if>
+  <select name=<#if name?has_content>"${name}_fld1_op"</#if> 
class="selectBox"><#rt/>
+    <option value="lessThan"<#if defaultOptionThru=="lessThan"> 
selected="selected"</#if>>${opLessThan?html}</option><#rt/>
+    <option value="lessThanEqualTo"<#if defaultOptionThru=="lessThanEqualTo"> 
selected="selected"</#if>>${opLessThanEquals?html}</option><#rt/>
+  </select><#rt/>
+  <#if titleStyle?has_content>
+    </span>
+  </#if>
+</#macro>
+
+<#--
+@renderLookupField
+
+Description: Renders a text input field as a lookup field.
+
+Parameter: name, String, required - The name of the lookup field.
+Parameter: formName, String, required - The name of the form that contains the 
lookup field.
+Parameter: fieldFormName, String, required - Contains the lookup window form 
name.
+Parameter: className, String, optional - The CSS class name for the lookup 
field.
+Parameter: alert, String, optional - If "true" then the "alert" CSS class will 
be added to the lookup field.
+Parameter: value, Object, optional - The value of the lookup field.
+Parameter: size, String, optional - The size of the lookup field.
+Parameter: maxlength, String or Integer, optional - The max length of the 
lookup field.
+Parameter: id, String, optional - The ID of the lookup field.
+Parameter: event, String, optional - The lookup field event that invokes 
"action". If the event parameter is not empty, then the action parameter must 
be specified as well.
+Parameter: action, String, optional - The action that is invoked on "event". 
If action parameter is not empty, then the event parameter must be specified as 
well.
+Parameter: readonly, boolean, optional - If true, the lookup field is made 
read-only.
+Parameter: autocomplete, String, optional - If not empty, autocomplete is 
turned off for the lookup field.
+Parameter: descriptionFieldName, String, optional - If not empty and the 
presentation parameter contains "window", specifies an alternate input field 
for updating.
+Parameter: targetParameterIter, List, optional - Contains a list of form field 
names whose values will be passed to the lookup window.
+Parameter: imgSrc, Not used.
+Parameter: ajaxUrl, String, optional - Contains the Ajax URL, used only when 
the ajaxEnabled parameter contains true.
+Parameter: ajaxEnabled, boolean, optional - If true, invokes the Ajax 
auto-completer.
+Parameter: presentation, String, optional - Contains the lookup window type, 
either "layer" or "window".
+Parameter: width, String or Integer, optional - The width of the lookup field.
+Parameter: height, String or Integer, optional - The height of the lookup 
field.
+Parameter: position, String, optional - The position style of the lookup field.
+Parameter: fadeBackground, ?
+Parameter: clearText, String, optional - If the readonly parameter is true, 
clearText contains the text to be displayed in the field, default is 
CommonClear label.
+Parameter: showDescription, String, optional - If the showDescription 
parameter is true, a special span with css class "tooltip" will be created at 
right of the lookup button and a description will fill in (see 
setLookDescription in selectall.js). For now not when the lookup is read only.
+Parameter: initiallyCollapsed, Not used.
+Parameter: lastViewName, String, optional - If the ajaxEnabled parameter is 
true, the contents of lastViewName will be appended to the Ajax URL.
+-->
+<#macro renderLookupField name formName fieldFormName className="" 
alert="false" value="" size="" maxlength="" id="" event="" action="" 
readonly=false autocomplete="" descriptionFieldName="" targetParameterIter="" 
imgSrc="" ajaxUrl="" ajaxEnabled=javaScriptEnabled presentation="layer" 
width="" height="" position="" fadeBackground="true" clearText="" 
showDescription="" initiallyCollapsed="" lastViewName="main" >
+  <#if 
Static["org.ofbiz.widget.ModelWidget"].widgetBoundaryCommentsEnabled(context)>
+  <!-- @renderLookupField -->
+  </#if>
+  <#if (!ajaxUrl?has_content) && ajaxEnabled?has_content && ajaxEnabled>
+    <#local ajaxUrl = requestAttributes._REQUEST_HANDLER_.makeLink(request, 
response, fieldFormName)/>
+    <#local ajaxUrl = id + "," + ajaxUrl + ",ajaxLookup=Y" />
+  </#if>
+  <#if (!showDescription?has_content)>
+    <#local showDescriptionProp = 
Static["org.ofbiz.base.util.UtilProperties"].getPropertyValue("widget.properties",
 "widget.lookup.showDescription", "N")>
+    <#if "Y" == showDescriptionProp>
+      <#local showDescription = "true" />
+    <#else>
+      <#local showDescription = "false" />
+    </#if>
+  </#if>
+  <#if ajaxEnabled?has_content && ajaxEnabled>
+    <script type="text/javascript">
+      jQuery(document).ready(function(){
+        if (!jQuery('form[name="${formName}"]').length) {
+          alert("Developer: for lookups to work you must provide a form name!")
+        }
+      });
+    </script>
+  </#if>
+  <span class="field-lookup">
+    <#if size?has_content && size=="0">
+      <input type="hidden" <#if name?has_content> name="${name}"/></#if>
+    <#else>
+      <input type="text" <@renderClass className alert /><#if 
name?has_content> name="${name}"</#if><#if value?has_content> 
value="${value}"</#if>
+        <#if size?has_content> size="${size}"</#if><#if maxlength?has_content> 
maxlength="${maxlength}"</#if><#if id?has_content> id="${id}"</#if><#rt/>
+        <#if readonly?has_content && readonly> 
readonly="readonly"</#if><#rt/><#if event?has_content && action?has_content> 
${event}="${action}"</#if><#rt/>
+        <#if autocomplete?has_content> autocomplete="off"</#if>/><#rt/>
+    </#if>
+    <#if presentation?has_content && descriptionFieldName?has_content && 
presentation == "window">
+      <a 
href="javascript:call_fieldlookup3(document.${formName?html}.${name?html},document.${formName?html}.${descriptionFieldName},'${fieldFormName}',
 '${presentation}'<#rt/>
+      <#if targetParameterIter?has_content>
+        <#list targetParameterIter as item>
+          ,document.${formName}.${item}.value<#rt>
+        </#list>
+      </#if>
+      );"></a><#rt>
+    <#elseif presentation?has_content && presentation == "window">
+      <a 
href="javascript:call_fieldlookup2(document.${formName?html}.${name?html},'${fieldFormName}',
 '${presentation}'<#rt/>
+      <#if targetParameterIter?has_content>
+        <#list targetParameterIter as item>
+          ,document.${formName}.${item}.value<#rt>
+        </#list>
+      </#if>
+      );"></a><#rt>
+    <#else>
+      <#if ajaxEnabled?has_content && ajaxEnabled>
+        <#assign defaultMinLength = 
Static["org.ofbiz.base.util.UtilProperties"].getPropertyValue("widget.properties",
 "widget.autocompleter.defaultMinLength")>
+        <#assign defaultDelay = 
Static["org.ofbiz.base.util.UtilProperties"].getPropertyValue("widget.properties",
 "widget.autocompleter.defaultDelay")>
+        <#local ajaxUrl = ajaxUrl + "&amp;_LAST_VIEW_NAME_=" + lastViewName />
+        <#if !ajaxUrl?contains("searchValueFieldName=")>
+          <#if descriptionFieldName?has_content && showDescription == "true">
+            <#local ajaxUrl = ajaxUrl + "&amp;searchValueFieldName=" + 
descriptionFieldName />
+          <#else>
+            <#local ajaxUrl = ajaxUrl + "&amp;searchValueFieldName=" + name />
+          </#if>
+        </#if>
+      </#if>
+      <script type="text/javascript">
+        jQuery(document).ready(function(){
+          var options = {
+            requestUrl : "${fieldFormName}",
+            inputFieldId : "${id}",
+            dialogTarget : document.${formName?html}.${name?html},
+            dialogOptionalTarget : <#if 
descriptionFieldName?has_content>document.${formName?html}.${descriptionFieldName}<#else>null</#if>,
+            formName : "${formName?html}",
+            width : "${width}",
+            height : "${height}",
+            position : "${position}",
+            modal : "${fadeBackground}",
+            ajaxUrl : <#if ajaxEnabled?has_content && 
ajaxEnabled>"${ajaxUrl}"<#else>""</#if>,
+            showDescription : <#if ajaxEnabled?has_content && 
ajaxEnabled>"${showDescription}"<#else>false</#if>,
+            presentation : "${presentation!}",
+            defaultMinLength : "${defaultMinLength!2}",
+            defaultDelay : "${defaultDelay!300}",
+            args :
+              <#rt/>
+                <#if targetParameterIter?has_content>
+                  <#assign isFirst = true>
+                  <#lt/>[<#rt/>
+                  <#list targetParameterIter as item>
+                    <#if isFirst>
+                      <#lt/>document.${formName}.${item}<#rt/>
+                      <#assign isFirst = false>
+                    <#else>
+                      <#lt/> ,document.${formName}.${item}<#rt/>
+                    </#if>
+                  </#list>
+                  <#lt/>]<#rt/>
+                <#else>[]
+                </#if>
+                <#lt/>
+          };
+          new Lookup(options).init();
+        });
+      </script>
+    </#if>
+    <#if readonly?has_content && readonly>
+      <a id="${id}_clear" 
+        style="background:none;margin-left:5px;margin-right:15px;" 
+        class="clearField" 
+        href="javascript:void(0);" 
+        onclick="javascript:document.${formName}.${name}.value='';
+          jQuery('#' + 
jQuery('#${id}_clear').next().attr('id').replace('_button','') + 
'_${id}_lookupDescription').html('');
+          <#if 
descriptionFieldName?has_content>document.${formName}.${descriptionFieldName}.value='';</#if>">
+          <#if 
clearText?has_content>${clearText}<#else>${uiLabelMap.CommonClear}</#if>
+      </a>
+    </#if>
+  </span>
+  <#if ajaxEnabled?has_content && ajaxEnabled && (presentation?has_content && 
presentation == "window")>
+    <#if ajaxUrl?index_of("_LAST_VIEW_NAME_") < 0>
+      <#local ajaxUrl = ajaxUrl + "&amp;_LAST_VIEW_NAME_=" + lastViewName />
+    </#if>
+    <script language="JavaScript" 
type="text/javascript">ajaxAutoCompleter('${ajaxUrl}', ${showDescription}, 
${defaultMinLength!2}, ${defaultDelay!300});</script><#t/>
+  </#if>
+  <script type="text/javascript">
+       jQuery(document).ready(function(){
+               jQuery('.field-lookup a').html('<button class="btn btn-primary 
btn-sm"><span class="glyphicon glyphicon-search"></span></button>');
+       });
+  </script>
+</#macro>
+
+<#macro renderNextPrev paginateStyle paginateFirstStyle viewIndex highIndex 
listSize viewSize ajaxEnabled javaScriptEnabled ajaxFirstUrl firstUrl 
paginateFirstLabel paginatePreviousStyle ajaxPreviousUrl previousUrl 
paginatePreviousLabel pageLabel ajaxSelectUrl selectUrl ajaxSelectSizeUrl 
selectSizeUrl commonDisplaying paginateNextStyle ajaxNextUrl nextUrl 
paginateNextLabel paginateLastStyle ajaxLastUrl lastUrl paginateLastLabel 
paginateViewSizeLabel>
+  <#if listSize gt viewSize>
+    <div class="${paginateStyle}">&nbsp; 
+      <ul>
+        <li class="${paginateFirstStyle}<#if viewIndex gt 0>"><a 
href="javascript:void(0)" onclick="<#if 
ajaxEnabled>ajaxUpdateAreas('${ajaxFirstUrl}')<#else>submitPagination(this, 
'${firstUrl}')</#if>">${paginateFirstLabel}</a><#else>-disabled"><span>${paginateFirstLabel}</span></#if></li>
+        <li class="${paginatePreviousStyle}<#if viewIndex gt 0>"><a 
href="javascript:void(0)" onclick="<#if 
ajaxEnabled>ajaxUpdateAreas('${ajaxPreviousUrl}')<#else>submitPagination(this, 
'${previousUrl}')</#if>">${paginatePreviousLabel}</a><#else>-disabled"><span>${paginatePreviousLabel}</span></#if></li>
+        <#if listSize gt 0 && javaScriptEnabled><li 
class="nav-page-select">${pageLabel} <select name="page" size="1" 
onchange="<#if 
ajaxEnabled>ajaxUpdateAreas('${ajaxSelectUrl}')<#else>submitPagination(this, 
'${selectUrl}'+this.value)</#if>"><#rt/>
+          <#assign x=(listSize/viewSize)?ceiling>
+            <#list 1..x as i>
+              <#if i == (viewIndex+1)><option selected="selected" 
value="<#else><option value="</#if>${i-1}">${i}</option>
+            </#list>
+          </select></li>
+        </#if>
+        <li class="${paginateNextStyle}<#if highIndex lt listSize>"><a 
href="javascript:void(0)" onclick="<#if 
ajaxEnabled>ajaxUpdateAreas('${ajaxNextUrl}')<#else>submitPagination(this, 
'${nextUrl}')</#if>">${paginateNextLabel}</a><#else>-disabled"><span>${paginateNextLabel}</span></#if></li>
+        <li class="${paginateLastStyle}<#if highIndex lt listSize>"><a 
href="javascript:void(0)" onclick="<#if 
ajaxEnabled>ajaxUpdateAreas('${ajaxLastUrl}')<#else>submitPagination(this, 
'${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>ajaxUpdateAreas('${ajaxSelectSizeUrl}')<#else>submitPagination(this,
 '${selectSizeUrl}')</#if>"><#rt/>
+            <#assign availPageSizes = [20, 30, 50, 100, 200]>
+          <#list availPageSizes as ps>
+            <option <#if viewSize == ps> selected="selected" </#if> 
value="${ps}">${ps}</option>
+          </#list>
+          </select> ${paginateViewSizeLabel}</li>
+        </#if>
+        <li class="nav-displaying">${commonDisplaying}</li>
+      </ul>
+    </div>
+  </#if>
+</#macro>
+
+<#macro renderFileField className alert name value size maxlength autocomplete>
+  <input type="file" <@renderClass className alert /><#if name?has_content> 
name="${name}"</#if><#if value?has_content> value="${value}"</#if><#if 
size?has_content> size="${size}"</#if><#if maxlength?has_content> 
maxlength="${maxlength}"</#if><#if autocomplete?has_content> 
autocomplete="off"</#if>/><#rt/>
+</#macro>
+<#macro renderPasswordField className alert name value size maxlength id 
autocomplete>
+  <input type="password" <@renderClass className alert /><#if 
name?has_content> name="${name}"</#if><#if value?has_content> 
value="${value}"</#if><#if size?has_content> size="${size}"</#if><#if 
maxlength?has_content> maxlength="${maxlength}"</#if><#if id?has_content> 
id="${id}"</#if><#if autocomplete?has_content> autocomplete="off"</#if>/>
+</#macro>
+<#macro renderImageField value description alternate style event 
action><img<#if value?has_content> src="${value}"</#if><#if 
description?has_content> title="${description}"</#if> alt="<#if 
alternate?has_content>${alternate}"</#if><#if style?has_content> 
class="${style}"</#if><#if event?has_content> ${event?html}="${action}" 
</#if>/></#macro>
+
+<#macro renderBanner style leftStyle rightStyle leftText text rightText>
+  <table width="100%">
+    <tr><#rt/>
+      <#if leftText?has_content><td align="left"><#if 
leftStyle?has_content><div class="${leftStyle}"></#if>${leftText}<#if 
leftStyle?has_content></div></#if></td><#rt/></#if>
+      <#if text?has_content><td align="center"><#if style?has_content><div 
class="${style}"></#if>${text}<#if 
style?has_content></div></#if></td><#rt/></#if>
+      <#if rightText?has_content><td align="right"><#if 
rightStyle?has_content><div class="${rightStyle}"></#if>${rightText}<#if 
rightStyle?has_content></div></#if></td><#rt/></#if>
+    </tr>
+  </table>
+</#macro>
+
+<#macro renderContainerField id className><div id="${id}" 
class="${className}"/></#macro>
+
+<#macro renderFieldGroupOpen style id title collapsed collapsibleAreaId 
collapsible expandToolTip collapseToolTip>
+  <#if style?has_content || id?has_content || title?has_content><div 
class="fieldgroup<#if style?has_content> ${style}</#if>"<#if id?has_content> 
id="${id}"</#if>>
+    <div class="fieldgroup-title-bar">
+      <#if collapsible>
+        <ul>
+          <li class="<#if collapsed>collapsed">
+                      <a onclick="javascript:toggleCollapsiblePanel(this, 
'${collapsibleAreaId}', '${expandToolTip}', '${collapseToolTip}');">
+                    <#else>expanded">
+                      <a onclick="javascript:toggleCollapsiblePanel(this, 
'${collapsibleAreaId}', '${expandToolTip}', '${collapseToolTip}');">
+                    </#if>
+            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<#if 
title?has_content>${title}</#if></a>
+          </li>
+        </ul>
+      <#else>
+        <#if title?has_content>${title}</#if>
+      </#if><#rt/>
+    </div>
+    <div id="${collapsibleAreaId}" class="fieldgroup-body" <#if collapsed && 
collapsible> style="display: none;"</#if>>
+  </#if>
+</#macro>
+
+<#macro renderFieldGroupClose style id title><#if style?has_content || 
id?has_content || title?has_content></div></div></#if></#macro>
+
+<#macro renderHyperlinkTitle name title showSelectAll="N">
+  <#if title?has_content>${title}<br /></#if>
+  <#if showSelectAll="Y"><input type="checkbox" name="selectAll" value="Y" 
onclick="javascript:toggleAll(this, '${name}');"/></#if>
+</#macro>
+
+<#macro renderSortField style title linkUrl ajaxEnabled tooltip="">
+  <a<#if style?has_content> class="${style}"</#if> href="<#if 
ajaxEnabled?has_content && 
ajaxEnabled>javascript:ajaxUpdateAreas('${linkUrl}')<#else>${linkUrl}</#if>"<#if
 tooltip?has_content> title="${tooltip}"</#if>>${title}</a>
+</#macro>
+
+<#macro formatBoundaryComment boundaryType widgetType widgetName><!-- 
${boundaryType}  ${widgetType}  ${widgetName} --></#macro>
+
+<#macro renderTooltip tooltip tooltipStyle>
+  <#if tooltip?has_content><span class="<#if 
tooltipStyle?has_content>${tooltipStyle}<#else>tooltip</#if>">${tooltip}</span><#rt/></#if>
+</#macro>
+
+<#macro renderClass className="" alert="">
+  <#if className?has_content || (alert?has_content && alert=="true")> 
class="${className}<#if alert?has_content && alert=="true"> alert</#if>" </#if>
+</#macro>
+
+<#macro renderAsterisks requiredField requiredStyle>
+  <#if requiredField=="true"><#if !requiredStyle?has_content>*</#if></#if>
+</#macro>
+
+<#macro makeHiddenFormLinkForm actionUrl name parameters targetWindow>
+  <form method="post" action="${actionUrl}" <#if 
targetWindow?has_content>target="${targetWindow}"</#if> 
onsubmit="javascript:submitFormDisableSubmits(this)" name="${name}">
+    <#list parameters as parameter>
+      <input name="${parameter.name}" value="${parameter.value}" 
type="hidden"/>
+    </#list>
+  </form>
+</#macro>
+<#macro makeHiddenFormLinkAnchor linkStyle hiddenFormName event action imgSrc 
description confirmation>
+  <a <#if linkStyle?has_content>class="${linkStyle}"</#if> 
href="javascript:document.${hiddenFormName}.submit()"
+    <#if action?has_content && event?has_content> ${event}="${action}"</#if>
+    <#if confirmation?has_content> onclick="return 
confirm('${confirmation?js_string}')"</#if>>
+      <#if imgSrc?has_content><img src="${imgSrc}" 
alt=""/></#if>${description}</a>
+</#macro>
+<#macro makeHyperlinkString linkStyle hiddenFormName event action imgSrc title 
alternate linkUrl targetWindow description confirmation>
+    <a <#if linkStyle?has_content>class="${linkStyle}"</#if> 
+      href="${linkUrl}"<#if targetWindow?has_content> 
target="${targetWindow}"</#if>
+      <#if action?has_content && event?has_content> ${event}="${action}"</#if>
+      <#if confirmation?has_content> onclick="return 
confirm('${confirmation?js_string}')"</#if>
+      <#if imgSrc?length == 0 && title?has_content> title="${title}"</#if>>
+        <#if imgSrc?has_content><img src="${imgSrc}" alt="${alternate}" 
title="${title}"/></#if>${description}</a>
+  </#macro>

Added: 
ofbiz/branches/boostrap_theme/themes/bootstrap/includes/templates/htmlMenuMacroLibrary.ftl
URL: 
http://svn.apache.org/viewvc/ofbiz/branches/boostrap_theme/themes/bootstrap/includes/templates/htmlMenuMacroLibrary.ftl?rev=1641665&view=auto
==============================================================================
--- 
ofbiz/branches/boostrap_theme/themes/bootstrap/includes/templates/htmlMenuMacroLibrary.ftl
 (added)
+++ 
ofbiz/branches/boostrap_theme/themes/bootstrap/includes/templates/htmlMenuMacroLibrary.ftl
 Tue Nov 25 18:35:47 2014
@@ -0,0 +1,90 @@
+<#--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<#macro renderMenuBegin boundaryComment="" id="" style="" title="">
+  <#if boundaryComment?has_content>
+<!-- ${boundaryComment} -->
+  </#if>
+  <#-- <div<#if id?has_content> id="${id}"<#elseif style?has_content> 
class="${style}"</#if>> -->
+  <#if style == "button-bar tab-bar">
+               <nav class="navbar navbar-default button-bar tab-bar" 
role="navigation">
+                       <ul class="nav navbar-nav">
+                               <#if title?has_content>
+                               <li class="menuTitle"><a 
href="#">${title}</a></li>
+                               </#if>
+       <#elseif style == "button-bar button-style-2">
+               <#-- <nav class="navbar navbar-default button-bar 
button-style-2" role="navigation"> -->
+                       <ul class="nav navbar-pills pull-right" role="tablist">
+       <#else>
+               <nav class="navbar navbar-default" role="navigation">
+                       <ul class="nav navbar-nav">
+  </#if>
+       
+</#macro>
+
+<#macro renderMenuEnd boundaryComment="" style="">
+       <#if style == "button-bar button-style-2">
+               </ul>
+               <#else>
+                       </ul>
+               </nav>
+       </#if>
+<#if boundaryComment?has_content>
+<!-- ${boundaryComment} -->
+</#if>
+</#macro>
+
+<#macro renderImage src id style width height border>
+<img src="${src}"<#if id?has_content> id="${id}"</#if><#if style?has_content> 
class="${style}"</#if><#if width?has_content> width="${width}"</#if><#if 
height?has_content> height="${height}"</#if><#if border?has_content> 
border="${border}"</#if> />
+</#macro>
+
+<#macro renderLink linkUrl parameterList targetWindow uniqueItemName actionUrl 
linkType="" id="" style="" name="" height="" width="" text="" imgStr="">
+  <#if linkType?has_content && "hidden-form" == linkType>
+<form method="post" action="${actionUrl}"<#if targetWindow?has_content> 
target="${targetWindow}"</#if> 
onsubmit="javascript:submitFormDisableSubmits(this)" 
name="${uniqueItemName}"><#rt/>
+    <#list parameterList as parameter>
+<input name="${parameter.name}" value="${parameter.value}" 
type="hidden"/><#rt/>
+    </#list>
+</form><#rt/>
+  </#if>
+<#if (linkType?has_content && "hidden-form" == linkType) || 
linkUrl?has_content>
+<a<#if id?has_content> id="${id}"</#if><#if style?has_content> 
class="${style}"</#if><#if name?has_content> name="${name}"</#if><#if 
targetWindow?has_content> target="${targetWindow}"</#if> href="<#if 
"hidden-form"==linkType>javascript:document.${uniqueItemName}.submit()<#else>${linkUrl}</#if>"><#rt/>
+</#if>
+<#if imgStr?has_content>${imgStr}</#if><#if 
text?has_content>${text}</#if><#rt/>
+<#if (linkType?has_content && "hidden-form" == linkType) || 
linkUrl?has_content></a><#rt/></#if>
+</#macro>
+
+<#macro renderMenuItemBegin style toolTip linkStr containsNestedMenus>
+       <#if style == "buttontext create">
+               <li role="presentation" <#if toolTip?has_content> 
title="${toolTip}"</#if>><#if linkStr?has_content>${linkStr}</#if><#if 
containsNestedMenus><ul></#if><#rt/>
+               <script type="text/javascript">
+             jQuery(".navbar-pills.pull-right li 
a.buttontext.create").each(function(){
+               var linkText = jQuery(this).html();
+               var data = '<span class="glyphicon glyphicon-plus"></span> 
'+linkText;
+               
jQuery(this).removeClass('buttontext').removeClass('create').addClass("btn 
btn-primary btn-sm");
+               jQuery(this).html(data);
+               });
+           </script>
+       <#else>
+        <li<#if style?has_content> class="${style}"</#if><#if 
toolTip?has_content> title="${toolTip}"</#if>><#if 
linkStr?has_content>${linkStr}</#if><#if containsNestedMenus><ul></#if><#rt/>
+    </#if>
+</#macro>
+
+<#macro renderMenuItemEnd containsNestedMenus>
+<#if containsNestedMenus></ul></#if></li>
+</#macro>

Added: 
ofbiz/branches/boostrap_theme/themes/bootstrap/includes/templates/htmlScreenMacroLibrary.ftl
URL: 
http://svn.apache.org/viewvc/ofbiz/branches/boostrap_theme/themes/bootstrap/includes/templates/htmlScreenMacroLibrary.ftl?rev=1641665&view=auto
==============================================================================
--- 
ofbiz/branches/boostrap_theme/themes/bootstrap/includes/templates/htmlScreenMacroLibrary.ftl
 (added)
+++ 
ofbiz/branches/boostrap_theme/themes/bootstrap/includes/templates/htmlScreenMacroLibrary.ftl
 Tue Nov 25 18:35:47 2014
@@ -0,0 +1,368 @@
+<#--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<#macro renderScreenBegin>
+<!DOCTYPE html>
+</#macro>
+
+<#macro renderScreenEnd>
+</#macro>
+
+<#macro renderSectionBegin boundaryComment>
+<#if boundaryComment?has_content>
+<!-- ${boundaryComment} -->
+</#if>
+</#macro>
+
+<#macro renderSectionEnd boundaryComment>
+<#if boundaryComment?has_content>
+<!-- ${boundaryComment} -->
+</#if>
+</#macro>
+
+<#macro renderContainerBegin id style autoUpdateLink autoUpdateInterval>
+<#if autoUpdateLink?has_content>
+<script type="text/javascript">ajaxUpdateAreaPeriodic('${id}', 
'${autoUpdateLink}', '', '${autoUpdateInterval}');</script>
+</#if>
+<div<#if id?has_content> id="${id}"</#if><#if style?has_content> 
class="${style}"</#if>>
+</#macro>
+<#macro renderContainerEnd></div></#macro>
+<#macro renderContentBegin editRequest enableEditValue editContainerStyle><#if 
editRequest?has_content && enableEditValue == "true"><div 
class=${editContainerStyle}></#if></#macro>
+<#macro renderContentBody></#macro>
+<#macro renderContentEnd urlString editMode editContainerStyle editRequest 
enableEditValue>
+<#if editRequest?? && enableEditValue == "true">
+<#if urlString??><a href="${urlString}">${editMode}</a><#rt/></#if>
+<#if editContainerStyle??></div><#rt/></#if>
+</#if>
+</#macro>
+<#macro renderSubContentBegin editContainerStyle editRequest 
enableEditValue><#if editRequest?? && enableEditValue == "true"><div 
class="${editContainerStyle}"></#if></#macro>
+<#macro renderSubContentBody></#macro>
+<#macro renderSubContentEnd urlString editMode editContainerStyle editRequest 
enableEditValue>
+<#if editRequest?? && enableEditValue == "true">
+<#if urlString??><a href="${urlString}">${editMode}</a><#rt/></#if>
+<#if editContainerStyle??></div><#rt/></#if>
+</#if>
+</#macro>
+
+<#macro renderHorizontalSeparator id style><hr<#if id?has_content> 
id="${id}"</#if><#if style?has_content> class="${style}"</#if>/></#macro>
+
+<#macro renderLabel text id style>
+  <#if text?has_content>
+    <#-- If a label widget has one of the h1-h6 styles, then it is considered 
block level element.
+         Otherwise it is considered an inline element. -->
+    <#assign idText = ""/>
+    <#if id?has_content><#assign idText = " id=\"${id}\""/></#if>
+    <#if style?has_content>
+      <#if style=="h1">
+        <h1${idText}>${text}</h1>
+      <#elseif style=="h2">
+        <h2${idText}>${text}</h2>
+      <#elseif style=="h3">
+        <h3${idText}>${text}</h3>
+      <#elseif style=="h4">
+        <h4${idText}>${text}</h4>
+      <#elseif style=="h5">
+        <h5${idText}>${text}</h5>
+      <#elseif style=="h6">
+        <h6${idText}>${text}</h6>
+      <#else>
+        <span${idText} class="${style}">${text}</span>
+      </#if>
+    <#else>
+      <span${idText}>${text}</span>
+    </#if>
+  </#if>
+</#macro>
+
+<#macro renderLink parameterList targetWindow target uniqueItemName linkType 
actionUrl id style name height width linkUrl text imgStr>
+    <#if "ajax-window" != linkType>
+        <#if "hidden-form" == linkType>
+            <form method="post" action="${actionUrl}" <#if 
targetWindow?has_content>target="${targetWindow}"</#if> 
onsubmit="javascript:submitFormDisableSubmits(this)" 
name="${uniqueItemName}"><#rt/>
+                <#list parameterList as parameter>
+                <input name="${parameter.name}" value="${parameter.value}" 
type="hidden"/><#rt/>
+                </#list>
+            </form><#rt/>
+        </#if>
+        <a 
+            <#if id?has_content>id="${id}"</#if> 
+            <#if style?has_content>class="${style}"</#if> 
+            <#if name?has_content>name="${name}"</#if> 
+            <#if targetWindow?has_content>target="${targetWindow}"</#if> 
+            href="<#if 
"hidden-form"==linkType>javascript:document.${uniqueItemName}.submit()<#else>${linkUrl}</#if>"><#rt/>
+            <#if imgStr?has_content>${imgStr}</#if><#if 
text?has_content>${text}</#if>
+        </a>
+    <#else>
+        <div id="${uniqueItemName}"></div>
+        <a href="javascript:void(0);" id="${uniqueItemName}_link" 
+        <#if style?has_content>class="${style}"</#if>>
+        <#if text?has_content>${text}</#if></a>
+        <script type="text/javascript">
+            function getRequestData () {
+                var data =  {
+                    <#list parameterList as parameter>
+                        "${parameter.name}": "${parameter.value}",
+                    </#list>
+                    "presentation": "layer"
+                };
+        
+                return data;
+            }
+            jQuery("#${uniqueItemName}_link").click( function () {
+                jQuery("#${uniqueItemName}").dialog("open");
+            });
+            jQuery("#${uniqueItemName}").dialog({
+                 autoOpen: false,
+                 <#if text?has_content>title: "${text}",</#if>
+                 height: ${height},
+                 width: ${width},
+                 modal: true,
+                 open: function() {
+                         jQuery.ajax({
+                             url: "${target}",
+                             type: "POST",
+                             data: getRequestData(),
+                             success: function(data) 
{jQuery("#${uniqueItemName}").html(data);}
+                         });
+                 }
+            });
+        </script>
+    </#if>
+</#macro>
+
+<#macro renderImage src id style wid hgt border alt urlString>
+<#if src?has_content>
+<img <#if id?has_content>id="${id}"</#if><#if style?has_content> 
class="${style}"</#if><#if wid?has_content> width="${wid}"</#if><#if 
hgt?has_content> height="${hgt}"</#if><#if border?has_content> 
border="${border}"</#if> alt="<#if alt?has_content>${alt}</#if>" 
src="${urlString}" />
+</#if>
+</#macro>
+
+<#macro renderContentFrame fullUrl width height border><iframe 
src="${fullUrl}" width="${width}" height="${height}" <#if 
border?has_content>border="${border}"</#if> /></#macro>
+<#macro renderScreenletBegin id title collapsible saveCollapsed 
collapsibleAreaId expandToolTip collapseToolTip fullUrlString padded menuString 
showMore collapsed javaScriptEnabled>
+<div class="panel panel-default"<#if id?has_content> id="${id}"</#if>><#-- 
<#rt/> -->
+<#-- <#if showMore> -->
+<#if title?has_content>
+       <div class="panel-heading">
+               <#if collapsible>
+                       <#assign btnId = "${id}-btn">
+                       <div class="pull-left"><h3 
class="panel-title">${title}</h3></div>
+                       <div class="pull-right">
+                               <a id="${btnId}" class="btn btn-default btn-sm" 
data-toggle="collapse" href="#${collapsibleAreaId}"><span class="glyphicon 
glyphicon-chevron-up"></span></a>
+                       </div>
+                       <div class="clear"></div>
+                       <script type="text/javascript">
+                               jQuery(document).ready( function($){
+                                       $('#${btnId}').click(function(){
+                                               
$(this).find('span').toggleClass('glyphicon-chevron-down glyphicon-chevron-up');
+                                       });
+                               });
+                   </script>
+               <#else>
+                       <h3 class="panel-title">${title}</h3>
+               </#if>
+       </div>
+</#if>
+<#--
+<li class="<#rt/>
+<#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 
collapseToolTip?has_content> title="${collapseToolTip}"</#if>
+</#if>
+>&nbsp;</a></li> -->
+<#-- </#if> -->
+<#--
+<#if !collapsed>
+${menuString}
+</#if>
+ -->
+${menuString}
+<#-- <br class="clear" /> -->
+<#-- </#if> -->
+<div <#if collapsibleAreaId?has_content> id="${collapsibleAreaId}" <#if 
collapsed> style="display: none;"</#if></#if><#-- <#if padded> --> 
class="panel-body" <#-- <#else> class="panel-body no-padding"</#if> -->>
+</#macro>
+<#macro renderScreenletSubWidget></#macro>
+<#macro renderScreenletEnd></div></div></#macro>
+<#macro renderScreenletPaginateMenu lowIndex actualPageSize ofLabel listSize 
paginateLastStyle lastLinkUrl paginateLastLabel paginateNextStyle nextLinkUrl 
paginateNextLabel paginatePreviousStyle paginatePreviousLabel previousLinkUrl 
paginateFirstStyle paginateFirstLabel firstLinkUrl>
+    <li class="${paginateLastStyle}<#if !lastLinkUrl?has_content> 
disabled</#if>"><#if lastLinkUrl?has_content><a 
href="${lastLinkUrl}">${paginateLastLabel}</a><#else>${paginateLastLabel}</#if></li>
+    <li class="${paginateNextStyle}<#if !nextLinkUrl?has_content> 
disabled</#if>"><#if nextLinkUrl?has_content><a 
href="${nextLinkUrl}">${paginateNextLabel}</a><#else>${paginateNextLabel}</#if></li>
+    <#if (listSize?number > 0) ><li>${lowIndex?number + 1} - ${lowIndex?number 
+ actualPageSize?number} ${ofLabel} ${listSize}</li><#rt/></#if>
+    <li class="${paginatePreviousStyle?default("nav-previous")}<#if 
!previousLinkUrl?has_content> disabled</#if>"><#if 
previousLinkUrl?has_content><a 
href="${previousLinkUrl}">${paginatePreviousLabel}</a><#else>${paginatePreviousLabel}</#if></li>
+    <li class="${paginateFirstStyle?default("nav-first")}<#if 
!firstLinkUrl?has_content> disabled</#if>"><#if firstLinkUrl?has_content><a 
href="${firstLinkUrl}">${paginateFirstLabel}</a><#else>${paginateFirstLabel}</#if></li>
+</#macro>
+
+<#macro renderPortalPageBegin originalPortalPageId portalPageId 
confMode="false" addColumnLabel="Add column" addColumnHint="Add a new column to 
this portal">
+  <#if confMode == "true">
+    <a class="buttontext" 
href="javascript:document.addColumn_${portalPageId}.submit()" 
title="${addColumnHint}">${addColumnLabel}</a> <b>PortalPageId: 
${portalPageId}</b>
+    <form method="post" action="addPortalPageColumn" 
name="addColumn_${portalPageId}">
+      <input name="portalPageId" value="${portalPageId}" type="hidden"/>
+    </form>
+  </#if>
+  <table width="100%">
+    <tr>
+</#macro>
+
+<#macro renderPortalPageEnd>
+    </tr>
+  </table>
+</#macro>
+
+<#macro renderPortalPageColumnBegin originalPortalPageId portalPageId 
columnSeqId confMode="false" width="auto" delColumnLabel="Delete column" 
delColumnHint="Delete this column" addPortletLabel="Add portlet" 
addPortletHint="Add a new portlet to this column" colWidthLabel="Col. width:" 
setColumnSizeHint="Set column size">
+  <#assign columnKey = portalPageId+columnSeqId>
+  <#assign columnKeyFields = '<input name="portalPageId" value="' + 
portalPageId + '" type="hidden"/><input name="columnSeqId" value="' + 
columnSeqId + '" type="hidden"/>'>
+  <script type="text/javascript">
+    if (typeof SORTABLE_COLUMN_LIST != "undefined") {
+      if (SORTABLE_COLUMN_LIST == null) {
+        SORTABLE_COLUMN_LIST = "#portalColumn_${columnSeqId}";
+      } else {
+        SORTABLE_COLUMN_LIST += ", #portalColumn_${columnSeqId}";
+      }
+    }
+  </script>
+  <td class="portal-column<#if confMode == "true">-config</#if> 
connectedSortable" style="vertical-align: top; <#if width?has_content> 
width:${width};</#if>" id="portalColumn_${columnSeqId}">
+    <#if confMode == "true">
+      <div class="portal-column-config-title-bar">
+        <ul>
+          <li>
+            <form method="post" action="deletePortalPageColumn" 
name="delColumn_${columnKey}">
+              ${columnKeyFields}
+            </form>
+            <a class="buttontext" 
href="javascript:document.delColumn_${columnKey}.submit()" 
title="${delColumnHint}">${delColumnLabel}</a>
+          </li>
+          <li>
+            <form method="post" action="addPortlet" 
name="addPortlet_${columnKey}">
+              ${columnKeyFields}
+            </form>
+            <a class="buttontext" 
href="javascript:document.addPortlet_${columnKey}.submit()" 
title="${addPortletHint}">${addPortletLabel}</a>
+          </li>
+          <li>
+            <form method="post" action="editPortalPageColumnWidth" 
name="setColumnSize_${columnKey}">
+              ${columnKeyFields}
+            </form>
+            <a class="buttontext" 
href="javascript:document.setColumnSize_${columnKey}.submit()" 
title="${setColumnSizeHint}">${colWidthLabel}: ${width}</a>
+          </li>
+        </ul>
+      </div>
+      <br class="clear"/>
+    </#if>
+</#macro>
+
+<#macro renderPortalPageColumnEnd>
+  </td>
+</#macro>
+
+<#macro renderPortalPagePortletBegin originalPortalPageId portalPageId 
portalPortletId portletSeqId prevPortletId="" prevPortletSeqId="" 
nextPortletId="" nextPortletSeqId="" columnSeqId="" prevColumnSeqId="" 
nextColumnSeqId="" confMode="false" delPortletHint="Remove this portlet" 
editAttribute="false" editAttributeHint="Edit portlet parameters">
+  <#assign portletKey = portalPageId+portalPortletId+portletSeqId>
+  <#assign portletKeyFields = '<input name="portalPageId" value="' + 
portalPageId + '" type="hidden"/><input name="portalPortletId" value="' + 
portalPortletId + '" type="hidden"/><input name="portletSeqId" value="' + 
portletSeqId  + '" type="hidden"/>'>
+  <div id="PP_${portletKey}" name="portalPortlet" class="noClass" 
portalPageId="${portalPageId}" portalPortletId="${portalPortletId}" 
columnSeqId="${columnSeqId}" portletSeqId="${portletSeqId}">
+    <#if confMode == "true">
+      <div class="portlet-config" id="PPCFG_${portletKey}">
+        <div class="portlet-config-title-bar">
+          <ul>
+            <li class="title">Portlet : [${portalPortletId}]</li>
+            <li class="remove">
+              <form method="post" action="deletePortalPagePortlet" 
name="delPortlet_${portletKey}">
+                ${portletKeyFields}
+              </form>
+              <a href="javascript:document.delPortlet_${portletKey}.submit()" 
title="${delPortletHint}">&nbsp;&nbsp;&nbsp;</a>
+            </li>
+            <#if editAttribute == "true">
+              <li class="edit">
+                <form method="post" action="editPortalPortletAttributes" 
name="editPortlet_${portletKey}">
+                  ${portletKeyFields}
+                </form>
+                <a 
href="javascript:document.editPortlet_${portletKey}.submit()" 
title="${editAttributeHint}">&nbsp;&nbsp;&nbsp;</a>
+              </li>
+            </#if>
+            <#if prevColumnSeqId?has_content>
+              <li class="move-left">
+                <form method="post" action="updatePortletSeqDragDrop" 
name="movePortletLeft_${portletKey}">
+                  <input name="o_portalPageId" value="${portalPageId}" 
type="hidden"/>
+                  <input name="o_portalPortletId" value="${portalPortletId}" 
type="hidden"/>
+                  <input name="o_portletSeqId" value="${portletSeqId}" 
type="hidden"/>
+                  <input name="destinationColumn" value="${prevColumnSeqId}" 
type="hidden"/>
+                  <input name="mode" value="DRAGDROPBOTTOM" type="hidden"/>
+                </form>
+                <a 
href="javascript:document.movePortletLeft_${portletKey}.submit()">&nbsp;&nbsp;&nbsp;</a></li>
+            </#if>
+            <#if nextColumnSeqId?has_content>
+              <li class="move-right">
+                <form method="post" action="updatePortletSeqDragDrop" 
name="movePortletRight_${portletKey}">
+                  <input name="o_portalPageId" value="${portalPageId}" 
type="hidden"/>
+                  <input name="o_portalPortletId" value="${portalPortletId}" 
type="hidden"/>
+                  <input name="o_portletSeqId" value="${portletSeqId}" 
type="hidden"/>
+                  <input name="destinationColumn" value="${nextColumnSeqId}" 
type="hidden"/>
+                  <input name="mode" value="DRAGDROPBOTTOM" type="hidden"/>
+                </form>
+                <a 
href="javascript:document.movePortletRight_${portletKey}.submit()">&nbsp;&nbsp;&nbsp;</a></li>
+            </#if>
+            <#if prevPortletId?has_content>
+              <li class="move-up">
+                <form method="post" action="updatePortletSeqDragDrop" 
name="movePortletUp_${portletKey}">
+                  <input name="o_portalPageId" value="${portalPageId}" 
type="hidden"/>
+                  <input name="o_portalPortletId" value="${portalPortletId}" 
type="hidden"/>
+                  <input name="o_portletSeqId" value="${portletSeqId}" 
type="hidden"/>
+                  <input name="d_portalPageId" value="${portalPageId}" 
type="hidden"/>
+                  <input name="d_portalPortletId" value="${prevPortletId}" 
type="hidden"/>
+                  <input name="d_portletSeqId" value="${prevPortletSeqId}" 
type="hidden"/>
+                  <input name="mode" value="DRAGDROPBEFORE" type="hidden"/>
+                </form>
+                <a 
href="javascript:document.movePortletUp_${portletKey}.submit()">&nbsp;&nbsp;&nbsp;</a></li>
+            </#if>
+            <#if nextPortletId?has_content>
+              <li class="move-down">
+                <form method="post" action="updatePortletSeqDragDrop" 
name="movePortletDown_${portletKey}">
+                  <input name="o_portalPageId" value="${portalPageId}" 
type="hidden"/>
+                  <input name="o_portalPortletId" value="${portalPortletId}" 
type="hidden"/>
+                  <input name="o_portletSeqId" value="${portletSeqId}" 
type="hidden"/>
+                  <input name="d_portalPageId" value="${portalPageId}" 
type="hidden"/>
+                  <input name="d_portalPortletId" value="${nextPortletId}" 
type="hidden"/>
+                  <input name="d_portletSeqId" value="${nextPortletSeqId}" 
type="hidden"/>
+                  <input name="mode" value="DRAGDROPAFTER" type="hidden"/>
+                </form>
+                <a 
href="javascript:document.movePortletDown_${portletKey}.submit()">&nbsp;&nbsp;&nbsp;</a></li>
+            </#if>
+          </ul>
+          <br class="clear"/>
+        </div>
+      </#if>
+</#macro>
+
+<#macro renderPortalPagePortletEnd confMode="false">
+  </div>
+  <#if confMode == "true">
+    </div>
+  </#if>
+</#macro>
+
+<#macro renderColumnContainerBegin id style>
+  <table cellspacing="0"<#if id?has_content> id="${id}"</#if><#if 
style?has_content> class="${style}"</#if>>
+  <tr>
+</#macro>
+
+<#macro renderColumnContainerEnd>
+  </tr>
+  </table>
+</#macro>
+
+<#macro renderColumnBegin id style>
+  <td<#if id?has_content> id="${id}"</#if><#if style?has_content> 
class="${style}"</#if>>
+</#macro>
+
+<#macro renderColumnEnd>
+  </td>
+</#macro>

Added: 
ofbiz/branches/boostrap_theme/themes/bootstrap/includes/templates/htmlTreeMacroLibrary.ftl
URL: 
http://svn.apache.org/viewvc/ofbiz/branches/boostrap_theme/themes/bootstrap/includes/templates/htmlTreeMacroLibrary.ftl?rev=1641665&view=auto
==============================================================================
--- 
ofbiz/branches/boostrap_theme/themes/bootstrap/includes/templates/htmlTreeMacroLibrary.ftl
 (added)
+++ 
ofbiz/branches/boostrap_theme/themes/bootstrap/includes/templates/htmlTreeMacroLibrary.ftl
 Tue Nov 25 18:35:47 2014
@@ -0,0 +1,64 @@
+<#--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<#macro renderNodeBegin style>
+<#if style?has_content><ul class="${style}"></#if>
+<li><#rt/>
+</#macro>
+
+<#macro renderLastElement style>
+<ul<#if style?has_content> class="${style}"</#if>>
+<#rt/>
+</#macro>
+  
+<#macro renderNodeEnd processChildren isRootNode>
+<#if processChildren?has_content && processChildren>
+</ul><#lt/>
+</#if>
+</li><#rt/>
+<#if isRootNode?has_content && isRootNode>
+</ul><#lt/>
+</#if> 
+</#macro>
+ 
+<#macro renderLabel id style labelText>
+<span<#if id?has_content> id="${id}"</#if><#if style?has_content> 
class="${style}"</#if>><#rt/>
+<#if id?has_content>{labelText}</#if><#rt/>
+</span>    
+</#macro>
+
+<#macro formatBoundaryComment boundaryType widgetType widgetName>
+<!-- ${boundaryType}  ${widgetType}  ${widgetName} -->
+</#macro>
+
+<#macro renderLink id style name title targetWindow linkUrl linkText imgStr>
+<a<#if id?has_content> id="${id}"</#if><#rt/>
+<#if style?has_content> class="${style}"</#if><#rt/>
+<#if name?has_content> name="${name}"</#if><#rt/>
+<#if title?has_content> title="${title}"</#if><#rt/>
+<#if targetWindow?has_content> target="${targetWindow}</#if><#if 
linkUrl?has_content> href="${linkUrl}"<#else> 
href="javascript:void(0);"</#if>><#rt/>
+<#if imgStr?has_content>${imgStr}<#elseif 
linkText?has_content/>${linkText}<#else/>&nbsp;</#if></a><#rt/>
+</#macro>
+
+<#macro renderImage src id style wid hgt border alt urlString>
+<#if src?has_content>
+<img <#if id?has_content>id="${id}"</#if><#if style?has_content> 
class="${style}"</#if><#if wid?has_content> width="${wid}"</#if><#if 
hgt?has_content> height="${hgt}"</#if><#if border?has_content> 
border="${border}"</#if> alt="<#if alt?has_content>${alt}</#if>" 
src="${urlString}" /><#rt/>
+</#if>
+</#macro>
+ 
\ No newline at end of file

Added: ofbiz/branches/boostrap_theme/themes/bootstrap/ofbiz-component.xml
URL: 
http://svn.apache.org/viewvc/ofbiz/branches/boostrap_theme/themes/bootstrap/ofbiz-component.xml?rev=1641665&view=auto
==============================================================================
--- ofbiz/branches/boostrap_theme/themes/bootstrap/ofbiz-component.xml (added)
+++ ofbiz/branches/boostrap_theme/themes/bootstrap/ofbiz-component.xml Tue Nov 
25 18:35:47 2014
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<ofbiz-component name="bootstrap"
+        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
+        
xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/ofbiz-component.xsd";>
+    <!-- define resource loaders; most common is to use the component resource 
loader -->
+    <resource-loader name="main" type="component"/>
+
+    <!-- entity resources: model(s), eca(s), group, and data definitions -->
+    <entity-resource type="data" reader-name="seed" loader="main" 
location="data/BootstrapThemeData.xml"/>
+
+    <!-- web applications; will be mounted when using the embedded Jetty 
container -->
+    <webapp name="bootstrap"
+        title="Bootstrap"
+        menu-name="secondary"
+        server="default-server"
+        location="webapp/bootstrap"
+        mount-point="/bootstrap"
+        app-bar-display="false"/>
+</ofbiz-component>

Added: 
ofbiz/branches/boostrap_theme/themes/bootstrap/webapp/bootstrap/WEB-INF/web.xml
URL: 
http://svn.apache.org/viewvc/ofbiz/branches/boostrap_theme/themes/bootstrap/webapp/bootstrap/WEB-INF/web.xml?rev=1641665&view=auto
==============================================================================
--- 
ofbiz/branches/boostrap_theme/themes/bootstrap/webapp/bootstrap/WEB-INF/web.xml 
(added)
+++ 
ofbiz/branches/boostrap_theme/themes/bootstrap/webapp/bootstrap/WEB-INF/web.xml 
Tue Nov 25 18:35:47 2014
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 
2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd";>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<web-app>
+    <display-name>Open For Business - Bootstrap Visual Theme</display-name>
+    <description>Bootstrap Basic Visual Theme</description>
+    
+    <session-config>
+        <session-timeout>1</session-timeout>    
+    </session-config>
+    
+    <welcome-file-list>
+        <welcome-file>index.jsp</welcome-file>
+        <welcome-file>main.jsp</welcome-file>
+    </welcome-file-list>
+</web-app>


Reply via email to