Make sure copy tooltip remains when we have no social providers

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
This commit is contained in:
Roeland Jago Douma 2017-03-03 13:36:20 +01:00
parent fd71b8bde8
commit 835b49d941
No known key found for this signature in database
GPG Key ID: F941078878347C0C
1 changed files with 22 additions and 5 deletions

View File

@ -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;