diff --git a/src/DebugBar/Resources/widgets/sqlqueries/widget.css b/src/DebugBar/Resources/widgets/sqlqueries/widget.css
index 6ca25d3..46c2cc6 100644
--- a/src/DebugBar/Resources/widgets/sqlqueries/widget.css
+++ b/src/DebugBar/Resources/widgets/sqlqueries/widget.css
@@ -57,6 +57,10 @@ div.phpdebugbar-widgets-sqlqueries span.phpdebugbar-widgets-stmt-id:before {
}
div.phpdebugbar-widgets-sqlqueries span.phpdebugbar-widgets-copy-clipboard:before {
content: "\f0c5";
+ line-height: 1.5;
+}
+div.phpdebugbar-widgets-sqlqueries span.phpdebugbar-widgets-copy-clipboard-check:before {
+ content: "\f46c";
}
div.phpdebugbar-widgets-sqlqueries a.phpdebugbar-widgets-editor-link:before {
content: "\f08e";
diff --git a/src/DebugBar/Resources/widgets/sqlqueries/widget.js b/src/DebugBar/Resources/widgets/sqlqueries/widget.js
index 504629a..f5a9186 100644
--- a/src/DebugBar/Resources/widgets/sqlqueries/widget.js
+++ b/src/DebugBar/Resources/widgets/sqlqueries/widget.js
@@ -21,7 +21,10 @@
var copy = function () {
try {
document.execCommand('copy');
- alert('Query copied to the clipboard');
+ $(el).addClass(csscls('copy-clipboard-check'));
+ setTimeout(function(){
+ $(el).removeClass(csscls('copy-clipboard-check'));
+ }, 2000)
} catch (err) {
console.log('Oops, unable to copy');
}
@@ -116,7 +119,7 @@
li.addClass(csscls('error'));
li.append($('').addClass(csscls('error')).text("[" + stmt.error_code + "] " + stmt.error_message));
}
- if ((!stmt.type || stmt.type === 'query') && stmt.show_copy !== false) {
+ if ((!stmt.type || stmt.type === 'query')) {
$('')
.addClass(csscls('copy-clipboard'))
.css('cursor', 'pointer')