[Libreoffice-commits] online.git: loleaflet/admin loleaflet/src

Andras Timar (via logerrit) logerrit at kemper.freedesktop.org
Mon Feb 17 13:51:39 UTC 2020


 loleaflet/admin/src/AdminSocketOverview.js |    4 ++++
 loleaflet/admin/src/AdminSocketSettings.js |    4 ++++
 loleaflet/src/control/Control.Menubar.js   |    4 ++++
 loleaflet/src/control/Control.Tabs.js      |    4 ++++
 loleaflet/src/control/Control.Toolbar.js   |    4 ++++
 5 files changed, 20 insertions(+)

New commits:
commit a207bc4858d8c23d91fb929a84d5b0c371c39bd8
Author:     Andras Timar <andras.timar at collabora.com>
AuthorDate: Mon Feb 17 13:27:24 2020 +0100
Commit:     Michael Meeks <michael.meeks at collabora.com>
CommitDate: Mon Feb 17 14:51:19 2020 +0100

    localize the buttons on vex.dialog.confirm
    
    Change-Id: I24ab50b80e51c293a4ad71c6e5ea80bfda902883
    Reviewed-on: https://gerrit.libreoffice.org/c/online/+/88860
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
    Reviewed-by: Michael Meeks <michael.meeks at collabora.com>

diff --git a/loleaflet/admin/src/AdminSocketOverview.js b/loleaflet/admin/src/AdminSocketOverview.js
index 14784aaa0..3973a1dde 100644
--- a/loleaflet/admin/src/AdminSocketOverview.js
+++ b/loleaflet/admin/src/AdminSocketOverview.js
@@ -103,6 +103,10 @@ var AdminSocketOverview = AdminSocketBase.extend({
 		$('body').on('click', '#rowContextMenu a', function() {
 			vex.dialog.confirm({
 				message: _('Are you sure you want to terminate this session?'),
+				buttons: [
+					$.extend({}, vex.dialog.buttons.YES, { text: _('OK') }),
+					$.extend({}, vex.dialog.buttons.NO, { text: _('Cancel') })
+				],
 				callback: function(value) {
 					if (value) {
 						var killPid = ($('#rowContextMenu').data('rowToKill')).substring('doc'.length);
diff --git a/loleaflet/admin/src/AdminSocketSettings.js b/loleaflet/admin/src/AdminSocketSettings.js
index a4017c34a..ab43bd605 100644
--- a/loleaflet/admin/src/AdminSocketSettings.js
+++ b/loleaflet/admin/src/AdminSocketSettings.js
@@ -32,6 +32,10 @@ var AdminSocketSettings = AdminSocketBase.extend({
 			$('#btnShutdown').click(function() {
 				vex.dialog.confirm({
 					message: _('Are you sure you want to shut down the server?'),
+					buttons: [
+						$.extend({}, vex.dialog.buttons.YES, { text: _('OK') }),
+						$.extend({}, vex.dialog.buttons.NO, { text: _('Cancel') })
+					],
 					callback: function() {
 						// TODO: Prompt for reason.
 						socketSettings.send('shutdown maintenance');
diff --git a/loleaflet/src/control/Control.Menubar.js b/loleaflet/src/control/Control.Menubar.js
index 1a5cdc19d..d91723c3a 100644
--- a/loleaflet/src/control/Control.Menubar.js
+++ b/loleaflet/src/control/Control.Menubar.js
@@ -1146,6 +1146,10 @@ L.Control.Menubar = L.Control.extend({
 			var map = this._map;
 			vex.dialog.confirm({
 				message: _('Are you sure you want to delete this slide?'),
+				buttons: [
+					$.extend({}, vex.dialog.buttons.YES, { text: _('OK') }),
+					$.extend({}, vex.dialog.buttons.NO, { text: _('Cancel') })
+				],
 				callback: function(e) {
 					if (e) {
 						map.deletePage();
diff --git a/loleaflet/src/control/Control.Tabs.js b/loleaflet/src/control/Control.Tabs.js
index cb291f697..40f4c6ab7 100644
--- a/loleaflet/src/control/Control.Tabs.js
+++ b/loleaflet/src/control/Control.Tabs.js
@@ -175,6 +175,10 @@ L.Control.Tabs = L.Control.extend({
 		var nPos = this._tabForContextMenu;
 		vex.dialog.confirm({
 			message: _('Are you sure you want to delete sheet, %sheet% ?').replace('%sheet%', $('#spreadsheet-tab' + this._tabForContextMenu).text()),
+			buttons: [
+				$.extend({}, vex.dialog.buttons.YES, { text: _('OK') }),
+				$.extend({}, vex.dialog.buttons.NO, { text: _('Cancel') })
+			],
 			callback: function(data) {
 				if (data) {
 					map.deletePage(nPos);
diff --git a/loleaflet/src/control/Control.Toolbar.js b/loleaflet/src/control/Control.Toolbar.js
index 3fa2f6c33..c627e49cd 100644
--- a/loleaflet/src/control/Control.Toolbar.js
+++ b/loleaflet/src/control/Control.Toolbar.js
@@ -242,6 +242,10 @@ function onClick(e, id, item, subItem) {
 	else if (id === 'deletepage') {
 		vex.dialog.confirm({
 			message: _('Are you sure you want to delete this page?'),
+			buttons: [
+				$.extend({}, vex.dialog.buttons.YES, { text: _('OK') }),
+				$.extend({}, vex.dialog.buttons.NO, { text: _('Cancel') })
+			],
 			callback: onDelete
 		});
 	}


More information about the Libreoffice-commits mailing list