Removed useless copy actions (#661)

This commit is contained in:
Roman Kelesidis 2023-03-28 17:55:22 +07:00 committed by GitHub
commit f4bf7111bc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 9 additions and 4 deletions

View file

@ -118,6 +118,8 @@ $lang['LOADING'] = 'Loading...';
$lang['JUMPBOX_TITLE'] = 'Select forum';
$lang['DISPLAYING_OPTIONS'] = 'Displaying options';
$lang['COPY_TO_CLIPBOARD'] = 'Copy to clipboard';
// Global Header strings
$lang['REGISTERED_USERS'] = 'Registered Users:';
$lang['BROWSING_FORUM'] = 'Users browsing this forum:';

View file

@ -150,6 +150,8 @@ class Dev
*/
private static function get_sql_log_html(object $db_obj, string $log_name): string
{
global $lang;
$log = '';
foreach ($db_obj->dbg as $i => $dbg) {
@ -162,7 +164,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 class="copyElement" data-clipboard-target="#' . $id . '" title="Copy to clipboard" style="color: gray; letter-spacing: -1px;">' . $perc . '</span>'
. '<span class="copyElement" data-clipboard-target="#' . $id . '" title="' . $lang['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>'

View file

@ -957,6 +957,8 @@ class SqlDb
*/
public function explain($mode, $html_table = '', $row = '')
{
global $lang;
$query = str_compact($this->cur_query);
// remove comments
$query = preg_replace('#(\s*)(/\*)(.*)(\*/)(\s*)#', '', $query);
@ -998,7 +1000,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">&nbsp;' . $dbg['src'] . '&nbsp; [' . sprintf('%.4f', $dbg['time']) . ' s]&nbsp; <i>' . $dbg['info'] . '</i></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) . '&nbsp;</th>
<th class="copyElement" data-clipboard-target="#' . $htid . '" style="height: 22px; cursor: pointer;" align="right" title="' . $lang['COPY_TO_CLIPBOARD'] . '">' . "$this->db_server.$this->selected_db" . ' :: Query #' . ($this->num_queries + 1) . '&nbsp;</th>
</tr>
<tr><td colspan="2">' . $this->explain_hold . '</td></tr>
</table>

View file

@ -267,7 +267,7 @@ td.topic_id { cursor: pointer; }
<table width="100%">
<tr>
<td valign="bottom">
<h1 class="maintitle"><a href="{U_VIEW_FORUM}">{FORUM_NAME}</a>&nbsp;<a style="color: #800000;" data-clipboard-text="{FULL_URL}{U_VIEW_FORUM}" class="copyElement clickable" title="Copy to clipboard">&#8594;</a><!-- IF FORUM_DESC --><br><span style="font-size: 18px !important;">{FORUM_DESC}</span><!-- ENDIF --></h1>
<h1 class="maintitle"><a href="{U_VIEW_FORUM}">{FORUM_NAME}</a><!-- IF FORUM_DESC --><br><span style="font-size: 18px !important;">{FORUM_DESC}</span><!-- ENDIF --></h1>
<p class="small" id="moderators"><a style="text-decoration: none;" href="#">{L_MODERATORS}</a></p>
<script type="text/javascript">

View file

@ -140,7 +140,6 @@ ajax.callback.post_mod_comment = function(data) {
};
</script>
<a style="cursor: help; color: #800000;" title="{L_EDIT_TOPIC_TITLE}" onclick="edit_topic_title('edit'); return false" href="#">&para;</a>
<a style="color: #800000;" data-clipboard-text="{FULL_URL}{U_VIEW_TOPIC}" class="copyElement clickable" title="Copy to clipboard">&#8594;</a>
<div id="tt-edit-tpl" style="display: none;">
<div class="tt-edit" style="padding: 4px;">