Commit | Line | Data |
---|---|---|
c4fc06f6 | 1 | <!DOCTYPE html> |
2dd6a025 D |
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="style.css" /> | |
9 | ||
10 | </head> | |
11 | <body> | |
12 | <div id="kiwi"> | |
13 | <div id="toolbar"> | |
df7b7bf8 D |
14 | <div id="tabs"> |
15 | <ul class="panellist channels"></ul> | |
19cc6364 | 16 | <ul class="panellist applets"></ul> |
df7b7bf8 | 17 | </div> |
2dd6a025 D |
18 | |
19 | <div id="topic"> | |
20 | <input type="text" /> | |
21 | </div> | |
f8ce99b4 D |
22 | |
23 | <div id="status_message"></div> | |
2dd6a025 D |
24 | </div> |
25 | ||
26 | <div id="panels"> | |
0caf7aa7 | 27 | <div class="panel_container container1"></div> |
2dd6a025 D |
28 | </div> |
29 | ||
30 | <div id="memberlists"></div> | |
31 | ||
32 | <div id="controlbox"> | |
33 | <div class="input"> | |
34 | <span class="nick"> </span> | |
5237492b | 35 | <div class="input_wrap"><input type="text" class="inp" /></div> |
2dd6a025 D |
36 | </div> |
37 | </div> | |
38 | </div> | |
39 | ||
75f48c13 D |
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 | ||
2af70088 D |
47 | <script type="text/x-jquery-tmpl" id="tmpl_server_select"> |
48 | <div class="server_select"> | |
d94f220d D |
49 | <div class="status"></div> |
50 | ||
2af70088 D |
51 | <form> |
52 | <div class="basic"> | |
53 | <label for="server_select_nick">Nickname</label> | |
54 | <input type="text" class="nick" id="server_select_nick"> <br /> | |
55 | ||
d94f220d | 56 | <button type="submit">Connect..</button> <br /> |
2af70088 D |
57 | <a class="show_more">More</a> |
58 | </div> | |
59 | ||
60 | <div class="more"> | |
61 | <label for="server_select_server">Server</label> | |
62 | <input type="text" class="server" id="server_select_server"> <br /> | |
63 | <label for="server_select_channel">Channel</label> | |
64 | <input type="text" class="channel" id="server_select_channel"> <br /> | |
0f3d4221 D |
65 | <br /> |
66 | <label for="server_select_port">Port</label> | |
67 | <input type="text" class="port" id="server_select_port"> <br /> | |
68 | <label for="server_select_password">Password</label> | |
69 | <input type="text" class="password" id="server_select_password"> <br /> | |
70 | <label for="server_select_ssl">SSL</label> | |
71 | <input type="checkbox" class="ssl" id="server_select_ssl"> | |
2af70088 D |
72 | </div> |
73 | </form> | |
74 | </div> | |
75 | </script> | |
76 | ||
19cc6364 D |
77 | <script type="text/x-jquery-tmpl" id="tmpl_applet_settings"> |
78 | <div> | |
79 | <select class="theme"> | |
80 | <option value="default">Default</option> | |
81 | <option value="relaxed">Relaxed</option> | |
82 | </select> | |
83 | <button class="save">Save</button> | |
84 | </div> | |
85 | </script> | |
86 | ||
c4fc06f6 | 87 | |
2dd6a025 | 88 | <script> |
c4fc06f6 D |
89 | /* Script loader (https://github.com/ded/script.js) */ |
90 | (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) | |
91 | ||
92 | ||
23533845 | 93 | |
a37b761a | 94 | |
23533845 D |
95 | function getQueryVariable(variable) { |
96 | var query = window.location.search.substring(1); | |
97 | var vars = query.split('&'); | |
98 | for (var i = 0; i < vars.length; i++) { | |
99 | var pair = vars[i].split('='); | |
100 | if (decodeURIComponent(pair[0]) == variable) { | |
101 | return decodeURIComponent(pair[1]); | |
102 | } | |
103 | } | |
4b8438d0 | 104 | } |
23533845 D |
105 | |
106 | window.onload = function () { | |
107 | ||
108 | // Common dependancies that are required at all times | |
109 | var scripts = [ | |
c4fc06f6 D |
110 | ['jquery-1.7.1.min.js', 'underscore-min.js'], |
111 | 'backbone-git.js' | |
23533845 D |
112 | ]; |
113 | ||
114 | // If in debug mode, load each development script | |
115 | if (getQueryVariable('debug')) { | |
c4fc06f6 | 116 | console.log('Loading debugging scripts'); |
23533845 | 117 | scripts = scripts.concat([ |
9df70c63 | 118 | 'dev/app.js', |
c4fc06f6 D |
119 | [ |
120 | 'dev/model_application.js', | |
121 | 'dev/model_gateway.js' | |
122 | ], | |
123 | [ | |
124 | 'dev/model_panellist.js', | |
125 | 'dev/model_panel.js', | |
126 | 'dev/model_member.js', | |
127 | 'dev/model_memberlist.js' | |
128 | ], | |
129 | ||
130 | [ | |
131 | 'dev/model_channel.js', | |
df7b7bf8 | 132 | 'dev/model_server.js', |
19cc6364 | 133 | 'dev/model_applet.js' |
c4fc06f6 D |
134 | ], |
135 | ||
721ad945 D |
136 | [ |
137 | 'dev/applet_settings.js', | |
138 | 'dev/applet_nickserv.js' | |
139 | ], | |
19cc6364 | 140 | |
c4fc06f6 D |
141 | [ |
142 | 'dev/utils.js', | |
143 | 'dev/view.js' | |
144 | ] | |
23533845 D |
145 | ]); |
146 | } else { | |
19cc6364 | 147 | scripts.push('kiwi.js'); |
23533845 D |
148 | } |
149 | ||
150 | ||
151 | // Run after all dependancies have been loaded | |
b62c8381 D |
152 | function startApp () { |
153 | var opts = { | |
154 | container: $('#kiwi'), | |
a37b761a | 155 | |
b62c8381 D |
156 | // Override the kiwi_server to use. (Think: running on standalone client..) |
157 | kiwi_server: 'http://192.168.1.13:7778' | |
158 | }; | |
a37b761a | 159 | |
b62c8381 D |
160 | // Start the app by either the dev or closed environment |
161 | (kiwi && kiwi.global && kiwi.global.start(opts)) || (kiwi && kiwi.start(opts)); | |
23533845 D |
162 | } |
163 | ||
164 | ||
165 | // Load each script | |
166 | var cur_script = 0; | |
167 | function loadNextScript () { | |
b62c8381 | 168 | // Start the kiwi app if all scripts have been loaded |
23533845 D |
169 | if (cur_script === scripts.length) { |
170 | startApp(); | |
171 | return; | |
172 | } | |
173 | ||
c4fc06f6 | 174 | $script(scripts[cur_script], loadNextScript); |
23533845 D |
175 | |
176 | cur_script++; | |
177 | } | |
178 | ||
179 | // Start loading scripts | |
180 | loadNextScript(); | |
181 | }; | |
2dd6a025 D |
182 | </script> |
183 | </body> | |
184 | </html> |