Change AJAX url - Page 2

Change AJAX url

2»

Answers

  • rpmccormickrpmccormick Posts: 136Questions: 18Answers: 0

    I just noticed on this page:
    http://editor.datatables.net/reference/option/formOptions.inline

    You list the options one of which is:

    onBackground:  'blur',   // Always true for inline editing
    

    preBlur should work great, but as an alternate approach, I was just curious if you can overwrite the onBackground and tell it not to blur in the firsts place?

  • rpmccormickrpmccormick Posts: 136Questions: 18Answers: 0

    One last comment about inline editing (sorry to be so hard on it)...

    If I click on an inline-edit, and then immediately click out of it, Editor still does a full update sending data to the php, and re-retrieving the whole row. This seems wasteful... The javascript side of it should save the old value when beginning the inline-edit, and when the edit is over compare. If the inline-edit did not return a new value, then it should not need to speak to the PHP at all.

  • allanallan Posts: 63,498Questions: 1Answers: 10,470 Site admin
    Answer ✓

    Currently no, as the documentation notes, it is not possible to alter oBackground for inline editing. To be honest, I'm not entirely sure why I did that - it might be a legacy aspect of inline editing that is time for a review, which I've made a note to do.

    Editor still does a full update sending data to the php, and re-retrieving the whole row. This seems wasteful...

    1.5.0 will submit only the edited field, but currently still expects the full row to be returned. I'm going to review that for 1.5.1.

    Allan

  • allanallan Posts: 63,498Questions: 1Answers: 10,470 Site admin

    I know this is a fairly old thread now, but the left join alias aspect has been on my list of things to look at. Editor 1.5.1 actually supports this already using the following set:

    Editor::inst( $db, 'users' )
        ->field( 
            Field::inst( 'users.primary_site' ),
            Field::inst( 'users.secondary_site' )
            Field::inst( 'primary.name' ),
            Field::inst( 'secondary.name' )
        )
        ->leftJoin( 'sites as primary',   'primary.id',   '=', 'users.site' )
        ->leftJoin( 'sites as secondary', 'secondary.id', '=', 'users.site' );
    

    I've just documented this and it will be pushed out to the site with the 1.5.2 update.

    Regards,
    Allan

This discussion has been closed.