Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
domoritz committed Sep 24, 2012
1 parent bf4a198 commit 8b69e00
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 25 deletions.
21 changes: 0 additions & 21 deletions ckan/public/base/datapreview/css/recline.css
Original file line number Diff line number Diff line change
Expand Up @@ -53,24 +53,3 @@ body {
.header .recline-query-editor .input-prepend {
vertical-align: top;
}

#ckanext-datapreview {
position: relative;
overflow: auto;
}

#ckanext-datapreview iframe {
min-height: 480px;
border: 1px solid #ccc;
padding: 7px;
}

.ckanext-datapreview-iframe {
width: 100%;
}

img.ckanext-datapreview-direct-embed {
max-height: 500px;
max-width: 100%;
overflow: hidden;
}
4 changes: 2 additions & 2 deletions ckan/public/base/javascript/modules/data-viewer.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ this.ckan.module('data-viewer', function (jQuery) {
MIN_HEIGHT = 300;

resizeTimer = setTimeout(function() {
var height = that.el.contents().find('body').outerHeight();
var height = that.el.contents().find('body').get(0).scrollHeight;
height = Math.max(height, MIN_HEIGHT);
var deltaHeight = height - that.el.outerHeight();
var deltaHeight = height - that.el.get(0).scrollHeight;
if (deltaHeight > 0 || deltaHeight < -10) {
that.el.animate({height: height+20}, Math.min(700, height*2));
}
Expand Down
4 changes: 2 additions & 2 deletions ckan/templates/dataviewer/snippets/data_preview.html
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<div class="module-content">
<div class="module-content" class="ckanext-datapreview">
{% if embed %}
{# images can be embedded directly #}
<img class="ckanext-datapreview-direct-embed" src="{{ resource_url }}"></img>
{% else %}
<iframe src="{{ resource_url }}" class="ckanext-datapreview-iframe" frameborder="0" scrolling="auto" width="100%" data-module="data-viewer">
<iframe src="{{ resource_url }}" frameborder="0" width="100%" data-module="data-viewer">
<p>{{ _('Your browser does not support iframes.') }}</p>
</iframe>
{% endif %}
Expand Down

0 comments on commit 8b69e00

Please sign in to comment.