Fix redundant HTTP requests when opening/closing "Add a note" dialog (#4187)
This commit is contained in:
parent
e7eed4dff1
commit
78f9de6d3c
1 changed files with 2 additions and 3 deletions
|
@ -49,8 +49,7 @@ window.rcmail && rcmail.addEventListener('init', function(evt) {
|
||||||
.attr('name', 'kolabnotesdialog')
|
.attr('name', 'kolabnotesdialog')
|
||||||
.attr('src', 'about:blank')
|
.attr('src', 'about:blank')
|
||||||
.css('min-width', '100%')
|
.css('min-width', '100%')
|
||||||
.appendTo(document.body)
|
.on('load', function(e) {
|
||||||
.bind('load', function(e){
|
|
||||||
frame = rcmail.get_frame_window('kolabnotesinlinegui');
|
frame = rcmail.get_frame_window('kolabnotesinlinegui');
|
||||||
name = $('.notetitle', frame.rcmail.gui_objects.noteviewtitle);
|
name = $('.notetitle', frame.rcmail.gui_objects.noteviewtitle);
|
||||||
frame.rcmail.addEventListener('responseafteraction', refresh_mailview);
|
frame.rcmail.addEventListener('responseafteraction', refresh_mailview);
|
||||||
|
@ -111,7 +110,7 @@ window.rcmail && rcmail.addEventListener('init', function(evt) {
|
||||||
$dialog.parent().find('.ui-dialog-buttonset .ui-button').prop('disabled', true).first().addClass('mainaction');
|
$dialog.parent().find('.ui-dialog-buttonset .ui-button').prop('disabled', true).first().addClass('mainaction');
|
||||||
},
|
},
|
||||||
close: function() {
|
close: function() {
|
||||||
$dialog.dialog('destroy').remove();
|
$dialog.dialog('destroy');
|
||||||
rcmail.removeEventListener('kolab_notes_render', dialog_render);
|
rcmail.removeEventListener('kolab_notes_render', dialog_render);
|
||||||
},
|
},
|
||||||
buttons: buttons,
|
buttons: buttons,
|
||||||
|
|
Loading…
Add table
Reference in a new issue