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