Merge branch 'development'
[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.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="http://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>
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="query"><i class="icon-comment"></i>Message</a>
62 <a class="info"><i class="icon-info-sign"></i>Info</a>
63 <a class="slap"><i class="icon-user-md"></i>Slap!</a>
64
65 <div class="divider-horizontal"></div>
66 </div>
67 </script>
68
69 <script type="text/html" id="tmpl_nickchange">
70 <form class="nickchange">
71 <label for="nickchange">New nick:</label> <input type="text" mozactionhint="done" autocomplete="off" spellcheck="false"/> <button>Change</button> <a class="cancel">Cancel</a>
72 </form>
73 </script>
74
75 <script type="text/html" id="tmpl_server_select">
76 <div class="server_select">
77
78 <div class="server_details" style="position:relative;float:left;width:320px;padding-right:3em;margin-top:50px;">
79 <div class="status">Think of a nickname..</div>
80
81 <form>
82 <div class="basic">
83 <table>
84 <tr class="nick">
85 <td><label for="server_select_nick">Nickname</label></td>
86 <td><input type="text" class="nick" id="server_select_nick"></td>
87 </tr>
88
89 <tr class="have_pass">
90 <td colspan="2">
91 <label for="server_select_show_pass">I have a password</label> <input type="checkbox" id="server_select_show_pass" style="width:auto;" />
92 </td>
93 </tr>
94
95 <tr class="pass">
96 <td><label for="server_select_password">Password</label></td>
97 <td><input type="password" class="password" id="server_select_password"></td>
98 </tr>
99
100 <tr class="channel">
101 <td><label for="server_select_channel">Channel</label></td>
102 <td><input type="text" class="channel" id="server_select_channel"><input type="hidden" class="channel_key"></td>
103 </tr>
104
105 <tr class="start">
106 <td colspan="2"><button type="submit">Start..</button></td>
107 </tr>
108 </table>
109
110 <a href="" onclick="return false;" class="show_more">Server and network</a>
111 </div>
112
113
114 <div class="more">
115 <table>
116 <tr class="server">
117 <td><label for="server_select_server">Server</label></td>
118 <td><input type="text" class="server" id="server_select_server"></td>
119 <tr>
120
121 <tr class="port">
122 <td><label for="server_select_port">Port</label></td>
123 <td><input type="text" class="port" id="server_select_port"></td>
124 </tr>
125
126 <tr class="ssl">
127 <td><label for="server_select_ssl">SSL</label></td>
128 <td><input type="checkbox" class="ssl" id="server_select_ssl"></td>
129 </tr>
130 </table>
131 </div>
132 </form>
133
134 <div class="divider-verticle"></div>
135 </div>
136
137 <div class="about_kiwi" style="position:relative;float:left;width:320px;margin-left:3em;color:#555555;">
138 <a class="kiwi_logo" href="http://www.kiwiirc.com/" target="_blank">
139 <img src="<%base_path%>/assets/img/ico.png" alt="KiwiIRC Logo" title="Kiwi IRC" /> <br />
140 <h1>Powered by Kiwi IRC</h1>
141 </a>
142
143 <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>
144
145 <p style="font-size:0.9em;margin-top:2em;">Peek at the <a href="http://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>
146 </div>
147 </div>
148 </script>
149
150 <script type="text/html" id="tmpl_applet_settings">
151 <div class="settings">
152 ​<table>
153 <tr>
154 <td>Theme</td>
155 <td>
156 <select class="setting-theme">
157 <option value="relaxed">Relaxed</option>
158 <option value="mini">Mini</option>
159 <option value="cli">CLI</option>
160 </select>
161 </td>
162 </tr>
163 <tr>
164 <td>Scrollback</td>
165 <td><input type="text" class="setting-scrollback" value="150" /></td>
166 </tr>
167
168 <tr>
169 <td>Show joins/parts</td>
170 <td><input type="checkbox" class="setting-show_joins_parts" /></td>
171 </tr>
172 </table>
173
174 <button class="save">Save</button>​​​​​​​​​
175 </div>
176 </script>
177
178
179 <script type="text/html" id="tmpl_channel_list">
180 <div>
181 <table style="margin:1em 2em;">
182 <thead style="font-weight: bold;">
183 <tr>
184 <td>Channel Name</td>
185 <td>Users</td>
186 <td style="padding-left: 2em;">Topic</td>
187 </tr>
188 </thead>
189 <tbody style="vertical-align: top;">
190 </tbody>
191 </table>
192 </div>
193 </script>
194
195
196 <script>
197 /* Script loader (https://github.com/ded/script.js) */
198 (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)
199
200
201
202
203 function getQueryVariable(variable) {
204 var query = window.location.search.substring(1);
205 var vars = query.split('&');
206 for (var i = 0; i < vars.length; i++) {
207 var pair = vars[i].split('=');
208 if (decodeURIComponent(pair[0]) == variable) {
209 return decodeURIComponent(pair[1]);
210 }
211 }
212 }
213
214 window.onload = function () {
215
216 // Common dependancies that are required at all times
217 var scripts = [
218 ['jquery-1.8.2.min.js', 'lodash.min.js'],
219 'backbone.min.js'
220 ];
221
222 // If in debug mode, load each development script
223 if (getQueryVariable('debug')) {
224 console.log('Loading debugging scripts');
225 scripts = scripts.concat([
226 'dev/app.js',
227 [
228 'dev/model_application.js',
229 'dev/model_gateway.js'
230 ],
231 [
232 'dev/model_panellist.js',
233 'dev/model_panel.js',
234 'dev/model_member.js',
235 'dev/model_memberlist.js'
236 ],
237
238 [
239 'dev/model_query.js',
240 'dev/model_channel.js',
241 'dev/model_server.js',
242 'dev/model_applet.js'
243 ],
244
245 [
246 'dev/applet_settings.js',
247 'dev/applet_nickserv.js',
248 'dev/applet_chanlist.js'
249 ],
250
251 [
252 'dev/model_pluginmanager.js',
253 'dev/model_datastore.js',
254 'dev/utils.js',
255 'dev/view.js'
256 ]
257 ]);
258 } else {
259 scripts.push('kiwi.min.js?<%cache_buster%>');
260 }
261
262
263 // Run after all dependancies have been loaded
264 function startApp () {
265 var opts = {
266 container: $('#kiwi'),
267 base_path: base_path,
268
269 // Override the kiwi_server to use. (Think: running on standalone client..)
270 //kiwi_server: 'http://kiwiirc.com:80',
271
272 server_settings: <%server_settings%>,
273 client_plugins: <%client_plugins%>
274 };
275
276 // Start the app
277 kiwi.start(opts);
278
279 // Load any plugins
280 if (opts.client_plugins && opts.client_plugins.length > 0) {
281 _.each(opts.client_plugins, function (plugin_url) {
282 kiwi.plugins.load(plugin_url);
283 });
284 }
285 }
286
287
288 // Load each script
289 var cur_script = 0;
290 function loadNextScript () {
291 var to_load,
292 base = base_path + '/assets/';
293
294 // Start the kiwi app if all scripts have been loaded
295 if (cur_script === scripts.length) {
296 startApp();
297 return;
298 }
299
300 if (typeof scripts[cur_script] === 'string') {
301 to_load = base + scripts[cur_script];
302 } else {
303 to_load = [];
304 for(var idx in scripts[cur_script]) {
305 to_load.push(base + scripts[cur_script][idx]);
306 }
307 }
308
309 $script(to_load, loadNextScript);
310
311 cur_script++;
312 }
313
314 // Entry path for the kiwi application
315 var base_path = '<%base_path%>';
316
317 // Start loading scripts
318 loadNextScript();
319 };
320 </script>
321 </body>
322 </html>