summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2015-06-02 09:36:51 +0200
committerMorris Jobke <hey@morrisjobke.de>2015-06-02 09:36:51 +0200
commitd2f3710ede1fa72658a4c12264a90a1936faf9ca (patch)
tree1a1593b02c9af77986d3a1ea8d6ada1853158de1 /core
parentcf2c599218f01c1351cee2e4e48ee4b430f55287 (diff)
parentf05ac47eb65c1bb418d89636c660093c79e4bef5 (diff)
downloadnextcloud-server-d2f3710ede1fa72658a4c12264a90a1936faf9ca.tar.gz
nextcloud-server-d2f3710ede1fa72658a4c12264a90a1936faf9ca.zip
Merge pull request #16623 from owncloud/oparoz-fix-file-conflict-preview
Get a 96x96 preview for file conflict resolution
Diffstat (limited to 'core')
-rw-r--r--core/js/oc-dialogs.js14
1 files changed, 11 insertions, 3 deletions
diff --git a/core/js/oc-dialogs.js b/core/js/oc-dialogs.js
index 0692a9df5ca..9f88c268369 100644
--- a/core/js/oc-dialogs.js
+++ b/core/js/oc-dialogs.js
@@ -381,9 +381,17 @@ var OCdialogs = {
$replacementDiv.find('.mtime').text(formatDate(replacement.lastModifiedDate));
}
var path = original.directory + '/' +original.name;
- Files.lazyLoadPreview(path, original.mimetype, function(previewpath){
- $originalDiv.find('.icon').css('background-image','url('+previewpath+')');
- }, 96, 96, original.etag);
+ var urlSpec = {
+ file: path,
+ x: 96,
+ y: 96,
+ c: original.etag,
+ forceIcon: 0
+ };
+ var previewpath = OC.generateUrl('/core/preview.png?') + $.param(urlSpec);
+ // Escaping single quotes
+ previewpath = previewpath.replace(/'/g, "%27")
+ $originalDiv.find('.icon').css({"background-image": "url('" + previewpath + "')"});
getCroppedPreview(replacement).then(
function(path){
$replacementDiv.find('.icon').css('background-image','url(' + path + ')');