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

Szymon KÅ‚os (via logerrit) logerrit at kemper.freedesktop.org
Fri Jun 19 12:48:15 UTC 2020


 loleaflet/src/control/Control.JSDialogBuilder.js    |    9 ++++-----
 loleaflet/src/control/Control.NotebookbarBuilder.js |    4 ++--
 2 files changed, 6 insertions(+), 7 deletions(-)

New commits:
commit 668c25bff0c01bc7916cf9fe08ceb6945b13ff02
Author:     Szymon Kłos <szymon.klos at collabora.com>
AuthorDate: Fri Jun 19 12:50:24 2020 +0200
Commit:     Szymon Kłos <szymon.klos at collabora.com>
CommitDate: Fri Jun 19 14:48:06 2020 +0200

    notebookbar: fix font size combobox
    
    Change-Id: I0542e6a6bb21e1ae3bf164ef774da2cef2bb5706
    Reviewed-on: https://gerrit.libreoffice.org/c/online/+/96715
    Tested-by: Jenkins
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
    Reviewed-by: Szymon Kłos <szymon.klos at collabora.com>

diff --git a/loleaflet/src/control/Control.NotebookbarBuilder.js b/loleaflet/src/control/Control.NotebookbarBuilder.js
index 861b61ca5..be08a9948 100644
--- a/loleaflet/src/control/Control.NotebookbarBuilder.js
+++ b/loleaflet/src/control/Control.NotebookbarBuilder.js
@@ -138,7 +138,7 @@ L.Control.NotebookbarBuilder = L.Control.JSDialogBuilder.extend({
 		if (commandName === '.uno:CharFontName') {
 			$('#fontnamecombobox').val(state).trigger('change');
 		} else if (commandName === '.uno:FontHeight') {
-			$('#fontsizecombobox').val(state).trigger('change');
+			$('#fontsize').val(state).trigger('change');
 		} else if (commandName === '.uno:StyleApply') {
 			$('#applystyle').val(state).trigger('change');
 		}
@@ -157,7 +157,7 @@ L.Control.NotebookbarBuilder = L.Control.JSDialogBuilder.extend({
 			var state = items.getItemValue('.uno:CharFontName');
 			$(combobox).val(state).trigger('change');
 		}
-		else if (id === 'fontsizecombobox') {
+		else if (id === 'fontsize') {
 			$(combobox).on('select2:select', function (e) {
 				builder.map.applyFontSize(e.target.value);
 				builder.map.focus();
commit 708c988aa760004c4e083b08df1f85cbd41bc9fd
Author:     Szymon Kłos <szymon.klos at collabora.com>
AuthorDate: Fri Jun 19 14:12:14 2020 +0200
Commit:     Szymon Kłos <szymon.klos at collabora.com>
CommitDate: Fri Jun 19 14:47:54 2020 +0200

    jsdialog: fix tabs switching
    
    Change-Id: I9303daadcfc0888386f72e74ff35a26ab8233949
    Reviewed-on: https://gerrit.libreoffice.org/c/online/+/96731
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
    Tested-by: Jenkins
    Reviewed-by: Szymon Kłos <szymon.klos at collabora.com>

diff --git a/loleaflet/src/control/Control.JSDialogBuilder.js b/loleaflet/src/control/Control.JSDialogBuilder.js
index 09cb585d8..c18986d67 100644
--- a/loleaflet/src/control/Control.JSDialogBuilder.js
+++ b/loleaflet/src/control/Control.JSDialogBuilder.js
@@ -648,13 +648,12 @@ L.Control.JSDialogBuilder = L.Control.extend({
 	_createTabClick: function(builder, t, tabs, contentDivs, tabIds)
 	{
 		return function() {
+			$(tabs[t]).addClass('selected');
 			for (var i = 0; i < tabs.length; i++) {
-				if (tabs[i].number != t)
+				if (i !== t)
 				{
 					$(tabs[i]).removeClass('selected');
 					$(contentDivs[i]).hide();
-				} else {
-					$(tabs[i]).addClass('selected');
 				}
 			}
 			$(contentDivs[t]).show();
@@ -702,10 +701,10 @@ L.Control.JSDialogBuilder = L.Control.extend({
 					var fn = function(id) {
 						return function() {
 							builder._createTabClick(builder, id, tabs, contentDivs, tabIds)();
-							builder.callback('tabcontrol', 'selecttab', tabsContainer, id, builder);
+							builder.callback('tabcontrol', 'selecttab', tabsContainer, data.tabs[id].id - 1, builder);
 						};
 					};
-					$(tabs[t]).click(fn(data.tabs[t].id - 1));
+					$(tabs[t]).click(fn(t));
 				}
 			} else {
 				console.debug('Builder used outside of mobile wizard: please implement the click handler');


More information about the Libreoffice-commits mailing list