diff --git a/src/afch.css b/src/afch.css index 467fa30..ac93b93 100644 --- a/src/afch.css +++ b/src/afch.css @@ -86,10 +86,6 @@ font-size: 0.7em; } -.afch-feedbackLink:hover { - text-decoration: underline; -} - #afchStatus { list-style-position: inside; text-align: left; @@ -204,12 +200,21 @@ div.disabled-button { position: relative; } -.header-script { +#afchInitialHeader > span { display: block; font-size: 15px; padding-bottom: 4px; } +#afchInitialHeader .feedback-link { + padding-left: 5px; +} + +.feedback-link:hover { + cursor: pointer; + text-decoration: underline; +} + #afchWarnings { text-align: center; background-color: #FF851B; diff --git a/src/modules/core.js b/src/modules/core.js index f2537e5..3c3b963 100644 --- a/src/modules/core.js +++ b/src/modules/core.js @@ -153,18 +153,19 @@ /** * Appends a feedback link to the given element - * @param {object} $element The jQuery element to which the link should be appended + * @param {string|jQuery} $element The jQuery element or selector to which the link should be appended * @param {string} type (optional) The part of AFCH that feedback is being given for, e.g. "files for upload" + * @param {string} linkText (optional) Text to display in the link; by default "Give feedback!" */ - initFeedback: function ( $element, type ) { + initFeedback: function ( $element, type, linkText ) { var feedback = new mw.Feedback( { title: new mw.Title( 'Wikipedia talk:WikiProject Articles for creation/Helper script/Rewrite' ), bugsLink: 'https://github.com/WPAFC/afch-rewrite/issues/new', bugsListLink: 'https://github.com/WPAFC/afch-rewrite/issues?state=open' } ); $( '' ) - .text( 'Give feedback!' ) - .addClass( 'afch-feedbackLink' ) + .text( linkText || 'Give feedback!' ) + .addClass( 'feedback-link' ) .click( function () { feedback.launch( { subject: '[' + AFCH.consts.version + '] ' + ( type ? 'Feedback about ' + type : 'AFCH feedback' ) diff --git a/src/modules/submissions.js b/src/modules/submissions.js index f5f89a8..059413d 100644 --- a/src/modules/submissions.js +++ b/src/modules/submissions.js @@ -777,9 +777,8 @@ } } ); - // Add the feedback link to the left panel - // FIXME: temporarily disabled due to styling dilemma - // AFCH.initFeedback( '#afchLeft', 'article review' ); + // Add the feedback link to the header + AFCH.initFeedback( '#afchInitialHeader span', '[your topic here]', '(Give feedback!)' ); // Set up click handlers $( '#afchAccept' ).click( function () { spinnerAndRun( showAcceptOptions ); } ); diff --git a/src/templates/tpl-submissions.html b/src/templates/tpl-submissions.html index 97d319c..649e754 100644 --- a/src/templates/tpl-submissions.html +++ b/src/templates/tpl-submissions.html @@ -3,7 +3,7 @@
- AFCH v{{version}} / {{versionName}} + AFCH v{{version}} / {{versionName}} Reviewing "{{title}}"