aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files/js/fileactions.js
diff options
context:
space:
mode:
authorThomas Mueller <thomas.mueller@tmit.eu>2013-01-18 23:22:34 +0100
committerThomas Mueller <thomas.mueller@tmit.eu>2013-01-18 23:22:34 +0100
commitafb5de955e00490be5762247e817b20722091f37 (patch)
tree035b826eacc5a21244c383075138731eaafeaebc /apps/files/js/fileactions.js
parent130c9cad030ca777e23ef70b76822553ea1c6411 (diff)
parent31cc9aa80d4284e13dc95d2ef1428bed78c22d65 (diff)
downloadnextcloud-server-afb5de955e00490be5762247e817b20722091f37.tar.gz
nextcloud-server-afb5de955e00490be5762247e817b20722091f37.zip
Merge branch 'master' into fixing-998-master
Conflicts: apps/files/ajax/upload.php apps/files/js/files.js
Diffstat (limited to 'apps/files/js/fileactions.js')
-rw-r--r--apps/files/js/fileactions.js14
1 files changed, 7 insertions, 7 deletions
diff --git a/apps/files/js/fileactions.js b/apps/files/js/fileactions.js
index 80b9c01f838..f5ee363a4c8 100644
--- a/apps/files/js/fileactions.js
+++ b/apps/files/js/fileactions.js
@@ -70,23 +70,23 @@ var FileActions = {
}
parent.children('a.name').append('<span class="fileactions" />');
var defaultAction = FileActions.getDefault(FileActions.getCurrentMimeType(), FileActions.getCurrentType(), FileActions.getCurrentPermissions());
-
+
var actionHandler = function (event) {
event.stopPropagation();
event.preventDefault();
FileActions.currentFile = event.data.elem;
var file = FileActions.getCurrentFile();
-
+
event.data.actionFunc(file);
};
-
+
$.each(actions, function (name, action) {
// NOTE: Temporary fix to prevent rename action in root of Shared directory
if (name === 'Rename' && $('#dir').val() === '/Shared') {
return true;
}
-
+
if ((name === 'Download' || action !== defaultAction) && name !== 'Delete') {
var img = FileActions.icons[name];
if (img.call) {
@@ -97,16 +97,16 @@ var FileActions = {
html += '<img class ="svg" src="' + img + '" /> ';
}
html += t('files', name) + '</a>';
-
+
var element = $(html);
element.data('action', name);
//alert(element);
element.on('click',{a:null, elem:parent, actionFunc:actions[name]},actionHandler);
parent.find('a.name>span.fileactions').append(element);
}
-
+
});
-
+
if (actions['Delete']) {
var img = FileActions.icons['Delete'];
if (img.call) {