AliHichem / AliDatatableBundle

Symfony2 Ajax Datagrid Bundle for doctrine2 entities
MIT License
112 stars 72 forks source link

Remove class on search field #130

Closed webkod3r closed 9 years ago

webkod3r commented 9 years ago

Hi, in search input with class .search_init when the control fires the blur event and you don't write anything the file vendor/ali/datatable/Ali/DatatableBundle/Resources/views/Internal/script.html.twig delete all classes (.form-control and .input-sm) leaving only .search_init in text-field.

.blur( function (i) {
        if ( this.value == "" ){
            this.className = "search_init";
            this.value = this.initVal;
        }
    })

What is the best solution for this issue?

Thanks in advance. WK