diff 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
line wrap: on
line diff
--- a/mod_admin_web/admin_web/www_files/js/main.js	Tue Jan 10 20:55:45 2012 +0000
+++ b/mod_admin_web/admin_web/www_files/js/main.js	Thu Jan 12 20:26:16 2012 +0100
@@ -138,8 +138,6 @@
 }
 
 function showConnect() {
-    $('#pass').show();
-    $('#jid').show();
     $('#login').show();
     $('#menu').hide();
     $('#main').hide();
@@ -150,8 +148,6 @@
 }
 
 function showDisconnect() {
-    $('#jid').hide();
-    $('#pass').hide();
     $('#s2sList').hide();
     $('#c2sList').hide();
     $('#login').hide();
@@ -189,25 +185,11 @@
 	event.preventDefault();
     });
 
-    $('#adhocMenu').click(function (event) {
-        $('#s2sList').slideUp();
-        $('#c2sList').slideUp();
-        $('#adhoc').slideDown();
+    $('#adhocMenu, #serverMenu, #clientMenu').click(function (event) {
         event.preventDefault();
-    });
-
-    $('#serverMenu').click(function (event) {
-        $('#adhoc').slideUp();
-        $('#c2sList').slideUp();
-        $('#s2sList').slideDown();
-        event.preventDefault();
-    });
-
-    $('#clientMenu').click(function (event) {
-        $('#adhoc').slideUp();
-        $('#s2sList').slideUp();
-        $('#c2sList').slideDown();
-        event.preventDefault();
+	var tab = $(this).attr('href');
+        $('#main > div').hide();
+        $(tab).fadeIn('fast');
     });
 
     $('#host').bind('change', function (event) {