# HG changeset patch # User Florian Zeitz # Date 1326846281 -3600 # Node ID c9955858dc7e4fb598dec091a0fe744e6e871bee # Parent f22a569fcf865e5b582651bcd9bf010093a6ca95 mod_adhoc_web: Redesign adhoc command pane diff -r f22a569fcf86 -r c9955858dc7e mod_admin_web/admin_web/get_deps.sh --- a/mod_admin_web/admin_web/get_deps.sh Tue Jan 17 16:07:21 2012 +0000 +++ b/mod_admin_web/admin_web/get_deps.sh Wed Jan 18 01:24:41 2012 +0100 @@ -4,7 +4,7 @@ BOOTSTRAP_VERSION="1.4.0" 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 -O adhoc.js "http://cgit.babelmonkeys.de/cgit.cgi/adhocweb/plain/js/adhoc.js?id=e55b23864a9911c15d930b43ed9afe1df5943bf7" +test -e adhoc.js || wget -O adhoc.js "http://cgit.babelmonkeys.de/cgit.cgi/adhocweb/plain/js/adhoc.js?id=5a45869a032410c17d02374b8de20e496c114de3" 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) cd ../css test -e bootstrap-$BOOTSTRAP_VERSION.min.css || wget http://twitter.github.com/bootstrap/$BOOTSTRAP_VERSION/bootstrap.min.css -O bootstrap-$BOOTSTRAP_VERSION.min.css diff -r f22a569fcf86 -r c9955858dc7e mod_admin_web/admin_web/www_files/css/style.css --- a/mod_admin_web/admin_web/www_files/css/style.css Tue Jan 17 16:07:21 2012 +0000 +++ b/mod_admin_web/admin_web/www_files/css/style.css Wed Jan 18 01:24:41 2012 +0100 @@ -24,6 +24,14 @@ display: none } +#adhocCommands { + border-right: solid 1px +} + +#adhocCommands li { + list-style: inside +} + #login { float: left; margin-left: 1em; diff -r f22a569fcf86 -r c9955858dc7e mod_admin_web/admin_web/www_files/index.html --- a/mod_admin_web/admin_web/www_files/index.html Tue Jan 17 16:07:21 2012 +0000 +++ b/mod_admin_web/admin_web/www_files/index.html Wed Jan 18 01:24:41 2012 +0100 @@ -44,7 +44,12 @@
-
+
+
+
+
+
+
diff -r f22a569fcf86 -r c9955858dc7e mod_admin_web/admin_web/www_files/js/main.js --- a/mod_admin_web/admin_web/www_files/js/main.js Tue Jan 17 16:07:21 2012 +0000 +++ b/mod_admin_web/admin_web/www_files/js/main.js Wed Jan 18 01:24:41 2012 +0100 @@ -10,6 +10,7 @@ var connection = null; var adminsubHost = null; +var adhocControl = new Adhoc('#adhocDisplay', function() {}); function log(msg) { var entry = $('
').append(document.createTextNode(msg)); @@ -123,7 +124,9 @@ } showDisconnect(); adminsubHost = $(items[0]).text(); - Adhoc.checkFeatures('#adhoc', adminsubHost); + adhocControl.checkFeatures(adminsubHost, + function () { adhocControl.getCommandNodes(function (result) { $('#adhocDisplay').empty(); $('#adhocCommands').append(result); }) }, + function () { $('#adhocCommands').empty(); $('#adhocDisplay').html('

This host does not support commands

'); }); connection.addHandler(_cbAdminSub, Strophe.NS.ADMINSUB + '#event', 'message'); connection.send($iq({to: adminsubHost, type: 'set', id: connection.getUniqueId()}).c('adminsub', {xmlns: Strophe.NS.ADMINSUB}) .c('subscribe', {node: Strophe.NS.C2SSTREAM})); @@ -198,7 +201,9 @@ connection.send($iq({to: adminsubHost, type: 'set', id: connection.getUniqueId()}).c('adminsub', {xmlns: Strophe.NS.ADMINSUB}) .c('unsubscribe', {node: Strophe.NS.S2SSTREAM})); adminsubHost = $(this).val(); - Adhoc.checkFeatures('#adhoc', adminsubHost); + adhocControl.checkFeatures(adminsubHost, + function () { adhocControl.getCommandNodes(function (result) { $('#adhocDisplay').empty(); $('#adhocCommands').append(result); }) }, + function () { $('#adhocCommands').empty(); $('#adhocDisplay').html('

This host does not support commands

'); }); $('#s2sin').empty(); $('#s2sout').empty(); $('#c2s').empty();