browser: move impl of savecomments command to Toolbar dispatch
Signed-off-by: Méven Car <meven.car@collabora.com>
Change-Id: Ifcb34977b72bb0eccd23667deb4750637810e569
(cherry picked from commit 95cc0f6dd4
)
pull/8295/head
parent
f050f88286
commit
0b2e224c20
|
@ -1885,12 +1885,7 @@ L.Control.Menubar = L.Control.extend({
|
|||
} else if (id === 'saveas' && type !== 'menu') { // jsdialog has no type='action'
|
||||
this._map.openSaveAs();
|
||||
} else if (id === 'savecomments') {
|
||||
if (this._map.isPermissionEditForComments()) {
|
||||
this._map.fire('postMessage', {msgId: 'UI_Save'});
|
||||
if (!this._map._disableDefaultAction['UI_Save']) {
|
||||
this._map.save(false, false);
|
||||
}
|
||||
}
|
||||
this._map.dispatch('savecomments');
|
||||
} else if (id === 'shareas' || id === 'ShareAs') {
|
||||
this._map.dispatch('shareas');
|
||||
} else if (id === 'print') {
|
||||
|
|
|
@ -1299,6 +1299,14 @@ L.Map.include({
|
|||
var commentSection = app.sectionContainer.getSectionWithName(L.CSections.CommentList.name);
|
||||
commentSection.rejectAllTrackedCommentChanges();
|
||||
break;
|
||||
case 'savecomments':
|
||||
if (this.isPermissionEditForComments()) {
|
||||
this.fire('postMessage', {msgId: 'UI_Save'});
|
||||
if (!this._disableDefaultAction['UI_Save']) {
|
||||
this.save(false, false);
|
||||
}
|
||||
}
|
||||
break;
|
||||
default:
|
||||
console.error('unknown dispatch: "' + action + '"');
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue