cypress_test/integration_tests/mobile/writer/styles_spec.js |   51 ------------
 loleaflet/src/control/Control.MobileWizard.js               |   14 ++-
 2 files changed, 12 insertions(+), 53 deletions(-)

New commits:
commit c07f45e4e5afcfab0bc9870f667c83bd243d6355
Author:     Michael Meeks <michael.me...@collabora.com>
AuthorDate: Thu Feb 20 03:24:54 2020 +0000
Commit:     Michael Meeks <michael.me...@collabora.com>
CommitDate: Thu Feb 20 05:21:51 2020 +0100

    wizard: hide styleupdate as well as stylenew.
    
    Also hide calc style panel for now: incomplete.
    
    Change-Id: I46fee97f5d029860a12e5f7215d830091c5f9bf0
    Reviewed-on: https://gerrit.libreoffice.org/c/online/+/89068
    Tested-by: Michael Meeks <michael.me...@collabora.com>
    Reviewed-by: Michael Meeks <michael.me...@collabora.com>

diff --git a/cypress_test/integration_tests/mobile/writer/styles_spec.js 
b/cypress_test/integration_tests/mobile/writer/styles_spec.js
index 1f393afd4..6d0a25064 100644
--- a/cypress_test/integration_tests/mobile/writer/styles_spec.js
+++ b/cypress_test/integration_tests/mobile/writer/styles_spec.js
@@ -85,55 +85,6 @@ describe('Apply/modify styles.', function() {
                        .should('have.attr', 'style', 'margin-bottom: 0in; 
line-height: 100%');
        });
 
-       it('Modify existing style.', function() {
-               // Apply Title style
-               applyStyle('Title');
-
-               helper.copyTextToClipboard();
-
-               cy.get('#copy-paste-container p font')
-                       .should('have.attr', 'face', 'Liberation Sans, 
sans-serif');
-               cy.get('#copy-paste-container p font font')
-                       .should('have.attr', 'style', 'font-size: 28pt');
-
-               // Open mobile wizard
-               cy.get('#tb_actionbar_item_mobile_wizard')
-                       .should('not.have.class', 'disabled')
-                       .click();
-
-               // Apply italic
-               cy.get('#Italic')
-                       .click();
-
-               // Close mobile wizard
-               cy.get('#tb_actionbar_item_mobile_wizard')
-                       .click();
-
-               helper.copyTextToClipboard();
-
-               cy.get('#copy-paste-container p i')
-                       .should('exist');
-
-               // Open mobile wizard
-               cy.get('#tb_actionbar_item_mobile_wizard')
-                       .should('not.have.class', 'disabled')
-                       .click();
-
-               cy.get('#StyleUpdateByExample')
-                       .click();
-
-               // Clear formatting
-               applyStyle('Clear formatting');
-
-               // Apply Title style with italic font
-               applyStyle('Title');
-
-               helper.copyTextToClipboard();
-
-               cy.get('#copy-paste-container p i')
-                       .should('exist');
-       });
-
        it('New style item is hidden.', function() {
                // New style item opens a tunneled dialog
                // what we try to avoid.
@@ -143,7 +94,7 @@ describe('Apply/modify styles.', function() {
                        .click();
 
                cy.get('#StyleUpdateByExample')
-                       .should('exist');
+                       .should('not.exist');
 
                cy.get('#StyleNewByExample')
                        .should('not.exist');
diff --git a/loleaflet/src/control/Control.MobileWizard.js 
b/loleaflet/src/control/Control.MobileWizard.js
index 300f21773..0c6859d0d 100644
--- a/loleaflet/src/control/Control.MobileWizard.js
+++ b/loleaflet/src/control/Control.MobileWizard.js
@@ -335,7 +335,7 @@ L.Control.MobileWizard = L.Control.extend({
                                else if (data.id === 'insertshape') {
                                        
$('#mobile-wizard').addClass('shapeswizard');
                                }
-                               if (this.map .getDocType() === 'spreadsheet')
+                               if (this.map.getDocType() === 'spreadsheet')
                                        $('#mobile-wizard').css('top', 
$('#spreadsheet-row-column-frame').css('top'));
                                else
                                        $('#mobile-wizard').css('top', 
$('#document-container').css('top'));
@@ -365,13 +365,21 @@ L.Control.MobileWizard = L.Control.extend({
                        var stylesIdx = this._findIdxInParentById(deck, 
'StylesPropertyPanel');
                        var textName = 'TextPropertyPanel';
                        var textIdx = this._findIdxInParentById(deck, textName);
-                       if (stylesIdx >= 0 && textIdx >= 0)
+
+                       if (stylesIdx >= 0 && this.map.getDocType() === 
'spreadsheet')
+                       {       // remove rather useless styles panel
+                               deck.children.splice(stylesIdx, 1);
+                       }
+                       else if (stylesIdx >= 0 && textIdx >= 0)
                        {
                                var moveContent = 
deck.children[stylesIdx].children[0].children;
                                deck.children[textIdx].children[0].children = 
moveContent.concat(deck.children[textIdx].children[0].children);
                                deck.children.splice(stylesIdx, 1); //remove 
the styles property
                        }
-                       this._removeItems(deck, ['cellbordertype', 
'borderlinestyle', 'borderlinecolor', 'editcontour', 'spacingbar', 
'linespacing', 'stylenew', 'beginarrowstyle', 'endarrowstyle']);
+                       this._removeItems(deck, ['cellbordertype', 
'borderlinestyle', 'borderlinecolor',
+                                                'editcontour', 'spacingbar', 
'linespacing',
+                                                'stylenew', 'styleupdate',
+                                                'beginarrowstyle', 
'endarrowstyle']);
                }
        },
 
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to