Trash: disable text editor from trash for now

This commit is contained in:
Robin Appelman 2013-02-27 20:37:50 +01:00
parent f497970e30
commit 923c51773a
1 changed files with 4 additions and 0 deletions

View File

@ -142,11 +142,15 @@ $(document).ready(function() {
}); });
$('#fileList').on('click', 'td.filename a', function(event) { $('#fileList').on('click', 'td.filename a', function(event) {
event.preventDefault();
var filename = $(this).parent().parent().attr('data-file'); var filename = $(this).parent().parent().attr('data-file');
var tr = $('tr').filterAttr('data-file',filename); var tr = $('tr').filterAttr('data-file',filename);
var renaming = tr.data('renaming'); var renaming = tr.data('renaming');
if(!renaming && !FileList.isLoading(filename)){ if(!renaming && !FileList.isLoading(filename)){
var mime = $(this).parent().parent().data('mime'); var mime = $(this).parent().parent().data('mime');
if(mime.substr(0, 5) === 'text/'){ //no texteditor for now
return;
}
var type = $(this).parent().parent().data('type'); var type = $(this).parent().parent().data('type');
var permissions = $(this).parent().parent().data('permissions'); var permissions = $(this).parent().parent().data('permissions');
var action = FileActions.getDefault(mime, type, permissions); var action = FileActions.getDefault(mime, type, permissions);