Code for JavaScript enhanced <option> selectors. More...
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' |
Code for JavaScript enhanced <option> selectors.
Definition at line 13 of file JsSelectToInput.php.
JsSelectToInput::__construct | ( | XmlSelect $ | select = null |
) |
Definition at line 32 of file JsSelectToInput.php.
JsSelectToInput::getButton | ( | $ | msg, | |
$ | source, | |||
$ | target | |||
) | [protected] |
Constructs the append button.
string | $msg Message key. | |
string | $source Html id. | |
string | $target Html id. |
Definition at line 107 of file JsSelectToInput.php.
Referenced by getHtmlAndPrepareJS().
JsSelectToInput::getHtmlAndPrepareJS | ( | ) |
Returns the whole input element and injects needed JavaScript.
MWException |
Definition at line 82 of file JsSelectToInput.php.
JsSelectToInput::getMessage | ( | ) |
Definition at line 73 of file JsSelectToInput.php.
JsSelectToInput::getSourceId | ( | ) |
Definition at line 45 of file JsSelectToInput.php.
JsSelectToInput::getTargetId | ( | ) |
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 | ) |
JsSelectToInput::setSourceId | ( | $ | id | ) |
Set the source id of the selector.
string | $id |
Definition at line 40 of file JsSelectToInput.php.
JsSelectToInput::setTargetId | ( | $ | id | ) |
Set the id of the target text field.
string | $id |
Definition at line 53 of file JsSelectToInput.php.
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.