Author: michiel
Date: 2010-03-17 13:30:22 +0100 (Wed, 17 Mar 2010)
New Revision: 41461

Modified:
   
mmbase/branches/MMBase-1_9/applications/searchrelate/src/main/webapp/mmbase/searchrelate/List.js.jsp
Log:
sometimes you get the 'Cannot leave because still saving' message. Simply don't 
commit if a commit is sill running will fix it

Modified: 
mmbase/branches/MMBase-1_9/applications/searchrelate/src/main/webapp/mmbase/searchrelate/List.js.jsp
===================================================================
--- 
mmbase/branches/MMBase-1_9/applications/searchrelate/src/main/webapp/mmbase/searchrelate/List.js.jsp
        2010-03-17 12:22:31 UTC (rev 41460)
+++ 
mmbase/branches/MMBase-1_9/applications/searchrelate/src/main/webapp/mmbase/searchrelate/List.js.jsp
        2010-03-17 12:30:22 UTC (rev 41461)
@@ -3,7 +3,7 @@
 %><%...@taglib uri="http://www.mmbase.org/mmbase-taglib-2.0"; prefix="mm"
 %><%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt";
 %><fmt:bundle basename="org.mmbase.searchrelate.resources.searchrelate">
-<mm:content type="text/javascript" expires="0">
+<mm:content type="text/javascript">
  *
  * This javascript binds to a div.list. It happens on document.ready on every 
div.list in the document. You can also call {...@link #init} manually, e.g. 
after an AJAX load.
  *
@@ -696,6 +696,10 @@
 List.prototype.commit = function(stale, leavePage) {
     var result;
     var self = this;
+    if (this.saving) {
+        // already saving right now
+        return;
+    }
     if(this.needsCommit() && ! List.prototype.leftPage) {
 
         if (this.valid) {
@@ -723,10 +727,6 @@
                         params[this.name || this.id || this.parentNode.name || 
this.parentNode.id ] = $(this).val();
                 });
 
-
-
-
-                var self = this;
                 this.loader();
                 $(self.div).trigger("mmsrStartSave", [self]);
                 result = null;

_______________________________________________
Cvs mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/cvs

Reply via email to