Macedonian translation #583
[KiwiIRC.git] / client / 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> Kiwi IRC </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?t=<%build_time%>" />
13 <link rel="stylesheet" type="text/css" href="<%base_path%>/assets/css/font-awesome.min.css" />
14 </head>
15 <body>
16
17 <script type="text/html" id="tmpl_application">
18 <div id="kiwi" class="theme_relaxed">
19 <div class="toolbar">
20 <div class="app_tools">
21 <ul class="main">
22 <li class="settings"><i class="fa fa-cogs" title="Settings"></i></li>
23 <li class="startup"><i class="fa fa-home" title="Home"></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="right_bar disabled">
44 <div class="right-bar-toggle"><i class=""></i></div>
45 <div class="right-bar-content">
46 <div class="channel_tools">
47 <i class="fa fa-info-circle channel_info" title="Channel Info"></i>
48 <i class="fa fa-sign-out channel_part" title="Leave Channel"></i>
49 <i class="fa fa-angle-double-right right-bar-toggle-inner" title="Hide"></i>
50 </div>
51 <div class="memberlists"></div>
52 </div>
53 </div>
54
55 <div class="controlbox">
56 <div class="input">
57 <span class="nick"> </span>
58 <div class="input_wrap"><textarea class="inp"></textarea></div>
59 <div class="input_tools"></div>
60 </div>
61 </div>
62 </div>
63 </script>
64
65
66 <script type="text/html" id="tmpl_channel_info">
67 <div class="channel_info">
68 <b class="channel_url"><a href=""></a></b>
69
70 <form>
71 <div class="control-group channel_info_modes">
72 <label>
73 <input type="checkbox" name="channel_mute" class="channel-mode" data-mode="m" />
74 Moderated chat
75 </label>
76 <label>
77 <input type="checkbox" name="channel_invite" class="channel-mode" data-mode="i" />
78 Invite only
79 </label>
80 <label>
81 <input type="checkbox" name="channel_topic" class="channel-mode" data-mode="t" />
82 Only operators can change the topic
83 </label>
84 <label>
85 <input type="checkbox" name="channel_external_messages" class="channel-mode" data-mode="n" />
86 Block messages from outside this channel
87 </label>
88 </div>
89
90 <div class="control-group">
91 <label>
92 Password
93 <input type="text" name="channel_key" class="channel-mode" data-mode="k" />
94 </label>
95 </div>
96
97
98 <div class="control-group channel-banlist">
99 <button class="toggle_banlist">Toggle banlist</button> <span class="banlist-status"></span>
100 <table>
101 <thead>
102 <tr>
103 <td>Ban Mask</td>
104 <td>Added By</td>
105 <td>Date Added</td>
106 <td></td>
107 </tr>
108 </thead>
109 <tbody>
110 </tbody>
111 </table>
112 </div>
113 </form>
114 </div>
115 </script>
116
117
118 <script type="text/html" id="tmpl_userbox">
119 <div class="userbox">
120 <a class="close_menu if_op op"><i class="fa fa-star"></i><%= op %></a>
121 <a class="close_menu if_op deop"><i class="fa fa-star-o"></i><%= de_op %></a>
122 <a class="close_menu if_op voice"><i class="fa fa-volume-up"></i><%= voice %></a>
123 <a class="close_menu if_op devoice"><i class="fa fa-volume-off"></i><%= de_voice %></a>
124 <a class="close_menu if_op kick"><i class="fa fa-times"></i><%= kick %></a>
125 <a class="close_menu if_op ban"><i class="fa fa-ban"></i><%= ban %></a>
126
127 <a class="close_menu query"><i class="fa fa-comment"></i><%= message %></a>
128 <a class="close_menu info"><i class="fa fa-info-circle"></i><%= info %></a>
129 <a class="close_menu ignore"><label><i><input type="checkbox" /></i><%= ignore %></label></a>
130 </div>
131 </script>
132
133 <script type="text/html" id="tmpl_nickchange">
134 <form class="nickchange">
135 <label for="nickchange"><%= new_nick %>:</label> <input type="text" mozactionhint="done" autocomplete="off" spellcheck="false"/> <button><%= change %></button> <a class="cancel"><%= cancel %></a>
136 </form>
137 </script>
138
139 <script type="text/html" id="tmpl_new_connection_info">
140 <div style="margin:1em 20px;">
141 <img src="<%base_path%>/assets/img/ico.png" alt="KiwiIRC Logo" title="Kiwi IRC" style="display:block; margin:0 auto;"/> <br />
142 <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>
143
144 <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>
145 </div>
146 </script>
147
148 <script type="text/html" id="tmpl_server_select">
149 <div class="server_select">
150
151 <div class="side_panel" style="position:absolute;top:0px;left:320px;">
152 <div class="content" style="position:relative;width:300px;">
153 </div>
154 </div>
155
156 <div class="server_details" style="position:relative;width:320px;">
157 <div class="status"><%= think_nick %></div>
158
159 <form>
160 <div class="basic">
161 <table>
162 <tr class="nick">
163 <td><label for="server_select_nick"><%= nickname %></label></td>
164 <td><input type="text" class="nick" id="server_select_nick"></td>
165 </tr>
166
167 <tr class="have_pass">
168 <td colspan="2">
169 <label for="server_select_show_pass"><%= have_password %></label> <input type="checkbox" id="server_select_show_pass" style="width:auto;" />
170 </td>
171 </tr>
172
173 <tr class="pass">
174 <td><label for="server_select_password"><%= password %></label></td>
175 <td><input type="password" class="password" id="server_select_password"></td>
176 </tr>
177
178 <tr class="channel">
179 <td><label for="server_select_channel"><%= channel %></label></td>
180 <td>
181 <div style="position:relative;">
182 <input type="text" class="channel" id="server_select_channel">
183 <i class="fa fa-key" title="<%= channel_key %>"></i>
184 </div>
185 </td>
186 </tr>
187
188 <tr class="have_key">
189 <td colspan="2">
190 <label for="server_select_show_channel_key"><%= require_key %></label> <input type="checkbox" id="server_select_show_channel_key" style="width:auto;" />
191 </td>
192 </tr>
193
194 <tr class="key">
195 <td><label for="server_select_channel_key"><%= key %></label></td>
196 <td><input type="password" class="channel_key" id="server_select_channel_key"></td>
197 </tr>
198
199 <tr class="start">
200 <td></td>
201 <td><button type="submit"><%= start %></button></td>
202 </tr>
203 </table>
204
205 <a href="" onclick="return false;" class="show_more"><%= server_network %> <i class="fa fa-caret-down"></i></a>
206 </div>
207
208
209 <div class="more">
210 <table>
211 <tr class="server">
212 <td><label for="server_select_server"><%= server %></label></td>
213 <td><input type="text" class="server" id="server_select_server"></td>
214 <tr>
215
216 <tr class="port">
217 <td><label for="server_select_port"><%= port %></label></td>
218 <td><input type="text" class="port" id="server_select_port"></td>
219 </tr>
220
221 <tr class="ssl">
222 <td><label for="server_select_ssl">SSL</label></td>
223 <td><input type="checkbox" class="ssl" id="server_select_ssl"></td>
224 </tr>
225 </table>
226 </div>
227 </form>
228
229 <a class="kiwi_logo" href="https://kiwiirc.com/" target="_blank">
230 <h1><span><%= powered_by %></span> <img src="<%base_path%>/assets/img/ico.png" alt="KiwiIRC Logo" title="Kiwi IRC" /></h1>
231 </a>
232 </div>
233 </div>
234 </script>
235
236 <script type="text/html" id="tmpl_theme_thumbnail">
237 <a class="thumbnail" data-setting="theme" data-value="<%= name.toLowerCase() %>" href="#">
238 <div class="thumbnail_wrapper"><div class="theme_color" style="background-color: <%= thumbnail_colour %>;"></div></div>
239 <div class="caption"><u><%= name %></u></div>
240 </a>
241 </script>
242
243 <script type="text/html" id="tmpl_applet_settings">
244 <div class="settings_container">
245 <form>
246 <section>
247 <h6>Theme</h6>
248 <div class="control-group">
249 <div class="thumbnails">
250 <% _.forEach(theme_thumbnails, function(thumbnail) { %>
251 <%= thumbnail %>
252 <% }); %>
253 </div>
254 </div>
255 </section>
256
257 <section>
258 <h6>Channels</h6>
259 <div class="control-group">
260 <div class="radio">
261 <label>
262 <input type="radio" name="channel_list_style" data-setting="channel_list_style" value="tabs">
263 <%= tabs %>
264 </label>
265 </div>
266 <div class="radio">
267 <label>
268 <input type="radio" name="channel_list_style" data-setting="channel_list_style" value="list">
269 <%= list %><small class="text-muted">(<%= large_amounts_of_chans %>)</small>
270 </label>
271 </div>
272 </div>
273 </section>
274
275 <section>
276 <h6>Chat window</h6>
277 <div class="control-group">
278 <div class="checkbox">
279 <label>
280 <input data-setting="show_joins_parts" type="checkbox">
281 <%= join_part %>
282 </label>
283 </div>
284 <div class="checkbox">
285 <label>
286 <input data-setting="count_all_activity" type="checkbox">
287 <%= count_all_activity %>
288 </label>
289 </div>
290 <div class="checkbox">
291 <label>
292 <input data-setting="show_timestamps" type="checkbox">
293 <%= timestamps %>
294 </label>
295 </div>
296 <div class="checkbox">
297 <label>
298 <input data-setting="use_24_hour_timestamps" type="checkbox">
299 <%= timestamp_24 %>
300 </label>
301 </div>
302 <div class="checkbox">
303 <label>
304 <input data-setting="mute_sounds" type="checkbox">
305 <%= mute %>
306 </label>
307 </div>
308 <div class="checkbox">
309 <label>
310 <input data-setting="show_emoticons" type="checkbox">
311 <%= emoticons %>
312 </label>
313 </div>
314 <label>
315 <input data-setting="scrollback" class="input-small" type="text" size="4" pattern="\d*">
316 <span><%= scroll_history %></span>
317 </label>
318 </div>
319 </section>
320
321 <section class="language">
322 <h6>Language</h6>
323 <div class="control-group">
324 <select data-setting="locale">
325 <option value=""></li>
326 <% _.forEach(languages, function(lang) { %>
327 <option value="<%= lang.tag %>"><%= lang.language %></li>
328 <% }); %>
329 </select>
330 <br>
331 <small><%= locale_restart_needed %></small>
332 </div>
333 </section>
334
335 <section class="protocol_handler">
336 <h6><%= default_client %></h6>
337 <div class="control-group">
338 <button class="register_protocol"><%= make_default %></button>
339 <br>
340 <small><%= default_note %></small>
341 </div>
342 </section>
343
344 <section class="notification_enabler">
345 <h6><%= html5_notifications %></h6>
346 <div class="control-group">
347 <button class="enable_notifications"><%= enable_notifications %></button>
348 </div>
349 </section>
350 </form>
351 </div>
352 </script>
353
354
355 <script type="text/html" id="tmpl_channel_list">
356 <div class="applet_chanlist">
357 <table>
358 <thead style="font-weight: bold;">
359 <tr>
360 <td><a class="channel_name_title"><%= channel_name %></a></td>
361 <td><a class="users_title"><%= users %></a></td>
362 <td style="padding-left: 2em;"><%= topic %></td>
363 </tr>
364 </thead>
365 <tbody style="vertical-align: top;">
366 </tbody>
367 </table>
368 </div>
369 </script>
370
371
372 <script type="text/html" id="tmpl_script_editor">
373 <div style="height:100%;">
374 <style>
375 #kiwi .script_editor .se_toolbar { padding: 10px 20px; }
376 #kiwi .script_editor .se_toolbar span.status { margin-left:2em; font-style:italic; }
377 #kiwi .script_editor .se_toolbar button { height:30px; padding:0 1em; }
378 #kiwi .script_editor .se_toolbar button i { font-size:1.2em; margin-left:3px; }
379 </style>
380 <div class="script_editor" style="height:100%; position:relative;">
381 <div class="se_toolbar"><button class="btn_save"><%= save %><i class="fa fa-floppy-o"></i></button><span class="status"></span></div>
382 <div class="editor" style="position:absolute;top:50px;bottom:0px;left:0px;right:0px;"></div>
383 </div>
384 </div>
385 </script>
386
387
388 <script src="<%base_path%>/assets/libs/jquery-1.11.0.min.js"></script>
389 <script>
390 /* Script loader (https://github.com/ded/script.js) */
391 (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)
392
393
394 // Avoid `console` errors in browsers that lack a console. (https://github.com/h5bp/html5-boilerplate)
395 function normalizeConsole() {
396 var method;
397 var noop = function () {};
398 var methods = [
399 'assert', 'clear', 'count', 'debug', 'dir', 'dirxml', 'error',
400 'exception', 'group', 'groupCollapsed', 'groupEnd', 'info', 'log',
401 'markTimeline', 'profile', 'profileEnd', 'table', 'time', 'timeEnd',
402 'timeStamp', 'trace', 'warn'
403 ];
404 var length = methods.length;
405 var console = (window.console = window.console || {});
406
407 while (length--) {
408 method = methods[length];
409
410 // Only stub undefined methods.
411 if (!console[method]) {
412 console[method] = noop;
413 }
414 }
415 };
416
417 function getQueryVariable(variable) {
418 var query = window.location.search.substring(1);
419 var vars = query.split('&');
420 for (var i = 0; i < vars.length; i++) {
421 var pair = vars[i].replace(/\+/g, '%20').split('=');
422 if (decodeURIComponent(pair[0]) == variable) {
423 return decodeURIComponent(pair[1]);
424 }
425 }
426 }
427
428 /**
429 * Get alerted when a group of jobs have been completed.
430 * Eg. .registerJob('job1'); .registerJob('job2');
431 * .onFinish(function(){ alert('Jobs finished!'); });
432 * .finishJob('job1');
433 * .finishJob('job2');
434 */
435 function JobManager() {
436 var completed_jobs = { };
437
438 // Functions to call once all jobs have completed
439 var completed_callbacks = [];
440
441
442 function callCompletedFunctions(fn) {
443 $.each(completed_callbacks, function(idx, fn) {
444 fn();
445 });
446
447 completed_callbacks = [];
448 };
449
450
451 this.finishJob = function(job_name) {
452 if (typeof completed_jobs[job_name] === 'undefined') {
453 return;
454 }
455
456 completed_jobs[job_name] = true;
457
458 // Check if all our jobs have completed
459 var all_jobs_completed = true;
460 $.each(completed_jobs, function(idx, completed) {
461 if (!completed) {
462 all_jobs_completed = false;
463 return false;
464 }
465 });
466
467 if (all_jobs_completed) {
468 callCompletedFunctions();
469 }
470 };
471
472
473 this.onFinish = function(fn) {
474 completed_callbacks.push(fn);
475 };
476
477
478 this.registerJob = function(job_name) {
479 completed_jobs[job_name] = false;
480 };
481 }
482
483 (function () {
484 var base_path = '<%base_path%>', // Entry path for the kiwi application
485 scripts = [],
486 opts = {
487 container: $('body'),
488 base_path: base_path,
489 settings_path: base_path + '/assets/settings.json'
490 };
491
492 normalizeConsole();
493
494 /**
495 * Job bootup manager
496 * Once all jobs have completed, call any registered completed functions
497 */
498 var jobs = new JobManager();
499
500
501 // Run after all dependancies have been loaded
502 jobs.onFinish(function startApp() {
503 // Kiwi IRC version this is built from
504 kiwi.build_version = '<%build_version%>';
505
506 // Start the app after loading plugins
507 kiwi.init(opts, function() {
508 if (opts.client_plugins && opts.client_plugins.length > 0) {
509
510 // Wait until all plugins are loaded before starting the app
511 kiwi.plugins.once('loaded', function() {
512 kiwi.start();
513 });
514
515 _.each(opts.client_plugins, function (plugin_url) {
516 kiwi.plugins.load(plugin_url);
517 });
518
519 } else {
520
521 // No plugins were needed so start the app
522 kiwi.start();
523 }
524 });
525 });
526
527
528 // Load each script
529 jobs.registerJob('load_scripts');
530 var cur_script = 0;
531 function loadNextScript () {
532 var to_load,
533 base = base_path + '/';
534
535 // Start the kiwi app if all scripts have been loaded
536 if (cur_script === scripts.length) {
537 jobs.finishJob('load_scripts');
538 return;
539 }
540
541 if (typeof scripts[cur_script] === 'string') {
542 to_load = base + scripts[cur_script];
543 } else {
544 to_load = [];
545 for(var idx in scripts[cur_script]) {
546 to_load.push(base + scripts[cur_script][idx]);
547 }
548 }
549
550 $script(to_load, loadNextScript);
551
552 cur_script++;
553 }
554
555 // If we're not interested in debug libs, start loading production files
556 if (!getQueryVariable('debug')) {
557 scripts.push(['assets/libs/lodash.min.js?t=<%build_time%>']);
558 scripts.push([
559 'assets/libs/backbone.min.js?t=<%build_time%>',
560 'assets/libs/jed.js?t=<%build_time%>'
561 ]);
562 scripts.push([
563 'assets/kiwi.min.js?t=<%build_time%>',
564 'assets/libs/engine.io.bundle.min.js?t=<%build_time%>'
565 ]);
566
567 loadNextScript();
568 }
569
570 // Load application settings
571 jobs.registerJob('load_settings');
572 $.getJSON(opts.settings_path, function (data) {
573 opts.server_settings = data.server_settings;
574 opts.client_plugins = data.client_plugins;
575 opts.translations = data.translations;
576 opts.locale = data.locale;
577 opts.themes = data.themes;
578
579 if (typeof data.kiwi_server !== 'undefined')
580 opts.kiwi_server = data.kiwi_server;
581
582 jobs.finishJob('load_settings');
583
584 // If debugging, grab the debug scripts and load them
585 if (getQueryVariable('debug')) {
586 scripts = scripts.concat(data.scripts);
587 loadNextScript();
588 }
589
590 // Load themes
591 if (opts.themes) {
592 $.each(opts.themes, function (theme_idx, theme) {
593 var disabled = (opts.server_settings.client.settings.theme.toLowerCase() !== theme.name.toLowerCase()),
594 rel = (disabled?'alternate ':'') + 'stylesheet' /*+ (disabled?' prefetch':'')*/;
595
596 var link = $.parseHTML('<link rel="' + rel + '" type="text/css" data-theme href="'+ opts.base_path + '/assets/themes/' + theme.name.toLowerCase() + '/style.css" title="' + theme.name.toLowerCase() + '" ' + (disabled?'disabled':'') + '/>');
597 link.disabled = disabled;
598
599 $(link).appendTo($('head'));
600 });
601 }
602 });
603
604 jobs.registerJob('window_load');
605 window.onload = function() {
606 jobs.finishJob('window_load');
607 };
608 })();
609 </script>
610 </body>
611 </html>