summaryrefslogtreecommitdiffstats
path: root/apps/files_trashbin/js/filelist.js
blob: f42abb6d029dc9a526713754ae89e7d8a44ccaf7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
// override reload with own ajax call
FileList.reload = function(){
	FileList.showMask();
	if (FileList._reloadCall){
		FileList._reloadCall.abort();
	}
	$.ajax({
		url: OC.filePath('files_trashbin','ajax','list.php'),
		data: {
			dir : $('#dir').val(),
			breadcrumb: true
		},
		error: function(result) {
			FileList.reloadCallback(result);
		},
		success: function(result) {
			FileList.reloadCallback(result);
		}
	});
}

FileList.linkTo = function(dir){
	return OC.linkTo('files_trashbin', 'index.php')+"?dir="+ encodeURIComponent(dir).replace(/%2F/g, '/');
}

FileList.updateEmptyContent = function(){
	var $fileList = $('#fileList');
	var exists = $fileList.find('tr:first').exists();
	$('#emptycontent').toggleClass('hidden', exists);
	$('#filestable th').toggleClass('hidden', !exists);
}