2009-03-16 Esteban Sanchez <estebans@artica.es>

* godmode/alerts/alert_list.php,
	godmode/agentes/module_manager_editor_network.php: Fixes to work in
	IE7.

	* godmode/alerts/configure_alert_template.php: Fixed an error when the
	template was not created and causing the example or field values to
	not shown. Fixed javascript for IE7.

	* include/styles/ie.css: Fixes for IE7.

	* include/styles/pandora.css: Added style for classes added.	



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1536 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
Esteban Sanchez 2009-03-16 11:06:00 +00:00
parent 460812d613
commit 5c52cbbe49
6 changed files with 67 additions and 37 deletions

View File

@ -1,3 +1,17 @@
2009-03-16 Esteban Sanchez <estebans@artica.es>
* godmode/alerts/alert_list.php,
godmode/agentes/module_manager_editor_network.php: Fixes to work in
IE7.
* godmode/alerts/configure_alert_template.php: Fixed an error when the
template was not created and causing the example or field values to
not shown. Fixed javascript for IE7.
* include/styles/ie.css: Fixes for IE7.
* include/styles/pandora.css: Added style for classes added.
2009-03-13 Esteban Sanchez <estebans@artica.es>
* godmode/db/db_purge.php: Style correction.

View File

@ -63,14 +63,14 @@ push_table_simple ($data, 'snmp_1');
$data = array ();
$data[0] = __('SNMP OID');
$data[1] = '<span class="left">';
$data[1] = '<span class="left"; style="width: 50%">';
$data[1] .= print_input_text ('snmp_oid', $snmp_oid, '', 30, 120, true);
$data[1] .= '<span class="invisible" id="oid">';
$data[1] .= print_select (array (), 'select_snmp_oid', $snmp_oid, '', '', 0, true);
$data[1] .= '<img src="images/edit.png" class="invisible clickable" id="edit_oid" />';
$data[1] .= '</span>';
$data[1] .= '<span id="no_snmp" class="error invisible">'.__('Unable to do SNMP walk').'</span>';
$data[1] .= '</span> <span class="right"><span id="oid_loading" class="invisible">';
$data[1] .= '</span> <span class="right" style="width: 50%; text-align: right"><span id="oid_loading" class="invisible">';
$data[1] .= '<img src="images/spinner.gif" />';
$data[1] .= '</span>';
$data[1] .= print_button (__('SNMP walk'), 'snmp_walk', $ip_target == '', '',

View File

@ -261,7 +261,7 @@ foreach ($simple_alerts as $alert) {
$data[4] = '<ul class="action_list">';
foreach ($actions as $action_id => $action) {
$data[4] .= '<li><div>';
$data[4] .= '<span class="left">';
$data[4] .= '<span class="action_name">';
$data[4] .= $action['name'];
$data[4] .= ' <em>(';
if ($action['fires_min'] == $action['fires_max']) {
@ -279,7 +279,7 @@ foreach ($simple_alerts as $alert) {
$data[4] .= ')</em>';
$data[4] .= '</span>';
$data[4] .= ' <span class="delete">';
$data[4] .= ' <span class="delete" style="clear:right">';
$data[4] .= '<form method="post" class="delete_link">';
$data[4] .= print_input_image ('delete', 'images/cross.png', 1, '', true);
$data[4] .= print_input_hidden ('delete_action', 1, true);
@ -454,9 +454,9 @@ $(document).ready (function () {
id = this.id.split ("-").pop ();
/* Replace link with a combo with the actions and a form */
form = $('form#add_action_form:last').clone (true).show ();
$("input#hidden-id_alert_module", form).attr ("value", id);
$(this).replaceWith (form);
$form = $('form#add_action_form:last').clone (true).show ();
$("input#hidden-id_alert_module", $form).attr ("value", id);
$(this).replaceWith ($form);
return false;
});

View File

@ -412,28 +412,24 @@ if ($step == 2) {
$table->rowstyle['value'] = 'display: none';
$table->rowstyle['max'] = 'display: none';
$table->rowstyle['min'] = 'display: none';
$table->rowstyle['example'] = 'display: none';
$show_matches = false;
if ($id) {
$table->rowstyle['example'] = '';
switch ($type) {
case "equal":
case "not_equal":
case "regex":
$show_matches = true;
$table->rowstyle['value'] = '';
switch ($type) {
case "equal":
case "not_equal":
case "regex":
$show_matches = true;
$table->rowstyle['value'] = '';
break;
case "max_min":
$show_matches = true;
case "max":
$table->rowstyle['max'] = '';
if ($type == 'max')
break;
case "max_min":
$show_matches = true;
case "max":
$table->rowstyle['max'] = '';
if ($type == 'max')
break;
case "min":
$table->rowstyle['min'] = '';
break;
}
case "min":
$table->rowstyle['min'] = '';
break;
}
$table->data[0][0] = __('Name');
@ -536,33 +532,32 @@ function check_regex () {
function render_example () {
/* Set max */
max = parseInt ($("input#text-max").attr ("value"));
if (isNaN (max) || max == '') {
vmax = parseInt ($("input#text-max").attr ("value"));
if (isNaN (vmax) || vmax == "") {
$("span#max").empty ().append ("0");
} else {
$("span#max").empty ().append (max);
$("span#max").empty ().append (vmax);
}
/* Set min */
min = parseInt ($("input#text-min").attr ("value"));
if (isNaN (min) || min == '') {
vmin = parseInt ($("input#text-min").attr ("value"));
if (isNaN (vmin) || vmin == "") {
$("span#min").empty ().append ("0");
} else {
$("span#min").empty ().append (min);
$("span#min").empty ().append (vmin);
}
/* Set value */
value = $("input#text-value").attr ("value");
if (value == '') {
vvalue = $("input#text-value").attr ("value");
if (vvalue == "") {
$("span#value").empty ().append ("<em><?php echo __('Empty');?></em>");
} else {
$("span#value").empty ().append (value);
$("span#value").empty ().append (vvalue);
}
}
$(document).ready (function () {
<?php if ($step == 1): ?>
render_example ();
$("input#text-value").keyup (render_example);
$("input#text-max").keyup (render_example);
$("input#text-min").keyup (render_example);
@ -625,7 +620,7 @@ $(document).ready (function () {
}
render_example ();
});
}).change ();
$("#checkbox-matches_value").click (function () {
enabled = this.checked;

View File

@ -42,3 +42,17 @@ table#simple input#text-snmp_oid {
div.configuration {
margin-top: -20px;
}
form.delete_link {
display:inline;
}
ul.action_list {
list-style-position: outside;
}
ul.action_list li {
display: block;
}
span.action_name {
vertical-align: top;
float: none;
}

View File

@ -886,6 +886,9 @@ ul.action_list {
ul.action_list li div {
margin-left: 15px;
}
span.action_name {
float: left;
}
div.actions_container {
overflow:auto;
width: 100%;
@ -896,6 +899,10 @@ div.actions_container label {
font-weight: normal;
font-style: italic;
}
a.add_action {
clear: both;
display: block;
}
/* timeEntry styles */
.timeEntry_control {