]> git.wh0rd.org - tt-rss.git/blame - utils/notifier/options.html
update translations
[tt-rss.git] / utils / notifier / options.html
CommitLineData
f0ea2da5
AD
1<html>
2<head>
3<title>Tiny Tiny RSS Notifier Options</title>
4<link rel="stylesheet" href="style.css" type="text/css"/>
5<script type="text/javascript" src="lib/prototype.js"></script>
6<script type="text/javascript" src="lib/scriptaculous/scriptaculous.js?load=effects,dragdrop,controls"></script>
7
8<script type="text/javascript">
9function save() {
10
11 var s = $("status");
12
13 s.innerHTML = "Options saved successfully.";
14
15 var f = document.forms['options'];
16
17 if (f.site_url.value.length > 0)
18 localStorage['site_url'] = f.site_url.value;
19 else {
20 s.innerHTML = "Error: Site url cannot be blank.";
21 new Effect.Highlight(f.site_url);
22 }
23
24 if (f.login.value.length > 0)
25 localStorage['login'] = f.login.value;
26 else {
27 s.innerHTML = "Error: Login cannot be blank.";
28 new Effect.Highlight(f.login);
29 }
30
31 var update_interval = parseInt(f.update_interval.value);
32
33 if (update_interval > 0)
34 localStorage['update_interval'] = f.update_interval.value;
35 else {
36 s.innerHTML = "Error: Update interval must be greater than zero.";
37 new Effect.Highlight(f.update_interval);
38 }
39
01701654 40 localStorage['show_badge'] = (f.show_badge.checked) ? "1" : "0";
fa7c9e65 41 localStorage['show_fresh'] = (f.show_fresh.checked) ? "1" : "0";
01701654 42
f0ea2da5
AD
43 var d = new Date();
44
45 localStorage["prefs_updated"] = d.getTime();
46
47 Element.show(s);
48
49 return false;
50}
51
52function init() {
53 var f = document.forms['options'];
54
55 if (localStorage['site_url'])
56 f.site_url.value = localStorage['site_url'];
57 else
58 f.site_url.value = "http://example.dom/tt-rss/";
59
60 if (localStorage['login'])
61 f.login.value = localStorage['login'];
62 else
63 f.login.value = "user";
64
65 if (localStorage['update_interval'])
66 f.update_interval.value = localStorage['update_interval'];
67 else
68 f.update_interval.value = '15';
69
01701654
AD
70 if (localStorage['show_badge'])
71 f.show_badge.checked = localStorage['show_badge'] == "1";
72 else
73 f.show_badge.checked = true;
74
fa7c9e65
AD
75 if (localStorage['show_fresh'])
76 f.show_fresh.checked = localStorage['show_fresh'] == "1";
77 else
78 f.show_fresh.checked = false;
79
f0ea2da5
AD
80 var last_updated = $('last_updated');
81
82 var d = new Date();
83
84 d.setTime(localStorage["last_updated"]);
85
86
87 last_updated.innerHTML = d;
88}
89</script>
90
91<style type="text/css">
92fieldset {
93 border : 0px;
94 margin : 0px;
95 clear : left;
96 line-height : 25px;
97}
98
99div#status {
100 font-size : 14px;
101 color : #88b0ff;
102}
103
104label {
105 width : 250px;
106 display : block;
107 float : left;
108 text-align : right;
109 padding-right : 1em;
110}
111
112p.last-updated {
113 color : gray;
114}
fa7c9e65
AD
115fieldset span.note {
116 color : gray;
117 font-style : italic;
118}
119
f0ea2da5
AD
120</style>
121
122<body onload="init()">
123 <div class="floatingLogo"><img src="images/ttrss_logo.png"></div>
124
125 <h1>Tiny Tiny RSS Notifier</h1>
126
127 <p class='last-updated'>Last update: <span id="last_updated">N/A</span></p>
128
129 <div style='display : none' id="status"></div>
130
131 <h2>Options</h2>
132
133 <form name="options" id="options" onsubmit="return save()">
134 <fieldset>
135 <label>URL of your Tiny Tiny RSS installation:</label>
136 <input name="site_url" size="60" value=""/>
137 </fieldset>
138
139 <fieldset>
140 <label>Login:</label>
141 <input name="login" size="30" value=""/>
142 </fieldset>
143
144 <fieldset>
145 <label>Update interval (in minutes):</label>
146 <input name="update_interval" size="30" value=""/>
147 </fieldset>
148
01701654
AD
149 <fieldset>
150 <label>Show badge:</label>
151 <input name="show_badge" type="checkbox" value="1"/>
152 </fieldset>
153
fa7c9e65
AD
154 <fieldset>
155 <label>Badge shows fresh articles:</label>
156 <input name="show_fresh" type="checkbox" value="1"/>
157 <span class="note">(requires Tiny Tiny RSS 1.4.1 or trunk)</span>
158 </fieldset>
159
f0ea2da5
AD
160 <input type="submit" value="Save"/>
161 </form>
162
fdf47b9d
AD
163 <p>Copyright &copy; 2010
164 <a target="_blank" href="http://tt-rss.org">Andrew Dolgov</a>.
165 Licensed under GNU GPL version 2.</p>
f0ea2da5
AD
166
167</body>