mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-14 02:27:34 -07:00
Fixed broken copy log from debug-panel
Исправляет напрочь нерабочую реализацию копирования данных из дебаг панели. По-моему ещё с SVN версий не работало 😁
+ Перспективы на будущее использование в коде при необходимости.
This commit is contained in:
parent
0bcb6b67a8
commit
3cf6e0974c
4 changed files with 12 additions and 2 deletions
|
@ -69,7 +69,7 @@ class Dev
|
|||
$log .= ''
|
||||
. '<div onmouseout="$(this).removeClass(\'sqlHover\');" onmouseover="$(this).addClass(\'sqlHover\');" onclick="$(this).toggleClass(\'sqlHighlight\');" class="sqlLogRow" title="' . $info . '">'
|
||||
. '<span style="letter-spacing: -1px;">' . $time . ' </span>'
|
||||
. '<span title="Copy to clipboard" onclick="$.copyToClipboard( $(\'#' . $id . '\').text() );" style="color: gray; letter-spacing: -1px;">' . $perc . '</span>'
|
||||
. '<span class="copyElement" data-clipboard-target="#' . $id . '" title="Copy to clipboard" style="color: gray; letter-spacing: -1px;">' . $perc . '</span>'
|
||||
. ' '
|
||||
. '<span style="letter-spacing: 0;" id="' . $id . '">' . $sql . '</span>'
|
||||
. '<span style="color: gray"> # ' . $info . ' </span>'
|
||||
|
|
|
@ -995,7 +995,7 @@ class SqlDb
|
|||
<table width="98%" cellpadding="0" cellspacing="0" class="bodyline row2 bCenter" style="border-bottom: 0;">
|
||||
<tr>
|
||||
<th style="height: 22px; cursor: pointer;" align="left"> ' . $dbg['src'] . ' [' . sprintf('%.4f', $dbg['time']) . ' s] <i>' . $dbg['info'] . '</i></th>
|
||||
<th style="height: 22px; cursor: pointer;" align="right" title="Copy to clipboard" onclick="$.copyToClipboard( $(\'#' . $htid . '\').text() );">' . "$this->db_server.$this->selected_db" . ' :: Query #' . ($this->num_queries + 1) . ' </th>
|
||||
<th class="copyElement" data-clipboard-target="#' . $htid . '" style="height: 22px; cursor: pointer;" align="right" title="Copy to clipboard">' . "$this->db_server.$this->selected_db" . ' :: Query #' . ($this->num_queries + 1) . ' </th>
|
||||
</tr>
|
||||
<tr><td colspan="2">' . $this->explain_hold . '</td></tr>
|
||||
</table>
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -64,6 +64,8 @@
|
|||
|
||||
<!-- ENDIF -->
|
||||
|
||||
<script type="text/javascript">new ClipboardJS('.copyElement');</script>
|
||||
|
||||
<!-- IF ONLOAD_FOCUS_ID -->
|
||||
<script type="text/javascript">
|
||||
$p('{ONLOAD_FOCUS_ID}').focus();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue