aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files/js/fileactions.js
diff options
context:
space:
mode:
authorkondou <kondou@ts.unde.re>2013-08-18 00:38:52 +0200
committerkondou <kondou@ts.unde.re>2013-08-18 00:38:52 +0200
commitedd92e4c09151238a89816186914f9382293ab9b (patch)
treee25d87cecf45ff2c2189198e5369f7754e01873a /apps/files/js/fileactions.js
parent1348330c7d75d2b60d845a43be57dedc6199ea1a (diff)
parent12f4494de02457d51004ca6a82c1b2160189819f (diff)
downloadnextcloud-server-edd92e4c09151238a89816186914f9382293ab9b.tar.gz
nextcloud-server-edd92e4c09151238a89816186914f9382293ab9b.zip
Merge branch 'master' into fix_jslint_kondou
Conflicts: apps/files/js/file-upload.js
Diffstat (limited to 'apps/files/js/fileactions.js')
-rw-r--r--apps/files/js/fileactions.js12
1 files changed, 5 insertions, 7 deletions
diff --git a/apps/files/js/fileactions.js b/apps/files/js/fileactions.js
index f05a320e72d..097fe521aa6 100644
--- a/apps/files/js/fileactions.js
+++ b/apps/files/js/fileactions.js
@@ -65,7 +65,7 @@ var FileActions = {
FileActions.currentFile = parent;
var actions = FileActions.get(FileActions.getCurrentMimeType(), FileActions.getCurrentType(), FileActions.getCurrentPermissions());
var file = FileActions.getCurrentFile();
- if ($('tr').filterAttr('data-file', file).data('renaming')) {
+ if ($('tr[data-file="'+file+'"]').data('renaming')) {
return;
}
parent.children('a.name').append('<span class="fileactions" />');
@@ -123,14 +123,11 @@ var FileActions = {
img = img(file);
}
if (typeof trashBinApp !== 'undefined' && trashBinApp) {
- var html = '<a href="#" original-title="' + t('files', 'Delete permanently') + '" class="action delete" />';
+ var html = '<a href="#" original-title="' + t('files', 'Delete permanently') + '" class="action delete delete-icon" />';
} else {
- var html = '<a href="#" original-title="' + t('files', 'Delete') + '" class="action delete" />';
+ var html = '<a href="#" class="action delete delete-icon" />';
}
var element = $(html);
- if (img) {
- element.append($('<img class ="svg" src="' + img + '"/>'));
- }
element.data('action', actions['Delete']);
element.on('click', {a: null, elem: parent, actionFunc: actions['Delete']}, actionHandler);
parent.parent().children().last().append(element);
@@ -164,10 +161,11 @@ $(document).ready(function () {
window.location = OC.filePath('files', 'ajax', 'download.php') + '?files=' + encodeURIComponent(filename) + '&dir=' + encodeURIComponent($('#dir').val());
});
}
-
$('#fileList tr').each(function () {
FileActions.display($(this).children('td.filename'));
});
+
+ $('#fileList').trigger(jQuery.Event("fileActionsReady"));
});