mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-18 23:43:12 +00:00
PHRAS-768 #time 5m
report de PHRAS-344 (story / preview / train : bounce)
This commit is contained in:
@@ -154,7 +154,9 @@ function openPreview(env, pos, contId, reload) {
|
||||
setPreview();
|
||||
|
||||
if (env != 'RESULT') {
|
||||
setCurrent(data.current);
|
||||
if (justOpen || reload) {
|
||||
setCurrent(data.current);
|
||||
}
|
||||
viewCurrent($('#PREVIEWCURRENT li.selected'));
|
||||
}
|
||||
else {
|
||||
@@ -333,7 +335,7 @@ function getNext() {
|
||||
if (p4.preview.mode == 'RESULT') {
|
||||
posAsk = parseInt(p4.preview.current.pos) + 1;
|
||||
posAsk = (posAsk > parseInt(p4.tot) || isNaN(posAsk)) ? 0 : posAsk;
|
||||
openPreview('RESULT', posAsk);
|
||||
openPreview('RESULT', posAsk, '', false);
|
||||
}
|
||||
else {
|
||||
if (!$('#PREVIEWCURRENT li.selected').is(':last-child'))
|
||||
@@ -352,7 +354,7 @@ function getPrevious() {
|
||||
if (p4.preview.mode == 'RESULT') {
|
||||
posAsk = parseInt(p4.preview.current.pos) - 1;
|
||||
posAsk = (posAsk < 0) ? ((parseInt(p4.tot) - 1)) : posAsk;
|
||||
openPreview('RESULT', posAsk);
|
||||
openPreview('RESULT', posAsk, '', false);
|
||||
}
|
||||
else {
|
||||
if (!$('#PREVIEWCURRENT li.selected').is(':first-child'))
|
||||
@@ -396,7 +398,7 @@ function setCurrent(current) {
|
||||
$(el).removeClass('openPreview');
|
||||
$(el).bind('click', function () {
|
||||
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';
|
||||
}
|
||||
|
||||
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() {
|
||||
p4.preview.open = false;
|
||||
hideOverlay();
|
||||
|
Reference in New Issue
Block a user