зеркало из https://github.com/nextcloud/server.git
Make unshare work from dropdown
This commit is contained in:
Родитель
6d25943f2f
Коммит
c65046773d
|
@ -4,7 +4,7 @@ $RUNTIME_NOAPPS = true;
|
|||
require_once('../../../lib/base.php');
|
||||
require_once('../lib_share.php');
|
||||
|
||||
$source = $_GET['source'];
|
||||
$source = "/".OC_User::getUser()."/files".$_GET['source'];
|
||||
$uid_shared_with = $_GET['uid_shared_with'];
|
||||
OC_Share::unshare($source, $uid_shared_with);
|
||||
|
||||
|
|
|
@ -33,7 +33,7 @@ $(document).ready(function() {
|
|||
if (!($(event.target).hasClass('drop')) && $(event.target).parents().index($('#dropdown')) == -1) {
|
||||
if ($('#dropdown').is(':visible')) {
|
||||
$('#dropdown').hide('blind', function() {
|
||||
$('#dropdown').remove();
|
||||
$('#dropdown').remove();S
|
||||
$('tr').removeClass('mouseOver');
|
||||
});
|
||||
}
|
||||
|
@ -51,7 +51,7 @@ $(document).ready(function() {
|
|||
cache: false,
|
||||
data: data,
|
||||
success: function() {
|
||||
addUser(uid_shared_with, 0, false);
|
||||
addUser(uid_shared_with, permissions, false);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
@ -80,13 +80,12 @@ $(document).ready(function() {
|
|||
data: data
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
$('.unshare').live('click', function(event) {
|
||||
// TODO Fix unshare
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
var user = $(this).parent();
|
||||
var source = $('#dropdown').data('file');
|
||||
var uid_shared_with = $(this).parent().data('uid_shared_with');
|
||||
var uid_shared_with = user.data('uid_shared_with');
|
||||
var data = 'source='+encodeURIComponent(source)+'&uid_shared_with='+encodeURIComponent(uid_shared_with);
|
||||
$.ajax({
|
||||
type: 'GET',
|
||||
|
@ -94,7 +93,10 @@ $(document).ready(function() {
|
|||
cache: false,
|
||||
data: data,
|
||||
success: function() {
|
||||
$(this).parent().remove();
|
||||
var option = "<option value='"+uid_shared_with+"'>"+uid_shared_with+"</option>";
|
||||
$(user).remove();
|
||||
$(option).appendTo('#share_with');
|
||||
$('#share_with').trigger('liszt:updated');
|
||||
}
|
||||
});
|
||||
});
|
||||
|
|
|
@ -21,7 +21,7 @@ $(document).ready(function() {
|
|||
});
|
||||
|
||||
// Sets the file link behaviour :
|
||||
$('td.filename a').live('click',function(event) {
|
||||
$('td.filename.name a').live('click',function(event) {
|
||||
event.preventDefault();
|
||||
var filename=$(this).parent().parent().data('file');
|
||||
if(!FileList.isLoading(filename)){
|
||||
|
|
Загрузка…
Ссылка в новой задаче