bgultekin / laravel4-datatables-package

Server-side handler of DataTables Jquery Plugin for Laravel 4
267 stars 108 forks source link

Fix the formatting of the keyword and consistency in it's use. #146

Closed phazei closed 10 years ago

phazei commented 10 years ago

I realized that the formatting of the keyword with the wildcard_like_string doesn't put the % at the beginning and end of the string I don't think.

Also, I noticed when filtering a column with LIKE, it doesn't properly setup the keyword to match the other elements and the wildcard setting, so for the specific case of filtering with LIKE, it now does that.

phazei commented 10 years ago

Haha, that was quick, just thought of an extra bit I was going to add to the format_keyword function. Was thinking it should check for the pre-existence of % signs. There currently wasn't anything preventing a user from adding those if they choose, which is find I suppose, but if they do already exist, from the dev adding them somewhere, or the user, then format_keyword should probably just return the value sent to it.

ktunkiewicz commented 10 years ago

OK maybe you test it a little bit more and make a pull request then ? :-) I'll be online for few more hours so I'll merge pull requests