Bug [0000038] Voiding a cost update doesn't void even if it says so. There will now...
[fa-stable.git] / js / inserts.js
index 33bff885f6bd22d0f6ed166aa2e68ca4f166ecc3..ff479f30da60f652b708d94eee55a6453b3d6999 100644 (file)
@@ -5,10 +5,14 @@ function debug(msg) {
        box.innerHTML= box.innerHTML+'<br>'+msg
 }
 
-function progbar(container) {
-    container.innerHTML= "<center><img src='"+
-       user.theme+"images/progressbar1.gif' /> "+
-       user.loadtxt+"</center>";
+function progbar() {
+       box = document.getElementById('msgbox');
+    box.innerHTML= "<center><table width='98%' border='1' cellpadding=3 "
+       +"bordercolor='#007700' style='border-collapse: collapse'>"
+       +"<tr><td align='center' bgcolor='#ccffcc' >"
+               +"<img src='"+user.theme+"images/progressbar.gif' alt='"
+               +user.loadtxt+"' /></td></tr></table></center><br>";
+       box.style.display = 'block';
 }
 
 function save_focus(e) {
@@ -111,7 +115,7 @@ function _set_combo_select(e) {
                }
                e.onchange = function() {
                        var s = this;
-                       
+                       this.setAttribute('_last', this.selectedIndex);                 
                        if(s.className=='combo')
                            _update_box(s);
                        if(s.selectedIndex>=0) {
@@ -153,14 +157,21 @@ var inserts = {
                                _set_combo_input(e);
                }
        },
-       'input.combo_submit,input.combo_select,input.combo2': 
+       'input.combo2,input[aspect="fallback"]': 
        function(e) {
            // this hides search button for js enabled browsers
            e.style.display = 'none';
        },
+       'div.js_only': 
+       function(e) {
+           // this shows divs for js enabled browsers only
+           e.style.display = 'block';
+       },
        'input.ajaxsubmit,input.editbutton,input.navibutton': 
        function(e) {
            e.onclick = function() {
+                       if (this.getAttribute('aspect') == 'process')
+                               progbar();
                        JsHttpRequest.request(this);
                        return false;
            }
@@ -184,7 +195,7 @@ var inserts = {
                                        JsHttpRequest.request('_'+this.name+'_changed', this.form);
                                }
                        }
-               e.onkeydown = function(ev) { 
+/*             e.onkeydown = function(ev) { 
                                ev = ev||window.event;
                                key = ev.keyCode||ev.which;
                                if (key == 13 && (this.value != this.getAttribute('_last_val'))) {
@@ -192,7 +203,7 @@ var inserts = {
                                        return false;
                                }
                        }
-               },
+*/             },
        'select': function(e) {
                if(e.onfocus==undefined) {
                        e.onfocus = function() {