Bug in tax_types_list (spec_id)
[fa-stable.git] / js / inserts.js
index 43b5f43ba2ed1511723b12d48936863d456b0bca..235de1812167082b813805397856340a4761a19a 100644 (file)
@@ -85,9 +85,7 @@ function _update_box(s) {
        var box = document.getElementsByName(rel)[0];
                if(box && s.selectedIndex>=0) {
                          var opt = s.options[s.selectedIndex];
-                         if (opt.value != 0) {
                                if(box) box.value = byid ? opt.value : opt.text;
-                         }
                }
 }
 
@@ -132,6 +130,8 @@ var inserts = {
                if(e.onfocus==undefined) {
                        e.onfocus = function() {
                            save_focus(this);
+                               if (this.className == 'combo') 
+                                       this.select();
                        };
                }
                if (e.className == 'combo' || e.className == 'combo2') {
@@ -143,16 +143,7 @@ var inserts = {
            // this hides search button for js enabled browsers
            e.style.display = 'none';
        },
-/*     'select.combo,select.combo2':
-       function(e) {
-               var box = document.getElementsByName(e.getAttribute('rel'))[0];
-               if(box) {
-                 box.style.width = 200+'px';
-                 e.style.width = 200+'px';
-                 debug(e.name+':'+e.style.width)
-               }
-       },
-*/     'input.ajaxsubmit,input.editbutton,input.navibutton': 
+       'input.ajaxsubmit,input.editbutton,input.navibutton': 
        function(e) {
            e.onclick = function() {
                JsHttpRequest.request(this.name);