MediaWiki:DRN-wizard.js: Difference between revisions

Content deleted Content added
Bold
Updating code per user request.
Line 35:
 
$( '#drwContent1' ).append( '<h3>Location of dispute</h3>' );
$( '#drwContent1' ).append( '<p>Please provide thea namelink ofto the article ortalk page section where thediscussion disputehas is locatedoccurred.<br> For example,Note: if thea disputesuitable wasdiscussion onlink theis articlenot Australiaprovided, enteryour inDRN <b>Australia</b>filing inmay thebe box, notautomatically <nowiki>[[Australia]]closed.</nowikip> or https://en.wikipedia.org/wiki/Australia' );
 
var inputbox = $( document.createElement( 'input' ) );
Line 56:
 
$( '#drwContent1' ).append( '<h3>Dispute overview</h3>' );
$( '#drwContent1' ).append( '<p>Can you give us ana quick explanation of what is going on? What is the issue you are bringing to dispute resolution?</p>' );
 
var desc = $( document.createElement( 'textarea' ) );
Line 104:
 
$( '#drwContent1' ).append( '<h3>Resolving the dispute</h3>' );
$( '#drwContent1' ).append( '<p>What other steps, if any, have you tried to resolve this dispute?</p>' );
$( '#drwContent1' ).append( '<p>What other steps have you tried to resolve the dispute so far. Please provide a link to where these discussions have occurred, separated by a comma or new line.<br>For example, <b><nowiki>[[Talk:Australia#Removal_of_Chief_Justice_from_Infobox]]</nowiki></b> or <b><nowiki>[https://en.wikipedia.org/wiki/Talk:Australia#Removal_of_Chief_Justice_from_Infobox Talk:Australia]</nowiki></b> would be acceptable links.<br>At a minimum, recent extensive discussion needs to have taken place on the talk page of the page in question.<br><font color="red"><b>Note: If a suitable discussion link is not provided, your request may be automatically closed.</b></font></p>' );
 
var desc = $( document.createElement( 'textarea' ) );
Line 171:
//Previous forums
$( '#drwContent1' ).append( '<h3>Resolving the dispute</h3>' );
$( '#drwContent1' ).append( '<h4>PreviousOther steps if any, you have tried to resolve thethis dispute</h4>' );
$( '#drwContent1' ).append( $( '<p></p>' ).text( this.previous_forums ) );
 
Line 184:
this.getWikitextReport = function() {
//Returns string of wikitext for submission to DR page
var report = "{{DR case status}}\n<!-- [[User:DoNotArchiveUntil]] 16:44, 6 October 2019 (UTC) -->{{Usersubst:ClueBot III/DoNotArchiveUntilDNAU|157038026614}}<!-- REMEMBER TO REMOVE THE PREVIOUS COMMENT WHEN CLOSING THIS THREAD! -->\n{{drn filing editor|Steven Crossin{{subst:REVISIONUSER}}|16:24, 22 September 2019 (UTC)~~~~~}}\n\n";
 
//On Talk Page
Line 197:
report += '* {{pagelinks|' + articleArray[ articleIndex ] + '}}\n';
}
 
//Involved users
report += "<span style=\"font-size:110%\">'''Users involved'''</span>\n";
Line 215:
 
//Previous forums
report += "<span style=\"font-size:110%\">'''How haveHave you tried to resolve this dispute before coming herepreviously?'''</span>\n";
report += '\n'+ this.previous_forums + '\n\n';
 
//Desired Outcome
report += "<span style=\"font-size:110%\">'''How do you think we can help resolve the dispute?'''</span>\n";
report += '\n' + this.desired_outcome + '\n\n';
 
Line 243:
var s2_active = ( this.wizard_step == 2 ) ? ' pr-active' : '';
var s3_active = ( this.wizard_step == 3 ) ? ' pr-active' : '';
var s4_active = ( this.wizard_step == 4 ) ? ' pr-active' : '';
 
 
Line 250 ⟶ 249:
signupbox += '<li class="pr-spacer' + s1_active + '"><div></div></li>';
 
signupbox += '<li class="s2' + s2_active + '"><span class="pr-number">2</span><span>Type of disputeDescription</span></li>';
signupbox += '<li class="pr-spacer' + s2_active + '"><div></div></li>';
 
signupbox += '<li class="s2s3' + s3_active + '"><span class="pr-number">3</span><span>DescriptionSummary</span></li>';
signupbox += '<li class="pr-spacer' + s3_active + '"><div></div></li>';
 
signupbox += '<li class="s4' + s4_active + '"><span class="pr-number">4</span><span>Summary</span></li>';
signupbox += '<li class="pr-spacer' + s4_active + '"><div></div></li>';
signupbox += '</ul>';
 
Line 305 ⟶ 301:
'<ul>' +
'<li>Help provide suggestions on content</li>' +
'<li>ProvideFrame editorsdiscussions withand guidanceoffer onsupport applicablefor policiesparties andthat guidelineswant to thework towards disputea compromise</li>' +
'<li>Mediate discussions and assist editors work towards a consensus on the disputed content</li>' +
'<li>Provide a structured environment with oversight, to allow editors to work together with experienced input</li>' +
'</ul>' +
 
Line 323 ⟶ 317:
);
 
var buttons = '<a href="#top" class="button1" id="yesContentClickButtonyesClickButton">Yes, it has.</a>';
buttons += ' <a href="#top" class="button1" id="showCancelButton">Not yet.</a>';
$( '#drwButtons' ).html( buttons );
 
$( '#yesContentClickButtonyesClickButton' ).click( yesContentClickyesClick );
$( '#showCancelButton' ).click( showCancel );
}
 
 
function showStep2( errorMsg ) {
 
gDRW.wizard_step = 2;
 
$( '#drwProgressBar' ).html( gDRW.getProgressBar() );
 
$( '#drwContent1' ).html(
'<h2>Types of dispute</h2>' +
 
'<p>This forum is designed to only assist with issues regarding the content of articles and isn\'t able to assist with concerns about other editors behaviour. Is this an issue only about another editors behaviour?.</p>'
);
 
var buttons = '<a href="#top" class="button1" id="yesConductClickButton">Yes, it is about another user.</a>';
buttons += ' <a href="#top" class="button1" id="showContentDisputeForm">No, it is not.</a>';
$( '#drwButtons' ).html( buttons );
 
$( '#yesConductClickButton' ).click( showConductCancel );
$( '#showContentDisputeForm' ).click( showStep3 );
}
 
function showStep3( errorMsg ) {
 
gDRW.wizard_step = 3;
$( '#drwProgressBar' ).html( gDRW.getProgressBar() );
 
Line 385 ⟶ 360:
var buttons = '<a href="#top" class="button1" id="showStep1Button">Back</a>';
buttons += ' <a href="#top" class="button1" id="showCancelButton">Cancel</a>';
buttons += ' <a href="#top" class="button1" id="showStep4ButtonshowStep3Button">Next</a>';
 
$( '#drwButtons' ).html( buttons );
Line 391 ⟶ 366:
$( '#showStep1Button' ).click( showStep1 );
$( '#showCancelButton' ).click( showCancel );
$( '#showStep4ButtonshowStep3Button' ).click( showStep4showStep3 );
}
 
function showStep4showStep3() {
 
var inputErrors = [];
Line 412 ⟶ 387:
}
if ( inputErrors.length > 0 ) {
return showStep3showStep2( 'All fields are required. Missing values for: ' + inputErrors.join( ', ' ) );
}
 
gDRW.wizard_step = 43;
$( '#drwProgressBar' ).html( gDRW.getProgressBar() );
 
Line 423 ⟶ 398:
 
 
var buttons = '<a href="#top" class="button1" id="showStep3ButtonshowStep2Button">Edit</a>';
buttons += ' <a href="#top" class="button1" id="showCancelButton">Cancel</a>';
buttons += ' <a href="#top" class="button1" id="doSubmitButton">Save</a>';
Line 429 ⟶ 404:
$( '#drwButtons' ).html( buttons );
 
$( '#showStep3ButtonshowStep2Button' ).click( showStep3showStep2 );
$( '#showCancelButton' ).click( showCancel );
$( '#doSubmitButton' ).click( doSubmit );
Line 446 ⟶ 421:
//Show error
$( '#drwContent1' ).html( '<h2>Error</h2><p>Sorry, there was an error attaching your request. Maybe try it again?</p>' );
$( '#drwButtons' ).html( '<a href="#top" class="button1" id="showStep4ButtonshowStep3Button">Back to Summary</a>' );
$( '#showStep4ButtonshowStep3Button' ).click( showStep4showStep3 );
} else {
$( '#drwContent1' ).html( '<h2>Error</p><p>Something went wrong!</p>' );
Line 453 ⟶ 428:
}
}
 
 
function showCancel() {
Line 463 ⟶ 439:
'It\'s best to discuss your concerns with the other users on the talk page of the article before seeking dispute resolution. ' +
'You can find instructions on how to do this at <a href="https://en.wikipedia.org/wiki/WP:DISCUSSIT">this page,</a> or you can place <code>{{helpme}}</code> on <a href="https://en.wikipedia.org/wiki/Special:MyTalk">your own talk page</a>, and a volunteer will come by your page to help.' +
'</p>'
);
$( '#drwButtons' ).html( '<a href="#top" class="button1" id="showStep1Button">Start Over</a>' );
$( '#showStep1Button' ).click( showStep1 );
}
 
function showConductCancel() {
 
gDRW.wizard_step = 0;
$( '#drwProgressBar' ).html( gDRW.getProgressBar() );
 
$( '#drwContent1' ).html(
'<p>' +
'We can only assist with content disputes. If you have concerns about the conduct of another editor, you will need to bring this to the <a href="https://en.wikipedia.org/wiki/WP:AN">Administrator\'s Noticeboard.</a>' +
'</p>'
);
Line 502 ⟶ 464:
* gDRW.previous_forums[ 'xxx' ] will be true if the use ticked the 'xxx' checkbox in the previous forums
*/
 
 
//Set the post-page on the DRW object
Line 540 ⟶ 503:
}
 
function yesContentClickyesClick() {
gDRW.talkpage = true;
showStep2();
Line 590 ⟶ 553:
if ( $( '#myDRW' ).length ){
 
importStylesheet( 'UserMediaWiki:Steven Crossin/DRWGadget-DRN-wizard.css' ); //CSS Styles for the DRW
 
//Setup the App's workspace