Wikimedia Foundation projects
JavaScript parsing library
A JavaScript library for parsing wikitext.
|
Feature justification
User requirements
Specification
Software design document
Example 1:
// set the message string...
'foundResults' => 'You found [$3 {{PLURAL:$1|one file|$1 files}}] in [$4 {{PLURAL:$2|one directory|$2 directories}}].'
// later, create some complex behaviour out of a message string and put it on the page...
var filesJqueryLink = $('a').click( function() { alert( "you clicked on this!" ) }; );
var directoryLinkUrl = 'http://something/directories=' + directories;
$('#result').msg( 'foundResults', numFiles, numDirectories, filesJqueryLink, directoryLinkUrl );
Example 2:
// create an <A> which, when clicked, pops up an alert.
var link = $('<a></a>').click( function(){ alert("you clicked on this link"); } );
// find a paragraph on the page, and fill it with a particular MediaWiki string which has a link in
// it, and then apply the above link's behavior to that link!
// Imagine that "myMessageThatHasALink" looks like "This message has [$1 a link]."
$('#someId').msg( 'myMessageThatHasALink', link );
// Result: HTML that behaves as if you wrote this
// 'This message has <a href="#" onClick='alert("you clicked on this link")'>a link</a>.'
Test plan
Documentation plan
User interface design docs
Schedule
Task management
(e.g. link to relevant Bugzilla queries)
Release management plan
Community management plan
Status updates and notes
This article is issued from Mediawiki. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.