plugins/calendar

Thomas Brüderli bruederli at kolabsys.com
Wed Mar 18 12:24:08 CET 2015


 plugins/calendar/calendar.php   |    1 -
 plugins/calendar/calendar_ui.js |    7 +++++--
 2 files changed, 5 insertions(+), 3 deletions(-)

New commits:
commit 17867bb2773db75e61ba2226336d5802118e85c2
Author: Thomas Bruederli <bruederli at kolabsys.com>
Date:   Wed Mar 18 12:23:10 2015 +0100

    Don't show error dialog if event history is not available. Show message box inside the existing dialog (#4018)

diff --git a/plugins/calendar/calendar.php b/plugins/calendar/calendar.php
index e3d152a..c4a6656 100644
--- a/plugins/calendar/calendar.php
+++ b/plugins/calendar/calendar.php
@@ -1068,7 +1068,6 @@ class calendar extends rcube_plugin
         }
         else {
           $this->rc->output->command('plugin.render_event_changelog', false);
-          $this->rc->output->command('display_message', $this->gettext('eventchangelognotavailable'), 'error');
         }
         $got_msg = true;
         $reload = false;
diff --git a/plugins/calendar/calendar_ui.js b/plugins/calendar/calendar_ui.js
index aa3973e..9d0c919 100644
--- a/plugins/calendar/calendar_ui.js
+++ b/plugins/calendar/calendar_ui.js
@@ -1034,7 +1034,8 @@ function rcube_calendar_ui(settings)
       };
 
       // hide and reset changelog table
-      $('#event-changelog-table').children('tbody')
+      $('div.event-dialog-message').remove();
+      $('#event-changelog-table').show().children('tbody')
         .html('<tr><td colspan="6"><span class="loading">'+ rcmail.gettext('loading') +'</span></td></tr>');
 
       // open jquery UI dialog
@@ -1124,7 +1125,9 @@ function rcube_calendar_ui(settings)
       var $dialog = $('#eventhistory');
 
       if (data === false || !data.length) {
-        $dialog.dialog('close');
+        // display 'unavailable' message
+        $('<div class="event-dialog-message warning">'+ rcmail.gettext('eventchangelognotavailable','calendar') +'</div>')
+          .insertBefore($('#event-changelog-table').hide());
         return
       }
 




More information about the commits mailing list