Debian Codegraph @

share/templates/logs.html

raw
1 ? my $app = shift;
2 <html>
3 <head>
4 <title>Logs</title>
5 <link type="text/css" rel="stylesheet" href="<?= $app->static_url("alice.css") ?>" />
6 <script type="text/javascript">
7 sendQuery = function (form) {
8 $('submit').value = "Searching...";
9 $('submit').disable();
10 new Ajax.Request("/search", {
11 method: "get",
12 parameters: form.serialize(),
13 onSuccess: function (transport) {
14 $('logresults').replace(transport.responseText);
15 $('submit').value = "Search";
16 $('submit').enable();
17 }
18 });
19 return false;
20 };
21
22 expandRange = function(channel, id, li) {
23 new Ajax.Request('/range', {
24 method: "post",
25 parameters: {id: id, channel: channel},
26 onSuccess: function (transport) {
27 $$('.context').each(function (item) {
28 item.select(".context_wrapper").invoke("remove");
29 item.removeClassName("context");
30 });
31 var data = transport.responseText;
32 li.addClassName("context");
33 data = data.evalJSON();
34 li.insert({top: data[0], bottom: data[1]});
35 }
36 });
37 };
38 </script>
39 </head>
40 <body>
41 <div id="logsearch">
42 <form id="query" onsubmit="return sendQuery(this)">
43 <input type="search" name="body" id="body" style="width:210px;margin-left:5px" placeholder="Message" autofocus />
44 <input style="width:100px" type="search" name="nick" id="nick" placeholder="Nick" />
45 <input style="width:100px" type="search" name="channel" id="channel" placeholder="Channel"/>
46 <input type="submit" value="Search" id="submit" />
47 </form>
48 </div>
49 <ul id="logresults">
50 </ul>
51 <script type="text/javascript" src="<?= $app->static_url("alice.js") ?>"></script>
52 </body>
53 </html>