From 4468d26e5e48883c23a59c35242c9a871c17408f Mon Sep 17 00:00:00 2001 From: juanmanuelr Date: Tue, 28 Feb 2012 10:49:33 +0000 Subject: [PATCH] 2012-02-28 Juan Manuel Ramon * operation/events/events_list.php operation/events/events.php: Changed validation and set in process to javascript code (pending fixes in this feature). Fixes: #3487339 git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@5657 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_console/ChangeLog | 8 ++++++++ pandora_console/operation/events/events.php | 17 +++++++++++++++-- .../operation/events/events_list.php | 2 +- 3 files changed, 24 insertions(+), 3 deletions(-) diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index 1fd6238376..1f3b489187 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,11 @@ +2012-02-28 Juan Manuel Ramon + + * operation/events/events_list.php + operation/events/events.php: Changed validation and set in process + to javascript code (pending fixes in this feature). + + Fixes: #3487339 + 2012-02-27 Ramon Novoa * include/functions_events.php: Fixed an include path. diff --git a/pandora_console/operation/events/events.php b/pandora_console/operation/events/events.php index c13bd7aacc..54f9b975cf 100644 --- a/pandora_console/operation/events/events.php +++ b/pandora_console/operation/events/events.php @@ -514,13 +514,16 @@ $(document).ready( function() { row_id_name = $(row).attr('id').split('-').shift(); row_id_number = $(row).attr('id').split('-').pop() - 1; + row_id_number_next = parseInt($(row).attr('id').split('-').pop()) + 1; previous_row_id = $(row).attr('id'); current_row_id = row_id_name + "-" + row_id_number; selected_row_id = row_id_name + "-" + row_id_number + "-0"; + next_row_id = row_id_name + '-' + row_id_number_next; $("#"+previous_row_id).css('display', 'none'); $("#"+current_row_id).css('display', 'none'); $("#"+selected_row_id).css('display', 'none'); + $("#"+next_row_id).css('display', 'none'); } }); } @@ -551,8 +554,15 @@ $(document).ready( function() { $("#comment_header_"+id).html(data); }); - // Remove delete link - $("#delete-"+id).replaceWith('' + <?php echo + '" title="' + + '" src="/trunk/pandora_console/images/cross.disabled.png">'); + // Remove delete link (if event is not grouped and there is more than one event) + if ($("#group_rep").val() == 1){ + if (parseInt($("#count_event_group_"+id).text()) <= 1){ + $("#delete-"+id).replaceWith('' + <?php echo + '" title="' + + '" src="images/cross.disabled.png">'); + } + } + else{ // Remove delete link (if event is not grouped) + $("#delete-"+id).replaceWith('' + <?php echo + '" title="' + + '" src="images/cross.disabled.png">'); + } // Change state image $("#status_img_"+id).attr ("src", "images/hourglass.png"); @@ -569,13 +579,16 @@ $(document).ready( function() { row_id_name = $(row).attr('id').split('-').shift(); row_id_number = $(row).attr('id').split('-').pop() - 1; + row_id_number_next = parseInt($(row).attr('id').split('-').pop()) + 1; previous_row_id = $(row).attr('id'); current_row_id = row_id_name + "-" + row_id_number; selected_row_id = row_id_name + "-" + row_id_number + "-0"; + next_row_id = row_id_name + '-' + row_id_number_next; $("#"+previous_row_id).css('display', 'none'); $("#"+current_row_id).css('display', 'none'); $("#"+selected_row_id).css('display', 'none'); + $("#"+next_row_id).css('display', 'none'); } }); diff --git a/pandora_console/operation/events/events_list.php b/pandora_console/operation/events/events_list.php index fdaed5e69c..2861f1020f 100644 --- a/pandora_console/operation/events/events_list.php +++ b/pandora_console/operation/events/events_list.php @@ -1019,7 +1019,7 @@ foreach ($result as $event) { if ($group_rep != 0) { $string .= ''; - $string .= '' . __('Count') . ''; + $string .= '' . __('Count') . ''; } if ($group_rep == 1) {