[Libreoffice-commits] online.git: 2 commits - loleaflet/src
Szymon Kłos (via logerrit)
logerrit at kemper.freedesktop.org
Fri Sep 27 15:05:32 UTC 2019
loleaflet/src/control/Control.JSDialogBuilder.js | 22 ++++++++++++++++++++--
1 file changed, 20 insertions(+), 2 deletions(-)
New commits:
commit d5e58749420e4cdfb02c5446f55dcd60c5f94e83
Author: Szymon Kłos <szymon.klos at collabora.com>
AuthorDate: Thu Sep 26 14:51:50 2019 +0200
Commit: Szymon Kłos <szymon.klos at collabora.com>
CommitDate: Fri Sep 27 17:05:22 2019 +0200
jsdialogs: apply checked property for checkbox
Change-Id: Ib42247cd6e35c681dcbdcefce85788617050273f
Reviewed-on: https://gerrit.libreoffice.org/79738
Reviewed-by: Szymon Kłos <szymon.klos at collabora.com>
Tested-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 98605e992..a6d6d6888 100644
--- a/loleaflet/src/control/Control.JSDialogBuilder.js
+++ b/loleaflet/src/control/Control.JSDialogBuilder.js
@@ -180,6 +180,9 @@ L.Control.JSDialogBuilder = L.Control.extend({
if (data.enabled == 'false')
$(radiobutton).attr('disabled', 'disabled');
+ if (data.checked == 'true')
+ $(radiobutton).attr('checked', 'checked');
+
return false;
},
@@ -193,6 +196,9 @@ L.Control.JSDialogBuilder = L.Control.extend({
if (data.enabled == 'false')
$(checkbox).attr('disabled', 'disabled');
+ if (data.checked == 'true')
+ $(checkbox).attr('checked', 'checked');
+
return false;
},
@@ -284,8 +290,14 @@ L.Control.JSDialogBuilder = L.Control.extend({
},
_lineWidthControl: function(parentContainer, data, builder) {
- // TODO: send from the core
- data.children = [ { text: '0.5' } ];
+ data.children = [ { text: '0.5' },
+ { text: '0.8' },
+ { text: '1.0' },
+ { text: '1.5' },
+ { text: '2.3' },
+ { text: '3.0' },
+ { text: '4.5' },
+ { text: '6.0' } ];
builder._spinfieldControl(parentContainer, data, builder);
},
commit edd26b9e854934440ff4fd947d5ac5d17a2b49d6
Author: Szymon Kłos <szymon.klos at collabora.com>
AuthorDate: Thu Sep 26 11:32:02 2019 +0200
Commit: Szymon Kłos <szymon.klos at collabora.com>
CommitDate: Fri Sep 27 17:05:14 2019 +0200
jsdialogs: add dummy line width control
Change-Id: I02a73be820ddeaf6e6f308d05a7388d0e43a13bb
Reviewed-on: https://gerrit.libreoffice.org/79737
Reviewed-by: Szymon Kłos <szymon.klos at collabora.com>
Tested-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 164f1aaaa..98605e992 100644
--- a/loleaflet/src/control/Control.JSDialogBuilder.js
+++ b/loleaflet/src/control/Control.JSDialogBuilder.js
@@ -40,8 +40,8 @@ L.Control.JSDialogBuilder = L.Control.extend({
this._controlHandlers['toolbox'] = this._containerHandler;
this._controlHandlers['toolitem'] = this._toolitemHandler;
- this._toolitemHandlers['.uno:SelectWidth'] = this._ignoreHandler;
this._toolitemHandlers['.uno:XLineColor'] = this._colorControl;
+ this._toolitemHandlers['.uno:SelectWidth'] = this._lineWidthControl;
this._currentDepth = 0;
},
@@ -51,7 +51,7 @@ L.Control.JSDialogBuilder = L.Control.extend({
var handler = builder._toolitemHandlers[data.command];
if (handler)
- handler(parentContainer, data, this);
+ handler(parentContainer, data, builder);
else
console.warn('Unsupported toolitem type: \"' + data.command + '\"');
}
@@ -283,6 +283,12 @@ L.Control.JSDialogBuilder = L.Control.extend({
return false;
},
+ _lineWidthControl: function(parentContainer, data, builder) {
+ // TODO: send from the core
+ data.children = [ { text: '0.5' } ];
+ builder._spinfieldControl(parentContainer, data, builder);
+ },
+
build: function(parent, data, currentType, currentIsVertival) {
var currentInsertPlace = parent;
var currentHorizontalRow = parent;
More information about the Libreoffice-commits
mailing list