var type = $(this).attr("type");
if($(this).attr("label")) {
$("<label/>").text($(this).attr("label")).attr("for", $(this).attr("var")).appendTo(fieldset);
var type = $(this).attr("type");
if($(this).attr("label")) {
$("<label/>").text($(this).attr("label")).attr("for", $(this).attr("var")).appendTo(fieldset);
if ($(this).attr("var")) {
item.attr("name", $(this).attr("var"));
item.attr("id", $(this).attr("var"));
}
fieldset.append(item);
if ($(this).attr("var")) {
item.attr("name", $(this).attr("var"));
item.attr("id", $(this).attr("var"));
}
fieldset.append(item);
$('#' + kind + 'Button').attr("disabled", "false");
}
$('#executeButton').bind("click", function() {
$('#' + kind + 'Button').attr("disabled", "false");
}
$('#executeButton').bind("click", function() {
.c("command", { xmlns: Strophe.NS.ADHOC, node: cmdNode, sessionid: sessionid, action: "execute" });
serializeToDataform($('form'), execIQ);
connection.sendIQ(execIQ, displayResult);
});
$('#cancelButton').bind("click", function() {
.c("command", { xmlns: Strophe.NS.ADHOC, node: cmdNode, sessionid: sessionid, action: "execute" });
serializeToDataform($('form'), execIQ);
connection.sendIQ(execIQ, displayResult);
});
$('#cancelButton').bind("click", function() {
.c("command", { xmlns: Strophe.NS.ADHOC, node: cmdNode, sessionid: sessionid, action: "cancel" });
cmdNode = null
sessionid = null;
.c("command", { xmlns: Strophe.NS.ADHOC, node: cmdNode, sessionid: sessionid, action: "cancel" });
cmdNode = null
sessionid = null;
.c("command", { xmlns: Strophe.NS.ADHOC, node: cmdNode, action: "execute" });
connection.sendIQ(execIQ, function(result) {
sessionid = $(result).find("command").attr("sessionid");
displayResult(result);
});
.c("command", { xmlns: Strophe.NS.ADHOC, node: cmdNode, action: "execute" });
connection.sendIQ(execIQ, function(result) {
sessionid = $(result).find("command").attr("sessionid");
displayResult(result);
});
- var nodesIQ = $iq({ type: "get", to: connection.domain, id: "nodes1" }).c("query", {xmlns: Strophe.NS.DISCO_ITEMS, node: Strophe.NS.ADHOC});
+ var nodesIQ = $iq({ type: "get", to: queryJID, id: "nodes1" }).c("query", {xmlns: Strophe.NS.DISCO_ITEMS, node: Strophe.NS.ADHOC});
connection.sendIQ(nodesIQ, function(result) {
$('#output').append("<ul id='items'></ul>");
$(result).find("item").each(function(index, e) {
connection.sendIQ(nodesIQ, function(result) {
$('#output').append("<ul id='items'></ul>");
$(result).find("item").each(function(index, e) {
- featureIQ = $iq({ type: "get", to: connection.domain, id: "features1" }).c("query", {xmlns: Strophe.NS.DISCO_INFO});
+ featureIQ = $iq({ type: "get", to: queryJID, id: "features1" }).c("query", {xmlns: Strophe.NS.DISCO_INFO});
connection.sendIQ(featureIQ, function(result) {
if ($(result).find("feature[var='" + Strophe.NS.ADHOC + "']").length > 0) {
$('#output').append("<p>This entitiy does support AdHoc commands</p>");
connection.sendIQ(featureIQ, function(result) {
if ($(result).find("feature[var='" + Strophe.NS.ADHOC + "']").length > 0) {
$('#output').append("<p>This entitiy does support AdHoc commands</p>");
+ event.preventDefault();
+ });
+
+ $('#queryForm').bind('submit', function (event) {
+ queryJID = $('#queryJID').val();
+ checkFeatures();
+ event.preventDefault();