diff options
author | Roeland Jago Douma <roeland@famdouma.nl> | 2017-03-03 13:36:20 +0100 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2017-03-03 13:36:20 +0100 |
commit | 835b49d941009842f3d37fd62970feddde38d512 (patch) | |
tree | 91f5827295430dc4f6a6d781ad1398a48ba40508 | |
parent | fd71b8bde8fc003b0f160075825402c4fab1d54c (diff) | |
download | nextcloud-server-835b49d941009842f3d37fd62970feddde38d512.tar.gz nextcloud-server-835b49d941009842f3d37fd62970feddde38d512.zip |
Make sure copy tooltip remains when we have no social providers
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
-rw-r--r-- | core/js/sharedialoglinkshareview.js | 27 |
1 files changed, 22 insertions, 5 deletions
diff --git a/core/js/sharedialoglinkshareview.js b/core/js/sharedialoglinkshareview.js index 014819d5103..dc8644ab4cd 100644 --- a/core/js/sharedialoglinkshareview.js +++ b/core/js/sharedialoglinkshareview.js @@ -180,8 +180,13 @@ .tooltip({placement: 'bottom', trigger: 'manual'}) .tooltip('show'); _.delay(function() { - $input.tooltip('hide') - .tooltip("destroy"); + $input.tooltip('hide'); + if (OC.Share.Social.Collection.size() == 0) { + $input.attr('data-original-title', t('core', 'Copy')) + .tooltip('fixTitle'); + } else { + $input.tooltip("destroy"); + } }, 3000); }); clipboard.on('error', function (e) { @@ -201,9 +206,13 @@ .tooltip({placement: 'bottom', trigger: 'manual'}) .tooltip('show'); _.delay(function () { - $input.tooltip('hide') - .attr('data-original-title', t('core', 'Copy')) - .tooltip("destroy"); + $input.tooltip('hide'); + if (OC.Share.Social.Collection.size() == 0) { + $input.attr('data-original-title', t('core', 'Copy')) + .tooltip('fixTitle'); + } else { + $input.tooltip("destroy"); + } }, 3000); }); @@ -431,6 +440,14 @@ popoverMenu: popover })); + if (OC.Share.Social.Collection.size() == 0) { + this.$el.find('.clipboardButton').tooltip({ + placement: 'bottom', + title: t('core', 'Copy'), + trigger: 'hover' + }); + } + this.delegateEvents(); return this; |