Merge branch 'settings' into development
[KiwiIRC.git] / client / assets / src / index.html.tmpl
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
5 <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
6 <base target="_blank">
7
8 <title> KiwiIRC </title>
9
10 <link rel="shortcut icon" href="<%base_path%>/assets/img/favicon.ico">
11
12 <link rel="stylesheet" type="text/css" href="<%base_path%>/assets/css/style.css" />
13 <link rel="stylesheet" type="text/css" href="<%base_path%>/assets/css/font-awesome.min.css" />
14 <!--[if IE 7]>
15 <link rel="stylesheet" type="text/css" href="/kiwi/assets/css/font-awesome-ie7.css" />
16 <![endif]-->
17 </head>
18 <body>
19 <div id="kiwi" class="theme_relaxed">
20 <div class="toolbar">
21 <div class="app_tools">
22 <ul class="main">
23 <li class="settings"><i class="icon-cogs" title="Settings"></i></li>
24 <li><a href="https://kiwiirc.com/" target="_blank"><img src="<%base_path%>/assets/img/ico.png" alt="KiwiIRC" title="KiwiIRC" /></a></li>
25 </ul>
26 </div>
27
28 <div class="tabs"></div>
29
30 <div class="topic">
31 <div contenteditable="true"></div>
32 </div>
33
34 <div class="status_message"></div>
35 </div>
36
37 <div class="memberlists_resize_handle"></div>
38
39 <div class="panels">
40 <div class="panel_container container1"></div>
41 </div>
42
43 <div class="memberlists disabled"></div>
44
45 <div class="controlbox">
46 <div class="input">
47 <span class="nick"> </span>
48 <div class="input_wrap"><textarea class="inp"></textarea></div>
49 <div class="input_tools"></div>
50 </div>
51 </div>
52 </div>
53
54
55
56
57
58
59 <script type="text/html" id="tmpl_userbox">
60 <div class="userbox">
61 <a class="if_op op"><i class="icon-star"></i><%= op %></a>
62 <a class="if_op deop"><i class="icon-star-empty"></i><%= de_op %></a>
63 <a class="if_op voice"><i class="icon-volume-up"></i><%= voice %></a>
64 <a class="if_op devoice"><i class="icon-volume-off"></i><%= de_voice %></a>
65 <a class="if_op kick"><i class="icon-remove"></i><%= kick %></a>
66 <a class="if_op ban"><i class="icon-ban-circle"></i><%= ban %></a>
67
68 <a class="query"><i class="icon-comment"></i><%= message %></a>
69 <a class="info"><i class="icon-info-sign"></i><%= info %></a>
70 <a class="slap"><i class="icon-user-md"></i><%= slap %></a>
71 </div>
72 </script>
73
74 <script type="text/html" id="tmpl_nickchange">
75 <form class="nickchange">
76 <label for="nickchange"><%= new_nick %>:</label> <input type="text" mozactionhint="done" autocomplete="off" spellcheck="false"/> <button><%= change %></button> <a class="cancel"><%= cancel %></a>
77 </form>
78 </script>
79
80 <script type="text/html" id="tmpl_new_connection_info">
81 <div style="margin:1em 20px;">
82 <img src="https://kiwiirc.com/img/ico.png" alt="KiwiIRC Logo" title="Kiwi IRC" style="display:block; margin:0 auto;"/> <br />
83 <p style="font-style:italic;">A <strong>hand-crafted IRC client</strong> that you can enjoy. Designed to be used <strong>easily</strong> and <strong>freely</strong>.</p>
84
85 <p style="font-size:0.9em;margin-top:2em;">Peek at the <a href="https://www.kiwiirc.com/">Kiwi IRC homepage</a> for more information or to find out how to embed it on your own website. Looking for source code? Try the <a href="http://github.com/prawnsalad/KiwiIRC/">GitHub</a> page. This network of people may not be associated with Kiwi IRC itself.</p>
86 </div>
87 </script>
88
89 <script type="text/html" id="tmpl_server_select">
90 <div class="server_select">
91
92 <div class="side_panel" style="position:absolute;top:0px;left:320px;">
93 <div class="content" style="position:relative;width:300px;">
94 </div>
95 </div>
96
97 <div class="server_details" style="position:relative;width:320px;">
98 <div class="status"><%= think_nick %></div>
99
100 <form>
101 <div class="basic">
102 <table>
103 <tr class="nick">
104 <td><label for="server_select_nick"><%= nickname %></label></td>
105 <td><input type="text" class="nick" id="server_select_nick"></td>
106 </tr>
107
108 <tr class="have_pass">
109 <td colspan="2">
110 <label for="server_select_show_pass"><%= have_password %></label> <input type="checkbox" id="server_select_show_pass" style="width:auto;" />
111 </td>
112 </tr>
113
114 <tr class="pass">
115 <td><label for="server_select_password"><%= password %></label></td>
116 <td><input type="password" class="password" id="server_select_password"></td>
117 </tr>
118
119 <tr class="channel">
120 <td><label for="server_select_channel"><%= channel %></label></td>
121 <td>
122 <div style="position:relative;">
123 <input type="text" class="channel" id="server_select_channel">
124 <i class="icon-key" title="<%= channel_key %>"></i>
125 </div>
126 </td>
127 </tr>
128
129 <tr class="have_key">
130 <td colspan="2">
131 <label for="server_select_show_channel_key"><%= require_key %></label> <input type="checkbox" id="server_select_show_channel_key" style="width:auto;" />
132 </td>
133 </tr>
134
135 <tr class="key">
136 <td><label for="server_select_channel_key"><%= key %></label></td>
137 <td><input type="password" class="channel_key" id="server_select_channel_key"></td>
138 </tr>
139
140 <tr class="start">
141 <td colspan="2"><button type="submit"><%= start %></button></td>
142 </tr>
143 </table>
144
145 <a href="" onclick="return false;" class="show_more"><%= server_network %> <i class="icon-caret-down"></i></a>
146 </div>
147
148
149 <div class="more">
150 <table>
151 <tr class="server">
152 <td><label for="server_select_server"><%= server %></label></td>
153 <td><input type="text" class="server" id="server_select_server"></td>
154 <tr>
155
156 <tr class="port">
157 <td><label for="server_select_port"><%= port %></label></td>
158 <td><input type="text" class="port" id="server_select_port"></td>
159 </tr>
160
161 <tr class="ssl">
162 <td><label for="server_select_ssl">SSL</label></td>
163 <td><input type="checkbox" class="ssl" id="server_select_ssl"></td>
164 </tr>
165 </table>
166 </div>
167 </form>
168
169 <a class="kiwi_logo" href="https://kiwiirc.com/" target="_blank">
170 <h1><span><%= powered_by %></span> <img src="<%base_path%>/assets/img/ico.png" alt="KiwiIRC Logo" title="Kiwi IRC" /></h1>
171 </a>
172 </div>
173 </div>
174 </script>
175
176 <script type="text/html" id="tmpl_applet_settings">
177 <div class="settings_container">
178 <section>
179 <h6>Theme</h6>
180 <div class="control-group">
181 <div class="thumbnails">
182 <a class="thumbnail" data-setting="theme" data-value="relaxed" href="#">
183 <div class="thumbnail_wrapper"><div class="theme_color" style="background-color: #e7e7e7;"></div></div>
184 <div class="caption"><u>Relaxed</u></div>
185 </a>
186 <a class="thumbnail" data-setting="theme" data-value="mini" href="#">
187 <div class="thumbnail_wrapper"><div class="theme_color" style="background-color: #fff;"></div></div>
188 <div class="caption"><u>Mini</u></div>
189 </a>
190 <a class="thumbnail" data-setting="theme" data-value="cli" href="#">
191 <div class="thumbnail_wrapper"><div class="theme_color" style="background-color: #222;"></div></div>
192 <div class="caption"><u>CLI</u></div>
193 </a>
194 <a class="thumbnail" data-setting="theme" data-value="basic" href="#">
195 <div class="thumbnail_wrapper"><div class="theme_color" style="background-color: #e7e7e7;"></div></div>
196 <div class="caption"><u>Basic</u></div>
197 </a>
198 </div>
199 </div>
200 </section>
201
202 <section>
203 <h6>Channels</h6>
204 <div class="control-group">
205 <div class="radio">
206 <label>
207 <input type="radio" name="channel_list_style" data-setting="channel_list_style" value="tabs">
208 <%= tabs %>
209 </label>
210 </div>
211 <div class="radio">
212 <label>
213 <input type="radio" name="channel_list_style" data-setting="channel_list_style" value="list">
214 <%= list %><small class="text-muted">(<%= large_amounts_of_chans %>)</small>
215 </label>
216 </div>
217 </div>
218 </section>
219
220 <section>
221 <h6>Chat window</h6>
222 <div class="control-group">
223 <div class="checkbox">
224 <label>
225 <input data-setting="show_joins_parts" type="checkbox">
226 <%= join_part %>
227 </label>
228 </div>
229 <div class="checkbox">
230 <label>
231 <input data-setting="show_timestamps" type="checkbox">
232 <%= timestamps %>
233 </label>
234 </div>
235 <div class="checkbox">
236 <label>
237 <input data-setting="mute_sounds" type="checkbox">
238 <%= mute %>
239 </label>
240 </div>
241 <label>
242 <input data-setting="scrollback" class="input-small" type="text" size="4" pattern="\d*">
243 <span><%= scroll_history %></span>
244 </label>
245 </div>
246 </section>
247
248 <section class="language">
249 <h6>Language</h6>
250 <div class="control-group">
251 <select data-setting="locale">
252 <% _.forEach(languages, function(lang) { %>
253 <option value="<%= lang.tag %>"><%= lang.language %></li>
254 <% }); %>
255 </select>
256 <br>
257 <small><%= locale_restart_needed %></small>
258 </div>
259 </section>
260
261 <section class="protocol_handler">
262 <h6><%= default_client %></h6>
263 <div class="control-group">
264 <button class="register_protocol"><%= make_default %></button>
265 <br>
266 <small><%= default_note %></small>
267 </div>
268 </section>
269 </div>
270 </script>
271
272
273 <script type="text/html" id="tmpl_channel_list">
274 <div>
275 <table style="margin:1em 2em;">
276 <thead style="font-weight: bold;">
277 <tr>
278 <td><%= channel_name %></td>
279 <td><%= users %></td>
280 <td style="padding-left: 2em;"><%= topic %></td>
281 </tr>
282 </thead>
283 <tbody style="vertical-align: top;">
284 </tbody>
285 </table>
286 </div>
287 </script>
288
289
290 <script type="text/html" id="tmpl_script_editor">
291 <div style="height:100%;">
292 <style>
293 #kiwi .script_editor .se_toolbar { padding: 10px 20px; }
294 #kiwi .script_editor .se_toolbar span.status { margin-left:2em; font-style:italic; }
295 #kiwi .script_editor .se_toolbar button { height:30px; padding:0 1em; }
296 #kiwi .script_editor .se_toolbar button i { font-size:1.2em; margin-left:3px; }
297 </style>
298 <div class="script_editor" style="height:100%; position:relative;">
299 <div class="se_toolbar"><button class="btn_save"><%= save %><i class="icon-save"></i></button><span class="status"></span></div>
300 <div class="editor" style="position:absolute;top:50px;bottom:0px;left:0px;right:0px;"></div>
301 </div>
302 </div>
303 </script>
304
305
306 <script src="<%base_path%>/assets/libs/jquery-1.9.1.min.js"></script>
307 <script>
308 /* Script loader (https://github.com/ded/script.js) */
309 (function(a,b,c){typeof c["module"]!="undefined"&&c.module.exports?c.module.exports=b():typeof c["define"]!="undefined"&&c["define"]=="function"&&c.define.amd?define(a,b):c[a]=b()})("$script",function(){function p(a,b){for(var c=0,d=a.length;c<d;++c)if(!b(a[c]))return j;return 1}function q(a,b){p(a,function(a){return!b(a)})}function r(a,b,i){function o(a){return a.call?a():d[a]}function t(){if(!--n){d[m]=1,l&&l();for(var a in f)p(a.split("|"),o)&&!q(f[a],o)&&(f[a]=[])}}a=a[k]?a:[a];var j=b&&b.call,l=j?b:i,m=j?a.join(""):b,n=a.length;return setTimeout(function(){q(a,function(a){if(h[a])return m&&(e[m]=1),h[a]==2&&t();h[a]=1,m&&(e[m]=1),s(!c.test(a)&&g?g+a+".js":a,t)})},0),r}function s(c,d){var e=a.createElement("script"),f=j;e.onload=e.onerror=e[o]=function(){if(e[m]&&!/^c|loade/.test(e[m])||f)return;e.onload=e[o]=null,f=1,h[c]=2,d()},e.async=1,e.src=c,b.insertBefore(e,b.firstChild)}var a=document,b=a.getElementsByTagName("head")[0],c=/^https?:\/\//,d={},e={},f={},g,h={},i="string",j=!1,k="push",l="DOMContentLoaded",m="readyState",n="addEventListener",o="onreadystatechange";return!a[m]&&a[n]&&(a[n](l,function t(){a.removeEventListener(l,t,j),a[m]="complete"},j),a[m]="loading"),r.get=s,r.order=function(a,b,c){(function d(e){e=a.shift(),a.length?r(e,d):r(e,b,c)})()},r.path=function(a){g=a},r.ready=function(a,b,c){a=a[k]?a:[a];var e=[];return!q(a,function(a){d[a]||e[k](a)})&&p(a,function(a){return d[a]})?b():!function(a){f[a]=f[a]||[],f[a][k](b),c&&c(e)}(a.join("|")),r},r},this)
310
311
312 function getQueryVariable(variable) {
313 var query = window.location.search.substring(1);
314 var vars = query.split('&');
315 for (var i = 0; i < vars.length; i++) {
316 var pair = vars[i].split('=');
317 if (decodeURIComponent(pair[0]) == variable) {
318 return decodeURIComponent(pair[1]);
319 }
320 }
321 }
322
323 window.onload = function () {
324 var base_path = '<%base_path%>', // Entry path for the kiwi application
325 scripts = [],
326 opts = {
327 container: $('#kiwi'),
328 base_path: base_path,
329
330 // Override the kiwi_server to use. (Think: running on standalone client..)
331 //kiwi_server: 'http://kiwiirc.com:80',
332 };
333
334 // Run after all dependancies have been loaded
335 function startApp () {
336 // Start the app
337 kiwi.start(opts, function() {
338 // Load any plugins
339 if (opts.client_plugins && opts.client_plugins.length > 0) {
340 _.each(opts.client_plugins, function (plugin_url) {
341 kiwi.plugins.load(plugin_url);
342 });
343 }
344 });
345 }
346
347
348 // Load each script
349 var cur_script = 0;
350 function loadNextScript () {
351 var to_load,
352 base = base_path + '/assets/';
353
354 // Start the kiwi app if all scripts have been loaded
355 if (cur_script === scripts.length) {
356 startApp();
357 return;
358 }
359
360 if (typeof scripts[cur_script] === 'string') {
361 to_load = base + scripts[cur_script];
362 } else {
363 to_load = [];
364 for(var idx in scripts[cur_script]) {
365 to_load.push(base + scripts[cur_script][idx]);
366 }
367 }
368
369 $script(to_load, loadNextScript);
370
371 cur_script++;
372 }
373
374 // Load application settings
375 $.getJSON(base_path + '/assets/settings.json', function (data) {
376 scripts = scripts.concat(data.scripts);
377 opts.server_settings = data.server_settings;
378 opts.client_plugins = data.client_plugins;
379 opts.translations = data.translations;
380 opts.locale = data.locale;
381
382 // Start loading scripts
383 loadNextScript();
384 });
385 };
386 </script>
387 </body>
388 </html>