PHRAS-768 #time 5m

report de PHRAS-344 (story / preview / train : bounce)
This commit is contained in:
Jean-Yves Gaulier
2015-10-15 15:22:44 +02:00
parent cb98ac8216
commit 8bced4b4ad
2 changed files with 7 additions and 15 deletions

View File

@@ -3,7 +3,7 @@
<ul> <ul>
<li class="title">{{ 'Apparait aussi dans ces reportages' | trans }}</li> <li class="title">{{ 'Apparait aussi dans ces reportages' | trans }}</li>
{% for par in parents %} {% for par in parents %}
<li onclick="openPreview('REG',0,'{{par.get_serialize_key()}}'); return(false);" <li onclick="openPreview('REG',0,'{{par.get_serialize_key()}}', true); return(false);"
class="otherRegToolTip" {% if app['conf'].get(['registry', 'classic', 'stories-preview']) %}tooltipsrc="{{ path('prod_tooltip_caption', { 'sbas_id' : par.get_sbas_id(), 'record_id' : par.get_record_id(), 'context' : 'basket' }) }}" {% endif %}> class="otherRegToolTip" {% if app['conf'].get(['registry', 'classic', 'stories-preview']) %}tooltipsrc="{{ path('prod_tooltip_caption', { 'sbas_id' : par.get_sbas_id(), 'record_id' : par.get_record_id(), 'context' : 'basket' }) }}" {% endif %}>
<img src="{{par.get_thumbnail().get_url()}}" style="width:25px;height:25px;"/> <img src="{{par.get_thumbnail().get_url()}}" style="width:25px;height:25px;"/>
<span class="title" title="{{ par.get_title() }}"> {{ par.get_title() }} </span> <span class="title" title="{{ par.get_title() }}"> {{ par.get_title() }} </span>

View File

@@ -154,7 +154,9 @@ function openPreview(env, pos, contId, reload) {
setPreview(); setPreview();
if (env != 'RESULT') { if (env != 'RESULT') {
setCurrent(data.current); if (justOpen || reload) {
setCurrent(data.current);
}
viewCurrent($('#PREVIEWCURRENT li.selected')); viewCurrent($('#PREVIEWCURRENT li.selected'));
} }
else { else {
@@ -333,7 +335,7 @@ function getNext() {
if (p4.preview.mode == 'RESULT') { if (p4.preview.mode == 'RESULT') {
posAsk = parseInt(p4.preview.current.pos) + 1; posAsk = parseInt(p4.preview.current.pos) + 1;
posAsk = (posAsk > parseInt(p4.tot) || isNaN(posAsk)) ? 0 : posAsk; posAsk = (posAsk > parseInt(p4.tot) || isNaN(posAsk)) ? 0 : posAsk;
openPreview('RESULT', posAsk); openPreview('RESULT', posAsk, '', false);
} }
else { else {
if (!$('#PREVIEWCURRENT li.selected').is(':last-child')) if (!$('#PREVIEWCURRENT li.selected').is(':last-child'))
@@ -352,7 +354,7 @@ function getPrevious() {
if (p4.preview.mode == 'RESULT') { if (p4.preview.mode == 'RESULT') {
posAsk = parseInt(p4.preview.current.pos) - 1; posAsk = parseInt(p4.preview.current.pos) - 1;
posAsk = (posAsk < 0) ? ((parseInt(p4.tot) - 1)) : posAsk; posAsk = (posAsk < 0) ? ((parseInt(p4.tot) - 1)) : posAsk;
openPreview('RESULT', posAsk); openPreview('RESULT', posAsk, '', false);
} }
else { else {
if (!$('#PREVIEWCURRENT li.selected').is(':first-child')) if (!$('#PREVIEWCURRENT li.selected').is(':first-child'))
@@ -396,7 +398,7 @@ function setCurrent(current) {
$(el).removeClass('openPreview'); $(el).removeClass('openPreview');
$(el).bind('click', function () { $(el).bind('click', function () {
viewCurrent($(this).parent()); viewCurrent($(this).parent());
openPreview(jsopt[0], jsopt[1], jsopt[2]); openPreview(jsopt[0], jsopt[1], jsopt[2],false);
}); });
}); });
} }
@@ -479,16 +481,6 @@ function classicMode() {
p4.currentViewMode = 'classic'; p4.currentViewMode = 'classic';
} }
function doudouMode() {
$('#PREVIEWCURRENT li').removeClass('see-all');
$('#PREVIEWCURRENT ul').width('auto');
$('#PREVIEWCURRENTCONT').css({
'overflow-x': 'hidden'
});
p4.currentViewMode = 'enhance';
viewCurrent($('#PREVIEWCURRENT li.selected'));
}
function closePreview() { function closePreview() {
p4.preview.open = false; p4.preview.open = false;
hideOverlay(); hideOverlay();