summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Bruederli <bruederli@kolabsys.com>2015-03-18 11:23:10 (GMT)
committerThomas Bruederli <bruederli@kolabsys.com>2015-03-18 11:23:10 (GMT)
commit17867bb2773db75e61ba2226336d5802118e85c2 (patch)
tree6bcbec4168550f70081dd7cbf6d7e519e0f7df5b
parentd967c60e222a63c38434f35e51b0d60ceb51cc20 (diff)
downloadroundcubemail-plugins-kolab-17867bb2773db75e61ba2226336d5802118e85c2.tar.gz
Don't show error dialog if event history is not available. Show message box inside the existing dialog (#4018)
-rw-r--r--plugins/calendar/calendar.php1
-rw-r--r--plugins/calendar/calendar_ui.js7
2 files changed, 5 insertions, 3 deletions
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
}