Show busy indicator while waiting for query results - fixes #104

Change-Id: Ib818517199d8e8cb76215d7453849f6d813a61e3
diff --git a/dev/js/src/init.js b/dev/js/src/init.js
index 109fd48..478f87e 100644
--- a/dev/js/src/init.js
+++ b/dev/js/src/init.js
@@ -341,7 +341,7 @@
     if (form !== null) {
       form.addEventListener('submit', function (e) {
         var qf = d.getElementById('q-field');
-
+        
         // No query was defined
         if (qf.value === undefined || qf.value === '') {
           qf.focus();
@@ -349,7 +349,7 @@
           KorAP.log(700, "No query given");
           return;
         };
-
+        
         // Store session information
         KorAP.session.set("show", show);
 
@@ -362,6 +362,14 @@
           input.removeAttribute('value');
           input.removeAttribute('name');
         };
+
+        // This would preferably set the query to be "disabled",
+        // but in that case the query wouldn't be submitted
+        // at all.
+        // Setting the cursor to "progress" fails in current versions
+        // of webkit.
+        qf.classList.add("loading");
+        d.getElementById('qsubmit').classList.add("loading");
       });
     };