diff options
-rw-r--r-- | apps/files_sharing/js/share.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/apps/files_sharing/js/share.js b/apps/files_sharing/js/share.js index ac1209956d6..a1fa3bb4586 100644 --- a/apps/files_sharing/js/share.js +++ b/apps/files_sharing/js/share.js @@ -200,13 +200,13 @@ OC.Share={ $('#emailButton').hide(); }, emailPrivateLink:function() { + var link = $('#privateLinkText').val(); + var file = link.substr(link.lastIndexOf('/') + 1).replace(/%20/g, ' '); + $.post(OC.filePath('files_sharing', 'ajax', 'email.php'), { toaddress: $('#email').val(), link: link, file: file } ); $('#email').css('font-weight', 'bold'); $('#email').animate({ fontWeight: 'normal' }, 2000, function() { $(this).val(''); }).val('Email sent'); - var link = $('#privateLinkText').val(); - var file = link.substr(link.lastIndexOf('/') + 1).replace(/%20/g, ' '); - $.post(OC.filePath('files_sharing', 'ajax', 'email.php'), { toaddress: $('#email').val(), link: link, file: file } ); }, dirname:function(path) { return path.replace(/\\/g,'/').replace(/\/[^\/]*$/, ''); |