comparison mod_admin_web/admin_web/www_files/js/main.js @ 547:f0ef6e285d69

mod_adhoc_web: fade instead of scrolling
author Florian Zeitz <florob@babelmonkeys.de>
date Thu, 12 Jan 2012 20:26:16 +0100
parents 99465bbfa205
children c9955858dc7e
comparison
equal deleted inserted replaced
546:0afe88f9bdde 547:f0ef6e285d69
136 }); 136 });
137 } 137 }
138 } 138 }
139 139
140 function showConnect() { 140 function showConnect() {
141 $('#pass').show();
142 $('#jid').show();
143 $('#login').show(); 141 $('#login').show();
144 $('#menu').hide(); 142 $('#menu').hide();
145 $('#main').hide(); 143 $('#main').hide();
146 $('#s2sin').empty(); 144 $('#s2sin').empty();
147 $('#s2sout').empty(); 145 $('#s2sout').empty();
148 $('#c2s').empty(); 146 $('#c2s').empty();
149 $('#host').empty(); 147 $('#host').empty();
150 } 148 }
151 149
152 function showDisconnect() { 150 function showDisconnect() {
153 $('#jid').hide();
154 $('#pass').hide();
155 $('#s2sList').hide(); 151 $('#s2sList').hide();
156 $('#c2sList').hide(); 152 $('#c2sList').hide();
157 $('#login').hide(); 153 $('#login').hide();
158 154
159 $('#menu').show(); 155 $('#menu').show();
187 $('#logout').click(function (event) { 183 $('#logout').click(function (event) {
188 connection.disconnect(); 184 connection.disconnect();
189 event.preventDefault(); 185 event.preventDefault();
190 }); 186 });
191 187
192 $('#adhocMenu').click(function (event) { 188 $('#adhocMenu, #serverMenu, #clientMenu').click(function (event) {
193 $('#s2sList').slideUp();
194 $('#c2sList').slideUp();
195 $('#adhoc').slideDown();
196 event.preventDefault(); 189 event.preventDefault();
197 }); 190 var tab = $(this).attr('href');
198 191 $('#main > div').hide();
199 $('#serverMenu').click(function (event) { 192 $(tab).fadeIn('fast');
200 $('#adhoc').slideUp();
201 $('#c2sList').slideUp();
202 $('#s2sList').slideDown();
203 event.preventDefault();
204 });
205
206 $('#clientMenu').click(function (event) {
207 $('#adhoc').slideUp();
208 $('#s2sList').slideUp();
209 $('#c2sList').slideDown();
210 event.preventDefault();
211 }); 193 });
212 194
213 $('#host').bind('change', function (event) { 195 $('#host').bind('change', function (event) {
214 connection.send($iq({to: adminsubHost, type: 'set', id: connection.getUniqueId()}).c('adminsub', {xmlns: Strophe.NS.ADMINSUB}) 196 connection.send($iq({to: adminsubHost, type: 'set', id: connection.getUniqueId()}).c('adminsub', {xmlns: Strophe.NS.ADMINSUB})
215 .c('unsubscribe', {node: Strophe.NS.C2SSTREAM})); 197 .c('unsubscribe', {node: Strophe.NS.C2SSTREAM}));