|
|
@ -202,11 +202,19 @@ OC.Share={ |
|
|
|
emailPrivateLink:function() { |
|
|
|
emailPrivateLink:function() { |
|
|
|
var link = $('#privateLinkText').val(); |
|
|
|
var link = $('#privateLinkText').val(); |
|
|
|
var file = link.substr(link.lastIndexOf('/') + 1).replace(/%20/g, ' '); |
|
|
|
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 } ); |
|
|
|
var email = $('#email').val(); |
|
|
|
$('#email').css('font-weight', 'bold'); |
|
|
|
if (email != '') { |
|
|
|
$('#email').animate({ fontWeight: 'normal' }, 2000, function() { |
|
|
|
$.post(OC.filePath('files_sharing', 'ajax', 'email.php'), { toaddress: email, link: link, file: file }, function(result) { |
|
|
|
$(this).val(''); |
|
|
|
if (result && result.status == 'success') { |
|
|
|
}).val('Email sent'); |
|
|
|
$('#email').css('font-weight', 'bold'); |
|
|
|
|
|
|
|
$('#email').animate({ fontWeight: 'normal' }, 2000, function() { |
|
|
|
|
|
|
|
$(this).val(''); |
|
|
|
|
|
|
|
}).val('Email sent'); |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
OC.dialogs.alert(result.data.message, 'Error while sharing'); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
dirname:function(path) { |
|
|
|
dirname:function(path) { |
|
|
|
return path.replace(/\\/g,'/').replace(/\/[^\/]*$/, ''); |
|
|
|
return path.replace(/\\/g,'/').replace(/\/[^\/]*$/, ''); |
|
|
|