Commit 07e76a57 authored by XhmikosR's avatar XhmikosR

Redo changes needed to hide Copy button.

parent 438cae9d
This diff is collapsed.
...@@ -145,30 +145,30 @@ ...@@ -145,30 +145,30 @@
.data('placement', 'top') .data('placement', 'top')
.attr('title', 'Copy to clipboard') .attr('title', 'Copy to clipboard')
.tooltip() .tooltip()
})
// Copy to clipboard
zeroClipboard.on('dataRequested', function (client) {
var highlight = $(this).parent().nextAll('.highlight').first()
client.setText(highlight.text())
})
// Notify copy success and reset tooltip title // Copy to clipboard
zeroClipboard.on('complete', function () { zeroClipboard.on('dataRequested', function (client) {
htmlBridge var highlight = $(this).parent().nextAll('.highlight').first()
.attr('title', 'Copied!') client.setText(highlight.text())
.tooltip('fixTitle') })
.tooltip('show')
.attr('title', 'Copy to clipboard') // Notify copy success and reset tooltip title
.tooltip('fixTitle') zeroClipboard.on('complete', function () {
htmlBridge
.attr('title', 'Copied!')
.tooltip('fixTitle')
.tooltip('show')
.attr('title', 'Copy to clipboard')
.tooltip('fixTitle')
})
}) })
// Notify copy failure // Hide copy button when no Flash is found
// or wrong Flash version is present
zeroClipboard.on('noflash wrongflash', function () { zeroClipboard.on('noflash wrongflash', function () {
htmlBridge $('.zero-clipboard').remove()
.attr('title', 'Flash required') ZeroClipboard.destroy()
.tooltip('fixTitle')
.tooltip('show')
}) })
}) })
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment