From 234c94be6778e9e657d20d63867e101ce03c000b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adomas=20Ven=C4=8Dkauskas?= Date: Tue, 10 Nov 2015 16:46:47 +0000 Subject: [PATCH] Fixes my publication wizard on linux, Closes #738 Also: - Removes horizontal scrollbar in linux my publications wizard, Closes #740 --- .../zotero-platform/unix/publicationsDialog.css | 4 ++++ chrome/content/zotero/publicationsDialog.js | 10 ++++------ chrome/content/zotero/publicationsDialog.xul | 1 + 3 files changed, 9 insertions(+), 6 deletions(-) create mode 100644 chrome/content/zotero-platform/unix/publicationsDialog.css diff --git a/chrome/content/zotero-platform/unix/publicationsDialog.css b/chrome/content/zotero-platform/unix/publicationsDialog.css new file mode 100644 index 000000000..675ef2359 --- /dev/null +++ b/chrome/content/zotero-platform/unix/publicationsDialog.css @@ -0,0 +1,4 @@ +/* There's an ugly horizontal scrollbar on linux in some steps of the wizard, which this fixes */ +.wizard-page-box { + margin: 10px 40px; +} \ No newline at end of file diff --git a/chrome/content/zotero/publicationsDialog.js b/chrome/content/zotero/publicationsDialog.js index 6cd768d77..5e8540867 100644 --- a/chrome/content/zotero/publicationsDialog.js +++ b/chrome/content/zotero/publicationsDialog.js @@ -129,9 +129,7 @@ var Zotero_Publications_Dialog = new function () { var wizard = document.getElementById('zotero-publications-wizard'); var currentPage = wizard.currentPage; var nextPage = wizard.wizardPages[wizard.pageIndex + 1]; - var pageid = wizard.currentPage.pageid; var nextButton = wizard.getButton('next'); - var finishButton = wizard.getButton('finish'); // Require authorship checkbox on first page to be checked to advance wizard.canAdvance = document.getElementById('confirm-authorship-checkbox').checked; @@ -147,8 +145,6 @@ var Zotero_Publications_Dialog = new function () { && _shareSettings.sharing == 'cc' && !(_hasRights == 'all' && _keepRights))) { this.lastPage = false; - finishButton.hidden = true; - nextButton.hidden = false; nextButton.label = Zotero.getString( 'publications.buttons.next', Zotero.getString('publications.buttons.' + nextPage.pageid) @@ -157,8 +153,10 @@ var Zotero_Publications_Dialog = new function () { // Otherwise this is the last page else { this.lastPage = true; - nextButton.hidden = true; - finishButton.hidden = false; + // Due to issues with linux not handling finish button hiding correctly + // we just set the next button label to be the one for the finish button + // and leave visibility handling up to mr wizard + nextButton.label = Zotero.getString('publications.buttons.addToMyPublications'); } } diff --git a/chrome/content/zotero/publicationsDialog.xul b/chrome/content/zotero/publicationsDialog.xul index 0463a718b..762f921c0 100644 --- a/chrome/content/zotero/publicationsDialog.xul +++ b/chrome/content/zotero/publicationsDialog.xul @@ -31,6 +31,7 @@ +