use media url for documents

This commit is contained in:
j 2014-11-18 13:38:37 +00:00
parent d6c10eb377
commit 3f2299d831
2 changed files with 5 additions and 5 deletions

View file

@ -159,8 +159,8 @@ pandora.ui.documentDialog = function(options) {
? Ox.PDFViewer({ ? Ox.PDFViewer({
height: dialogHeight, height: dialogHeight,
page: settings.page, page: settings.page,
url: '/documents/' + item.id + '/' url: pandora.getMediaURL('/documents/' + item.id + '/'
+ item.name + '.' + item.extension, + item.name + '.' + item.extension),
width: dialogWidth, width: dialogWidth,
zoom: settings.zoom zoom: settings.zoom
}) })
@ -169,8 +169,8 @@ pandora.ui.documentDialog = function(options) {
height: dialogHeight, height: dialogHeight,
imageHeight: item.dimensions[1], imageHeight: item.dimensions[1],
imagePreviewURL: pandora.getMediaURL('/documents/' + item.id + '/256p.jpg'), imagePreviewURL: pandora.getMediaURL('/documents/' + item.id + '/256p.jpg'),
imageURL: '/documents/' + item.id + '/' imageURL: pandora.getMediaURL('/documents/' + item.id + '/'
+ item.name + '.' + item.extension, + item.name + '.' + item.extension),
imageWidth: item.dimensions[0], imageWidth: item.dimensions[0],
width: dialogWidth, width: dialogWidth,
zoom: settings.zoom zoom: settings.zoom

View file

@ -711,7 +711,7 @@ pandora.ui.documentsPanel = function(options) {
id: data.id, id: data.id,
info: info, info: info,
title: data.name, title: data.name,
url: '/documents/' + data.id + '/256p.jpg', url: pandora.getMediaURL('/documents/' + data.id + '/256p.jpg'),
width: Math.round(data.ratio > 1 ? size : size * data.ratio) width: Math.round(data.ratio > 1 ? size : size * data.ratio)
}; };
}, },