Skip to:
Content
Pages
Categories
Search
Top
Bottom

Is Ajax in messages/index.php connected with the table?


  • peterverkooijen
    Participant

    @peterverkooijen

    I’m trying to restyle the Inbox in Messages because the horizontal layout doesn’t fit in my column.

    The form in template file messages/index.php is styled with a table. As soon as I take the table out and replace it with divs etc. the Ajax breaks, even if I keep all the IDs and classes in place.

    Is the Ajax connected with the table itself? Where can I find the Javascript that does the mark as read/unread/delete stuff with the checkbox?

    EDIT: I see in Firebug under DOM that “something” is using this selector:

    #message-threads tr td input[type='checkbox']

    It’s in _inc/js/ajax.js:

    j("a#delete_sentbox_messages").click(
    function() {
    checkboxes_tosend = '';
    checkboxes = j("#message-threads tr td input[type='checkbox']");

    The Ajax code that follows is full with table#…, tr#… and td#… Was that really necessary? Can’t you just reference an element with just the ID of the element itself?

Viewing 2 replies - 1 through 2 (of 2 total)

  • peterverkooijen
    Participant

    @peterverkooijen

    After painstakingly removing all the table, tr and td from ajax.js the form now works without tables, giving me a lot more freedom to restyle it.

    I’ve also replaced this

    checkboxes = j("#message-threads tr td input[type='checkbox']");

    With this

    checkboxes = j("#inboxcheck");

    and added id=”inboxcheck” to the input tag in index.php.

    It works fine. It actually seems faster.

    I guess the broken delete buttons in 1.1.3 had the same cause. I’ll revisit that next week…


    peterverkooijen
    Participant

    @peterverkooijen

    Unfortunately this

    checkboxes = j("#inboxcheck");

    kept breaking/never really worked to begin with.

    For my custom template I still had to resort to this:

    checkboxes = j("ul#message-threads li input[type='checkbox']");

    This stuff is fuzzy… :-(

    And now read/unread seems to be the wrong way around and the select dropdown does nothing… :`-(

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Is Ajax in messages/index.php connected with the table?’ is closed to new replies.
Skip to toolbar