noalyss
Version-9
|
Purpose is to propose a librairy to display a table content and allow to update and delete row , handle also the ajax call thanks the script managetable.js. More...
Public Member Functions | |
__construct (Data_SQL $p_table) | |
add_json_param ($p_attribute, $p_value) | |
Add json parameter to the current one. More... | |
ajax_delete () | |
Delete a record and return an XML answer for ajax. More... | |
ajax_input ($p_status="OK") | |
send an xml with input of the object, create an xml answer. More... | |
ajax_save () | |
Save the record from Request into the DB and returns an XML to update the Html Element. More... | |
can_append_row () | |
return false if the append of the row is forbidden More... | |
can_delete_row () | |
return false if the delete of the row is forbidden More... | |
can_update_row () | |
return false if the update of the row is forbidden More... | |
check () | |
count_error () | |
returns the nb of errors found More... | |
create_js_script () | |
we must create first the javascript if we want to update, insert or delete rows. More... | |
delete () | |
delete a datarow , the id must be have set before More... | |
display_error () | |
Display a list of the error collected. More... | |
display_icon_del ($p_row) | |
display_icon_mod ($p_row) | |
display_row ($p_row) | |
display a data row in the table, with the order defined in a_order and depending of the visibility of the column More... | |
display_row_custom ($p_key, $p_value, $p_id=0) | |
When displaying a row, if a column has the type "custom" , we can call this function to display properly the value including the tag "<td>". More... | |
display_table ($p_order="", $p_array=NULL) | |
display the data of the table More... | |
display_table_header () | |
display the column header excepted the not visible one and in the order defined with $this->a_order More... | |
execute_query ($p_order="", $p_array=NULL) | |
execute the query (Data_SQL.seek), called by display_table More... | |
from_request () | |
get the data from http request strip the not update or not visible data to their initial value. More... | |
get_button_add_top () | |
get_col_option ($p_key) | |
add extra to column, normally class , javascript or style More... | |
get_col_sort () | |
When adding an element , it is column we checked to insert before,. More... | |
get_col_type ($p_key) | |
return the type of a column More... | |
get_current_pos ($p_key) | |
get the position of a column More... | |
get_current_row () | |
Return the current row printed in display_row. More... | |
get_dialog_box () | |
get_dialogbox_style () | |
return the db_style More... | |
get_error ($p_col) | |
retrieve the error message More... | |
get_header_option ($p_key) | |
add extra to column Header, normally class , javascript or style More... | |
get_icon_del () | |
get_icon_mod () | |
get_js_variable () | |
Get the object name. More... | |
get_json () | |
get_object_name () | |
get_order () | |
get_property_updatable ($p_key) | |
return True if the column is updatable otherwise false More... | |
get_property_visible ($p_key) | |
return True if the column is visible otherwise false More... | |
get_search_table () | |
Get if we can search in the table. More... | |
get_sort_column () | |
return the column to sort More... | |
get_table () | |
getCssClass () | |
getTitle () | |
input () | |
display into a dialog box the datarow in order to be appended or modified. More... | |
input_custom ($p_key, $p_value) | |
this function let you create your own input , for example for a ITEXT , a IRADIO , ... More... | |
insert () | |
insert a new value More... | |
move ($p_key, $p_idx) | |
if we change a column order , the order of the other columns is impacted. More... | |
param_set ($p_json) | |
Set the parameter of the object (gDossier, ac, plugin_code...) @detail By default , only gDossier will be set . More... | |
save () | |
save the Data_SQL Object The noalyss_SQL is not empty More... | |
send_header () | |
send the XML headers for the ajax call More... | |
set_append_row ($p_value) | |
Enable or disable the appending of rows. More... | |
set_button_add_top ($button_add_top) | |
set_callback ($p_file) | |
set the callback function that is passed to javascript More... | |
set_col_label ($p_key, $p_display) | |
set the name to display for a column More... | |
set_col_option ($p_key, $p_value) | |
add extra to column, normally class or style More... | |
set_col_sort ($p_num) | |
When adding an element ,we place it thanks the DOM Attribute sort_value set it to -1 if you want one to append. More... | |
set_col_tips ($p_key, $p_comment) | |
Set the info for a column, use Icon_Action::infobulle the message are in message_javascript.php. More... | |
set_col_type ($p_key, $p_value, $p_array=NULL) | |
set the type of a column , it will change in the input db box , the select must supply an array of possible values [val=> , label=>] with the variable $this->key_name->a_value More... | |
set_current_row ($current_row) | |
set the current row printed in display_row More... | |
set_delete_row ($p_value) | |
Enable or disable the deletion of rows. More... | |
set_dialog_box ($dialog_box) | |
set_dialogbox_style ($db_style) | |
Dialog box style , by default {position: "fixed", top: '15', width: "auto", "margin-left": "20%"}. More... | |
set_error ($p_col, $p_message) | |
set the error message for a wrong input More... | |
set_header_option ($p_key, $p_value) | |
add extra to column Header, normally class or style More... | |
set_icon_del ($pString) | |
Set the icon to delete at the right or left of the row. More... | |
set_icon_mod ($pString) | |
Set the icon to modify at the right ,the first col or left of the row. More... | |
set_json ($p_json) | |
Set the parameter of the object (gDossier, ac, plugin_code...) @detail By default , only gDossier will be set . More... | |
set_object_name ($p_object_name) | |
Set the object_name. More... | |
set_order ($p_order) | |
set_pk ($p_id) | |
set the id value of a data row and load from the db More... | |
set_property_updatable ($p_key, $p_value) | |
set a column of the data row updatable or not More... | |
set_property_visible ($p_key, $p_value) | |
set a column of the data row visible or not More... | |
set_search_table ($search_table) | |
Set the table searchable or not. More... | |
set_sort_column ($p_col) | |
set the column to sort by default More... | |
set_table (Data_SQL $p_noalyss_sql) | |
set_update_row ($p_value) | |
Enable or disable the updating of rows. More... | |
set_value ($p_key, $p_value) | |
setCssClass ($p_class) | |
setTitle ($p_title) | |
Set the title of the diabox , default is Donnée. More... | |
show_error ($p_col) | |
update () | |
Data Fields | |
const | UPDATABLE =1 |
const | VISIBLE =2 |
Protected Attributes | |
$a_info | |
Array with the infotip. More... | |
$a_label_displaid | |
Label of the col. of the datarow. More... | |
$a_order | |
order of the col More... | |
$a_prop | |
property for each col. More... | |
$a_select | |
Possible value if a_type is a SELECT. More... | |
$a_type | |
Type of the column : date , select ... Only in input. More... | |
$aerror | |
Array containing the error of the input data. More... | |
$col_sort | |
when inserting, it is the column to sort,-1 to disable it and append only More... | |
$dialog_box | |
ID of the dialog box which display the result of the ajax calls. More... | |
$json_parameter | |
Default parameter to add (gDossier...), sent to the ajax callback. More... | |
$object_name | |
Object_name is used for the javascript , it is the row id to update or delete. More... | |
$row_append | |
Flag to indicate if rows can be added. More... | |
$row_delete | |
Flag to indicate if rows can be deleted. More... | |
$row_update | |
Flag to indicate if rows can be updated. More... | |
$search_table | |
boolean , by default true ,it is possible to search in the table, More... | |
$sort_column | |
javascript sort on this column , if empty there is no js sort More... | |
$table | |
Object Data_SQL. More... | |
$title | |
Private Attributes | |
$a_col_option | |
in display_row and display_custom_row, it is the current row which is used More... | |
$a_header_option | |
Extra to add to the column Header : CSS Style , CSS class, javascript ,... More... | |
$button_add_top | |
place of the button add on the top, by default true More... | |
$cssclass | |
< give the title of the diabox , default is Data More... | |
$current_row | |
CSS class for the dialog box. More... | |
$dialogbox_style | |
style of the dialog box More... | |
$icon_del | |
place of right or left the icon update or mod, default right, accepted value=left,right More... | |
$icon_mod | |
place of right or left the icon update or mod, default right, accepted value=left,right,first column for mod More... | |
Purpose is to propose a librairy to display a table content and allow to update and delete row , handle also the ajax call thanks the script managetable.js.
Code for ajax , here we see the ajax_input for creating a dg box
Definition at line 65 of file manage_table_sql.class.php.
Manage_Table_SQL::__construct | ( | Data_SQL | $p_table | ) |
Reimplemented in Forecast_Item_MTable, Anc_Account_Table, and Forecast_Category_MTable.
Definition at line 106 of file manage_table_sql.class.php.
References $order, $value, Dossier\id(), table, title, and VISIBLE.
Manage_Table_SQL::add_json_param | ( | $p_attribute, | |
$p_value | |||
) |
Add json parameter to the current one.
Definition at line 468 of file manage_table_sql.class.php.
Referenced by Mobile_Device_MTable\__construct(), Forecast_Category_MTable\set_forecast_id(), Forecast_Item_MTable\set_forecast_id(), and Mobile_Device_MTable\set_profile_id().
Manage_Table_SQL::ajax_delete | ( | ) |
Delete a record and return an XML answer for ajax.
If a check is needed before deleting you can override this->delete and throw an exception if the deleting is not allowed
Definition at line 1396 of file manage_table_sql.class.php.
Manage_Table_SQL::ajax_input | ( | $p_status = "OK" | ) |
send an xml with input of the object, create an xml answer.
It will call Manage_Table_SQL.input to display the input , but if that function returns false, the "save" button will disappear but the form can be submitted with enter.
Definition at line 1308 of file manage_table_sql.class.php.
References $close, $ctl, $ex, $html, $root, $status, $xml, HtmlInput\button_action(), display_error(), getTitle(), HtmlInput\hidden(), input(), HtmlInput\json_to_hidden(), HtmlInput\submit(), table, and HtmlInput\title_box().
Referenced by ajax_save().
Manage_Table_SQL::ajax_save | ( | ) |
Save the record from Request into the DB and returns an XML to update the Html Element.
The function check() will be called before saving
Definition at line 1234 of file manage_table_sql.class.php.
References $array, $ctl, $ex, $html, $root, $status, $xml, ajax_input(), check(), display_row(), from_request(), save(), and table.
Manage_Table_SQL::can_append_row | ( | ) |
return false if the append of the row is forbidden
Definition at line 599 of file manage_table_sql.class.php.
References $row_append.
Referenced by display_table().
Manage_Table_SQL::can_delete_row | ( | ) |
return false if the delete of the row is forbidden
Definition at line 641 of file manage_table_sql.class.php.
References $row_delete.
Referenced by display_icon_del(), and display_table_header().
Manage_Table_SQL::can_update_row | ( | ) |
return false if the update of the row is forbidden
Definition at line 570 of file manage_table_sql.class.php.
References $row_update.
Referenced by display_icon_mod(), display_row(), and display_table_header().
Manage_Table_SQL::check | ( | ) |
@brief This function can be overrided to check the data before inserting , updating or removing, above an example of an overidden check. Usually , you get the row of the table (get_table) , you check the conditions if an condition is not met then you set the error with $this->set_error if there are error (returns false otherwise true @see set_error get_error count_error @return boolean
Reimplemented in Tva_Rate_MTable, Forecast_Item_MTable, Acc_Plan_MTable, Card_Attribut_MTable, Mobile_Device_MTable, Currency_MTable, Acc_Report_MTable, Action_Document_Type_MTable, Forecast_Category_MTable, Anc_Account_Table, Payment_Method_MTable, Template_Card_Category, and Parameter_Extra_MTable.
Definition at line 351 of file manage_table_sql.class.php.
Referenced by ajax_save().
Manage_Table_SQL::count_error | ( | ) |
returns the nb of errors found
Definition at line 296 of file manage_table_sql.class.php.
Referenced by Mobile_Device_MTable\check(), Card_Attribut_MTable\check(), Forecast_Item_MTable\check(), and Tva_Rate_MTable\check().
Manage_Table_SQL::create_js_script | ( | ) |
we must create first the javascript if we want to update, insert or delete rows.
It is the default script .
Definition at line 516 of file manage_table_sql.class.php.
References $style.
Manage_Table_SQL::delete | ( | ) |
delete a datarow , the id must be have set before
Reimplemented in Currency_MTable, Tva_Rate_MTable, Card_Attribut_MTable, Action_Document_Type_MTable, Anc_Account_Table, and Template_Card_Category.
Definition at line 1385 of file manage_table_sql.class.php.
References table.
Manage_Table_SQL::display_error | ( | ) |
Display a list of the error collected.
Definition at line 1486 of file manage_table_sql.class.php.
References $error, $i, $label, get_error(), and h.
Referenced by ajax_input().
Manage_Table_SQL::display_icon_del | ( | $p_row | ) |
Definition at line 956 of file manage_table_sql.class.php.
References $js, can_delete_row(), table, and Icon_Action\trash().
Referenced by display_row().
Manage_Table_SQL::display_icon_mod | ( | $p_row | ) |
Definition at line 943 of file manage_table_sql.class.php.
References $js, can_update_row(), Icon_Action\modify(), and table.
Referenced by display_row().
Manage_Table_SQL::display_row | ( | $p_row | ) |
display a data row in the table, with the order defined in a_order and depending of the visibility of the column
array | $p_row | contains a row from the database |
From database
Reimplemented in Card_Attribut_MTable, Currency_MTable, Forecast_Item_MTable, Anc_Account_Table, and Acc_Plan_MTable.
Definition at line 978 of file manage_table_sql.class.php.
References $col_sort, $e, $i, $idx, $js, $value, can_update_row(), display_icon_del(), display_icon_mod(), display_row_custom(), get_col_type(), get_property_visible(), table, and td().
Referenced by ajax_save(), and display_table().
Manage_Table_SQL::display_row_custom | ( | $p_key, | |
$p_value, | |||
$p_id = 0 |
|||
) |
When displaying a row, if a column has the type "custom" , we can call this function to display properly the value including the tag "<td>".
You can get the full array from display_row via get_current_row() or reload from db thanks $p_id
$p_key | string key name | |
$p_value | string value | |
int | $p_id | id of the row , usually the pk of Data_SQL (optional default 0) |
Reimplemented in Mobile_Device_MTable, Acc_Report_MTable, and Card_Attribut_MTable.
Definition at line 1101 of file manage_table_sql.class.php.
References td().
Referenced by display_row().
Manage_Table_SQL::display_table | ( | $p_order = "" , |
|
$p_array = NULL |
|||
) |
display the data of the table
$p_order | is the cond or order of the rows, if empty the primary key will be used |
$p_array | array of the bind variables |
Reimplemented in Forecast_Item_MTable, and Acc_Report_MTable.
Definition at line 798 of file manage_table_sql.class.php.
References $e, $i, $nb, $p_array, $p_order, $result, $ret, $row, HtmlInput\button_action(), BUTTONADD, can_append_row(), display_row(), display_table_header(), execute_query(), DatabaseCore\fetch_array(), HtmlInput\filter_table(), get_property_visible(), get_search_table(), and DatabaseCore\num_row().
Manage_Table_SQL::display_table_header | ( | ) |
display the column header excepted the not visible one and in the order defined with $this->a_order
Definition at line 858 of file manage_table_sql.class.php.
References $i, $nb, $style, can_delete_row(), can_update_row(), get_property_visible(), and th().
Referenced by display_table().
Manage_Table_SQL::execute_query | ( | $p_order = "" , |
|
$p_array = NULL |
|||
) |
execute the query (Data_SQL.seek), called by display_table
string | (default empty) $p_order SQL string added to DatabaseCore::seek |
array | (default null) $p_array Array for the SQL string |
Definition at line 782 of file manage_table_sql.class.php.
References $p_array, $p_order, $ret, and table.
Referenced by display_table().
Manage_Table_SQL::from_request | ( | ) |
get the data from http request strip the not update or not visible data to their initial value.
Before saving , it is important to set the pk and load from db
Reimplemented in Currency_MTable, Forecast_Item_MTable, Operation_Predef_MTable, and Action_Document_Type_MTable.
Definition at line 926 of file manage_table_sql.class.php.
References $http, $i, $nb, get_property_updatable(), get_property_visible(), and table.
Referenced by ajax_save().
Manage_Table_SQL::get_button_add_top | ( | ) |
Definition at line 765 of file manage_table_sql.class.php.
References $button_add_top.
Manage_Table_SQL::get_col_option | ( | $p_key | ) |
add extra to column, normally class , javascript or style
string | $p_key | column name |
Definition at line 360 of file manage_table_sql.class.php.
Manage_Table_SQL::get_col_sort | ( | ) |
When adding an element , it is column we checked to insert before,.
Definition at line 231 of file manage_table_sql.class.php.
References $col_sort.
Manage_Table_SQL::get_col_type | ( | $p_key | ) |
return the type of a column
$p_key | col name |
Definition at line 447 of file manage_table_sql.class.php.
Referenced by display_row().
Manage_Table_SQL::get_current_pos | ( | $p_key | ) |
get the position of a column
$p_key | data column |
Definition at line 705 of file manage_table_sql.class.php.
References $i.
Referenced by move().
Manage_Table_SQL::get_current_row | ( | ) |
Return the current row printed in display_row.
Definition at line 1073 of file manage_table_sql.class.php.
References $current_row.
Manage_Table_SQL::get_dialog_box | ( | ) |
Manage_Table_SQL::get_dialogbox_style | ( | ) |
return the db_style
Definition at line 193 of file manage_table_sql.class.php.
References $dialogbox_style.
Manage_Table_SQL::get_error | ( | $p_col | ) |
retrieve the error message
$p_col | column name |
Definition at line 306 of file manage_table_sql.class.php.
Referenced by display_error(), Tva_Rate_MTable\input(), Template_Card_Category\input(), input(), and show_error().
Manage_Table_SQL::get_header_option | ( | $p_key | ) |
add extra to column Header, normally class , javascript or style
string | $p_key | column name |
Definition at line 393 of file manage_table_sql.class.php.
Manage_Table_SQL::get_icon_del | ( | ) |
Definition at line 260 of file manage_table_sql.class.php.
References $icon_del.
Manage_Table_SQL::get_icon_mod | ( | ) |
Definition at line 256 of file manage_table_sql.class.php.
References $icon_mod.
Manage_Table_SQL::get_js_variable | ( | ) |
Get the object name.
: return the object name , it is useful it the javascript will return coded without the create_js_script function
Definition at line 461 of file manage_table_sql.class.php.
References $object_name.
Manage_Table_SQL::get_json | ( | ) |
Definition at line 473 of file manage_table_sql.class.php.
References $json_parameter.
Manage_Table_SQL::get_object_name | ( | ) |
Definition at line 477 of file manage_table_sql.class.php.
References $object_name.
Referenced by Operation_Predef_MTable\display_button_add(), and Template_Card_Category\input().
Manage_Table_SQL::get_order | ( | ) |
Definition at line 273 of file manage_table_sql.class.php.
References $a_order.
Manage_Table_SQL::get_property_updatable | ( | $p_key | ) |
return True if the column is updatable otherwise false
$p_key | data column |
Definition at line 650 of file manage_table_sql.class.php.
References $val, and UPDATABLE.
Referenced by from_request(), Tva_Rate_MTable\input(), input(), and set_property_updatable().
Manage_Table_SQL::get_property_visible | ( | $p_key | ) |
return True if the column is visible otherwise false
$p_key | data column |
Definition at line 682 of file manage_table_sql.class.php.
Referenced by display_row(), display_table(), display_table_header(), from_request(), Tva_Rate_MTable\input(), input(), and set_property_visible().
Manage_Table_SQL::get_search_table | ( | ) |
Get if we can search in the table.
Definition at line 165 of file manage_table_sql.class.php.
References $search_table.
Referenced by display_table().
Manage_Table_SQL::get_sort_column | ( | ) |
return the column to sort
Definition at line 907 of file manage_table_sql.class.php.
References $sort_column.
Manage_Table_SQL::get_table | ( | ) |
Definition at line 264 of file manage_table_sql.class.php.
References $table.
Referenced by Template_Card_Category\add_mandatory_attr(), Parameter_Extra_MTable\check(), Payment_Method_MTable\check(), Anc_Account_Table\check(), Forecast_Category_MTable\check(), Action_Document_Type_MTable\check(), Acc_Report_MTable\check(), Currency_MTable\check(), Mobile_Device_MTable\check(), Card_Attribut_MTable\check(), Forecast_Item_MTable\check(), Forecast_Item_MTable\count_category(), Action_Document_Type_MTable\delete(), Card_Attribut_MTable\delete(), Currency_MTable\delete(), Forecast_Item_MTable\display_row(), Forecast_Item_MTable\display_table(), Operation_Predef_MTable\from_request(), Forecast_Item_MTable\from_request(), Currency_MTable\input(), Forecast_Category_MTable\input(), Operation_Predef_MTable\input(), Template_Card_Category\input(), Forecast_Item_MTable\input(), Action_Document_Type_MTable\input(), Mobile_Device_MTable\input_custom(), Card_Attribut_MTable\input_custom(), Payment_Method_MTable\input_custom(), Tag_Group_MTable\input_tag(), Currency_MTable\save(), Action_Document_Type_MTable\save(), Forecast_Category_MTable\set_forecast_id(), and Mobile_Device_MTable\set_profile_id().
Manage_Table_SQL::getCssClass | ( | ) |
Definition at line 146 of file manage_table_sql.class.php.
References $cssclass.
Manage_Table_SQL::getTitle | ( | ) |
Definition at line 157 of file manage_table_sql.class.php.
References $title.
Referenced by ajax_input().
Manage_Table_SQL::input | ( | ) |
display into a dialog box the datarow in order to be appended or modified.
Can be override if you need a more complex form or add elements with "set_order" before calling this function. This function does not add the form , only the table.
It returns true , if it is not readyonly and the form will have a "save" button, if it returns nothing or false then there is no save button, nor form, the content is then readonly
Reimplemented in Acc_Plan_MTable, Action_Document_Type_MTable, Forecast_Item_MTable, Template_Card_Category, Operation_Predef_MTable, Currency_MTable, Forecast_Category_MTable, Tva_Rate_MTable, and Tag_Group_MTable.
Definition at line 1117 of file manage_table_sql.class.php.
References $error, $i, $label, $select, $text, $value, HtmlInput\errorbulle(), get_error(), get_property_updatable(), get_property_visible(), h, HtmlInput\hidden(), Icon_Action\infobulle(), input_custom(), and table.
Referenced by ajax_input().
Manage_Table_SQL::input_custom | ( | $p_key, | |
$p_value | |||
) |
this function let you create your own input , for example for a ITEXT , a IRADIO , ...
it must be override , there is not default
string | $p_key | name of the column |
string | $p_value | current value |
Reimplemented in Acc_Plan_MTable, Payment_Method_MTable, Card_Attribut_MTable, Mobile_Device_MTable, and Acc_Report_MTable.
Definition at line 1225 of file manage_table_sql.class.php.
Referenced by input().
Manage_Table_SQL::insert | ( | ) |
insert a new value
Definition at line 1456 of file manage_table_sql.class.php.
References table.
Manage_Table_SQL::move | ( | $p_key, | |
$p_idx | |||
) |
if we change a column order , the order of the other columns is impacted.
With a_order[0,1,2,3]=[x,y,z,a] if we move the column x (idx=0) to 2
we must obtain [y,z,x,a]
string | $p_key | data column |
integer | $p_idx | new location |
Definition at line 724 of file manage_table_sql.class.php.
References $i, $old, and get_current_pos().
Manage_Table_SQL::param_set | ( | $p_json | ) |
Set the parameter of the object (gDossier, ac, plugin_code...) @detail By default , only gDossier will be set .
The default value is given in the constructor
string | with json format $p_json |
Definition at line 488 of file manage_table_sql.class.php.
References set_json().
Manage_Table_SQL::save | ( | ) |
save the Data_SQL Object The noalyss_SQL is not empty
Reimplemented in Action_Document_Type_MTable, Currency_MTable, Tva_Rate_MTable, and Operation_Predef_MTable.
Definition at line 1439 of file manage_table_sql.class.php.
References table.
Referenced by ajax_save().
Manage_Table_SQL::send_header | ( | ) |
send the XML headers for the ajax call
Definition at line 184 of file manage_table_sql.class.php.
Manage_Table_SQL::set_append_row | ( | $p_value | ) |
Enable or disable the appending of rows.
$p_value | Boolean : true enable the row to be appended |
Definition at line 620 of file manage_table_sql.class.php.
Referenced by Mobile_Device_MTable\__construct(), and Operation_Predef_MTable\__construct().
Manage_Table_SQL::set_button_add_top | ( | $button_add_top | ) |
Definition at line 770 of file manage_table_sql.class.php.
References $button_add_top.
Manage_Table_SQL::set_callback | ( | $p_file | ) |
set the callback function that is passed to javascript
$p_file | : callback file by default ajax.php |
Definition at line 507 of file manage_table_sql.class.php.
Referenced by Mobile_Device_MTable\__construct(), and Operation_Predef_MTable\__construct().
Manage_Table_SQL::set_col_label | ( | $p_key, | |
$p_display | |||
) |
set the name to display for a column
string | $p_key | data column |
string | $p_display | Label to display |
Definition at line 696 of file manage_table_sql.class.php.
Referenced by Card_Attribut_MTable\__construct(), Mobile_Device_MTable\__construct(), Contact_Option_Ref_MTable\__construct(), Template_Card_Category\__construct(), Payment_Method_MTable\__construct(), Anc_Account_Table\__construct(), Action_Document_Type_MTable\__construct(), Tag_Group_MTable\__construct(), Operation_Predef_MTable\__construct(), Tva_Rate_MTable\__construct(), and Currency_MTable\__construct().
Manage_Table_SQL::set_col_option | ( | $p_key, | |
$p_value | |||
) |
add extra to column, normally class or style
string | $p_key | column name |
string | $p_value | extra info for this column (CSS, js, ...) |
Definition at line 380 of file manage_table_sql.class.php.
Manage_Table_SQL::set_col_sort | ( | $p_num | ) |
When adding an element ,we place it thanks the DOM Attribute sort_value set it to -1 if you want one to append.
numeric | $pn_num |
Definition at line 253 of file manage_table_sql.class.php.
Referenced by Card_Attribut_MTable\__construct(), Mobile_Device_MTable\__construct(), Anc_Account_Table\__construct(), and Operation_Predef_MTable\__construct().
Manage_Table_SQL::set_col_tips | ( | $p_key, | |
$p_comment | |||
) |
Set the info for a column, use Icon_Action::infobulle the message are in message_javascript.php.
string | $p_key | Column name |
integer | $p_comment | comment idx |
Definition at line 243 of file manage_table_sql.class.php.
Referenced by Card_Attribut_MTable\__construct(), Mobile_Device_MTable\__construct(), and Payment_Method_MTable\__construct().
Manage_Table_SQL::set_col_type | ( | $p_key, | |
$p_value, | |||
$p_array = NULL |
|||
) |
set the type of a column , it will change in the input db box , the select must supply an array of possible values [val=> , label=>] with the variable $this->key_name->a_value
$p_key | col name |
$p_type | is "text", "numeric", "date", "select", "timestamp","custom" |
$p_array | if type is SELECT an array is expected |
Definition at line 425 of file manage_table_sql.class.php.
References $p_array.
Referenced by Card_Attribut_MTable\__construct(), Mobile_Device_MTable\__construct(), Contact_Option_Ref_MTable\__construct(), Anc_Account_Table\__construct(), Payment_Method_MTable\__construct(), Operation_Predef_MTable\__construct(), Tva_Rate_MTable\__construct(), and Currency_MTable\__construct().
Manage_Table_SQL::set_current_row | ( | $current_row | ) |
set the current row printed in display_row
type | $current_row |
Definition at line 1082 of file manage_table_sql.class.php.
References $current_row.
Manage_Table_SQL::set_delete_row | ( | $p_value | ) |
Enable or disable the deletion of rows.
$p_value | Boolean : true enable the row to be deleted |
Definition at line 609 of file manage_table_sql.class.php.
Referenced by Mobile_Device_MTable\__construct(), Currency_MTable\__construct(), Card_Attribut_MTable\display_row(), and Currency_MTable\display_row().
Manage_Table_SQL::set_dialog_box | ( | $dialog_box | ) |
mixed | $dialog_box |
Definition at line 221 of file manage_table_sql.class.php.
References $dialog_box.
Referenced by Operation_Predef_MTable\__construct().
Manage_Table_SQL::set_dialogbox_style | ( | $db_style | ) |
Dialog box style , by default {position: "fixed", top: '15', width: "auto", "margin-left": "20%"}.
array | $db_style,will | be transformed into a json object |
Definition at line 203 of file manage_table_sql.class.php.
Manage_Table_SQL::set_error | ( | $p_col, | |
$p_message | |||
) |
set the error message for a wrong input
$p_col | the column name |
$p_message | the error message |
Definition at line 289 of file manage_table_sql.class.php.
Referenced by Parameter_Extra_MTable\check(), Payment_Method_MTable\check(), Template_Card_Category\check(), Anc_Account_Table\check(), Forecast_Category_MTable\check(), Action_Document_Type_MTable\check(), Acc_Report_MTable\check(), Currency_MTable\check(), Mobile_Device_MTable\check(), Card_Attribut_MTable\check(), Acc_Plan_MTable\check(), Forecast_Item_MTable\check(), and Tva_Rate_MTable\check().
Manage_Table_SQL::set_header_option | ( | $p_key, | |
$p_value | |||
) |
add extra to column Header, normally class or style
string | $p_key | column name |
string | $p_value | extra info for this column (CSS, js, ...) |
Definition at line 406 of file manage_table_sql.class.php.
Referenced by Mobile_Device_MTable\__construct().
Manage_Table_SQL::set_icon_del | ( | $pString | ) |
Set the icon to delete at the right or left of the row.
type | $pString |
Exception |
Definition at line 591 of file manage_table_sql.class.php.
Manage_Table_SQL::set_icon_mod | ( | $pString | ) |
Set the icon to modify at the right ,the first col or left of the row.
type | $pString |
Exception |
Definition at line 581 of file manage_table_sql.class.php.
Referenced by Currency_MTable\__construct().
Manage_Table_SQL::set_json | ( | $p_json | ) |
Set the parameter of the object (gDossier, ac, plugin_code...) @detail By default , only gDossier will be set .
The default value is given in the constructor
string | with json format $p_json |
Definition at line 498 of file manage_table_sql.class.php.
Referenced by param_set().
Manage_Table_SQL::set_object_name | ( | $p_object_name | ) |
Set the object_name.
string | $p_object_name | name of the JS var, used in ajax response,id of the part of the id DOMElement to modify |
Definition at line 543 of file manage_table_sql.class.php.
Referenced by Mobile_Device_MTable\__construct(), and Anc_Account_Table\__construct().
Manage_Table_SQL::set_order | ( | $p_order | ) |
Definition at line 277 of file manage_table_sql.class.php.
References $p_order.
Referenced by Mobile_Device_MTable\__construct(), Payment_Method_MTable\__construct(), Action_Document_Type_MTable\__construct(), and Operation_Predef_MTable\__construct().
Manage_Table_SQL::set_pk | ( | $p_id | ) |
set the id value of a data row and load from the db
Definition at line 915 of file manage_table_sql.class.php.
Referenced by Operation_Predef_MTable\save().
Manage_Table_SQL::set_property_updatable | ( | $p_key, | |
$p_value | |||
) |
set a column of the data row updatable or not
string | $p_key | data column |
bool | $p_value | Boolean False or True |
Definition at line 553 of file manage_table_sql.class.php.
References get_property_updatable(), and UPDATABLE.
Referenced by Card_Attribut_MTable\__construct(), Template_Card_Category\__construct(), Anc_Account_Table\__construct(), Action_Document_Type_MTable\__construct(), Operation_Predef_MTable\__construct(), Tag_Group_MTable\__construct(), and Tva_Rate_MTable\__construct().
Manage_Table_SQL::set_property_visible | ( | $p_key, | |
$p_value | |||
) |
set a column of the data row visible or not
string | $p_key | data column |
bool | $p_value | Boolean False or True |
Definition at line 663 of file manage_table_sql.class.php.
References get_property_visible(), and VISIBLE.
Referenced by Card_Attribut_MTable\__construct(), Mobile_Device_MTable\__construct(), Contact_Option_Ref_MTable\__construct(), Payment_Method_MTable\__construct(), Anc_Account_Table\__construct(), Action_Document_Type_MTable\__construct(), Operation_Predef_MTable\__construct(), Tag_Group_MTable\__construct(), and Currency_MTable\__construct().
Manage_Table_SQL::set_search_table | ( | $search_table | ) |
Set the table searchable or not.
boolean | : true we can search |
Definition at line 175 of file manage_table_sql.class.php.
References $search_table.
Manage_Table_SQL::set_sort_column | ( | $p_col | ) |
set the column to sort by default
Definition at line 900 of file manage_table_sql.class.php.
Referenced by Mobile_Device_MTable\__construct(), Operation_Predef_MTable\__construct(), and Currency_MTable\__construct().
Manage_Table_SQL::set_table | ( | Data_SQL | $p_noalyss_sql | ) |
Definition at line 269 of file manage_table_sql.class.php.
References table.
Manage_Table_SQL::set_update_row | ( | $p_value | ) |
Enable or disable the updating of rows.
$p_value | Boolean : true enable the row to be updated |
Definition at line 631 of file manage_table_sql.class.php.
Referenced by Card_Attribut_MTable\display_row(), and Currency_MTable\display_row().
Manage_Table_SQL::set_value | ( | $p_key, | |
$p_value | |||
) |
Definition at line 1476 of file manage_table_sql.class.php.
References table.
Manage_Table_SQL::setCssClass | ( | $p_class | ) |
Definition at line 143 of file manage_table_sql.class.php.
Manage_Table_SQL::setTitle | ( | $p_title | ) |
Set the title of the diabox , default is Donnée.
type | $p_title |
Definition at line 153 of file manage_table_sql.class.php.
References title.
Manage_Table_SQL::show_error | ( | $p_col | ) |
Definition at line 532 of file manage_table_sql.class.php.
References $error, HtmlInput\errorbulle(), and get_error().
Manage_Table_SQL::update | ( | ) |
Definition at line 1466 of file manage_table_sql.class.php.
References table.
|
private |
in display_row and display_custom_row, it is the current row which is used
Extra to add to the column : CSS Style , CSS class, javascript ,...
Definition at line 95 of file manage_table_sql.class.php.
|
private |
Extra to add to the column Header : CSS Style , CSS class, javascript ,...
Definition at line 96 of file manage_table_sql.class.php.
|
protected |
Array with the infotip.
Definition at line 81 of file manage_table_sql.class.php.
|
protected |
Label of the col. of the datarow.
Definition at line 69 of file manage_table_sql.class.php.
|
protected |
order of the col
Definition at line 70 of file manage_table_sql.class.php.
Referenced by get_order().
|
protected |
property for each col.
Definition at line 71 of file manage_table_sql.class.php.
|
protected |
Possible value if a_type is a SELECT.
Definition at line 73 of file manage_table_sql.class.php.
|
protected |
Type of the column : date , select ... Only in input.
Definition at line 72 of file manage_table_sql.class.php.
|
protected |
Array containing the error of the input data.
Definition at line 79 of file manage_table_sql.class.php.
|
private |
place of the button add on the top, by default true
Definition at line 91 of file manage_table_sql.class.php.
Referenced by get_button_add_top(), and set_button_add_top().
|
protected |
when inserting, it is the column to sort,-1 to disable it and append only
Definition at line 80 of file manage_table_sql.class.php.
Referenced by display_row(), and get_col_sort().
|
private |
< give the title of the diabox , default is Data
Definition at line 93 of file manage_table_sql.class.php.
Referenced by getCssClass().
|
private |
CSS class for the dialog box.
Definition at line 94 of file manage_table_sql.class.php.
Referenced by get_current_row(), and set_current_row().
|
protected |
ID of the dialog box which display the result of the ajax calls.
Definition at line 83 of file manage_table_sql.class.php.
Referenced by get_dialog_box(), and set_dialog_box().
|
private |
style of the dialog box
Definition at line 90 of file manage_table_sql.class.php.
Referenced by get_dialogbox_style().
|
private |
place of right or left the icon update or mod, default right, accepted value=left,right
Definition at line 89 of file manage_table_sql.class.php.
Referenced by get_icon_del().
|
private |
place of right or left the icon update or mod, default right, accepted value=left,right,first column for mod
Definition at line 88 of file manage_table_sql.class.php.
Referenced by get_icon_mod().
|
protected |
Default parameter to add (gDossier...), sent to the ajax callback.
Definition at line 78 of file manage_table_sql.class.php.
Referenced by get_json().
|
protected |
Object_name is used for the javascript , it is the row id to update or delete.
Definition at line 74 of file manage_table_sql.class.php.
Referenced by get_js_variable(), and get_object_name().
|
protected |
Flag to indicate if rows can be added.
Definition at line 77 of file manage_table_sql.class.php.
Referenced by can_append_row().
|
protected |
Flag to indicate if rows can be deleted.
Definition at line 75 of file manage_table_sql.class.php.
Referenced by can_delete_row().
|
protected |
Flag to indicate if rows can be updated.
Definition at line 76 of file manage_table_sql.class.php.
Referenced by can_update_row().
|
protected |
boolean , by default true ,it is possible to search in the table,
Definition at line 84 of file manage_table_sql.class.php.
Referenced by get_search_table(), and set_search_table().
|
protected |
javascript sort on this column , if empty there is no js sort
Definition at line 82 of file manage_table_sql.class.php.
Referenced by get_sort_column().
|
protected |
Object Data_SQL.
Definition at line 68 of file manage_table_sql.class.php.
Referenced by Payment_Method_MTable\check(), Anc_Account_Table\check(), Action_Document_Type_MTable\check(), Currency_MTable\check(), Action_Document_Type_MTable\delete(), get_table(), and Action_Document_Type_MTable\input().
|
protected |
Definition at line 92 of file manage_table_sql.class.php.
Referenced by getTitle().
const Manage_Table_SQL::UPDATABLE =1 |
Definition at line 85 of file manage_table_sql.class.php.
Referenced by get_property_updatable(), and set_property_updatable().
const Manage_Table_SQL::VISIBLE =2 |
Definition at line 86 of file manage_table_sql.class.php.
Referenced by __construct(), get_property_visible(), and set_property_visible().