You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by jl...@apache.org on 2013/11/13 12:07:05 UTC

svn commit: r1541470 - in /ofbiz/trunk: ./ applications/accounting/data/ applications/accounting/servicedef/ framework/catalina/src/org/ofbiz/catalina/container/ framework/service/src/org/ofbiz/service/ specialpurpose/ specialpurpose/webpos/webapp/webp...

Author: jleroux
Date: Wed Nov 13 11:07:04 2013
New Revision: 1541470

URL: http://svn.apache.org/r1541470
Log: (empty)

Added:
    ofbiz/trunk/specialpurpose/webpos/webapp/webpos/images/js/PayPin.js   (with props)
    ofbiz/trunk/specialpurpose/webpos/webapp/webpos/payment/PayPin.ftl   (with props)
Modified:
    ofbiz/trunk/.classpath
    ofbiz/trunk/.project
    ofbiz/trunk/applications/accounting/data/AccountingTypeData.xml
    ofbiz/trunk/applications/accounting/servicedef/services_agreement.xml
    ofbiz/trunk/framework/catalina/src/org/ofbiz/catalina/container/CatalinaContainer.java
    ofbiz/trunk/framework/service/src/org/ofbiz/service/ModelService.java
    ofbiz/trunk/specialpurpose/LICENSE
    ofbiz/trunk/specialpurpose/build.xml
    ofbiz/trunk/specialpurpose/component-load.xml
    ofbiz/trunk/specialpurpose/webpos/webapp/webpos/WEB-INF/actions/cart/ShowCart.groovy
    ofbiz/trunk/specialpurpose/webpos/webapp/webpos/WEB-INF/controller.xml
    ofbiz/trunk/specialpurpose/webpos/webapp/webpos/cart/ShowCart.ftl
    ofbiz/trunk/specialpurpose/webpos/webapp/webpos/images/js/Common.js
    ofbiz/trunk/specialpurpose/webpos/webapp/webpos/images/webpos.css
    ofbiz/trunk/specialpurpose/webpos/webapp/webpos/shortcuts/Shortcuts.ftl
    ofbiz/trunk/specialpurpose/webpos/widget/CommonScreens.xml
    ofbiz/trunk/specialpurpose/webpos/widget/PaymentScreens.xml
    ofbiz/trunk/tools/startofbiz.bat
    ofbiz/trunk/tools/startofbiz.sh

Modified: ofbiz/trunk/.classpath
URL: http://svn.apache.org/viewvc/ofbiz/trunk/.classpath?rev=1541470&r1=1541469&r2=1541470&view=diff
==============================================================================
--- ofbiz/trunk/.classpath (original)
+++ ofbiz/trunk/.classpath Wed Nov 13 11:07:04 2013
@@ -157,6 +157,7 @@
     <classpathentry kind="lib" path="specialpurpose/lucene/lib/lucene-analyzers-common-4.5.1.jar"/>
     <classpathentry kind="lib" path="specialpurpose/lucene/lib/lucene-core-4.5.1.jar"/>
     <classpathentry kind="lib" path="specialpurpose/lucene/lib/lucene-queryparser-4.5.1.jar"/>
+    <classpathentry kind="lib" path="specialpurpose/solr/lib/solr-solrj-4.4.0.jar"/>
     <classpathentry excluding="org/ofbiz/accounting/thirdparty/cybersource/**|org/ofbiz/accounting/thirdparty/verisign/**|org/ofbiz/accounting/thirdparty/worldpay/**|org/ofbiz/accounting/thirdparty/paypal/PayPalServices.java|org/ofbiz/accounting/thirdparty/orbital/**|org/ofbiz/accounting/thirdparty/securepay/**|org/ofbiz/accounting/thirdparty/ideal/**" kind="src" path="applications/accounting/src"/>
     <classpathentry excluding="org/ofbiz/content/openoffice/|org/ofbiz/content/report/" kind="src" path="applications/content/src"/>
     <classpathentry kind="src" path="applications/manufacturing/src"/>
@@ -202,6 +203,7 @@
     <classpathentry kind="src" path="specialpurpose/pos/src"/>
     <classpathentry kind="src" path="specialpurpose/projectmgr/src"/>
     <classpathentry kind="src" path="specialpurpose/webpos/src"/>
+    <classpathentry kind="src" path="specialpurpose/solr/src"/>
     <classpathentry kind="src" path="specialpurpose/lucene/src"/>
     <classpathentry exported="true" kind="con" path="GROOVY_SUPPORT"/>
     <classpathentry exported="true" kind="con" path="GROOVY_DSL_SUPPORT"/>

Modified: ofbiz/trunk/.project
URL: http://svn.apache.org/viewvc/ofbiz/trunk/.project?rev=1541470&r1=1541469&r2=1541470&view=diff
==============================================================================
--- ofbiz/trunk/.project (original)
+++ ofbiz/trunk/.project Wed Nov 13 11:07:04 2013
@@ -1,18 +1,31 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <projectDescription>
-    <name>ofbiz</name>
-    <comment></comment>
-    <projects>
-    </projects>
-    <buildSpec>
-        <buildCommand>
-            <name>org.eclipse.jdt.core.javabuilder</name>
-            <arguments>
-            </arguments>
-        </buildCommand>
-    </buildSpec>
-    <natures>
-        <nature>org.eclipse.jdt.groovy.core.groovyNature</nature>
-        <nature>org.eclipse.jdt.core.javanature</nature>
-    </natures>
+	<name>ofbizClean</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.rubypeople.rdt.core.rubybuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.jdt.core.javabuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.jdt.groovy.core.groovyNature</nature>
+		<nature>org.eclipse.jdt.core.javanature</nature>
+		<nature>org.rubypeople.rdt.core.rubynature</nature>
+	</natures>
+	<linkedResources>
+		<link>
+			<name>specialpurpose/pos/lib/jcl.jar</name>
+			<type>2</type>
+			<locationURI>zip:/?file:/D:/workspace/ofbizClean/specialpurpose/pos/lib/jcl.jar</locationURI>
+		</link>
+	</linkedResources>
 </projectDescription>

Modified: ofbiz/trunk/applications/accounting/data/AccountingTypeData.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/data/AccountingTypeData.xml?rev=1541470&r1=1541469&r2=1541470&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/data/AccountingTypeData.xml (original)
+++ ofbiz/trunk/applications/accounting/data/AccountingTypeData.xml Wed Nov 13 11:07:04 2013
@@ -673,6 +673,7 @@ under the License.
     <PaymentMethodType description="Gift Card" paymentMethodTypeId="GIFT_CARD"/>
     <PaymentMethodType description="Gift Certificate" paymentMethodTypeId="GIFT_CERTIFICATE"/>
     <PaymentMethodType description="Cash" paymentMethodTypeId="CASH"/>
+    <PaymentMethodType description="Pin" paymentMethodTypeId="PIN"/>
     <PaymentMethodType description="Electronic Funds Transfer" paymentMethodTypeId="EFT_ACCOUNT"/>
     <PaymentMethodType description="Financial Account" paymentMethodTypeId="FIN_ACCOUNT"/>
     <PaymentMethodType description="Personal Check" paymentMethodTypeId="PERSONAL_CHECK"/>

Modified: ofbiz/trunk/applications/accounting/servicedef/services_agreement.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/servicedef/services_agreement.xml?rev=1541470&r1=1541469&r2=1541470&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/servicedef/services_agreement.xml (original)
+++ ofbiz/trunk/applications/accounting/servicedef/services_agreement.xml Wed Nov 13 11:07:04 2013
@@ -38,7 +38,7 @@ under the License.
         <permission-service service-name="acctgAgreementPermissionCheck" main-action="UPDATE"/>
         <auto-attributes include="pk" mode="IN" optional="false"/>
         <auto-attributes include="nonpk" mode="IN" optional="true"/>
-        <override name="textData" allow-html="any"/>
+        <override name="textData" allow-html="safe"/>
     </service>
     <service name="cancelAgreement" default-entity-name="Agreement" engine="simple"
                 location="component://accounting/script/org/ofbiz/accounting/agreement/AgreementServices.xml" invoke="cancelAgreement" auth="true">

Modified: ofbiz/trunk/framework/catalina/src/org/ofbiz/catalina/container/CatalinaContainer.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/catalina/src/org/ofbiz/catalina/container/CatalinaContainer.java?rev=1541470&r1=1541469&r2=1541470&view=diff
==============================================================================
--- ofbiz/trunk/framework/catalina/src/org/ofbiz/catalina/container/CatalinaContainer.java (original)
+++ ofbiz/trunk/framework/catalina/src/org/ofbiz/catalina/container/CatalinaContainer.java Wed Nov 13 11:07:04 2013
@@ -44,6 +44,7 @@ import org.apache.catalina.Host;
 import org.apache.catalina.LifecycleException;
 import org.apache.catalina.Manager;
 import org.apache.catalina.connector.Connector;
+import org.apache.catalina.core.JreMemoryLeakPreventionListener;
 import org.apache.catalina.core.StandardContext;
 import org.apache.catalina.core.StandardEngine;
 import org.apache.catalina.core.StandardHost;
@@ -205,7 +206,18 @@ public class CatalinaContainer implement
         if (useNaming) {
             tomcat.enableNaming();
         }
-
+        
+        // https://tomcat.apache.org/tomcat-7.0-doc/config/listeners.html#JRE_Memory_Leak_Prevention_Listener_-_org.apache.catalina.core.JreMemoryLeakPreventionListener
+        // <<The JRE Memory Leak Prevention Listener provides work-arounds for known places where the Java Runtime environment uses 
+        // the context class loader to load a singleton as this will cause a memory leak if a web application class loader happens 
+        // to be the context class loader at the time.>>
+        // http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/core/JreMemoryLeakPreventionListener.java?view=annotate
+        JreMemoryLeakPreventionListener jreMemoryLeakPreventionListener = new JreMemoryLeakPreventionListener();
+        // Mostly use default config, but some cases here
+        jreMemoryLeakPreventionListener.setAppContextProtection(true); // True is the default for Java 1.6, use false for Java from 1.7.0_02 onwards (see sources above) 
+        jreMemoryLeakPreventionListener.setGcDaemonProtection(false); // False because of https://mail-archives.apache.org/mod_mbox/tomcat-users/201008.mbox/%3CAANLkTino=BjP5LsBCwncB2HvNDzyKLr5y-8yWdt15a89@mail.gmail.com%3E
+        jreMemoryLeakPreventionListener.setUrlCacheProtection(false); // False to keep the URLConnection cache, moot point
+        
         // configure JNDI in the StandardServer
         StandardServer server = (StandardServer) tomcat.getServer();
         try {

Modified: ofbiz/trunk/framework/service/src/org/ofbiz/service/ModelService.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/service/src/org/ofbiz/service/ModelService.java?rev=1541470&r1=1541469&r2=1541470&view=diff
==============================================================================
--- ofbiz/trunk/framework/service/src/org/ofbiz/service/ModelService.java (original)
+++ ofbiz/trunk/framework/service/src/org/ofbiz/service/ModelService.java Wed Nov 13 11:07:04 2013
@@ -575,12 +575,18 @@ public class ModelService extends Abstra
         // required and type validation complete, do allow-html validation
         if ("IN".equals(mode)) {
             List<String> errorMessageList = FastList.newInstance();
-            for (ModelParam modelParam : this.contextInfo.values()) {
-                // the param is a String, allow-html is not any, and we are looking at an IN parameter during input parameter validation
-                if (context.get(modelParam.name) != null && ("String".equals(modelParam.type) || "java.lang.String".equals(modelParam.type)) 
-                        && !"any".equals(modelParam.allowHtml) && ("INOUT".equals(modelParam.mode) || "IN".equals(modelParam.mode))) {
+            for (ModelParam modelParam: this.contextInfo.values()) {
+                if (context.get(modelParam.name) != null &&
+                        ("String".equals(modelParam.type) || "java.lang.String".equals(modelParam.type)) &&
+                        !"any".equals(modelParam.allowHtml) &&
+                        ("INOUT".equals(modelParam.mode) || "IN".equals(modelParam.mode))) {
+                    // the param is a String, allow-html is none or safe, and we are looking at an IN parameter during input parameter validation
                     String value = (String) context.get(modelParam.name);
-                    StringUtil.checkStringForHtmlStrictNone(modelParam.name, value, errorMessageList);
+                    if ("none".equals(modelParam.allowHtml)) {
+                        StringUtil.checkStringForHtmlStrictNone(modelParam.name, value, errorMessageList);
+                    } else if ("safe".equals(modelParam.allowHtml)) {
+                        StringUtil.checkStringForHtmlSafeOnly(modelParam.name, value, errorMessageList);
+                    }
                 }
             }
             if (errorMessageList.size() > 0) {
@@ -920,6 +926,8 @@ public class ModelService extends Abstra
             String key = entry.getKey();
             if (key.startsWith(param.stringMapPrefix)) {
                 paramMap.put(key, entry.getValue());
+                key=key.replace(param.stringMapPrefix,"");
+                paramMap.put(key, entry.getValue());
             }
         }
         return paramMap;

Modified: ofbiz/trunk/specialpurpose/LICENSE
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/LICENSE?rev=1541470&r1=1541469&r2=1541470&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/LICENSE (original)
+++ ofbiz/trunk/specialpurpose/LICENSE Wed Nov 13 11:07:04 2013
@@ -19,6 +19,8 @@ specialpurpose/googlecheckout/lib/checko
 specialpurpose/lucene/lib/lucene-analyzers-common-4.5.1.jar
 specialpurpose/lucene/lib/lucene-core-4.5.1.jar
 specialpurpose/lucene/lib/lucene-queryparser-4.5.1.jar
+specialpurpose/solr/libsolr-solrj-4.4.0.jar
+specialpurpose/solr/webapp/WEB-INF/lib/*.jar (covered by specialpurpose/solr/webapp/META-INF/NOTICE.txt)
 
 =========================================================================
                                  Apache License

Modified: ofbiz/trunk/specialpurpose/build.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/build.xml?rev=1541470&r1=1541469&r2=1541470&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/build.xml (original)
+++ ofbiz/trunk/specialpurpose/build.xml Wed Nov 13 11:07:04 2013
@@ -41,3 +41,4 @@
         example/build.xml
     "/>
 </project>
+        <!-- ,solr/build.xml -->

Modified: ofbiz/trunk/specialpurpose/component-load.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/component-load.xml?rev=1541470&r1=1541469&r2=1541470&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/component-load.xml (original)
+++ ofbiz/trunk/specialpurpose/component-load.xml Wed Nov 13 11:07:04 2013
@@ -40,5 +40,6 @@ under the License.
     <load-component component-location="birt"/>
     <load-component component-location="example"/>
     <load-component component-location="exampleext"/>
+    <load-component component-location="solr"/>
     <!-- <load-component component-location="jetty"/> -->
 </component-loader>

Modified: ofbiz/trunk/specialpurpose/webpos/webapp/webpos/WEB-INF/actions/cart/ShowCart.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/webpos/webapp/webpos/WEB-INF/actions/cart/ShowCart.groovy?rev=1541470&r1=1541469&r2=1541470&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/webpos/webapp/webpos/WEB-INF/actions/cart/ShowCart.groovy (original)
+++ ofbiz/trunk/specialpurpose/webpos/webapp/webpos/WEB-INF/actions/cart/ShowCart.groovy Wed Nov 13 11:07:04 2013
@@ -45,6 +45,7 @@ if (webPosSession) {
 }
 
 context.cashAmount = BigDecimal.ZERO;
+context.pinAmount = BigDecimal.ZERO;
 context.checkAmount = BigDecimal.ZERO;
 context.giftAmount = BigDecimal.ZERO;
 context.creditAmount = BigDecimal.ZERO;
@@ -61,6 +62,9 @@ if (shoppingCart) {
                 if ("CASH".equals(paymentInfo.paymentMethodTypeId)) {
                     context.cashAmount = new BigDecimal((context.cashAmount).add(amount));
                 }
+                else if ("PIN".equals(paymentInfo.paymentMethodTypeId)) {
+                    context.pinAmount = new BigDecimal((context.pinAmount).add(amount));
+                }
                 else if ("PERSONAL_CHECK".equals(paymentInfo.paymentMethodTypeId)) {
                     context.checkAmount = new BigDecimal((context.checkAmount).add(amount));
                 }

Modified: ofbiz/trunk/specialpurpose/webpos/webapp/webpos/WEB-INF/controller.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/webpos/webapp/webpos/WEB-INF/controller.xml?rev=1541470&r1=1541469&r2=1541470&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/webpos/webapp/webpos/WEB-INF/controller.xml (original)
+++ ofbiz/trunk/specialpurpose/webpos/webapp/webpos/WEB-INF/controller.xml Wed Nov 13 11:07:04 2013
@@ -371,6 +371,13 @@
         <response name="error" type="request" value="json"/>
     </request-map>
     
+    <request-map uri="PayPin">
+        <security https="false" auth="true"/>
+        <event type="simple" path="component://webpos/script/org/ofbiz/webpos/event/PaymentEvents.xml" invoke="payPin"/>
+        <response name="success" type="request" value="json"/>
+        <response name="error" type="request" value="json"/>
+    </request-map>
+    
     <request-map uri="PayCheck">
         <security https="false" auth="true"/>
         <event type="simple" path="component://webpos/script/org/ofbiz/webpos/event/PaymentEvents.xml" invoke="payCheck"/>

Modified: ofbiz/trunk/specialpurpose/webpos/webapp/webpos/cart/ShowCart.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/webpos/webapp/webpos/cart/ShowCart.ftl?rev=1541470&r1=1541469&r2=1541470&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/webpos/webapp/webpos/cart/ShowCart.ftl (original)
+++ ofbiz/trunk/specialpurpose/webpos/webapp/webpos/cart/ShowCart.ftl Wed Nov 13 11:07:04 2013
@@ -24,11 +24,13 @@ under the License.
   <table class="basic-table" cellspacing="1" cellpadding="1">
     <input type="hidden" id="totalDue" value="${totalDue}"/>
     <input type="hidden" id="totalCash" value="${cashAmount}"/>
+    <input type="hidden" id="totalPin" value="${pinAmount}"/>
     <input type="hidden" id="totalCheck" value="${checkAmount}"/>
     <input type="hidden" id="totalGift" value="${giftAmount}"/>
     <input type="hidden" id="totalCredit" value="${creditAmount}"/>
     <input type="hidden" id="totalDueFormatted" value="<@ofbizCurrency amount=totalDue isoCode=shoppingCart.getCurrency()/>"/>
     <input type="hidden" id="totalCashFormatted" value="<@ofbizCurrency amount=cashAmount isoCode=shoppingCart.getCurrency()/>"/>
+    <input type="hidden" id="totalPinFormatted" value="<@ofbizCurrency amount=pinAmount isoCode=shoppingCart.getCurrency()/>"/>
     <input type="hidden" id="totalCheckFormatted" value="<@ofbizCurrency amount=checkAmount isoCode=shoppingCart.getCurrency()/>"/>
     <input type="hidden" id="totalGiftFormatted" value="<@ofbizCurrency amount=giftAmount isoCode=shoppingCart.getCurrency()/>"/>
     <input type="hidden" id="totalCreditFormatted" value="<@ofbizCurrency amount=creditAmount isoCode=shoppingCart.getCurrency()/>"/>
@@ -104,11 +106,7 @@ under the License.
                 <#else>
                   <#assign parentProductId = cartLine.getProductId()/>
                 </#if>
-                <#assign smallImageUrl = Static["org.ofbiz.product.product.ProductContentWrapper"].getProductContentAsText(cartLine.getProduct(), "SMALL_IMAGE_URL", locale, dispatcher)?if_exists>
-                <#if !smallImageUrl?string?has_content><#assign smallImageUrl = "/images/defaultImage.jpg"></#if>
-                <#if smallImageUrl?string?has_content>
-                  <img src="<@o...@ofbizContentUrl>" align="left" class="cssImgSmall" />
-                </#if>
+                
                 <#-- end code to display a small image of the product -->
                 ${cartLine.getProductId()} - ${cartLine.getName()?if_exists} : ${cartLine.getDescription()?if_exists}
               <#else>

Modified: ofbiz/trunk/specialpurpose/webpos/webapp/webpos/images/js/Common.js
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/webpos/webapp/webpos/images/js/Common.js?rev=1541470&r1=1541469&r2=1541470&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/webpos/webapp/webpos/images/js/Common.js (original)
+++ ofbiz/trunk/specialpurpose/webpos/webapp/webpos/images/js/Common.js Wed Nov 13 11:07:04 2013
@@ -128,6 +128,7 @@ function hideOverlayDiv() {
     jQuery('#payCheck').hide();
     jQuery('#payGiftCard').hide();
     jQuery('#payCreditCard').hide();
+    jQuery('#paPin').hide();
     jQuery('#openTerminal').hide();
     jQuery('#closeTerminal').hide();
     jQuery('#paidOutAndIn').hide();

Added: ofbiz/trunk/specialpurpose/webpos/webapp/webpos/images/js/PayPin.js
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/webpos/webapp/webpos/images/js/PayPin.js?rev=1541470&view=auto
==============================================================================
--- ofbiz/trunk/specialpurpose/webpos/webapp/webpos/images/js/PayPin.js (added)
+++ ofbiz/trunk/specialpurpose/webpos/webapp/webpos/images/js/PayPin.js Wed Nov 13 11:07:04 2013
@@ -0,0 +1,99 @@
+jQuery(document).ready(function() {
+    jQuery('#removePinTotalPaid').click(function(event) {
+        pleaseWait('Y');
+        var param = 'clearPin=Y&clearCheck=N&clearGift=N&clearCredit=N';
+        jQuery.ajax({url: 'ClearPayment',
+            data: param,
+            type: 'post',
+            async: false,
+            success: function(data) {
+                getResultOfPinClearPayment(data);
+            },
+            error: function(data) {
+                getResultOfPinClearPayment(data);
+            }
+        });
+        pleaseWait('N');
+        productToSearchFocus();
+        return false;
+    });
+    
+    jQuery('#amoutPin').keypress(function(event) {
+        code = event.keyCode ? event.keyCode : event.which;
+        if (code.toString() == 13) {
+            payPinConfirm();
+            return false;
+        }
+        if (code.toString() == 27) {
+            productToSearchFocus();
+            return false;
+        }
+    });
+    
+    jQuery('#payPinConfirm').click(function(event) {
+        payPinConfirm();
+        return false;
+    });
+
+    jQuery('#payPinCancel').click(function(event) {
+        productToSearchFocus();
+        return false;
+    });
+});
+
+function payPinConfirm() {
+    pleaseWait('Y');
+    var param = 'amoutPin=' + jQuery('#amoutPin').val();
+    jQuery.ajax({url: 'PayPin',
+        data: param,
+        type: 'post',
+        async: false,
+        success: function(data) {
+            getResultOfPayPin(data);
+        },
+        error: function(data) {
+            getResultOfPayPin(data);
+        }
+    });
+    pleaseWait('N');
+}
+
+function payPin(cleanErrors) {
+    if (cleanErrors == undefined) {
+        cleanErrors = "Y";
+    } 
+    if (cleanErrors == "Y") {
+        hideOverlayDiv();
+        jQuery('#payPinFormServerError').html("");
+        jQuery('#amoutPin').val("");
+    }
+    jQuery('#cashTotalDue').html(jQuery('#totalDueFormatted').val());
+    jQuery('#cashTotalPaid').html(jQuery('#totalPinFormatted').val());
+    jQuery('#payPin').show();
+    jQuery('#amoutPin').focus();
+    return false;
+}
+
+function getResultOfPayPin(data) {
+    var serverError = getServerError(data);
+    if (serverError != "") {
+        jQuery('#payPinFormServerError').html(serverError);
+        payPin('N');
+    } else {
+        clearErrorMessages();
+        updateCart();
+        productToSearchFocus();
+    }
+}
+
+function getResultOfPinClearPayment(data) {
+    var serverError = getServerError(data);
+    if (serverError != "") {
+        jQuery('#errors').fadeIn('slow', function() {
+            jQuery('#errors').html(serverError);
+        });
+    } else {
+        clearErrorMessages();
+        updateCart();
+    }
+}
\ No newline at end of file

Propchange: ofbiz/trunk/specialpurpose/webpos/webapp/webpos/images/js/PayPin.js
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: ofbiz/trunk/specialpurpose/webpos/webapp/webpos/images/js/PayPin.js
------------------------------------------------------------------------------
    svn:keywords = Date Rev Author URL Id

Propchange: ofbiz/trunk/specialpurpose/webpos/webapp/webpos/images/js/PayPin.js
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: ofbiz/trunk/specialpurpose/webpos/webapp/webpos/images/webpos.css
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/webpos/webapp/webpos/images/webpos.css?rev=1541470&r1=1541469&r2=1541470&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/webpos/webapp/webpos/images/webpos.css (original)
+++ ofbiz/trunk/specialpurpose/webpos/webapp/webpos/images/webpos.css Wed Nov 13 11:07:04 2013
@@ -58,6 +58,7 @@ under the License.
 .pos-cart-odd {
     background-color: white;
     overflow: auto;
+    vertical-align: top;
 }
 .pos-cart-odd:hover {
     background-color: #FFFCCF;
@@ -66,6 +67,7 @@ under the License.
 .pos-cart-even {
     background-color: #eeeeee;
     overflow: auto;
+    vertical-align: top;
 }
 .pos-cart-even:hover {
     background-color: #FFFCCF;
@@ -247,7 +249,7 @@ input[type="text"]:focus, input[type="pa
 #SearchSalesRepsList {
     border: 1px solid #0099CC;
     overflow: auto; 
-    height: 120px;
+    height: 110px;
 }
 #SearchSalesReps {
     height: 110px;
@@ -271,7 +273,7 @@ input[type="text"]:focus, input[type="pa
     background-color: #fece2f;
 }
 #CenterBar {
-    margin-top: 33px;
+    margin-top: 15px;
     height: auto;
 }
 .leftCenterBar {
@@ -287,6 +289,10 @@ input[type="text"]:focus, input[type="pa
 .centerCenterBar  {
     margin-left: 24em;
     margin-right: 24em;
+    padding-top: 1px;
+    padding-left: 2px;
+    padding-right: 2px;
+    padding-bottom: 1px;
     width: auto;
 }
 #CartHeader {
@@ -294,16 +300,18 @@ input[type="text"]:focus, input[type="pa
     width: 100%;
 }
 #Cart {
-    height: 460px;
+    height: 280px;
     width: 100%;
 }
 .basic-table .CartHead {
     height: 30px;
 }
 .basic-table .CartBody {
-    height: 400px;
+    height: 220px;
     overflow-x: hidden;
-    overflow-y: auto;
+    overflow-y: scroll;
+    vertical-align: top;
+    
 }
 .basic-table .CartFoot {
     height: 30px;

Added: ofbiz/trunk/specialpurpose/webpos/webapp/webpos/payment/PayPin.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/webpos/webapp/webpos/payment/PayPin.ftl?rev=1541470&view=auto
==============================================================================
--- ofbiz/trunk/specialpurpose/webpos/webapp/webpos/payment/PayPin.ftl (added)
+++ ofbiz/trunk/specialpurpose/webpos/webapp/webpos/payment/PayPin.ftl Wed Nov 13 11:07:04 2013
@@ -0,0 +1,38 @@
+<div id="payPin" style="display:none">
+  <table border="0" width="100%">
+    <tr rowspan="2">
+      <td colspan="2">&nbsp;</td>
+    </tr>
+    <tr>
+      <td width="100%" align="center" colspan="2">
+        <b>${uiLabelMap.WebPosTransactionTotalDue} <span id="pinTotalDue"/></b>
+      </td>
+    </tr>
+    <tr>
+      <td width="100%" align="center" colspan="2">
+        <b>${uiLabelMap.WebPosPayPinTotal} <span id="pinTotalPaid"/></b>
+        <a id="removePinTotalPaid" href="javascript:void(0);"><img src="/images/collapse.gif"></a>
+      </td>
+    </tr>
+    <tr>
+      <td width="50%" align="right">${uiLabelMap.WebPosPayPin}</td>
+      <td width="50%" align="left"><input type="text" id="amountPin" name="amountPin" size="10" value=""/></td>
+    </tr>
+    <tr>
+      <td width="50%" align="right">${uiLabelMap.WebPosPayPinRefNum}</td>
+      <td width="50%" align="left"><input type="text" id="refNumPin" name="refNum" size="10" value=""/></td>
+    </tr>
+    <tr>
+      <td colspan="2">&nbsp;</td>
+    </tr>
+    <tr>
+      <td colspan="2" align="center">
+        <input type="submit" value="${uiLabelMap.CommonConfirm}" id="payPinConfirm"/>
+        <input type="submit" value="${uiLabelMap.CommonCancel}" id="payPinCancel"/>
+      </td>
+    </tr>
+    <tr>
+      <td colspan="2"><div class="errorPosMessage"><span id="payPinFormServerError"/></div></td>
+    </tr>
+  </table>
+</div>
\ No newline at end of file

Propchange: ofbiz/trunk/specialpurpose/webpos/webapp/webpos/payment/PayPin.ftl
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: ofbiz/trunk/specialpurpose/webpos/webapp/webpos/payment/PayPin.ftl
------------------------------------------------------------------------------
    svn:keywords = Date Rev Author URL Id

Propchange: ofbiz/trunk/specialpurpose/webpos/webapp/webpos/payment/PayPin.ftl
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: ofbiz/trunk/specialpurpose/webpos/webapp/webpos/shortcuts/Shortcuts.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/webpos/webapp/webpos/shortcuts/Shortcuts.ftl?rev=1541470&r1=1541469&r2=1541470&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/webpos/webapp/webpos/shortcuts/Shortcuts.ftl (original)
+++ ofbiz/trunk/specialpurpose/webpos/webapp/webpos/shortcuts/Shortcuts.ftl Wed Nov 13 11:07:04 2013
@@ -28,17 +28,19 @@ under the License.
 </table>
 <script type="text/javascript">
   function activateHotKeys() {
+    
     WebPosHotkeys.bind("keydown", "f1", productToSearchFocus, "productToSearchFocus()", "${uiLabelMap.WebPosShortcutF1}");
     WebPosHotkeys.bind("keydown", "f2", partyToSearchFocus, "partyToSearchFocus()", "${uiLabelMap.WebPosShortcutF2}");
     WebPosHotkeys.bind("keydown", "f3", payCash, "payCash()", "${uiLabelMap.WebPosShortcutF3}");
     WebPosHotkeys.bind("keydown", "f4", payCheck, "payCheck()", "${uiLabelMap.WebPosShortcutF4}");
-    WebPosHotkeys.bind("keydown", "f5", payGiftCard, "payGiftCard()", "${uiLabelMap.WebPosShortcutF5}");
-    WebPosHotkeys.bind("keydown", "f6", payCreditCard, "payCreditCard()", "${uiLabelMap.WebPosShortcutF6}");
-    WebPosHotkeys.bind("keydown", "f7", payFinish, "payFinish()", "${uiLabelMap.WebPosShortcutF7}");
-    WebPosHotkeys.bind("keydown", "f8", itemQuantityFocus, "itemQuantityFocus()", "${uiLabelMap.WebPosShortcutF8}");
-    WebPosHotkeys.bind("keydown", "f9", incrementItemQuantity, "incrementItemQuantity()", "${uiLabelMap.WebPosShortcutF9}");
-    WebPosHotkeys.bind("keydown", "f10", decrementItemQuantity, "decrementItemQuantity()", "${uiLabelMap.WebPosShortcutF10}");
-    WebPosHotkeys.bind("keydown", "f11", emptyCart, "emptyCart()", "${uiLabelMap.WebPosShortcutF11}");
+    WebPosHotkeys.bind("keydown", "f5", payPin, "payPin()", "${uiLabelMap.WebPosShortcutF5}");
+    WebPosHotkeys.bind("keydown", "f6", payGiftCard, "payGiftCard()", "${uiLabelMap.WebPosShortcutF6}");
+    WebPosHotkeys.bind("keydown", "f7", payCreditCard, "payCreditCard()", "${uiLabelMap.WebPosShortcutF7}");
+    WebPosHotkeys.bind("keydown", "f8", payFinish, "payFinish()", "${uiLabelMap.WebPosShortcutF8}");
+    WebPosHotkeys.bind("keydown", "f9", itemQuantityFocus, "itemQuantityFocus()", "${uiLabelMap.WebPosShortcutF9}");
+    WebPosHotkeys.bind("keydown", "f10", incrementItemQuantity, "incrementItemQuantity()", "${uiLabelMap.WebPosShortcutF10}");
+    WebPosHotkeys.bind("keydown", "f11", decrementItemQuantity, "decrementItemQuantity()", "${uiLabelMap.WebPosShortcutF11}");
+    WebPosHotkeys.bind("keydown", "f12", emptyCart, "emptyCart()", "${uiLabelMap.WebPosShortcutF12}");
     WebPosHotkeys.bind("keydown", "up", keyUp, "keyUp()", "${uiLabelMap.WebPosShortcutKeyUp}");
     WebPosHotkeys.bind("keydown", "down", keyDown, "keyDown()", "${uiLabelMap.WebPosShortcutKeyDown}");
     updateHotKeys();

Modified: ofbiz/trunk/specialpurpose/webpos/widget/CommonScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/webpos/widget/CommonScreens.xml?rev=1541470&r1=1541469&r2=1541470&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/webpos/widget/CommonScreens.xml (original)
+++ ofbiz/trunk/specialpurpose/webpos/widget/CommonScreens.xml Wed Nov 13 11:07:04 2013
@@ -190,6 +190,7 @@ under the License.
                     <include-screen name="CartList" location="component://webpos/widget/CartScreens.xml"/>
                     <include-screen name="ChooseVariant" location="component://webpos/widget/CartScreens.xml"/>
                     <include-screen name="PayCash" location="component://webpos/widget/PaymentScreens.xml"/>
+                    <include-screen name="PayPin" location="component://webpos/widget/PaymentScreens.xml"/>
                     <include-screen name="PayCheck" location="component://webpos/widget/PaymentScreens.xml"/>
                     <include-screen name="PayGiftCard" location="component://webpos/widget/PaymentScreens.xml"/>
                     <include-screen name="PayCreditCard" location="component://webpos/widget/PaymentScreens.xml"/>

Modified: ofbiz/trunk/specialpurpose/webpos/widget/PaymentScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/webpos/widget/PaymentScreens.xml?rev=1541470&r1=1541469&r2=1541470&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/webpos/widget/PaymentScreens.xml (original)
+++ ofbiz/trunk/specialpurpose/webpos/widget/PaymentScreens.xml Wed Nov 13 11:07:04 2013
@@ -34,6 +34,19 @@ under the License.
         </section>
     </screen>
     
+    <screen name="PayPin">
+        <section>
+            <actions>
+                <set field="titleProperty" value="WebPosPageTitlePayPin"/>
+            </actions>
+            <widgets>
+                <container>
+                    <platform-specific><html><html-template location="component://webpos/webapp/webpos/payment/PayPin.ftl"/></html></platform-specific>
+                </container>
+            </widgets>
+        </section>
+    </screen>
+    
     <screen name="PayCheck">
         <section>
             <actions>

Modified: ofbiz/trunk/tools/startofbiz.bat
URL: http://svn.apache.org/viewvc/ofbiz/trunk/tools/startofbiz.bat?rev=1541470&r1=1541469&r2=1541470&view=diff
==============================================================================
--- ofbiz/trunk/tools/startofbiz.bat (original)
+++ ofbiz/trunk/tools/startofbiz.bat Wed Nov 13 11:07:04 2013
@@ -38,7 +38,8 @@ rem del tmp.tmp
 rem set RMIIF=-Djava.rmi.server.hostname=%IPADDR%
 rem # Not needed anymore, for history
 rem set MISC=-Duser.language=en
-rem set VMARGS=%MEMIF% %MISC% %DEBUG% %RMIIF%
+rem set SOLR=-Dsolr.solr.home=specialpurpose/solr 
+rem set VMARGS=%MEMIF% %MISC% %DEBUG% %RMIIF% %SOLR%
 rem ####################################################################
 
 rem ### Worldpay Config
@@ -55,7 +56,9 @@ rem "%JAVA_HOME%\bin\java" -Xms128M -Xmx
 rem ### Simple easy to read line
 cd %OFBIZ_HOME%
 echo on
-"%JAVA_HOME%\bin\java" -Xms128M -Xmx512M -XX:MaxPermSize=512m -jar ofbiz.jar
+rem # -Dsolr.solr.home=specialpurpose/solr is used by Solr, can be neglected if Solr is not used
+
+"%JAVA_HOME%\bin\java" -Xms128M -Xmx512M -XX:MaxPermSize=512m  -Dsolr.solr.home=specialpurpose/solr -jar ofbiz.jar
 echo off
 rem ### If you would prefer the console output to be logged rather than displayed switch out the above line for this one
 rem "%JAVA_HOME%\bin\java" -Xms128M -Xmx512M -XX:MaxPermSize=512m -jar ofbiz.jar > runtime\logs\console.log

Modified: ofbiz/trunk/tools/startofbiz.sh
URL: http://svn.apache.org/viewvc/ofbiz/trunk/tools/startofbiz.sh?rev=1541470&r1=1541469&r2=1541470&view=diff
==============================================================================
--- ofbiz/trunk/tools/startofbiz.sh (original)
+++ ofbiz/trunk/tools/startofbiz.sh Wed Nov 13 11:07:04 2013
@@ -36,7 +36,9 @@ rm -f $OFBIZ_LOG
 MEMIF="-Xms128M -Xmx512M -XX:MaxPermSize=512m"
 #JMX="-Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=33333 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false"
 #MISC="-Duser.language=en"
-VMARGS="$MEMIF $MISC $JMX $DEBUG $RMIIF"
+# This is used by Solr, can be neglected if Solr is not used
+SOLR="-Dsolr.solr.home=specialpurpose/solr"
+VMARGS="$MEMIF $MISC $JMX $DEBUG $RMIIF $SOLR"
 
 # Worldpay Config
 #VMARGS="-Xbootclasspath/p:applications/accounting/lib/cryptix.jar $VMARGS"