emposha / FCBKcomplete

Jquery facebook like(fancy) multi-select
http://www.emposha.com
383 stars 115 forks source link

Fixed initialization #58

Closed musketyr closed 13 years ago

musketyr commented 13 years ago

Hi, I've fixed 2 annoying bugs in autocompleter:

1) if the select was preloaded with some selected options they were no selected in recreated select (= stored datas were lost on load) 2) the rewriting of select name to end with []. I don't really know the purpose of doing this. if I want the name to end with [] I can write it myself

I hope you push these changes into your repo to make your great widget more usable, Best regards, Vladimir

emposha commented 13 years ago

Hi Vladimir, about name attribute please read "multple select" (http://tinyurl.com/3mjj9nr), without "[]" only one value will be send to the server side script. About this line "$.each(cache.search(new RegExp(etext, filter)), function (i, object) {" can you explain it?

musketyr commented 13 years ago

well, w/o using the new regexp the filter_case swich does nothing because you had never searched ignoring case. the filter var was actually assigned but never used. the filter var should be much more called flags, but I kept the original name. sorry didn't mentioned it in pull request.

sorry, those links looks all like php or .net issues I've never used a lot. I'm using Grails and there no such limitation. if I get 3x "selectName" param I just get it right. but if I get "selectName[]" params there is some issue in automatic command object binding. at least there should be an option to disable the renaming behaviour (I think it already exists in one of the forks).

PS: I'm using Chrome 11 @ Ubuntu 11.04 and Grails 1.3.7 if it can help you somewhat.

emposha commented 13 years ago

Hi musketyr, i`m closing your pull request. Due "This pull request can not be automatically merged." Btw I inserted your changes. Thanks for your help!!!

musketyr commented 13 years ago

Hi Maxim, that's great, thanky you too!

yutai commented 12 years ago

Hi, has this been merged into v2.8.7? Trying to get the preloaded values to work to no avail.

Thanks, and awesome plugin!

emposha commented 12 years ago

Hi @yutai, some of the changes was inserted manually. What exactly the problem with preloaded values?