From a952d80ad9e57931f6a8fcb94ef6cab4f982149c Mon Sep 17 00:00:00 2001
From: Vincent Petry <pvince81@owncloud.com>
Date: Fri, 4 Apr 2014 16:43:35 +0200
Subject: [PATCH] Fix trashbin previews and "delete selected"

---
 apps/files_trashbin/js/filelist.js      | 6 +++---
 apps/files_trashbin/templates/index.php | 2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/apps/files_trashbin/js/filelist.js b/apps/files_trashbin/js/filelist.js
index 6c9b345086..d4445e11c8 100644
--- a/apps/files_trashbin/js/filelist.js
+++ b/apps/files_trashbin/js/filelist.js
@@ -49,8 +49,8 @@
 		}
 	};
 
-	var oldAdd = FileList.add;
-	FileList.add = function(fileData, options) {
+	var oldRenderRow = FileList._renderRow;
+	FileList._renderRow = function(fileData, options) {
 		options = options || {};
 		var dir = FileList.getCurrentDirectory();
 		var dirListing = dir !== '' && dir !== '/';
@@ -62,7 +62,7 @@
 			fileData.displayName = fileData.name;
 			fileData.name = fileData.name + '.d' + Math.floor(fileData.mtime / 1000);
 		}
-		return oldAdd.call(this, fileData, options);
+		return oldRenderRow.call(this, fileData, options);
 	};
 
 	FileList.linkTo = function(dir){
diff --git a/apps/files_trashbin/templates/index.php b/apps/files_trashbin/templates/index.php
index cb64ae9eaf..323e749553 100644
--- a/apps/files_trashbin/templates/index.php
+++ b/apps/files_trashbin/templates/index.php
@@ -29,7 +29,7 @@
 			<th id="headerDate">
 				<span id="modified"><?php p($l->t( 'Deleted' )); ?></span>
 				<span class="selectedActions">
-					<a href="" class="delete">
+					<a href="" class="delete-selected">
 						<?php p($l->t('Delete'))?>
 						<img class="svg" alt="<?php p($l->t('Delete'))?>"
 							src="<?php print_unescaped(OCP\image_path("core", "actions/delete.svg")); ?>" />
-- 
GitLab