X-Git-Url: http://cgit.babelmonkeys.de/?p=adhocweb.git;a=blobdiff_plain;f=js%2Fmain.js;h=8724764fc49cb711496bb102ebd044a48c171df8;hp=c20969d3d5a59c1e9e250eac5b5d993743aa522f;hb=f4cb3215b33bff04fce978513f77aff1e621a1ff;hpb=83dffb602a2d29d0f0030ba171c722ae254a37ca diff --git a/js/main.js b/js/main.js index c20969d..8724764 100644 --- a/js/main.js +++ b/js/main.js @@ -1,4 +1,5 @@ var BOSH_SERVICE = 'http://localhost:5280/http-bind/'; +var show_log = false; Strophe.addNamespace("ADHOC", "http://jabber.org/protocol/commands"); @@ -54,85 +55,115 @@ function addForm(elem, x) { form.submit(function(){return false;}); var fieldset = $("
"); form.append(fieldset); - $("").text($(x).find("title").text()).appendTo(fieldset); - $("

").text($(x).find("instructions").text()).appendTo(fieldset); + if ($(x).find("title").length > 0) + $("").text($(x).find("title").text()).appendTo(fieldset); + if ($(x).find("instructions").length > 0) + $("

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