2
2
#extends prewikka.templates.ClassicLayout
4
4
#def layout_start_hook
5
<form method="post" action="?">
6
<script type="text/javascript">
10
var autorefresh_enabled = true;
12
\$(document).ready(function() {
13
\$("#allbox").click(function(){
14
\$('input[@name=delete]').check(\$(this).attr('checked'));
18
if ( navigator.userAgent.indexOf("Konqueror") != -1 ) {
19
\$("th.filter_popup > div").css("display", "block");
20
\$("th.filter_popup > div").hide();
23
\$("th.filter_popup > a").click(function(){
24
\$(this).next().popupUnique(function(data){data.show()}, function(data){data.hide()})
28
\$("input[@name=auto_apply_value], input[@type=submit]").focus(function(){
29
autorefresh_possible = false;
32
\$("input[@name=auto_apply_value]").blur(function(){
33
if ( second_reload <= second_count )
36
autorefresh_possible = true;
39
\$(".auto_apply_button").click(function(){
40
if ( document.messagelisting.auto_apply_enable.value == "true" ) {
41
autorefresh_enabled = false;
43
document.messagelisting.auto_apply_enable.value = "false";
44
document.messagelisting.auto_apply_image.src = "prewikka/images/play.png";
46
autorefresh_enabled = true;
48
document.messagelisting.auto_apply_enable.value = "true";
49
document.messagelisting.auto_apply_image.src = "prewikka/images/pause.png";
53
\$("a[@href]").click(function(){
54
autorefresh_possible = false;
67
function autoApplyTime() {
68
if ( document.messagelisting.auto_apply_value.value )
69
var rawtime = document.messagelisting.auto_apply_value.value;
73
var old = second_reload;
74
var parselimit = rawtime.split(":");
76
if ( parselimit[0] && parselimit[1] && parselimit[2] )
77
second_reload = parselimit[0] * 3600 + parselimit[1] * 60 + parselimit[2] * 1;
79
else if ( parselimit[0] && parselimit[1] )
80
second_reload = parselimit[0] * 60 + parselimit[1] * 1;
83
second_reload = rawtime;
85
if ( second_reload != old )
90
function autoApplyCounter() {
93
if ( autorefresh_enabled == false || autorefresh_possible == false || second_reload == 0 ) {
94
setTimeout("autoApplyCounter()", 1000);
99
document.getElementById("auto_apply_current").innerHTML = Math.floor(second_count / 60) + ":" + pad((second_count % 60));
101
if ( second_count != second_reload )
102
setTimeout("autoApplyCounter()", 1000);
104
else if ( second_count == second_reload ) {
109
if ( window.pageYOffset )
110
yaxis = window.pageYOffset;
112
else if ( window.documentElement && window.documentElement.scrollTop )
113
yaxis = window.documentElement.scrollTop;
115
else if ( document.body.scrollTop )
116
yaxis = window.body.scrollTop;
118
document.messagelisting.y.value = yaxis;
119
document.messagelisting.submit("Apply");
124
function setScrollBar() {
125
if ( document.messagelisting.y.value ) {
126
window.scrollTo('0', document.messagelisting.y.value) ;
127
document.messagelisting.y.value = 0;
132
function beginAutoApply() {
133
#if $auto_apply_enable == "true"
134
autorefresh_enabled = true;
136
autorefresh_enabled = false;
140
setTimeout("autoApplyCounter()", 1000);
145
<form id="messagelisting" name="messagelisting" method="post" action="?">
6
146
#for $name, $value in $hidden_parameters
7
147
<input type="hidden" name="$name" value="$value"/>
29
169
#set global $message = $message
30
170
<tr class="$row_classes[$cnt % 2]">
32
<td class="static_content_column">
33
173
#if $prewikka.user.has(User.PERM_IDMEF_ALTER)
34
174
<input class="checkbox" type="checkbox" name="delete" value="$message.delete"/>
43
184
#if $prewikka.user.has(User.PERM_IDMEF_ALTER) and $cnt
45
187
<td colspan="4"> </td>
46
188
<td style="text-align: right;"><input type="submit" value="$_("Delete")"/></td>
47
<td class="static_content_column">
48
<input class="checkbox" type="checkbox" id="allbox" onclick="checkBoxByName('delete', document.forms[0].allbox.checked);"/>
190
<input class="checkbox" type="checkbox" id="allbox" />
55
196
#end block main_content
199
#block orderby_option
200
<option value="time_desc" $timeline.time_desc_selected>By time (descending)</option>
201
<option value="time_asc" $timeline.time_asc_selected>By time (ascending)</option>
60
204
#block menu_extra_content
61
206
<table id="timeline">
62
207
#def timeline_extra_content
64
209
$timeline_extra_content
67
212
<th id="timeline_step_label">$_("Period")</th>
69
<input class="timeline_value" name="timeline_value" type="text" size="2" value="$timeline.value"/>
72
<select class="timeline_unit_select" name="timeline_unit">
214
<input name="timeline_value" type="text" size="2" value="$timeline.value"/>
215
<select name="timeline_unit">
73
216
<option value="min" $timeline.min_selected>$_("Minutes")</option>
74
217
<option value="hour" $timeline.hour_selected>$_("Hours")</option>
75
218
<option value="day" $timeline.day_selected>$_("Days")</option>
84
227
<th id="timezone_control_label">$_("Timezone")</th>
86
<select class="timezone_control_select" name="timezone">
229
<select name="timezone">
87
230
<option value="frontend_localtime" $timeline.frontend_localtime_selected>$_("Frontend localtime")</option>
88
<option value="sensor_localtime" $timeline.sensor_localtime_selected>$_("Sensor localtime")</option>
89
<option value="utc" $timeline.utc_selected>$_("UTC")</option>
231
<option value="sensor_localtime" $timeline.sensor_localtime_selected>$_("Sensor localtime")</option>
232
<option value="utc" $timeline.utc_selected>$_("UTC")</option>
95
238
<th id="timeline_limit_label">$_("Limit")</th>
98
241
<input id="timeline_limit_value" type="text" size="2" name="limit" value="$limit"/>
244
<select name="orderby">
102
<tr style="text-align: center;">
103
<td colspan=3><input type="submit" name="apply" value="$_("Apply")" />
104
<input type="submit" name="_save" value="$_("Save")" /></td>
251
<th id="auto_apply_label">$_("Refresh")</th>
254
#if $auto_apply_enable == "true"
255
#set $img = "prewikka/images/pause.png"
257
#set $img = "prewikka/images/play.png"
260
<input type="hidden" name="auto_apply_enable" value="$auto_apply_enable" />
262
<div class="auto_apply_current" id="auto_apply_current">0:00</div>
263
<input type="text" size="3" name="auto_apply_value" value="$auto_apply_value" />
264
<a class="auto_apply_button"><img id="auto_apply_image" src="$img" alt="Play/Pause" /></a>
107
269
#filter CleanOutput
272
<td colspan="3" style="text-align: center">
274
<br style="line-height: 5px;" />
277
<input id="form_apply" type="submit" name="apply" value="$_("Apply")" /> <input type="submit" name="_save" value="$_("Save")" />
280
<br style="line-height: 5px;" />
282
<div class="timeline_range">
109
283
#if not $timeline.start
110
<tr><td colspan="4" class="timeline_range">Unlimited</td></tr>
111
<tr><td colspan="4" class="timeline_range">-</td></tr>
113
<tr><td colspan="4" class="timeline_range">$timeline.start</td></tr>
114
<tr><td colspan="4" class="timeline_range">$timeline.end</td></tr>
116
<tr><td colspan="4" class="timeline_range">$timeline.range_timezone</td></tr>
290
$timeline.range_timezone
119
<td colspan="4" style="text-align: center;">
121
299
#if $timeline.prev
122
300
<td class="timeline_control_prev"><a href="$timeline.prev"><b>$_("prev")</b></a></td>