#FUTURE THE WIZRD DOC CODE#
This function assembles the code of the actual description page from the object and the license tags, and prepares it for upload, either in local upload mode or in Commons upload mode. fuw.formatOutput() Called immediately after collectInput(), before uploading. Which is more user-friendly?) fuw.collectInput() This function collects the input data from the object and assembles a set of from them, representing the strings that are to be written into the fields of the description template. (Possible alternative: keep the submit button always enabled and run validateInput() only when it's clicked, showing a warning message if false. The fuwUpdateOptions() function will enable or disable the submit button in response to this validation. fuw.validateInput() Called at the end of each fuwUpdateOptions(), this function determines whether the current state of input data is complete and sufficient for uploading. It also shows and hides various warning messages in response to the result of previous validation routines stored in. It collects the input from all currently active input fields, updates the cached contents of the object from it, and switches visibility and enabled/disabled status for the various subsections of the questionnaire in response to the current status of the option radio-buttons. fuwUpdateOptions() The onChange event handler shared by most of the input elements. It creates the interactive form elements (buttons, text fields etc.) and sets the initial visibility of the main form area. The most important functions of the script are:įuwGlobal() The constructor function of the global window.fuw object, executed once when the page loads. bad filenames, missing target articles etc.) are stored in. A representation of the input data present at any given time during the input process is cached in, and data representing the current status of various warning conditions (e.g.
Data used during the input and upload process are stored in a Javascript object named window.fuw. It makes some use of the jQuery library, which is commonly used in Wikipedia scripts. The Javascript code has been tested with the Firefox 10.0 browser so far. To activate the Javascript, the wikipage must be loaded with a withJS= parameter. Empty elements in the wikitext mark the positions where they will be inserted. Interactive elements that cannot be created by normal wiki text ( elements, buttons, input text fields, dropdowns boxes etc.) are created by the Javascript when the page loads. Almost all of the text content used by the wizard (forms, prompts, warnings etc.) is contained as standard wikitext in the main page, inside hidden -elements and nested tables. css page, currently at MediaWiki:FileUploadWizard.css. The wizard consists of one normal wiki page, currently located at Wikipedia:File Upload Wizard, a page of client-side Javascript code, currently at MediaWiki:FileUploadWizard.js, and a corresponding.