[jQuery] Re: jeditable & autocomplete - time to revisit?
On Dec 28, 2008, at 3:23 AM, Diogo Merovingio wrote: I still with problems. When the "onblur" submit the form, the autocomplete didn't finish yet. The consequence is that when I select something from autocomplete and press tab the string submitted was only part of what I wrote (ex.: I write "fran", the autocomplete suggest "France", if I select or press tab the string posted is "fran"). Sorry it took a while. Was on vacation. I guess the problem is using submit onblur. The input most likely blurs when you tab. Have you tried using ignore onblur? -- Mika Tuupola http://www.appelsiini.net/
[jQuery] Re: jeditable & autocomplete - time to revisit?
I still with problems. When the "onblur" submit the form, the autocomplete didn't finish yet. The consequence is that when I select something from autocomplete and press tab the string submitted was only part of what I wrote (ex.: I write "fran", the autocomplete suggest "France", if I select or press tab the string posted is "fran"). The autocomplet works fine withouth jeditable and vice-versa. Some one has a clue of what is wrong? Here is the code: $.editable.addInputType('autoc', { element: function(settings, original) { var input = $(''); input.autocomplete(contactList, { matchContains: true, mustMatch: true, formatItem: function(data) { var data = data[0].split("|"); return data[1]; }, formatResult: function(data) { return data[1]; } } ); $(this).append(input); return input; } }); $(".autocomplete").editable(baseUrl() + "/editajax", { type : "autoc", indication: "Tallennetaan...", tooltip: 'Klikkaa muokataksesi...', submit : 'Tallenna', onblur : 'submit', id: 'field', rows: 10, cols: 60 }); On Nov 16, 2:16 pm, tennis_blues wrote: > yes, thanks...this is exactly what i needed! yourjeditableis great > > On Nov 14, 2:24 pm, "criterades...@gmail.com" > > wrote: > > That is exactly why I posted. I noticed that you had done a lot of > > work on inputs. Unfortunately I could not figure out how to do it > > myself from reading through your website. Thanks again for your help. > > > -jl > > > On Nov 13, 1:51 am, Mika Tuupola wrote: > > > > On Nov 12, 2008, at 9:25 PM, criterades...@gmail.com wrote: > > > > > Wow, that was sooo simple. Works like a charm! > > > > Impressive.. Now, thats the way a plugin should work. > > > > Nice work Mike. > > > > Thank you :) Usually when someone has the need to do something special > > > (such as useautocomplete) withJeditablethere is no need to touch > > > Jeditablecode itself. All you need to do is to write a custom input. > > > > The reason why I created the plugin architecture (plugins for plugin) > > > was to avoid bloat. Take 10 people and they have at least eight > > > different needs. Making all their needs a configurable option would > > > bloat the code. > > > > Thus the solution: Make all basic features configurable and create API > > > with which people can extend the features how ever they want. > > > > -- > > > Mika Tuupolahttp://www.appelsiini.net/-Hide quoted text - > > > - Show quoted text -
[jQuery] Re: jeditable & autocomplete - time to revisit?
yes, thanks...this is exactly what i needed! your jeditable is great On Nov 14, 2:24 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > That is exactly why I posted. I noticed that you had done a lot of > work on inputs. Unfortunately I could not figure out how to do it > myself from reading through your website. Thanks again for your help. > > -jl > > On Nov 13, 1:51 am, Mika Tuupola <[EMAIL PROTECTED]> wrote: > > > > > On Nov 12, 2008, at 9:25 PM, [EMAIL PROTECTED] wrote: > > > > Wow, that was sooo simple. Works like a charm! > > > Impressive.. Now, thats the way a plugin should work. > > > Nice work Mike. > > > Thank you :) Usually when someone has the need to do something special > > (such as useautocomplete) withJeditablethere is no need to touch > > Jeditablecode itself. All you need to do is to write a custom input. > > > The reason why I created the plugin architecture (plugins for plugin) > > was to avoid bloat. Take 10 people and they have at least eight > > different needs. Making all their needs a configurable option would > > bloat the code. > > > Thus the solution: Make all basic features configurable and create API > > with which people can extend the features how ever they want. > > > -- > > Mika Tuupolahttp://www.appelsiini.net/- Hide quoted text - > > - Show quoted text -
[jQuery] Re: jeditable & autocomplete - time to revisit?
That is exactly why I posted. I noticed that you had done a lot of work on inputs. Unfortunately I could not figure out how to do it myself from reading through your website. Thanks again for your help. -jl On Nov 13, 1:51 am, Mika Tuupola <[EMAIL PROTECTED]> wrote: > On Nov 12, 2008, at 9:25 PM, [EMAIL PROTECTED] wrote: > > > Wow, that was sooo simple. Works like a charm! > > Impressive.. Now, thats the way a plugin should work. > > Nice work Mike. > > Thank you :) Usually when someone has the need to do something special > (such as useautocomplete) withJeditablethere is no need to touch > Jeditablecode itself. All you need to do is to write a custom input. > > The reason why I created the plugin architecture (plugins for plugin) > was to avoid bloat. Take 10 people and they have at least eight > different needs. Making all their needs a configurable option would > bloat the code. > > Thus the solution: Make all basic features configurable and create API > with which people can extend the features how ever they want. > > -- > Mika Tuupolahttp://www.appelsiini.net/
[jQuery] Re: jeditable & autocomplete - time to revisit?
On Nov 12, 2008, at 9:25 PM, [EMAIL PROTECTED] wrote: Wow, that was sooo simple. Works like a charm! Impressive.. Now, thats the way a plugin should work. Nice work Mike. Thank you :) Usually when someone has the need to do something special (such as use autocomplete) with Jeditable there is no need to touch Jeditable code itself. All you need to do is to write a custom input. The reason why I created the plugin architecture (plugins for plugin) was to avoid bloat. Take 10 people and they have at least eight different needs. Making all their needs a configurable option would bloat the code. Thus the solution: Make all basic features configurable and create API with which people can extend the features how ever they want. -- Mika Tuupola http://www.appelsiini.net/
[jQuery] Re: jeditable & autocomplete - time to revisit?
Wow, that was sooo simple. Works like a charm! Impressive.. Now, thats the way a plugin should work. Nice work Mike. -jl On Nov 12, 7:04 am, Mika Tuupola <[EMAIL PROTECTED]> wrote: > On Nov 12, 2008, at 10:28 AM, Mika Tuupola wrote: > > > On Nov 12, 2008, at 1:46 AM, [EMAIL PROTECTED] wrote: > > >> I was wondering if it my be possible to add autocomplete > >> functionality > >> using the addInputType API. It looks like it might be possible to > >> attach autocomplete to the text input through the "element:" argument > >> when declaring a custom input type. > > > It should be fairly easy. Usually you just to need to create the > > element using "element" and add plugin to it using "plugin". > > It is basically 5 lines of code. Quick and dirty autocomplete input > for Jeditable: > > -cut- > $.editable.addInputType('autocomplete', { > element : $.editable.types.text.element, > plugin : function(settings, original) { > $('input', this).autocomplete(settings.autocomplete.data); > } > }); > -cut- > > Then you can call it with something like: > > -cut- > $(".autocomplete").editable("http://www.example.com/save.php";, { > type : "autocomplete", > tooltip : "Click to edit...", > onblur : "submit", > autocomplete : { > data : ["Aberdeen", "Ada", "Adamsville", "Addyston", > "Adelphi", "Adena", "Adrian", "Akron"] > } > }); > -cut- > > -- > Mika Tuupolahttp://www.appelsiini.net/
[jQuery] Re: jeditable & autocomplete - time to revisit?
On Nov 12, 2008, at 10:28 AM, Mika Tuupola wrote: On Nov 12, 2008, at 1:46 AM, [EMAIL PROTECTED] wrote: I was wondering if it my be possible to add autocomplete functionality using the addInputType API. It looks like it might be possible to attach autocomplete to the text input through the "element:" argument when declaring a custom input type. It should be fairly easy. Usually you just to need to create the element using "element" and add plugin to it using "plugin". It is basically 5 lines of code. Quick and dirty autocomplete input for Jeditable: -cut- $.editable.addInputType('autocomplete', { element : $.editable.types.text.element, plugin : function(settings, original) { $('input', this).autocomplete(settings.autocomplete.data); } }); -cut- Then you can call it with something like: -cut- $(".autocomplete").editable("http://www.example.com/save.php";, { type : "autocomplete", tooltip : "Click to edit...", onblur: "submit", autocomplete : { data : ["Aberdeen", "Ada", "Adamsville", "Addyston", "Adelphi", "Adena", "Adrian", "Akron"] } }); -cut- -- Mika Tuupola http://www.appelsiini.net/
[jQuery] Re: jeditable & autocomplete - time to revisit?
On Nov 12, 2008, at 1:46 AM, [EMAIL PROTECTED] wrote: I was wondering if it my be possible to add autocomplete functionality using the addInputType API. It looks like it might be possible to attach autocomplete to the text input through the "element:" argument when declaring a custom input type. It should be fairly easy. Usually you just to need to create the element using "element" and add plugin to it using "plugin". Check for example these custom inputs: http://github.com/tuupola/jquery_jeditable_markitup/tree/master/jquery.jeditable.markitup.js http://github.com/tuupola/jquery_jeditable/tree/master/jquery.jeditable.autogrow.js http://github.com/tuupola/jquery_jeditable/tree/master/jquery.jeditable.charcounter.js http://github.com/tuupola/jquery_jeditable/tree/master/jquery.jeditable.masked.js I can give autocomplete a try later today if I have time. -- Mika Tuupola http://www.appelsiini.net/