diff --git a/ckan/public/base/javascript/modules/data-viewer.js b/ckan/public/base/javascript/modules/data-viewer.js index 7ee76da80f7..8415f1583e8 100644 --- a/ckan/public/base/javascript/modules/data-viewer.js +++ b/ckan/public/base/javascript/modules/data-viewer.js @@ -26,7 +26,7 @@ this.ckan.module('data-viewer', function (jQuery) { _recalibrate: function() { // save reference to this to use in timeout var that = this; - MIN_HEIGHT = 300; + MIN_HEIGHT = 400; resizeTimer = setTimeout(function() { var height = that.el.contents().find('body').get(0).scrollHeight; diff --git a/ckan/public/base/less/module.less b/ckan/public/base/less/module.less index 111d14cfbfc..b0186555d5b 100644 --- a/ckan/public/base/less/module.less +++ b/ckan/public/base/less/module.less @@ -174,3 +174,19 @@ .group-listing { margin-left: -20px; // Same as .row } + +// PREVIEW + +.ckanext-datapreview { + position: relative; + overflow: auto; + + & > iframe { + min-height: 400px; + } + & > img { + max-height: 500px; + max-width: 100%; + overflow: hidden; + } +} diff --git a/ckan/templates/dataviewer/pdf.html b/ckan/templates/dataviewer/pdf.html index f41bb5a91de..f2cb4bc5cbe 100644 --- a/ckan/templates/dataviewer/pdf.html +++ b/ckan/templates/dataviewer/pdf.html @@ -150,8 +150,9 @@ {% block scripts %} {{ super() }} - {% resource 'datapreview/pdf' %} + + {% resource 'datapreview/pdf' %} {% endblock %} diff --git a/ckan/templates/dataviewer/snippets/data_preview.html b/ckan/templates/dataviewer/snippets/data_preview.html index ff8f03b8508..48ce3b16e1c 100644 --- a/ckan/templates/dataviewer/snippets/data_preview.html +++ b/ckan/templates/dataviewer/snippets/data_preview.html @@ -1,7 +1,7 @@ -
+
{% if embed %} {# images can be embedded directly #} - + {% else %}