loleaflet/src/control/Control.JSDialogBuilder.js |   25 ++++++++++++++++++++---
 1 file changed, 22 insertions(+), 3 deletions(-)

New commits:
commit 681321133afc7df9a58574f6823059e22a05db7b
Author:     Pranam Lashkari <[email protected]>
AuthorDate: Wed May 20 01:31:27 2020 +0530
Commit:     Andras Timar <[email protected]>
CommitDate: Wed Jun 10 12:36:05 2020 +0200

    leaflet: update values in spinners
    
    Spinners value will be updated when field value is updated via other 
controlls
    
    Change-Id: I4b561eff72f63aa235d32f25732084f69f81a59a
    Reviewed-on: https://gerrit.libreoffice.org/c/online/+/94549
    Tested-by: Jenkins
    Tested-by: Jenkins CollaboraOffice <[email protected]>
    Reviewed-by: Andras Timar <[email protected]>

diff --git a/loleaflet/src/control/Control.JSDialogBuilder.js 
b/loleaflet/src/control/Control.JSDialogBuilder.js
index 7045a77d3..101e3d3bb 100644
--- a/loleaflet/src/control/Control.JSDialogBuilder.js
+++ b/loleaflet/src/control/Control.JSDialogBuilder.js
@@ -120,8 +120,10 @@ L.Control.JSDialogBuilder = L.Control.extend({
                        builder.map.on('commandstatechanged', function(e) {
                                var value = 
e.state[builder._getFieldFromId(data.id)];
                                if (value) {
-                                       value = parseFloat(value.replace(',', 
'.'));
-                                       $(controls.spinfield).attr('value', 
value);
+                                       if (customCallback)
+                                               customCallback();
+                                       else
+                                               builder.callback('spinfield', 
'value', controls.container, this.value, builder);
                                }
                        }, this);
 
commit 8db0ab5abf06487c8038678cc71860b941f79708
Author:     Pranam Lashkari <[email protected]>
AuthorDate: Mon May 18 20:44:49 2020 +0530
Commit:     Andras Timar <[email protected]>
CommitDate: Wed Jun 10 12:35:55 2020 +0200

    leaflet: Strange behavior of Paragraph Spacing controls
    
    Change Paragraph Spacing/indent on the mobile wizard with uno buttons,
    paragraph Spacing spinners aren't updated
    
    Change-Id: I0a692790e406a078c5540fe538c15d18cae20af0
    Reviewed-on: https://gerrit.libreoffice.org/c/online/+/94433
    Tested-by: Jenkins
    Tested-by: Jenkins CollaboraOffice <[email protected]>
    Reviewed-by: Andras Timar <[email protected]>

diff --git a/loleaflet/src/control/Control.JSDialogBuilder.js 
b/loleaflet/src/control/Control.JSDialogBuilder.js
index 8c8426c9e..7045a77d3 100644
--- a/loleaflet/src/control/Control.JSDialogBuilder.js
+++ b/loleaflet/src/control/Control.JSDialogBuilder.js
@@ -118,9 +118,9 @@ L.Control.JSDialogBuilder = L.Control.extend({
                        // It listens server state changes using GetControlState
                        // to avoid unit conversion
                        builder.map.on('commandstatechanged', function(e) {
-                               var value = e.state[data.id];
+                               var value = 
e.state[builder._getFieldFromId(data.id)];
                                if (value) {
-                                       value = parseFloat(value);
+                                       value = parseFloat(value.replace(',', 
'.'));
                                        $(controls.spinfield).attr('value', 
value);
                                }
                        }, this);
@@ -1164,6 +1164,23 @@ L.Control.JSDialogBuilder = L.Control.extend({
                return null;
        },
 
+       _getFieldFromId: function(id) {
+               switch (id) {
+               case 'aboveparaspacing':
+                       return 'upper';
+               case 'belowparaspacing':
+                       return 'lower';
+               case 'beforetextindent':
+                       return 'left';
+               case 'aftertextindent':
+                       return 'right';
+               case 'firstlineindent':
+                       return 'firstline';
+               default:
+                       return id;
+               }
+       },
+
        _getTitleForControlWithId: function(id) {
                switch (id) {
 
_______________________________________________
Libreoffice-commits mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to