summaryrefslogtreecommitdiffstats
path: root/apps/files/js/filelist.js
diff options
context:
space:
mode:
Diffstat (limited to 'apps/files/js/filelist.js')
-rw-r--r--apps/files/js/filelist.js19
1 files changed, 10 insertions, 9 deletions
diff --git a/apps/files/js/filelist.js b/apps/files/js/filelist.js
index d8b8916752d..09cb3d3287d 100644
--- a/apps/files/js/filelist.js
+++ b/apps/files/js/filelist.js
@@ -1308,9 +1308,9 @@
}
_.each(fileNames, function(fileName) {
var $tr = self.findFileEl(fileName);
- var $td = $tr.children('td.filename');
- var oldBackgroundImage = $td.css('background-image');
- $td.css('background-image', 'url('+ OC.imagePath('core', 'loading.gif') + ')');
+ var $thumbEl = $tr.find('.thumbnail');
+ var oldBackgroundImage = $thumbEl.css('background-image');
+ $thumbEl.css('background-image', 'url('+ OC.imagePath('core', 'loading.gif') + ')');
// TODO: improve performance by sending all file names in a single call
$.post(
OC.filePath('files', 'ajax', 'move.php'),
@@ -1352,7 +1352,7 @@
} else {
OC.dialogs.alert(t('files', 'Error moving file'), t('files', 'Error'));
}
- $td.css('background-image', oldBackgroundImage);
+ $thumbEl.css('background-image', oldBackgroundImage);
}
);
});
@@ -1413,13 +1413,14 @@
try {
var newName = input.val();
+ var $thumbEl = tr.find('.thumbnail');
input.tipsy('hide');
form.remove();
if (newName !== oldname) {
checkInput();
// mark as loading (temp element)
- td.css('background-image', 'url('+ OC.imagePath('core', 'loading.gif') + ')');
+ $thumbEl.css('background-image', 'url('+ OC.imagePath('core', 'loading.gif') + ')');
tr.attr('data-file', newName);
var basename = newName;
if (newName.indexOf('.') > 0 && tr.data('type') !== 'dir') {
@@ -1842,7 +1843,7 @@
var translatedText = n('files', 'Uploading %n file', 'Uploading %n files', currentUploads);
if (currentUploads === 1) {
var img = OC.imagePath('core', 'loading.gif');
- data.context.find('td.filename').attr('style','background-image:url('+img+')');
+ data.context.find('.thumbnail').css('background-image', 'url(' + img + ')');
uploadText.text(translatedText);
uploadText.show();
} else {
@@ -1881,7 +1882,7 @@
var translatedText = n('files', 'Uploading %n file', 'Uploading %n files', currentUploads);
if (currentUploads === 0) {
var img = OC.imagePath('core', 'filetypes/folder');
- data.context.find('td.filename').attr('style','background-image:url('+img+')');
+ data.context.find('.thumbnail').css('background-image', 'url(' + img + ')');
uploadText.text(translatedText);
uploadText.hide();
} else {
@@ -1966,7 +1967,7 @@
//cleanup uploading to a dir
var uploadText = $('tr .uploadtext');
var img = OC.imagePath('core', 'filetypes/folder');
- uploadText.parents('td.filename').attr('style','background-image:url('+img+')');
+ uploadText.parents('td.filename').find('.thumbnail').css('background-image', 'url(' + img + ')');
uploadText.fadeOut();
uploadText.attr('currentUploads', 0);
}
@@ -1980,7 +1981,7 @@
//cleanup uploading to a dir
var uploadText = $('tr .uploadtext');
var img = OC.imagePath('core', 'filetypes/folder');
- uploadText.parents('td.filename').attr('style','background-image:url('+img+')');
+ uploadText.parents('td.filename').find('.thumbnail').css('background-image', 'url(' + img + ')');
uploadText.fadeOut();
uploadText.attr('currentUploads', 0);
}