Added ajax request indicator.
authorJanusz Dobrowolski <janusz@frontaccounting.eu>
Fri, 17 Oct 2008 11:08:43 +0000 (11:08 +0000)
committerJanusz Dobrowolski <janusz@frontaccounting.eu>
Fri, 17 Oct 2008 11:08:43 +0000 (11:08 +0000)
js/utils.js
themes/aqua/images/ajax-loader.gif [new file with mode: 0644]
themes/aqua/renderer.php
themes/cool/images/ajax-loader.gif [new file with mode: 0644]
themes/cool/renderer.php
themes/default/images/ajax-loader.gif [new file with mode: 0644]
themes/default/renderer.php

index 9380db34c6bdb3adf35d3bf38c17891d391c89d5..e0ab74a61826c897402586151c0c7e6e427fea2c 100644 (file)
@@ -9,6 +9,8 @@
 //             request is directed to current location 
 // 
     JsHttpRequest.request= function(trigger, form) {
+               var mark = document.getElementById('ajaxmark');
+               if(mark) mark.style.visibility = 'visible';
                if (trigger.tagName=='A') {
                        var content = {};
                        var upload = 0;
@@ -77,6 +79,8 @@
 
         // Write errors to the debug div.
                  document.getElementById('msgbox').innerHTML = errors;
+                 var mark = document.getElementById('ajaxmark');
+                 if(mark) mark.style.visibility = 'hidden';
 
                  Behaviour.apply();
                  if (errors.length>0)
diff --git a/themes/aqua/images/ajax-loader.gif b/themes/aqua/images/ajax-loader.gif
new file mode 100644 (file)
index 0000000..3d185fe
Binary files /dev/null and b/themes/aqua/images/ajax-loader.gif differ
index 8e42fca75a665fa87106721d5bbf1205aa498168..2d85a4e2f90551a29e0ebf7b3a90f26fce5ea616 100644 (file)
@@ -48,6 +48,8 @@
 
                                echo "<table class=logoutBar>";
                                echo "<tr><td class=headingtext3>" . $db_connections[$_SESSION["wa_current_user"]->company]["name"] . " | " . $_SERVER['SERVER_NAME'] . " | " . $_SESSION["wa_current_user"]->name . "</td>";
+                               $indicator = "$path_to_root/themes/".user_theme(). "/images/ajax-loader.gif";
+                               echo "<td class='logoutBarRight'><img id='ajaxmark' src='$indicator' align='center' style='visibility:hidden;'></td>";
                                echo "  <td class='logoutBarRight'><a href='$path_to_root/admin/display_prefs.php?'>" . _("Preferences") . "</a>&nbsp;&nbsp;&nbsp;\n";
                                echo "  <a href='$path_to_root/admin/change_current_user_password.php?selected_id=" . $_SESSION["wa_current_user"]->username . "'>" . _("Change password") . "</a>&nbsp;&nbsp;&nbsp;\n";
 
diff --git a/themes/cool/images/ajax-loader.gif b/themes/cool/images/ajax-loader.gif
new file mode 100644 (file)
index 0000000..28aabec
Binary files /dev/null and b/themes/cool/images/ajax-loader.gif differ
index 8e42fca75a665fa87106721d5bbf1205aa498168..2d85a4e2f90551a29e0ebf7b3a90f26fce5ea616 100644 (file)
@@ -48,6 +48,8 @@
 
                                echo "<table class=logoutBar>";
                                echo "<tr><td class=headingtext3>" . $db_connections[$_SESSION["wa_current_user"]->company]["name"] . " | " . $_SERVER['SERVER_NAME'] . " | " . $_SESSION["wa_current_user"]->name . "</td>";
+                               $indicator = "$path_to_root/themes/".user_theme(). "/images/ajax-loader.gif";
+                               echo "<td class='logoutBarRight'><img id='ajaxmark' src='$indicator' align='center' style='visibility:hidden;'></td>";
                                echo "  <td class='logoutBarRight'><a href='$path_to_root/admin/display_prefs.php?'>" . _("Preferences") . "</a>&nbsp;&nbsp;&nbsp;\n";
                                echo "  <a href='$path_to_root/admin/change_current_user_password.php?selected_id=" . $_SESSION["wa_current_user"]->username . "'>" . _("Change password") . "</a>&nbsp;&nbsp;&nbsp;\n";
 
diff --git a/themes/default/images/ajax-loader.gif b/themes/default/images/ajax-loader.gif
new file mode 100644 (file)
index 0000000..40f18a9
Binary files /dev/null and b/themes/default/images/ajax-loader.gif differ
index 00bff4ea9adaea80f6a359028a6b23d74030338d..460a366748134f8e3a6757865f1deba0a8fc9df8 100644 (file)
@@ -47,7 +47,8 @@
 
                                echo "<table class=logoutBar>";
                                echo "<tr><td class=headingtext3>" . $db_connections[$_SESSION["wa_current_user"]->company]["name"] . " | " . $_SERVER['SERVER_NAME'] . " | " . $_SESSION["wa_current_user"]->name . "</td>";
-
+                               $indicator = "$path_to_root/themes/".user_theme(). "/images/ajax-loader.gif";
+                               echo "<td class='logoutBarRight'><img id='ajaxmark' src='$indicator' align='center' style='visibility:hidden;'></td>";
                                echo "  <td class='logoutBarRight'><a href='$path_to_root/admin/display_prefs.php?'>" . _("Preferences") . "</a>&nbsp;&nbsp;&nbsp;\n";
                                echo "  <a href='$path_to_root/admin/change_current_user_password.php?selected_id=" . $_SESSION["wa_current_user"]->username . "'>" . _("Change password") . "</a>&nbsp;&nbsp;&nbsp;\n";