online.git: 2 commits - browser/css browser/src

0 views
Skip to first unread message

"Mohit Marathe (via cogerrit)"

unread,
3:40 AM (14 hours ago) 3:40 AM
to collaboraon...@googlegroups.com
browser/css/partsPreviewControl.css | 5 +++
browser/src/control/Control.PartsPreview.js | 43 ++++++++++++++++++++++++++++
2 files changed, 48 insertions(+)

New commits:
commit ffe860bdfa936276a23785cd42299546312e98ce
Author: Mohit Marathe <mohit....@collabora.com>
AuthorDate: Mon May 18 16:33:35 2026 +0530
Commit: Mohit Marathe <mohit....@collabora.com>
CommitDate: Mon May 25 07:39:22 2026 +0000

browser: add slide-section-header:hover

Signed-off-by: Mohit Marathe <mohit....@collabora.com>
Change-Id: Ia42fb5be7f94bfd3ddb28f5befe9478383cea9d6
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/2784
Tested-by: Jenkins CPCI <rel...@collaboraoffice.com>

diff --git a/browser/css/partsPreviewControl.css b/browser/css/partsPreviewControl.css
index e1a6254c0019..32aa9dafd088 100644
--- a/browser/css/partsPreviewControl.css
+++ b/browser/css/partsPreviewControl.css
@@ -84,6 +84,11 @@
border-bottom: 1px solid var(--color-border, #ccc);
}

+.slide-section-header:hover {
+ background-color: var(--color-background-darker);
+ border-radius: var(--border-radius-s);
+}
+
.slide-section-toggle {
background: transparent;
border: 0;
commit 7175a7f65d457a1accc8c1de77396bef2c5da5e2
Author: Mohit Marathe <mohit....@collabora.com>
AuthorDate: Fri May 15 21:47:59 2026 +0530
Commit: Mohit Marathe <mohit....@collabora.com>
CommitDate: Mon May 25 07:39:22 2026 +0000

slide sections: highlight section when all it's slides are selected

Signed-off-by: Mohit Marathe <mohit....@collabora.com>
Change-Id: Ic9ebbac5fb41f3837ad13d3968d93d3aa114605e
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/2783

diff --git a/browser/src/control/Control.PartsPreview.js b/browser/src/control/Control.PartsPreview.js
index dc6501e79e95..d1e5a8320a8b 100644
--- a/browser/src/control/Control.PartsPreview.js
+++ b/browser/src/control/Control.PartsPreview.js
@@ -114,6 +114,7 @@ window.L.Control.PartsPreview = window.L.Control.extend({
window.L.DomUtil.addClass(this._previewTiles[selectedPart], 'preview-img-currentpart');
this._ensureVisiblePreviews(); // Load previews.
this._previewInitialized = true;
+ this._updateSelectedSection();
}
else
{
@@ -130,6 +131,7 @@ window.L.Control.PartsPreview = window.L.Control.extend({
window.L.DomUtil.addClass(this._previewTiles[j], 'preview-img-selectedpart');
}
}
+ this._updateSelectedSection();
}

if (!this.options.allowOrientation) {
@@ -540,6 +542,47 @@ window.L.Control.PartsPreview = window.L.Control.extend({
}

this._applyAllSectionsCollapse();
+
+ this._updateSelectedSection();
+ },
+
+ _updateSelectedSection: function () {
+ if (!this._sectionHeaders || this._sectionHeaders.length === 0)
+ return;
+
+ var sections = (app.impress && app.impress.sections) || [];
+ var partList = (app.impress && app.impress.partList) || [];
+ var fullySelected = new Set();
+ for (var s = 0; s < sections.length; s++) {
+ var start = sections[s].startIndex;
+ var end = (s + 1 < sections.length)
+ ? sections[s + 1].startIndex - 1
+ : this._previewTiles.length - 1;
+ if (start < 0 || end < start)
+ continue;
+
+ var allSelected = true;
+ for (var p = start; p <= end; p++) {
+ if (!partList[p] || !partList[p].selected) {
+ allSelected = false;
+ break;
+ }
+ }
+ if (allSelected)
+ fullySelected.add(s);
+ }
+
+ for (var h = 0; h < this._sectionHeaders.length; h++) {
+ var header = this._sectionHeaders[h];
+ var nameSpan = header.querySelector('.slide-section-name');
+ if (!nameSpan)
+ continue;
+ var headerSectionIndex = parseInt(header.getAttribute('data-section-index'), 10);
+ if (fullySelected.has(headerSectionIndex))
+ window.L.DomUtil.addClass(nameSpan, 'selected');
+ else
+ window.L.DomUtil.removeClass(nameSpan, 'selected');
+ }
},

_createSectionHeader: function (section, sectionIndex) {

Reply all
Reply to author
Forward
0 new messages