Changeset

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 546:0afe88f9bdde
children 548:4691e72a055c
files mod_admin_web/admin_web/get_deps.sh mod_admin_web/admin_web/www_files/index.html mod_admin_web/admin_web/www_files/js/main.js
diffstat 3 files changed, 8 insertions(+), 26 deletions(-) [+]
line wrap: on
line diff
--- a/mod_admin_web/admin_web/get_deps.sh	Tue Jan 10 20:55:45 2012 +0000
+++ b/mod_admin_web/admin_web/get_deps.sh	Thu Jan 12 20:26:16 2012 +0100
@@ -3,5 +3,5 @@
 STROPHE_VERSION="1.0.2"
 cd www_files/js
 test -e jquery-$JQUERY_VERSION.min.js || wget http://code.jquery.com/jquery-$JQUERY_VERSION.min.js
-test -e adhoc.js || wget http://cgit.babelmonkeys.de/cgit.cgi/adhocweb/plain/js/adhoc.js
+test -e adhoc.js || wget -O adhoc.js "http://cgit.babelmonkeys.de/cgit.cgi/adhocweb/plain/js/adhoc.js?id=e55b23864a9911c15d930b43ed9afe1df5943bf7"
 test -e strophe.min.js || (wget https://github.com/downloads/metajack/strophejs/strophejs-$STROPHE_VERSION.tar.gz && tar xzf strophejs-$STROPHE_VERSION.tar.gz strophejs-$STROPHE_VERSION/strophe.min.js --strip-components=1 && rm strophejs-$STROPHE_VERSION.tar.gz)
--- a/mod_admin_web/admin_web/www_files/index.html	Tue Jan 10 20:55:45 2012 +0000
+++ b/mod_admin_web/admin_web/www_files/index.html	Thu Jan 12 20:26:16 2012 +0100
@@ -19,9 +19,9 @@
   </div>
   <div id='menu'>
     <ul>
-      <li id='adhocMenu'><a href="#">General</a></li>
-      <li id='serverMenu'><a href="#">Servers</a></li>
-      <li id='clientMenu'><a href="#">Clients</a></li>
+      <li><a id='adhocMenu' href="#adhoc">General</a></li>
+      <li><a id='serverMenu' href="#s2sList">Servers</a></li>
+      <li><a id='clientMenu' href="#c2sList">Clients</a></li>
       <li><span id="selector">Host:<select id="host"></select></span></li>
       <li><a href="#" id='logout'>Logout</a></li>
     </ul>
--- 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) {