Re: FA WITH AUTOCOMPLETE DOWNLOAD
@pswamis
Hi,
you can download the changed files from here
its updated to latest version 2.4.6
thanks for using this
Experience is the name everyone gives to their mistakes!
It's much more fun, when you can discuss your problems with others...
You are not logged in. Please login or register.
FrontAccounting forum → FA Modifications → FA WITH AUTOCOMPLETE DOWNLOAD
@pswamis
Hi,
you can download the changed files from here
its updated to latest version 2.4.6
thanks for using this
@anoopmb can you mention the changes you made in the core. Overwriting my files with your files will overwrite some of my modifications too.
Thanks in Advance
@boxygen
please use a file compare utility.
i changed ui_lists.inc and auto_select_box.inc
changed $auto_select_box to $SysPrefs->auto_select_box
@boxygen - you can use a software named ", Meld" ,it's available for Linux, windows and OS x. Can see the file differences if you compare the files with default core. You can get difference from it . Hope it helps you
@anoopmb - I have tested your auto complete. Its working well. You have done a great job. There is one suggestion from my side.
When It comes with large list of options in select. Like more than 1000 items in the list. It will freeze the system for a while and will go on.
So if possible rewrite it to perform Ajax call and get results from server. By default you can show 20, items in the list. Rest should not be added to the list. When user start typing the related items should show here.
@ kvvaradha
yeah we can try that as the popup search type is available now in combo input function.
let me take a look
thanks for testing
I'm also eagerly waiting for this
Thanks u so much in advance Anoop, you are doing awesome work
@ kvvaradha
yeah we can try that as the popup search type is available now in combo input function.
let me take a look
thanks for testing
The lists need special character handling so that names like "A & L" Foods appear properly. One possible fix is to call
function decodeHtml(html) {
var txt = document.createElement("textarea");
txt.innerHTML = html;
return txt.value;
}
where the code currently uses "selval" and
selectedoption.innerHTML= selectedoption.innerHTML.replace(/ /gi,' ');
which currently may not be doing anything because the browser just converts back.
Another minor problem is lost focus because FA does not expect to focus on a hidden variable, which in the new code has the old list name (the new list being named "name" + mselect). I have a simple fix for this if you are interested.
Thanks for the contribution. I already had autocomplete lists running on my site but I like yours better because it modular and non-invasive, so I replaced my code with yours.
@Braath Waate
yeah, please do your contribution so everyone can get benefit of it
thanks for notifying these issues
thanks Braath and i will upadate the code shortly with your changes
@anoopmb
If any value with & is selected in the dropdown, after clicking on it the selected value turns into &
so i have changed the typer.value = selectedoption.innerHTML; to typer.value = selectedoption.innerText;
in the following:
selectedoption.innerHTML = selectedoption.innerHTML.replace(/ /gi, ' ');
typer.setAttribute("value", selectedoption.innerHTML);
// typer.value = selectedoption.innerHTML;
typer.value = selectedoption.innerText;
var hidden = document.createElement('INPUT');
I also added the following regex in the typer.onblur
+ selval = selval.replace(/&/gi, '&');
here is the updated code:
typer.onblur = function (event) {
if (optgropc != 1) {
pop("none");
optgropc = 0;
if (typer.value == null || typer.value == '' || typer.value != selectedoption.innerHTML) {
var selval = selectedoption.innerHTML;
+ selval = selval.replace(/&/gi, '&');
selval = selval.replace(/\<u\>/ig, '');
selval = selval.replace(/\<\/u\>/ig, '');
selval = selval.replace(/ /gi, ' ');
typer.value = selval;
hidden.value = selectedvalue;
FrontAccounting forum → FA Modifications → FA WITH AUTOCOMPLETE DOWNLOAD
Powered by PunBB, supported by Informer Technologies, Inc.
Currently installed 4 official extensions. Copyright © 2003–2009 PunBB.