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;
|
font-size: 0.7em;
|
||||||
}
|
}
|
||||||
|
|
||||||
.afch-feedbackLink:hover {
|
|
||||||
text-decoration: underline;
|
|
||||||
}
|
|
||||||
|
|
||||||
#afchStatus {
|
#afchStatus {
|
||||||
list-style-position: inside;
|
list-style-position: inside;
|
||||||
text-align: left;
|
text-align: left;
|
||||||
@ -204,12 +200,21 @@ div.disabled-button {
|
|||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
|
|
||||||
.header-script {
|
#afchInitialHeader > span {
|
||||||
display: block;
|
display: block;
|
||||||
font-size: 15px;
|
font-size: 15px;
|
||||||
padding-bottom: 4px;
|
padding-bottom: 4px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#afchInitialHeader .feedback-link {
|
||||||
|
padding-left: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.feedback-link:hover {
|
||||||
|
cursor: pointer;
|
||||||
|
text-decoration: underline;
|
||||||
|
}
|
||||||
|
|
||||||
#afchWarnings {
|
#afchWarnings {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
background-color: #FF851B;
|
background-color: #FF851B;
|
||||||
|
@ -153,18 +153,19 @@
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Appends a feedback link to the given element
|
* 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} 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( {
|
var feedback = new mw.Feedback( {
|
||||||
title: new mw.Title( 'Wikipedia talk:WikiProject Articles for creation/Helper script/Rewrite' ),
|
title: new mw.Title( 'Wikipedia talk:WikiProject Articles for creation/Helper script/Rewrite' ),
|
||||||
bugsLink: 'https://github.com/WPAFC/afch-rewrite/issues/new',
|
bugsLink: 'https://github.com/WPAFC/afch-rewrite/issues/new',
|
||||||
bugsListLink: 'https://github.com/WPAFC/afch-rewrite/issues?state=open'
|
bugsListLink: 'https://github.com/WPAFC/afch-rewrite/issues?state=open'
|
||||||
} );
|
} );
|
||||||
$( '<span>' )
|
$( '<span>' )
|
||||||
.text( 'Give feedback!' )
|
.text( linkText || 'Give feedback!' )
|
||||||
.addClass( 'afch-feedbackLink' )
|
.addClass( 'feedback-link' )
|
||||||
.click( function () {
|
.click( function () {
|
||||||
feedback.launch( {
|
feedback.launch( {
|
||||||
subject: '[' + AFCH.consts.version + '] ' + ( type ? 'Feedback about ' + type : 'AFCH feedback' )
|
subject: '[' + AFCH.consts.version + '] ' + ( type ? 'Feedback about ' + type : 'AFCH feedback' )
|
||||||
|
@ -777,9 +777,8 @@
|
|||||||
}
|
}
|
||||||
} );
|
} );
|
||||||
|
|
||||||
// Add the feedback link to the left panel
|
// Add the feedback link to the header
|
||||||
// FIXME: temporarily disabled due to styling dilemma
|
AFCH.initFeedback( '#afchInitialHeader span', '[your topic here]', '(Give feedback!)' );
|
||||||
// AFCH.initFeedback( '#afchLeft', 'article review' );
|
|
||||||
|
|
||||||
// Set up click handlers
|
// Set up click handlers
|
||||||
$( '#afchAccept' ).click( function () { spinnerAndRun( showAcceptOptions ); } );
|
$( '#afchAccept' ).click( function () { spinnerAndRun( showAcceptOptions ); } );
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
<!-- main -->
|
<!-- main -->
|
||||||
<div id="afchReviewPanel" class="initial">
|
<div id="afchReviewPanel" class="initial">
|
||||||
<div id="afchInitialHeader">
|
<div id="afchInitialHeader">
|
||||||
<span class="header-script">AFCH v{{version}} / {{versionName}}</span>
|
<span>AFCH v{{version}} / {{versionName}}</span>
|
||||||
Reviewing "{{title}}"
|
Reviewing "{{title}}"
|
||||||
</div>
|
</div>
|
||||||
<div id="afchWarnings" class="hidden"></div>
|
<div id="afchWarnings" class="hidden"></div>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user