2012-02-09 Juan Manuel Ramon <juanmanuel.ramon@artica.es>

* operation/events/events_list.php: Added colors in name and group
	at creation time and now update button is showed when a filter is
	created.



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@5542 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
juanmanuelr 2012-02-09 19:17:43 +00:00
parent a63ec8d9c3
commit 6c63b2ab1a
2 changed files with 14 additions and 3 deletions

View File

@ -1,3 +1,9 @@
2012-02-09 Juan Manuel Ramon <juanmanuel.ramon@artica.es>
* operation/events/events_list.php: Added colors in name and group
at creation time and now update button is showed when a filter is
created.
2012-02-09 Juan Manuel Ramon <juanmanuel.ramon@artica.es> 2012-02-09 Juan Manuel Ramon <juanmanuel.ramon@artica.es>
* include/help/en/help_field_match_snmp.php * include/help/en/help_field_match_snmp.php

View File

@ -257,12 +257,12 @@ echo '<form id="form_filter" method="post" action="index.php?sec=eventos&amp;sec
echo '<table style="float:left;" width="550" cellpadding="4" cellspacing="4" class="databox"><tr id="row_name" style="visibility: hidden">'; echo '<table style="float:left;" width="550" cellpadding="4" cellspacing="4" class="databox"><tr id="row_name" style="visibility: hidden">';
// Filter name // Filter name
echo "<td>".__('Filter name')."</td><td>"; echo "<td id='filter_name_color'>".__('Filter name')."</td><td>";
html_print_input_text ('id_name', $id_name, '', 15); html_print_input_text ('id_name', $id_name, '', 15);
echo "</td>"; echo "</td>";
// Filter group // Filter group
echo "<td>".__('Filter group')."</td><td>"; echo "<td id='filter_group_color'>".__('Filter group')."</td><td>";
html_print_select_groups($config["id_user"], "IR", true, 'id_group', $id_group, '', '', 0, false, false, false, 'w130'); html_print_select_groups($config["id_user"], "IR", true, 'id_group', $id_group, '', '', 0, false, false, false, 'w130');
echo "</td></tr>"; echo "</td></tr>";
@ -1195,8 +1195,12 @@ $(document).ready( function() {
if ($('#row_name').css('visibility') == 'hidden') { if ($('#row_name').css('visibility') == 'hidden') {
$('#row_name').css('visibility', ''); $('#row_name').css('visibility', '');
$('#show_filter_error').html('<h3 class="error"> <?php echo __('Define name and group for the filter and click on Save filter again'); ?> </h3>'); $('#show_filter_error').html('<h3 class="error"> <?php echo __('Define name and group for the filter and click on Save filter again'); ?> </h3>');
$('#filter_name_color').css('color', '#CC0000');
$('#filter_group_color').css('color', '#CC0000');
// If the filter has name insert in database // If the filter has name insert in database
}else{ }else{
$('#filter_name_color').css('color', '#000000');
$('#filter_group_color').css('color', '#000000');
// If the filter name is blank show error // If the filter name is blank show error
if ($('#text-id_name').val() == '') { if ($('#text-id_name').val() == '') {
$('#show_filter_error').html('<h3 class="error"> <?php echo __('Filter name cannot be left blank'); ?> </h3>'); $('#show_filter_error').html('<h3 class="error"> <?php echo __('Filter name cannot be left blank'); ?> </h3>');
@ -1254,6 +1258,7 @@ $(document).ready( function() {
}, },
"json" "json"
); );
$("#submit-update_filter").css('visibility', '');
} }
return false; return false;
}); });