[Libreoffice-commits] online.git: 2 commits - loleaflet/css loleaflet/src
Szymon Kłos (via logerrit)
logerrit at kemper.freedesktop.org
Tue Oct 8 18:09:30 UTC 2019
loleaflet/css/toolbar.css | 14 ++++++++++++++
loleaflet/src/control/Control.JSDialogBuilder.js | 19 ++++++++++++++++---
2 files changed, 30 insertions(+), 3 deletions(-)
New commits:
commit 304415aa26080570d32c76146fcbe686c9455b0e
Author: Szymon Kłos <szymon.klos at collabora.com>
AuthorDate: Tue Oct 8 20:08:30 2019 +0200
Commit: Szymon Kłos <szymon.klos at collabora.com>
CommitDate: Tue Oct 8 20:09:04 2019 +0200
jsdialogs: style FontColor button in Writer>Character
Change-Id: Id9ef3e0ec9c964b0b20ab9d129ff37c0da9bff21
diff --git a/loleaflet/css/toolbar.css b/loleaflet/css/toolbar.css
index 6e85135a9..8a5ad47cd 100644
--- a/loleaflet/css/toolbar.css
+++ b/loleaflet/css/toolbar.css
@@ -41,6 +41,11 @@
margin: 0px !important;
float:left;
}
+ [name='colorselector-0'] {
+ padding: 24px 0px 24px 20px !important;
+ margin: 0px !important;
+ float:left;
+ }
#Shadowed, #StyleNewByExample + div, #AlignTop, #AlignBottom + p, #mergecells{clear:both;}
#DecrementIndent + input:disabled{display: none;}
#buttonbefore, #buttonafter, #buttonoptimal, #buttonparallel, #buttonnone, #buttonthrough, #bottom, #top, #standard, #Bold, #Italic, #Underline, #Strikeout{
@@ -1061,3 +1066,12 @@ menu-entry-with-icon.padding-left + menu-entry-icon.width */
border: none;
color: #0b87e7;
}
+
+#tb_colorselector-0_item_color .w2ui-tb-caption > div {
+ height: 32px !important;
+ width: 32px !important;
+}
+
+[name='colorselector-0'] {
+ width: 80px;
+}
commit eb95669a856e7920c1cfe54fa045affc90ed7ab9
Author: Szymon Kłos <szymon.klos at collabora.com>
AuthorDate: Tue Oct 8 19:53:19 2019 +0200
Commit: Szymon Kłos <szymon.klos at collabora.com>
CommitDate: Tue Oct 8 20:09:04 2019 +0200
jsdialogs: add color picker objects management
Change-Id: I80e0e3cfb4d73aa3619b37c1de4e86d6794fd0a3
diff --git a/loleaflet/src/control/Control.JSDialogBuilder.js b/loleaflet/src/control/Control.JSDialogBuilder.js
index 033ddb388..61ed693c7 100644
--- a/loleaflet/src/control/Control.JSDialogBuilder.js
+++ b/loleaflet/src/control/Control.JSDialogBuilder.js
@@ -17,10 +17,12 @@ L.Control.JSDialogBuilder = L.Control.extend({
*/
_controlHandlers: {},
_toolitemHandlers: {},
+ _colorPickers: [],
_currentDepth: 0,
_setup: function(options) {
+ this._clearColorPickers();
this.wizard = options.mobileWizard;
this.map = options.map;
this.callback = options.callback ? options.callback : this._defaultCallbackHandler;
@@ -53,10 +55,19 @@ L.Control.JSDialogBuilder = L.Control.extend({
this._toolitemHandlers['.uno:SelectWidth'] = this._lineWidthControl;
this._toolitemHandlers['.uno:CharFontName'] = this._fontNameControl;
this._toolitemHandlers['.uno:FontHeight'] = this._fontHeightControl;
+ this._toolitemHandlers['.uno:FontColor'] = this._colorControl;
this._currentDepth = 0;
},
+ _clearColorPickers: function() {
+ while (this._colorPickers.length) {
+ var id = this._colorPickers.pop();
+ w2ui[id].remove();
+ delete w2ui[id];
+ }
+ },
+
_toolitemHandler: function(parentContainer, data, builder) {
if (data.command) {
var handler = builder._toolitemHandlers[data.command];
@@ -442,20 +453,22 @@ L.Control.JSDialogBuilder = L.Control.extend({
return false;
},
- _colorControl: function(parentContainer, data) {
+ _colorControl: function(parentContainer, data, builder) {
var colorContainer = L.DomUtil.create('div', '', parentContainer);
if (data.enabled == 'false')
$(colorContainer).attr('disabled', 'disabled');
var toolbar = $(colorContainer);
+ var id = 'colorselector-' + builder._colorPickers.length;
var items = [{type: 'color', id: 'color'}];
toolbar.w2toolbar({
- name: 'colorselector',
+ name: id,
tooltip: 'bottom',
items: items
});
- w2ui['colorselector'].set('color', {color: '#ff0033'});
+ w2ui[id].set('color', {color: '#ff0033'});
+ builder._colorPickers.push(id);
return false;
},
More information about the Libreoffice-commits
mailing list