X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;ds=sidebyside;f=js%2Finserts.js;h=235de1812167082b813805397856340a4761a19a;hb=6d2dce24184f25478260fcfe240ca7fcc7c61c0c;hp=43b5f43ba2ed1511723b12d48936863d456b0bca;hpb=c935a4090e3f152dd5549217d69b5b5036197024;p=fa-stable.git diff --git a/js/inserts.js b/js/inserts.js index 43b5f43b..235de181 100644 --- a/js/inserts.js +++ b/js/inserts.js @@ -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);