Viewing 15 replies - 1 through 15 (of 23 total)
  • Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi,

    thanks for your question, and sorry for the trouble.

    Yes, this should be possible with a small modification in the “tablepress-datatables-row-details.php” file. In lines 200 and 201, please change

    {$name}.find('tbody').on( 'click', '.row-details-toggle div', function() {
    	var	row = $(this).toggleClass('row-details-open').toggleClass('row-details-close').parents('tr').toggleClass('row-details-row-open')[0];

    to

    {$name}.find('tbody').on( 'click', 'tr', function() {
    	var	row = $(this).find('.row-details-toggle div').toggleClass('row-details-open').toggleClass('row-details-close').parents('tr').toggleClass('row-details-row-open')[0];

    Regards,
    Tobias

    Thread Starter makeUbleed

    (@makeubleed)

    Hi @tobiasbg

    Thanks for your answer. What if plugin updates, all the changes that I made will be overwriten. Any update about this issue? Thanks again…

    Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi,

    yes, if the Extension is updated, those changes would be overwritten.
    However, as the Extension is not in the WordPress plugin directory, there will be no automatic updates, i.e. you’d have to manually update anyways. To prevent losing the changes, you could then maybe also add a reminder in the PHP file or in an extra readme.txt file in the folder or something.

    Regards,
    Tobias

    Thread Starter makeUbleed

    (@makeubleed)

    Yeah, thanks man, that would be all. Thanks for everything…

    Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi,

    no problem, you are very welcome! ?? Good to hear that this helped!

    Best wishes,
    Tobias

    Thread Starter makeUbleed

    (@makeubleed)

    Hey Bro

    One more question. How to expand only one row at a time? That would be my final question. Thanks…

    Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi,

    Do you mean that an expanded row should basically get closed automatically, when another one is opened?

    For that, it should be enough to add this new line after line 200 in tablepress-datatables-row-details.php file:

    var open_row = $('.row-details-row-open')[0];
    if ( open_row && {$datatables_name}.fnIsOpen( open_row ) ) {
    	{$datatables_name}.fnClose( open_row );
    }

    (I haven’t tested this, however.)

    Regards,
    Tobias

    Thread Starter makeUbleed

    (@makeubleed)

    Nope, not working…anything better (maybe you can test if it works)? Thanks…

    Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi,

    can you then please post a link to the page with the table where this problem happens, so that I can take a direct look and maybe find errors? Thanks!

    Unfortunately, I can’t test this on my own sites, as I’m just too busy. This would simply exceed the amount of free support that I can give. Thanks for your understanding.

    Regards,
    Tobias

    Thread Starter makeUbleed

    (@makeubleed)

    Yeah sure, here’s the link:

    https://pristina.ackosovo.com/get-involved/meet-our-volunteers

    After you click the third row, it doesn’t collapse all other opened rows. That is my final request for help. Thanks again for everything…

    Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi,

    ok, can you please try again with this:
    1. Remove the line

    var open_row = $('.row-details-row-open')[0];

    again.

    2. Add the line

    var open_row = $('.row-details-row-open').find('.row-details-toggle div').toggleClass('row-details-open').toggleClass('row-details-close').parents('tr').toggleClass('row-details-row-open')[0];

    before the line

    var row = $(this).find('.row-details-toggle div').toggleClass('row-details-open').toggleClass('row-details-close').parents('tr').toggleClass('row-details-row-open')[0];

    Regards,
    Tobias

    Thread Starter makeUbleed

    (@makeubleed)

    Yeah…that works now.

    Thanks a milion.

    I will make a small donation soon.

    Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi,

    great! Thanks for the confirmation!
    And thanks for wanting to donate, I really appreciate it!

    Best wishes,
    Tobias

    Hello Tobias!
    I’ve done all advice on the first and the second your advice. All works for me as well as he:
    https://pristina.ackosovo.com/get-involved/meet-our-volunteers
    I’d like that would make only the second advice without first council. What would “+” and “-” controls the opening and closing “row_details”. But I do not know PHP. Extension “row_details” from my changes destroyed.
    Can you help me?

    Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi Arkona,

    I’m not really sure what you mean. From what I can see, everything is working. There will always be one row open.

    Regards,
    Tobias

Viewing 15 replies - 1 through 15 (of 23 total)
  • The topic ‘Make entire row expand – Extension: Row Details?’ is closed to new replies.