[Libreoffice-commits] online.git: 2 commits - loleaflet/css loleaflet/src
Szymon KÅos (via logerrit)
logerrit at kemper.freedesktop.org
Tue Aug 11 08:12:29 UTC 2020
loleaflet/css/mobilewizard.css | 4 +
loleaflet/src/control/Control.JSDialogBuilder.js | 64 ++++++++++++++++++++++-
loleaflet/src/control/Control.Menubar.js | 7 ++
3 files changed, 72 insertions(+), 3 deletions(-)
New commits:
commit 7f0c655c23cca66975e1b01dc7b3f7034df6e1af
Author: Szymon Kłos <szymon.klos at collabora.com>
AuthorDate: Thu Aug 6 11:42:35 2020 +0200
Commit: Szymon Kłos <szymon.klos at collabora.com>
CommitDate: Tue Aug 11 10:12:21 2020 +0200
Add missing table operations to menu in Impress
Change-Id: I1f644b0a69ee2eb17edf4c64f7de3e13b39e6192
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/100207
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
Reviewed-by: Jan Holesovsky <kendy at collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/100462
Tested-by: Jenkins
Reviewed-by: Szymon Kłos <szymon.klos at collabora.com>
diff --git a/loleaflet/src/control/Control.Menubar.js b/loleaflet/src/control/Control.Menubar.js
index f5e0818e5..531aa3f28 100644
--- a/loleaflet/src/control/Control.Menubar.js
+++ b/loleaflet/src/control/Control.Menubar.js
@@ -341,7 +341,12 @@ L.Control.Menubar = L.Control.extend({
{uno: '.uno:InsertColumnsAfter'}]},
{name: _UNO('.uno:TableDeleteMenu', 'text'/*HACK should be 'presentation', but not in xcu*/), type: 'menu', menu: [
{uno: '.uno:DeleteRows'},
- {uno: '.uno:DeleteColumns'}]},
+ {uno: '.uno:DeleteColumns'},
+ {uno: '.uno:DeleteTable'}]},
+ {name: _UNO('.uno:TableSelectMenu', 'text'), type: 'menu', menu: [
+ {uno: '.uno:SelectTable'},
+ {uno: '.uno:EntireRow'},
+ {uno: '.uno:EntireColumn'}]},
{uno: '.uno:MergeCells'},
{uno: '.uno:TableDialog'}]
},
commit 77d4ef0386306baebd84754d9c4de3bb22d3f3b3
Author: Szymon Kłos <szymon.klos at collabora.com>
AuthorDate: Mon Aug 10 12:58:53 2020 +0200
Commit: Szymon Kłos <szymon.klos at collabora.com>
CommitDate: Tue Aug 11 10:12:11 2020 +0200
mobile-wizard: update selected cell border style
Change-Id: Id2f98c0824e589d63d658f00b384fa0abfb48f2f
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/100425
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
Reviewed-by: Jan Holesovsky <kendy at collabora.com>
(cherry picked from commit 402a42d3db9e5d3b1836c5fd5010c5a5f7054b02)
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/100365
Tested-by: Jenkins
Reviewed-by: Szymon Kłos <szymon.klos at collabora.com>
diff --git a/loleaflet/css/mobilewizard.css b/loleaflet/css/mobilewizard.css
index 77706008d..0cc9e768c 100644
--- a/loleaflet/css/mobilewizard.css
+++ b/loleaflet/css/mobilewizard.css
@@ -300,6 +300,10 @@ p.mobile-wizard.ui-combobox-text.selected {
-webkit-box-shadow: inset 0px 0px 0px 2px #fff;
box-shadow: inset 0px 0px 0px 2px #fff;
}
+#mobile-wizard-content > #ScCellAppearancePropertyPanel > .ui-content.level-0.mobile-wizard .borderbutton.selected {
+ -webkit-box-shadow: inset 0px 0px 0px 2px #0867af !important;
+ box-shadow: inset 0px 0px 0px 2px #0867af !important;
+}
.ui-header.mobile-wizard {
width: 100%;
height: 56px !important;
diff --git a/loleaflet/src/control/Control.JSDialogBuilder.js b/loleaflet/src/control/Control.JSDialogBuilder.js
index 5c7313370..2ea8f8fce 100644
--- a/loleaflet/src/control/Control.JSDialogBuilder.js
+++ b/loleaflet/src/control/Control.JSDialogBuilder.js
@@ -1884,7 +1884,48 @@ L.Control.JSDialogBuilder = L.Control.extend({
return false;
},
- _borderControlItem: function(parentContainer, data, builder, i) {
+ _getCurrentBorderNumber: function(builder) {
+ var outer = builder.map['stateChangeHandler'].getItemValue('.uno:BorderOuter');
+ var inner = builder.map['stateChangeHandler'].getItemValue('.uno:BorderInner');
+
+ if (!outer || !inner)
+ return 0;
+
+ var left = outer.left === 'true';
+ var right = outer.right === 'true';
+ var bottom = outer.bottom === 'true';
+ var top = outer.top === 'true';
+ var horiz = inner.horizontal === 'true';
+ var vert = inner.vertical === 'true';
+
+ if (left && !right && !bottom && !top && !horiz && !vert) {
+ return 2;
+ } else if (!left && right && !bottom && !top && !horiz && !vert) {
+ return 3;
+ } else if (left && right && !bottom && !top && !horiz && !vert) {
+ return 4;
+ } else if (!left && !right && !bottom && top && !horiz && !vert) {
+ return 5;
+ } else if (!left && !right && bottom && !top && !horiz && !vert) {
+ return 6;
+ } else if (!left && !right && bottom && top && !horiz && !vert) {
+ return 7;
+ } else if (left && right && bottom && top && !horiz && !vert) {
+ return 8;
+ } else if (!left && !right && bottom && top && horiz && !vert) {
+ return 9;
+ } else if (left && right && bottom && top && horiz && !vert) {
+ return 10;
+ } else if (left && right && bottom && top && !horiz && vert) {
+ return 11;
+ } else if (left && right && bottom && top && horiz && vert) {
+ return 12;
+ }
+
+ return 1;
+ },
+
+ _borderControlItem: function(parentContainer, data, builder, i, selected) {
var button = null;
var div = this._createIdentifiable('div', 'ui-content unospan', parentContainer, data);
@@ -1894,6 +1935,9 @@ L.Control.JSDialogBuilder = L.Control.extend({
button.src = L.LOUtil.getImageURL('fr0' + i + '.svg');
button.id = buttonId;
+ if (selected)
+ $(button).addClass('selected');
+
$(div).click(function () {
var color = 0;
// Find our associated color picker
@@ -1908,8 +1952,24 @@ L.Control.JSDialogBuilder = L.Control.extend({
var bordercontrollabel = L.DomUtil.create('p', builder.options.cssClass + ' ui-text', parentContainer);
bordercontrollabel.innerHTML = _('Cell borders');
bordercontrollabel.id = data.id + 'label';
+ var current = builder._getCurrentBorderNumber(builder);
for (var i = 1; i < 13; ++i)
- builder._borderControlItem(parentContainer, data, builder, i);
+ builder._borderControlItem(parentContainer, data, builder, i, i === current);
+
+ var updateFunction = function() {
+ var current = builder._getCurrentBorderNumber(builder);
+ for (var i = 1; i < 13; ++i) {
+ if (i !== current)
+ $('#border-' + i).removeClass('selected');
+ else
+ $('#border-' + i).addClass('selected');
+ }
+ };
+
+ builder.map.on('commandstatechanged', function(e) {
+ if (e.commandName === '.uno:BorderOuter' || e.commandName === '.uno:BorderInner')
+ updateFunction();
+ }, this);
},
_colorControl: function(parentContainer, data, builder) {
More information about the Libreoffice-commits
mailing list