summaryrefslogtreecommitdiffstats
path: root/apps/files_external/js
diff options
context:
space:
mode:
authorMichael Gapczynski <mtgap@owncloud.com>2012-12-26 14:04:02 -0500
committerMichael Gapczynski <mtgap@owncloud.com>2012-12-26 14:04:02 -0500
commit48a3966ea979a56e9277f588d6001c47e8a9c606 (patch)
tree887c53a98e9e2ce11225ed3ff66f6fb2eec67dce /apps/files_external/js
parent5d68e04e5a43d6d6f52ff511f899bc831a6aa4be (diff)
downloadnextcloud-server-48a3966ea979a56e9277f588d6001c47e8a9c606.tar.gz
nextcloud-server-48a3966ea979a56e9277f588d6001c47e8a9c606.zip
Listen to paste events for dropbox configuration
Diffstat (limited to 'apps/files_external/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();