Only poll for status if a page ID is actually defined.
[Sone.git] / src / main / resources / static / javascript / sone.js
index ad23acd..803774a 100644 (file)
@@ -842,7 +842,7 @@ $(document).ready(function() {
        getTranslation("WebInterface.DefaultText.StatusUpdate", function(defaultText) {
                registerInputTextareaSwap("#sone #update-status .status-input", defaultText, "text", false, false);
                $("#sone #update-status").submit(function() {
-                       if (!$(this).find(":input.default").hasAttr("disabled")) {
+                       if ($(this).find(":input.default:enabled").length > 0) {
                                return false;
                        }
                        text = $(this).find(":input:enabled").val();
@@ -954,7 +954,9 @@ $(document).ready(function() {
        });
 
        /* activate status polling. */
-       setTimeout(getStatus, 5000);
+       if ((getPageId() != undefined) && (getPageId() != "login")) {
+               setTimeout(getStatus, 5000);
+       }
 
        /* reset activity counter when the page has focus. */
        $(window).focus(function() {