[Libreoffice-commits] online.git: cypress_test/integration_tests loleaflet/src
Michael Meeks (via logerrit)
logerrit at kemper.freedesktop.org
Thu Feb 20 04:22:08 UTC 2020
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.meeks at collabora.com>
AuthorDate: Thu Feb 20 03:24:54 2020 +0000
Commit: Michael Meeks <michael.meeks at 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.meeks at collabora.com>
Reviewed-by: Michael Meeks <michael.meeks at 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']);
}
},
More information about the Libreoffice-commits
mailing list