Reinstate feedback link in the initial header
Additionally, allow custom link text in AFCH.initFeedback(), as well as tidy up the header css a bit and remove an unneeded class.
This commit is contained in:
parent
ddb7eef6fc
commit
fbb9f9808a
15
src/afch.css
15
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;
|
||||
|
@ -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'
|
||||
} );
|
||||
$( '<span>' )
|
||||
.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' )
|
||||
|
@ -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 ); } );
|
||||
|
@ -3,7 +3,7 @@
|
||||
<!-- main -->
|
||||
<div id="afchReviewPanel" class="initial">
|
||||
<div id="afchInitialHeader">
|
||||
<span class="header-script">AFCH v{{version}} / {{versionName}}</span>
|
||||
<span>AFCH v{{version}} / {{versionName}}</span>
|
||||
Reviewing "{{title}}"
|
||||
</div>
|
||||
<div id="afchWarnings" class="hidden"></div>
|
||||
|
Loading…
x
Reference in New Issue
Block a user