Merge pull request #315 from happytodesign/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="stylesheet" type="text/css" href="<%base_path%>/assets/css/style.css" />
11 <link rel="stylesheet" type="text/css" href="<%base_path%>/assets/css/font-awesome.min.css" />
12 <!--[if IE 7]>
13 <link rel="stylesheet" type="text/css" href="/kiwi/assets/css/font-awesome-ie7.css" />
14 <![endif]-->
15 </head>
16 <body>
17 <div id="kiwi" class="theme_relaxed">
18 <div class="toolbar">
19 <div class="app_tools">
20 <ul class="main">
21 <li class="settings"><i class="icon-cogs" title="Settings"></i></li>
22 <li><a href="https://kiwiirc.com/" target="_blank"><img src="<%base_path%>/assets/img/ico.png" alt="KiwiIRC" title="KiwiIRC" /></a></li>
23 </ul>
24 </div>
25
26 <div class="tabs"></div>
27
28 <div class="topic">
29 <div contenteditable="true"></div>
30 </div>
31
32 <div class="status_message"></div>
33 </div>
34
35 <div class="memberlists_resize_handle"></div>
36
37 <div class="panels">
38 <div class="panel_container container1"></div>
39 </div>
40
41 <div class="memberlists disabled"></div>
42
43 <div class="controlbox">
44 <div class="input">
45 <span class="nick"> </span>
46 <div class="input_wrap"><textarea class="inp"></textarea></div>
47 <div class="input_tools"></div>
48 </div>
49 </div>
50 </div>
51
52
53
54
55
56
57 <script type="text/html" id="tmpl_userbox">
58 <div class="userbox">
59 <a class="if_op op"><i class="icon-star"></i>Op</a>
60 <a class="if_op deop"><i class="icon-star-empty"></i>De-op</a>
61 <a class="if_op voice"><i class="icon-volume-up"></i>Voice</a>
62 <a class="if_op devoice"><i class="icon-volume-off"></i>De-voice</a>
63 <a class="if_op kick"><i class="icon-remove"></i>Kick</a>
64 <a class="if_op ban"><i class="icon-ban-circle"></i>Ban</a>
65
66 <a class="query"><i class="icon-comment"></i>Message</a>
67 <a class="info"><i class="icon-info-sign"></i>Info</a>
68 <a class="slap"><i class="icon-user-md"></i>Slap!</a>
69 </div>
70 </script>
71
72 <script type="text/html" id="tmpl_nickchange">
73 <form class="nickchange">
74 <label for="nickchange">New nick:</label> <input type="text" mozactionhint="done" autocomplete="off" spellcheck="false"/> <button>Change</button> <a class="cancel">Cancel</a>
75 </form>
76 </script>
77
78 <script type="text/html" id="tmpl_new_connection_info">
79 <div style="margin:1em 20px;">
80 <img src="https://kiwiirc.com/img/ico.png" alt="KiwiIRC Logo" title="Kiwi IRC" style="display:block; margin:0 auto;"/> <br />
81 <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>
82
83 <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>
84 </div>
85 </script>
86
87 <script type="text/html" id="tmpl_server_select">
88 <div class="server_select">
89
90 <div class="side_panel" style="position:absolute;top:0px;left:320px;">
91 <div class="content" style="position:relative;width:300px;">
92 </div>
93 </div>
94
95 <div class="server_details" style="position:relative;width:320px;">
96 <div class="status">Think of a nickname..</div>
97
98 <form>
99 <div class="basic">
100 <table>
101 <tr class="nick">
102 <td><label for="server_select_nick">Nickname</label></td>
103 <td><input type="text" class="nick" id="server_select_nick"></td>
104 </tr>
105
106 <tr class="have_pass">
107 <td colspan="2">
108 <label for="server_select_show_pass">I have a password</label> <input type="checkbox" id="server_select_show_pass" style="width:auto;" />
109 </td>
110 </tr>
111
112 <tr class="pass">
113 <td><label for="server_select_password">Password</label></td>
114 <td><input type="password" class="password" id="server_select_password"></td>
115 </tr>
116
117 <tr class="channel">
118 <td><label for="server_select_channel">Channel</label></td>
119 <td>
120 <div style="position:relative;">
121 <input type="text" class="channel" id="server_select_channel">
122 <i class="icon-key" title="Channel Key"></i>
123 </div>
124 </td>
125 </tr>
126
127 <tr class="have_key">
128 <td colspan="2">
129 <label for="server_select_show_channel_key">Channel requires a key</label> <input type="checkbox" id="server_select_show_channel_key" style="width:auto;" />
130 </td>
131 </tr>
132
133 <tr class="key">
134 <td><label for="server_select_channel_key">Key</label></td>
135 <td><input type="password" class="channel_key" id="server_select_channel_key"></td>
136 </tr>
137
138 <tr class="start">
139 <td colspan="2"><button type="submit">Start..</button></td>
140 </tr>
141 </table>
142
143 <a href="" onclick="return false;" class="show_more">Server and network</a>
144 </div>
145
146
147 <div class="more">
148 <table>
149 <tr class="server">
150 <td><label for="server_select_server">Server</label></td>
151 <td><input type="text" class="server" id="server_select_server"></td>
152 <tr>
153
154 <tr class="port">
155 <td><label for="server_select_port">Port</label></td>
156 <td><input type="text" class="port" id="server_select_port"></td>
157 </tr>
158
159 <tr class="ssl">
160 <td><label for="server_select_ssl">SSL</label></td>
161 <td><input type="checkbox" class="ssl" id="server_select_ssl"></td>
162 </tr>
163 </table>
164 </div>
165 </form>
166
167 <a class="kiwi_logo" href="https://kiwiirc.com/" target="_blank">
168 <h1><span>Powered by Kiwi IRC</span> <img src="<%base_path%>/assets/img/ico.png" alt="KiwiIRC Logo" title="Kiwi IRC" /></h1>
169 </a>
170 </div>
171 </div>
172 </script>
173
174 <script type="text/html" id="tmpl_applet_settings">
175 <div class="settings_container">
176 <section>
177 <h6>Theme</h6>
178 <div class="control-group">
179 <div class="thumbnails">
180 <a class="thumbnail" data-setting="theme" data-value="relaxed" href="#">
181 <div class="thumbnail_wrapper"><div class="theme_color" style="background-color: #e7e7e7;"></div></div>
182 <div class="caption"><u>Relaxed</u></div>
183 </a>
184 <a class="thumbnail" data-setting="theme" data-value="mini" href="#">
185 <div class="thumbnail_wrapper"><div class="theme_color" style="background-color: #fff;"></div></div>
186 <div class="caption"><u>Mini</u></div>
187 </a>
188 <a class="thumbnail" data-setting="theme" data-value="cli" href="#">
189 <div class="thumbnail_wrapper"><div class="theme_color" style="background-color: #222;"></div></div>
190 <div class="caption"><u>CLI</u></div>
191 </a>
192 <a class="thumbnail" data-setting="theme" data-value="basic" href="#">
193 <div class="thumbnail_wrapper"><div class="theme_color" style="background-color: #e7e7e7;"></div></div>
194 <div class="caption"><u>Basic</u></div>
195 </a>
196 </div>
197 </div>
198 </section>
199
200 <section>
201 <h6>Channels</h6>
202 <div class="control-group">
203 <div class="radio">
204 <label>
205 <input type="radio" name="channel_list_style" data-setting="channel_list_style" value="tabs">
206 Tabs
207 </label>
208 </div>
209 <div class="radio">
210 <label>
211 <input type="radio" name="channel_list_style" data-setting="channel_list_style" value="list">
212 List <small class="text-muted">(for large amouts of channels)</small>
213 </label>
214 </div>
215 </div>
216 </section>
217
218 <section>
219 <h6>Chat window</h6>
220 <div class="control-group">
221 <div class="checkbox">
222 <label>
223 <input data-setting="show_joins_parts" type="checkbox">
224 Join/part channel notifications
225 </label>
226 </div>
227 <div class="checkbox">
228 <label>
229 <input data-setting="show_timestamps" type="checkbox">
230 Timestamps
231 </label>
232 </div>
233 <div class="checkbox">
234 <label>
235 <input data-setting="mute_sounds" type="checkbox">
236 Mute sound notifications
237 </label>
238 </div>
239 <label>
240 <input data-setting="scrollback" class="input-small" type="text" size="4" pattern="\d*">
241 <span>messages in scroll history</span>
242 </label>
243 </div>
244 </section>
245 </div>
246 </script>
247
248
249 <script type="text/html" id="tmpl_channel_list">
250 <div>
251 <table style="margin:1em 2em;">
252 <thead style="font-weight: bold;">
253 <tr>
254 <td>Channel Name</td>
255 <td>Users</td>
256 <td style="padding-left: 2em;">Topic</td>
257 </tr>
258 </thead>
259 <tbody style="vertical-align: top;">
260 </tbody>
261 </table>
262 </div>
263 </script>
264
265
266 <script type="text/html" id="tmpl_script_editor">
267 <div style="height:100%;">
268 <style>
269 #kiwi .script_editor .se_toolbar { padding: 10px 20px; }
270 #kiwi .script_editor .se_toolbar span.status { margin-left:2em; font-style:italic; }
271 #kiwi .script_editor .se_toolbar button { height:30px; padding:0 1em; }
272 #kiwi .script_editor .se_toolbar button i { font-size:1.2em; margin-left:3px; }
273 </style>
274 <div class="script_editor" style="height:100%; position:relative;">
275 <div class="se_toolbar"><button class="btn_save">Save <i class="icon-save"></i></button><span class="status"></span></div>
276 <div class="editor" style="position:absolute;top:50px;bottom:0px;left:0px;right:0px;"></div>
277 </div>
278 </div>
279 </script>
280
281
282 <script>
283 /* Script loader (https://github.com/ded/script.js) */
284 (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)
285
286
287
288
289 function getQueryVariable(variable) {
290 var query = window.location.search.substring(1);
291 var vars = query.split('&');
292 for (var i = 0; i < vars.length; i++) {
293 var pair = vars[i].split('=');
294 if (decodeURIComponent(pair[0]) == variable) {
295 return decodeURIComponent(pair[1]);
296 }
297 }
298 }
299
300 window.onload = function () {
301
302 // Common dependancies that are required at all times
303 var scripts = [
304 ['libs/jquery-1.9.1.min.js', 'libs/lodash.min.js'],
305 'libs/backbone.min.js'
306 ];
307
308 // If in debug mode, load each development script
309 if (getQueryVariable('debug')) {
310 console.log('Loading debugging scripts');
311 scripts = scripts.concat([
312 'src/app.js',
313 [
314 'src/models/application.js',
315 'src/models/gateway.js'
316 ],
317 [
318 'src/models/newconnection.js',
319 'src/models/panellist.js',
320 'src/models/networkpanellist.js',
321 'src/models/panel.js',
322 'src/models/member.js',
323 'src/models/memberlist.js',
324 'src/models/network.js'
325 ],
326
327 [
328 'src/models/query.js',
329 'src/models/channel.js',
330 'src/models/server.js',
331 'src/models/applet.js'
332 ],
333
334 [
335 'src/applets/settings.js',
336 'src/applets/chanlist.js',
337 'src/applets/scripteditor.js'
338 ],
339
340 [
341 'src/models/pluginmanager.js',
342 'src/models/datastore.js',
343 'src/helpers/utils.js'
344 ],
345
346 // Some views extend these, so make sure they're loaded beforehand
347 [
348 'src/views/panel.js'
349 ],
350
351 [
352 'src/views/channel.js',
353 'src/views/applet.js',
354 'src/views/application.js',
355 'src/views/apptoolbar.js',
356 'src/views/controlbox.js',
357 'src/views/mediamessage.js',
358 'src/views/member.js',
359 'src/views/memberlist.js',
360 'src/views/menubox.js',
361 'src/views/networktabs.js',
362 'src/views/nickchangebox.js',
363 'src/views/resizehandler.js',
364 'src/views/serverselect.js',
365 'src/views/statusmessage.js',
366 'src/views/tabs.js',
367 'src/views/topicbar.js',
368 'src/views/userbox.js'
369 ]
370 ]);
371 } else {
372 scripts.push('kiwi.min.js?<%cache_buster%>');
373 }
374
375
376 // Run after all dependancies have been loaded
377 function startApp () {
378 var opts = {
379 container: $('#kiwi'),
380 base_path: base_path,
381
382 // Override the kiwi_server to use. (Think: running on standalone client..)
383 //kiwi_server: 'http://kiwiirc.com:80',
384
385 server_settings: <%server_settings%>,
386 client_plugins: <%client_plugins%>
387 };
388
389 // Start the app
390 kiwi.start(opts);
391
392 // Load any plugins
393 if (opts.client_plugins && opts.client_plugins.length > 0) {
394 _.each(opts.client_plugins, function (plugin_url) {
395 kiwi.plugins.load(plugin_url);
396 });
397 }
398 }
399
400
401 // Load each script
402 var cur_script = 0;
403 function loadNextScript () {
404 var to_load,
405 base = base_path + '/assets/';
406
407 // Start the kiwi app if all scripts have been loaded
408 if (cur_script === scripts.length) {
409 startApp();
410 return;
411 }
412
413 if (typeof scripts[cur_script] === 'string') {
414 to_load = base + scripts[cur_script];
415 } else {
416 to_load = [];
417 for(var idx in scripts[cur_script]) {
418 to_load.push(base + scripts[cur_script][idx]);
419 }
420 }
421
422 $script(to_load, loadNextScript);
423
424 cur_script++;
425 }
426
427 // Entry path for the kiwi application
428 var base_path = '<%base_path%>';
429
430 // Start loading scripts
431 loadNextScript();
432 };
433 </script>
434 </body>
435 </html>