diff options
author | Morris Jobke <hey@morrisjobke.de> | 2015-06-02 09:36:51 +0200 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2015-06-02 09:36:51 +0200 |
commit | d2f3710ede1fa72658a4c12264a90a1936faf9ca (patch) | |
tree | 1a1593b02c9af77986d3a1ea8d6ada1853158de1 /core | |
parent | cf2c599218f01c1351cee2e4e48ee4b430f55287 (diff) | |
parent | f05ac47eb65c1bb418d89636c660093c79e4bef5 (diff) | |
download | nextcloud-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.js | 14 |
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 + ')'); |