PHRAS-995 - fix search results css in diapo mode

This commit is contained in:
Florian BLOUET
2016-02-26 15:32:42 +01:00
parent db47b7621d
commit 5ac036c123
3 changed files with 10 additions and 12 deletions

View File

@@ -751,18 +751,19 @@ function linearize() {
$('#answers .list').width(w); $('#answers .list').width(w);
} }
else { else {
var minMargin = 5;
var margin = 0; var margin = 0;
var el = $('#answers .diapo:first'); var el = $('#answers .diapo:first');
var brdrWidth = el.css('border-width'); var diapoWidth = el.outerWidth() + (minMargin * 2);
var stdWidth = el.outerWidth() + 10;
var fllWidth = $('#answers').innerWidth(); var fllWidth = $('#answers').innerWidth();
fllWidth -= 16; fllWidth -= 26;
var n = Math.floor(fllWidth / (stdWidth)); var n = Math.floor(fllWidth / (diapoWidth));
margin = Math.floor((fllWidth % stdWidth) / (2 * n)); margin = Math.floor((fllWidth % diapoWidth) / (2 * n));
$('#answers .diapo').css('margin', '5px ' + (5 + margin) + 'px'); margin = margin + minMargin;
$('#answers .diapo').css('margin', '5px ' + (margin) + 'px');
} }
} }
@@ -1209,7 +1210,7 @@ $(document).ready(function () {
$('#idFrameC .icon-menu li').last().find('a').trigger('click'); $('#idFrameC .icon-menu li').last().find('a').trigger('click');
$('#idFrameC .icon-menu li').first().find('a').trigger('click'); $('#idFrameC .icon-menu li').first().find('a').trigger('click');
$(previousTab).find('a').trigger('click'); $(previousTab).find('a').trigger('click');
} }
event.stopImmediatePropagation(); event.stopImmediatePropagation();
//p4.WorkZone.close(); //p4.WorkZone.close();

View File

@@ -88,10 +88,6 @@ a:hover {
TEXT-DECORATION: none TEXT-DECORATION: none
} }
#desktop {
min-width: 1100px;
}
EM { EM {
FONT-STYLE: normal; FONT-STYLE: normal;
BACKGROUND-COLOR: #D82400; BACKGROUND-COLOR: #D82400;

View File

@@ -38,6 +38,7 @@ $answersInfoLabelColor: #949494 !default;
#answers { #answers {
box-sizing: border-box;
.status { .status {
img { img {
max-width: 16px; max-width: 16px;