JsSelectToInput Class Reference

Code for JavaScript enhanced <option> selectors. More...

List of all members.

Public Member Functions

 __construct (XmlSelect $select=null)
 setSourceId ($id)
 Set the source id of the selector.
 getSourceId ()
 setTargetId ($id)
 Set the id of the target text field.
 getTargetId ()
 setMessage ($message)
 Set the message key.
 getMessage ()
 getHtmlAndPrepareJS ()
 Returns the whole input element and injects needed JavaScript.

Static Public Member Functions

static injectJs ()
 Inject needed JavaScript in the page.

Protected Member Functions

 getButton ($msg, $source, $target)
 Constructs the append button.

Protected Attributes

 $targetId
 Id of the text field where stuff is appended.
 $sourceId
 Id of the <option> field.
 $select
 $buttonId
 Id on the button.
 $msg = 'translate-jssti-add'

Detailed Description

Code for JavaScript enhanced <option> selectors.

Definition at line 13 of file JsSelectToInput.php.


Constructor & Destructor Documentation

JsSelectToInput::__construct ( XmlSelect $  select = null  ) 

Definition at line 32 of file JsSelectToInput.php.


Member Function Documentation

JsSelectToInput::getButton ( msg,
source,
target 
) [protected]

Constructs the append button.

Parameters:
string $msg Message key.
string $source Html id.
string $target Html id.
Returns:
string

Definition at line 107 of file JsSelectToInput.php.

Referenced by getHtmlAndPrepareJS().

JsSelectToInput::getHtmlAndPrepareJS (  ) 

Returns the whole input element and injects needed JavaScript.

Exceptions:
MWException 
Returns:
string Html code.

Definition at line 82 of file JsSelectToInput.php.

Here is the call graph for this function:

JsSelectToInput::getMessage (  ) 
Returns:
string Message key.

Definition at line 73 of file JsSelectToInput.php.

JsSelectToInput::getSourceId (  ) 
Returns:
string

Definition at line 45 of file JsSelectToInput.php.

JsSelectToInput::getTargetId (  ) 
Returns:
string

Definition at line 60 of file JsSelectToInput.php.

static JsSelectToInput::injectJs (  )  [static]

Inject needed JavaScript in the page.

Definition at line 120 of file JsSelectToInput.php.

Referenced by getHtmlAndPrepareJS().

JsSelectToInput::setMessage ( message  ) 

Set the message key.

Parameters:
string $message

Definition at line 68 of file JsSelectToInput.php.

JsSelectToInput::setSourceId ( id  ) 

Set the source id of the selector.

Parameters:
string $id

Definition at line 40 of file JsSelectToInput.php.

JsSelectToInput::setTargetId ( id  ) 

Set the id of the target text field.

Parameters:
string $id

Definition at line 53 of file JsSelectToInput.php.


Member Data Documentation

JsSelectToInput::$buttonId [protected]

Id on the button.

Definition at line 25 of file JsSelectToInput.php.

JsSelectToInput::$msg = 'translate-jssti-add' [protected]

Definition at line 30 of file JsSelectToInput.php.

Referenced by getButton().

JsSelectToInput::$select [protected]

Definition at line 22 of file JsSelectToInput.php.

Referenced by __construct().

JsSelectToInput::$sourceId [protected]

Id of the <option> field.

Definition at line 17 of file JsSelectToInput.php.

JsSelectToInput::$targetId [protected]

Id of the text field where stuff is appended.

Definition at line 15 of file JsSelectToInput.php.


The documentation for this class was generated from the following file:
Generated on Tue Oct 29 00:00:46 2013 for MediaWiki Translate Extension by  doxygen 1.6.3