Skip to content

Commit 3f0e6ed

Browse files
authored
Merge pull request #38 from azorpax/Add-title-attribute-when-ellipsis
Title attribute when ellipsis
2 parents 5e055b0 + b3c4a73 commit 3f0e6ed

File tree

4 files changed

+14
-4
lines changed

4 files changed

+14
-4
lines changed

src/resources/views/logger/partials/activity-table.blade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@
130130
{{ $activity->methodType }}
131131
</span>
132132
</td>
133-
<td class="ellipsis">
133+
<td>
134134
@if($hoverable)
135135
{{ showCleanRoutUrl($activity->route) }}
136136
@else

src/resources/views/partials/scripts.blade.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,6 @@
1515
@if (count($activities) > 10)
1616
@include('LaravelLogger::scripts.datatables')
1717
@endif
18-
@endif
18+
@endif
19+
20+
@include('LaravelLogger::scripts.add-title-attribute')

src/resources/views/partials/styles.blade.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@
2020
border: none;
2121
}
2222
23-
table > tbody td.ellipsis {
24-
max-width: 350px;
23+
div.activity-table table > tbody > tr > td {
24+
max-width: 300px;
2525
white-space: nowrap;
2626
overflow: hidden;
2727
text-overflow: ellipsis;
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<script type="text/javascript">
2+
$(document).on('mouseenter', "div.activity-table table > tbody > tr > td ", function () {
3+
var $this = $(this);
4+
if (this.offsetWidth < this.scrollWidth && !$this.attr('title')) {
5+
$this.attr('title', $this.text());
6+
}
7+
});
8+
</script>

0 commit comments

Comments
 (0)