Merge branch 'i18n' 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>
249 <h6>Language</h6>
250 <div class="control-group">
251 <select data-setting="locale">
252 <option value="en-gb">English (British)</option>
253 <% _.forEach(languages, function(lang) { %>
254 <option value="<%= lang.tag %>"><%= lang.language %></li>
255 <% }); %>
256 </select>
257 </div>
258 </section>
259
260 <section class="protocol_handler">
261 <h6><%= default_client %></h6>
262 <div class="control-group">
263 <button class="register_protocol"><%= make_default %></button>
264 <br>
265 <small><%= default_note %></small>
266 </div>
267 </section>
268 </div>
269 </script>
270
271
272 <script type="text/html" id="tmpl_channel_list">
273 <div>
274 <table style="margin:1em 2em;">
275 <thead style="font-weight: bold;">
276 <tr>
277 <td><%= channel_name %></td>
278 <td><%= users %></td>
279 <td style="padding-left: 2em;"><%= topic %></td>
280 </tr>
281 </thead>
282 <tbody style="vertical-align: top;">
283 </tbody>
284 </table>
285 </div>
286 </script>
287
288
289 <script type="text/html" id="tmpl_script_editor">
290 <div style="height:100%;">
291 <style>
292 #kiwi .script_editor .se_toolbar { padding: 10px 20px; }
293 #kiwi .script_editor .se_toolbar span.status { margin-left:2em; font-style:italic; }
294 #kiwi .script_editor .se_toolbar button { height:30px; padding:0 1em; }
295 #kiwi .script_editor .se_toolbar button i { font-size:1.2em; margin-left:3px; }
296 </style>
297 <div class="script_editor" style="height:100%; position:relative;">
298 <div class="se_toolbar"><button class="btn_save"><%= save %><i class="icon-save"></i></button><span class="status"></span></div>
299 <div class="editor" style="position:absolute;top:50px;bottom:0px;left:0px;right:0px;"></div>
300 </div>
301 </div>
302 </script>
303
304
305 <script>
306 /* Script loader (https://github.com/ded/script.js) */
307 (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)
308
309
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
325 // Common dependancies that are required at all times
326 var scripts = [
327 ['libs/jquery-1.9.1.min.js', 'libs/lodash.min.js'],
328 'libs/backbone.min.js', 'libs/jed.js'
329 ];
330
331 // If in debug mode, load each development script
332 if (getQueryVariable('debug')) {
333 console.log('Loading debugging scripts');
334 scripts = scripts.concat([
335 'src/app.js',
336 [
337 'src/models/application.js',
338 'src/models/gateway.js'
339 ],
340 [
341 'src/models/newconnection.js',
342 'src/models/panellist.js',
343 'src/models/networkpanellist.js',
344 'src/models/panel.js',
345 'src/models/member.js',
346 'src/models/memberlist.js',
347 'src/models/network.js'
348 ],
349
350 [
351 'src/models/query.js',
352 'src/models/channel.js',
353 'src/models/server.js',
354 'src/models/applet.js'
355 ],
356
357 [
358 'src/applets/settings.js',
359 'src/applets/chanlist.js',
360 'src/applets/scripteditor.js'
361 ],
362
363 [
364 'src/models/pluginmanager.js',
365 'src/models/datastore.js',
366 'src/helpers/utils.js'
367 ],
368
369 // Some views extend these, so make sure they're loaded beforehand
370 [
371 'src/views/panel.js'
372 ],
373
374 [
375 'src/views/channel.js',
376 'src/views/applet.js',
377 'src/views/application.js',
378 'src/views/apptoolbar.js',
379 'src/views/controlbox.js',
380 'src/views/favicon.js',
381 'src/views/mediamessage.js',
382 'src/views/member.js',
383 'src/views/memberlist.js',
384 'src/views/menubox.js',
385 'src/views/networktabs.js',
386 'src/views/nickchangebox.js',
387 'src/views/resizehandler.js',
388 'src/views/serverselect.js',
389 'src/views/statusmessage.js',
390 'src/views/tabs.js',
391 'src/views/topicbar.js',
392 'src/views/userbox.js'
393 ]
394 ]);
395 } else {
396 scripts.push('kiwi.min.js?<%cache_buster%>');
397 }
398
399
400 // Run after all dependancies have been loaded
401 function startApp () {
402 var opts = {
403 container: $('#kiwi'),
404 base_path: base_path,
405
406 // Override the kiwi_server to use. (Think: running on standalone client..)
407 //kiwi_server: 'http://kiwiirc.com:80',
408
409 server_settings: <%server_settings%>,
410 client_plugins: <%client_plugins%>,
411 translations: <%translations%>
412 };
413
414 // Start the app
415 kiwi.start(opts);
416
417 // Load any plugins
418 if (opts.client_plugins && opts.client_plugins.length > 0) {
419 _.each(opts.client_plugins, function (plugin_url) {
420 kiwi.plugins.load(plugin_url);
421 });
422 }
423 }
424
425
426 // Load each script
427 var cur_script = 0;
428 function loadNextScript () {
429 var to_load,
430 base = base_path + '/assets/';
431
432 // Start the kiwi app if all scripts have been loaded
433 if (cur_script === scripts.length) {
434 startApp();
435 return;
436 }
437
438 if (typeof scripts[cur_script] === 'string') {
439 to_load = base + scripts[cur_script];
440 } else {
441 to_load = [];
442 for(var idx in scripts[cur_script]) {
443 to_load.push(base + scripts[cur_script][idx]);
444 }
445 }
446
447 $script(to_load, loadNextScript);
448
449 cur_script++;
450 }
451
452 // Entry path for the kiwi application
453 var base_path = '<%base_path%>';
454
455 // Start loading scripts
456 loadNextScript();
457 };
458 </script>
459 </body>
460 </html>