Fix button order on HyperlinkDialog

Follow the same order as anywhere else such as annotations, JSdialog or
even tunneled dialogs:
primary action aligned to the left

Also update cypress test: Do not target button position related classes
instead, rely solely on main classes

Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: Iac209aa343f22ddfdbd5662eba43d7adaa3f0892
This commit is contained in:
Pedro Pinto Silva 2022-03-21 12:04:36 +01:00 committed by pedropintosilva
parent e0511aa1bd
commit 8d9317daa8
2 changed files with 3 additions and 3 deletions

View file

@ -716,8 +716,8 @@ L.Map.include({
_('Link') + '<input name="link" id="hyperlink-link-box" type="text" value="' + link + '"/>'
].join(''),
buttons: [
$.extend({}, vex.dialog.buttons.YES, { text: _('OK') }),
$.extend({}, vex.dialog.buttons.NO, { text: _('Cancel') })
$.extend({}, vex.dialog.buttons.NO, { text: _('Cancel') }),
$.extend({}, vex.dialog.buttons.YES, { text: _('OK') })
],
callback: function(data) {
if (data && data.link != '') {

View file

@ -340,7 +340,7 @@ describe('Top toolbar tests.', function() {
cy.get('#hyperlink-link-box')
.type('www.something.com');
cy.get('.vex-dialog-button-primary.vex-dialog-button.vex-first')
cy.get('.vex-dialog-button-primary.vex-dialog-button')
.click();
writerHelper.selectAllTextOfDoc();