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

    (@tobiasbg)

    Hi,

    thanks for your question, and sorry for the trouble.

    This should be possible by faking the mouse click on the “+” symbol.
    For example, you could add

    $('#tablepress-123').find( '.row-3 .row-details-toggle div' ).trigger( 'click' );

    (with adjust table ID and row number)
    to the end of the JS code in the Extension’s PHP file.

    Regards,
    Tobias

    Thread Starter Arkona

    (@arkona)

    Thank you, Tobias.
    But then it will not work like this at all tables? And I wanted the comments were open only on one.

    Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi,

    no, as the selector uses the table ID, it only applies to that table ID (123 in the example).

    With the second sentence, do you mean that you want to close all other rows when an un-opened one is clicked?

    Regards,
    Tobias

    Thread Starter Arkona

    (@arkona)

    Thank you.
    I want the entire table, all rows were open. A user could close the rows after reading.

    Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi,

    to open all rows of the table by default, just change the code from above to

    $('#tablepress-123').find( '.row-details-toggle div' ).trigger( 'click' );

    Regards,
    Tobias

    Thread Starter Arkona

    (@arkona)

    Thank you, Tobias!
    The file tablepress-datatables-row-details.php has 159 rows.
    I pastes this line before the line 150
    `$(‘#tablepress-13’).find( ‘.row-details-toggle div’ ).trigger( ‘click’ );
    {$name}.find(‘tbody’).on( ‘click’, ‘.row-details-toggle div’, function() {`
    It did not work. No changes.
    Where to insert a row?

    Thread Starter Arkona

    (@arkona)

    And another question:
    For the opening of the field in the table with DataTables Row Details introduce custom CSS

    .tablepress-id-12 .column-4 {
    	text-align: justify;
    	text-indent: 30px;
    }

    Nothing changes

    Thread Starter Arkona

    (@arkona)

    Brilliant!
    Thank you very much!
    Your line worked. Table opens. Can cache was to blame.
    And what if I want to open another table?
    Remains a problem with CSS

    Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi,

    no, that’s too early for that code. Please try putting it right before the

    JS;

    line.
    If you want this on another table as well, change

    $('#tablepress-123')

    to

    $('#tablepress-123, #tablepress-456')

    About the CSS: Please post a link to the page with the table, so that I can investigate this directly.

    Regards,
    Tobias

    Thread Starter Arkona

    (@arkona)

    “no, that’s too early for that code. Please try putting it right before the JS;”
    Moved line – stopped working. And at the same place (line 150) works well.
    You can look here to see prices

    Thread Starter Arkona

    (@arkona)

    Paste the link did not work

    Thread Starter Arkona

    (@arkona)

    Paste the link did not work
    https://www.pl17yar.ru/for-tobias/

    Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi,

    ah, ok. I see. You are lucky that it works, because you are having two tables on this page (11 and 13) that uses the “Row Details” Extension.
    That’s why the line is actually inserted twice, and the second one will trigger the rows to open.
    If you only have one table on the page with Row Details, you must move the line of code.

    About the CSS:
    What exactly are you trying to do here? Indent the URL? You’ll need to use .column-4 for that.

    Regards,
    Tobias

    Thread Starter Arkona

    (@arkona)

    It depends on the number of tables on the page?
    But you’re right. Delete second table – stopped working.
    Moved code – earned. That’s interesting.
    Column with УРЛ – 4
    CSS does not listen to the fourth column, which is connected a shortcode.
    [table id=13 datatables_row_details=true datatables_row_details_columns="4" /]

    .tablepress-id-13 .column-4 {
    	text-align: justify;
    	text-indent: 30px;
    }

    does not work

    Thread Starter Arkona

    (@arkona)

    Column with УРЛ – 3

Viewing 15 replies - 1 through 15 (of 18 total)
  • The topic ‘Question of DataTables Row Details’ is closed to new replies.