Project

General

Profile

Revision 693e96f1

ID693e96f14bcfcee4f0c42e0619adf0347901063b
Parent 477d2eb1
Child a2d3e48e

Added by Thomas ANDREJAK over 14 years ago

Ajout du refresh dans la toolbar et correction CSS / W3C

git-svn-id: https://vigilo-dev.si.c-s.fr/svn@538 b22e2e97-25c9-44ff-b637-2e5ceca36478

View differences:

vigiboard/templates/vigiboard.html
12 12
  <link rel="stylesheet" type="text/css" href="${tg.url('/css/vigiboard_style.css')}" />
13 13
</head>
14 14

  
15
<body>
15
<body style="font-size:${tg.session.get('fontsize',tg.config['vigiboard_font.size'])}px">
16 16
	
17 17
<table class="table_top" summary="Barre Outils">
18 18
	<tr>
......
21 21
			<a py:if="tg.config['vigiboard_links.logo'] == ''" href="${tg.url('/')}"><img alt="logo" title="Logo" src="${tg.url('/images/vigilo.png')}" style="width:58px;"/></a>
22 22
			v${tg.config['vigiboard_version']}</td>
23 23
		<td style="text-align: center">
24
			<span py:if="search == 1" style="color:rgb(70, 130, 180)">
24
			<span py:if="search['host'] != '' or search['service'] != '' or search['output'] != '' or search['tt'] != ''" style="color:rgb(70, 130, 180)">
25 25
				Mode recherche, <a href="${tg.url('/')}" style="color:rgb(70, 130, 180); text-decoration: underline;">cliquer ici</a> pour revenir au mode initial.
26 26
			</span>
27 27
		</td>
28
		<td style="width: 20%;text-align: right;"><a href="${tg.url('/')}"><img alt="accueil" title="Accueil" src="${tg.url('/images/home.gif')}" /></a>
28
		<td style="width: 200px;text-align: right;">
29
			<select id="refresh_time" class="refresh_select">
30
				<option value="0">Never</option>
31
				<option value="30000">30 Secondes</option>
32
				<option value="60000">1 Minute</option>
33
				<option value="300000">5 Minutes</option>
34
				<option value="600000">10 Minutes</option>
35
			</select>
36
			<input type="button" id="refresh_button" class="refresh_button" onclick="javascript:change_refresh($('#refresh_time').val())" value="[Start]" />
37
			</td>
38
			<td style="width: 100px;text-align: right;">
39
			<a href="javascript:change_fontsize(5)"><img alt="Default font size" title="Default font size" src="${tg.url('/images/icn_text_sm.png')}" /></a>
40
			<a href="javascript:change_fontsize(10)"><img alt="Medium font size" title="Medium font size" src="${tg.url('/images/icn_text_md.png')}" /></a>
41
			<a href="javascript:change_fontsize(25)"><img alt="Large font size" title="Large font size" src="${tg.url('/images/icn_text_lg.png')}" /></a>
42
		</td>
43
			<td style="width: 100px;text-align: right;">
44
			<a href="${tg.url('/')}">
45
				<img alt="accueil" title="Accueil" src="${tg.url('/images/home.gif')}" />
46
			</a>
29 47
			<a id="SearchLien" href="javascript:vigiboard_searchdialog()">
30 48
				<img src="${tg.url('/images/filter.png')}" alt="filtrer" title="Filtrer"/>
31
				</a>
49
			</a>
32 50
		</td>
33 51
	</tr>
34 52
</table>	
......
37 55
<div py:if="flash" py:content="XML(flash)" />
38 56
</py:with>
39 57
<div class="main_content">
40
	${event_table(events,page,pages,id_first_row,id_last_row,total_row,event_edit_status_options,history,hist_error)}
58
	${event_table(events,page,pages,id_first_row,id_last_row,total_row,event_edit_status_options,history,hist_error,search)}
41 59
</div>
42 60
<script type="text/javascript">
43 61
	$("#flash").show("slow",function(){
44 62
		setTimeout('$("#flash").hide("slow")',5000);
45 63
			});
64
	function change_fontsize(size) {
65
		document.body.style.fontSize = size + "px";
66
		$.getJSON("${tg.url('/set_fontsize')}",{'fontsize':size},function(json){
67
			if ( json.ret == 'fail' )
68
				alert("Can't save preferences");
69
		})
70
	}		
71
	var refresh_timeout;
72
	function change_refresh_rate (timeout) {
73
		if ( timeout != 0 ) {
74
			if ( refresh_timeout ) {
75
				clearTimeout(refresh_timeout);
76
				refresh_timeout = null;
77
				$('#refresh_time').removeAttr('disabled');
78
				$('#refresh_button').attr('value','[Start]');
79
			} else {
80
				refresh_timeout = setTimeout('window.location.reload(true)',timeout);
81
				$('#refresh_time').attr("disabled", "disabled");
82
				$('#refresh_button').attr('value','[Stop]');
83
			}
84
		}
85
	}
86
	function change_refresh(timeout) {
87
		$.getJSON("${tg.url('/set_refresh')}",{'refresh':timeout},function(json){});
88
		change_refresh_rate(timeout);
89
	}
90
	<py:if test="tg.session.get('refresh','0') != '0'">
91
	change_refresh_rate(${tg.session.get('refresh',0)});
92
	</py:if>
46 93
</script>
47 94
</body>
48 95
</html>

Also available in: Unified diff