[Libreoffice-commits] online.git: Branch 'libreoffice-6-2' - loleaflet/src

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Thu Feb 14 07:41:15 UTC 2019


 loleaflet/src/control/Control.Menubar.js |   15 +++++++--------
 1 file changed, 7 insertions(+), 8 deletions(-)

New commits:
commit 9d598bc30c50535888bda763c3c528c32c29681b
Author:     Eduard Ardeleanu <eduard-andrei.ardeleanu at 1and1.ro>
AuthorDate: Wed Feb 13 17:28:00 2019 +0200
Commit:     Jan Holesovsky <kendy at collabora.com>
CommitDate: Thu Feb 14 08:40:58 2019 +0100

    loleaflet: fix ControlMenubar's DeleteSlide for presentation files
    
    Change-Id: Id45d112ce70029f2c102be3fc3cbff6afc2c8821
    Reviewed-on: https://gerrit.libreoffice.org/67782
    Reviewed-by: Jan Holesovsky <kendy at collabora.com>
    Tested-by: Jan Holesovsky <kendy at collabora.com>
    (cherry picked from commit 4bc56d3fd4bb9fb01fb974884c4a00fbe1833288)
    Reviewed-on: https://gerrit.libreoffice.org/67800

diff --git a/loleaflet/src/control/Control.Menubar.js b/loleaflet/src/control/Control.Menubar.js
index a14603c13..4be82c6b4 100644
--- a/loleaflet/src/control/Control.Menubar.js
+++ b/loleaflet/src/control/Control.Menubar.js
@@ -714,10 +714,15 @@ L.Control.Menubar = L.Control.extend({
 		} else if (id === 'duplicatepage') {
 			this._map.duplicatePage();
 		} else if (id === 'deletepage') {
+			var map = this._map;
 			vex.dialog.confirm({
 				message: _('Are you sure you want to delete this slide?'),
-				callback: this._onDeleteSlide
-			}, this);
+				callback: function(e) {
+					if (e) {
+						map.deletePage();
+					}
+				}
+			});
 		} else if (id === 'about') {
 			this._map.showLOAboutDialog();
 		} else if (id === 'keyboard-shortcuts') {
@@ -752,12 +757,6 @@ L.Control.Menubar = L.Control.extend({
 		this._map.sendUnoCommand(unoCommand);
 	},
 
-	_onDeleteSlide: function(e) {
-		if (e) {
-			this._map.deletePage();
-		}
-	},
-
 	_onItemSelected: function(e, item) {
 		var self = e.data.self;
 		var type = $(item).data('type');


More information about the Libreoffice-commits mailing list