ed7684e01198ab76b896ba87040e56cc98fc8de8
[KiwiIRC.git] / client / assets / dev / 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 id="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 id="tabs"></div>
27
28 <div id="topic">
29 <div contenteditable="true"></div>
30 </div>
31
32 <div id="status_message"></div>
33 </div>
34
35 <div id="memberlists_resize_handle"></div>
36
37 <div id="panels">
38 <div class="panel_container container1"></div>
39 </div>
40
41 <div id="memberlists" class="disabled"></div>
42
43 <div id="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_server_select">
79 <div class="server_select">
80
81 <div class="server_details" style="position:relative;float:left;width:320px;padding-right:3em;margin-top:50px;">
82 <div class="status">Think of a nickname..</div>
83
84 <form>
85 <div class="basic">
86 <table>
87 <tr class="nick">
88 <td><label for="server_select_nick">Nickname</label></td>
89 <td><input type="text" class="nick" id="server_select_nick"></td>
90 </tr>
91
92 <tr class="have_pass">
93 <td colspan="2">
94 <label for="server_select_show_pass">I have a password</label> <input type="checkbox" id="server_select_show_pass" style="width:auto;" />
95 </td>
96 </tr>
97
98 <tr class="pass">
99 <td><label for="server_select_password">Password</label></td>
100 <td><input type="password" class="password" id="server_select_password"></td>
101 </tr>
102
103 <tr class="channel">
104 <td><label for="server_select_channel">Channel</label></td>
105 <td><input type="text" class="channel" id="server_select_channel"><input type="hidden" class="channel_key"></td>
106 </tr>
107
108 <tr class="start">
109 <td colspan="2"><button type="submit">Start..</button></td>
110 </tr>
111 </table>
112
113 <a href="" onclick="return false;" class="show_more">Server and network</a>
114 </div>
115
116
117 <div class="more">
118 <table>
119 <tr class="server">
120 <td><label for="server_select_server">Server</label></td>
121 <td><input type="text" class="server" id="server_select_server"></td>
122 <tr>
123
124 <tr class="port">
125 <td><label for="server_select_port">Port</label></td>
126 <td><input type="text" class="port" id="server_select_port"></td>
127 </tr>
128
129 <tr class="ssl">
130 <td><label for="server_select_ssl">SSL</label></td>
131 <td><input type="checkbox" class="ssl" id="server_select_ssl"></td>
132 </tr>
133 </table>
134 </div>
135 </form>
136
137 <a class="kiwi_logo" href="https://kiwiirc.com/" target="_blank">
138 <h1><span>Powered by Kiwi IRC</span> <img src="/kiwi/assets/img/ico.png" alt="KiwiIRC Logo" title="Kiwi IRC" /></h1>
139 </a>
140 </div>
141 </div>
142 </script>
143
144 <script type="text/html" id="tmpl_applet_settings">
145 <div class="settings">
146 ​<table>
147 <tr>
148 <td class="label">Theme</td>
149 <td class="setting">
150 <select class="setting-theme">
151 <option value="relaxed">Relaxed</option>
152 <option value="mini">Mini</option>
153 <option value="cli">CLI</option>
154 <option value="basic">Basic</option>
155 </select>
156 </td>
157 </tr>
158 <tr>
159 <td class="label">Channel list</td>
160 <td class="setting">
161 <select class="setting-channel_list_style">
162 <option value="list">List</option>
163 <option value="tabs">Tabs</option>
164 </select>
165
166 <i style="font-size:0.9em;">Lots of channels? `List` may be more suited</i>
167 </td>
168 </tr>
169 <tr>
170 <td class="label">Scrollback</td>
171 <td class="setting"><input type="text" class="setting-scrollback" value="150" /></td>
172 </tr>
173
174 <tr>
175 <td class="label">Show joins/parts</td>
176 <td class="setting"><input type="checkbox" class="setting-show_joins_parts" /></td>
177 </tr>
178
179 <tr>
180 <td class="label">Show timestamps</td>
181 <td class="setting"><input type="checkbox" class="setting-show_timestamps" /></td>
182 </tr>
183
184 <tr>
185 <td class="label">Mute sounds</td>
186 <td class="setting"><input type="checkbox" class="setting-mute_sounds" /></td>
187 </tr>
188
189 <tr class="save">
190 <td colspan="2"><button class="save">Save</button><br/><span class="feedback">Saved!</span></td>
191 </tr>
192 </table>
193 </div>
194 </script>
195
196
197 <script type="text/html" id="tmpl_channel_list">
198 <div>
199 <table style="margin:1em 2em;">
200 <thead style="font-weight: bold;">
201 <tr>
202 <td>Channel Name</td>
203 <td>Users</td>
204 <td style="padding-left: 2em;">Topic</td>
205 </tr>
206 </thead>
207 <tbody style="vertical-align: top;">
208 </tbody>
209 </table>
210 </div>
211 </script>
212
213
214 <script type="text/html" id="tmpl_script_editor">
215 <div style="height:100%;">
216 <style>
217 #kiwi .script_editor .toolbar { padding: 10px 20px; }
218 #kiwi .script_editor .toolbar span.status { margin-left:2em; font-style:italic; }
219 #kiwi .script_editor .toolbar button { height:30px; padding:0 1em; }
220 #kiwi .script_editor .toolbar button i { font-size:1.2em; margin-left:3px; }
221 </style>
222 <div class="script_editor" style="height:100%; position:relative;">
223 <div class="toolbar"><button class="btn_save">Save <i class="icon-save"></i></button><span class="status"></span></div>
224 <div class="editor" style="position:absolute;top:50px;bottom:0px;left:0px;right:0px;"></div>
225 </div>
226 </div>
227 </script>
228
229
230 <script>
231 /* Script loader (https://github.com/ded/script.js) */
232 (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)
233
234
235
236
237 function getQueryVariable(variable) {
238 var query = window.location.search.substring(1);
239 var vars = query.split('&');
240 for (var i = 0; i < vars.length; i++) {
241 var pair = vars[i].split('=');
242 if (decodeURIComponent(pair[0]) == variable) {
243 return decodeURIComponent(pair[1]);
244 }
245 }
246 }
247
248 window.onload = function () {
249
250 // Common dependancies that are required at all times
251 var scripts = [
252 ['jquery-1.8.2.min.js', 'lodash.min.js'],
253 'backbone.min.js'
254 ];
255
256 // If in debug mode, load each development script
257 if (getQueryVariable('debug')) {
258 console.log('Loading debugging scripts');
259 scripts = scripts.concat([
260 'dev/app.js',
261 [
262 'dev/model_application.js',
263 'dev/model_gateway.js'
264 ],
265 [
266 'dev/model_newconnection.js',
267 'dev/model_panellist.js',
268 'dev/model_networkpanellist.js',
269 'dev/model_panel.js',
270 'dev/model_member.js',
271 'dev/model_memberlist.js',
272 'dev/model_network.js'
273 ],
274
275 [
276 'dev/model_query.js',
277 'dev/model_channel.js',
278 'dev/model_server.js',
279 'dev/model_applet.js'
280 ],
281
282 [
283 'dev/applet_settings.js',
284 'dev/applet_nickserv.js',
285 'dev/applet_chanlist.js',
286 'dev/applet_scripteditor.js'
287 ],
288
289 [
290 'dev/model_pluginmanager.js',
291 'dev/model_datastore.js',
292 'dev/utils.js',
293 'dev/view.js'
294 ]
295 ]);
296 } else {
297 scripts.push('kiwi.min.js?<%cache_buster%>');
298 }
299
300
301 // Run after all dependancies have been loaded
302 function startApp () {
303 var opts = {
304 container: $('#kiwi'),
305 base_path: base_path,
306
307 // Override the kiwi_server to use. (Think: running on standalone client..)
308 //kiwi_server: 'http://kiwiirc.com:80',
309
310 server_settings: <%server_settings%>,
311 client_plugins: <%client_plugins%>
312 };
313
314 // Start the app
315 kiwi.start(opts);
316
317 // Load any plugins
318 if (opts.client_plugins && opts.client_plugins.length > 0) {
319 _.each(opts.client_plugins, function (plugin_url) {
320 kiwi.plugins.load(plugin_url);
321 });
322 }
323 }
324
325
326 // Load each script
327 var cur_script = 0;
328 function loadNextScript () {
329 var to_load,
330 base = base_path + '/assets/';
331
332 // Start the kiwi app if all scripts have been loaded
333 if (cur_script === scripts.length) {
334 startApp();
335 return;
336 }
337
338 if (typeof scripts[cur_script] === 'string') {
339 to_load = base + scripts[cur_script];
340 } else {
341 to_load = [];
342 for(var idx in scripts[cur_script]) {
343 to_load.push(base + scripts[cur_script][idx]);
344 }
345 }
346
347 $script(to_load, loadNextScript);
348
349 cur_script++;
350 }
351
352 // Entry path for the kiwi application
353 var base_path = '<%base_path%>';
354
355 // Start loading scripts
356 loadNextScript();
357 };
358 </script>
359 </body>
360 </html>