modify js and css files for PDFJS

This commit is contained in:
Mike Ng
2017-08-07 17:24:47 +04:00
parent 4f5b392b1d
commit 790c76a2d9
5 changed files with 23 additions and 8 deletions

View File

@@ -49,6 +49,10 @@ img{
bottom:10px; bottom:10px;
} }
.documentTips {
height: 100%;
}
input.checkbox{ input.checkbox{
background:transparent; background:transparent;
border:none; border:none;

View File

@@ -284,8 +284,9 @@
} }
else if ($documentTips[0] && shouldResize) { else if ($documentTips[0] && shouldResize) {
recordWidth = $documentTips.data('original-width'); //add min width and height of 400 and 600 respectively
recordHeight = $documentTips.data('original-height'); recordWidth = $documentTips.data('original-width') > 400 ? $documentTips.data('original-width') : 400;
recordHeight = $documentTips.data('original-width') > 400 ? $documentTips.data('original-height') : 600;
$documentTips.css({display: 'block', margin: '0 auto'}); $documentTips.css({display: 'block', margin: '0 auto'});
$selector = $documentTips; $selector = $documentTips;
} }
@@ -377,7 +378,7 @@
bottomOffset = -15; bottomOffset = -15;
} else { } else {
// tooltip from workzone (basket) // tooltip from workzone (basket)
tooltipVerticalOffset = 0; //tooltipVerticalOffset = 0;
tooltipHorizontalOffset = 0; tooltipHorizontalOffset = 0;
topOffset = 50; topOffset = 50;
// fallback on original target if nothing found: // fallback on original target if nothing found:

View File

@@ -46,7 +46,11 @@ img {
} }
#top_container { #top_container {
bottom: 190px; bottom: 220px;
}
.documentTips {
height: 100%;
} }
#bottom_container { #bottom_container {

View File

@@ -518,7 +518,6 @@ function initAnswerForm() {
$('#answers').removeClass('loading'); $('#answers').removeClass('loading');
}, },
success: function (datas) { success: function (datas) {
// DEBUG QUERY PARSER // DEBUG QUERY PARSER
try { try {
console.info(JSON.parse(datas.parsed_query)); console.info(JSON.parse(datas.parsed_query));
@@ -533,6 +532,10 @@ function initAnswerForm() {
loadFacets(datas.facets); loadFacets(datas.facets);
if(datas.total_answers > 0) {
sessionStorage.setItem('search', JSON.stringify(datas.query));
}
$('#answers').append('<div id="paginate"><div class="navigation"><div id="tool_navigate"></div></div></div>'); $('#answers').append('<div id="paginate"><div class="navigation"><div id="tool_navigate"></div></div></div>');
$('#tool_results').empty().append(datas.infos); $('#tool_results').empty().append(datas.infos);

View File

@@ -6,7 +6,7 @@
{% set original_h = thumbnail.get_height() > 0 ? thumbnail.get_height() : 120 %} {% set original_h = thumbnail.get_height() > 0 ? thumbnail.get_height() : 120 %}
{% set original_w = thumbnail.get_width() > 0 ? thumbnail.get_width() : 120 %} {% set original_w = thumbnail.get_width() > 0 ? thumbnail.get_width() : 120 %}
{% if wrap %} {% if wrap %}
<div style="width:{{box_w}}px;height:{{box_h}}px;" class="thumb_wrapper {{extra_class|default('')}}" > <div style="width:100%; height:100%;" class="thumb_wrapper {{extra_class|default('')}}" >
{% endif %} {% endif %}
{% if record_type == 'VIDEO_MP4' or record_type == 'VIDEO_FLV' %} {% if record_type == 'VIDEO_MP4' or record_type == 'VIDEO_FLV' %}
@@ -19,8 +19,11 @@
<div id="phraseanet-embed-frame" class="documentTips" <div id="phraseanet-embed-frame" class="documentTips"
data-original-width="{{original_w}}" data-original-width="{{original_w}}"
data-original-height="{{original_h}}" data-original-height="{{original_h}}"
data-kind="document" data-kind="document">
data-src="{{ url('alchemy_embed_view', {url: url|trim, autoplay: autoplay|default('false') }) }}"></div>
</div>
{% elseif record_type == 'AUDIO_MP3' %} {% elseif record_type == 'AUDIO_MP3' %}
<div id="phraseanet-embed-frame" class="audioTips" <div id="phraseanet-embed-frame" class="audioTips"
data-original-width="{{original_w}}" data-original-width="{{original_w}}"