]> cgit.babelmonkeys.de Git - adhocweb.git/blobdiff - js/main.js
Use readonly <input/>s for type="result" dataforms
[adhocweb.git] / js / main.js
index 1bb3a459cee1c76a32db2d64f4ffd08b5c47ff7f..52e6296a5c54908a740595d00a36e3712faa3c6f 100644 (file)
@@ -41,6 +41,7 @@ function onConnect(status) {
     } else if (status == Strophe.Status.CONNECTED) {
         log('Strophe is connected.');
         queryJID = connection.domain;
     } else if (status == Strophe.Status.CONNECTED) {
         log('Strophe is connected.');
         queryJID = connection.domain;
+        $('#queryJID').val(queryJID);
         $('#query').show();
         checkFeatures();
     }
         $('#query').show();
         checkFeatures();
     }
@@ -127,6 +128,8 @@ function addForm(elem, x) {
                 item.val($(this).find("value").text());
             }
         }
                 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"));
         if ($(this).attr("var")) {
             item.attr("name", $(this).attr("var"));
             item.attr("id", $(this).attr("var"));