[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-4-0' - loleaflet/admin loleaflet/js loleaflet/src

Andras Timar (via logerrit) logerrit at kemper.freedesktop.org
Tue Feb 18 10:59:11 UTC 2020


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

New commits:
commit 32b4805ad5f53782eccb5459af321fc97b72dea4
Author:     Andras Timar <andras.timar at collabora.com>
AuthorDate: Mon Feb 17 13:27:24 2020 +0100
Commit:     Andras Timar <andras.timar at collabora.com>
CommitDate: Tue Feb 18 11:58:27 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 9c61089cc..10895437d 100644
--- a/loleaflet/admin/src/AdminSocketOverview.js
+++ b/loleaflet/admin/src/AdminSocketOverview.js
@@ -100,6 +100,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/js/toolbar.js b/loleaflet/js/toolbar.js
index e89092784..94e96e020 100644
--- a/loleaflet/js/toolbar.js
+++ b/loleaflet/js/toolbar.js
@@ -196,6 +196,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
 		});
 	}
diff --git a/loleaflet/src/control/Control.Menubar.js b/loleaflet/src/control/Control.Menubar.js
index 5553993eb..674fe1405 100644
--- a/loleaflet/src/control/Control.Menubar.js
+++ b/loleaflet/src/control/Control.Menubar.js
@@ -765,6 +765,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 e173c2bac..c963e9892 100644
--- a/loleaflet/src/control/Control.Tabs.js
+++ b/loleaflet/src/control/Control.Tabs.js
@@ -70,6 +70,10 @@ L.Control.Tabs = L.Control.extend({
 							var nPos = parseInt(options.$trigger.attr('id').split('spreadsheet-tab')[1]);
 							vex.dialog.confirm({
 								message: _('Are you sure you want to delete sheet, %sheet% ?').replace('%sheet%', options.$trigger.text()),
+								buttons: [
+									$.extend({}, vex.dialog.buttons.YES, { text: _('OK') }),
+									$.extend({}, vex.dialog.buttons.NO, { text: _('Cancel') })
+								],
 								callback: function(data) {
 									if (data) {
 										map.deletePage(nPos);


More information about the Libreoffice-commits mailing list