don't use hardcoded size for preview

This commit is contained in:
Georg Ehrke 2013-08-14 11:38:52 +02:00
parent 1c9d52774e
commit 3cbbe395eb
2 changed files with 4 additions and 2 deletions

View File

@ -825,7 +825,9 @@ function getMimeIcon(mime, ready){
getMimeIcon.cache={};
function getPreviewIcon(path, ready){
ready(OC.Router.generate('core_ajax_preview', {file: encodeURIComponent(path), x:36, y:36}));
var x = $('#filestable').data('preview-x');
var y = $('#filestable').data('preview-y');
ready(OC.Router.generate('core_ajax_preview', {file: encodeURIComponent(path), x:x, y:y}));
}
function getUniqueName(name){

View File

@ -59,7 +59,7 @@
<div id="emptyfolder"><?php p($l->t('Nothing in here. Upload something!'))?></div>
<?php endif; ?>
<table id="filestable" data-allow-public-upload="<?php p($_['publicUploadEnabled'])?>">
<table id="filestable" data-allow-public-upload="<?php p($_['publicUploadEnabled'])?>" data-preview-x="36" data-preview-y="36">
<thead>
<tr>
<th id='headerName'>