noalyss Version-9
|
Inplace_edit class for ajax update of HtmlInput object. More...
Public Member Functions | |
__construct (HtmlInput $p_input) | |
Create a Inplace_Edit, initialise JSON and fullfill the default json value: input which is the HtmlInput object serialized. More... | |
add_json_param ($p_attribute, $p_value) | |
Add json parameter to the current one, if there attribute already exists it will be overwritten. More... | |
ajax_input () | |
response in ajax to be edited More... | |
display () | |
get_input () | |
return the HtmlObject , var input More... | |
input () | |
set_callback ($callback) | |
the php callback file to call for ajax More... | |
set_input (HtmlInput $p_input) | |
set the var input (HtmlObject) and update the json attribute input More... | |
set_json ($json) | |
set_message ($p_str) | |
Message to display if the value is empty. More... | |
set_value ($p_value) | |
Set the value of the HtmlInput object $input. More... | |
value () | |
display only the value , if the action after saving or cancelling More... | |
Static Public Member Functions | |
static | build ($p_serialize) |
build a Inplace_Edit object from a serialized string (ajax json parameter = input) More... | |
Private Attributes | |
$callback | |
Php file which answered the ajax. More... | |
$input | |
HtmlInput object. More... | |
$json | |
Json object to pass to JavaScript. More... | |
$message | |
Message to display if value is empty. More... | |
Inplace_edit class for ajax update of HtmlInput object.
You need an ajax to response and modify the data. Some parameters will be sent by default when you click on the element
Very important it is the DOM ID of the HtmlInput element, it must unique. For the date set a uniq dom id, otherwise it fails $id_limit_date->id=uniqid("date");
Definition at line 41 of file inplace_edit.class.php.
Inplace_Edit::__construct | ( | HtmlInput | $p_input | ) |
Create a Inplace_Edit, initialise JSON and fullfill the default json value: input which is the HtmlInput object serialized.
HtmlInput | $p_input |
Definition at line 58 of file inplace_edit.class.php.
References input().
Inplace_Edit::add_json_param | ( | $p_attribute, | |
$p_value | |||
) |
Add json parameter to the current one, if there attribute already exists it will be overwritten.
Definition at line 198 of file inplace_edit.class.php.
Inplace_Edit::ajax_input | ( | ) |
response in ajax to be edited
Definition at line 79 of file inplace_edit.class.php.
References $ret, Icon_Action\cancel(), input(), and Icon_Action\validate().
|
static |
build a Inplace_Edit object from a serialized string (ajax json parameter = input)
Definition at line 66 of file inplace_edit.class.php.
Inplace_Edit::display | ( | ) |
Definition at line 72 of file inplace_edit.class.php.
References input().
Inplace_Edit::get_input | ( | ) |
return the HtmlObject , var input
Definition at line 207 of file inplace_edit.class.php.
References $input.
Referenced by set_value().
Inplace_Edit::input | ( | ) |
Definition at line 145 of file inplace_edit.class.php.
References $ret, input(), and span().
Referenced by __construct(), ajax_input(), display(), input(), set_input(), set_value(), and value().
Inplace_Edit::set_callback | ( | $callback | ) |
the php callback file to call for ajax
Definition at line 183 of file inplace_edit.class.php.
References $callback.
Inplace_Edit::set_input | ( | HtmlInput | $p_input | ) |
set the var input (HtmlObject) and update the json attribute input
HtmlInput | $p_input |
Definition at line 215 of file inplace_edit.class.php.
References input().
Referenced by set_value().
Inplace_Edit::set_json | ( | $json | ) |
Definition at line 191 of file inplace_edit.class.php.
References $json.
Inplace_Edit::set_message | ( | $p_str | ) |
Message to display if the value is empty.
string | $p_str |
Definition at line 234 of file inplace_edit.class.php.
Inplace_Edit::set_value | ( | $p_value | ) |
Set the value of the HtmlInput object $input.
type | $p_value |
Definition at line 225 of file inplace_edit.class.php.
References $input, get_input(), input(), and set_input().
Inplace_Edit::value | ( | ) |
display only the value , if the action after saving or cancelling
Definition at line 115 of file inplace_edit.class.php.
References input().
|
private |
Php file which answered the ajax.
Definition at line 50 of file inplace_edit.class.php.
Referenced by set_callback().
|
private |
HtmlInput object.
Definition at line 46 of file inplace_edit.class.php.
Referenced by build(), get_input(), and set_value().
|
private |
Json object to pass to JavaScript.
Definition at line 48 of file inplace_edit.class.php.
Referenced by set_json().
|
private |
Message to display if value is empty.
Definition at line 52 of file inplace_edit.class.php.