volosoft / jtable

A JQuery plugin to create AJAX based CRUD tables.
http://www.jtable.org
1.1k stars 505 forks source link

Custom CSS #384

Open Vadorequest opened 11 years ago

Vadorequest commented 11 years ago

Hi,

I have a problem with JTable css and a template I need to use.

jtable-css

I tried to fix it with the event formCreated like that:

/**
 * @name defaultFormCreated
 * @desc This event is raised when an edit or create form is created for a record. 
 *          You can reach the form using the data.form argument. 
 *          You can get type of the form using the data.formType argument. 
 *          It can be 'edit' or 'create'. 
 *          If formType is edit, you can reach the editing record using the data.record argument 
 *          (for example, you can get the name of the editing person as data.record.Name).
 * 
 * @param event - string - The event called.
 * @param data - object - Datas.
 * 
 * @author Dhenain Ambroise
 * @date 24/07/2012
 * @lastUpdate 13/03/2013
 */
function defaultFormCreated(event, data){
    // Launch the validation engine.
    data.form.validationEngine();

    // Save in realtime entries.
    $j('#jtable-'+data.formType+'-form').formBackUp();

    if(config.theme == 'backoffice'){
        // Go to bottom 55px for see the header of jtable.
        $j('#'+data.form[0].id).parent().parent().css('top', '55px')
    }
}

It's works but only few milliseconds, after the style is applied by Jtable, I don't know where.

How I can manage that ? Do you have any idea ? (I think to use setTimeout for apply the style after jtable applied his style but ... I prefer a clean solution ^^

Thanks for the help ;)

PS: I can't update the style of my template, tried.

Vadorequest commented 11 years ago

Other thing, I need to grow the white container (watch the screenshot) who contains the form. But juste the container, not the inputs, because when I've error with jquery.Validation (the API used with css classes) only one part of the error is visible, not the entire line.

So, what I can change for display the entire error ?

Thx :)