mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-30 17:25:26 +02:00
2012-03-16 Sergio Martin <sergio.martin@artica.es>
* include/functions_html.php include/javascript/pandora.js images/pencil.png images/default_list.png: Improved the usability of the periods advanced control toggling between manual and default mode git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@5784 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
4867fb3743
commit
c54d341691
@ -1,3 +1,12 @@
|
|||||||
|
2012-03-16 Sergio Martin <sergio.martin@artica.es>
|
||||||
|
|
||||||
|
* include/functions_html.php
|
||||||
|
include/javascript/pandora.js
|
||||||
|
images/pencil.png
|
||||||
|
images/default_list.png: Improved the usability
|
||||||
|
of the periods advanced control toggling between
|
||||||
|
manual and default mode
|
||||||
|
|
||||||
2012-03-15 Sancho Lerena <slerena@artica.es>
|
2012-03-15 Sancho Lerena <slerena@artica.es>
|
||||||
|
|
||||||
* images/console/background: Replaced old imagemaps
|
* images/console/background: Replaced old imagemaps
|
||||||
|
BIN
pandora_console/images/default_list.png
Normal file
BIN
pandora_console/images/default_list.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 451 B |
BIN
pandora_console/images/pencil.png
Normal file
BIN
pandora_console/images/pencil.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 474 B |
@ -436,16 +436,25 @@ function html_print_extended_select_for_time ($name, $selected = '', $script = '
|
|||||||
|
|
||||||
ob_start();
|
ob_start();
|
||||||
|
|
||||||
html_print_select ($fields, $name . '_select', $selected,"" . $script,
|
echo '<div id="'.$name.'_default" style="width:100%">';
|
||||||
$nothing, $nothing_value, false, false, false, '', false, 'font-size: xx-small;'.$select_style);
|
html_print_select ($fields, $name . '_select', $selected,"" . $script,
|
||||||
html_print_input_text ($name . '_text', $selected, '', $size);
|
$nothing, $nothing_value, false, false, false, '', false, 'font-size: xx-small;'.$select_style);
|
||||||
html_print_input_hidden ($name, $selected);
|
echo ' <a href="javascript:">'.html_print_image('images/pencil.png',true,array('class' => $name . '_toggler', 'alt' => __('Manual'), 'title' => __('Manual'))).'</a>';
|
||||||
html_print_select ($units, $name . '_units', 1, "" . $script,
|
echo '</div>';
|
||||||
$nothing, $nothing_value, false, false, false, '', false, 'font-size: xx-small;'.$select_style);
|
|
||||||
|
echo '<div id="'.$name.'_manual" style="width:100%">';
|
||||||
|
html_print_input_text ($name . '_text', $selected, '', $size);
|
||||||
|
html_print_input_hidden ($name, $selected);
|
||||||
|
html_print_select ($units, $name . '_units', 1, "" . $script,
|
||||||
|
$nothing, $nothing_value, false, false, false, '', false, 'font-size: xx-small;'.$select_style);
|
||||||
|
echo ' <a href="javascript:">'.html_print_image('images/default_list.png',true,array('class' => $name . '_toggler', 'alt' => __('List'), 'title' => __('List'))).'</a>';
|
||||||
|
echo '</div>';
|
||||||
|
|
||||||
echo "
|
echo "
|
||||||
<script type='text/javascript'>
|
<script type='text/javascript'>
|
||||||
period_select_events('$name');
|
$(document).ready (function () {
|
||||||
|
period_select_events('$name');
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
";
|
";
|
||||||
|
|
||||||
|
@ -610,12 +610,21 @@ function agent_autocomplete (id_agent_name, id_server_name, id_agent_id ) {
|
|||||||
* @param name string with the name of the select for time
|
* @param name string with the name of the select for time
|
||||||
*/
|
*/
|
||||||
function period_select_events(name) {
|
function period_select_events(name) {
|
||||||
|
// Manual mode is hidden by default
|
||||||
|
$('#'+name+'_manual').hide();
|
||||||
|
|
||||||
// If the text input is empty, we put on it 5 minutes by default
|
// If the text input is empty, we put on it 5 minutes by default
|
||||||
if($('#text-'+name+'_text').val() == '') {
|
if($('#text-'+name+'_text').val() == '') {
|
||||||
$('#text-'+name+'_text').val(300);
|
$('#text-'+name+'_text').val(300);
|
||||||
$('#'+name+'_select option:eq(1)').attr('selected', true);
|
$('#'+name+'_select option:eq(1)').attr('selected', true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$('.'+name+'_toggler').click(function() {
|
||||||
|
$('#'+name+'_default').toggle();
|
||||||
|
$('#'+name+'_manual').toggle();
|
||||||
|
$('#text-'+name+'_text').focus();
|
||||||
|
});
|
||||||
|
|
||||||
function adjustTextUnits() {
|
function adjustTextUnits() {
|
||||||
var restPrev;
|
var restPrev;
|
||||||
var unitsSelected = false;
|
var unitsSelected = false;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user