X-Git-Url: http://cgit.babelmonkeys.de/?p=adhocweb.git;a=blobdiff_plain;f=js%2Fmain.js;h=52e6296a5c54908a740595d00a36e3712faa3c6f;hp=4cff25caf4b3a5e62fc7acbf1ae133f656cb383e;hb=0a815dbe7d2fac797c905149988ac5e540b663bc;hpb=eab81f9e4afd38c8390745449865185e9637c830
diff --git a/js/main.js b/js/main.js
index 4cff25c..52e6296 100644
--- a/js/main.js
+++ b/js/main.js
@@ -41,6 +41,7 @@ function onConnect(status) {
} else if (status == Strophe.Status.CONNECTED) {
log('Strophe is connected.');
queryJID = connection.domain;
+ $('#queryJID').val(queryJID);
$('#query').show();
checkFeatures();
}
@@ -67,6 +68,7 @@ function addForm(elem, x) {
var type = $(this).attr("type");
if($(this).attr("label")) {
$("").text($(this).attr("label")).attr("for", $(this).attr("var")).appendTo(fieldset);
+ $("
").appendTo(fieldset);
}
switch(type) {
case "hidden":
@@ -76,7 +78,7 @@ function addForm(elem, x) {
item = $("");
break;
case "text-multi":
- item = $("");
+ item = $("");
break;
case "text-single":
item = $("");
@@ -85,7 +87,7 @@ function addForm(elem, x) {
item = $("").attr("readonly",true);
break;
case "jid-multi":
- item = $("");
+ item = $("");
break;
case "jid-single":
item = $("");
@@ -126,12 +128,15 @@ function addForm(elem, x) {
item.val($(this).find("value").text());
}
}
+ if ($(x).attr("type") == "result")
+ item.attr("readonly", true);
if ($(this).attr("var")) {
item.attr("name", $(this).attr("var"));
item.attr("id", $(this).attr("var"));
}
fieldset.append(item);
- fieldset.append("
");
+ if (type != "hidden")
+ fieldset.append("
");
});
$(elem).append(form);
}
@@ -254,7 +259,8 @@ function showConnect() {
$('#query').hide();
pass.show();
jid.show();
- $('label').show();
+ $('#cred label').show();
+ $('#cred br').show();
$('#output').empty();
}
@@ -267,6 +273,7 @@ function showDisconnect() {
pass.hide();
jid.hide();
$('#cred label').hide();
+ $('#cred br').hide();
}
$(document).ready(function () {