2012-06-15 Vanessa Gil <vanessa.gil@artica.es>

* operation/events/events.php: Show success message
	when you delete an event.


git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6556 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
vgilc 2012-06-15 10:46:40 +00:00
parent 45641e2d38
commit b5918f3764
2 changed files with 16 additions and 5 deletions

View File

@ -1,3 +1,8 @@
2012-06-15 Vanessa Gil <vanessa.gil@artica.es>
* operation/events/events.php: Show success message
when you delete an event.
2012-06-14 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_html.php, include/functions_reporting.php,

View File

@ -175,6 +175,7 @@ if (is_ajax ()) {
return;
}
$offset = (int) get_parameter ("offset", 0);
$ev_group = (int) get_parameter ("ev_group", 0); //0 = all
$event_type = get_parameter ("event_type", ''); // 0 all
@ -295,6 +296,11 @@ else {
echo "</h2>";
}
// Error div for ajax messages
echo "<div id='show_message_error'>";
echo "</div>";
if (($section == 'validate') && ($ids[0] == -1)) {
$section = 'list';
ui_print_error_message (__('No events selected'));
@ -345,7 +351,7 @@ if ($validate) {
//Process deletion (pass array or single value)
if ($delete) {
$ids = (array) get_parameter ("eventid", -1);
if ($ids[0] != -1) {
$return = events_delete_event ($ids, ($group_rep == 1));
ui_print_result_message ($return,
@ -668,12 +674,12 @@ $(document).ready( function() {
"similars" : <?php echo ($group_rep ? 1 : 0) ?>
},
function (data, status) {
if (data == "ok")
if (data == "ok") {
$tr.remove ();
$('#show_message_error').html('<h3 class="suc"> <?php echo __('Successfully delete'); ?> </h3>');
}
else
$("#result")
.showMessage ("<?php echo __('Could not be deleted')?>")
.addClass ("error");
$('#show_message_error').html('<h3 class="error"> <?php echo __('Error deleting event'); ?> </h3>');
},
"html"
);