Autocomplete / tags and AJAX - Page 2

Autocomplete / tags and AJAX

2»

Answers

  • allanallan Posts: 64,311Questions: 1Answers: 10,621 Site admin

    That's a really good point. I'd say that it should be the server that should decide if the client-side should be supplied with the options or not, since the server-side is authoritive on if the user is logged in and what permissions they have. Fields have ->set() and ->get() methods that can be used to control permissions - possibly Options should have something like that as well...!

    Allan

  • Loren MaxwellLoren Maxwell Posts: 439Questions: 103Answers: 10
    edited March 11

    Thanks, @allan -- mine might not be the best setup, but the way I handle it is that the server determines what the page will contain based on permissions and only visitors with editing permission are served the DataTable Editors.

    Essentially all visitors get served the DataTables but visitors with editing permissions also get served the Editors.

    There's obviously some client-side checking of permissions, such as whether to show the editing buttons, etc., but that's easily done without altering the data for table itself and I don't believe compromises security.

    Anyway -- I hope I can convince you to include an option to just do a quick AJAX call for some initial options! :smile:

    And thanks for the exceptional support!

  • Loren MaxwellLoren Maxwell Posts: 439Questions: 103Answers: 10

    CSS

    Setting fields.className to 'block' for tags seems to cause the dropdown to be placed lower than what it should be.

    This might be my CSS interfering, although I don't think it is . . .

  • Loren MaxwellLoren Maxwell Posts: 439Questions: 103Answers: 10
    edited March 20

    Just following up on the above post about the CSS.

    To duplicate, view the following link in mobile mode and create a new entry to see the dropdown for the country tags is too low for the control (see picture):
    https://editor.datatables.net/examples/dropdown/tags-rendering.html

    If there was an editor field below the country tag on the form then it would show between the country tag and the dropdown.

  • Loren MaxwellLoren Maxwell Posts: 439Questions: 103Answers: 10

    Processing indicator for AJAX
    Another request for AJAX -- a processing indicator on the table showing the options for when loading is slow.

  • allanallan Posts: 64,311Questions: 1Answers: 10,621 Site admin

    That's a good idea!

    Sorry I've not managed to work on these changes yet - I'm working on a new extension for DataTables at the moment. Once done I'll be circling back to this!

    Allan

  • Loren MaxwellLoren Maxwell Posts: 439Questions: 103Answers: 10

    @allan -- I'm just using this thread to capture everything in one place.

    I'm looking forward to when you get a chance to look at these suggestions but I'm excited to hear you're working on a new extension as well!

Sign In or Register to comment.