X-Git-Url: http://cgit.babelmonkeys.de/?p=adhocweb.git;a=blobdiff_plain;f=js%2Fmain.js;h=73ace060a8394f96a984b32e9ba61fa9080e287c;hp=c20969d3d5a59c1e9e250eac5b5d993743aa522f;hb=e55b23864a9911c15d930b43ed9afe1df5943bf7;hpb=83dffb602a2d29d0f0030ba171c722ae254a37ca diff --git a/js/main.js b/js/main.js index c20969d..73ace06 100644 --- a/js/main.js +++ b/js/main.js @@ -1,11 +1,8 @@ var BOSH_SERVICE = 'http://localhost:5280/http-bind/'; - -Strophe.addNamespace("ADHOC", "http://jabber.org/protocol/commands"); +var show_log = true; var localJID = null; var connection = null; -var sessionid = null; -var cmdNode = null; function log(msg) { var entry = $('
').append(document.createTextNode(msg)); @@ -38,167 +35,10 @@ function onConnect(status) { } } else if (status == Strophe.Status.CONNECTED) { log('Strophe is connected.'); - checkFeatures(); - } -} - -function addNote(elem, text, type) { - if (!type) { - type = "info"; + $('#queryJID').val(connection.domain); + $('#query').show(); + Adhoc.checkFeatures("#output", connection.domain); } - $(elem).append("

" + text + "

"); -} - -function addForm(elem, x) { - var form = $("
"); - form.submit(function(){return false;}); - var fieldset = $("
"); - form.append(fieldset); - $("").text($(x).find("title").text()).appendTo(fieldset); - $("

").text($(x).find("instructions").text()).appendTo(fieldset); - $(x).find("field").each(function(){ - var item = null; - var type = $(this).attr("type"); - if($(this).attr("label")) { - $("