JavaScript parsing library

From MediaWiki.org
Jump to: navigation, search

Contents

[edit] Feature justification

[edit] User requirements

[edit] Specification

[edit] 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>.'

[edit] Test plan

[edit] Documentation plan

[edit] User interface design docs

[edit] Schedule

[edit] Task management

(e.g. link to relevant Bugzilla queries)

[edit] Release management plan

[edit] Community management plan

[edit] Status updates and notes

Personal tools
Namespaces

Variants
Actions
Navigation
Support
Download
Development
Communication
Print/export
Toolbox