Modified: 
ofbiz/trunk/specialpurpose/ebaystore/template/store/EbayApiKeywordSearch.ftl
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ebaystore/template/store/EbayApiKeywordSearch.ftl?rev=1761185&r1=1761184&r2=1761185&view=diff
==============================================================================
--- 
ofbiz/trunk/specialpurpose/ebaystore/template/store/EbayApiKeywordSearch.ftl 
(original)
+++ 
ofbiz/trunk/specialpurpose/ebaystore/template/store/EbayApiKeywordSearch.ftl 
Sat Sep 17 10:44:25 2016
@@ -22,23 +22,24 @@ under the License.
     function selectChange(formId, elementId) {
         if (elementId.id == 'searchCatalogId') {
             if (document.getElementById('searchCategoryId').selectedIndex) {
-               
document.getElementById('searchCategoryId')[document.getElementById('searchCategoryId').selectedIndex].value
 = "";
-           } else {
-               document.getElementById('searchCategoryId').value = "";
-           }
+                document.getElementById('searchCategoryId')[document
+                .getElementById('searchCategoryId').selectedIndex].value = "";
+            } else {
+                document.getElementById('searchCategoryId').value = "";
+            }
         }
         formId.action="<@ofbizUrl>main</@ofbizUrl>";
         formId.submit();
     }
     function submit (id) {
-      var formId = id;
-      if(!jQuery('#searchCatalogId').is(":empty")){
-          document.getElementById(formId).submit();
-      } else {
-          if(jQuery('#searchCatalogId').is(":empty")) {
-             jQuery('#catalogErrorMessage').fadeIn("fast");
-          }
-      }
+        var formId = id;
+        if(!jQuery('#searchCatalogId').is(":empty")){
+            document.getElementById(formId).submit();
+        } else {
+            if(jQuery('#searchCatalogId').is(":empty")) {
+                jQuery('#catalogErrorMessage').fadeIn("fast");
+            }
+        }
     }
 //]]>
 </script>
@@ -47,55 +48,68 @@ under the License.
     <h3>${uiLabelMap.ProductAdvancedSearchInCategory}</h3>
   </div>
   <div class="screenlet-body">
-    <form id="productSearchform" method="post" 
action="<@ofbizUrl>productsearch</@ofbizUrl>" style="margin: 0;" 
name="productSearchform">
-    <input type="hidden" name="productStoreId" 
value="${parameters.productStoreId!}" />
+    <form id="productSearchform" method="post" 
action="<@ofbizUrl>productsearch</@ofbizUrl>" style="margin: 0;"
+        name="productSearchform">
+      <input type="hidden" name="productStoreId" 
value="${parameters.productStoreId!}"/>
       <fieldset>
         <input type="hidden" name="VIEW_SIZE" value="25"/>
         <input type="hidden" name="PAGING" value="Y"/>
         <input type="hidden" name="noConditionFind" value="Y"/>
         <table cellspacing="0" class="basic-table">
           <tr>
-              <td class="label" align="right" valign="top">
-                ${uiLabelMap.ProductCatalog}:
-              </td>
-              <td valign="middle">
-                <div>
-                  <select name="SEARCH_CATALOG_ID" id="searchCatalogId" 
onchange="javascript:selectChange(document.getElementById('advToKeywordSearchform'),
 document.getElementById('searchCatalogId'));" class="required">
-                    <#list prodCatalogList as prodCatalog>
-                      <#assign displayDesc = 
prodCatalog.catalogName?default("${uiLabelMap.ProductNoDescription}") />
+            <td class="label" align="right" valign="top">
+              ${uiLabelMap.ProductCatalog}:
+            </td>
+            <td valign="middle">
+              <div>
+                <select name="SEARCH_CATALOG_ID" id="searchCatalogId"
+                    
onchange="javascript:selectChange(document.getElementById('advToKeywordSearchform'),
+                    document.getElementById('searchCatalogId'));" 
class="required">
+                  <#list prodCatalogList as prodCatalog>
+                    <#assign displayDesc = 
prodCatalog.catalogName?default("${uiLabelMap.ProductNoDescription}") />
+                    <#if (18 < displayDesc?length)>
+                      <#assign displayDesc = displayDesc[0..15] + "...">
+                    </#if>
+                    <option value="${prodCatalog.prodCatalogId}" <#if 
searchCatalogId! == prodCatalog.prodCatalogId>
+                        selected="selected"</#if>>${displayDesc} 
[${prodCatalog.prodCatalogId}]
+                    </option>
+                  </#list>
+                </select>
+                <span id="catalogErrorMessage" style="display:none;" 
class="errorMessage">
+                  ${uiLabelMap.CommonRequired}
+                </span>
+              </div>
+            </td>
+          </tr>
+          <tr>
+            <td class="label" align="right" valign="top">
+              ${uiLabelMap.ProductCategory}:
+            </td>
+            <td valign="middle">
+              <div>
+                <#if categoryIds?has_content>
+                  <select name="SEARCH_CATEGORY_ID" id="searchCategoryId">
+                    <option value="">- ${uiLabelMap.ProductAnyCategory} 
-</option>
+                    <#list categoryIds as categoryId>
+                      <#assign productCategory =
+                          delegator.findOne("ProductCategory", 
{"productCategoryId" : categoryId}, true) />
+                      <#assign displayDesc =
+                          
productCategory.categoryName?default("${uiLabelMap.ProductNoDescription}") />
                       <#if (18 < displayDesc?length)>
                         <#assign displayDesc = displayDesc[0..15] + "...">
                       </#if>
-                      <option value="${prodCatalog.prodCatalogId}" <#if 
searchCatalogId! == prodCatalog.prodCatalogId> 
selected="selected"</#if>>${displayDesc} [${prodCatalog.prodCatalogId}]</option>
+                      <option value="${productCategory.productCategoryId}">
+                        ${displayDesc} [${productCategory.productCategoryId}]
+                      </option>
                     </#list>
                   </select>
-                  <span id="catalogErrorMessage" style="display:none;" 
class="errorMessage">${uiLabelMap.CommonRequired}</span>
-                </div>
-              </td>
-            </tr>
-            <tr>
-              <td class="label" align="right" valign="top">
-                ${uiLabelMap.ProductCategory}:
-              </td>
-              <td valign="middle">
-                <div>
-                  <#if categoryIds?has_content>
-                    <select name="SEARCH_CATEGORY_ID" id="searchCategoryId">
-                      <option value="">- ${uiLabelMap.ProductAnyCategory} 
-</option>
-                      <#list categoryIds as categoryId>
-                        <#assign productCategory = 
delegator.findOne("ProductCategory", {"productCategoryId" : categoryId}, true) 
/>
-                        <#assign displayDesc = 
productCategory.categoryName?default("${uiLabelMap.ProductNoDescription}") />
-                        <#if (18 < displayDesc?length)>
-                          <#assign displayDesc = displayDesc[0..15] + "...">
-                        </#if>
-                        <option 
value="${productCategory.productCategoryId}">${displayDesc} 
[${productCategory.productCategoryId}]</option>
-                      </#list>
-                    </select>
-                  <#else>
-                    <@htmlTemplate.lookupField 
value="${requestParameters.SEARCH_CATEGORY_ID!}" formName="productSearchform" 
name="SEARCH_CATEGORY_ID" id="searchCategoryId" 
fieldFormName="LookupProductCategory"/>
-                  </#if>
-                </div>
-              </td>
+                <#else>
+                  <@htmlTemplate.lookupField 
value="${requestParameters.SEARCH_CATEGORY_ID!}"
+                      formName="productSearchform" name="SEARCH_CATEGORY_ID" 
id="searchCategoryId"
+                      fieldFormName="LookupProductCategory"/>
+                </#if>
+              </div>
+            </td>
           </tr>
           <tr>
             <td class="label" align="right" valign="top">
@@ -103,7 +117,8 @@ under the License.
             </td>
             <td valign="middle">
               <div>
-                <input type="text" name="SEARCH_PRODUCT_NAME" size="20" 
value="${requestParameters.SEARCH_PRODUCT_NAME!}" />
+                <input type="text" name="SEARCH_PRODUCT_NAME" size="20"
+                    value="${requestParameters.SEARCH_PRODUCT_NAME!}"/>
               </div>
             </td>
           </tr>
@@ -113,7 +128,8 @@ under the License.
             </td>
             <td valign="middle">
               <div>
-                <input type="text" name="SEARCH_INTERNAL_PROD_NAME" size="20" 
value="${requestParameters.SEARCH_INTERNAL_PROD_NAME!}" />
+                <input type="text" name="SEARCH_INTERNAL_PROD_NAME" size="20"
+                    value="${requestParameters.SEARCH_INTERNAL_PROD_NAME!}"/>
               </div>
             </td>
           </tr>
@@ -123,15 +139,23 @@ under the License.
             </td>
             <td valign="middle">
               <div>
-                <input type="text" name="SEARCH_STRING" size="40" 
value="${requestParameters.SEARCH_STRING!}" />&nbsp;
-                <label>${uiLabelMap.CommonAny}<input type="radio" 
name="SEARCH_OPERATOR" value="OR" <#if searchOperator == 
"OR">checked="checked"</#if> /></label>
-                <label>${uiLabelMap.CommonAll}<input type="radio" 
name="SEARCH_OPERATOR" value="AND" <#if searchOperator == 
"AND">checked="checked"</#if> /></label>
+                <input type="text" name="SEARCH_STRING" size="40" 
value="${requestParameters.SEARCH_STRING!}"/>&nbsp;
+                <label>
+                  ${uiLabelMap.CommonAny}
+                  <input type="radio" name="SEARCH_OPERATOR"
+                      value="OR" <#if searchOperator == 
"OR">checked="checked"</#if>/>
+                </label>
+                <label>
+                  ${uiLabelMap.CommonAll}
+                  <input type="radio" name="SEARCH_OPERATOR"
+                      value="AND" <#if searchOperator == 
"AND">checked="checked"</#if>/>
+                </label>
               </div>
             </td>
           </tr>
           <tr>
             <td align="center" colspan="2">
-              <hr />
+              <hr/>
               <a href="javascript:submit('productSearchform');" 
class="buttontext">${uiLabelMap.CommonFind}</a>
             </td>
           </tr>
@@ -139,4 +163,4 @@ under the License.
       </fieldset>
     </form>
   </div>
-</div>
\ No newline at end of file
+</div>

Modified: ofbiz/trunk/specialpurpose/ebaystore/template/store/OrderImported.ftl
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ebaystore/template/store/OrderImported.ftl?rev=1761185&r1=1761184&r2=1761185&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/ebaystore/template/store/OrderImported.ftl 
(original)
+++ ofbiz/trunk/specialpurpose/ebaystore/template/store/OrderImported.ftl Sat 
Sep 17 10:44:25 2016
@@ -28,15 +28,15 @@ function uploadTrackingCode(orderId, pro
 <div id="findOrdersList" class="screenlet">
   <div class="screenlet-title-bar">
     <ul>
-        <li class="h3">${uiLabelMap.EbayListOrderImported}</li>
+      <li class="h3">${uiLabelMap.EbayListOrderImported}</li>
     </ul>
   </div>
   <div class="screenlet-body">
-  <form name="uploadTracking" 
action="<@ofbizUrl>uploadTrackingCodeBack</@ofbizUrl>" method="post">
+    <form name="uploadTracking" 
action="<@ofbizUrl>uploadTrackingCodeBack</@ofbizUrl>" method="post">
       <input type="hidden" name="orderId" value=""/>
       <input type="hidden" name="productStoreId" value=""/>
-  </form>
-  <form name="listOrdersImported" method="post">
+    </form>
+    <form name="listOrdersImported" method="post">
       <input type="hidden" name="viewSize"/>
       <input type="hidden" name="viewIndex"/>
       <table class="basic-table hover-bar" cellspacing='0'>
@@ -51,12 +51,15 @@ function uploadTrackingCode(orderId, pro
           <td width="10%" 
align="right">${uiLabelMap.OrderRemainingSubTotal}</td>
           <td width="10%" align="right">${uiLabelMap.OrderOrderTotal}</td>
           <td width="5%">&nbsp;</td>
-            <#if (requestParameters.filterInventoryProblems?default("N") == 
"Y") || (requestParameters.filterPOsOpenPastTheirETA?default("N") == "Y") || 
(requestParameters.filterPOsWithRejectedItems?default("N") == "Y") || 
(requestParameters.filterPartiallyReceivedPOs?default("N") == "Y")>
-              <td width="15%">${uiLabelMap.CommonStatus}</td>
-              <td width="5%">${uiLabelMap.CommonFilter}</td>
-            <#else>
-              <td width="20%">${uiLabelMap.CommonStatus}</td>
-            </#if>
+          <#if (requestParameters.filterInventoryProblems?default("N") == "Y") 
||
+              (requestParameters.filterPOsOpenPastTheirETA?default("N") == 
"Y") ||
+              (requestParameters.filterPOsWithRejectedItems?default("N") == 
"Y") ||
+              (requestParameters.filterPartiallyReceivedPOs?default("N") == 
"Y")>
+            <td width="15%">${uiLabelMap.CommonStatus}</td>
+            <td width="5%">${uiLabelMap.CommonFilter}</td>
+          <#else>
+            <td width="20%">${uiLabelMap.CommonStatus}</td>
+          </#if>
           <td width="20%">${uiLabelMap.CommonDate}</td>
         </tr>
         <#if orderList?has_content>
@@ -73,16 +76,23 @@ function uploadTrackingCode(orderId, pro
             <#assign partyId = displayParty.partyId?default("_NA_")>
             <tr valign="middle"<#if alt_row> class="alternate-row"</#if>>
               
<td>${orderType.get("description",locale)?default(orderType.orderTypeId?default(""))}</td>
-              <td><a href="#" 
onclick="javascript:uploadTrackingCode('${orderHeader.orderId}','${productStoreId}')"
 class='buttontext'>${orderHeader.orderId}</a></td>
+              <td>
+                <a href="#" 
onclick="javascript:uploadTrackingCode('${orderHeader.orderId}','${productStoreId}')"
+                    class='buttontext'>
+                  ${orderHeader.orderId}
+                </a>
+              </td>
               <td>
                 <div>
                   <#if displayParty?has_content>
-                      <#assign displayPartyNameResult = 
dispatcher.runSync("getPartyNameForDate", 
Static["org.apache.ofbiz.base.util.UtilMisc"].toMap("partyId", 
displayParty.partyId, "compareDate", orderHeader.orderDate, "userLogin", 
userLogin))/>
-                      
${displayPartyNameResult.fullName?default("[${uiLabelMap.OrderPartyNameNotFound}]")}
+                    <#assign displayPartyNameResult = 
dispatcher.runSync("getPartyNameForDate",
+                        
Static["org.apache.ofbiz.base.util.UtilMisc"].toMap("partyId", 
displayParty.partyId,
+                        "compareDate", orderHeader.orderDate, "userLogin", 
userLogin))/>
+                    
${displayPartyNameResult.fullName?default("[${uiLabelMap.OrderPartyNameNotFound}]")}
                   <#else>
                     ${uiLabelMap.CommonNA}
                   </#if>
-                  </div>
+                </div>
               </td>
               <td align="right">${orh.hasSurvey()?string.number}</td>
               <td 
align="right">${orh.getTotalOrderItemsQuantity()?string.number}</td>
@@ -94,21 +104,24 @@ function uploadTrackingCode(orderId, pro
               <td>&nbsp;</td>
               
<td>${statusItem.get("description",locale)?default(statusItem.statusId?default("N/A"))}</td>
               </td>
-              <#if (requestParameters.filterInventoryProblems?default("N") == 
"Y") || (requestParameters.filterPOsOpenPastTheirETA?default("N") == "Y") || 
(requestParameters.filterPOsWithRejectedItems?default("N") == "Y") || 
(requestParameters.filterPartiallyReceivedPOs?default("N") == "Y")>
-                  <td>
-                      <#if 
filterInventoryProblems.contains(orderHeader.orderId)>
-                        Inv&nbsp;
-                      </#if>
-                      <#if 
filterPOsOpenPastTheirETA.contains(orderHeader.orderId)>
-                        ETA&nbsp;
-                      </#if>
-                      <#if 
filterPOsWithRejectedItems.contains(orderHeader.orderId)>
-                        Rej&nbsp;
-                      </#if>
-                      <#if 
filterPartiallyReceivedPOs.contains(orderHeader.orderId)>
-                        Part&nbsp;
-                      </#if>
-                  </td>
+              <#if (requestParameters.filterInventoryProblems?default("N") == 
"Y") ||
+                  (requestParameters.filterPOsOpenPastTheirETA?default("N") == 
"Y") ||
+                  (requestParameters.filterPOsWithRejectedItems?default("N") 
== "Y") ||
+                  (requestParameters.filterPartiallyReceivedPOs?default("N") 
== "Y")>
+                <td>
+                  <#if filterInventoryProblems.contains(orderHeader.orderId)>
+                    Inv&nbsp;
+                  </#if>
+                  <#if filterPOsOpenPastTheirETA.contains(orderHeader.orderId)>
+                    ETA&nbsp;
+                  </#if>
+                  <#if 
filterPOsWithRejectedItems.contains(orderHeader.orderId)>
+                    Rej&nbsp;
+                  </#if>
+                  <#if 
filterPartiallyReceivedPOs.contains(orderHeader.orderId)>
+                    Part&nbsp;
+                  </#if>
+                </td>
               </#if>
               <td>${orderHeader.getString("orderDate")}</td>
             </tr>
@@ -126,6 +139,6 @@ function uploadTrackingCode(orderId, pro
           </tr>
         </#if>
       </table>
-  </form>
+    </form>
   </div>
 </div>
\ No newline at end of file


Reply via email to