Laravel-log-viewer: Can't copy text from log detail

Created on 30 Oct 2018  ·  3Comments  ·  Source: rap2hpoutre/laravel-log-viewer

When have one click it will toggle close or open.
It's really hard to copy or select text inside log view detail.

Most helpful comment

after you publish views

php artisan vendor:publish \
  --provider="Rap2hpoutre\LaravelLogViewer\LaravelLogViewerServiceProvider" \
  --tag=views

go to resources/views/vendor/laravel-log-viewer/log.blade.php

Change

$('.table-container tr').on('click', function () {
      $('#' + $(this).data('display')).toggle();
    });

To

$('.table-container button').on('click', function () {
        $('#' + $(this).data('display')).toggle();
      });

now the small fa-search button will be toggle to expand row.

Also you can change

<button type="button"
        class="float-right expand btn btn-outline-dark btn-sm mb-2 ml-2" 
        data-display="stack{{{$key}}}">
        <span class="fa fa-search"></span>
</button>

fa fa-search to fa fa-expand or fas fa-expand-arrows-alt if you are using Font Awesome 5+ for better UX.

All 3 comments

Yes I totally agree! I should not have accepted this PR: https://github.com/rap2hpoutre/laravel-log-viewer/pull/91 😅. Still it was asked a few time. Maybe users will complain if I remove it now... I don't know what to do!

i understand, should be a toggle button on top right side to expand or collapse

after you publish views

php artisan vendor:publish \
  --provider="Rap2hpoutre\LaravelLogViewer\LaravelLogViewerServiceProvider" \
  --tag=views

go to resources/views/vendor/laravel-log-viewer/log.blade.php

Change

$('.table-container tr').on('click', function () {
      $('#' + $(this).data('display')).toggle();
    });

To

$('.table-container button').on('click', function () {
        $('#' + $(this).data('display')).toggle();
      });

now the small fa-search button will be toggle to expand row.

Also you can change

<button type="button"
        class="float-right expand btn btn-outline-dark btn-sm mb-2 ml-2" 
        data-display="stack{{{$key}}}">
        <span class="fa fa-search"></span>
</button>

fa fa-search to fa fa-expand or fas fa-expand-arrows-alt if you are using Font Awesome 5+ for better UX.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

watermelonjuice picture watermelonjuice  ·  8Comments

akoepcke picture akoepcke  ·  9Comments

hmrneves1 picture hmrneves1  ·  3Comments

mstaack picture mstaack  ·  6Comments

judgej picture judgej  ·  9Comments