aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2013-09-18 13:09:47 +0200
committerThomas Müller <thomas.mueller@tmit.eu>2013-09-18 13:09:47 +0200
commit20a43d1982188cee9fed5342ad5ade0a3d21d0f9 (patch)
treeea04d058c161cbbf6c73805cc009b246bb307ed5
parent6ed2df11fcfbd632c9702fe3e04569fcb456f972 (diff)
downloadnextcloud-server-20a43d1982188cee9fed5342ad5ade0a3d21d0f9.tar.gz
nextcloud-server-20a43d1982188cee9fed5342ad5ade0a3d21d0f9.zip
remove file action elements before recreating them
-rw-r--r--apps/files/js/fileactions.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/apps/files/js/fileactions.js b/apps/files/js/fileactions.js
index 330fe86f6b3..009ea62de93 100644
--- a/apps/files/js/fileactions.js
+++ b/apps/files/js/fileactions.js
@@ -68,6 +68,9 @@ var FileActions = {
if ($('tr[data-file="'+file+'"]').data('renaming')) {
return;
}
+
+ // recreate fileactions
+ parent.children('a.name').find('.fileactions').remove();
parent.children('a.name').append('<span class="fileactions" />');
var defaultAction = FileActions.getDefault(FileActions.getCurrentMimeType(), FileActions.getCurrentType(), FileActions.getCurrentPermissions());
@@ -117,6 +120,8 @@ var FileActions = {
addAction('Share', actions.Share);
}
+ // remove the existing delete action
+ parent.parent().children().last().find('.action.delete').remove();
if (actions['Delete']) {
var img = FileActions.icons['Delete'];
if (img.call) {