diff options
| author | XhmikosR <[email protected]> | 2015-04-28 14:57:27 +0300 |
|---|---|---|
| committer | XhmikosR <[email protected]> | 2015-04-29 08:56:33 +0300 |
| commit | 07e76a571de1df4d92376d72a07000cd6d440789 (patch) | |
| tree | 1a9294700cf24466cf2128930a7438ec3748b26d /docs/assets/js/src/application.js | |
| parent | 438cae9d90449403c470686852b95934067f2c4d (diff) | |
| download | bootstrap-07e76a571de1df4d92376d72a07000cd6d440789.tar.xz bootstrap-07e76a571de1df4d92376d72a07000cd6d440789.zip | |
Redo changes needed to hide Copy button.
Diffstat (limited to 'docs/assets/js/src/application.js')
| -rw-r--r-- | docs/assets/js/src/application.js | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/docs/assets/js/src/application.js b/docs/assets/js/src/application.js index 465e1386b..56528367c 100644 --- a/docs/assets/js/src/application.js +++ b/docs/assets/js/src/application.js @@ -145,30 +145,30 @@ .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() }) }) |
