You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by sa...@apache.org on 2011/09/20 19:46:24 UTC

svn commit: r1173274 [9/13] - in /ofbiz/branches/jackrabbit20100709: ./ applications/accounting/config/ applications/accounting/entitydef/ applications/accounting/script/org/ofbiz/accounting/invoice/ applications/accounting/script/org/ofbiz/accounting/...

Modified: ofbiz/branches/jackrabbit20100709/framework/entity/entitydef/entitymodel.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/framework/entity/entitydef/entitymodel.xml?rev=1173274&r1=1173273&r2=1173274&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/framework/entity/entitydef/entitymodel.xml (original)
+++ ofbiz/branches/jackrabbit20100709/framework/entity/entitydef/entitymodel.xml Tue Sep 20 17:46:13 2011
@@ -121,4 +121,24 @@ under the License.
         <!- - NOTE: there is no FK to the UserLogin entity, which is in a higher-level component, and would normally be in a separate database - ->
     </entity>
     -->
+    <entity entity-name="Component" package-name="org.ofbiz.entity.tenant">
+        <description>Component Entity</description>
+        <field name="componentName" type="name"></field>
+        <field name="rootLocation" type="description"></field>
+        <prim-key field="componentName"/>
+    </entity>
+    <entity entity-name="TenantComponent" package-name="org.ofbiz.entity.tenant">
+        <description></description>
+        <field name="tenantId" type="id-ne"></field>
+        <field name="componentName" type="name"></field>
+        <field name="sequenceNum" type="numeric"></field>
+        <prim-key field="componentName"/>
+        <prim-key field="tenantId"/>
+        <relation type="one" fk-name="TNTCOMP_TNT" rel-entity-name="Tenant">
+            <key-map field-name="tenantId"/>
+        </relation>
+        <relation type="one" fk-name="COMP_CNT" rel-entity-name="Component">
+            <key-map field-name="componentName"/>
+        </relation>
+    </entity>
 </entitymodel>

Modified: ofbiz/branches/jackrabbit20100709/framework/entity/ofbiz-component.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/framework/entity/ofbiz-component.xml?rev=1173274&r1=1173273&r2=1173274&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/framework/entity/ofbiz-component.xml (original)
+++ ofbiz/branches/jackrabbit20100709/framework/entity/ofbiz-component.xml Tue Sep 20 17:46:13 2011
@@ -34,7 +34,7 @@ under the License.
     <!-- these are for unit testing -->
     <entity-resource type="model" reader-name="main" loader="main" location="entitydef/entitymodel_test.xml"/>
 
-    <entity-resource type="data" reader-name="demo" loader="main" location="data/TenantDemoData.xml"/>
+    <entity-resource type="data" reader-name="tenant" loader="main" location="data/TenantDemoData.xml"/>
     
     <test-suite loader="main" location="testdef/entitytests.xml"/>
 </ofbiz-component>

Modified: ofbiz/branches/jackrabbit20100709/framework/entity/src/org/ofbiz/entity/datasource/GenericDAO.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/framework/entity/src/org/ofbiz/entity/datasource/GenericDAO.java?rev=1173274&r1=1173273&r2=1173274&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/framework/entity/src/org/ofbiz/entity/datasource/GenericDAO.java (original)
+++ ofbiz/branches/jackrabbit20100709/framework/entity/src/org/ofbiz/entity/datasource/GenericDAO.java Tue Sep 20 17:46:13 2011
@@ -814,7 +814,7 @@ public class GenericDAO {
         }
 
         List<EntityCondition> conditions = FastList.newInstance();
-        if (whereEntityCondition != null && !whereEntityCondition.isEmpty()) {
+        if (UtilValidate.isNotEmpty(whereEntityCondition)) {
             conditions.add(whereEntityCondition);
         }
 

Modified: ofbiz/branches/jackrabbit20100709/framework/entity/src/org/ofbiz/entity/jdbc/DatabaseUtil.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/framework/entity/src/org/ofbiz/entity/jdbc/DatabaseUtil.java?rev=1173274&r1=1173273&r2=1173274&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/framework/entity/src/org/ofbiz/entity/jdbc/DatabaseUtil.java (original)
+++ ofbiz/branches/jackrabbit20100709/framework/entity/src/org/ofbiz/entity/jdbc/DatabaseUtil.java Tue Sep 20 17:46:13 2011
@@ -393,8 +393,7 @@ public class DatabaseUtil {
                     }
 
                     // -list all fields that do not have a corresponding column
-                    for (String colName: fieldColNames.keySet()) {
-                        ModelField field = fieldColNames.get(colName);
+                    for (ModelField field : fieldColNames.values()) {
                         String message = "Field [" + field.getName() + "] of entity [" + entity.getEntityName() + "] is missing its corresponding column [" + field.getColName() + "]" + (field.getIsPk() ? " (and it is a PRIMARY KEY FIELD)" : "");
 
                         Debug.logWarning(message, module);

Modified: ofbiz/branches/jackrabbit20100709/framework/entity/src/org/ofbiz/entity/model/ModelRelation.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/framework/entity/src/org/ofbiz/entity/model/ModelRelation.java?rev=1173274&r1=1173273&r2=1173274&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/framework/entity/src/org/ofbiz/entity/model/ModelRelation.java (original)
+++ ofbiz/branches/jackrabbit20100709/framework/entity/src/org/ofbiz/entity/model/ModelRelation.java Tue Sep 20 17:46:13 2011
@@ -196,7 +196,7 @@ public class ModelRelation extends Model
     }
 
     public String keyMapString(String separator, String afterLast) {
-        String returnString = "";
+        StringBuilder stringBuilder = new StringBuilder("");
 
         if (keyMaps.size() < 1) {
             return "";
@@ -205,10 +205,12 @@ public class ModelRelation extends Model
         int i = 0;
 
         for (; i < keyMaps.size() - 1; i++) {
-            returnString = returnString + keyMaps.get(i).fieldName + separator;
+            stringBuilder.append(keyMaps.get(i).fieldName);
+            stringBuilder.append(separator);
         }
-        returnString = returnString + keyMaps.get(i).fieldName + afterLast;
-        return returnString;
+        stringBuilder.append(keyMaps.get(i).fieldName);
+        stringBuilder.append(afterLast);
+        return stringBuilder.toString();
     }
 
     public String keyMapUpperString(String separator, String afterLast) {

Modified: ofbiz/branches/jackrabbit20100709/framework/entity/src/org/ofbiz/entity/transaction/TransactionUtil.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/framework/entity/src/org/ofbiz/entity/transaction/TransactionUtil.java?rev=1173274&r1=1173273&r2=1173274&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/framework/entity/src/org/ofbiz/entity/transaction/TransactionUtil.java (original)
+++ ofbiz/branches/jackrabbit20100709/framework/entity/src/org/ofbiz/entity/transaction/TransactionUtil.java Tue Sep 20 17:46:13 2011
@@ -154,7 +154,7 @@ public class TransactionUtil implements 
 
                     RollbackOnlyCause roc = getSetRollbackOnlyCause();
                     // do we have a cause? if so, throw special exception
-                    if (roc != null && !roc.isEmpty()) {
+                    if (UtilValidate.isNotEmpty(roc)) {
                         throw new GenericTransactionException("The current transaction is marked for rollback, not beginning a new transaction and aborting current operation; the rollbackOnly was caused by: " + roc.getCauseMessage(), roc.getCauseThrowable());
                     } else {
                         return false;

Modified: ofbiz/branches/jackrabbit20100709/framework/entity/src/org/ofbiz/entity/util/EntityDataLoader.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/framework/entity/src/org/ofbiz/entity/util/EntityDataLoader.java?rev=1173274&r1=1173273&r2=1173274&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/framework/entity/src/org/ofbiz/entity/util/EntityDataLoader.java (original)
+++ ofbiz/branches/jackrabbit20100709/framework/entity/src/org/ofbiz/entity/util/EntityDataLoader.java Tue Sep 20 17:46:13 2011
@@ -176,6 +176,23 @@ public class EntityDataLoader {
         return urlList;
     }
 
+    public static <E> List<URL> getUrlByComponentList(String helperName, List<String> components, List<E> readerNames) {
+        String paths = getPathsString(helperName);
+        List<URL> urlList = new LinkedList<URL>();
+        for (String component : components) {
+            urlList.addAll(getUrlList(helperName, component, readerNames));
+        }
+        return urlList;
+    }
+
+    public static List<URL> getUrlByComponentList(String helperName, List<String> components) {
+        DatasourceInfo datasourceInfo = EntityConfigUtil.getDatasourceInfo(helperName);
+        List<URL> urlList = new LinkedList<URL>();
+        for (String component : components) {
+            urlList.addAll(getUrlList(helperName, component));
+        }
+        return urlList;
+    }
     public static int loadData(URL dataUrl, String helperName, Delegator delegator, List<Object> errorMessages) throws GenericEntityException {
         return loadData(dataUrl, helperName, delegator, errorMessages, -1);
     }

Modified: ofbiz/branches/jackrabbit20100709/framework/entityext/src/org/ofbiz/entityext/data/EntityDataLoadContainer.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/framework/entityext/src/org/ofbiz/entityext/data/EntityDataLoadContainer.java?rev=1173274&r1=1173273&r2=1173274&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/framework/entityext/src/org/ofbiz/entityext/data/EntityDataLoadContainer.java (original)
+++ ofbiz/branches/jackrabbit20100709/framework/entityext/src/org/ofbiz/entityext/data/EntityDataLoadContainer.java Tue Sep 20 17:46:13 2011
@@ -22,22 +22,30 @@ import java.io.File;
 import java.net.MalformedURLException;
 import java.net.URL;
 import java.text.NumberFormat;
+import java.util.Collection;
 import java.util.List;
 import java.util.Map;
 import java.util.TreeSet;
 
 import javolution.util.FastList;
 
+import org.ofbiz.base.component.ComponentConfig;
 import org.ofbiz.base.container.Container;
 import org.ofbiz.base.container.ContainerConfig;
 import org.ofbiz.base.container.ContainerException;
 import org.ofbiz.base.util.Debug;
 import org.ofbiz.base.util.StringUtil;
+import org.ofbiz.base.util.UtilMisc;
+import org.ofbiz.base.util.UtilProperties;
 import org.ofbiz.base.util.UtilURL;
 import org.ofbiz.base.util.UtilValidate;
 import org.ofbiz.entity.Delegator;
 import org.ofbiz.entity.DelegatorFactory;
 import org.ofbiz.entity.GenericEntityException;
+import org.ofbiz.entity.GenericValue;
+import org.ofbiz.entity.condition.EntityCondition;
+import org.ofbiz.entity.condition.EntityExpr;
+import org.ofbiz.entity.condition.EntityOperator;
 import org.ofbiz.entity.datasource.GenericHelperInfo;
 import org.ofbiz.entity.jdbc.DatabaseUtil;
 import org.ofbiz.entity.model.ModelEntity;
@@ -59,6 +67,7 @@ public class EntityDataLoadContainer imp
     protected String directory = null;
     protected List<String> files = FastList.newInstance();
     protected String component = null;
+    protected List<String> components = FastList.newInstance();
     protected boolean useDummyFks = false;
     protected boolean maintainTxs = false;
     protected boolean tryInserts = false;
@@ -194,6 +203,42 @@ public class EntityDataLoadContainer imp
      * @see org.ofbiz.base.container.Container#start()
      */
     public boolean start() throws ContainerException {
+        if("all-tenants".equals(this.overrideDelegator)) {
+            if ("N".equals(UtilProperties.getPropertyValue("general.properties", "multitenant"))) {
+                Debug.logWarning("Please enable multitenant. (e.g. general.properties --> multitenant=Y)", module);
+                return true;
+            }
+            ContainerConfig.Container cfg = ContainerConfig.getContainer("dataload-container", configFile);
+            ContainerConfig.Container.Property delegatorNameProp = cfg.getProperty("delegator-name");
+            String delegatorName = null;
+            if (delegatorNameProp == null || UtilValidate.isEmpty(delegatorNameProp.value)) {
+                throw new ContainerException("Invalid delegator-name defined in container configuration");
+            } else {
+                delegatorName = delegatorNameProp.value;
+            }
+            Delegator delegator = DelegatorFactory.getDelegator(delegatorName);
+            if (delegator == null) {
+                throw new ContainerException("Invalid delegator name!");
+            }
+            List<EntityExpr> expr = FastList.newInstance();
+            expr.add(EntityCondition.makeCondition("disabled", EntityOperator.EQUALS, "N"));
+            expr.add(EntityCondition.makeCondition("disabled", EntityOperator.EQUALS, null));
+            List<GenericValue> tenantList;
+            try {
+                tenantList = delegator.findList("Tenant", EntityCondition.makeCondition(expr, EntityOperator.OR), null, null, null, false);
+            } catch (GenericEntityException e) {
+                throw new ContainerException(e.getMessage());
+            }
+            for (GenericValue tenant : tenantList) {
+                this.overrideDelegator = delegator.getDelegatorName() + "#" + tenant.getString("tenantId");
+                loadContainer();
+            }
+        } else {
+            loadContainer();
+        }
+        return true;
+    }
+    private void loadContainer() throws ContainerException{
         ContainerConfig.Container cfg = ContainerConfig.getContainer("dataload-container", configFile);
         ContainerConfig.Container.Property delegatorNameProp = cfg.getProperty("delegator-name");
         ContainerConfig.Container.Property entityGroupNameProp = cfg.getProperty("entity-group-name");
@@ -223,7 +268,6 @@ public class EntityDataLoadContainer imp
                 readerNames = StringUtil.split(this.readers, ",");
             }
         }
-
         String delegatorNameToUse = overrideDelegator != null ? overrideDelegator : delegatorName;
         String groupNameToUse = overrideGroup != null ? overrideGroup : entityGroupName;
         Delegator delegator = DelegatorFactory.getDelegator(delegatorNameToUse);
@@ -245,7 +289,58 @@ public class EntityDataLoadContainer imp
             throw new ContainerException(e.getMessage(), e);
         }
         TreeSet<String> modelEntityNames = new TreeSet<String>(modelEntities.keySet());
-
+        // store all components
+        Collection<ComponentConfig> allComponents = ComponentConfig.getAllComponents();
+        for (ComponentConfig config : allComponents) {
+            //Debug.logInfo("- Stored component : " + config.getComponentName(), module);
+            GenericValue componentEntry = delegator.makeValue("Component");
+            componentEntry.set("componentName", config.getComponentName());
+            componentEntry.set("rootLocation", config.getRootLocation());
+            try {
+                GenericValue componentCheck = delegator.findByPrimaryKey("Component", UtilMisc.toMap("componentName", config.getComponentName()));
+                if (UtilValidate.isEmpty(componentCheck)) {
+                    componentEntry.create();
+                } else {
+                    componentEntry.store();
+                }
+            } catch (GenericEntityException e) {
+                Debug.logError(e.getMessage(), module);
+            }
+        }
+        // load specify components
+        if (UtilValidate.isNotEmpty(delegator.getDelegatorTenantId()) && "Y".equals(UtilProperties.getPropertyValue("general.properties", "multitenant"))) {
+            try {
+                List<EntityExpr> exprs = FastList.newInstance();
+                exprs.add(EntityCondition.makeCondition("rootLocation", EntityOperator.NOT_LIKE, "%hot-deploy%"));
+                EntityCondition cond = EntityCondition.makeCondition(exprs);
+                List<GenericValue> components = delegator.findList("Component", cond , null, null, null, false);
+                Debug.logInfo("===== Begin load specify components", module);
+                if (UtilValidate.isEmpty(this.component)) {
+                    for (GenericValue component : components) {
+                        this.components.add(component.getString("componentName"));
+                        //Debug.logInfo("- loaded default component : " + component.getString("componentName"), module);
+                    }
+                    Debug.logInfo("- Loaded components by default : " + components.size() + " components", module);
+                    List<GenericValue> tenantComponents = delegator.findByAnd("TenantComponent", UtilMisc.toMap("tenantId", delegator.getDelegatorTenantId()), UtilMisc.toList("sequenceNum"));
+                    for (GenericValue tenantComponent : tenantComponents) {
+                        this.components.add(tenantComponent.getString("componentName"));
+                        //Debug.logInfo("- loaded component by tenantId : " + tenantComponent.getString("tenantId") +", component : " + tenantComponent.getString("componentName"), module);
+                    }
+                    Debug.logInfo("- Loaded components by tenantId : " + delegator.getDelegatorTenantId() + ", " + tenantComponents.size() + " components", module);
+                } else {
+                    List<GenericValue> tenantComponents = delegator.findByAnd("TenantComponent", UtilMisc.toMap("tenantId", delegator.getDelegatorTenantId(), "componentName", this.component),
+                            UtilMisc.toList("sequenceNum"));
+                    for (GenericValue tenantComponent : tenantComponents) {
+                        this.components.add(tenantComponent.getString("componentName"));
+                        //Debug.logInfo("- loaded component by tenantId : " + tenantComponent.getString("tenantId") +", component : " + tenantComponent.getString("componentName"), module);
+                    }
+                    Debug.logInfo("- Loaded tenantId : " + delegator.getDelegatorTenantId() + " and component : " + this.component, module);
+                }
+                Debug.logInfo("===== Loaded : " + this.components.size() + " components", module);
+            } catch (GenericEntityException e) {
+                Debug.logError(e.getMessage(), module);
+            }
+        }
         // check for drop index/fks
         if (dropConstraints) {
             List<String> messages = FastList.newInstance();
@@ -322,13 +417,20 @@ public class EntityDataLoadContainer imp
         }
 
         // get the reader name URLs first
-        List<URL> urlList = null;
-        if (readerNames != null) {
-            urlList = EntityDataLoader.getUrlList(helperInfo.getHelperBaseName(), component, readerNames);
-        } else if (!"none".equalsIgnoreCase(this.readers)) {
-            urlList = EntityDataLoader.getUrlList(helperInfo.getHelperBaseName(), component);
+        List<URL> urlList = FastList.newInstance();
+        if (UtilValidate.isNotEmpty(this.components)) {
+            if (UtilValidate.isNotEmpty(readerNames)) {
+                urlList = EntityDataLoader.getUrlByComponentList(helperInfo.getHelperBaseName(), this.components, readerNames);
+            } else if (!"none".equalsIgnoreCase(this.readers)) {
+                urlList = EntityDataLoader.getUrlByComponentList(helperInfo.getHelperBaseName(), this.components);
+            }
+        } else {
+            if (UtilValidate.isNotEmpty(readerNames)) {
+                urlList = EntityDataLoader.getUrlList(helperInfo.getHelperBaseName(), component, readerNames);
+            } else if (!"none".equalsIgnoreCase(this.readers)) {
+                urlList = EntityDataLoader.getUrlList(helperInfo.getHelperBaseName(), component);
+            }
         }
-
         // need a list if it is empty
         if (urlList == null) {
             urlList = FastList.newInstance();
@@ -462,10 +564,7 @@ public class EntityDataLoadContainer imp
                 }
             }
         }
-
-        return true;
     }
-
     /**
      * @see org.ofbiz.base.container.Container#stop()
      */

Modified: ofbiz/branches/jackrabbit20100709/framework/example/data/ExampleTypeData.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/framework/example/data/ExampleTypeData.xml?rev=1173274&r1=1173273&r2=1173274&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/framework/example/data/ExampleTypeData.xml (original)
+++ ofbiz/branches/jackrabbit20100709/framework/example/data/ExampleTypeData.xml Tue Sep 20 17:46:13 2011
@@ -18,5 +18,5 @@ specific language governing permissions 
 under the License.
 -->
 <entity-engine-xml>
-    <WebSite webSiteId="EXAMPLE" siteName="Example Application" visualThemeSetId="BACKOFFICE"/>
+
 </entity-engine-xml>

Modified: ofbiz/branches/jackrabbit20100709/framework/example/webapp/birt/WEB-INF/web.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/framework/example/webapp/birt/WEB-INF/web.xml?rev=1173274&r1=1173273&r2=1173274&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/framework/example/webapp/birt/WEB-INF/web.xml (original)
+++ ofbiz/branches/jackrabbit20100709/framework/example/webapp/birt/WEB-INF/web.xml Tue Sep 20 17:46:13 2011
@@ -24,11 +24,6 @@ under the License.
     <description>BIRT Component of the Open For Business Project</description>
     
     <context-param>
-        <param-name>webSiteId</param-name>
-        <param-value>BIRT</param-value>
-        <description>A unique ID used to look up the WebSite entity</description>
-    </context-param>
-    <context-param>
         <param-name>localDispatcherName</param-name><param-value>birt</param-value>
         <description>A unique name used to identify/recognize the local dispatcher for the Service Engine</description>
     </context-param>    

Modified: ofbiz/branches/jackrabbit20100709/framework/example/webapp/example/WEB-INF/web.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/framework/example/webapp/example/WEB-INF/web.xml?rev=1173274&r1=1173273&r2=1173274&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/framework/example/webapp/example/WEB-INF/web.xml (original)
+++ ofbiz/branches/jackrabbit20100709/framework/example/webapp/example/WEB-INF/web.xml Tue Sep 20 17:46:13 2011
@@ -41,11 +41,6 @@ under the License.
         <param-value>component://example/widget/example/CommonScreens.xml</param-value>
         <description>The location of the main-decorator screen to use for this webapp; referred to as a context variable in screen def XML files.</description>
     </context-param>
-    <!-- context-param>
-        <param-name>widgetVerbose</param-name>
-        <param-value>false</param-value>
-        <description>Enable/disable widget boundary comments. will override widget.properties See org.ofbiz.widget.ModelWidget.widgetBoundaryCommentsEnabled().</description>
-    </context-param-->
     <context-param>
         <param-name>compressHTML</param-name>
         <param-value>false</param-value>

Modified: ofbiz/branches/jackrabbit20100709/framework/example/webapp/example/flot/flotPie.ftl
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/framework/example/webapp/example/flot/flotPie.ftl?rev=1173274&r1=1173273&r2=1173274&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/framework/example/webapp/example/flot/flotPie.ftl (original)
+++ ofbiz/branches/jackrabbit20100709/framework/example/webapp/example/flot/flotPie.ftl Tue Sep 20 17:46:13 2011
@@ -17,7 +17,7 @@ specific language governing permissions 
 under the License.
 -->
 <script language="javascript" type="text/javascript" src="<@o...@ofbizContentUrl>"></script>
-<script language="javascript" type="text/javascript" src="<@o...@ofbizContentUrl>"></script>
+<script language="javascript" type="text/javascript" src="<@o...@ofbizContentUrl>"></script>
 <script language="javascript" type="text/javascript" src="<@o...@ofbizContentUrl>"></script>
 <script language="javascript" type="text/javascript" src="<@o...@ofbizContentUrl>"></script>
 

Modified: ofbiz/branches/jackrabbit20100709/framework/exampleext/webapp/exampleext/WEB-INF/web.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/framework/exampleext/webapp/exampleext/WEB-INF/web.xml?rev=1173274&r1=1173273&r2=1173274&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/framework/exampleext/webapp/exampleext/WEB-INF/web.xml (original)
+++ ofbiz/branches/jackrabbit20100709/framework/exampleext/webapp/exampleext/WEB-INF/web.xml Tue Sep 20 17:46:13 2011
@@ -24,11 +24,6 @@ under the License.
     <description>Extended Example Application of the Open For Business Project</description>
 
     <context-param>
-        <param-name>webSiteId</param-name>
-        <param-value>EXAMPLEEXT</param-value>
-        <description>A unique ID used to look up the WebSite entity</description>
-    </context-param>
-    <context-param>
         <param-name>localDispatcherName</param-name><param-value>exampleext</param-value>
         <description>A unique name used to identify/recognize the local dispatcher for the Service Engine</description>
     </context-param>

Modified: ofbiz/branches/jackrabbit20100709/framework/images/webapp/images/ecommain.css
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/framework/images/webapp/images/ecommain.css?rev=1173274&r1=1173273&r2=1173274&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/framework/images/webapp/images/ecommain.css (original)
+++ ofbiz/branches/jackrabbit20100709/framework/images/webapp/images/ecommain.css Tue Sep 20 17:46:13 2011
@@ -1815,3 +1815,14 @@ button.ui-button::-moz-focus-inner { bor
  */
 .ui-progressbar { height:2em; text-align: left; }
 .ui-progressbar .ui-progressbar-value {margin: -1px; height:100%; }
+
+
+.view-calendar button {
+    background: url("/images/cal.gif") no-repeat scroll 0 0 transparent !important;
+    border: medium none !important;
+    display: inline-block;
+    height: 22px;
+    margin-top: 3px;
+    vertical-align: top;
+    width: 22px;
+}

Modified: ofbiz/branches/jackrabbit20100709/framework/images/webapp/images/fieldlookup.js
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/framework/images/webapp/images/fieldlookup.js?rev=1173274&r1=1173273&r2=1173274&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/framework/images/webapp/images/fieldlookup.js (original)
+++ ofbiz/branches/jackrabbit20100709/framework/images/webapp/images/fieldlookup.js Tue Sep 20 17:46:13 2011
@@ -261,7 +261,7 @@ function ConstructLookup(requestUrl, inp
             jQuery("#" + lookupId).load(requestUrlAndArgs, function(data){ 
                 lookupFormAction = jQuery("#" + lookupId + " form:first").attr("action");
                 modifySubmitButton(lookupId);
-                jQuery(document).bind("keypress", lookup_onKeyEnter);
+                jQuery("#" + lookupId).bind("keypress", lookup_onKeyEnter);
                 // set up the window chaining
                 // if the ACTIVATED_LOOKUP var is set there have to be more than one lookup,
                 // before registrating the new lookup we store the id of the old lookup in the
@@ -279,7 +279,7 @@ function ConstructLookup(requestUrl, inp
             });
         },
         close: function() {
-            jQuery(document).unbind("keypress", lookup_onKeyEnter);
+            jQuery("#" + lookupId).unbind("keypress", lookup_onKeyEnter);
             //when the window is closed the prev Lookup get the focus (if exists)
             if (ACTIVATED_LOOKUP) {
                 var prevLookup = GLOBAL_LOOKUP_REF.getReference(ACTIVATED_LOOKUP).prevLookup;
@@ -324,7 +324,11 @@ function ConstructLookup(requestUrl, inp
     );
 
     // close the dialog when clicking outside the dialog area
-    jQuery(".ui-widget-overlay").live("click", function() {  jQuery("#" + lookupId).dialog("close"); } );
+    jQuery(".ui-widget-overlay").live("click", function() {  
+        if(!ACTIVATED_LOOKUP || lookupId==ACTIVATED_LOOKUP){
+            jQuery("#" + lookupId).dialog("close");
+        }
+    });
 
 }
 
@@ -468,7 +472,7 @@ function modifySubmitButton (lookupDiv) 
         //modify nav-pager
         var navPagers = jQuery("#" + lookupDiv + " .nav-pager a");
         jQuery.each(navPagers, function(navPager) {
-            jQuery(navPagers[navPager]).attr("href", "javascript:lookupPaginationAjaxRequest('" + jQuery(navPagers[navPager]).attr("href") + "','link')");
+            jQuery(navPagers[navPager]).attr("href", "javascript:lookupPaginationAjaxRequest('" + encodeURI(jQuery(navPagers[navPager]).attr("href")) + "','link')");
         });
 
         var navPagersSelect = jQuery("#" + lookupDiv + " .nav-pager select");

Modified: ofbiz/branches/jackrabbit20100709/framework/images/webapp/images/jquery/plugins/validate/additional-methods.js
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/framework/images/webapp/images/jquery/plugins/validate/additional-methods.js?rev=1173274&r1=1173273&r2=1173274&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/framework/images/webapp/images/jquery/plugins/validate/additional-methods.js (original)
+++ ofbiz/branches/jackrabbit20100709/framework/images/webapp/images/jquery/plugins/validate/additional-methods.js Tue Sep 20 17:46:13 2011
@@ -1,5 +1,5 @@
 /**
- * jQuery Validation Plugin 1.8.0
+ * jQuery Validation Plugin 1.8.1
  *
  * http://bassistance.de/jquery-plugins/jquery-plugin-validation/
  * http://docs.jquery.com/Plugins/Validation

Modified: ofbiz/branches/jackrabbit20100709/framework/images/webapp/images/jquery/plugins/validate/additional-methods.min.js
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/framework/images/webapp/images/jquery/plugins/validate/additional-methods.min.js?rev=1173274&r1=1173273&r2=1173274&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/framework/images/webapp/images/jquery/plugins/validate/additional-methods.min.js (original)
+++ ofbiz/branches/jackrabbit20100709/framework/images/webapp/images/jquery/plugins/validate/additional-methods.min.js Tue Sep 20 17:46:13 2011
@@ -1,5 +1,5 @@
 /**
- * jQuery Validation Plugin 1.8.0
+ * jQuery Validation Plugin 1.8.1
  *
  * http://bassistance.de/jquery-plugins/jquery-plugin-validation/
  * http://docs.jquery.com/Plugins/Validation

Modified: ofbiz/branches/jackrabbit20100709/framework/images/webapp/images/jquery/plugins/validate/changelog.txt
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/framework/images/webapp/images/jquery/plugins/validate/changelog.txt?rev=1173274&r1=1173273&r2=1173274&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/framework/images/webapp/images/jquery/plugins/validate/changelog.txt (original)
+++ ofbiz/branches/jackrabbit20100709/framework/images/webapp/images/jquery/plugins/validate/changelog.txt Tue Sep 20 17:46:13 2011
@@ -1,3 +1,22 @@
+1.9.0
+---
+* Added Thai (TH) localization, fixes #85
+* Added Vietnamese (VI) localization, thanks Ngoc
+* Fixed issue #78. Error/Valid styling applies to all radio buttons of same group for required validation.
+* Don't use form.elements as that isn't supported in jQuery 1.6 anymore. Its buggy as hell anyway (IE6-8: form.elements === form).
+
+1.8.0
+---
+* Improved NL localization (http://plugins.jquery.com/node/14120)
+* Added Georgian (GE) localization, thanks Avtandil Kikabidze
+* Added Serbian (SR) localization, thanks Aleksandar Milovac
+* Added ipv4 and ipv6 to additional methods, thanks Natal Ngétal
+* Added Japanese (JA) localization, thanks Bryan Meyerovich
+* Added Catalan (CA) localization, thanks Xavier de Pedro
+* Fixed missing var statements within for-in loops
+* Fix for remote validation, where a formatted message got messed up (https://github.com/jzaefferer/jquery-validation/issues/11)
+* Bugfixes for compability with jQuery 1.5.1, while maintaining backwards-compability
+
 1.7
 ---
 * Added Lithuanian (LT) localization

Modified: ofbiz/branches/jackrabbit20100709/framework/images/webapp/images/jquery/plugins/validate/jquery.validate.js
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/framework/images/webapp/images/jquery/plugins/validate/jquery.validate.js?rev=1173274&r1=1173273&r2=1173274&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/framework/images/webapp/images/jquery/plugins/validate/jquery.validate.js (original)
+++ ofbiz/branches/jackrabbit20100709/framework/images/webapp/images/jquery/plugins/validate/jquery.validate.js Tue Sep 20 17:46:13 2011
@@ -1,5 +1,5 @@
 /**
- * jQuery Validation Plugin 1.8.0
+ * jQuery Validation Plugin 1.8.1
  *
  * http://bassistance.de/jquery-plugins/jquery-plugin-validation/
  * http://docs.jquery.com/Plugins/Validation
@@ -238,11 +238,19 @@ $.extend($.validator, {
 			else if (element.parentNode.name in this.submitted)
 				this.element(element.parentNode);
 		},
-		highlight: function( element, errorClass, validClass ) {
-			$(element).addClass(errorClass).removeClass(validClass);
+		highlight: function(element, errorClass, validClass) {
+			if (element.type === 'radio') {
+				this.findByName(element.name).addClass(errorClass).removeClass(validClass);
+			} else {
+				$(element).addClass(errorClass).removeClass(validClass);
+			}
 		},
-		unhighlight: function( element, errorClass, validClass ) {
-			$(element).removeClass(errorClass).addClass(validClass);
+		unhighlight: function(element, errorClass, validClass) {
+			if (element.type === 'radio') {
+				this.findByName(element.name).removeClass(errorClass).addClass(validClass);
+			} else {
+				$(element).removeClass(errorClass).addClass(validClass);
+			}
 		}
 	},
 
@@ -430,9 +438,8 @@ $.extend($.validator, {
 				rulesCache = {};
 
 			// select all valid inputs inside the form (no submit or reset buttons)
-			// workaround $Query([]).add until http://dev.jquery.com/ticket/2114 is solved
-			return $([]).add(this.currentForm.elements)
-			.filter(":input")
+			return $(this.currentForm)
+			.find("input, select, textarea")
 			.not(":submit, :reset, :image, [disabled]")
 			.not( this.settings.ignore )
 			.filter(function() {

Modified: ofbiz/branches/jackrabbit20100709/framework/images/webapp/images/jquery/plugins/validate/jquery.validate.min.js
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/framework/images/webapp/images/jquery/plugins/validate/jquery.validate.min.js?rev=1173274&r1=1173273&r2=1173274&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/framework/images/webapp/images/jquery/plugins/validate/jquery.validate.min.js (original)
+++ ofbiz/branches/jackrabbit20100709/framework/images/webapp/images/jquery/plugins/validate/jquery.validate.min.js Tue Sep 20 17:46:13 2011
@@ -1,5 +1,5 @@
 /**
- * jQuery Validation Plugin 1.8.0
+ * jQuery Validation Plugin 1.8.1
  *
  * http://bassistance.de/jquery-plugins/jquery-plugin-validation/
  * http://docs.jquery.com/Plugins/Validation
@@ -16,32 +16,33 @@ else{var a=true,b=c(this[0].form).valida
 return g}var h={};c.each(b.split(/\s/),function(j,i){h[i]=g[i];delete g[i]});return h}}d=c.validator.normalizeRules(c.extend({},c.validator.metadataRules(d),c.validator.classRules(d),c.validator.attributeRules(d),c.validator.staticRules(d)),d);if(d.required){e=d.required;delete d.required;d=c.extend({required:e},d)}return d}});c.extend(c.expr[":"],{blank:function(a){return!c.trim(""+a.value)},filled:function(a){return!!c.trim(""+a.value)},unchecked:function(a){return!a.checked}});c.validator=function(a,
 b){this.settings=c.extend(true,{},c.validator.defaults,a);this.currentForm=b;this.init()};c.validator.format=function(a,b){if(arguments.length==1)return function(){var d=c.makeArray(arguments);d.unshift(a);return c.validator.format.apply(this,d)};if(arguments.length>2&&b.constructor!=Array)b=c.makeArray(arguments).slice(1);if(b.constructor!=Array)b=[b];c.each(b,function(d,e){a=a.replace(RegExp("\\{"+d+"\\}","g"),e)});return a};c.extend(c.validator,{defaults:{messages:{},groups:{},rules:{},errorClass:"error",
 validClass:"valid",errorElement:"label",focusInvalid:true,errorContainer:c([]),errorLabelContainer:c([]),onsubmit:true,ignore:[],ignoreTitle:false,onfocusin:function(a){this.lastActive=a;if(this.settings.focusCleanup&&!this.blockFocusCleanup){this.settings.unhighlight&&this.settings.unhighlight.call(this,a,this.settings.errorClass,this.settings.validClass);this.addWrapper(this.errorsFor(a)).hide()}},onfocusout:function(a){if(!this.checkable(a)&&(a.name in this.submitted||!this.optional(a)))this.element(a)},
-onkeyup:function(a){if(a.name in this.submitted||a==this.lastElement)this.element(a)},onclick:function(a){if(a.name in this.submitted)this.element(a);else a.parentNode.name in this.submitted&&this.element(a.parentNode)},highlight:function(a,b,d){c(a).addClass(b).removeClass(d)},unhighlight:function(a,b,d){c(a).removeClass(b).addClass(d)}},setDefaults:function(a){c.extend(c.validator.defaults,a)},messages:{required:"This field is required.",remote:"Please fix this field.",email:"Please enter a valid email address.",
-url:"Please enter a valid URL.",date:"Please enter a valid date.",dateISO:"Please enter a valid date (ISO).",number:"Please enter a valid number.",digits:"Please enter only digits.",creditcard:"Please enter a valid credit card number.",equalTo:"Please enter the same value again.",accept:"Please enter a value with a valid extension.",maxlength:c.validator.format("Please enter no more than {0} characters."),minlength:c.validator.format("Please enter at least {0} characters."),rangelength:c.validator.format("Please enter a value between {0} and {1} characters long."),
-range:c.validator.format("Please enter a value between {0} and {1}."),max:c.validator.format("Please enter a value less than or equal to {0}."),min:c.validator.format("Please enter a value greater than or equal to {0}.")},autoCreateRanges:false,prototype:{init:function(){function a(e){var f=c.data(this[0].form,"validator");e="on"+e.type.replace(/^validate/,"");f.settings[e]&&f.settings[e].call(f,this[0])}this.labelContainer=c(this.settings.errorLabelContainer);this.errorContext=this.labelContainer.length&&
-this.labelContainer||c(this.currentForm);this.containers=c(this.settings.errorContainer).add(this.settings.errorLabelContainer);this.submitted={};this.valueCache={};this.pendingRequest=0;this.pending={};this.invalid={};this.reset();var b=this.groups={};c.each(this.settings.groups,function(e,f){c.each(f.split(/\s/),function(g,h){b[h]=e})});var d=this.settings.rules;c.each(d,function(e,f){d[e]=c.validator.normalizeRule(f)});c(this.currentForm).validateDelegate(":text, :password, :file, select, textarea",
-"focusin focusout keyup",a).validateDelegate(":radio, :checkbox, select, option","click",a);this.settings.invalidHandler&&c(this.currentForm).bind("invalid-form.validate",this.settings.invalidHandler)},form:function(){this.checkForm();c.extend(this.submitted,this.errorMap);this.invalid=c.extend({},this.errorMap);this.valid()||c(this.currentForm).triggerHandler("invalid-form",[this]);this.showErrors();return this.valid()},checkForm:function(){this.prepareForm();for(var a=0,b=this.currentElements=this.elements();b[a];a++)this.check(b[a]);
-return this.valid()},element:function(a){this.lastElement=a=this.clean(a);this.prepareElement(a);this.currentElements=c(a);var b=this.check(a);if(b)delete this.invalid[a.name];else this.invalid[a.name]=true;if(!this.numberOfInvalids())this.toHide=this.toHide.add(this.containers);this.showErrors();return b},showErrors:function(a){if(a){c.extend(this.errorMap,a);this.errorList=[];for(var b in a)this.errorList.push({message:a[b],element:this.findByName(b)[0]});this.successList=c.grep(this.successList,
-function(d){return!(d.name in a)})}this.settings.showErrors?this.settings.showErrors.call(this,this.errorMap,this.errorList):this.defaultShowErrors()},resetForm:function(){c.fn.resetForm&&c(this.currentForm).resetForm();this.submitted={};this.prepareForm();this.hideErrors();this.elements().removeClass(this.settings.errorClass)},numberOfInvalids:function(){return this.objectLength(this.invalid)},objectLength:function(a){var b=0,d;for(d in a)b++;return b},hideErrors:function(){this.addWrapper(this.toHide).hide()},
-valid:function(){return this.size()==0},size:function(){return this.errorList.length},focusInvalid:function(){if(this.settings.focusInvalid)try{c(this.findLastActive()||this.errorList.length&&this.errorList[0].element||[]).filter(":visible").focus().trigger("focusin")}catch(a){}},findLastActive:function(){var a=this.lastActive;return a&&c.grep(this.errorList,function(b){return b.element.name==a.name}).length==1&&a},elements:function(){var a=this,b={};return c([]).add(this.currentForm.elements).filter(":input").not(":submit, :reset, :image, [disabled]").not(this.settings.ignore).filter(function(){!this.name&&
-a.settings.debug&&window.console&&console.error("%o has no name assigned",this);if(this.name in b||!a.objectLength(c(this).rules()))return false;return b[this.name]=true})},clean:function(a){return c(a)[0]},errors:function(){return c(this.settings.errorElement+"."+this.settings.errorClass,this.errorContext)},reset:function(){this.successList=[];this.errorList=[];this.errorMap={};this.toShow=c([]);this.toHide=c([]);this.currentElements=c([])},prepareForm:function(){this.reset();this.toHide=this.errors().add(this.containers)},
-prepareElement:function(a){this.reset();this.toHide=this.errorsFor(a)},check:function(a){a=this.clean(a);if(this.checkable(a))a=this.findByName(a.name).not(this.settings.ignore)[0];var b=c(a).rules(),d=false,e;for(e in b){var f={method:e,parameters:b[e]};try{var g=c.validator.methods[e].call(this,a.value.replace(/\r/g,""),a,f.parameters);if(g=="dependency-mismatch")d=true;else{d=false;if(g=="pending"){this.toHide=this.toHide.not(this.errorsFor(a));return}if(!g){this.formatAndAdd(a,f);return false}}}catch(h){this.settings.debug&&
-window.console&&console.log("exception occured when checking element "+a.id+", check the '"+f.method+"' method",h);throw h;}}if(!d){this.objectLength(b)&&this.successList.push(a);return true}},customMetaMessage:function(a,b){if(c.metadata){var d=this.settings.meta?c(a).metadata()[this.settings.meta]:c(a).metadata();return d&&d.messages&&d.messages[b]}},customMessage:function(a,b){var d=this.settings.messages[a];return d&&(d.constructor==String?d:d[b])},findDefined:function(){for(var a=0;a<arguments.length;a++)if(arguments[a]!==
-undefined)return arguments[a]},defaultMessage:function(a,b){return this.findDefined(this.customMessage(a.name,b),this.customMetaMessage(a,b),!this.settings.ignoreTitle&&a.title||undefined,c.validator.messages[b],"<strong>Warning: No message defined for "+a.name+"</strong>")},formatAndAdd:function(a,b){var d=this.defaultMessage(a,b.method),e=/\$?\{(\d+)\}/g;if(typeof d=="function")d=d.call(this,b.parameters,a);else if(e.test(d))d=jQuery.format(d.replace(e,"{$1}"),b.parameters);this.errorList.push({message:d,
-element:a});this.errorMap[a.name]=d;this.submitted[a.name]=d},addWrapper:function(a){if(this.settings.wrapper)a=a.add(a.parent(this.settings.wrapper));return a},defaultShowErrors:function(){for(var a=0;this.errorList[a];a++){var b=this.errorList[a];this.settings.highlight&&this.settings.highlight.call(this,b.element,this.settings.errorClass,this.settings.validClass);this.showLabel(b.element,b.message)}if(this.errorList.length)this.toShow=this.toShow.add(this.containers);if(this.settings.success)for(a=
-0;this.successList[a];a++)this.showLabel(this.successList[a]);if(this.settings.unhighlight){a=0;for(b=this.validElements();b[a];a++)this.settings.unhighlight.call(this,b[a],this.settings.errorClass,this.settings.validClass)}this.toHide=this.toHide.not(this.toShow);this.hideErrors();this.addWrapper(this.toShow).show()},validElements:function(){return this.currentElements.not(this.invalidElements())},invalidElements:function(){return c(this.errorList).map(function(){return this.element})},showLabel:function(a,
-b){var d=this.errorsFor(a);if(d.length){d.removeClass().addClass(this.settings.errorClass);d.attr("generated")&&d.html(b)}else{d=c("<"+this.settings.errorElement+"/>").attr({"for":this.idOrName(a),generated:true}).addClass(this.settings.errorClass).html(b||"");if(this.settings.wrapper)d=d.hide().show().wrap("<"+this.settings.wrapper+"/>").parent();this.labelContainer.append(d).length||(this.settings.errorPlacement?this.settings.errorPlacement(d,c(a)):d.insertAfter(a))}if(!b&&this.settings.success){d.text("");
-typeof this.settings.success=="string"?d.addClass(this.settings.success):this.settings.success(d)}this.toShow=this.toShow.add(d)},errorsFor:function(a){var b=this.idOrName(a);return this.errors().filter(function(){return c(this).attr("for")==b})},idOrName:function(a){return this.groups[a.name]||(this.checkable(a)?a.name:a.id||a.name)},checkable:function(a){return/radio|checkbox/i.test(a.type)},findByName:function(a){var b=this.currentForm;return c(document.getElementsByName(a)).map(function(d,e){return e.form==
-b&&e.name==a&&e||null})},getLength:function(a,b){switch(b.nodeName.toLowerCase()){case "select":return c("option:selected",b).length;case "input":if(this.checkable(b))return this.findByName(b.name).filter(":checked").length}return a.length},depend:function(a,b){return this.dependTypes[typeof a]?this.dependTypes[typeof a](a,b):true},dependTypes:{"boolean":function(a){return a},string:function(a,b){return!!c(a,b.form).length},"function":function(a,b){return a(b)}},optional:function(a){return!c.validator.methods.required.call(this,
-c.trim(a.value),a)&&"dependency-mismatch"},startRequest:function(a){if(!this.pending[a.name]){this.pendingRequest++;this.pending[a.name]=true}},stopRequest:function(a,b){this.pendingRequest--;if(this.pendingRequest<0)this.pendingRequest=0;delete this.pending[a.name];if(b&&this.pendingRequest==0&&this.formSubmitted&&this.form()){c(this.currentForm).submit();this.formSubmitted=false}else if(!b&&this.pendingRequest==0&&this.formSubmitted){c(this.currentForm).triggerHandler("invalid-form",[this]);this.formSubmitted=
-false}},previousValue:function(a){return c.data(a,"previousValue")||c.data(a,"previousValue",{old:null,valid:true,message:this.defaultMessage(a,"remote")})}},classRuleSettings:{required:{required:true},email:{email:true},url:{url:true},date:{date:true},dateISO:{dateISO:true},dateDE:{dateDE:true},number:{number:true},numberDE:{numberDE:true},digits:{digits:true},creditcard:{creditcard:true}},addClassRules:function(a,b){a.constructor==String?this.classRuleSettings[a]=b:c.extend(this.classRuleSettings,
-a)},classRules:function(a){var b={};(a=c(a).attr("class"))&&c.each(a.split(" "),function(){this in c.validator.classRuleSettings&&c.extend(b,c.validator.classRuleSettings[this])});return b},attributeRules:function(a){var b={};a=c(a);for(var d in c.validator.methods){var e=a.attr(d);if(e)b[d]=e}b.maxlength&&/-1|2147483647|524288/.test(b.maxlength)&&delete b.maxlength;return b},metadataRules:function(a){if(!c.metadata)return{};var b=c.data(a.form,"validator").settings.meta;return b?c(a).metadata()[b]:
-c(a).metadata()},staticRules:function(a){var b={},d=c.data(a.form,"validator");if(d.settings.rules)b=c.validator.normalizeRule(d.settings.rules[a.name])||{};return b},normalizeRules:function(a,b){c.each(a,function(d,e){if(e===false)delete a[d];else if(e.param||e.depends){var f=true;switch(typeof e.depends){case "string":f=!!c(e.depends,b.form).length;break;case "function":f=e.depends.call(b,b)}if(f)a[d]=e.param!==undefined?e.param:true;else delete a[d]}});c.each(a,function(d,e){a[d]=c.isFunction(e)?
-e(b):e});c.each(["minlength","maxlength","min","max"],function(){if(a[this])a[this]=Number(a[this])});c.each(["rangelength","range"],function(){if(a[this])a[this]=[Number(a[this][0]),Number(a[this][1])]});if(c.validator.autoCreateRanges){if(a.min&&a.max){a.range=[a.min,a.max];delete a.min;delete a.max}if(a.minlength&&a.maxlength){a.rangelength=[a.minlength,a.maxlength];delete a.minlength;delete a.maxlength}}a.messages&&delete a.messages;return a},normalizeRule:function(a){if(typeof a=="string"){var b=
-{};c.each(a.split(/\s/),function(){b[this]=true});a=b}return a},addMethod:function(a,b,d){c.validator.methods[a]=b;c.validator.messages[a]=d!=undefined?d:c.validator.messages[a];b.length<3&&c.validator.addClassRules(a,c.validator.normalizeRule(a))},methods:{required:function(a,b,d){if(!this.depend(d,b))return"dependency-mismatch";switch(b.nodeName.toLowerCase()){case "select":return(a=c(b).val())&&a.length>0;case "input":if(this.checkable(b))return this.getLength(a,b)>0;default:return c.trim(a).length>
-0}},remote:function(a,b,d){if(this.optional(b))return"dependency-mismatch";var e=this.previousValue(b);this.settings.messages[b.name]||(this.settings.messages[b.name]={});e.originalMessage=this.settings.messages[b.name].remote;this.settings.messages[b.name].remote=e.message;d=typeof d=="string"&&{url:d}||d;if(this.pending[b.name])return"pending";if(e.old===a)return e.valid;e.old=a;var f=this;this.startRequest(b);var g={};g[b.name]=a;c.ajax(c.extend(true,{url:d,mode:"abort",port:"validate"+b.name,
-dataType:"json",data:g,success:function(h){f.settings.messages[b.name].remote=e.originalMessage;var j=h===true;if(j){var i=f.formSubmitted;f.prepareElement(b);f.formSubmitted=i;f.successList.push(b);f.showErrors()}else{i={};h=h||f.defaultMessage(b,"remote");i[b.name]=e.message=c.isFunction(h)?h(a):h;f.showErrors(i)}e.valid=j;f.stopRequest(b,j)}},d));return"pending"},minlength:function(a,b,d){return this.optional(b)||this.getLength(c.trim(a),b)>=d},maxlength:function(a,b,d){return this.optional(b)||
-this.getLength(c.trim(a),b)<=d},rangelength:function(a,b,d){a=this.getLength(c.trim(a),b);return this.optional(b)||a>=d[0]&&a<=d[1]},min:function(a,b,d){return this.optional(b)||a>=d},max:function(a,b,d){return this.optional(b)||a<=d},range:function(a,b,d){return this.optional(b)||a>=d[0]&&a<=d[1]},email:function(a,b){return this.optional(b)||/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u0
 0A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?$/i.test(a)},
+onkeyup:function(a){if(a.name in this.submitted||a==this.lastElement)this.element(a)},onclick:function(a){if(a.name in this.submitted)this.element(a);else a.parentNode.name in this.submitted&&this.element(a.parentNode)},highlight:function(a,b,d){a.type==="radio"?this.findByName(a.name).addClass(b).removeClass(d):c(a).addClass(b).removeClass(d)},unhighlight:function(a,b,d){a.type==="radio"?this.findByName(a.name).removeClass(b).addClass(d):c(a).removeClass(b).addClass(d)}},setDefaults:function(a){c.extend(c.validator.defaults,
+a)},messages:{required:"This field is required.",remote:"Please fix this field.",email:"Please enter a valid email address.",url:"Please enter a valid URL.",date:"Please enter a valid date.",dateISO:"Please enter a valid date (ISO).",number:"Please enter a valid number.",digits:"Please enter only digits.",creditcard:"Please enter a valid credit card number.",equalTo:"Please enter the same value again.",accept:"Please enter a value with a valid extension.",maxlength:c.validator.format("Please enter no more than {0} characters."),
+minlength:c.validator.format("Please enter at least {0} characters."),rangelength:c.validator.format("Please enter a value between {0} and {1} characters long."),range:c.validator.format("Please enter a value between {0} and {1}."),max:c.validator.format("Please enter a value less than or equal to {0}."),min:c.validator.format("Please enter a value greater than or equal to {0}.")},autoCreateRanges:false,prototype:{init:function(){function a(e){var f=c.data(this[0].form,"validator");e="on"+e.type.replace(/^validate/,
+"");f.settings[e]&&f.settings[e].call(f,this[0])}this.labelContainer=c(this.settings.errorLabelContainer);this.errorContext=this.labelContainer.length&&this.labelContainer||c(this.currentForm);this.containers=c(this.settings.errorContainer).add(this.settings.errorLabelContainer);this.submitted={};this.valueCache={};this.pendingRequest=0;this.pending={};this.invalid={};this.reset();var b=this.groups={};c.each(this.settings.groups,function(e,f){c.each(f.split(/\s/),function(g,h){b[h]=e})});var d=this.settings.rules;
+c.each(d,function(e,f){d[e]=c.validator.normalizeRule(f)});c(this.currentForm).validateDelegate(":text, :password, :file, select, textarea","focusin focusout keyup",a).validateDelegate(":radio, :checkbox, select, option","click",a);this.settings.invalidHandler&&c(this.currentForm).bind("invalid-form.validate",this.settings.invalidHandler)},form:function(){this.checkForm();c.extend(this.submitted,this.errorMap);this.invalid=c.extend({},this.errorMap);this.valid()||c(this.currentForm).triggerHandler("invalid-form",
+[this]);this.showErrors();return this.valid()},checkForm:function(){this.prepareForm();for(var a=0,b=this.currentElements=this.elements();b[a];a++)this.check(b[a]);return this.valid()},element:function(a){this.lastElement=a=this.clean(a);this.prepareElement(a);this.currentElements=c(a);var b=this.check(a);if(b)delete this.invalid[a.name];else this.invalid[a.name]=true;if(!this.numberOfInvalids())this.toHide=this.toHide.add(this.containers);this.showErrors();return b},showErrors:function(a){if(a){c.extend(this.errorMap,
+a);this.errorList=[];for(var b in a)this.errorList.push({message:a[b],element:this.findByName(b)[0]});this.successList=c.grep(this.successList,function(d){return!(d.name in a)})}this.settings.showErrors?this.settings.showErrors.call(this,this.errorMap,this.errorList):this.defaultShowErrors()},resetForm:function(){c.fn.resetForm&&c(this.currentForm).resetForm();this.submitted={};this.prepareForm();this.hideErrors();this.elements().removeClass(this.settings.errorClass)},numberOfInvalids:function(){return this.objectLength(this.invalid)},
+objectLength:function(a){var b=0,d;for(d in a)b++;return b},hideErrors:function(){this.addWrapper(this.toHide).hide()},valid:function(){return this.size()==0},size:function(){return this.errorList.length},focusInvalid:function(){if(this.settings.focusInvalid)try{c(this.findLastActive()||this.errorList.length&&this.errorList[0].element||[]).filter(":visible").focus().trigger("focusin")}catch(a){}},findLastActive:function(){var a=this.lastActive;return a&&c.grep(this.errorList,function(b){return b.element.name==
+a.name}).length==1&&a},elements:function(){var a=this,b={};return c(this.currentForm).find("input, select, textarea").not(":submit, :reset, :image, [disabled]").not(this.settings.ignore).filter(function(){!this.name&&a.settings.debug&&window.console&&console.error("%o has no name assigned",this);if(this.name in b||!a.objectLength(c(this).rules()))return false;return b[this.name]=true})},clean:function(a){return c(a)[0]},errors:function(){return c(this.settings.errorElement+"."+this.settings.errorClass,
+this.errorContext)},reset:function(){this.successList=[];this.errorList=[];this.errorMap={};this.toShow=c([]);this.toHide=c([]);this.currentElements=c([])},prepareForm:function(){this.reset();this.toHide=this.errors().add(this.containers)},prepareElement:function(a){this.reset();this.toHide=this.errorsFor(a)},check:function(a){a=this.clean(a);if(this.checkable(a))a=this.findByName(a.name).not(this.settings.ignore)[0];var b=c(a).rules(),d=false,e;for(e in b){var f={method:e,parameters:b[e]};try{var g=
+c.validator.methods[e].call(this,a.value.replace(/\r/g,""),a,f.parameters);if(g=="dependency-mismatch")d=true;else{d=false;if(g=="pending"){this.toHide=this.toHide.not(this.errorsFor(a));return}if(!g){this.formatAndAdd(a,f);return false}}}catch(h){this.settings.debug&&window.console&&console.log("exception occured when checking element "+a.id+", check the '"+f.method+"' method",h);throw h;}}if(!d){this.objectLength(b)&&this.successList.push(a);return true}},customMetaMessage:function(a,b){if(c.metadata){var d=
+this.settings.meta?c(a).metadata()[this.settings.meta]:c(a).metadata();return d&&d.messages&&d.messages[b]}},customMessage:function(a,b){var d=this.settings.messages[a];return d&&(d.constructor==String?d:d[b])},findDefined:function(){for(var a=0;a<arguments.length;a++)if(arguments[a]!==undefined)return arguments[a]},defaultMessage:function(a,b){return this.findDefined(this.customMessage(a.name,b),this.customMetaMessage(a,b),!this.settings.ignoreTitle&&a.title||undefined,c.validator.messages[b],"<strong>Warning: No message defined for "+
+a.name+"</strong>")},formatAndAdd:function(a,b){var d=this.defaultMessage(a,b.method),e=/\$?\{(\d+)\}/g;if(typeof d=="function")d=d.call(this,b.parameters,a);else if(e.test(d))d=jQuery.format(d.replace(e,"{$1}"),b.parameters);this.errorList.push({message:d,element:a});this.errorMap[a.name]=d;this.submitted[a.name]=d},addWrapper:function(a){if(this.settings.wrapper)a=a.add(a.parent(this.settings.wrapper));return a},defaultShowErrors:function(){for(var a=0;this.errorList[a];a++){var b=this.errorList[a];
+this.settings.highlight&&this.settings.highlight.call(this,b.element,this.settings.errorClass,this.settings.validClass);this.showLabel(b.element,b.message)}if(this.errorList.length)this.toShow=this.toShow.add(this.containers);if(this.settings.success)for(a=0;this.successList[a];a++)this.showLabel(this.successList[a]);if(this.settings.unhighlight){a=0;for(b=this.validElements();b[a];a++)this.settings.unhighlight.call(this,b[a],this.settings.errorClass,this.settings.validClass)}this.toHide=this.toHide.not(this.toShow);
+this.hideErrors();this.addWrapper(this.toShow).show()},validElements:function(){return this.currentElements.not(this.invalidElements())},invalidElements:function(){return c(this.errorList).map(function(){return this.element})},showLabel:function(a,b){var d=this.errorsFor(a);if(d.length){d.removeClass().addClass(this.settings.errorClass);d.attr("generated")&&d.html(b)}else{d=c("<"+this.settings.errorElement+"/>").attr({"for":this.idOrName(a),generated:true}).addClass(this.settings.errorClass).html(b||
+"");if(this.settings.wrapper)d=d.hide().show().wrap("<"+this.settings.wrapper+"/>").parent();this.labelContainer.append(d).length||(this.settings.errorPlacement?this.settings.errorPlacement(d,c(a)):d.insertAfter(a))}if(!b&&this.settings.success){d.text("");typeof this.settings.success=="string"?d.addClass(this.settings.success):this.settings.success(d)}this.toShow=this.toShow.add(d)},errorsFor:function(a){var b=this.idOrName(a);return this.errors().filter(function(){return c(this).attr("for")==b})},
+idOrName:function(a){return this.groups[a.name]||(this.checkable(a)?a.name:a.id||a.name)},checkable:function(a){return/radio|checkbox/i.test(a.type)},findByName:function(a){var b=this.currentForm;return c(document.getElementsByName(a)).map(function(d,e){return e.form==b&&e.name==a&&e||null})},getLength:function(a,b){switch(b.nodeName.toLowerCase()){case "select":return c("option:selected",b).length;case "input":if(this.checkable(b))return this.findByName(b.name).filter(":checked").length}return a.length},
+depend:function(a,b){return this.dependTypes[typeof a]?this.dependTypes[typeof a](a,b):true},dependTypes:{"boolean":function(a){return a},string:function(a,b){return!!c(a,b.form).length},"function":function(a,b){return a(b)}},optional:function(a){return!c.validator.methods.required.call(this,c.trim(a.value),a)&&"dependency-mismatch"},startRequest:function(a){if(!this.pending[a.name]){this.pendingRequest++;this.pending[a.name]=true}},stopRequest:function(a,b){this.pendingRequest--;if(this.pendingRequest<
+0)this.pendingRequest=0;delete this.pending[a.name];if(b&&this.pendingRequest==0&&this.formSubmitted&&this.form()){c(this.currentForm).submit();this.formSubmitted=false}else if(!b&&this.pendingRequest==0&&this.formSubmitted){c(this.currentForm).triggerHandler("invalid-form",[this]);this.formSubmitted=false}},previousValue:function(a){return c.data(a,"previousValue")||c.data(a,"previousValue",{old:null,valid:true,message:this.defaultMessage(a,"remote")})}},classRuleSettings:{required:{required:true},
+email:{email:true},url:{url:true},date:{date:true},dateISO:{dateISO:true},dateDE:{dateDE:true},number:{number:true},numberDE:{numberDE:true},digits:{digits:true},creditcard:{creditcard:true}},addClassRules:function(a,b){a.constructor==String?this.classRuleSettings[a]=b:c.extend(this.classRuleSettings,a)},classRules:function(a){var b={};(a=c(a).attr("class"))&&c.each(a.split(" "),function(){this in c.validator.classRuleSettings&&c.extend(b,c.validator.classRuleSettings[this])});return b},attributeRules:function(a){var b=
+{};a=c(a);for(var d in c.validator.methods){var e=a.attr(d);if(e)b[d]=e}b.maxlength&&/-1|2147483647|524288/.test(b.maxlength)&&delete b.maxlength;return b},metadataRules:function(a){if(!c.metadata)return{};var b=c.data(a.form,"validator").settings.meta;return b?c(a).metadata()[b]:c(a).metadata()},staticRules:function(a){var b={},d=c.data(a.form,"validator");if(d.settings.rules)b=c.validator.normalizeRule(d.settings.rules[a.name])||{};return b},normalizeRules:function(a,b){c.each(a,function(d,e){if(e===
+false)delete a[d];else if(e.param||e.depends){var f=true;switch(typeof e.depends){case "string":f=!!c(e.depends,b.form).length;break;case "function":f=e.depends.call(b,b)}if(f)a[d]=e.param!==undefined?e.param:true;else delete a[d]}});c.each(a,function(d,e){a[d]=c.isFunction(e)?e(b):e});c.each(["minlength","maxlength","min","max"],function(){if(a[this])a[this]=Number(a[this])});c.each(["rangelength","range"],function(){if(a[this])a[this]=[Number(a[this][0]),Number(a[this][1])]});if(c.validator.autoCreateRanges){if(a.min&&
+a.max){a.range=[a.min,a.max];delete a.min;delete a.max}if(a.minlength&&a.maxlength){a.rangelength=[a.minlength,a.maxlength];delete a.minlength;delete a.maxlength}}a.messages&&delete a.messages;return a},normalizeRule:function(a){if(typeof a=="string"){var b={};c.each(a.split(/\s/),function(){b[this]=true});a=b}return a},addMethod:function(a,b,d){c.validator.methods[a]=b;c.validator.messages[a]=d!=undefined?d:c.validator.messages[a];b.length<3&&c.validator.addClassRules(a,c.validator.normalizeRule(a))},
+methods:{required:function(a,b,d){if(!this.depend(d,b))return"dependency-mismatch";switch(b.nodeName.toLowerCase()){case "select":return(a=c(b).val())&&a.length>0;case "input":if(this.checkable(b))return this.getLength(a,b)>0;default:return c.trim(a).length>0}},remote:function(a,b,d){if(this.optional(b))return"dependency-mismatch";var e=this.previousValue(b);this.settings.messages[b.name]||(this.settings.messages[b.name]={});e.originalMessage=this.settings.messages[b.name].remote;this.settings.messages[b.name].remote=
+e.message;d=typeof d=="string"&&{url:d}||d;if(this.pending[b.name])return"pending";if(e.old===a)return e.valid;e.old=a;var f=this;this.startRequest(b);var g={};g[b.name]=a;c.ajax(c.extend(true,{url:d,mode:"abort",port:"validate"+b.name,dataType:"json",data:g,success:function(h){f.settings.messages[b.name].remote=e.originalMessage;var j=h===true;if(j){var i=f.formSubmitted;f.prepareElement(b);f.formSubmitted=i;f.successList.push(b);f.showErrors()}else{i={};h=h||f.defaultMessage(b,"remote");i[b.name]=
+e.message=c.isFunction(h)?h(a):h;f.showErrors(i)}e.valid=j;f.stopRequest(b,j)}},d));return"pending"},minlength:function(a,b,d){return this.optional(b)||this.getLength(c.trim(a),b)>=d},maxlength:function(a,b,d){return this.optional(b)||this.getLength(c.trim(a),b)<=d},rangelength:function(a,b,d){a=this.getLength(c.trim(a),b);return this.optional(b)||a>=d[0]&&a<=d[1]},min:function(a,b,d){return this.optional(b)||a>=d},max:function(a,b,d){return this.optional(b)||a<=d},range:function(a,b,d){return this.optional(b)||
+a>=d[0]&&a<=d[1]},email:function(a,b){return this.optional(b)||/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?$/i.test(a)},
 url:function(a,b){return this.optional(b)||/^(https?|ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?(
 (([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test(a)},
 date:function(a,b){return this.optional(b)||!/Invalid|NaN/.test(new Date(a))},dateISO:function(a,b){return this.optional(b)||/^\d{4}[\/-]\d{1,2}[\/-]\d{1,2}$/.test(a)},number:function(a,b){return this.optional(b)||/^-?(?:\d+|\d{1,3}(?:,\d{3})+)(?:\.\d+)?$/.test(a)},digits:function(a,b){return this.optional(b)||/^\d+$/.test(a)},creditcard:function(a,b){if(this.optional(b))return"dependency-mismatch";if(/[^0-9-]+/.test(a))return false;var d=0,e=0,f=false;a=a.replace(/\D/g,"");for(var g=a.length-1;g>=
 0;g--){e=a.charAt(g);e=parseInt(e,10);if(f)if((e*=2)>9)e-=9;d+=e;f=!f}return d%10==0},accept:function(a,b,d){d=typeof d=="string"?d.replace(/,/g,"|"):"png|jpe?g|gif";return this.optional(b)||a.match(RegExp(".("+d+")$","i"))},equalTo:function(a,b,d){d=c(d).unbind(".validate-equalTo").bind("blur.validate-equalTo",function(){c(b).valid()});return a==d.val()}}});c.format=c.validator.format})(jQuery);

Modified: ofbiz/branches/jackrabbit20100709/framework/images/webapp/images/jquery/plugins/validate/localization/messages_ja.js
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/framework/images/webapp/images/jquery/plugins/validate/localization/messages_ja.js?rev=1173274&r1=1173273&r2=1173274&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/framework/images/webapp/images/jquery/plugins/validate/localization/messages_ja.js (original)
+++ ofbiz/branches/jackrabbit20100709/framework/images/webapp/images/jquery/plugins/validate/localization/messages_ja.js Tue Sep 20 17:46:13 2011
@@ -1,6 +1,6 @@
 /*
  * Translated default messages for the jQuery validation plugin.
- * Language: JA
+ * Locale: JA (Japanese)
  */
 jQuery.extend(jQuery.validator.messages, {
   required: "このフィールドは必須です。",

Modified: ofbiz/branches/jackrabbit20100709/framework/images/webapp/images/jquery/plugins/validate/todo
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/framework/images/webapp/images/jquery/plugins/validate/todo?rev=1173274&r1=1173273&r2=1173274&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/framework/images/webapp/images/jquery/plugins/validate/todo (original)
+++ ofbiz/branches/jackrabbit20100709/framework/images/webapp/images/jquery/plugins/validate/todo Tue Sep 20 17:46:13 2011
@@ -1,172 +1,172 @@
-1.3
----
-
-- checkout datejs.com for a proper date implementation -> complete but very heavy parser, currently overkill
-
-- rewrite required-method to use jQuery's extended val() on selects[/radios/checkboxes]
-- consider a field-validator object that encapsulates a single element and all methods working on it
-- export API browser
-- add example/support for other URL schemes like svn://....
-- document min/max/range methods for checkboxes/selects
-
-/**
- * Return false, if the element is
- *
- * - some kind of text input and its value is too short
- *
- * - a set of checkboxes has not enough boxes checked
- *
- * - a select and has not enough options selected
- *
- * Works with all kind of text inputs, checkboxes and select.
- *
- * @example <input name="firstname" class="{minLength:5}" />
- * @desc Declares an optional input element with at least 5 characters (or none at all).
- *
- * @example <input name="firstname" class="{required:true,minLength:5}" />
- * @desc Declares an input element that must have at least 5 characters.
- *
- * @example <fieldset>
- * 	<legend>Spam</legend>
- * 	<label for="spam_email">
- * 		<input type="checkbox" id="spam_email" value="email" name="spam" validate="required:true,minLength:2" />
- * 		Spam via E-Mail
- * 	</label>
- * 	<label for="spam_phone">
- * 		<input type="checkbox" id="spam_phone" value="phone" name="spam" />
- * 		Spam via Phone
- * 	</label>
- * 	<label for="spam_mail">
- * 		<input type="checkbox" id="spam_mail" value="mail" name="spam" />
- * 		Spam via Mail
- * 	</label>
- * 	<label for="spam" class="error">Please select at least two types of spam.</label>
- * </fieldset>
- * @desc Specifies a group of checkboxes. To validate, at least two checkboxes must be selected.
- *
- * @param Number min
- * @name jQuery.validator.methods.minLength
- * @type Boolean
- * @cat Plugins/Validate/Methods
- */
- 
- /**
- * Return false, if the element is
- *
- * - some kind of text input and its value is too short or too long
- *
- * - a set of checkboxes has not enough or too many boxes checked
- *
- * - a select and has not enough or too many options selected
- *
- * Works with all kind of text inputs, checkboxes and selects.
- *
- * @example <input name="firstname" class="{rangeLength:[3,5]}" />
- * @desc Declares an optional input element with at least 3 and at most 5 characters (or none at all).
- *
- * @example <input name="firstname" class="{required:true,rangeLength:[3,5]}" />
- * @desc Declares an input element that must have at least 3 and at most 5 characters.
- *
- * @example <select id="cars" class="{required:true,rangeLength:[2,3]}" multiple="multiple">
- * 	<option value="m_sl">Mercedes SL</option>
- * 	<option value="o_c">Opel Corsa</option>
- * 	<option value="vw_p">VW Polo</option>
- * 	<option value="t_s">Titanic Skoda</option>
- * </select>
- * @desc Specifies a select that must have at least two but no more than three options selected.
- *
- * @param Array<Number> min/max
- * @name jQuery.validator.methods.rangeLength
- * @type Boolean
- * @cat Plugins/Validate/Methods
- */
- 
-- document numberOfInvalids and hideErrors
-
-/**
- * Returns the number of invalid elements in the form.
- * 
- * @example $("#myform").validate({
- * 	showErrors: function() {
- * 		$("#summary").html("Your form contains " + this.numberOfInvalids() + " errors, see details below.");
- * 		this.defaultShowErrors();
- * 	}
- * });
- * @desc Specifies a custom showErrors callback that updates the number of invalid elements each
- * time the form or a single element is validated.
- * 
- * @name jQuery.validator.prototype.numberOfInvalids
- * @type Number
- */
- 
- /**
- * Hides all error messages in this form.
- * 
- * @example var validator = $("#myform").validate();
- * $(".cancel").click(function() {
- * 	validator.hideErrors();
- * });
- * @desc Specifies a custom showErrors callback that updates the number of invalid elements each
- * time the form or a single element is validated.
- * 
- * @name jQuery.validator.prototype.hideErrors
- */
-
-- remove deprecated methods
-
-- css references
- - http://test5.caribmedia.com/CSS/Secrets/members/michiel/floating-forms.html
- - http://paularmstrongdesigns.com/projects/awesomeform/
- - http://dnevnikeklektika.com/uni-form/
-
-- consider validation on page load, disabling required-checks
-- completely rework showErrors: manually settings errors is currently extremely flawed and utterly useless, eg. errors disappear if some other validation is triggered
-- add custom event to remote validation for adding more parameters
-
-- document focusInvalid()
-- document validation lifecycle: setup (add event handlers), run validation (prepare form, validate elements, display errors/submit form)
-	 -> show where the user can hook in via callbacks
-	 
-- AND depedency: specify multiple expressions as an array
-
-- add custom events for form and elements instead of more callbacks (additional options/callbacks)
- - beforeValidation: Callback, called before doing any validation
- - beforeSubmit: Callback, called before submitting the form (default submit or calling submitHandler, if specified) 
-
-- animations!!
-- ajax validation:
-	- in combination with autocomplete (mustmatch company name, fill out address details, validate required)
-	- validate zip code in comparison to address, if match and state is missing, fill out state
-- strong password check/integration: http://phiras.wordpress.com/2007/04/08/password-strength-meter-a-jquery-plugin/
-
-- stop firefox password manager to popup before validation - check mozilla bug tracker?
-
-- overload addMethod with a Option-variant:
-$.validator.addMethod({
-  name: "custom",
-  message: "blablabla",
-  parameteres: false,
-  handler: function() { ... }
-});
-
- Examples:
- - wordpress comment form, make it a drop-in method
- - ajaxForm() integration
- - ajaxSubmit with rules-option, more/less options to ajaxSubmit
- - watermark integration http://digitalbush.com/projects/watermark-input-plugin
- - datepicker integration
- - timepicker integration ( http://labs.perifer.se/timedatepicker/ ) 
- - integration with CakePHP ( https://trac.cakephp.org/ticket/2359 )
- - integration with tabs: http://www.netix.sk/forms/test.html 
- - intergration with rich-text-editors (FCKEditor, Codepress)
-	http://www.fyneworks.com/jquery/FCKEditor/
-
-2.0
----
-- attachValidation, removeValidation, validate (with UI), valid (without UI)
-- (re)move current addMethod implementation
-- move rules plugin option
-- move metadata support
-- make validate method chainable
-  -> provide an accessor for the validator if necessary at all 
+1.3
+---
+
+- checkout datejs.com for a proper date implementation -> complete but very heavy parser, currently overkill
+
+- rewrite required-method to use jQuery's extended val() on selects[/radios/checkboxes]
+- consider a field-validator object that encapsulates a single element and all methods working on it
+- export API browser
+- add example/support for other URL schemes like svn://....
+- document min/max/range methods for checkboxes/selects
+
+/**
+ * Return false, if the element is
+ *
+ * - some kind of text input and its value is too short
+ *
+ * - a set of checkboxes has not enough boxes checked
+ *
+ * - a select and has not enough options selected
+ *
+ * Works with all kind of text inputs, checkboxes and select.
+ *
+ * @example <input name="firstname" class="{minLength:5}" />
+ * @desc Declares an optional input element with at least 5 characters (or none at all).
+ *
+ * @example <input name="firstname" class="{required:true,minLength:5}" />
+ * @desc Declares an input element that must have at least 5 characters.
+ *
+ * @example <fieldset>
+ * 	<legend>Spam</legend>
+ * 	<label for="spam_email">
+ * 		<input type="checkbox" id="spam_email" value="email" name="spam" validate="required:true,minLength:2" />
+ * 		Spam via E-Mail
+ * 	</label>
+ * 	<label for="spam_phone">
+ * 		<input type="checkbox" id="spam_phone" value="phone" name="spam" />
+ * 		Spam via Phone
+ * 	</label>
+ * 	<label for="spam_mail">
+ * 		<input type="checkbox" id="spam_mail" value="mail" name="spam" />
+ * 		Spam via Mail
+ * 	</label>
+ * 	<label for="spam" class="error">Please select at least two types of spam.</label>
+ * </fieldset>
+ * @desc Specifies a group of checkboxes. To validate, at least two checkboxes must be selected.
+ *
+ * @param Number min
+ * @name jQuery.validator.methods.minLength
+ * @type Boolean
+ * @cat Plugins/Validate/Methods
+ */
+ 
+ /**
+ * Return false, if the element is
+ *
+ * - some kind of text input and its value is too short or too long
+ *
+ * - a set of checkboxes has not enough or too many boxes checked
+ *
+ * - a select and has not enough or too many options selected
+ *
+ * Works with all kind of text inputs, checkboxes and selects.
+ *
+ * @example <input name="firstname" class="{rangeLength:[3,5]}" />
+ * @desc Declares an optional input element with at least 3 and at most 5 characters (or none at all).
+ *
+ * @example <input name="firstname" class="{required:true,rangeLength:[3,5]}" />
+ * @desc Declares an input element that must have at least 3 and at most 5 characters.
+ *
+ * @example <select id="cars" class="{required:true,rangeLength:[2,3]}" multiple="multiple">
+ * 	<option value="m_sl">Mercedes SL</option>
+ * 	<option value="o_c">Opel Corsa</option>
+ * 	<option value="vw_p">VW Polo</option>
+ * 	<option value="t_s">Titanic Skoda</option>
+ * </select>
+ * @desc Specifies a select that must have at least two but no more than three options selected.
+ *
+ * @param Array<Number> min/max
+ * @name jQuery.validator.methods.rangeLength
+ * @type Boolean
+ * @cat Plugins/Validate/Methods
+ */
+ 
+- document numberOfInvalids and hideErrors
+
+/**
+ * Returns the number of invalid elements in the form.
+ * 
+ * @example $("#myform").validate({
+ * 	showErrors: function() {
+ * 		$("#summary").html("Your form contains " + this.numberOfInvalids() + " errors, see details below.");
+ * 		this.defaultShowErrors();
+ * 	}
+ * });
+ * @desc Specifies a custom showErrors callback that updates the number of invalid elements each
+ * time the form or a single element is validated.
+ * 
+ * @name jQuery.validator.prototype.numberOfInvalids
+ * @type Number
+ */
+ 
+ /**
+ * Hides all error messages in this form.
+ * 
+ * @example var validator = $("#myform").validate();
+ * $(".cancel").click(function() {
+ * 	validator.hideErrors();
+ * });
+ * @desc Specifies a custom showErrors callback that updates the number of invalid elements each
+ * time the form or a single element is validated.
+ * 
+ * @name jQuery.validator.prototype.hideErrors
+ */
+
+- remove deprecated methods
+
+- css references
+ - http://test5.caribmedia.com/CSS/Secrets/members/michiel/floating-forms.html
+ - http://paularmstrongdesigns.com/projects/awesomeform/
+ - http://dnevnikeklektika.com/uni-form/
+
+- consider validation on page load, disabling required-checks
+- completely rework showErrors: manually settings errors is currently extremely flawed and utterly useless, eg. errors disappear if some other validation is triggered
+- add custom event to remote validation for adding more parameters
+
+- document focusInvalid()
+- document validation lifecycle: setup (add event handlers), run validation (prepare form, validate elements, display errors/submit form)
+	 -> show where the user can hook in via callbacks
+	 
+- AND depedency: specify multiple expressions as an array
+
+- add custom events for form and elements instead of more callbacks (additional options/callbacks)
+ - beforeValidation: Callback, called before doing any validation
+ - beforeSubmit: Callback, called before submitting the form (default submit or calling submitHandler, if specified) 
+
+- animations!!
+- ajax validation:
+	- in combination with autocomplete (mustmatch company name, fill out address details, validate required)
+	- validate zip code in comparison to address, if match and state is missing, fill out state
+- strong password check/integration: http://phiras.wordpress.com/2007/04/08/password-strength-meter-a-jquery-plugin/
+
+- stop firefox password manager to popup before validation - check mozilla bug tracker?
+
+- overload addMethod with a Option-variant:
+$.validator.addMethod({
+  name: "custom",
+  message: "blablabla",
+  parameteres: false,
+  handler: function() { ... }
+});
+
+ Examples:
+ - wordpress comment form, make it a drop-in method
+ - ajaxForm() integration
+ - ajaxSubmit with rules-option, more/less options to ajaxSubmit
+ - watermark integration http://digitalbush.com/projects/watermark-input-plugin
+ - datepicker integration
+ - timepicker integration ( http://labs.perifer.se/timedatepicker/ ) 
+ - integration with CakePHP ( https://trac.cakephp.org/ticket/2359 )
+ - integration with tabs: http://www.netix.sk/forms/test.html 
+ - intergration with rich-text-editors (FCKEditor, Codepress)
+	http://www.fyneworks.com/jquery/FCKEditor/
+
+2.0
+---
+- attachValidation, removeValidation, validate (with UI), valid (without UI)
+- (re)move current addMethod implementation
+- move rules plugin option
+- move metadata support
+- make validate method chainable
+  -> provide an accessor for the validator if necessary at all 
 - move a few default methods to additionals, eg. dateXXX, creditcard, definitely accept
\ No newline at end of file

Modified: ofbiz/branches/jackrabbit20100709/framework/images/webapp/images/jquery/plugins/validate/version.txt
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/framework/images/webapp/images/jquery/plugins/validate/version.txt?rev=1173274&r1=1173273&r2=1173274&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/framework/images/webapp/images/jquery/plugins/validate/version.txt (original)
+++ ofbiz/branches/jackrabbit20100709/framework/images/webapp/images/jquery/plugins/validate/version.txt Tue Sep 20 17:46:13 2011
@@ -1 +1 @@
-1.8.0
+1.8.1

Modified: ofbiz/branches/jackrabbit20100709/framework/jetty/src/org/ofbiz/jetty/container/JettyContainer.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/framework/jetty/src/org/ofbiz/jetty/container/JettyContainer.java?rev=1173274&r1=1173273&r2=1173274&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/framework/jetty/src/org/ofbiz/jetty/container/JettyContainer.java (original)
+++ ofbiz/branches/jackrabbit20100709/framework/jetty/src/org/ofbiz/jetty/container/JettyContainer.java Tue Sep 20 17:46:13 2011
@@ -42,6 +42,7 @@ import org.ofbiz.base.container.Containe
 import org.ofbiz.base.container.ContainerException;
 import org.ofbiz.base.util.Debug;
 import org.ofbiz.base.util.SSLUtil;
+import org.ofbiz.base.util.UtilValidate;
 
 
 /**
@@ -116,12 +117,12 @@ public class JettyContainer implements C
                         context.setSessionHandler(new SessionHandler(sm));
 
                         // set the virtual hosts
-                        if (virtualHosts != null && !virtualHosts.isEmpty()) {
+                        if (UtilValidate.isNotEmpty(virtualHosts)) {
                             context.setVirtualHosts((String[]) virtualHosts.toArray());
                         }
 
                         // set the init parameters
-                        if (initParameters != null && !initParameters.isEmpty()) {
+                        if (UtilValidate.isNotEmpty(initParameters)) {
                             context.setInitParams(initParameters);
                         }
 

Modified: ofbiz/branches/jackrabbit20100709/framework/minilang/src/org/ofbiz/minilang/method/callops/CallBsh.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/framework/minilang/src/org/ofbiz/minilang/method/callops/CallBsh.java?rev=1173274&r1=1173273&r2=1173274&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/framework/minilang/src/org/ofbiz/minilang/method/callops/CallBsh.java (original)
+++ ofbiz/branches/jackrabbit20100709/framework/minilang/src/org/ofbiz/minilang/method/callops/CallBsh.java Tue Sep 20 17:46:13 2011
@@ -88,8 +88,9 @@ public class CallBsh extends MethodOpera
                 if (is == null) {
                     messages.add("Could not find bsh resource: " + resource);
                 } else {
+                    BufferedReader reader = null;
                     try {
-                        BufferedReader reader = new BufferedReader(new InputStreamReader(is));
+                        reader = new BufferedReader(new InputStreamReader(is));
                         StringBuilder outSb = new StringBuilder();
 
                         String tempStr = null;
@@ -107,6 +108,14 @@ public class CallBsh extends MethodOpera
                         }
                     } catch (IOException e) {
                         messages.add("IO error loading bsh resource: " + e.getMessage());
+                    } finally {
+                        if (reader != null) {
+                            try {
+                                reader.close();
+                            } catch (IOException e) {
+                                messages.add("IO error closing BufferedReader: " + e.getMessage());
+                            }
+                        }
                     }
                 }
             }