Merge branch 'backbone_ui' of github.com:prawnsalad/KiwiIRC into backbone_ui
[KiwiIRC.git] / client_backbone / index.html
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
5
6 <title> KiwiIRC </title>
7
8 <link rel="stylesheet" type="text/css" href="css/style.css" />
9
10 </head>
11 <body>
12 <div id="kiwi">
13 <div id="toolbar">
14 <div id="tabs">
15 <ul class="panellist channels"></ul>
16 <ul class="panellist applets"></ul>
17 </div>
18
19 <div id="topic">
20 <input type="text" />
21 </div>
22
23 <div id="status_message"></div>
24 </div>
25
26 <div id="panels">
27 <div class="panel_container container1"></div>
28 </div>
29
30 <div id="memberlists"></div>
31
32 <div id="controlbox">
33 <div class="input">
34 <span class="nick"> </span>
35 <div class="input_wrap"><input type="text" class="inp" /></div>
36 </div>
37 </div>
38 </div>
39
40 <script type="text/x-jquery-tmpl" id="tmpl_userbox">
41 <div class="userbox">
42 <a class="query">Message</a>
43 <a class="info">Info</a>
44 </div>
45 </script>
46
47 <script type="text/x-jquery-tmpl" id="tmpl_nickchange">
48 <div class="nickchange">
49 <label for="nickchange">New nick:</label> <input id="nickchange" type="text" mozactionhint="done" autocomplete="off" spellcheck="false"/> <input type="button" class="btn_nickchange" value="Change Nick" />
50 </div>
51 </script>
52
53 <script type="text/x-jquery-tmpl" id="tmpl_server_select">
54 <div class="server_select">
55 <div class="status"></div>
56
57 <form>
58 <div class="basic">
59 <label for="server_select_nick">Nickname</label>
60 <input type="text" class="nick" id="server_select_nick"> <br />
61
62 <button type="submit">Connect..</button> <br />
63 <a class="show_more">More</a>
64 </div>
65
66 <div class="more">
67 <label for="server_select_server">Server</label>
68 <input type="text" class="server" id="server_select_server"> <br />
69 <label for="server_select_channel">Channel</label>
70 <input type="text" class="channel" id="server_select_channel"> <br />
71 <br />
72 <label for="server_select_port">Port</label>
73 <input type="text" class="port" id="server_select_port"> <br />
74 <label for="server_select_password">Password</label>
75 <input type="text" class="password" id="server_select_password"> <br />
76 <label for="server_select_ssl">SSL</label>
77 <input type="checkbox" class="ssl" id="server_select_ssl">
78 </div>
79 </form>
80 </div>
81 </script>
82
83 <script type="text/x-jquery-tmpl" id="tmpl_applet_settings">
84 <div>
85 <select class="theme">
86 <option value="default">Default</option>
87 <option value="relaxed">Relaxed</option>
88 <option value="cli">CLI</option>
89 </select>
90 <button class="save">Save</button>
91 </div>
92 </script>
93
94
95 <script type="text/x=x-jquery-tmpl" id="tmpl_channel_list">
96 <table style="margin:1em 2em;">
97 <thead style="font-weight: bold;">
98 <tr>
99 <td>Channel Name</td>
100 <td>Users</td>
101 <td style="padding-left: 2em;">Topic</td>
102 </tr>
103 </thead>
104 <tbody style="vertical-align: top;">
105 </tbody>
106 </table>
107 </script>
108
109
110 <script>
111 /* Script loader (https://github.com/ded/script.js) */
112 (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)
113
114
115
116
117 function getQueryVariable(variable) {
118 var query = window.location.search.substring(1);
119 var vars = query.split('&');
120 for (var i = 0; i < vars.length; i++) {
121 var pair = vars[i].split('=');
122 if (decodeURIComponent(pair[0]) == variable) {
123 return decodeURIComponent(pair[1]);
124 }
125 }
126 }
127
128 window.onload = function () {
129
130 // Common dependancies that are required at all times
131 var scripts = [
132 ['jquery-1.7.1.min.js', 'underscore-min.js'],
133 'backbone-git.js'
134 ];
135
136 // If in debug mode, load each development script
137 if (getQueryVariable('debug')) {
138 console.log('Loading debugging scripts');
139 scripts = scripts.concat([
140 'dev/app.js',
141 [
142 'dev/model_application.js',
143 'dev/model_gateway.js'
144 ],
145 [
146 'dev/model_panellist.js',
147 'dev/model_panel.js',
148 'dev/model_member.js',
149 'dev/model_memberlist.js'
150 ],
151
152 [
153 'dev/model_channel.js',
154 'dev/model_server.js',
155 'dev/model_applet.js'
156 ],
157
158 [
159 'dev/applet_settings.js',
160 'dev/applet_nickserv.js'
161 ],
162
163 [
164 'dev/utils.js',
165 'dev/view.js'
166 ]
167 ]);
168 } else {
169 scripts.push('kiwi.js');
170 }
171
172
173 // Run after all dependancies have been loaded
174 function startApp () {
175 var opts = {
176 container: $('#kiwi'),
177
178 // Override the kiwi_server to use. (Think: running on standalone client..)
179 //kiwi_server: 'http://kiwiirc.com:80'
180 };
181
182 // Start the app by either the dev or closed environment
183 (kiwi && kiwi.global && kiwi.global.start(opts)) || (kiwi && kiwi.start(opts));
184 }
185
186
187 // Load each script
188 var cur_script = 0;
189 function loadNextScript () {
190 // Start the kiwi app if all scripts have been loaded
191 if (cur_script === scripts.length) {
192 startApp();
193 return;
194 }
195
196 $script(scripts[cur_script], loadNextScript);
197
198 cur_script++;
199 }
200
201 // Start loading scripts
202 loadNextScript();
203 };
204 </script>
205 </body>
206 </html>