summaryrefslogtreecommitdiffstats
path: root/apps/files_external/js/dropbox.js
diff options
context:
space:
mode:
Diffstat (limited to 'apps/files_external/js/dropbox.js')
-rw-r--r--apps/files_external/js/dropbox.js19
1 files changed, 15 insertions, 4 deletions
diff --git a/apps/files_external/js/dropbox.js b/apps/files_external/js/dropbox.js
index cc6a37d0511..824c47d9f6d 100644
--- a/apps/files_external/js/dropbox.js
+++ b/apps/files_external/js/dropbox.js
@@ -36,9 +36,20 @@ $(document).ready(function() {
}
});
- $('#externalStorage tbody tr input').live('keyup', function() {
- var tr = $(this).parent().parent();
- if ($(tr).hasClass('OC_Filestorage_Dropbox') && $(tr).find('[data-parameter="configured"]').val() != 'true') {
+ $('#externalStorage tbody tr.OC_Filestorage_Dropbox td').live('paste', function() {
+ var tr = $(this).parent();
+ setTimeout(function() {
+ showButton(tr);
+ }, 20);
+ });
+
+ $('#externalStorage tbody tr.OC_Filestorage_Dropbox td').live('keyup', function() {
+ showButton($(this).parent().parent());
+
+ });
+
+ function showButton(tr) {
+ if ($(tr).find('[data-parameter="configured"]').val() != 'true') {
var config = $(tr).find('.configuration');
if ($(tr).find('.mountPoint input').val() != '' && $(config).find('[data-parameter="app_key"]').val() != '' && $(config).find('[data-parameter="app_secret"]').val() != '') {
if ($(tr).find('.dropbox').length == 0) {
@@ -50,7 +61,7 @@ $(document).ready(function() {
$(tr).find('.dropbox').hide();
}
}
- });
+ }
$('.dropbox').live('click', function(event) {
event.preventDefault();