Don't show error dialog if event history is not available. Show message box inside the existing dialog (#4018)
This commit is contained in:
parent
d967c60e22
commit
17867bb277
2 changed files with 5 additions and 3 deletions
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue