Go back in history after closing event form.
authorJan Schneider <jan@horde.org>
Mon, 12 Oct 2009 17:03:43 +0000 (19:03 +0200)
committerJan Schneider <jan@horde.org>
Mon, 12 Oct 2009 17:16:59 +0000 (19:16 +0200)
kronolith/js/kronolith.js

index 382011e..3469154 100644 (file)
@@ -1760,6 +1760,10 @@ KronolithCore = {
                 case 'kronolithQuickinsertForm':
                     $('kronolithQuickinsert').fade();
                     break;
+                case 'kronolithEventForm':
+                    this._closeRedBox();
+                    window.history.back();
+                    break;
                 }
                 break;
             }
@@ -1851,11 +1855,13 @@ KronolithCore = {
                               }.bind(this));
                 $('kronolithBody').select('div[calendar=' + cal + '][eventid=' + eventid + ']').invoke('hide');
                 this._closeRedBox();
+                window.history.back();
                 e.stop();
                 return;
 
             case 'kronolithEventCancel':
                 this._closeRedBox();
+                window.history.back();
                 e.stop();
                 return;
 
@@ -2149,6 +2155,7 @@ KronolithCore = {
                           }
                           this._loadEventsCallback(r);
                           this._closeRedBox();
+                          window.history.back();
                       }.bind(this));
     },
 
@@ -2198,6 +2205,7 @@ KronolithCore = {
     {
         if (!r.response.event) {
             RedBox.close();
+            window.history.back();
             return;
         }