svn commit: r1084863 [6/11] - in /ofbiz/branches/jackrabbit20100709: ./ applications/accounting/data/ applications/accounting/src/org/ofbiz/accounting/invoice/ applications/accounting/src/org/ofbiz/accounting/payment/ applications/accounting/src/org/of...

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r1084863 [6/11] - in /ofbiz/branches/jackrabbit20100709: ./ applications/accounting/data/ applications/accounting/src/org/ofbiz/accounting/invoice/ applications/accounting/src/org/ofbiz/accounting/payment/ applications/accounting/src/org/of...

sascharodekamp
Modified: ofbiz/branches/jackrabbit20100709/framework/base/src/org/ofbiz/base/container/ContainerLoader.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/framework/base/src/org/ofbiz/base/container/ContainerLoader.java?rev=1084863&r1=1084862&r2=1084863&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/framework/base/src/org/ofbiz/base/container/ContainerLoader.java (original)
+++ ofbiz/branches/jackrabbit20100709/framework/base/src/org/ofbiz/base/container/ContainerLoader.java Thu Mar 24 07:23:42 2011
@@ -25,6 +25,8 @@ import java.util.Collection;
 import java.util.Enumeration;
 import java.util.LinkedList;
 import java.util.List;
+import java.util.Map;
+import java.util.concurrent.ConcurrentHashMap;
 
 import org.ofbiz.base.start.Start;
 import org.ofbiz.base.start.StartupException;
@@ -33,27 +35,48 @@ import org.ofbiz.base.util.Debug;
 import org.ofbiz.base.util.UtilValidate;
 
 /**
- * ContainerLoader - StartupLoader for the container
+ * An object that loads containers (background processes).
+ *
+ * <p>Normally, instances of this class are created by OFBiz startup code, and
+ * client code should not create instances of this class. Client code is
+ * responsible for making sure containers are shut down properly. </p>
  *
  */
 public class ContainerLoader implements StartupLoader {
 
     public static final String module = ContainerLoader.class.getName();
-    public static final String CONTAINER_CONFIG = "ofbiz-containers.xml";
-    private static boolean loaded = false;
+    private static Map<String, Container> containerMap = new ConcurrentHashMap<String, Container>();
 
-    protected List<Container> loadedContainers = new LinkedList<Container>();
-    protected String configFile = null;
-    public static Container rmiLoadedContainer = null; // used in Geronimo/WASCE to allow to deregister
+    /**
+     * Returns a <code>Container</code> that has the specified name. Returns
+     * <code>null</code> if the specified container was not loaded. If more than one
+     * instance of the container was loaded, then the last instance that was loaded is
+     * returned. The returned <code>Container</code> will be initialized, but there is no
+     * guarantee that it will be in the running state.
+     *
+     * @param containerName
+     *            The name of the container.
+     * @return A <code>Container</code> that has the specified name.
+     */
+    public static Container getContainer(String containerName) {
+        return containerMap.get(containerName);
+    }
+
+    private String configFile = null;
+    private final List<Container> loadedContainers = new LinkedList<Container>();
+    private boolean unloading = false;
+    private boolean loaded = false;
 
     /**
      * @see org.ofbiz.base.start.StartupLoader#load(Start.Config, String[])
      */
-    public void load(Start.Config config, String args[]) throws StartupException {
+    public synchronized void load(Start.Config config, String args[]) throws StartupException {
+        if (this.loaded || this.unloading) {
+            return;
+        }
         Debug.logInfo("[Startup] Loading containers...", module);
-        loaded = true;
-
-        // get the master container configuration file
+        this.loadedContainers.clear();
+        // get this loader's configuration file
         this.configFile = config.containerConfig;
         Collection<ContainerConfig.Container> containers = null;
         try {
@@ -65,9 +88,14 @@ public class ContainerLoader implements
             throw new StartupException(e);
         }
         for (ContainerConfig.Container containerCfg : containers) {
+            if (this.unloading) {
+                return;
+            }
             Container tmpContainer = loadContainer(containerCfg, args);
-            loadedContainers.add(tmpContainer);
+            this.loadedContainers.add(tmpContainer);
+            containerMap.put(containerCfg.name, tmpContainer);
 
+            // TODO: Put container-specific code in the container.
             // This is only used in case of OFBiz running in Geronimo or WASCE. It allows to use the RMIDispatcher
             if (containerCfg.name.equals("rmi-dispatcher") && configFile.equals("limited-containers.xml")) {
                 try {
@@ -79,7 +107,6 @@ public class ContainerLoader implements
                             System.setSecurityManager(new java.rmi.RMISecurityManager());
                         }
                         tmpContainer.start();
-                        rmiLoadedContainer = tmpContainer; // used in Geronimo/WASCE to allow to deregister
                     }
                 } catch (ContainerException e) {
                     throw new StartupException("Cannot start() " + tmpContainer.getClass().getName(), e);
@@ -88,85 +115,32 @@ public class ContainerLoader implements
                 }
             }
         }
+        if (this.unloading) {
+            return;
+        }
         // Get hot-deploy container configuration files
         ClassLoader loader = Thread.currentThread().getContextClassLoader();
         Enumeration<URL> resources;
         try {
             resources = loader.getResources("hot-deploy-containers.xml");
-            while (resources.hasMoreElements()) {
+            while (resources.hasMoreElements() && !this.unloading) {
                 URL xmlUrl = resources.nextElement();
                 Debug.logInfo("Loading hot-deploy containers from " + xmlUrl, module);
                 Collection<ContainerConfig.Container> hotDeployContainers = ContainerConfig.getContainers(xmlUrl);
                 for (ContainerConfig.Container containerCfg : hotDeployContainers) {
-                    loadedContainers.add(loadContainer(containerCfg, args));
+                    if (this.unloading) {
+                        return;
+                    }
+                    Container tmpContainer = loadContainer(containerCfg, args);
+                    this.loadedContainers.add(tmpContainer);
+                    containerMap.put(containerCfg.name, tmpContainer);
                 }
             }
         } catch (Exception e) {
             Debug.logError(e, "Could not load hot-deploy-containers.xml", module);
             throw new StartupException(e);
         }
-    }
-
-    /**
-     * @see org.ofbiz.base.start.StartupLoader#start()
-     */
-    public void start() throws StartupException {
-        Debug.logInfo("[Startup] Starting containers...", module);
-
-        // start each container object
-        for (Container container: loadedContainers) {
-            try {
-                container.start();
-            } catch (ContainerException e) {
-                throw new StartupException("Cannot start() " + container.getClass().getName(), e);
-            } catch (java.lang.AbstractMethodError e) {
-                throw new StartupException("Cannot start() " + container.getClass().getName(), e);
-            }
-        }
-    }
-
-    /**
-     * @see org.ofbiz.base.start.StartupLoader#unload()
-     */
-    public void unload() throws StartupException {
-        Debug.logInfo("Shutting down containers", module);
-        if (Debug.verboseOn())
-            printThreadDump();
-
-        // shutting down in reverse order
-        for (int i = loadedContainers.size(); i > 0; i--) {
-            Container container = loadedContainers.get(i-1);
-            try {
-                container.stop();
-            } catch (ContainerException e) {
-                Debug.logError(e, module);
-            }
-        }
-    }
-
-    private void printThreadDump() {
-        Thread currentThread = Thread.currentThread();
-        ThreadGroup group = currentThread.getThreadGroup();
-        while (group.getParent() != null) {
-            group = group.getParent();
-        }
-        Thread threadArr[] = new Thread[1000];
-        group.enumerate(threadArr);
-
-        StringWriter writer = new StringWriter();
-        PrintWriter out = new PrintWriter(writer);
-        out.println("Thread dump:");
-        for (Thread t: threadArr) {
-            if (t != null) {
-                ThreadGroup g = t.getThreadGroup();
-                out.println("Thread: " + t.getName() + " [" + t.getId() + "] @ " + (g != null ? g.getName() : "[none]") + " : " + t.getPriority() + " [" + t.getState().name() + "]");
-                out.println("--- Alive: " + t.isAlive() + " Daemon: " + t.isDaemon());
-                for (StackTraceElement stack: t.getStackTrace()) {
-                    out.println("### " + stack.toString());
-                }
-            }
-        }
-        Debug.log(writer.toString(), module);
+        loaded = true;
     }
 
     private Container loadContainer(ContainerConfig.Container containerCfg, String[] args) throws StartupException {
@@ -214,16 +188,75 @@ public class ContainerLoader implements
         return containerObj;
     }
 
-    public static synchronized Container loadContainers(String config, String[] args) throws StartupException {
-        if (!loaded) {
-            ContainerLoader loader = new ContainerLoader();
-            Start.Config cfg = new Start.Config();
-            cfg.containerConfig = config == null ? "limited-containers.xml" : config;
-            loader.load(cfg, args);
-            if (rmiLoadedContainer != null) { // used in Geronimo/WASCE to allow to deregister
-                return rmiLoadedContainer;
+    private void printThreadDump() {
+        Thread currentThread = Thread.currentThread();
+        ThreadGroup group = currentThread.getThreadGroup();
+        while (group.getParent() != null) {
+            group = group.getParent();
+        }
+        Thread threadArr[] = new Thread[1000];
+        group.enumerate(threadArr);
+
+        StringWriter writer = new StringWriter();
+        PrintWriter out = new PrintWriter(writer);
+        out.println("Thread dump:");
+        for (Thread t: threadArr) {
+            if (t != null) {
+                ThreadGroup g = t.getThreadGroup();
+                out.println("Thread: " + t.getName() + " [" + t.getId() + "] @ " + (g != null ? g.getName() : "[none]") + " : " + t.getPriority() + " [" + t.getState().name() + "]");
+                out.println("--- Alive: " + t.isAlive() + " Daemon: " + t.isDaemon());
+                for (StackTraceElement stack: t.getStackTrace()) {
+                    out.println("### " + stack.toString());
+                }
+            }
+        }
+        Debug.log(writer.toString(), module);
+    }
+
+    /**
+     * @see org.ofbiz.base.start.StartupLoader#start()
+     */
+    public synchronized void start() throws StartupException {
+        if (!this.loaded || this.unloading) {
+            throw new IllegalStateException("start() called on unloaded containers");
+        }
+        Debug.logInfo("[Startup] Starting containers...", module);
+        // start each container object
+        for (Container container: this.loadedContainers) {
+            if (this.unloading) {
+                return;
+            }
+            try {
+                container.start();
+            } catch (ContainerException e) {
+                throw new StartupException("Cannot start() " + container.getClass().getName(), e);
+            } catch (java.lang.AbstractMethodError e) {
+                throw new StartupException("Cannot start() " + container.getClass().getName(), e);
+            }
+        }
+    }
+
+    /**
+     * @see org.ofbiz.base.start.StartupLoader#unload()
+     */
+    public void unload() throws StartupException {
+        if (!this.unloading) {
+            this.unloading = true;
+            synchronized (this) {
+                Debug.logInfo("Shutting down containers", module);
+                if (Debug.verboseOn()) {
+                    printThreadDump();
+                }
+                // shutting down in reverse order
+                for (int i = this.loadedContainers.size(); i > 0; i--) {
+                    Container container = this.loadedContainers.get(i-1);
+                    try {
+                        container.stop();
+                    } catch (ContainerException e) {
+                        Debug.logError(e, module);
+                    }
+                }
             }
         }
-        return null;
     }
 }

Modified: ofbiz/branches/jackrabbit20100709/framework/bi/widget/BiScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/framework/bi/widget/BiScreens.xml?rev=1084863&r1=1084862&r2=1084863&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/framework/bi/widget/BiScreens.xml (original)
+++ ofbiz/branches/jackrabbit20100709/framework/bi/widget/BiScreens.xml Thu Mar 24 07:23:42 2011
@@ -35,19 +35,7 @@ under the License.
                 <set field="applicationTitle" value="${uiLabelMap.BusinessIntelligenceApplication}" global="true"/>
             </actions>
             <widgets>
-                <decorator-screen name="GlobalDecorator" location="component://common/widget/CommonScreens.xml">
-                    <decorator-section name="pre-body">
-                        <decorator-section-include name="pre-body"/>
-                    </decorator-section>
-                    <decorator-section name="body">
-                        <container id="column-container">
-                            <container id="content-main-section">
-                                <decorator-section-include name="body"/>
-                            </container>
-                            <container style="clear"></container>
-                        </container>
-                    </decorator-section>
-                </decorator-screen>                
+                <include-screen name="GlobalDecorator" location="component://common/widget/CommonScreens.xml"/>
             </widgets>
         </section>
     </screen>

Modified: ofbiz/branches/jackrabbit20100709/framework/birt/data/helpdata/HELP_BIRT.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/framework/birt/data/helpdata/HELP_BIRT.xml?rev=1084863&r1=1084862&r2=1084863&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/framework/birt/data/helpdata/HELP_BIRT.xml (original)
+++ ofbiz/branches/jackrabbit20100709/framework/birt/data/helpdata/HELP_BIRT.xml Thu Mar 24 07:23:42 2011
@@ -56,7 +56,7 @@ under the License.
     <section>
         <title>Important file for using BIRT's jsp tags</title>
         <para>
-            If a web applications wants to use the report in a screen, copy birt.tld file to [WEB APP]/WEB-INF/ directory ant assign in in ftl
+            If a web applications wants to use the report in a screen, copy birt.tld file to [WEB APP]/WEB-INF/ directory and assign in in ftl
             like &lt;#assign birt = JspTaglibs["/WEB-INF/birt.tld"]/&gt;</para>
     </section>
     <section>

Modified: ofbiz/branches/jackrabbit20100709/framework/catalina/src/org/ofbiz/catalina/container/CatalinaContainer.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/framework/catalina/src/org/ofbiz/catalina/container/CatalinaContainer.java?rev=1084863&r1=1084862&r2=1084863&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/framework/catalina/src/org/ofbiz/catalina/container/CatalinaContainer.java (original)
+++ ofbiz/branches/jackrabbit20100709/framework/catalina/src/org/ofbiz/catalina/container/CatalinaContainer.java Thu Mar 24 07:23:42 2011
@@ -376,7 +376,7 @@ public class CatalinaContainer implement
     }
 
     protected Cluster createCluster(ContainerConfig.Container.Property clusterProps, Host host) throws ContainerException {
-        String defaultValveFilter = ".*.gif;.*.js;.*.jpg;.*.htm;.*.html;.*.txt;";
+        String defaultValveFilter = ".*\\.gif;.*\\.js;.*\\.jpg;.*\\.htm;.*\\.html;.*\\.txt;.*\\.png;.*\\.css;.*\\.ico;.*\\.htc;";
 
         ReplicationValve clusterValve = new ReplicationValve();
         clusterValve.setFilter(ContainerConfig.getPropertyValue(clusterProps, "rep-valve-filter", defaultValveFilter));
@@ -632,7 +632,8 @@ public class CatalinaContainer implement
             for (int i = webResourceInfos.size(); i > 0; i--) {
                 ComponentConfig.WebappInfo appInfo = webResourceInfos.get(i - 1);
                 String mount = appInfo.getContextRoot();
-                if (!loadedMounts.contains(mount)) {
+                List<String> virtualHosts = appInfo.getVirtualHosts();
+                if (!loadedMounts.contains(mount) || UtilValidate.isNotEmpty(virtualHosts)) {
                     createContext(appInfo);
                     loadedMounts.add(mount);
                 } else {

Modified: ofbiz/branches/jackrabbit20100709/framework/common/src/org/ofbiz/common/login/LoginServices.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/framework/common/src/org/ofbiz/common/login/LoginServices.java?rev=1084863&r1=1084862&r2=1084863&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/framework/common/src/org/ofbiz/common/login/LoginServices.java (original)
+++ ofbiz/branches/jackrabbit20100709/framework/common/src/org/ofbiz/common/login/LoginServices.java Thu Mar 24 07:23:42 2011
@@ -537,8 +537,13 @@ public class LoginServices {
         userLoginToCreate.set("passwordHint", passwordHint);
         userLoginToCreate.set("enabled", enabled);
         userLoginToCreate.set("requirePasswordChange", requirePasswordChange);
-        userLoginToCreate.set("partyId", partyId);
         userLoginToCreate.set("currentPassword", useEncryption ? HashCrypt.getDigestHash(currentPassword, getHashType()) : currentPassword);
+        try {
+            userLoginToCreate.set("partyId", partyId);
+        } catch (Exception e) {
+            // Will get thrown in framework-only installation
+            Debug.logInfo(e, "Exception thrown while setting UserLogin partyId field: ", module);
+        }
 
         try {
             EntityCondition condition = EntityCondition.makeCondition(EntityFunction.UPPER_FIELD("userLoginId"), EntityOperator.EQUALS, EntityFunction.UPPER(userLoginId));

Modified: ofbiz/branches/jackrabbit20100709/framework/common/src/org/ofbiz/common/preferences/PreferenceServices.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/framework/common/src/org/ofbiz/common/preferences/PreferenceServices.java?rev=1084863&r1=1084862&r2=1084863&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/framework/common/src/org/ofbiz/common/preferences/PreferenceServices.java (original)
+++ ofbiz/branches/jackrabbit20100709/framework/common/src/org/ofbiz/common/preferences/PreferenceServices.java Thu Mar 24 07:23:42 2011
@@ -144,7 +144,7 @@ public class PreferenceServices {
         for (Map.Entry<String, Object> pairs: userPrefMap.entrySet()) {
             if ("DEFAULT".equals(pairs.getValue())) {
                 if (UtilValidate.isNotEmpty(generalProperties.get(pairs.getKey()))) {
-                    userPrefMap.put((String) pairs.getKey(), generalProperties.get(pairs.getKey()));
+                    userPrefMap.put(pairs.getKey(), generalProperties.get(pairs.getKey()));
                 }
             }
         }

Modified: ofbiz/branches/jackrabbit20100709/framework/common/webcommon/WEB-INF/actions/includes/FindAutocompleteOptions.groovy
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/framework/common/webcommon/WEB-INF/actions/includes/FindAutocompleteOptions.groovy?rev=1084863&r1=1084862&r2=1084863&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/framework/common/webcommon/WEB-INF/actions/includes/FindAutocompleteOptions.groovy (original)
+++ ofbiz/branches/jackrabbit20100709/framework/common/webcommon/WEB-INF/actions/includes/FindAutocompleteOptions.groovy Thu Mar 24 07:23:42 2011
@@ -32,6 +32,7 @@ def orExprs = [];
 def entityName = context.entityName;
 def searchFields = context.searchFields;
 def displayFields = context.displayFields ?: searchFields;
+def searchDistinct = Boolean.valueOf(context.searchDistinct ?: false);
 
 def searchValueFieldName = parameters.term;
 def fieldValue = null;
@@ -81,7 +82,15 @@ def conditionFields = context.conditionF
 if (conditionFields) {
     // these fields are for additonal conditions, this is a Map of name/value pairs
     for (conditionFieldEntry in conditionFields.entrySet()) {
-        mainAndConds.add(EntityCondition.makeCondition(EntityFieldValue.makeFieldValue(conditionFieldEntry.getKey()), EntityOperator.EQUALS, conditionFieldEntry.getValue()));    
+        if (conditionFieldEntry.getValue() instanceof java.util.List) {
+            def orCondFields = [];
+            for (entry in conditionFieldEntry.getValue()) {
+                orCondFields.add(EntityCondition.makeCondition(EntityFieldValue.makeFieldValue(conditionFieldEntry.getKey()), EntityOperator.EQUALS, entry));                
+            }
+            mainAndConds.add(EntityCondition.makeCondition(orCondFields, EntityOperator.OR));            
+        } else {
+            mainAndConds.add(EntityCondition.makeCondition(EntityFieldValue.makeFieldValue(conditionFieldEntry.getKey()), EntityOperator.EQUALS, conditionFieldEntry.getValue()));
+        }
     }
 }
 
@@ -93,11 +102,13 @@ if (orExprs && entityName && displayFiel
         mainAndConds.add(context.andCondition);
     }
     
-    def entityConditionList = EntityCondition.makeCondition(mainAndConds, EntityOperator.AND);
-
+    def entityConditionList = EntityCondition.makeCondition(mainAndConds, EntityOperator.AND);    
+    
     Integer autocompleterViewSize = Integer.valueOf(context.autocompleterViewSize ?: 10);
     EntityFindOptions findOptions = new EntityFindOptions();
     findOptions.setMaxRows(autocompleterViewSize);
+    findOptions.setDistinct(searchDistinct);
+    
     autocompleteOptions = delegator.findList(entityName, entityConditionList, displayFieldsSet, StringUtil.toList(displayFields), findOptions, false);
     if (autocompleteOptions) {
         context.autocompleteOptions = autocompleteOptions;

Modified: ofbiz/branches/jackrabbit20100709/framework/common/webcommon/includes/flotCharts/Bars.ftl
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/framework/common/webcommon/includes/flotCharts/Bars.ftl?rev=1084863&r1=1084862&r2=1084863&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/framework/common/webcommon/includes/flotCharts/Bars.ftl (original)
+++ ofbiz/branches/jackrabbit20100709/framework/common/webcommon/includes/flotCharts/Bars.ftl Thu Mar 24 07:23:42 2011
@@ -17,7 +17,7 @@ specific language governing permissions
 under the License.
 -->
 <script language="javascript" type="text/javascript" src="<@ofbizContentUrl>/images/jquery/plugins/flot/excanvas.min.js</@ofbizContentUrl>"></script>
-<script language="javascript" type="text/javascript" src="<@ofbizContentUrl>/images/jquery/jquery-1.4.2.min.js</@ofbizContentUrl>"></script>
+<script language="javascript" type="text/javascript" src="<@ofbizContentUrl>/images/jquery/jquery-1.5.1.min.js</@ofbizContentUrl>"></script>
 <script language="javascript" type="text/javascript" src="<@ofbizContentUrl>/images/jquery/plugins/flot/jquery.flot.js</@ofbizContentUrl>"></script>
 
 <div id="${chartId}Div" style="width:600px;height:300px;"></div>

Modified: ofbiz/branches/jackrabbit20100709/framework/common/webcommon/includes/flotCharts/Pie.ftl
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/framework/common/webcommon/includes/flotCharts/Pie.ftl?rev=1084863&r1=1084862&r2=1084863&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/framework/common/webcommon/includes/flotCharts/Pie.ftl (original)
+++ ofbiz/branches/jackrabbit20100709/framework/common/webcommon/includes/flotCharts/Pie.ftl Thu Mar 24 07:23:42 2011
@@ -17,7 +17,7 @@ specific language governing permissions
 under the License.
 -->
 <script language="javascript" type="text/javascript" src="<@ofbizContentUrl>/images/jquery/plugins/flot/excanvas.min.js</@ofbizContentUrl>"></script>
-<script language="javascript" type="text/javascript" src="<@ofbizContentUrl>/images/jquery/jquery-1.4.2.min.js</@ofbizContentUrl>"></script>
+<script language="javascript" type="text/javascript" src="<@ofbizContentUrl>/images/jquery/jquery-1.5.1.min.js</@ofbizContentUrl>"></script>
 <script language="javascript" type="text/javascript" src="<@ofbizContentUrl>/images/jquery/plugins/flot/jquery.flot.js</@ofbizContentUrl>"></script>
 <script language="javascript" type="text/javascript" src="<@ofbizContentUrl>/images/jquery/plugins/flot/jquery.flot.pie.js</@ofbizContentUrl>"></script>
 

Modified: ofbiz/branches/jackrabbit20100709/framework/common/webcommon/includes/helplink.ftl
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/framework/common/webcommon/includes/helplink.ftl?rev=1084863&r1=1084862&r2=1084863&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/framework/common/webcommon/includes/helplink.ftl (original)
+++ ofbiz/branches/jackrabbit20100709/framework/common/webcommon/includes/helplink.ftl Thu Mar 24 07:23:42 2011
@@ -17,10 +17,7 @@ specific language governing permissions
 under the License.
 -->
 
-  <#assign helpTopic = webSiteId + "_" + requestAttributes._CURRENT_VIEW_ />
-
-<#-- uncomment this to show the current screen help topic key (this is usefull to cut and paste in the help link resources files
-${helpTopic}
+<#-- uncomment this to show the current screen help topic key (this is useful to cut and paste in the help link resources files
+${helpTopic?if_exists}
 -->
-  <#assign pageAvail = delegator.findByAnd("ContentAssoc", {"mapKey" : helpTopic})/>
 

Modified: ofbiz/branches/jackrabbit20100709/framework/common/webcommon/includes/lookup.ftl
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/framework/common/webcommon/includes/lookup.ftl?rev=1084863&r1=1084862&r2=1084863&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/framework/common/webcommon/includes/lookup.ftl (original)
+++ ofbiz/branches/jackrabbit20100709/framework/common/webcommon/includes/lookup.ftl Thu Mar 24 07:23:42 2011
@@ -27,7 +27,7 @@ under the License.
 <head>
     <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
     <title>${title?if_exists}</title>
-    <script language="javascript" src="<@ofbizContentUrl>/images/jquery/jquery-1.4.2.min.js</@ofbizContentUrl>" type="text/javascript"></script>
+    <script language="javascript" src="<@ofbizContentUrl>/images/jquery/jquery-1.5.1.min.js</@ofbizContentUrl>" type="text/javascript"></script>
     <script language="javascript" src="<@ofbizContentUrl>/images/selectall.js</@ofbizContentUrl>" type="text/javascript"></script>
     <#if layoutSettings.javaScripts?has_content>
         <#--layoutSettings.javaScripts is a list of java scripts. -->

Modified: ofbiz/branches/jackrabbit20100709/framework/common/widget/CommonScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/framework/common/widget/CommonScreens.xml?rev=1084863&r1=1084862&r2=1084863&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/framework/common/widget/CommonScreens.xml (original)
+++ ofbiz/branches/jackrabbit20100709/framework/common/widget/CommonScreens.xml Thu Mar 24 07:23:42 2011
@@ -109,6 +109,7 @@ under the License.
                     <!-- jQuery part -->
                 <set field="layoutSettings.javaScripts[+0]" value="/images/jquery/plugins/asmselect/jquery.asmselect-1.0.4a-beta.js" global="true"/>
                 <set field="layoutSettings.javaScripts[+0]" value="/images/jquery/plugins/datetimepicker/jquery-ui-timepicker-addon-0.9.3.min.js" global="true"/>
+                <set field="layoutSettings.javaScripts[+0]" value="/images/jquery/plugins/jquery.maskedinput-1.2.2.min.js" global="true"/>
                 <set field="layoutSettings.javaScripts[+0]" value="/images/jquery/ui/js/jquery-ui-1.8.6.custom.min.js" global="true"/>
                 <set field="layoutSettings.javaScripts[+0]" value="/images/jquery/plugins/jeditable/jquery.jeditable.js" global="true"/>
                 <set field="layoutSettings.javaScripts[+0]" value="/images/jquery/plugins/validate/jquery.validate.min.js" global="true"/>
@@ -125,7 +126,8 @@ under the License.
                 <set field="localeJsFile" type="String" value="${groovy: fileNameComplete ? localeFileNameComplete : localeFileName}"/>
                 <set field="layoutSettings.javaScripts[+0]" value="${localeJsFile}" global="true"/>
 
-                <set field="layoutSettings.javaScripts[+0]" value="/images/jquery/jquery-1.4.2.min.js" global="true"/>
+                
+                <set field="layoutSettings.javaScripts[+0]" value="/images/jquery/jquery-1.5.1.min.js" global="true"/>
                     <!-- jQuery CSSs -->
                 <set field="layoutSettings.styleSheets[+0]" value="/images/jquery/plugins/asmselect/jquery.asmselect-1.0.4a-beta.css" global="true"/>
 
@@ -209,7 +211,29 @@ under the License.
                 <!-- render content area -->
                 <container style="contentarea">
                     <decorator-section-include name="pre-body"/>
-                    <decorator-section-include name="body"/>
+                    <container id="column-container">
+                        <section>
+                            <condition>
+                                <if-empty-section section-name="left-column"/>
+                            </condition>
+                            <widgets>
+                                <container id="content-main-section">
+                                    <decorator-section-include name="body"/>
+                                </container>
+                            </widgets>
+                            <fail-widgets>
+                                <container style="left">
+                                    <decorator-section-include name="left-column"/>
+                                </container>
+                                <container id="content-main-section" style="leftonly">
+                                    <container style="no-clear">
+                                        <decorator-section-include name="body"/>
+                                    </container>
+                                </container>
+                            </fail-widgets>
+                        </section>
+                        <container style="clear"></container>
+                    </container>
                 </container>
 
                 <!-- render footer -->
@@ -254,12 +278,6 @@ under the License.
                         <set field="layoutSettings.javaScripts[]" value="/images/fieldlookup.js" global="true"/>                        
                         
                         <set field="messagesTemplateLocation" from-field="layoutSettings.VT_MSG_TMPLT_LOC[0]" default-value="component://common/webcommon/includes/messages.ftl"/>
-                        <property-to-field  field="defaultCurrencyUomId" property="currency.uom.id.default" resource="general"/>
-                        <set field="defaultOrganizationPartyId" from-field="userPreferences.ORGANIZATION_PARTY" global="true"/>
-                        <entity-one entity-name="PartyAcctgPrefAndGroup" value-field="orgParty">
-                            <field-map field-name="partyId" from-field="defaultOrganizationPartyId"/>
-                        </entity-one>
-                        <set field="defaultOrganizationPartyCurrencyUomId" from-field="orgParty.baseCurrencyUomId" default-value="${defaultCurrencyUomId}" global="true"/>
                     </actions>
                     <widgets>
                         <section>
@@ -338,7 +356,7 @@ under the License.
                 <set field="layoutSettings.javaScripts[+0]" value="/images/jquery/ui/development-bundle/ui/jquery.ui.datepicker.js" global="true"/>
                 <set field="initialLocale" type="String" value="${groovy:parameters?.userLogin?.lastLocale?.substring(0,2)}" default-value="${groovy:locale.toString()?.substring(0,2)?:'en'}"/>
                 <set field="layoutSettings.javaScripts[+0]" value="/images/jquery/ui/development-bundle/ui/i18n/jquery.ui.datepicker-${initialLocale}.js" global="true"/>
-                <set field="layoutSettings.javaScripts[+0]" value="/images/jquery/jquery-1.4.2.min.js" global="true"/>
+                <set field="layoutSettings.javaScripts[+0]" value="/images/jquery/jquery-1.5.1.min.js" global="true"/>
                     <!-- jQuery CSSs -->
                 <set field="layoutSettings.styleSheets[+0]" value="/images/jquery/plugins/asmselect/jquery.asmselect-1.0.4a-beta.css" global="true"/>
 

Propchange: ofbiz/branches/jackrabbit20100709/framework/common/widget/HelpScreens.xml
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Mar 24 07:23:42 2011
@@ -2,3 +2,4 @@
 /ofbiz/branches/dojo1.4/framework/common/widget/HelpScreens.xml:951708-952957
 /ofbiz/branches/jquery/framework/common/widget/HelpScreens.xml:952958-1044489
 /ofbiz/branches/multitenant20100310/framework/common/widget/HelpScreens.xml:921280-927264
+/ofbiz/trunk/framework/common/widget/HelpScreens.xml:962442-1084618

Modified: ofbiz/branches/jackrabbit20100709/framework/documents/UnitTest.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/framework/documents/UnitTest.xml?rev=1084863&r1=1084862&r2=1084863&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/framework/documents/UnitTest.xml (original)
+++ ofbiz/branches/jackrabbit20100709/framework/documents/UnitTest.xml Thu Mar 24 07:23:42 2011
@@ -7,9 +7,9 @@
     to you under the Apache License, Version 2.0 (the
     "License"); you may not use this file except in compliance
     with the License.  You may obtain a copy of the License at
-    
+
     http://www.apache.org/licenses/LICENSE-2.0
-    
+
     Unless required by applicable law or agreed to in writing,
     software distributed under the License is distributed on an
     "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -21,7 +21,7 @@
     version="5.0" xmlns:xl="http://www.w3.org/1999/xlink" xmlns:xi="http://www.w3.org/2001/XInclude"
     xsi:schemaLocation="http://docbook.org/ns/docbook ../../applications/content/dtd/docbook.xsd"
     xmlns="http://docbook.org/ns/docbook">
-    <title>The OFBiz Unit Test (Using JUnit)</title>
+    <title><anchor xml:id="TheOFBizUnitTest"/>The OFBiz Unit Test (Using JUnit)</title>
     <section>
         <title>How to define a unit test?</title>
         <orderedlist>
@@ -87,7 +87,7 @@
             </para>
         </section>
         <section>
-            <title>3. Jython</title>
+            <title>3. Jython</title>
             <para>
                 Specific jython script's location which will be tested in a script-location attribute like this:
                 <programlisting>
@@ -185,7 +185,7 @@
                 Roll back error message occured when transaction roll back data. This error message will be in between starting and finished test cass line like this:
                 <programlisting>
                     [java] 2009-12-22 16:05:28,349 (main) [   TestRunContainer.java:238:INFO ] [JUNIT] : [test case's name] starting...
-                    [java] 2009-12-22 16:05:28,355 (main) [    TransactionUtil.java:336:ERROR]
+                    [java] 2009-12-22 16:05:28,355 (main) [    TransactionUtil.java:336:ERROR]
                     ....
                     ....
                     ....
@@ -278,4 +278,4 @@
             and see JUnit Test Result files for each test suite in runtime/logs/test-results directory. If you use other target you only see JUnit Test Result file in runtime/logs/test-results.
         </para>
     </section>
-</chapter>
\ No newline at end of file
+</chapter>

Modified: ofbiz/branches/jackrabbit20100709/framework/entity/src/org/ofbiz/entity/connection/DBCPConnectionFactory.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/framework/entity/src/org/ofbiz/entity/connection/DBCPConnectionFactory.java?rev=1084863&r1=1084862&r2=1084863&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/framework/entity/src/org/ofbiz/entity/connection/DBCPConnectionFactory.java (original)
+++ ofbiz/branches/jackrabbit20100709/framework/entity/src/org/ofbiz/entity/connection/DBCPConnectionFactory.java Thu Mar 24 07:23:42 2011
@@ -92,12 +92,14 @@ public class DBCPConnectionFactory imple
             }
             // idle-maxsize, default to half of pool-maxsize
             int maxIdle = maxSize / 2;
-            try {
-                maxIdle = Integer.parseInt(jdbcElement.getAttribute("idle-maxsize"));
-            } catch (NumberFormatException nfe) {
-                Debug.logError("Problems with pool settings [idle-maxsize=" + jdbcElement.getAttribute("idle-maxsize") + "]; the values MUST be numbers, using calculated default of" + (maxIdle > minSize ? maxIdle : minSize) + ".", module);
-            } catch (Exception e) {
-                Debug.logError("Problems with pool settings [idle-maxsize], using calculated default of" + (maxIdle > minSize ? maxIdle : minSize) + ".", module);
+            if (jdbcElement.hasAttribute("idle-maxsize")) {
+                try {
+                    maxIdle = Integer.parseInt(jdbcElement.getAttribute("idle-maxsize"));
+                } catch (NumberFormatException nfe) {
+                    Debug.logError("Problems with pool settings [idle-maxsize=" + jdbcElement.getAttribute("idle-maxsize") + "]; the values MUST be numbers, using calculated default of" + (maxIdle > minSize ? maxIdle : minSize) + ".", module);
+                } catch (Exception e) {
+                    Debug.logError("Problems with pool settings [idle-maxsize], using calculated default of" + (maxIdle > minSize ? maxIdle : minSize) + ".", module);
+                }
             }
             // Don't allow a maxIdle of less than pool-minsize
             maxIdle = maxIdle > minSize ? maxIdle : minSize;

Modified: ofbiz/branches/jackrabbit20100709/framework/entity/src/org/ofbiz/entity/util/EntityUtil.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/framework/entity/src/org/ofbiz/entity/util/EntityUtil.java?rev=1084863&r1=1084862&r2=1084863&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/framework/entity/src/org/ofbiz/entity/util/EntityUtil.java (original)
+++ ofbiz/branches/jackrabbit20100709/framework/entity/src/org/ofbiz/entity/util/EntityUtil.java Thu Mar 24 07:23:42 2011
@@ -369,6 +369,16 @@ public class EntityUtil {
         return result;
     }
 
+    public static List<GenericValue> getRelatedByAndCache(String relationName, Map<String, ? extends Object> fields, List<GenericValue> values) throws GenericEntityException {
+        if (values == null) return null;
+
+        List<GenericValue> result = FastList.newInstance();
+        for (GenericValue value: values) {
+            result.addAll(value.getRelatedByAndCache(relationName, fields));
+        }
+        return result;
+    }
+
     public static <T extends GenericEntity> List<T> filterByCondition(List<T> values, EntityCondition condition) {
         if (values == null) return null;
 

Modified: ofbiz/branches/jackrabbit20100709/framework/example/data/ExampleDemoData.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/framework/example/data/ExampleDemoData.xml?rev=1084863&r1=1084862&r2=1084863&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/framework/example/data/ExampleDemoData.xml (original)
+++ ofbiz/branches/jackrabbit20100709/framework/example/data/ExampleDemoData.xml Thu Mar 24 07:23:42 2011
@@ -63,4 +63,7 @@ under the License.
     <Example exampleId="EX10" exampleName="Example 10" exampleTypeId="MADE_UP" statusId="EXST_IN_DESIGN"/>
     <Example exampleId="EX11" exampleName="Example 11" exampleTypeId="INSPIRED" statusId="EXST_IN_DESIGN"/>
     <Example exampleId="EX12" exampleName="Example 12" exampleTypeId="INSPIRED" statusId="EXST_IN_DESIGN"/>
+
+    <!-- example test suite -->
+    <SeleniumTestSuitePath testSuiteId="EXAMPLE_TESTSUITE" testSuiteName="example_testsuite" testSuiteType="XML" testSuitePath="framework/testtools/testdef/seleniumxml/example/example_testsuite.xml" description="test suite for example component"/>
 </entity-engine-xml>

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=1084863&r1=1084862&r2=1084863&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/framework/example/webapp/example/flot/flotPie.ftl (original)
+++ ofbiz/branches/jackrabbit20100709/framework/example/webapp/example/flot/flotPie.ftl Thu Mar 24 07:23:42 2011
@@ -17,7 +17,7 @@ specific language governing permissions
 under the License.
 -->
 <script language="javascript" type="text/javascript" src="<@ofbizContentUrl>/images/jquery/plugins/flot/excanvas.min.js</@ofbizContentUrl>"></script>
-<script language="javascript" type="text/javascript" src="<@ofbizContentUrl>/images/jquery/jquery-1.4.2.min.js</@ofbizContentUrl>"></script>
+<script language="javascript" type="text/javascript" src="<@ofbizContentUrl>/images/jquery/jquery-1.5.1.min.js</@ofbizContentUrl>"></script>
 <script language="javascript" type="text/javascript" src="<@ofbizContentUrl>/images/jquery/plugins/flot/jquery.flot.js</@ofbizContentUrl>"></script>
 <script language="javascript" type="text/javascript" src="<@ofbizContentUrl>/images/jquery/plugins/flot/jquery.flot.pie.js</@ofbizContentUrl>"></script>
 

Modified: ofbiz/branches/jackrabbit20100709/framework/example/widget/example/CommonScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/framework/example/widget/example/CommonScreens.xml?rev=1084863&r1=1084862&r2=1084863&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/framework/example/widget/example/CommonScreens.xml (original)
+++ ofbiz/branches/jackrabbit20100709/framework/example/widget/example/CommonScreens.xml Thu Mar 24 07:23:42 2011
@@ -46,19 +46,7 @@ under the License.
                 <set field="applicationTitle" value="${uiLabelMap.ExampleApplication}" global="true"/>
             </actions>
             <widgets>
-                <decorator-screen name="GlobalDecorator" location="component://common/widget/CommonScreens.xml">
-                    <decorator-section name="pre-body">
-                        <decorator-section-include name="pre-body"/>
-                    </decorator-section>
-                    <decorator-section name="body">
-                        <container id="column-container">
-                            <container id="content-main-section">
-                                <decorator-section-include name="body"/>
-                            </container>
-                            <container style="clear"></container>
-                        </container>
-                    </decorator-section>
-                </decorator-screen>
+                <include-screen name="GlobalDecorator" location="component://common/widget/CommonScreens.xml"/>
             </widgets>
         </section>
     </screen>

Modified: ofbiz/branches/jackrabbit20100709/framework/example/widget/example/ExampleScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/framework/example/widget/example/ExampleScreens.xml?rev=1084863&r1=1084862&r2=1084863&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/framework/example/widget/example/ExampleScreens.xml (original)
+++ ofbiz/branches/jackrabbit20100709/framework/example/widget/example/ExampleScreens.xml Thu Mar 24 07:23:42 2011
@@ -39,7 +39,7 @@ under the License.
                             <widgets>
                                 <decorator-screen name="FindScreenDecorator" location="component://common/widget/CommonScreens.xml">
                                     <decorator-section name="menu-bar">
-                                        <container style="button-bar"><link target="EditExampleLayer" link-type="ajax-window" height="350" width="480" text="${uiLabelMap.ExampleNewExample}" style="buttontext create"/></container>
+                                        <container style="button-bar"><link target="EditExampleLayer" link-type="ajax-window" height="500" width="500" text="${uiLabelMap.ExampleNewExample}" style="buttontext create"/></container>
                                     </decorator-section>
                                     <decorator-section name="search-options">
                                         <include-form name="FindExamples" location="component://example/widget/example/ExampleForms.xml"/>
@@ -62,6 +62,8 @@ under the License.
     <screen name="EditExampleLayer">
         <section>
             <actions>
+                <property-map resource="ExampleUiLabels" map-name="uiLabelMap" global="true"/>
+                <property-map resource="CommonUiLabels" map-name="uiLabelMap" global="true"/>
                 <set field="titleProperty" value="PageTitleEditExample"/>
                 <set field="tabButtonItem" value="EditExample"/>
                 <set field="exampleId" from-field="parameters.exampleId"/>

Modified: ofbiz/branches/jackrabbit20100709/framework/example/widget/example/FormWidgetExampleForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/framework/example/widget/example/FormWidgetExampleForms.xml?rev=1084863&r1=1084862&r2=1084863&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/framework/example/widget/example/FormWidgetExampleForms.xml (original)
+++ ofbiz/branches/jackrabbit20100709/framework/example/widget/example/FormWidgetExampleForms.xml Thu Mar 24 07:23:42 2011
@@ -31,7 +31,7 @@ under the License.
         <field name="field1"
                title="${uiLabelMap.ExampleDateField1Title}"
                tooltip="${uiLabelMap.ExampleToDo}">
-            <date-time/>
+            <date-time mask="Y"/>
         </field>
         <!-- ***************** -->
         <!-- ***   field9  *** -->
@@ -238,7 +238,7 @@ under the License.
         </field>
         <!-- ****************************** -->
         <!-- *** Autocomplete dropdown *** -->
-        <!-- ****************************** -->        
+        <!-- ****************************** -->
         <!-- TODO : return only the Id, else you need to edit the field to remove the description -->
         <field name="emptyField1" title="${uiLabelMap.CommonEmptyHeader}"><display/></field>
         <field name="geoId" title="${uiLabelMap.ExampleAutocompleteDropdown}"
@@ -253,12 +253,12 @@ under the License.
         </field>
         <!-- ****************************** -->
         <!-- ***   Dependent dropdowns  *** -->
-        <!-- ****************************** -->        
+        <!-- ****************************** -->
         <field name="emptyField2" title="${uiLabelMap.CommonEmptyHeader}"><display/></field>
         <field name="dependendDropDownFields" title="${uiLabelMap.ExampleDependentDropDowns}">
             <display description="${uiLabelMap.ExampleDependentDropDownTooltip}"/>
         </field>
-        <field name="stateProvinceGeoId" title="${uiLabelMap.CommonState}" widget-style="required"><drop-down allow-empty="false"/></field>                      
+        <field name="stateProvinceGeoId" title="${uiLabelMap.CommonState}" widget-style="required"><drop-down allow-empty="false"/></field>
         <field name="countryGeoId" title="${uiLabelMap.CommonCountry}" tooltip="${uiLabelMap.CommonRequired}" widget-style="required">
             <drop-down no-current-selected-key="USA">
                 <entity-options entity-name="Geo" key-field-name="geoId" description="${geoName}">

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=1084863&r1=1084862&r2=1084863&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/framework/images/webapp/images/fieldlookup.js (original)
+++ ofbiz/branches/jackrabbit20100709/framework/images/webapp/images/fieldlookup.js Thu Mar 24 07:23:42 2011
@@ -255,7 +255,7 @@ function ConstructLookup(requestUrl, inp
             var requestUrlAndArgs = requestUrl;
             if (typeof args == "object" && jQuery.isArray(args)) {
                 for (var i = 0; i < args.length; i++) {
-                        requestUrlAndArgs += "&parm" + i + "=" + jQuery(args[i]).val();
+                        requestUrlAndArgs += "&parm" + (i+1) + "=" + jQuery(args[i]).val();
                 }
             }
             jQuery("#" + lookupId).load(requestUrlAndArgs, function(data){
@@ -310,7 +310,7 @@ function ConstructLookup(requestUrl, inp
     GLOBAL_LOOKUP_REF.setReference(lookupId, this);
     
     // bind click Event to Dialog button
-    jQuery("#" + lookupId + "_button").live('click',  
+    jQuery("#" + lookupId + "_button").click(
         function (){
             jQuery("#" + lookupId).dialog("open");
             jQuery("#" + lookupId).dialog(dialogOpts);

Modified: ofbiz/branches/jackrabbit20100709/framework/images/webapp/images/getDependentDropdownValues.js
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/framework/images/webapp/images/getDependentDropdownValues.js?rev=1084863&r1=1084862&r2=1084863&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/framework/images/webapp/images/getDependentDropdownValues.js (original)
+++ ofbiz/branches/jackrabbit20100709/framework/images/webapp/images/getDependentDropdownValues.js Thu Mar 24 07:23:42 2011
@@ -43,7 +43,6 @@ function getDependentDropdownValues(requ
             name: paramKey,
             value: jQuery('#' + paramField).val()
         }], // get requested value from parent drop-down field
-        dataType: 'json',
         async: false,
         type: 'POST',
         success: function(result){
@@ -117,7 +116,6 @@ function getServiceResult(request, param
         data: params,
         async: false,
         cache: false,
-        dataType: 'json',
         success: function(result){
             data = result;
         }
@@ -125,7 +123,7 @@ function getServiceResult(request, param
     return data;
 }
 
-//*** checkUomConversion returns true if an UomConversion exists
+//*** checkUomConversion returns true if an UomConversion exists
 function checkUomConversion(request, params){
     data = getServiceResult(request, params);
     return data['exist'];

Modified: ofbiz/branches/jackrabbit20100709/framework/images/webapp/images/jquery/plugins/flot/API.txt
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/framework/images/webapp/images/jquery/plugins/flot/API.txt?rev=1084863&r1=1084862&r2=1084863&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/framework/images/webapp/images/jquery/plugins/flot/API.txt (original)
+++ ofbiz/branches/jackrabbit20100709/framework/images/webapp/images/jquery/plugins/flot/API.txt Thu Mar 24 07:23:42 2011
@@ -172,6 +172,7 @@ Customizing the axes
 ====================
 
   xaxis, yaxis: {
+    show: null or true/false
     position: "bottom" or "top" or "left" or "right"
     mode: null or "time"
 
@@ -193,6 +194,7 @@ Customizing the axes
 
     labelWidth: null or number
     labelHeight: null or number
+    reserveSpace: null or true
     
     tickLength: null or number
 
@@ -203,6 +205,11 @@ All axes have the same kind of options.
 configure one axis, see below for what to do if you've got more than
 one x axis or y axis.
 
+If you don't set the "show" option (i.e. it is null), visibility is
+auto-detected, i.e. the axis will show up if there's data associated
+with it. You can override this by setting the "show" option to true or
+false.
+
 The "position" option specifies where the axis is placed, bottom or
 top for x axes, left or right for y axes. The "mode" option determines
 how the data is interpreted, the default of null means as decimal
@@ -217,7 +224,10 @@ transparency).
 
 The options "min"/"max" are the precise minimum/maximum value on the
 scale. If you don't specify either of them, a value will automatically
-be chosen based on the minimum/maximum data values.
+be chosen based on the minimum/maximum data values. Note that Flot
+always examines all the data values you feed to it, even if a
+restriction on another axis may make some of them invisible (this
+makes interactive use more stable).
 
 The "autoscaleMargin" is a bit esoteric: it's the fraction of margin
 that the scaling algorithm will add to avoid that the outermost points
@@ -240,6 +250,14 @@ into a natural logarithm axis with the f
     inverseTransform: function (v) { return Math.exp(v); }
   }
 
+Similarly, for reversing the y axis so the values appear in inverse
+order:
+  
+  yaxis: {
+    transform: function (v) { return -v; },
+    inverseTransform: function (v) { return -v; }
+  }
+
 Note that for finding extrema, Flot assumes that the transform
 function does not reorder values (it should be monotone).
 
@@ -303,7 +321,7 @@ number of decimals to display (default i
 
 Alternatively, for ultimate control over how ticks are formatted you can
 provide a function to "tickFormatter". The function is passed two
-parameters, the tick value and an "axis" object with information, and
+parameters, the tick value and an axis object with information, and
 should return a string. The default formatter looks like this:
 
   function formatter(val, axis) {
@@ -327,7 +345,9 @@ an example of a custom formatter:
 
 "labelWidth" and "labelHeight" specifies a fixed size of the tick
 labels in pixels. They're useful in case you need to align several
-plots.
+plots. "reserveSpace" means that even if an axis isn't shown, Flot
+should reserve space for it - it is useful in combination with
+labelWidth and labelHeight for aligning multi-axis charts.
 
 "tickLength" is the length of the tick lines in pixels. By default, the
 innermost axes will have ticks that extend all across the plot, while
@@ -637,6 +657,7 @@ Customizing the grid
     markings: array of markings or (fn: axes -> array of markings)
     borderWidth: number
     borderColor: color or null
+    minBorderMargin: number or null
     clickable: boolean
     hoverable: boolean
     autoHighlight: boolean
@@ -658,9 +679,14 @@ above the data or below (below is defaul
 line, and "axisMargin" is the space in pixels between axes when there
 are two next to each other. Note that you can style the tick labels
 with CSS, e.g. to change the color. They have class "tickLabel".
+
 "borderWidth" is the width of the border around the plot. Set it to 0
 to disable the border. You can also set "borderColor" if you want the
 border to have a different color than the grid lines.
+"minBorderMargin" controls the default minimum margin around the
+border - it's used to make sure that points aren't accidentally
+clipped by the canvas edge so by default the value is computed from
+the point radius.
 
 "markings" is used to draw simple lines and rectangular areas in the
 background of the plot. You can either specify an array of ranges on
@@ -851,7 +877,8 @@ can call:
     interactive things like a selection and point highlights. This
     is mostly useful for writing plugins. The redraw doesn't happen
     immediately, instead a timer is set to catch multiple successive
-    redraws (e.g. from a mousemove).
+    redraws (e.g. from a mousemove). You can get to the overlay by
+    setting up a drawOverlay hook.
 
   - width()/height()
 
@@ -874,7 +901,19 @@ can call:
 
       o = pointOffset({ x: xpos, y: ypos, xaxis: 2, yaxis: 3 })
       // o.left and o.top now contains the offset within the div
-  
+
+  - resize()
+
+    Tells Flot to resize the drawing canvas to the size of the
+    placeholder. You need to run setupGrid() and draw() afterwards as
+    canvas resizing is a destructive operation. This is used
+    internally by the resize plugin.
+
+  - shutdown()
+
+    Cleans up any event handlers Flot has currently registered. This
+    is used internally.
+
 
 There are also some members that let you peek inside the internal
 workings of Flot which is useful in some cases. Note that if you change
@@ -914,7 +953,8 @@ Flot to keep track of its state, so be c
 
     With multiple axes, the extra axes are returned as x2axis, x3axis,
     etc., e.g. getAxes().y2axis is the second y axis. You can check
-    y2axis.used to see whether the axis is actually in use or not.
+    y2axis.used to see whether the axis is associated with any data
+    points and y2axis.show to see if it is currently shown.
 
   - getPlaceholder()
 
@@ -936,8 +976,11 @@ Flot to keep track of its state, so be c
 
   - getOptions()
 
-    Gets the options for the plot, in a normalized format with default
-    values filled in.
+    Gets the options for the plot, normalized, with default values
+    filled in. You get a reference to actual values used by Flot, so
+    if you modify the values in here, Flot will use the new values.
+    If you change something, you probably have to call draw() or
+    setupGrid() or triggerRedrawOverlay() to see the change.
     
 
 Hooks
@@ -967,6 +1010,8 @@ Here's an overview of the phases Flot go
 
   7. Responding to events, if any
 
+  8. Shutdown: this mostly happens in case a plot is overwritten
+
 Each hook is simply a function which is put in the appropriate array.
 You can add them through the "hooks" option, and they are also available
 after the plot is constructed as the "hooks" attribute on the returned
@@ -1115,6 +1160,16 @@ hooks in the plugins bundled with Flot.
    crosshair plugin for an example.
 
 
+ - shutdown  [phase 8]
+
+   function (plot, eventHolder)
+
+   Run when plot.shutdown() is called, which usually only happens in
+   case a plot is overwritten by a new plot. If you're writing a
+   plugin that adds extra DOM elements or event handlers, you should
+   add a callback to clean up after you. Take a look at the section in
+   PLUGINS.txt for more info.
+
   
 Plugins
 -------
@@ -1132,9 +1187,15 @@ Here's a brief explanation of how the pl
 Each plugin registers itself in the global array $.plot.plugins. When
 you make a new plot object with $.plot, Flot goes through this array
 calling the "init" function of each plugin and merging default options
-from its "option" attribute. The init function gets a reference to the
-plot object created and uses this to register hooks and add new public
-methods if needed.
+from the "option" attribute of the plugin. The init function gets a
+reference to the plot object created and uses this to register hooks
+and add new public methods if needed.
 
 See the PLUGINS.txt file for details on how to write a plugin. As the
 above description hints, it's actually pretty easy.
+
+
+Version number
+--------------
+
+The version number of Flot is available in $.plot.version.

Modified: ofbiz/branches/jackrabbit20100709/framework/images/webapp/images/jquery/plugins/flot/NEWS.txt
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/framework/images/webapp/images/jquery/plugins/flot/NEWS.txt?rev=1084863&r1=1084862&r2=1084863&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/framework/images/webapp/images/jquery/plugins/flot/NEWS.txt (original)
+++ ofbiz/branches/jackrabbit20100709/framework/images/webapp/images/jquery/plugins/flot/NEWS.txt Thu Mar 24 07:23:42 2011
@@ -22,8 +22,11 @@ becomes
 Note that if you're just using one axis, continue to use the
 xaxis/yaxis directly (it now sets the default settings for the
 arrays). Plugins touching the axes must be ported to take the extra
-axes into account, a couple of helper functions have been added for
-that purpose, check the source.
+axes into account, check the source to see some examples.
+
+A related change is that the visibility of axes is now auto-detected.
+So if you were relying on an axis to show up even without any data in
+the chart, you now need to set the axis "show" option explicitly.
 
 "tickColor" on the grid options is now deprecated in favour of a
 corresponding option on the axes, so { grid: { tickColor: "#000" }}
@@ -32,6 +35,15 @@ but if you just configure a base color F
 tick color by adding transparency. Backwards-compatibility hooks are
 in place.
 
+Final note: now that IE 9 is coming out with canvas support, you may
+want to adapt the excanvas include to skip loading it in IE 9 (the
+examples have been adapted thanks to Ryley Breiddal). An alternative
+to excanvas using Flash has also surfaced, if your graphs are slow in
+IE, you may want to give it a spin:
+
+  http://code.google.com/p/flashcanvas/
+
+
 Changes:
 
 - Support for specifying a bottom for each point for line charts when
@@ -67,8 +79,31 @@ Changes:
 - Support for customizing the point type through a callback when
   plotting points and new symbol plugin with some predefined point
   types (sponsored by Utility Data Corporation).
+- Resize plugin for automatically redrawing when the placeholder
+  changes size, e.g. on window resizes (sponsored by Novus Partners).
+  A resize() method has been added to plot object facilitate this.
+- Support Infinity/-Infinity for plotting asymptotes by hacking it
+  into +/-Number.MAX_VALUE (reported by rabaea.mircea).
+- Support for restricting navigate plugin to not pan/zoom an axis (based
+  on patch by kkaefer).
+- Support for providing the drag cursor for the navigate plugin as an
+  option (based on patch by Kelly T. Moore).
+- Options for controlling whether an axis is shown or not (suggestion
+  by Timo Tuominen) and whether to reserve space for it even if it
+  isn't shown.
+- New attribute $.plot.version with the Flot version as a string.
+- The version comment is now included in the minified jquery.flot.min.js.
+- New options.grid.minBorderMargin for adjusting the minimum margin
+  provided around the border (based on patch by corani, issue 188).
+- Refactor replot behaviour so Flot tries to reuse the existing
+  canvas, adding shutdown() methods to the plot (based on patch by
+  Ryley Breiddal, issue 269). This prevents a memory leak in Chrome
+  and hopefully makes replotting faster for those who are using $.plot
+  instead of .setData()/.draw(). Also update jQuery to 1.5.1 to
+  prevent IE leaks fixed in jQuery.
+- New real-time line chart example.
 
-- New hooks: drawSeries
+- New hooks: drawSeries, shutdown
 
 Bug fixes:
 
@@ -80,7 +115,8 @@ Bug fixes:
 - Fixed a problem introduced in 0.6 with specifying a gradient with {
   brightness: x, opacity: y }.
 - Don't use $.browser.msie, check for getContext on the created canvas
-  element instead and try to use excanvas if it's not found.
+  element instead and try to use excanvas if it's not found (fixes IE
+  9 compatibility).
 - highlight(s, index) was looking up the point in the original s.data
   instead of in the computed datapoints array, which breaks with
   plugins that modify the datapoints (such as the stacking plugin).
@@ -93,9 +129,42 @@ Bug fixes:
   plugin, to guard against errors when synchronizing plots (fix by Lau
   Bech Lauritzen).
 - Fix bug in crosshair code with mouseout resetting the crosshair even
-  if it is locked (fix by Lau Bech Lauritzen).
+  if it is locked (fix by Lau Bech Lauritzen and Banko Adam).
 - Fix bug with points plotting using line width from lines rather than
   points.
+- Fix bug with passing non-array 0 data (for plugins that don't expect
+  arrays, patch by vpapp1).
+- Fix errors in JSON in examples so they work with jQuery 1.4.2
+  (fix reported by honestbleeps, issue 357).
+- Fix bug with tooltip in interacting.html, this makes the tooltip
+  much smoother (fix by bdkahn). Fix related bug inside highlighting
+  handler in Flot.
+- Use closure trick to make inline colorhelpers plugin respect
+  jQuery.noConflict(true), renaming the global jQuery object (reported
+  by Nick Stielau).
+- Listen for mouseleave events and fire a plothover event with empty
+  item when it occurs to drop highlights when the mouse leaves the
+  plot (reported by by outspirit).
+- Fix bug with using aboveData with a background (reported by
+  amitayd).
+- Fix possible excanvas leak (report and suggested fix by tom9729).
+- Fix bug with backwards compatibility for shadowSize = 0 (report and
+  suggested fix by aspinak).
+- Adapt examples to skip loading excanvas (fix by Ryley Breiddal).
+- Fix bug that prevent a simple f(x) = -x transform from working
+  correctly (fix by Mike, issue 263).
+- Fix bug in restoring cursor in navigate plugin (reported by Matteo
+  Gattanini, issue 395).
+- Fix bug in picking items when transform/inverseTransform is in use
+  (reported by Ofri Raviv, and patches and analysis by Jan and Tom
+  Paton, issue 334 and 467).
+- Fix problem with unaligned ticks and hover/click events caused by
+  padding on the placeholder by hardcoding the placeholder padding to
+  0 (reported by adityadineshsaxena, Matt Sommer, Daniel Atos and some
+  other people, issue 301).
+- Update colorhelpers plugin to avoid dying when trying to parse an
+  invalid string (reported by cadavor, issue 483).
+
 
 Flot 0.6
 --------

Modified: ofbiz/branches/jackrabbit20100709/framework/images/webapp/images/jquery/plugins/flot/PLUGINS.txt
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/framework/images/webapp/images/jquery/plugins/flot/PLUGINS.txt?rev=1084863&r1=1084862&r2=1084863&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/framework/images/webapp/images/jquery/plugins/flot/PLUGINS.txt (original)
+++ ofbiz/branches/jackrabbit20100709/framework/images/webapp/images/jquery/plugins/flot/PLUGINS.txt Thu Mar 24 07:23:42 2011
@@ -1,20 +1,22 @@
 Writing plugins
 ---------------
 
-To make a new plugin, create an init function and a set of options (if
-needed), stuff it into an object and put it in the $.plot.plugins
-array. For example:
-
-  function myCoolPluginInit(plot) { plot.coolstring = "Hello!" };
-  var myCoolOptions = { coolstuff: { show: true } }
-  $.plot.plugins.push({ init: myCoolPluginInit, options: myCoolOptions });
+All you need to do to make a new plugin is creating an init function
+and a set of options (if needed), stuffing it into an object and
+putting it in the $.plot.plugins array. For example:
 
-  // now when $.plot is called, the returned object will have the
+  function myCoolPluginInit(plot) {
+    plot.coolstring = "Hello!";
+  };
+
+  $.plot.plugins.push({ init: myCoolPluginInit, options: { ... } });
+
+  // if $.plot is called, it will return a plot object with the
   // attribute "coolstring"
 
 Now, given that the plugin might run in many different places, it's
-a good idea to avoid leaking names. We can avoid this by wrapping the
-above lines in an anonymous function which we call immediately, like
+a good idea to avoid leaking names. The usual trick here is wrap the
+above lines in an anonymous function which is called immediately, like
 this: (function () { inner code ... })(). To make it even more robust
 in case $ is not bound to jQuery but some other Javascript library, we
 can write it as
@@ -24,6 +26,13 @@ can write it as
     // ...
   })(jQuery);
 
+There's a complete example below, but you should also check out the
+plugins bundled with Flot.
+
+
+Complete example
+----------------
+  
 Here is a simple debug plugin which alerts each of the series in the
 plot. It has a single option that control whether it is enabled and
 how much info to output:
@@ -75,16 +84,41 @@ This simple plugin illustrates a couple
  - Variables in the init function can be used to store plot-specific
    state between the hooks.
 
+The two last points are important because there may be multiple plots
+on the same page, and you'd want to make sure they are not mixed up.
+
+
+Shutting down a plugin
+----------------------
+
+Each plot object has a shutdown hook which is run when plot.shutdown()
+is called. This usually mostly happens in case another plot is made on
+top of an existing one.
+
+The purpose of the hook is to give you a chance to unbind any event
+handlers you've registered and remove any extra DOM things you've
+inserted.
+
+The problem with event handlers is that you can have registered a
+handler which is run in some point in the future, e.g. with
+setTimeout(). Meanwhile, the plot may have been shutdown and removed,
+but because your event handler is still referencing it, it can't be
+garbage collected yet, and worse, if your handler eventually runs, it
+may overwrite stuff on a completely different plot.
+
 
-Options guidelines
-==================
+Some hints on the options
+-------------------------
   
 Plugins should always support appropriate options to enable/disable
 them because the plugin user may have several plots on the same page
-where only one should use the plugin.
-
-If the plugin needs series-specific options, you can put them in
-"series" in the options object, e.g.
+where only one should use the plugin. In most cases it's probably a
+good idea if the plugin is turned off rather than on per default, just
+like most of the powerful features in Flot.
+
+If the plugin needs options that are specific to each series, like the
+points or lines options in core Flot, you can put them in "series" in
+the options object, e.g.
 
   var options = {
     series: {
@@ -95,10 +129,8 @@ If the plugin needs series-specific opti
     }
   }
 
-Then they will be copied by Flot into each series, providing the
-defaults in case the plugin user doesn't specify any. Again, in most
-cases it's probably a good idea if the plugin is turned off rather
-than on per default, just like most of the powerful features in Flot.
+Then they will be copied by Flot into each series, providing default
+values in case none are specified.
 
 Think hard and long about naming the options. These names are going to
 be public API, and code is going to depend on them if the plugin is

Modified: ofbiz/branches/jackrabbit20100709/framework/images/webapp/images/jquery/plugins/flot/README.txt
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/framework/images/webapp/images/jquery/plugins/flot/README.txt?rev=1084863&r1=1084862&r2=1084863&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/framework/images/webapp/images/jquery/plugins/flot/README.txt (original)
+++ ofbiz/branches/jackrabbit20100709/framework/images/webapp/images/jquery/plugins/flot/README.txt Thu Mar 24 07:23:42 2011
@@ -16,20 +16,29 @@ Installation
 
 Just include the Javascript file after you've included jQuery.
 
-Note that you need to get a version of Excanvas (e.g. the one bundled
-with Flot) which is canvas emulation on Internet Explorer. You can
+Generally, all browsers that support the HTML5 canvas tag are
+supported.
+
+For support for Internet Explorer < 9, you can use Excanvas, a canvas
+emulator; this is used in the examples bundled with Flot. You just
 include the excanvas script like this:
 
-  <!--[if IE]><script language="javascript" type="text/javascript" src="excanvas.pack.js"></script><![endif]-->
+  <!--[if lte IE 8]><script language="javascript" type="text/javascript" src="excanvas.min.js"></script><![endif]-->
 
 If it's not working on your development IE 6.0, check that it has
-support for VML which excanvas is relying on. It appears that some
+support for VML which Excanvas is relying on. It appears that some
 stripped down versions used for test environments on virtual machines
 lack the VML support.
-  
-Also note that you need at least jQuery 1.2.6 (but at least jQuery
-1.3.2 is recommended for interactive charts because of performance
-improvements in event handling).
+
+You can also try using Flashcanvas (see
+http://code.google.com/p/flashcanvas/), which uses Flash to do the
+emulation. Although Flash can be a bit slower to load than VML, if
+you've got a lot of points, the Flash version can be much faster
+overall. Flot contains some wrapper code for activating Excanvas which
+Flashcanvas is compatible with.
+
+You need at least jQuery 1.2.6, but try at least 1.3.2 for interactive
+charts because of performance improvements in event handling.
 
 
 Basic usage

Modified: ofbiz/branches/jackrabbit20100709/framework/images/webapp/images/jquery/plugins/flot/jquery.colorhelpers.js
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/framework/images/webapp/images/jquery/plugins/flot/jquery.colorhelpers.js?rev=1084863&r1=1084862&r2=1084863&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/framework/images/webapp/images/jquery/plugins/flot/jquery.colorhelpers.js (original)
+++ ofbiz/branches/jackrabbit20100709/framework/images/webapp/images/jquery/plugins/flot/jquery.colorhelpers.js Thu Mar 24 07:23:42 2011
@@ -1,6 +1,6 @@
 /* Plugin for jQuery for working with colors.
  *
- * Version 1.0.
+ * Version 1.1.
  *
  * Inspiration from jQuery color animation plugin by John Resig.
  *
@@ -13,15 +13,18 @@
  *   console.log(c.r, c.g, c.b, c.a);
  *   $.color.make(100, 50, 25, 0.4).toString() // returns "rgba(100,50,25,0.4)"
  *
- * Note that .scale() and .add() work in-place instead of returning
- * new objects.
+ * Note that .scale() and .add() return the same modified object
+ * instead of making a new one.
+ *
+ * V. 1.1: Fix error handling so e.g. parsing an empty string does
+ * produce a color rather than just crashing.
  */
 
-(function() {
-    jQuery.color = {};
+(function($) {
+    $.color = {};
 
     // construct color object with some convenient chainable helpers
-    jQuery.color.make = function (r, g, b, a) {
+    $.color.make = function (r, g, b, a) {
         var o = {};
         o.r = r || 0;
         o.g = g || 0;
@@ -61,7 +64,7 @@
         };
 
         o.clone = function () {
-            return jQuery.color.make(o.r, o.b, o.g, o.a);
+            return $.color.make(o.r, o.b, o.g, o.a);
         };
 
         return o.normalize();
@@ -69,7 +72,7 @@
 
     // extract CSS color property from element, going up in the DOM
     // if it's "transparent"
-    jQuery.color.extract = function (elem, css) {
+    $.color.extract = function (elem, css) {
         var c;
         do {
             c = elem.css(css).toLowerCase();
@@ -78,19 +81,20 @@
             if (c != '' && c != 'transparent')
                 break;
             elem = elem.parent();
-        } while (!jQuery.nodeName(elem.get(0), "body"));
+        } while (!$.nodeName(elem.get(0), "body"));
 
         // catch Safari's way of signalling transparent
         if (c == "rgba(0, 0, 0, 0)")
             c = "transparent";
         
-        return jQuery.color.parse(c);
+        return $.color.parse(c);
     }
     
     // parse CSS color string (like "rgb(10, 32, 43)" or "#fff"),
-    // returns color object
-    jQuery.color.parse = function (str) {
-        var res, m = jQuery.color.make;
+    // returns color object, if parsing failed, you get black (0, 0,
+    // 0) out
+    $.color.parse = function (str) {
+        var res, m = $.color.make;
 
         // Look for rgb(num,num,num)
         if (res = /rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(str))
@@ -117,11 +121,12 @@
             return m(parseInt(res[1]+res[1], 16), parseInt(res[2]+res[2], 16), parseInt(res[3]+res[3], 16));
 
         // Otherwise, we're most likely dealing with a named color
-        var name = jQuery.trim(str).toLowerCase();
+        var name = $.trim(str).toLowerCase();
         if (name == "transparent")
             return m(255, 255, 255, 0);
         else {
-            res = lookupColors[name];
+            // default to black
+            res = lookupColors[name] || [0, 0, 0];
             return m(res[0], res[1], res[2]);
         }
     }
@@ -170,5 +175,5 @@
         silver:[192,192,192],
         white:[255,255,255],
         yellow:[255,255,0]
-    };    
-})();
+    };
+})(jQuery);

Modified: ofbiz/branches/jackrabbit20100709/framework/images/webapp/images/jquery/plugins/flot/jquery.flot.crosshair.js
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/framework/images/webapp/images/jquery/plugins/flot/jquery.flot.crosshair.js?rev=1084863&r1=1084862&r2=1084863&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/framework/images/webapp/images/jquery/plugins/flot/jquery.flot.crosshair.js (original)
+++ ofbiz/branches/jackrabbit20100709/framework/images/webapp/images/jquery/plugins/flot/jquery.flot.crosshair.js Thu Mar 24 07:23:42 2011
@@ -90,34 +90,37 @@ The plugin also adds four public methods
             crosshair.locked = false;
         }
 
-        plot.hooks.bindEvents.push(function (plot, eventHolder) {
-            if (!plot.getOptions().crosshair.mode)
+        function onMouseOut(e) {
+            if (crosshair.locked)
                 return;
 
-            eventHolder.mouseout(function () {
-                if (crosshair.locked)
-                    return;
-
-                if (crosshair.x != -1) {
-                    crosshair.x = -1;
-                    plot.triggerRedrawOverlay();
-                }
-            });
-            
-            eventHolder.mousemove(function (e) {
-                if (crosshair.locked)
-                    return;
+            if (crosshair.x != -1) {
+                crosshair.x = -1;
+                plot.triggerRedrawOverlay();
+            }
+        }
+
+        function onMouseMove(e) {
+            if (crosshair.locked)
+                return;
                 
-                if (plot.getSelection && plot.getSelection()) {
-                    crosshair.x = -1; // hide the crosshair while selecting
-                    return;
-                }
+            if (plot.getSelection && plot.getSelection()) {
+                crosshair.x = -1; // hide the crosshair while selecting
+                return;
+            }
                 
-                var offset = plot.offset();
-                crosshair.x = Math.max(0, Math.min(e.pageX - offset.left, plot.width()));
-                crosshair.y = Math.max(0, Math.min(e.pageY - offset.top, plot.height()));
-                plot.triggerRedrawOverlay();
-            });
+            var offset = plot.offset();
+            crosshair.x = Math.max(0, Math.min(e.pageX - offset.left, plot.width()));
+            crosshair.y = Math.max(0, Math.min(e.pageY - offset.top, plot.height()));
+            plot.triggerRedrawOverlay();
+        }
+        
+        plot.hooks.bindEvents.push(function (plot, eventHolder) {
+            if (!plot.getOptions().crosshair.mode)
+                return;
+
+            eventHolder.mouseout(onMouseOut);
+            eventHolder.mousemove(onMouseMove);
         });
 
         plot.hooks.drawOverlay.push(function (plot, ctx) {
@@ -148,6 +151,11 @@ The plugin also adds four public methods
             }
             ctx.restore();
         });
+
+        plot.hooks.shutdown.push(function (plot, eventHolder) {
+            eventHolder.unbind("mouseout", onMouseOut);
+            eventHolder.unbind("mousemove", onMouseMove);
+        });
     }
     
     $.plot.plugins.push({