Metaconsole view reports change

This commit is contained in:
Jonathan 2023-03-21 09:52:21 +01:00
parent 01e152a6e3
commit 82dd6ebb37
5 changed files with 277 additions and 653 deletions

View File

@ -1047,17 +1047,6 @@ $class = 'databox filters';
?> ?>
<table id="table_item_edit_reporting" class="<?php echo $class; ?>" id="" border="0" cellpadding="4" cellspacing="4" width="100%"> <table id="table_item_edit_reporting" class="<?php echo $class; ?>" id="" border="0" cellpadding="4" cellspacing="4" width="100%">
<?php
if (defined('METACONSOLE')) {
echo '<thead>
<tr>
<th align=center colspan=5>
'.__('Item Editor').'
</th>
</tr>
</thead>';
}
?>
<tbody> <tbody>
<tr id="row_type" class="datos"> <tr id="row_type" class="datos">
<td class="bolder w220px"> <td class="bolder w220px">

View File

@ -201,14 +201,13 @@ if (($agentFilter == 0) && ($moduleFilter == 0) && ($typeFilter == 0)) {
$urlFilter = '&agent_filter='.$agentFilter.'&module_filter='.$moduleFilter.'&type_filter='.$typeFilter; $urlFilter = '&agent_filter='.$agentFilter.'&module_filter='.$moduleFilter.'&type_filter='.$typeFilter;
if (!defined('METACONSOLE')) { $table = new stdClass();
$table = new stdClass(); $table->width = '100%';
$table->width = '100%'; $table->class = 'filter-table-adv';
$table->class = 'filter-table-adv'; $table->size[0] = '33%';
$table->size[0] = '33%'; $table->size[1] = '33%';
$table->size[1] = '33%'; $table->size[1] = '33%';
$table->size[1] = '33%'; $table->data[0][0] = html_print_label_input_block(
$table->data[0][0] = html_print_label_input_block(
__('Agents'), __('Agents'),
html_print_select( html_print_select(
$agents, $agents,
@ -224,8 +223,8 @@ if (!defined('METACONSOLE')) {
false, false,
'width:100%' 'width:100%'
) )
); );
$table->data[0][1] = html_print_label_input_block( $table->data[0][1] = html_print_label_input_block(
__('Modules'), __('Modules'),
html_print_select( html_print_select(
$modules, $modules,
@ -241,8 +240,8 @@ if (!defined('METACONSOLE')) {
false, false,
'width:100%' 'width:100%'
) )
); );
$table->data[0][2] = html_print_label_input_block( $table->data[0][2] = html_print_label_input_block(
__('Type'), __('Type'),
html_print_select( html_print_select(
$types, $types,
@ -258,10 +257,10 @@ if (!defined('METACONSOLE')) {
false, false,
'width:100%' 'width:100%'
) )
); );
$form = '<form method="post" action ="index.php?sec=reporting&sec2=godmode/reporting/reporting_builder&tab=list_items&action=filter&id_report='.$idReport.'">'; $form = '<form method="post" action ="index.php?sec=reporting&sec2=godmode/reporting/reporting_builder&tab=list_items&action=filter&id_report='.$idReport.'">';
$form .= html_print_table($table, true); $form .= html_print_table($table, true);
$form .= html_print_div( $form .= html_print_div(
[ [
'class' => 'action-buttons', 'class' => 'action-buttons',
'content' => html_print_submit_button( 'content' => html_print_submit_button(
@ -277,63 +276,11 @@ if (!defined('METACONSOLE')) {
), ),
], ],
true true
); );
$form .= html_print_input_hidden('action', 'filter', true); $form .= html_print_input_hidden('action', 'filter', true);
$form .= '</form>'; $form .= '</form>';
ui_toggle($form, __('Filters'), '', '', false); ui_toggle($form, __('Filters'), '', '', false);
} else {
$table = new stdClass();
$table->width = '96%';
$table->class = 'databox_filters';
$table->cellpadding = 0;
$table->cellspacing = 0;
$table->data[0][0] = __('Agents');
$table->data[0][1] = html_print_select(
$agents,
'agent_filter',
$agentFilter,
'',
__('All'),
0,
true
);
$table->data[0][2] = __('Modules');
$table->data[0][3] = html_print_select(
$modules,
'module_filter',
$moduleFilter,
'',
__('All'),
0,
true
);
$table->data[0][4] = __('Type');
$table->data[0][5] = html_print_select(
$types,
'type_filter',
$typeFilter,
'',
__('All'),
0,
true
);
$table->style[6] = 'text-align:right;';
$table->data[0][6] = html_print_submit_button(
__('Filter'),
'filter',
false,
'class="sub upd"',
true
).html_print_input_hidden('action', 'filter', true);
$filters = '<form class="filters_form" method="post" action ="index.php?sec=reporting&sec2=godmode/reporting/reporting_builder&tab=
list_items&action=filter&id_report='.$idReport.'">';
$filters .= html_print_table($table, true);
$filters .= '</form>';
ui_toggle($filters, __('Show Options'));
}
$where = '1=1'; $where = '1=1';
if ($typeFilter != '0') { if ($typeFilter != '0') {
@ -412,16 +359,9 @@ $table->style[0] = 'text-align: right;';
if ($items) { if ($items) {
$table->width = '100%'; $table->width = '100%';
if (defined('METACONSOLE')) {
$table->width = '100%';
$table->class = 'databox data';
$arrow_up = 'images/sort_up.png';
$arrow_down = 'images/sort_down.png';
} else {
$table->class = 'info_table'; $table->class = 'info_table';
$arrow_up = 'images/sort_up_black.png'; $arrow_up = 'images/sort_up_black.png';
$arrow_down = 'images/sort_down_black.png'; $arrow_down = 'images/sort_down_black.png';
}
$table->size = []; $table->size = [];
$table->size[0] = '5px'; $table->size[0] = '5px';
@ -717,25 +657,7 @@ foreach ($items as $item) {
} }
} }
if (defined('METACONSOLE')) { if ($items != false) {
if ($items != false) {
ui_pagination($countItems, 'index.php?sec=reporting&sec2=godmode/reporting/reporting_builder&tab=list_items&action=edit&id_report='.$idReport.$urlFilter);
html_print_table($table);
ui_pagination($countItems, 'index.php?sec=reporting&sec2=godmode/reporting/reporting_builder&tab=list_items&action=edit&id_report='.$idReport.$urlFilter);
echo "<form action='index.php?sec=reporting&sec2=godmode/reporting/reporting_builder&tab=list_items&action=delete_items&id_report=".$idReport."'
method='post' onSubmit='return added_ids_deleted_items_to_hidden_input();'>";
echo "<div class='right w100p'>";
if (check_acl($config['id_user'], 0, 'RM')) {
html_print_input_hidden('ids_items_to_delete', '');
html_print_submit_button(__('Delete'), 'delete_btn', false, 'class="sub delete right mrgn_btn_15px"');
}
echo '</div>';
echo '</form>';
}
} else {
if ($items != false) {
ui_pagination( ui_pagination(
$countItems, $countItems,
'index.php?sec=reporting&sec2=godmode/reporting/reporting_builder&tab=list_items&action=edit&id_report='.$idReport.$urlFilter 'index.php?sec=reporting&sec2=godmode/reporting/reporting_builder&tab=list_items&action=edit&id_report='.$idReport.$urlFilter
@ -767,64 +689,15 @@ if (defined('METACONSOLE')) {
); );
echo '</div>'; echo '</div>';
echo '</form>'; echo '</form>';
}
} }
$table = new stdClass(); $table = new stdClass();
$table->width = '100%'; $table->width = '100%';
$table->class = 'filter-table-adv';
$table->size[0] = '50%';
$table->size[1] = '50%';
$table->data[1][0] = html_print_label_input_block(
if (defined('METACONSOLE')) {
$table->colspan[0][0] = 3;
$table->size = [];
$table->size[0] = '25%';
$table->size[1] = '25%';
$table->size[2] = '25%';
$table->size[3] = '25%';
$table->class = 'databox data';
$table->head[0] = __('Sort items');
$table->head_colspan[0] = 4;
$table->headstyle[0] = 'text-align: center';
$table->data[1][0] = __('Sort selected items from position: ');
$table->data[1][1] = html_print_select_style(
[
'before' => __('Move before to'),
'after' => __('Move after to'),
],
'move_to',
'',
'',
'',
'',
0,
true
);
$table->data[1][2] = html_print_input_text_extended(
'position_to_sort',
1,
'text-position_to_sort',
'',
3,
10,
false,
"only_numbers('position_to_sort');",
'',
true
);
$table->data[1][2] .= html_print_input_hidden('ids_items_to_sort', '', true);
$table->data[1][3] = html_print_submit_button(__('Sort'), 'sort_submit', false, 'class="sub upd"', true);
echo "<form action='index.php?sec=reporting&sec2=godmode/reporting/reporting_builder&tab=list_items&action=sort_items&id_report=".$idReport."'
method='post' onsubmit='return added_ids_sorted_items_to_hidden_input();'>";
html_print_table($table);
echo '</form>';
} else {
$table->class = 'filter-table-adv';
$table->size[0] = '50%';
$table->size[1] = '50%';
$table->data[1][0] = html_print_label_input_block(
__('Sort selected items from position: '), __('Sort selected items from position: '),
html_print_select_style( html_print_select_style(
[ [
@ -839,8 +712,8 @@ if (defined('METACONSOLE')) {
0, 0,
true, true,
) )
); );
$table->data[1][2] = html_print_label_input_block( $table->data[1][2] = html_print_label_input_block(
__('Position'), __('Position'),
html_print_input_text_extended( html_print_input_text_extended(
'position_to_sort', 'position_to_sort',
@ -854,11 +727,11 @@ if (defined('METACONSOLE')) {
'', '',
true true
).html_print_input_hidden('ids_items_to_sort', '', true) ).html_print_input_hidden('ids_items_to_sort', '', true)
); );
$form = "<form action='index.php?sec=reporting&sec2=godmode/reporting/reporting_builder&tab=list_items&action=sort_items&id_report=".$idReport."' method='post' onsubmit='return added_ids_sorted_items_to_hidden_input();'>"; $form = "<form action='index.php?sec=reporting&sec2=godmode/reporting/reporting_builder&tab=list_items&action=sort_items&id_report=".$idReport."' method='post' onsubmit='return added_ids_sorted_items_to_hidden_input();'>";
$form .= html_print_table($table, true); $form .= html_print_table($table, true);
$form .= html_print_div( $form .= html_print_div(
[ [
'class' => 'action-buttons', 'class' => 'action-buttons',
'content' => html_print_submit_button( 'content' => html_print_submit_button(
@ -874,67 +747,19 @@ if (defined('METACONSOLE')) {
), ),
], ],
true true
); );
$form .= html_print_input_hidden('action', 'sort_items', true); $form .= html_print_input_hidden('action', 'sort_items', true);
$form .= '</form>'; $form .= '</form>';
ui_toggle($form, __('Sort items'), '', '', false); ui_toggle($form, __('Sort items'), '', '', false);
}
$table = new stdClass(); $table = new stdClass();
$table->width = '100%'; $table->width = '100%';
$table->class = 'filter-table-adv';
$table->size[0] = '50%';
$table->size[1] = '50%';
if (defined('METACONSOLE')) { $table->data[0][0] = html_print_label_input_block(
$table->colspan[0][0] = 3;
$table->size = [];
$table->size[0] = '25%';
$table->size[1] = '25%';
$table->size[2] = '25%';
$table->size[3] = '25%';
$table->class = 'databox data';
$table->head[0] = __('Delete items');
$table->head_colspan[0] = 4;
$table->headstyle[0] = 'text-align: center';
$table->data[1][0] = __('Delete selected items from position: ');
$table->data[1][1] = html_print_select_style(
[
'above' => __('Delete above to'),
'below' => __('Delete below to'),
],
'delete_m',
'',
'',
'',
'',
0,
true
);
$table->data[1][2] = html_print_input_text_extended(
'position_to_delete',
1,
'text-position_to_delete',
'',
3,
10,
false,
"only_numbers('position_to_delete');",
'',
true
);
$table->data[1][2] .= html_print_input_hidden('ids_items_to_delete', '', true);
$table->data[1][3] = html_print_submit_button(__('Delete'), 'delete_submit', false, 'class="sub upd"', true);
echo "<form action='index.php?sec=reporting&sec2=godmode/reporting/reporting_builder&tab=list_items&action=delete_items_pos&id_report=".$idReport."'
method='post'>";
html_print_table($table);
echo '</form>';
} else {
$table->class = 'filter-table-adv';
$table->size[0] = '50%';
$table->size[1] = '50%';
$table->data[0][0] = html_print_label_input_block(
__('Delete selected items from position: '), __('Delete selected items from position: '),
html_print_select_style( html_print_select_style(
[ [
@ -949,8 +774,8 @@ if (defined('METACONSOLE')) {
0, 0,
true true
) )
); );
$table->data[0][1] = html_print_label_input_block( $table->data[0][1] = html_print_label_input_block(
__('Poisition'), __('Poisition'),
html_print_input_text_extended( html_print_input_text_extended(
'position_to_delete', 'position_to_delete',
@ -964,13 +789,13 @@ if (defined('METACONSOLE')) {
'', '',
true true
) )
); );
$form = "<form action='index.php?sec=reporting&sec2=godmode/reporting/reporting_builder&tab=list_items&action=delete_items_pos&id_report=".$idReport."' $form = "<form action='index.php?sec=reporting&sec2=godmode/reporting/reporting_builder&tab=list_items&action=delete_items_pos&id_report=".$idReport."'
method='post'>"; method='post'>";
$form .= html_print_input_hidden('ids_items_to_delete', '', true); $form .= html_print_input_hidden('ids_items_to_delete', '', true);
$form .= html_print_table($table, true); $form .= html_print_table($table, true);
$form .= html_print_div( $form .= html_print_div(
[ [
'class' => 'action-buttons', 'class' => 'action-buttons',
'content' => html_print_submit_button( 'content' => html_print_submit_button(
@ -986,10 +811,10 @@ if (defined('METACONSOLE')) {
), ),
], ],
true true
); );
$form .= '</form>'; $form .= '</form>';
ui_toggle($form, __('Delete items'), '', '', false); ui_toggle($form, __('Delete items'), '', '', false);
}
?> ?>
<script type="text/javascript"> <script type="text/javascript">

View File

@ -70,21 +70,13 @@ $table->head = [];
$table->data = []; $table->data = [];
$table->size = []; $table->size = [];
if (is_metaconsole() === true) {
$table->class = 'databox filters'; $table->class = 'filter-table-adv databox';
$table->head[0] = __('Main data'); $table->size[0] = '50%';
$table->head_colspan[0] = 4; $table->size[1] = '50%';
$table->headstyle[0] = 'text-align: center'; $table->size[2] = '50%';
$table->size[0] = '15%'; $table->size[3] = '50%';
$table->size[1] = '90%';
$table->style[0] = 'font-weight: bold; vertical-align: top;';
} else {
$table->class = 'filter-table-adv databox';
$table->size[0] = '50%';
$table->size[1] = '50%';
$table->size[2] = '50%';
$table->size[3] = '50%';
}
$write_groups = users_get_groups_for_select( $write_groups = users_get_groups_for_select(
false, false,
@ -95,22 +87,7 @@ $write_groups = users_get_groups_for_select(
'id_grupo' 'id_grupo'
); );
if (is_metaconsole() === true) { $table->data[0][0] = html_print_label_input_block(
$table->data['name'][0] = __('Name');
$table->data['name'][1] = html_print_input_text(
'name',
$reportName,
__('Name'),
80,
100,
true,
false,
true
);
$table->data['group'][0] = __('Group');
} else {
$table->data[0][0] = html_print_label_input_block(
__('Name'), __('Name'),
html_print_input_text( html_print_input_text(
'name', 'name',
@ -122,8 +99,8 @@ if (is_metaconsole() === true) {
false, false,
true true
) )
); );
}
// If the report group is not among the // If the report group is not among the
// RW groups (special permission) we add it. // RW groups (special permission) we add it.
@ -137,26 +114,8 @@ if (users_can_manage_group_all('RW') === true) {
$return_all_group = true; $return_all_group = true;
} }
if (is_metaconsole() === true) {
$table->data['group'][1] = '<div class="w290px inline">'; $table->data[0][1] = html_print_label_input_block(
$table->data['group'][1] .= html_print_input(
[
'type' => 'select_groups',
'id_user' => $config['id_user'],
'privilege' => 'AR',
'returnAllGroup' => $return_all_group,
'name' => 'id_group',
'selected' => $idGroupReport,
'script' => '',
'nothing' => '',
'nothing_value' => '',
'return' => true,
'required' => true,
]
);
$table->data['group'][1] .= '</div>';
} else {
$table->data[0][1] = html_print_label_input_block(
__('Group'), __('Group'),
html_print_input( html_print_input(
[ [
@ -173,22 +132,11 @@ if (is_metaconsole() === true) {
'required' => true, 'required' => true,
] ]
) )
); );
}
if (is_metaconsole() === true) {
$table->data['description'][0] = __('Description'); $table->colspan[1][0] = 2;
$table->data['description'][1] = html_print_textarea( $table->data[1][0] = html_print_label_input_block(
'description',
2,
80,
$description,
'',
true
);
} else {
$table->colspan[1][0] = 2;
$table->data[1][0] = html_print_label_input_block(
__('Description'), __('Description'),
html_print_textarea( html_print_textarea(
'description', 'description',
@ -198,8 +146,8 @@ if (is_metaconsole() === true) {
'', '',
true true
) )
); );
}
if ($report_id_user == $config['id_user'] if ($report_id_user == $config['id_user']
|| is_user_admin($config['id_user']) || is_user_admin($config['id_user'])
@ -210,43 +158,6 @@ if ($report_id_user == $config['id_user']
'group_edit' => __('The next group can edit the report'), 'group_edit' => __('The next group can edit the report'),
'user_edit' => __('Only the user and admin user can edit the report'), 'user_edit' => __('Only the user and admin user can edit the report'),
]; ];
if (is_metaconsole() === true) {
$table->data['access'][0] = __('Write Access');
$table->data['access'][0] .= ui_print_help_tip(
__('For example, you want a report that the people of "All" groups can see but you want to edit only for you or your group.'),
true
);
$table->data['access'][1] = html_print_select(
$type_access,
'type_access',
$type_access_selected,
'change_type_access(this)',
'',
0,
true
);
$class = ' invisible_important ';
if ($type_access_selected == 'group_edit') {
$class = '';
}
$table->data['access'][1] .= '<span class="access_subform'.$class.'" id="group_edit">';
$table->data['access'][1] .= '<div class="w290px inline">';
$table->data['access'][1] .= html_print_select_groups(
false,
'RW',
false,
'id_group_edit',
$id_group_edit,
false,
'',
'',
true
);
$table->data['access'][1] .= '</div>';
$table->data['access'][1] .= '</span>';
} else {
$table->data[2][0] = html_print_label_input_block( $table->data[2][0] = html_print_label_input_block(
__('Write Access').ui_print_help_tip( __('Write Access').ui_print_help_tip(
__('For example, you want a report that the people of "All" groups can see but you want to edit only for you or your group.'), __('For example, you want a report that the people of "All" groups can see but you want to edit only for you or your group.'),
@ -284,7 +195,6 @@ if ($report_id_user == $config['id_user']
), ),
$options $options
); );
}
} }
if ($enterpriseEnable) { if ($enterpriseEnable) {
@ -293,15 +203,6 @@ if ($enterpriseEnable) {
$non_interactive_check = $non_interactive; $non_interactive_check = $non_interactive;
} }
if (is_metaconsole() === true) {
$table->data['interactive_report'][0] = __('Non interactive report');
$table->data['interactive_report'][1] .= html_print_checkbox_switch(
'non_interactive',
1,
$non_interactive_check,
true
);
} else {
$table->data[2][1] = html_print_label_input_block( $table->data[2][1] = html_print_label_input_block(
__('Non interactive report'), __('Non interactive report'),
html_print_checkbox_switch( html_print_checkbox_switch(
@ -311,28 +212,10 @@ if ($enterpriseEnable) {
true true
) )
); );
}
} }
if (enterprise_installed() === true) { if (enterprise_installed() === true) {
if (is_metaconsole() === true) {
$table->data['cover'][0] = __('Generate cover page in PDF render');
$table->data['cover'][1] = html_print_checkbox_switch(
'cover_page_render',
1,
$cover_page_render,
true
);
$table->data['index'][0] = __('Generate index in PDF render');
$table->data['index'][1] = html_print_checkbox_switch(
'index_render',
1,
$index_render,
true
);
} else {
$table->data[3][0] = html_print_label_input_block( $table->data[3][0] = html_print_label_input_block(
__('Generate cover page in PDF render'), __('Generate cover page in PDF render'),
html_print_checkbox_switch( html_print_checkbox_switch(
@ -352,9 +235,9 @@ if (enterprise_installed() === true) {
true true
) )
); );
}
} }
echo '<form class="" method="post">'; echo '<form class="" method="post">';
html_print_table($table); html_print_table($table);

View File

@ -713,47 +713,6 @@ switch ($action) {
$table_aux = new stdClass(); $table_aux = new stdClass();
$table_aux->width = '100%'; $table_aux->width = '100%';
if (is_metaconsole()) {
$table_aux->class = 'databox filters';
$table_aux->colspan[0][0] = 4;
$table_aux->data[0][0] = '<b>'.__('Group').'</b>';
$table_aux->data[0][1] = html_print_select_groups(
false,
$access,
true,
'id_group',
$id_group,
'',
'',
'',
true,
false,
true,
'',
false,
'',
false,
false,
'id_grupo'
).'<br>';
$table_aux->data[0][2] = '<b>'.__('Free text for search: ');
$table_aux->data[0][2] .= ui_print_help_tip(
__('Search by report name or description, list matches.'),
true
);
$table_aux->data[0][2] .= '</b>';
$table_aux->data[0][3] = html_print_input_text(
__('search'),
$search,
'',
30,
'',
true
);
} else {
$table_aux->class = 'filter-table-adv'; $table_aux->class = 'filter-table-adv';
$table_aux->size[0] = '30%'; $table_aux->size[0] = '30%';
$table_aux->size[1] = '30%'; $table_aux->size[1] = '30%';
@ -796,25 +755,8 @@ switch ($action) {
true true
) )
); );
}
if (is_metaconsole()) {
$table_aux->data[0][6] = html_print_submit_button(
__('Search'),
'search_submit',
false,
'class="sub upd"',
true
);
}
$url_rb = 'index.php?sec=reporting&sec2=godmode/reporting/reporting_builder'; $url_rb = 'index.php?sec=reporting&sec2=godmode/reporting/reporting_builder';
if (is_metaconsole()) {
$filter = '<form action="'.$url_rb.'&id_group='.$id_group.'&pure='.$pure.'" method="post">';
$filter .= html_print_table($table_aux, true);
$filter .= '</form>';
ui_toggle($filter, __('Show Option'));
} else {
$searchForm = '<form action="'.$url_rb.'&id_group='.$id_group.'&pure='.$pure.'" method="post">'; $searchForm = '<form action="'.$url_rb.'&id_group='.$id_group.'&pure='.$pure.'" method="post">';
$searchForm .= html_print_table($table_aux, true); $searchForm .= html_print_table($table_aux, true);
$searchForm .= html_print_div( $searchForm .= html_print_div(
@ -846,7 +788,6 @@ switch ($action) {
'white-box-content', 'white-box-content',
'box-flat white_table_graph fixed_filter_bar' 'box-flat white_table_graph fixed_filter_bar'
); );
}
ui_require_jquery_file('pandora.controls'); ui_require_jquery_file('pandora.controls');
ui_require_jquery_file('ajaxqueue'); ui_require_jquery_file('ajaxqueue');

View File

@ -184,7 +184,7 @@ if (empty($messages) === true) {
$table->size[3] = '80px'; $table->size[3] = '80px';
$table->size[4] = '60px'; $table->size[4] = '60px';
$table->head[5] = html_print_checkbox('all_delete_messages', 0, false, true, false); $table->head[5] = html_print_checkbox('all_delete_messages', 0, false, true, false, 'check_all_checkboxes()');
$table->head[0] = __('Status'); $table->head[0] = __('Status');
if ($show_sent === true) { if ($show_sent === true) {
$table->head[1] = __('Destination'); $table->head[1] = __('Destination');
@ -351,28 +351,14 @@ if (empty($messages) === false) {
<script type="text/javascript"> <script type="text/javascript">
$( document ).ready(function() { function check_all_checkboxes() {
if ($("input[name=all_delete_messages]").prop("checked")) {
$("[name^='delete_multiple']").prop("checked", true);
}
else {
$("[name^='delete_multiple']").prop("checked", false);
}
}
$('[id^=checkbox-delete_multiple_messages]').change(function(){
if($(this).parent().parent().hasClass('checkselected')){
$(this).parent().parent().removeClass('checkselected');
}
else{
$(this).parent().parent().addClass('checkselected');
}
});
$('[id^=checkbox-all_delete_messages]').change(function(){
if ($("#checkbox-all_delete_messages").prop("checked")) {
$('[id^=checkbox-delete_multiple_messages]').parent().parent().addClass('checkselected');
$(".check_delete_messages").prop("checked", true);
}
else{
$('[id^=checkbox-delete_multiple_messages]').parent().parent().removeClass('checkselected');
$(".check_delete_messages").prop("checked", false);
}
});
});
</script> </script>