If quick adding failed due to parse errors, show event form with the entered text.
authorJan Schneider <jan@horde.org>
Tue, 25 May 2010 22:20:39 +0000 (00:20 +0200)
committerJan Schneider <jan@horde.org>
Tue, 25 May 2010 22:20:39 +0000 (00:20 +0200)
kronolith/js/kronolith.js

index 44533b8..762e59d 100644 (file)
@@ -4478,7 +4478,7 @@ KronolithCore = {
             }.bind(this));
     },
 
-    editEvent: function(calendar, id, date)
+    editEvent: function(calendar, id, date, title)
     {
         if (this.redBoxLoading) {
             return;
@@ -4539,6 +4539,9 @@ KronolithCore = {
             } else {
                 d = new Date();
             }
+            if (title) {
+                $('kronolithEventTitle').setValue(title);
+            }
             $('kronolithEventId').clear();
             $('kronolithEventCalendar').clear();
             $('kronolithEventTarget').setValue(Kronolith.conf.default_calendar);
@@ -4612,7 +4615,9 @@ KronolithCore = {
                       }),
                       function(r) {
                           this.loadEventsCallback(r);
-                          if (!r.msgs.size()) {
+                          if (r.msgs.size()) {
+                              this.editEvent(null, null, null, text);
+                          } else {
                               $('kronolithQuickinsertQ').value = '';
                           }
                       }.bind(this));