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

Tamás Zolnai (via logerrit) logerrit at kemper.freedesktop.org
Mon Jun 22 11:26:28 UTC 2020


 loleaflet/src/control/Control.Menubar.js |    1 -
 loleaflet/src/control/Control.Toolbar.js |    1 +
 2 files changed, 1 insertion(+), 1 deletion(-)

New commits:
commit ee53ffa18b73731b602ae1cc90629d5d263e66c3
Author:     Tamás Zolnai <tamas.zolnai at collabora.com>
AuthorDate: Mon Jun 22 11:11:18 2020 +0200
Commit:     Tamás Zolnai <tamas.zolnai at collabora.com>
CommitDate: Mon Jun 22 13:26:08 2020 +0200

    Set doctype class earlier so we have it after the document is opened.
    
    Without this change this class was added only after
    the app stepped into editing mode.
    This class makes easy to identify document type in a
    cypress test.
    
    Change-Id: I83ea144830e20610b60a6ff571c11a45daa1fc4c
    Reviewed-on: https://gerrit.libreoffice.org/c/online/+/96840
    Tested-by: Jenkins
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
    Reviewed-by: Tamás Zolnai <tamas.zolnai at collabora.com>

diff --git a/loleaflet/src/control/Control.Menubar.js b/loleaflet/src/control/Control.Menubar.js
index c8d12a868..240dd9c50 100644
--- a/loleaflet/src/control/Control.Menubar.js
+++ b/loleaflet/src/control/Control.Menubar.js
@@ -1310,7 +1310,6 @@ L.Control.Menubar = L.Control.extend({
 			iconClass += ' impress-icon-img';
 		}
 		$('.main-nav').addClass(docType + '-color-indicator');
-		$('#document-container').addClass(docType + '-doctype');
 
 		var liItem = L.DomUtil.create('li', '');
 		liItem.id = 'document-header';
diff --git a/loleaflet/src/control/Control.Toolbar.js b/loleaflet/src/control/Control.Toolbar.js
index 4a797ffb0..1eccdce82 100644
--- a/loleaflet/src/control/Control.Toolbar.js
+++ b/loleaflet/src/control/Control.Toolbar.js
@@ -870,6 +870,7 @@ function onCommandStateChanged(e) {
 }
 
 function onUpdateParts(e) {
+	$('#document-container').addClass(e.docType + '-doctype');
 	if (e.docType === 'text') {
 		var current = e.currentPage;
 		var count = e.pages;


More information about the Libreoffice-commits mailing list