aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--apps/files/js/files.js12
-rw-r--r--core/js/oc-dialogs.js2
2 files changed, 9 insertions, 5 deletions
diff --git a/apps/files/js/files.js b/apps/files/js/files.js
index afbb14c5e00..76f19b87cbc 100644
--- a/apps/files/js/files.js
+++ b/apps/files/js/files.js
@@ -627,11 +627,15 @@ function getPathForPreview(name) {
return path;
}
-function lazyLoadPreview(path, mime, ready) {
+function lazyLoadPreview(path, mime, ready, width, height) {
getMimeIcon(mime,ready);
- var x = $('#filestable').data('preview-x');
- var y = $('#filestable').data('preview-y');
- var previewURL = OC.Router.generate('core_ajax_preview', {file: encodeURIComponent(path), x:x, y:y});
+ if (!width) {
+ width = $('#filestable').data('preview-x');
+ }
+ if (!height) {
+ height = $('#filestable').data('preview-y');
+ }
+ var previewURL = OC.Router.generate('core_ajax_preview', {file: encodeURIComponent(path), x:width, y:height});
$.get(previewURL, function() {
previewURL = previewURL.replace('(','%28');
previewURL = previewURL.replace(')','%29');
diff --git a/core/js/oc-dialogs.js b/core/js/oc-dialogs.js
index 7ca94dcbaa4..d661a871a5f 100644
--- a/core/js/oc-dialogs.js
+++ b/core/js/oc-dialogs.js
@@ -296,7 +296,7 @@ var OCdialogs = {
var path = getPathForPreview(original.name);
lazyLoadPreview(path, original.type, function(previewpath){
conflict.find('.original .icon').css('background-image','url('+previewpath+')');
- });
+ }, 96, 96);
getCroppedPreview(replacement).then(
function(path){
conflict.find('.replacement .icon').css('background-image','url(' + path + ')');