Skip to content

Commit

Permalink
Redo changes needed to hide Copy button.
Browse files Browse the repository at this point in the history
  • Loading branch information
XhmikosR committed Apr 28, 2015
1 parent 53c0323 commit 34ec7c6
Showing 1 changed file with 20 additions and 20 deletions.
40 changes: 20 additions & 20 deletions docs/assets/js/src/application.js
Original file line number Diff line number Diff line change
Expand Up @@ -145,31 +145,31 @@
.data('placement', 'top')
.attr('title', 'Copy to clipboard')
.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
zeroClipboard.on('complete', function () {
htmlBridge
.attr('title', 'Copied!')
.tooltip('fixTitle')
.tooltip('show')
.attr('title', 'Copy to clipboard')
.tooltip('fixTitle')
// 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
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 () {
htmlBridge
.attr('title', 'Flash required')
.tooltip('fixTitle')
.tooltip('show')
})
$('.zero-clipboard').remove()
ZeroClipboard.destroy()
});

})

Expand Down

0 comments on commit 34ec7c6

Please sign in to comment.