mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-10 03:23:19 +00:00
remove lightbox IE6 version
This commit is contained in:
@@ -42,11 +42,7 @@ class LightboxController extends Controller
|
|||||||
$repository->findActiveValidationByUser($this->getAuthenticatedUser())
|
$repository->findActiveValidationByUser($this->getAuthenticatedUser())
|
||||||
);
|
);
|
||||||
|
|
||||||
$template = $this->isBrowserNewGenerationOrMobile()
|
return $this->renderResponse('lightbox/index.html.twig', [
|
||||||
? 'lightbox/index.html.twig'
|
|
||||||
: 'lightbox/IE6/index.html.twig';
|
|
||||||
|
|
||||||
return $this->renderResponse($template, [
|
|
||||||
'baskets_collection' => $basket_collection,
|
'baskets_collection' => $basket_collection,
|
||||||
'module_name' => 'Lightbox',
|
'module_name' => 'Lightbox',
|
||||||
'module' => 'lightbox',
|
'module' => 'lightbox',
|
||||||
@@ -92,7 +88,6 @@ class LightboxController extends Controller
|
|||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
$isNewGenerationBrowser = $this->app['browser']->isNewGeneration();
|
|
||||||
$basket = $basketElement->getBasket();
|
$basket = $basketElement->getBasket();
|
||||||
|
|
||||||
$ret = [];
|
$ret = [];
|
||||||
@@ -104,11 +99,11 @@ class LightboxController extends Controller
|
|||||||
['record' => $basketElement->getRecord($this->app), 'not_wrapped' => true]
|
['record' => $basketElement->getRecord($this->app), 'not_wrapped' => true]
|
||||||
);
|
);
|
||||||
$ret['options_html'] = $this->render(
|
$ret['options_html'] = $this->render(
|
||||||
$isNewGenerationBrowser ? 'lightbox/sc_options_box.html.twig' : 'lightbox/IE6/sc_options_box.html.twig',
|
'lightbox/sc_options_box.html.twig',
|
||||||
['basket_element' => $basketElement]
|
['basket_element' => $basketElement]
|
||||||
);
|
);
|
||||||
$ret['agreement_html'] = $this->render(
|
$ret['agreement_html'] = $this->render(
|
||||||
$isNewGenerationBrowser ? 'lightbox/agreement_box.html.twig' : 'lightbox/IE6/agreement_box.html.twig',
|
'lightbox/agreement_box.html.twig',
|
||||||
['basket' => $basket, 'basket_element' => $basketElement]
|
['basket' => $basket, 'basket_element' => $basketElement]
|
||||||
);
|
);
|
||||||
$ret['selector_html'] = $this->render('lightbox/selector_box.html.twig', ['basket_element' => $basketElement]);
|
$ret['selector_html'] = $this->render('lightbox/selector_box.html.twig', ['basket_element' => $basketElement]);
|
||||||
@@ -149,10 +144,7 @@ class LightboxController extends Controller
|
|||||||
'record' => $record,
|
'record' => $record,
|
||||||
'not_wrapped' => true,
|
'not_wrapped' => true,
|
||||||
]);
|
]);
|
||||||
$template_options = $browser->isNewGeneration()
|
$ret['options_html'] = $this->render('lightbox/feed_options_box.html.twig', ['feed_element' => $item]);
|
||||||
? 'lightbox/feed_options_box.html.twig'
|
|
||||||
: 'lightbox/IE6/feed_options_box.html.twig';
|
|
||||||
$ret['options_html'] = $this->render($template_options, ['feed_element' => $item]);
|
|
||||||
$ret['caption'] = $this->render(
|
$ret['caption'] = $this->render(
|
||||||
'common/caption.html.twig', [
|
'common/caption.html.twig', [
|
||||||
'view' => 'preview',
|
'view' => 'preview',
|
||||||
@@ -213,7 +205,7 @@ class LightboxController extends Controller
|
|||||||
|
|
||||||
$basket = $this->markBasketRead($basket);
|
$basket = $this->markBasketRead($basket);
|
||||||
$basket = $this->markBasketUserAwareOfValidation($basket);
|
$basket = $this->markBasketUserAwareOfValidation($basket);
|
||||||
|
|
||||||
$response = $this->renderResponse($this->getValidationTemplate(), [
|
$response = $this->renderResponse($this->getValidationTemplate(), [
|
||||||
'baskets_collection' => $basket_collection,
|
'baskets_collection' => $basket_collection,
|
||||||
'basket' => $basket,
|
'basket' => $basket,
|
||||||
@@ -238,28 +230,16 @@ class LightboxController extends Controller
|
|||||||
$basket->markRead();
|
$basket->markRead();
|
||||||
$this->app['orm.em']->flush();
|
$this->app['orm.em']->flush();
|
||||||
}
|
}
|
||||||
|
|
||||||
return $basket;
|
return $basket;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @return bool
|
|
||||||
*/
|
|
||||||
private function isBrowserNewGenerationOrMobile()
|
|
||||||
{
|
|
||||||
/** @var \Browser $browser */
|
|
||||||
$browser = $this->app['browser'];
|
|
||||||
return $browser->isNewGeneration() || $browser->isMobile();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
private function getValidationTemplate()
|
private function getValidationTemplate()
|
||||||
{
|
{
|
||||||
return $this->isBrowserNewGenerationOrMobile()
|
return 'lightbox/validate.html.twig';
|
||||||
? 'lightbox/validate.html.twig'
|
|
||||||
: 'lightbox/IE6/validate.html.twig';
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -280,7 +260,7 @@ class LightboxController extends Controller
|
|||||||
;
|
;
|
||||||
$this->app['orm.em']->flush();
|
$this->app['orm.em']->flush();
|
||||||
}
|
}
|
||||||
|
|
||||||
return $basket;
|
return $basket;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -300,14 +280,10 @@ class LightboxController extends Controller
|
|||||||
/** @var FeedEntry $feed_entry */
|
/** @var FeedEntry $feed_entry */
|
||||||
$feed_entry = $app['repo.feed-entries']->find($entry_id);
|
$feed_entry = $app['repo.feed-entries']->find($entry_id);
|
||||||
|
|
||||||
$template = $this->isBrowserNewGenerationOrMobile()
|
|
||||||
? 'lightbox/feed.html.twig'
|
|
||||||
: 'lightbox/IE6/feed.html.twig';
|
|
||||||
|
|
||||||
$content = $feed_entry->getItems();
|
$content = $feed_entry->getItems();
|
||||||
$first = $content->first();
|
$first = $content->first();
|
||||||
|
|
||||||
$response = $this->renderResponse($template, [
|
$response = $this->renderResponse('lightbox/feed.html.twig', [
|
||||||
'feed_entry' => $feed_entry,
|
'feed_entry' => $feed_entry,
|
||||||
'first_item' => $first,
|
'first_item' => $first,
|
||||||
'local_title' => $feed_entry->getTitle(),
|
'local_title' => $feed_entry->getTitle(),
|
||||||
@@ -359,7 +335,7 @@ class LightboxController extends Controller
|
|||||||
|
|
||||||
return $this->app->json($output);
|
return $this->app->json($output);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function ajaxSetElementAgreementAction(Request $request, $sselcont_id)
|
public function ajaxSetElementAgreementAction(Request $request, $sselcont_id)
|
||||||
{
|
{
|
||||||
$agreement = $request->request->get('agreement');
|
$agreement = $request->request->get('agreement');
|
||||||
|
@@ -38,10 +38,6 @@ gulp.task('build-lightbox-js', ['build-lightbox-mobile-js'], function(){
|
|||||||
config.paths.src + 'lightbox/js/jquery.lightbox.js'
|
config.paths.src + 'lightbox/js/jquery.lightbox.js'
|
||||||
];
|
];
|
||||||
|
|
||||||
var lightboxIE6Group = [
|
|
||||||
config.paths.src + 'lightbox/js/jquery.lightbox.ie6.js'
|
|
||||||
];
|
|
||||||
utils.buildJsGroup(lightboxIE6Group, 'lightboxIe6', 'lightbox/js', debugMode);
|
|
||||||
return utils.buildJsGroup(lightboxGroup, 'lightbox', 'lightbox/js', debugMode);
|
return utils.buildJsGroup(lightboxGroup, 'lightbox', 'lightbox/js', debugMode);
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -58,4 +54,4 @@ gulp.task('watch-lightbox-css', function() {
|
|||||||
gulp.task('build-lightbox', ['copy-lightbox-images', 'build-lightbox-css'], function(){
|
gulp.task('build-lightbox', ['copy-lightbox-images', 'build-lightbox-css'], function(){
|
||||||
debugMode = false;
|
debugMode = false;
|
||||||
return gulp.start('build-lightbox-js');
|
return gulp.start('build-lightbox-js');
|
||||||
});
|
});
|
||||||
|
@@ -1,948 +0,0 @@
|
|||||||
var p4 = p4 || {};
|
|
||||||
|
|
||||||
p4.releasable = false;
|
|
||||||
|
|
||||||
var bodySize = {
|
|
||||||
x: 0,
|
|
||||||
y: 0
|
|
||||||
};
|
|
||||||
|
|
||||||
$(window).bind('beforeunload', function () {
|
|
||||||
if (p4.releasable !== false) {
|
|
||||||
if (confirm(p4.releasable)) {
|
|
||||||
$('#basket_options .confirm_report').trigger('click');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
$(document).ready(function () {
|
|
||||||
bodySize.y = $('#mainContainer').height();
|
|
||||||
bodySize.x = $('#mainContainer').width();
|
|
||||||
|
|
||||||
$(window).bind('resize',function () {
|
|
||||||
resize();
|
|
||||||
}).trigger('resize');
|
|
||||||
|
|
||||||
function resize() {
|
|
||||||
|
|
||||||
bodySize.y = $('#mainContainer').height();
|
|
||||||
bodySize.x = $('#mainContainer').width();
|
|
||||||
var h = $(window).height();
|
|
||||||
var w = $(window).width();
|
|
||||||
|
|
||||||
$('body').width(w).height(h);
|
|
||||||
$('#mainContent').width(w).height(h - $('#mainMenu').outerHeight());
|
|
||||||
$('#innerWrapper').width(w - 20).height(h - $('#mainMenu').outerHeight() - 20);
|
|
||||||
$('#innerTop').height(h - $('#mainMenu').outerHeight() - 20 - 186);
|
|
||||||
$('#record_wrapper').width($('#innerWrapper').innerWidth() - $('#right_column').outerWidth() - 2);
|
|
||||||
// var right_column_wrapper_height = $('#right_column').innerHeight() - $('.right_column_title').outerHeight() - 10;
|
|
||||||
// $('.right_column_wrapper').height(right_column_wrapper_height);
|
|
||||||
|
|
||||||
$('.record_display_box').each(function (i, n) {
|
|
||||||
$('.lightbox_container', n).height($(n).innerHeight() - $('.header').outerHeight());
|
|
||||||
});
|
|
||||||
display_record($('#record_compare').css('visibility') != 'hidden');
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
$(this).data('slideshow', false);
|
|
||||||
$(this).data('slideshow_ctime', false);
|
|
||||||
|
|
||||||
$('#mainMenu, .unselectable').disableSelection();
|
|
||||||
|
|
||||||
display_basket();
|
|
||||||
|
|
||||||
$(window).bind('mousedown',function () {
|
|
||||||
$(this).focus();
|
|
||||||
}).trigger('mousedown');
|
|
||||||
|
|
||||||
$('.basket_downloader').bind('click', function () {
|
|
||||||
download_basket();
|
|
||||||
});
|
|
||||||
|
|
||||||
$('.basket_wrapper').hover(
|
|
||||||
function () {
|
|
||||||
$(this).addClass('hover');
|
|
||||||
},
|
|
||||||
function () {
|
|
||||||
$(this).removeClass('hover');
|
|
||||||
}
|
|
||||||
).bind('click', function () {
|
|
||||||
var id = $('input[name=ssel_id]', this).val();
|
|
||||||
document.location = '/lightbox/validate/' + id + '/';
|
|
||||||
return;
|
|
||||||
});
|
|
||||||
$('.right_column_title').bind('click',function () {
|
|
||||||
var title = $('.right_column_title');
|
|
||||||
if (!$('.right_column_wrapper_caption').is(':visible')) {
|
|
||||||
$('.right_column_wrapper_user').height(0);
|
|
||||||
$('.right_column_wrapper_caption').show();
|
|
||||||
$('.caption', title).addClass('highlight');
|
|
||||||
$('.validate', title).removeClass('highlight');
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
$('.right_column_wrapper_user').height('auto');
|
|
||||||
$('.right_column_wrapper_caption').hide();
|
|
||||||
$('.caption', title).removeClass('highlight');
|
|
||||||
$('.validate', title).addClass('highlight');
|
|
||||||
}
|
|
||||||
}).addClass('clickable');
|
|
||||||
|
|
||||||
var sselcont = $('#sc_container .basket_element:first');
|
|
||||||
if (sselcont.length > 0) {
|
|
||||||
display_basket_element(false, sselcont.attr('id').split('_').pop());
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
set_sizeable($('#record_main .lightbox_container, #record_compare .lightbox_container'));
|
|
||||||
|
|
||||||
$('#navigation')
|
|
||||||
.bind('change',
|
|
||||||
function () {
|
|
||||||
window.location.replace(window.location.protocol + "//" + window.location.host + '/lightbox/validate/' + $(this).val() + '/');
|
|
||||||
}
|
|
||||||
);
|
|
||||||
bind_keyboard();
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
function bind_keyboard() {
|
|
||||||
$(document).bind('keydown', function (event) {
|
|
||||||
|
|
||||||
var stop = false;
|
|
||||||
$('.notes_wrapper').each(function (i, n) {
|
|
||||||
if (parseInt($(n).css('top')) >= 0)
|
|
||||||
stop = true;
|
|
||||||
});
|
|
||||||
|
|
||||||
if (stop)
|
|
||||||
return true;
|
|
||||||
|
|
||||||
var cancelKey = false;
|
|
||||||
|
|
||||||
var el, id;
|
|
||||||
|
|
||||||
switch (event.keyCode) {
|
|
||||||
case 39:
|
|
||||||
get_next();
|
|
||||||
cancelKey = true;
|
|
||||||
break;
|
|
||||||
case 37:
|
|
||||||
get_prev();
|
|
||||||
cancelKey = true;
|
|
||||||
break;
|
|
||||||
case 32:
|
|
||||||
var bool = !$(document).data('slideshow');
|
|
||||||
slideshow(bool);
|
|
||||||
break;
|
|
||||||
case 38:
|
|
||||||
el = $('#sc_container .basket_element.selected');
|
|
||||||
if (el.length === 1) {
|
|
||||||
id = el.attr('id').split('_').pop();
|
|
||||||
set_agreement(event, el, id, 1);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case 40:
|
|
||||||
el = $('#sc_container .basket_element.selected');
|
|
||||||
if (el.length === 1) {
|
|
||||||
id = el.attr('id').split('_').pop();
|
|
||||||
set_agreement(event, el, id, -1);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (cancelKey) {
|
|
||||||
event.cancelBubble = true;
|
|
||||||
if (event.stopPropagation)
|
|
||||||
event.stopPropagation();
|
|
||||||
return(false);
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
function set_release(el) {
|
|
||||||
$('.loader', el).css({visibility: 'visible'});
|
|
||||||
$.ajax({
|
|
||||||
type: "POST",
|
|
||||||
url: "/lightbox/ajax/SET_RELEASE/" + $('#navigation').val() + "/",
|
|
||||||
dataType: 'json',
|
|
||||||
error: function (data) {
|
|
||||||
$('.loader', el).css({visibility: 'hidden'});
|
|
||||||
},
|
|
||||||
timeout: function (data) {
|
|
||||||
$('.loader', el).css({visibility: 'hidden'});
|
|
||||||
},
|
|
||||||
success: function (data) {
|
|
||||||
$('.loader', el).css({
|
|
||||||
visibility: 'hidden'
|
|
||||||
});
|
|
||||||
if (data.datas) {
|
|
||||||
alert(data.datas);
|
|
||||||
}
|
|
||||||
if (!data.error) {
|
|
||||||
p4.releasable = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
function load_report() {
|
|
||||||
$.ajax({
|
|
||||||
type: "GET",
|
|
||||||
url: "/lightbox/ajax/LOAD_REPORT/" + $('#navigation').val() + "/",
|
|
||||||
dataType: 'html',
|
|
||||||
success: function (data) {
|
|
||||||
$('#report').empty().append(data);
|
|
||||||
$('#report .reportTips').tooltip({delay: false});
|
|
||||||
$('#report').dialog({
|
|
||||||
width: 600,
|
|
||||||
height: Math.round($(window).height() * 0.8)
|
|
||||||
}).dialog('open').show();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
function set_sizeable(container) {
|
|
||||||
|
|
||||||
$(container).bind('mousewheel', function (event, delta) {
|
|
||||||
|
|
||||||
if ($(this).hasClass('note_editing'))
|
|
||||||
return;
|
|
||||||
|
|
||||||
var record = $('.record', this);
|
|
||||||
|
|
||||||
if (record.length === 0)
|
|
||||||
return;
|
|
||||||
|
|
||||||
var o_top = parseInt(record.css('top'));
|
|
||||||
var o_left = parseInt(record.css('left'));
|
|
||||||
|
|
||||||
var o_width, o_height, width, height;
|
|
||||||
|
|
||||||
if (delta > 0) {
|
|
||||||
if (record.width() > 29788 || record.height() >= 29788)
|
|
||||||
return;
|
|
||||||
o_width = record.width();
|
|
||||||
o_height = record.height();
|
|
||||||
width = Math.round(o_width * 1.1);
|
|
||||||
height = Math.round(o_height * 1.1);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
if (record.width() < 30 || record.height() < 30)
|
|
||||||
return;
|
|
||||||
o_width = record.width();
|
|
||||||
o_height = record.height();
|
|
||||||
width = Math.round(o_width / 1.05);
|
|
||||||
height = Math.round(o_height / 1.05);
|
|
||||||
}
|
|
||||||
|
|
||||||
var top = Math.round((height / o_height) * (o_top - $(this).height() / 2) + $(this).height() / 2);
|
|
||||||
var left = Math.round((width / o_width) * (o_left - $(this).width() / 2) + $(this).width() / 2);
|
|
||||||
|
|
||||||
record.width(width).height(height).css({top: top, left: left});
|
|
||||||
});
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
function display_basket() {
|
|
||||||
var sc_wrapper = $('#sc_wrapper');
|
|
||||||
var basket_options = $('#basket_options');
|
|
||||||
|
|
||||||
$('.report').bind('click',function () {
|
|
||||||
load_report();
|
|
||||||
}).addClass('clickable');
|
|
||||||
$('.confirm_report', basket_options).button({
|
|
||||||
}).bind('click', function () {
|
|
||||||
set_release($(this));
|
|
||||||
});
|
|
||||||
|
|
||||||
$('.basket_element', sc_wrapper).parent()
|
|
||||||
.bind('click', function (event) {
|
|
||||||
scid_click(event, this);
|
|
||||||
return false;
|
|
||||||
})
|
|
||||||
.addClass('clickable');
|
|
||||||
|
|
||||||
$('.agree_button, .disagree_button', sc_wrapper).bind('click',function (event) {
|
|
||||||
|
|
||||||
var sselcont_id = $(this).closest('.basket_element').attr('id').split('_').pop();
|
|
||||||
|
|
||||||
var agreement = $(this).hasClass('agree_button') ? '1' : '-1';
|
|
||||||
|
|
||||||
set_agreement(event, $(this), sselcont_id, agreement);
|
|
||||||
return false;
|
|
||||||
}).addClass('clickable');
|
|
||||||
|
|
||||||
n = $('.basket_element', sc_wrapper).length;
|
|
||||||
$('#sc_container').width(n * $('.basket_element_wrapper:first', sc_wrapper).outerWidth() + 1);
|
|
||||||
|
|
||||||
$('.previewTips').tooltip();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
function display_basket_element(compare, sselcont_id) {
|
|
||||||
var container;
|
|
||||||
if (compare) {
|
|
||||||
container = $('#record_compare');
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
container = $('#record_main');
|
|
||||||
}
|
|
||||||
$('.record_image', container).removeAttr('ondragstart');
|
|
||||||
$('.record_image', container).draggable();
|
|
||||||
|
|
||||||
var options_container = $('.options', container);
|
|
||||||
|
|
||||||
$('.download_button', options_container).button({
|
|
||||||
text: false
|
|
||||||
}).bind('click', function () {
|
|
||||||
download($(this).next('form[name=download_form]').find('input').val());
|
|
||||||
});
|
|
||||||
|
|
||||||
$('.comment_button', options_container).button({
|
|
||||||
text: true
|
|
||||||
}).bind('click', function () {
|
|
||||||
if ($('.lightbox_container', container).hasClass('note_editing')) {
|
|
||||||
hide_notes(container);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
show_notes(container);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
);
|
|
||||||
|
|
||||||
activate_notes(container);
|
|
||||||
|
|
||||||
$('.previous_button', options_container).button({
|
|
||||||
text: false
|
|
||||||
}).bind('click', function () {
|
|
||||||
get_prev();
|
|
||||||
});
|
|
||||||
|
|
||||||
$('.play_button', options_container).button({
|
|
||||||
text: false
|
|
||||||
}).bind('click', function () {
|
|
||||||
slideshow(true);
|
|
||||||
});
|
|
||||||
|
|
||||||
$('.pause_button', options_container).button({
|
|
||||||
text: false
|
|
||||||
}).bind('click', function () {
|
|
||||||
slideshow(false);
|
|
||||||
});
|
|
||||||
|
|
||||||
if ($(document).data('slideshow')) {
|
|
||||||
$('.play_button, .next_button.play, .previous_button.play', options_container).hide();
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
$('.pause_button, .next_button.pause, .previous_button.pause', options_container).hide();
|
|
||||||
}
|
|
||||||
|
|
||||||
$('.next_button', options_container).button({
|
|
||||||
text: false
|
|
||||||
}).bind('click', function () {
|
|
||||||
get_next();
|
|
||||||
});
|
|
||||||
|
|
||||||
$('.lightbox_container', container).bind('dblclick', function (event) {
|
|
||||||
display_record();
|
|
||||||
});
|
|
||||||
|
|
||||||
$('#record_wrapper .agree_' + sselcont_id + ', .big_box.agree')
|
|
||||||
.bind('click',
|
|
||||||
function (event) {
|
|
||||||
set_agreement(event, $(this), sselcont_id, '1');
|
|
||||||
}
|
|
||||||
)
|
|
||||||
.addClass('clickable');
|
|
||||||
|
|
||||||
$('#record_wrapper .disagree_' + sselcont_id + ', .big_box.disagree')
|
|
||||||
.bind('click',
|
|
||||||
function (event) {
|
|
||||||
set_agreement(event, $(this), sselcont_id, '-1');
|
|
||||||
}
|
|
||||||
)
|
|
||||||
.addClass('clickable');
|
|
||||||
|
|
||||||
if (compare == $('#record_wrapper').hasClass('single')) {
|
|
||||||
if (compare) {
|
|
||||||
$('#record_infos, #right_column').hide();
|
|
||||||
$('#record_wrapper').stop().css({width: '100%'});
|
|
||||||
display_record(compare);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
$('#record_wrapper').css({
|
|
||||||
width: ($('#innerWrapper').width() - $('#record_infos').outerWidth() - $('#right_column').outerWidth() - 2)
|
|
||||||
});
|
|
||||||
display_record(compare);
|
|
||||||
$('#record_infos, #right_column').show();
|
|
||||||
$('#record_compare .lightbox_container').empty();
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
display_record(compare);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
function set_container_status(status) {
|
|
||||||
$('#record_wrapper').removeClass('paysage portrait single').addClass(status);
|
|
||||||
}
|
|
||||||
|
|
||||||
function show_notes(container) {
|
|
||||||
$('.notes_wrapper', container).animate({top: 0});
|
|
||||||
$('.lightbox_container', container).addClass('note_editing');
|
|
||||||
}
|
|
||||||
|
|
||||||
function hide_notes(container) {
|
|
||||||
$('.notes_wrapper', container).animate({top: '-100%'});
|
|
||||||
$('.lightbox_container', container).removeClass('note_editing');
|
|
||||||
}
|
|
||||||
|
|
||||||
function activate_notes(container) {
|
|
||||||
$('.note_closer', container).button({
|
|
||||||
text: true
|
|
||||||
}).bind('click', function () {
|
|
||||||
// $(this).blur();
|
|
||||||
hide_notes(container);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
);
|
|
||||||
|
|
||||||
$('.note_saver', container).button({
|
|
||||||
text: true
|
|
||||||
}).bind('click', function () {
|
|
||||||
// $(this).blur();
|
|
||||||
save_note(container, this);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
function download(value) {
|
|
||||||
var dialog = p4.Dialog.Create({title: typeof(language) !== 'undefined' ? language['export'] : ''});
|
|
||||||
|
|
||||||
$.post("/prod/export/multi-export/", "lst=" + value, function (data) {
|
|
||||||
|
|
||||||
dialog.setContent(data);
|
|
||||||
|
|
||||||
$('.tabs', dialog.getDomElement()).tabs();
|
|
||||||
|
|
||||||
$('.close_button', dialog.getDomElement()).bind('click', function () {
|
|
||||||
dialog.Close();
|
|
||||||
});
|
|
||||||
|
|
||||||
return false;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
function display_record(compare) {
|
|
||||||
var main_container = $('#record_wrapper');
|
|
||||||
|
|
||||||
main_container.width($('#innerWrapper').innerWidth() - $('#right_column').outerWidth() - 2);
|
|
||||||
|
|
||||||
if (typeof compare == 'undefined')
|
|
||||||
compare = !main_container.hasClass('single');
|
|
||||||
|
|
||||||
var main_box = $('#record_main');
|
|
||||||
var compare_box = $('#record_compare');
|
|
||||||
|
|
||||||
var main_record = $('.lightbox_container .record', main_box);
|
|
||||||
var compare_record = $('.lightbox_container .record', compare_box);
|
|
||||||
|
|
||||||
var main_record_width = parseInt($('input[name=width]', main_box).val());
|
|
||||||
var main_record_height = parseInt($('input[name=height]', main_box).val());
|
|
||||||
var compare_record_width = parseInt($('input[name=width]', compare_box).val());
|
|
||||||
var compare_record_height = parseInt($('input[name=height]', compare_box).val());
|
|
||||||
|
|
||||||
var main_container_width = main_container.width();
|
|
||||||
var main_container_innerwidth = main_container.innerWidth();
|
|
||||||
var main_container_height = main_container.height();
|
|
||||||
var main_container_innerheight = main_container.innerHeight();
|
|
||||||
|
|
||||||
|
|
||||||
if (compare) {
|
|
||||||
$('.agreement_selector').show();
|
|
||||||
main_container.addClass('comparison');
|
|
||||||
|
|
||||||
var double_portrait_width = main_container_innerwidth / 2;
|
|
||||||
var double_portrait_height = main_container_innerheight - $('.header', main_box).outerHeight();
|
|
||||||
|
|
||||||
var double_paysage_width = main_container_innerwidth;
|
|
||||||
var double_paysage_height = main_container_innerheight / 2 - $('.header', main_box).outerHeight();
|
|
||||||
|
|
||||||
var main_display_portrait = calculate_display(
|
|
||||||
double_portrait_width, double_portrait_height,
|
|
||||||
main_record_width, main_record_height
|
|
||||||
);
|
|
||||||
var main_display_paysage = calculate_display(
|
|
||||||
double_paysage_width, double_paysage_height,
|
|
||||||
main_record_width, main_record_height
|
|
||||||
);
|
|
||||||
|
|
||||||
var compare_display_portrait = calculate_display(
|
|
||||||
double_portrait_width, double_portrait_height,
|
|
||||||
compare_record_width, compare_record_height
|
|
||||||
);
|
|
||||||
var compare_display_paysage = calculate_display(
|
|
||||||
double_paysage_width, double_paysage_height,
|
|
||||||
compare_record_width, compare_record_height
|
|
||||||
);
|
|
||||||
|
|
||||||
var surface_main_portrait = main_display_portrait.width * main_display_portrait.height;
|
|
||||||
var surface_main_paysage = main_display_paysage.width * main_display_paysage.height;
|
|
||||||
var surface_compare_portrait = compare_display_portrait.width * compare_display_portrait.height;
|
|
||||||
var surface_compare_paysage = compare_display_paysage.width * compare_display_paysage.height;
|
|
||||||
|
|
||||||
var double_portrait_surface = (surface_main_portrait + surface_compare_portrait) / 2;
|
|
||||||
var double_paysage_surface = (surface_main_paysage + surface_compare_paysage) / 2;
|
|
||||||
|
|
||||||
var smooth_image = false;
|
|
||||||
|
|
||||||
var m_width_image, m_height_image, c_width_image, c_height_image, dim_container;
|
|
||||||
|
|
||||||
if (double_portrait_surface > double_paysage_surface) {
|
|
||||||
if (!main_container.hasClass('portrait')) {
|
|
||||||
smooth_image = true;
|
|
||||||
|
|
||||||
smooth_transform(
|
|
||||||
main_box,
|
|
||||||
parseInt($('#innerWrapper').width() / 2 - 13),
|
|
||||||
$('#innerWrapper').height(),
|
|
||||||
function () {
|
|
||||||
set_container_status('portrait');
|
|
||||||
}
|
|
||||||
);
|
|
||||||
|
|
||||||
compare_box.css('visibility', 'hidden');
|
|
||||||
|
|
||||||
smooth_transform(
|
|
||||||
compare_box,
|
|
||||||
parseInt($('#innerWrapper').width() / 2 - 13),
|
|
||||||
$('#innerWrapper').height(),
|
|
||||||
function () {
|
|
||||||
compare_box.css('display', 'none')
|
|
||||||
.css('visibility', 'visible').show();
|
|
||||||
}
|
|
||||||
);
|
|
||||||
}
|
|
||||||
m_width_image = main_display_portrait.width;
|
|
||||||
m_height_image = main_display_portrait.height;
|
|
||||||
c_width_image = compare_display_portrait.width;
|
|
||||||
c_height_image = compare_display_portrait.height;
|
|
||||||
dim_container = {width: double_portrait_width, height: double_portrait_height};
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
if (!main_container.hasClass('paysage')) {
|
|
||||||
smooth_image = true;
|
|
||||||
|
|
||||||
smooth_transform(
|
|
||||||
main_box,
|
|
||||||
$('#innerWrapper').width(),
|
|
||||||
parseInt($('#innerWrapper').height() / 2),
|
|
||||||
function () {
|
|
||||||
set_container_status('paysage');
|
|
||||||
}
|
|
||||||
);
|
|
||||||
|
|
||||||
compare_box.css('visibility', 'hidden');
|
|
||||||
|
|
||||||
smooth_transform(
|
|
||||||
compare_box,
|
|
||||||
$('#innerWrapper').width(),
|
|
||||||
parseInt($('#innerWrapper').height() / 2),
|
|
||||||
function () {
|
|
||||||
compare_box.css('display', 'none')
|
|
||||||
.css('visibility', 'visible')
|
|
||||||
.show();
|
|
||||||
}
|
|
||||||
);
|
|
||||||
}
|
|
||||||
m_width_image = main_display_paysage.width;
|
|
||||||
m_height_image = main_display_paysage.height;
|
|
||||||
c_width_image = compare_display_paysage.width;
|
|
||||||
c_height_image = compare_display_paysage.height;
|
|
||||||
dim_container = {width: double_paysage_width, height: double_paysage_height};
|
|
||||||
}
|
|
||||||
|
|
||||||
var image_callback = set_image_position(false, compare_record, c_width_image, c_height_image, dim_container, function () {
|
|
||||||
});
|
|
||||||
set_image_position(smooth_image, main_record, m_width_image, m_height_image, dim_container, image_callback);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
$('.agreement_selector').hide();
|
|
||||||
main_container.removeClass('comparison');
|
|
||||||
|
|
||||||
if (compare_box.is(':visible')) {
|
|
||||||
compare_box.hide().css('visibility', 'hidden').css('display', 'block');
|
|
||||||
}
|
|
||||||
|
|
||||||
var main_display = calculate_display(
|
|
||||||
main_container_innerwidth
|
|
||||||
, (main_container_innerheight - $('.header', main_box).outerHeight())
|
|
||||||
, main_record_width
|
|
||||||
, main_record_height
|
|
||||||
);
|
|
||||||
|
|
||||||
if (!main_container.hasClass('single')) {
|
|
||||||
main_box.width('100%')
|
|
||||||
.height('100%');
|
|
||||||
|
|
||||||
set_container_status('single');
|
|
||||||
}
|
|
||||||
|
|
||||||
set_image_position(
|
|
||||||
smooth_image
|
|
||||||
, main_record
|
|
||||||
, main_display.width
|
|
||||||
, main_display.height
|
|
||||||
, {
|
|
||||||
width: main_container_width, height: (main_container_height - $('.header', main_box).outerHeight())
|
|
||||||
}
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
function set_agreement(event, el, sselcont_id, boolean_value) {
|
|
||||||
if (event.stopPropagation)
|
|
||||||
event.stopPropagation();
|
|
||||||
event.cancelBubble = true;
|
|
||||||
|
|
||||||
var id =
|
|
||||||
|
|
||||||
$.ajax({
|
|
||||||
type: "POST",
|
|
||||||
url: "/lightbox/ajax/SET_ELEMENT_AGREEMENT/" + sselcont_id + "/",
|
|
||||||
dataType: 'json',
|
|
||||||
data: {
|
|
||||||
agreement: boolean_value
|
|
||||||
},
|
|
||||||
success: function (datas) {
|
|
||||||
if (!datas.error) {
|
|
||||||
if (boolean_value == '1') {
|
|
||||||
$('.agree_' + sselcont_id + '').removeClass('not_decided');
|
|
||||||
$('.disagree_' + sselcont_id + '').addClass('not_decided');
|
|
||||||
$('.userchoice.me').addClass('agree').removeClass('disagree');
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
$('.agree_' + sselcont_id + '').addClass('not_decided');
|
|
||||||
$('.disagree_' + sselcont_id + '').removeClass('not_decided');
|
|
||||||
$('.userchoice.me').addClass('disagree').removeClass('agree');
|
|
||||||
}
|
|
||||||
p4.releasable = datas.releasable;
|
|
||||||
if (datas.releasable !== false) {
|
|
||||||
if (confirm(datas.releasable))
|
|
||||||
$('#basket_options .confirm_report').trigger('click');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
alert(datas.datas);
|
|
||||||
}
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
function get_next() {
|
|
||||||
var current_wrapper = $('#sc_container .basket_element.selected').parent();
|
|
||||||
|
|
||||||
if (current_wrapper.length === 0)
|
|
||||||
return;
|
|
||||||
|
|
||||||
current_wrapper = current_wrapper.next();
|
|
||||||
if (current_wrapper.length === 0)
|
|
||||||
current_wrapper = $('#sc_container .basket_element_wrapper:first');
|
|
||||||
|
|
||||||
$('.basket_element', current_wrapper).trigger('click');
|
|
||||||
|
|
||||||
adjust_visibility($('.basket_element', current_wrapper));
|
|
||||||
|
|
||||||
if ($(document).data('slideshow')) {
|
|
||||||
var timer = setTimeout('get_next();', 3500);
|
|
||||||
$(document).data('slideshow_ctime', timer);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function get_prev() {
|
|
||||||
var current_wrapper = $('#sc_container .basket_element.selected').parent();
|
|
||||||
|
|
||||||
if (current_wrapper.length === 0)
|
|
||||||
return;
|
|
||||||
|
|
||||||
slideshow(false);
|
|
||||||
|
|
||||||
current_wrapper = current_wrapper.prev();
|
|
||||||
if (current_wrapper.length === 0)
|
|
||||||
current_wrapper = $('#sc_container .basket_element_wrapper:last');
|
|
||||||
|
|
||||||
$('.basket_element', current_wrapper).trigger('click');
|
|
||||||
|
|
||||||
adjust_visibility($('.basket_element', current_wrapper));
|
|
||||||
}
|
|
||||||
function is_viewable(el) {
|
|
||||||
var sc_wrapper = $('#sc_wrapper');
|
|
||||||
var sc_container = $('#sc_container');
|
|
||||||
|
|
||||||
var el_width = $(el).parent().outerWidth();
|
|
||||||
var el_position = $(el).parent().position();
|
|
||||||
var sc_scroll_left = sc_wrapper.scrollLeft();
|
|
||||||
|
|
||||||
var boundup = sc_wrapper.width(),
|
|
||||||
bounddown = 0,
|
|
||||||
placeup = el_position.left + el_width - sc_scroll_left,
|
|
||||||
placedown = el_position.left - sc_scroll_left;
|
|
||||||
|
|
||||||
if (placeup <= boundup && placedown >= bounddown)
|
|
||||||
return true;
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
function adjust_visibility(el) {
|
|
||||||
if (is_viewable(el))
|
|
||||||
return;
|
|
||||||
|
|
||||||
var sc_wrapper = $('#sc_wrapper');
|
|
||||||
var el_parent = $(el).parent();
|
|
||||||
|
|
||||||
var sc_left = el_parent.position().left + el_parent.outerWidth() / 2 - sc_wrapper.width() / 2;
|
|
||||||
|
|
||||||
sc_wrapper.stop().animate({'scrollLeft': sc_left});
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
function slideshow(boolean_value) {
|
|
||||||
if (boolean_value == $(document).data('slideshow'))
|
|
||||||
return;
|
|
||||||
|
|
||||||
if (!boolean_value && $(document).data('slideshow_ctime')) {
|
|
||||||
clearTimeout($(document).data('slideshow_ctime'));
|
|
||||||
$(document).data('slideshow_ctime', false);
|
|
||||||
}
|
|
||||||
|
|
||||||
$(document).data('slideshow', boolean_value);
|
|
||||||
|
|
||||||
var headers = $('#record_wrapper .header');
|
|
||||||
|
|
||||||
if (boolean_value) {
|
|
||||||
$('.play_button, .next_button.play, .previous_button.play').hide();
|
|
||||||
$('.pause_button, .next_button.pause, .previous_button.pause').show();
|
|
||||||
get_next();
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
$('.pause_button, .next_button.pause, .previous_button.pause').hide();
|
|
||||||
$('.play_button, .next_button.play, .previous_button.play').show();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
function smooth_transform(box, width, height, callback) {
|
|
||||||
if (typeof callback == 'undefined')
|
|
||||||
callback = function () {
|
|
||||||
};
|
|
||||||
|
|
||||||
$(box).stop()
|
|
||||||
.css(
|
|
||||||
{
|
|
||||||
width: width,
|
|
||||||
height: height
|
|
||||||
}
|
|
||||||
// ,
|
|
||||||
// 500,
|
|
||||||
// callback
|
|
||||||
);
|
|
||||||
callback();
|
|
||||||
}
|
|
||||||
|
|
||||||
function save_note(container, button) {
|
|
||||||
var sselcont_id = $(button).attr('id').split('_').pop();
|
|
||||||
var note = $('.notes_wrapper textarea', container).val();
|
|
||||||
|
|
||||||
$.ajax({
|
|
||||||
type: "POST",
|
|
||||||
url: "/lightbox/ajax/SET_NOTE/" + sselcont_id + "/",
|
|
||||||
dataType: 'json',
|
|
||||||
data: {
|
|
||||||
note: note
|
|
||||||
},
|
|
||||||
success: function (datas) {
|
|
||||||
hide_notes(container);
|
|
||||||
$('.notes_wrapper', container).remove();
|
|
||||||
$('.lightbox_container', container).append(datas.datas);
|
|
||||||
activate_notes(container);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
}
|
|
||||||
function calculate_display(display_width, display_height, width, height, margin) {
|
|
||||||
if (typeof margin == 'undefined')
|
|
||||||
margin = 10;
|
|
||||||
|
|
||||||
var display_ratio = display_width / display_height;
|
|
||||||
var ratio = width / height;
|
|
||||||
var w, h;
|
|
||||||
|
|
||||||
if (ratio > display_ratio)//landscape
|
|
||||||
{
|
|
||||||
w = display_width - 2 * margin;
|
|
||||||
if (w > width)
|
|
||||||
w = width;
|
|
||||||
h = w / ratio;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
h = display_height - 2 * margin;
|
|
||||||
if (h > height)
|
|
||||||
h = height;
|
|
||||||
w = ratio * h;
|
|
||||||
}
|
|
||||||
|
|
||||||
return {width: w, height: h};
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
function set_image_position(smooth, image, width, height, container, callback) {
|
|
||||||
var dimensions = {};
|
|
||||||
|
|
||||||
if (typeof container !== 'undefined') {
|
|
||||||
var c_width = container.width;
|
|
||||||
var c_height = container.height;
|
|
||||||
|
|
||||||
dimensions.top = parseInt((c_height - height) / 2);
|
|
||||||
dimensions.left = parseInt((c_width - width) / 2);
|
|
||||||
}
|
|
||||||
if (typeof callback == 'undefined') {
|
|
||||||
callback = function () {
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
dimensions.width = parseInt(width);
|
|
||||||
dimensions.height = parseInt(height);
|
|
||||||
// if(smooth)
|
|
||||||
// {
|
|
||||||
// $(image).stop().animate(dimensions,500,callback);
|
|
||||||
// }
|
|
||||||
// else
|
|
||||||
// {
|
|
||||||
$(image).css(dimensions);
|
|
||||||
callback;
|
|
||||||
// }
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
function scid_click(event, el) {
|
|
||||||
var compare = is_ctrl_key(event);
|
|
||||||
|
|
||||||
if (compare) {
|
|
||||||
if ($('.basket_element', el).hasClass('selected'))
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
$('#sc_container .basket_element.selected').removeClass('selected');
|
|
||||||
$('.basket_element', el).addClass('selected');
|
|
||||||
}
|
|
||||||
|
|
||||||
var sselcont_id = $('.basket_element', el).attr('id').split('_').pop();
|
|
||||||
var ssel_id = $('#navigation').val();
|
|
||||||
|
|
||||||
var container = $('#sc_container');
|
|
||||||
|
|
||||||
var request = container.data('request');
|
|
||||||
if (request && typeof(request.abort) == 'function') {
|
|
||||||
request.abort();
|
|
||||||
}
|
|
||||||
|
|
||||||
request = $.ajax({
|
|
||||||
type: "GET",
|
|
||||||
url: $(el).attr('href'),//"/lightbox/ajax/LOAD_BASKET_ELEMENT/"+sselcont_id+'/',
|
|
||||||
dataType: 'json',
|
|
||||||
success: function (data) {
|
|
||||||
var container = false;
|
|
||||||
|
|
||||||
if (compare) {
|
|
||||||
container = $('#record_compare');
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
container = $('#record_main');
|
|
||||||
|
|
||||||
$('#record_infos .lightbox_container')
|
|
||||||
.empty()
|
|
||||||
.append(data.caption);
|
|
||||||
|
|
||||||
$('#basket_infos')
|
|
||||||
.empty()
|
|
||||||
.append(data.agreement_html);
|
|
||||||
}
|
|
||||||
|
|
||||||
$('.display_id', container)
|
|
||||||
.empty()
|
|
||||||
.append(data.number);
|
|
||||||
|
|
||||||
$('.title', container)
|
|
||||||
.empty()
|
|
||||||
.append(data.title)
|
|
||||||
.attr('title', data.title);
|
|
||||||
|
|
||||||
var options_container = $('.options', container);
|
|
||||||
options_container
|
|
||||||
.empty()
|
|
||||||
.append(data.options_html);
|
|
||||||
|
|
||||||
$('.lightbox_container', container).empty()
|
|
||||||
.append(data.preview + data.selector_html + data.note_html);
|
|
||||||
|
|
||||||
|
|
||||||
display_basket_element(compare, sselcont_id);
|
|
||||||
|
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
container.data('request', request);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
function download_basket() {
|
|
||||||
var ids = $.map($('#sc_container .download_form').toArray(), function (el, i) {
|
|
||||||
return $('input[name="basrec"]', $(el)).val();
|
|
||||||
});
|
|
||||||
download(ids.join(';'));
|
|
||||||
}
|
|
||||||
|
|
||||||
function is_ctrl_key(event) {
|
|
||||||
if (event.altKey)
|
|
||||||
return true;
|
|
||||||
if (event.ctrlKey)
|
|
||||||
return true;
|
|
||||||
if (event.metaKey) // apple key opera
|
|
||||||
return true;
|
|
||||||
if (event.keyCode == '17') // apple key opera
|
|
||||||
return true;
|
|
||||||
if (event.keyCode == '224') // apple key mozilla
|
|
||||||
return true;
|
|
||||||
if (event.keyCode == '91') // apple key safari
|
|
||||||
return true;
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
function is_shift_key(event) {
|
|
||||||
if (event.shiftKey)
|
|
||||||
return true;
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
@@ -1,58 +0,0 @@
|
|||||||
{% if basket_element and basket_element.getBasket().getValidation() %}
|
|
||||||
<div class="left choices">
|
|
||||||
<table style="margin-left:10px;width:220px;height:30px;" cellspacing="0" cellpadding="0">
|
|
||||||
<tbody>
|
|
||||||
<tr>
|
|
||||||
<td class="title">{{ 'VALIDATION' | trans }}</td>
|
|
||||||
<td class="report_wrapper">
|
|
||||||
<a class="report" href="#">
|
|
||||||
{{ 'lightbox::recaptitulatif' | trans }}
|
|
||||||
</a>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
{% if basket.getValidation() %}
|
|
||||||
<div style="margin-left:10px;width:220px;">
|
|
||||||
{{ basket.getValidation().getValidationString(app, app.getAuthenticatedUser()) }}
|
|
||||||
</div>
|
|
||||||
<ul style="margin:10px 0 0 20px;width:200px;">
|
|
||||||
{% for validation_data in basket_element.getValidationDatas() %}
|
|
||||||
{% if basket.getValidation().getParticipant(app.getAuthenticatedUser()).getCanSeeOthers() or validation_data.getParticipant().getUser() == app.getAuthenticatedUser() %}
|
|
||||||
{% if validation_data.getAgreement() == true %}
|
|
||||||
{% set classuser = 'agree' %}
|
|
||||||
{% elseif validation_data.getAgreement() is null %}
|
|
||||||
{% set classuser = '' %}
|
|
||||||
{% else %}
|
|
||||||
{% set classuser = 'disagree' %}
|
|
||||||
{% endif %}
|
|
||||||
{% set participant = validation_data.getParticipant().getUser() %}
|
|
||||||
<li class="{% if participant.getId() == app.getAuthenticatedUser().getId() %}me{% endif %} {{classuser}} userchoice">{{participant.getDisplayName()}}</li>
|
|
||||||
{% endif %}
|
|
||||||
{% endfor %}
|
|
||||||
</ul>
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
{% if basket_element and basket_element.getBasket().getValidation() and basket.getValidation().getParticipant(app.getAuthenticatedUser()).getCanAgree() %}
|
|
||||||
<div class="left choices">
|
|
||||||
<div style="height:60px;margin-top:15px;">
|
|
||||||
<table cellspacing="0" cellpadding="0" style="width:230px;">
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
{% set agreement = basket_element.getUserValidationDatas(app.getAuthenticatedUser()).getAgreement() %}
|
|
||||||
<div style="width:70px;margin:0px auto 0;" class="ui-corner-all big_box agree_{{basket_element.getId()}} agree {% if agreement is null or agreement == false %}not_decided{% endif %}">
|
|
||||||
<img src="/assets/lightbox/images/agree-bigie6.gif" style="vertical-align:middle;"/><span>{{ 'validation:: OUI' | trans }}</span>
|
|
||||||
</div>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<div style="width:70px;margin:0px auto;" class="ui-corner-all big_box disagree_{{basket_element.getId()}} disagree {% if agreement is null or agreement == true %}not_decided{% endif %}">
|
|
||||||
<img src="/assets/lightbox/images/disagree-bigie6.gif" style="vertical-align:middle;"/><span>{{ 'validation:: NON' | trans }}</span>
|
|
||||||
</div>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{% endif %}
|
|
||||||
</div>
|
|
||||||
{% endif %}
|
|
@@ -1,7 +0,0 @@
|
|||||||
{% if basket.getValidation() and basket.getValidation().getParticipant(app.getAuthenticatedUser()).getCanAgree() %}
|
|
||||||
<button class="confirm_report" title="{{ 'validation::envoyer mon rapport' | trans }}">
|
|
||||||
<img src="/assets/lightbox/images/envoyerie6.gif"/>
|
|
||||||
{{ 'validation::envoyer mon rapport' | trans }}
|
|
||||||
<img src="/assets/common/images/icons/loader1F1E1B.gif" style="visibility:hidden;" class="loader"/>
|
|
||||||
</button>
|
|
||||||
{% endif %}
|
|
@@ -1,127 +0,0 @@
|
|||||||
{% extends "lightbox/index_layout.html.twig" %}
|
|
||||||
|
|
||||||
{% import 'common/thumbnail.html.twig' as thumbnail %}
|
|
||||||
{% import 'common/macros.html.twig' as macro %}
|
|
||||||
|
|
||||||
{% block javascript %}
|
|
||||||
<script type="text/javascript" src="/assets/common/js/common{% if not app.debug %}.min{% endif %}.js"></script>
|
|
||||||
<script type="text/javascript" src="/assets/lightbox/js/lightboxIe6{% if not app.debug %}.min{% endif %}.js"></script>
|
|
||||||
{% endblock %}
|
|
||||||
|
|
||||||
{% block content %}
|
|
||||||
<div id="innerWrapper" style="top:10px;left:10px;position:relative;width:100%;height:100%;">
|
|
||||||
<div id="innerTop" style="bottom:186px;position:relative;bottom:0;width:100%;">
|
|
||||||
|
|
||||||
<div id="record_wrapper" class="single PNBleft" style="overflow:hidden;">
|
|
||||||
<div id="record_main" class="record_display_box PNBleft" style="">
|
|
||||||
<div class="header ui-widget-header ui-corner-all left">
|
|
||||||
<table cellspacing="0" cellpadding="0" border="0" style="width:100%;height:100%;">
|
|
||||||
<tr valign="middle">
|
|
||||||
<td style="width:10px;"></td>
|
|
||||||
<td style="width:35px;text-align:center;">
|
|
||||||
<div class="display_id">{% if first_item %}{{first_item.getOrd()}}{% endif %}</div>
|
|
||||||
</td>
|
|
||||||
<td style="text-align:left;width:auto;">
|
|
||||||
<div class="title title15" title="{% if first_item %}{{first_item.getRecord(app).get_title|e}}{% endif %}">
|
|
||||||
{% if first_item %}{{first_item.getRecord(app).get_title}}{% endif %}
|
|
||||||
</div>
|
|
||||||
</td>
|
|
||||||
<td style="text-align:right;width:230px;">
|
|
||||||
<div class="options">
|
|
||||||
</div>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
<div class="lightbox_container left">
|
|
||||||
{% if first_item %}
|
|
||||||
{% if app.getAclForUser(app.getAuthenticatedUser()).has_access_to_subdef(first_item.getRecord(app), 'preview') %}
|
|
||||||
{% set preview = first_item.getRecord(app).get_preview() %}
|
|
||||||
{% else %}
|
|
||||||
{% set preview = first_item.getRecord(app).get_thumbnail() %}
|
|
||||||
{% endif %}
|
|
||||||
{{thumbnail.format(preview, preview.get_width(), preview.get_height(),'', false, false)}}
|
|
||||||
{% endif %}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div id="record_compare" class="record_display_box PNBleft">
|
|
||||||
<div class="header ui-widget-header ui-corner-all left">
|
|
||||||
<table cellspacing="0" cellpadding="0" border="0" style="width:100%;height:100%;">
|
|
||||||
<tr valign="middle">
|
|
||||||
<td style="width:10px;"></td>
|
|
||||||
<td style="width:35px;text-align:center;">
|
|
||||||
<div class="display_id"></div>
|
|
||||||
</td>
|
|
||||||
<td style="text-align:left;width:auto;">
|
|
||||||
<div class="title title15" title="{% if first_item %}{{first_item.getRecord(app).get_title|e}}{% endif %}">
|
|
||||||
{% if first_item %}{{first_item.getRecord(app).get_title}}{% endif %}
|
|
||||||
</div>
|
|
||||||
</td>
|
|
||||||
<td style="text-align:right;width:230px;">
|
|
||||||
<div class="options"></div>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
<div class="lightbox_container left">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div id="right_column" class="PNBleft" style="width:250px;overflow-y:scroll;overflow-x:hidden;background-color:#1f1e1b;">
|
|
||||||
<div class="right_column_title unselectable left" style="width:230px;height:30px;">
|
|
||||||
<table style="border:none;width:215px;height:30px;" cellspacing="0" cellpadding="0">
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<img class="collapsed" src="/assets/lightbox/images/collapsedie6.gif"/>
|
|
||||||
<span class="caption">{{ 'notice' | trans }}</span>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="right_column_wrapper right_column_wrapper_caption left unselectable" style="width:230px;height:auto;">
|
|
||||||
<div id="record_infos">
|
|
||||||
<div class="lightbox_container">
|
|
||||||
{% set business = app.getAclForUser(app.getAuthenticatedUser()).has_right_on_base(first_item.getRecord(app).get_base_id(), 'canmodifrecord') %}
|
|
||||||
{% if first_item %}
|
|
||||||
{{macro.caption(first_item.getRecord(app), business, false)}}
|
|
||||||
{% endif %}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div id="innerBottom" style="position:relative;bottom:0;width:100%;height:196px;">
|
|
||||||
<div class="" style="height:30px;width:100%;">
|
|
||||||
<table border="0" cellspacing="0" cellpadding="0">
|
|
||||||
<tr>
|
|
||||||
<td style="width:20px;">
|
|
||||||
</td>
|
|
||||||
<td style="width:40px;">
|
|
||||||
<button class="ui-corner-all basket_downloader" title="{{ 'boutton::telecharger tous les documents' | trans }}">
|
|
||||||
<img src="/assets/lightbox/images/save.png"/>
|
|
||||||
</button>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<hr/>
|
|
||||||
</td>
|
|
||||||
<td style="width:20px;">
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="" style="width:100%;position:relative;height:166px;overflow-x:hidden;overflow-y:hidden;">
|
|
||||||
<div class="" id="sc_wrapper" style="width:100%;position:relative;overflow-x:auto;overflow-y:hidden;">
|
|
||||||
{% include 'lightbox/IE6/feed_container.html.twig' %}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div id="report" style="display:none;">
|
|
||||||
</div>
|
|
||||||
<div id="dialog_dwnl" title="{{ 'action : exporter' | trans }}" style="display:none;"></div>
|
|
||||||
|
|
||||||
{% endblock %}
|
|
||||||
|
|
||||||
|
|
@@ -1,20 +0,0 @@
|
|||||||
|
|
||||||
{% block basket %}
|
|
||||||
<div id="sc_container">
|
|
||||||
{% for element in feed_entry.getItems() %}
|
|
||||||
<div class="basket_element_wrapper">
|
|
||||||
<a href="{{ path('lightbox_ajax_load_feeditem', { 'entry_id' : feed_entry.getId(), 'item_id' : element.getId()}) }}">
|
|
||||||
<div id="scid_{{element.getId()}}" class="basket_element ui-corner-all {% if first_item and first_item.getId() == element.getId() %}selected{% endif %}">
|
|
||||||
<div class="display_id">{{element.getOrd()}}</div>
|
|
||||||
{{thumbnail.format(element.getRecord(app).get_thumbnail() ,114,85, '', true, false)}}
|
|
||||||
<form name="download_form" class="download_form" style="display:none;">
|
|
||||||
<input type="hidden" name="basrec" value="{{element.getRecord(app).get_serialize_key()}}"/>
|
|
||||||
</form>
|
|
||||||
<div tooltipsrc="{{ path('prod_tooltip_preview', { 'sbas_id' : element.getRecord(app).get_sbas_id(), 'record_id' : element.getRecord(app).get_record_id() }) }}" class="previewTips"></div>
|
|
||||||
</div>
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
{% endfor %}
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{% endblock basket %}
|
|
@@ -1,30 +0,0 @@
|
|||||||
<span style="padding:10px 4px 7px;">
|
|
||||||
{% if feed_element %}
|
|
||||||
<button class="previous_button play" title="{{ 'boutton::precedent' | trans }}">
|
|
||||||
<img src="/assets/lightbox/images/previe6.png" />
|
|
||||||
</button>
|
|
||||||
<button class="previous_button pause" title="{{ 'boutton::precedent' | trans }}">
|
|
||||||
<img src="/assets/lightbox/images/prev_pauseie6.png" />
|
|
||||||
</button>
|
|
||||||
<button class="play_button" title="{{ 'boutton::demarrer' | trans }}">
|
|
||||||
<img src="/assets/lightbox/images/playie6.png" />
|
|
||||||
</button>
|
|
||||||
<button class="pause_button" title="{{ 'boutton::pause' | trans }}">
|
|
||||||
<img src="/assets/lightbox/images/pauseie6.png" />
|
|
||||||
</button>
|
|
||||||
<button class="next_button play" title="{{ 'boutton::suivant' | trans }}">
|
|
||||||
<img src="/assets/lightbox/images/nextie6.png" />
|
|
||||||
</button>
|
|
||||||
<button class="next_button pause" title="{{ 'boutton::suivant' | trans }}">
|
|
||||||
<img src="/assets/lightbox/images/next_pauseie6.png" />
|
|
||||||
</button>
|
|
||||||
<button class="download_button" title="{{ 'boutton::telecharger' | trans }}">
|
|
||||||
<img src="/assets/lightbox/images/saveie6.png"/>
|
|
||||||
</button>
|
|
||||||
<form name="download_form" style="display:none;">
|
|
||||||
<input type="hidden" name="basrec" value="{{feed_element.getRecord(app).get_serialize_key()}}"/>
|
|
||||||
</form>
|
|
||||||
|
|
|
||||||
{% endif %}
|
|
||||||
</span>
|
|
||||||
|
|
@@ -1,151 +0,0 @@
|
|||||||
{% extends "lightbox/index_layout.html.twig" %}
|
|
||||||
|
|
||||||
{% import 'common/thumbnail.html.twig' as thumbnail %}
|
|
||||||
|
|
||||||
{% block javascript %}
|
|
||||||
<script type="text/javascript" src="/assets/common/js/common{% if not app.debug %}.min{% endif %}.js"></script>
|
|
||||||
<script type="text/javascript" src="/assets/lightbox/js/lightboxIe6{% if not app.debug %}.min{% endif %}.js"></script>
|
|
||||||
{% endblock %}
|
|
||||||
|
|
||||||
{% block stylesheet %}
|
|
||||||
<link type="text/css" rel="stylesheet" href="/assets/lightbox/css/lightbox-ie6{% if not app.debug %}.min{% endif %}.css" media="screen"/>
|
|
||||||
{% endblock %}
|
|
||||||
|
|
||||||
{% block icon %}
|
|
||||||
<link rel="shortcut icon" type="image/x-icon" href="/assets/lightbox/images/favicon.ico">
|
|
||||||
{% endblock %}
|
|
||||||
|
|
||||||
{% block content %}
|
|
||||||
<div id="main_index">
|
|
||||||
<table id="main_wrapper" cellspacing="0" cellpadding="0">
|
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<th class="title">
|
|
||||||
<h1>{{ 'Validations' | trans }}</h1>
|
|
||||||
</th>
|
|
||||||
<th>
|
|
||||||
<i>{{ 'Voici vos validations en cours' | trans }}</i>
|
|
||||||
</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
{% for basket in baskets_collection %}
|
|
||||||
{% if basket.getValidation() %}
|
|
||||||
{% set basket_length = basket.getElements().count() %}
|
|
||||||
<tr>
|
|
||||||
<td colspan="2">
|
|
||||||
<div class="basket_wrapper ui-corner-all clickable">
|
|
||||||
<table cellspacing="0" cellpadding="0" border="0">
|
|
||||||
<tbody>
|
|
||||||
<tr>
|
|
||||||
<td style="width:170px;">
|
|
||||||
{% if basket_length > 0%}
|
|
||||||
{{thumbnail.format(basket.getELements().first().getRecord(app).get_thumbnail, 170, 170, '', true, false)}}
|
|
||||||
{% endif %}
|
|
||||||
</td>
|
|
||||||
<td style="width:20px;">
|
|
||||||
</td>
|
|
||||||
<td valign="top">
|
|
||||||
<div class="basket_description">
|
|
||||||
<table cellspacing="0" cellpadding="0" style="table-layout:fixed;margin:0;width:350px;height:155px;">
|
|
||||||
<tr style="height:20px;" valign='top'>
|
|
||||||
<td>
|
|
||||||
<h2 class="title15">
|
|
||||||
{{basket.getName()}}
|
|
||||||
</h2>
|
|
||||||
{% if basket.getValidation().isFinished() %}
|
|
||||||
{{ '(validation) session terminee' | trans }}
|
|
||||||
{% elseif basket.getValidation().getParticipant(app.getAuthenticatedUser()).getIsConfirmed() %}
|
|
||||||
{{ '(validation) envoyee' | trans }}
|
|
||||||
{% else %}
|
|
||||||
{{ '(validation) a envoyer' | trans }}
|
|
||||||
{% endif %}
|
|
||||||
</td>
|
|
||||||
<td class="right">
|
|
||||||
({% trans with {'%basket_length%' : basket_length} %}%basket_length% documents{% endtrans %})
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr style="height:20px;">
|
|
||||||
<td colspan="2"></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td colspan="2">
|
|
||||||
<div>{{ basket.getDescription() }}</div>
|
|
||||||
<div>{{ basket.getValidation.getValidationString(app, app.getAuthenticatedUser()) }}</div>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
<input type="hidden" name="ssel_id" value="{{basket.getId()}}"/>
|
|
||||||
</div>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
{% endif %}
|
|
||||||
{% endfor %}
|
|
||||||
<tr>
|
|
||||||
<th class="title">
|
|
||||||
<h1>{{ 'Paniers' | trans }}</h1>
|
|
||||||
</th>
|
|
||||||
<th>
|
|
||||||
<i>{{ 'Voici vos paniers' | trans }}</i>
|
|
||||||
</th>
|
|
||||||
</tr>
|
|
||||||
{% for basket in baskets_collection %}
|
|
||||||
{% if basket.getValidation() is null %}
|
|
||||||
{% set basket_length = basket.getElements().count() %}
|
|
||||||
<tr>
|
|
||||||
<td colspan="2">
|
|
||||||
<div class="basket_wrapper ui-corner-all clickable">
|
|
||||||
<table cellspacing="0" cellpadding="0" border="0">
|
|
||||||
<tbody>
|
|
||||||
<tr>
|
|
||||||
<td style="width:170px;">
|
|
||||||
{% if basket_length > 0%}
|
|
||||||
{{thumbnail.format(basket.getElements().first().getRecord(app).get_thumbnail, 170, 170, '', true, false)}}
|
|
||||||
{% endif %}
|
|
||||||
</td>
|
|
||||||
<td style="width:20px;">
|
|
||||||
</td>
|
|
||||||
<td valign="top">
|
|
||||||
<div class="basket_description">
|
|
||||||
<table cellspacing="0" cellpadding="0" style="margin:0;width:100%;">
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<h2 class="title15">
|
|
||||||
{{basket.getName()}}
|
|
||||||
</h2>
|
|
||||||
</td>
|
|
||||||
<td class="right">
|
|
||||||
({% trans with {'%basket_length%' : basket_length} %}%basket_length% documents{% endtrans %})
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr style="height:20px;">
|
|
||||||
<td colspan="2"></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td colspan="2">
|
|
||||||
<div>{{basket.getDescription()}}</div>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
<input type="hidden" name="ssel_id" value="{{basket.getId()}}"/>
|
|
||||||
</div>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
{% endif %}
|
|
||||||
{% endfor %}
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
{% endblock %}
|
|
||||||
|
|
||||||
|
|
@@ -1,28 +0,0 @@
|
|||||||
|
|
||||||
{% block basket %}
|
|
||||||
<div id="sc_container">
|
|
||||||
{% for element in basket.getElements() %}
|
|
||||||
<div class="basket_element_wrapper">
|
|
||||||
<a href="{{ path('lightbox_ajax_load_basketelement', { 'sselcont_id' : element.getId() }) }}">
|
|
||||||
<div id="scid_{{element.getId()}}" class="basket_element ui-corner-all {% if basket_element and basket_element.getId() == element.getId() %}selected{% endif %}">
|
|
||||||
<div class="display_id">{{element.getRecord(app).getNumber()}}</div>
|
|
||||||
{% if basket.getValidation() %}
|
|
||||||
<div class="agreement">
|
|
||||||
<img src="/assets/lightbox/images/agree.png"
|
|
||||||
class="agree_button {%if element.getUserValidationDatas(app.getAuthenticatedUser()).getAgreement() == false or element.getUserValidationDatas(app.getAuthenticatedUser()).getAgreement() is null %}not_decided{%endif%} agree_{{element.getId()}}" />
|
|
||||||
<img src="/assets/lightbox/images/disagree.png"
|
|
||||||
class="disagree_button {%if element.getUserValidationDatas(app.getAuthenticatedUser()).getAgreement() == true or element.getUserValidationDatas(app.getAuthenticatedUser()).getAgreement() is null %}not_decided{%endif%} disagree_{{element.getId()}}" />
|
|
||||||
</div>
|
|
||||||
{% endif %}
|
|
||||||
{{thumbnail.format(element.getRecord(app).get_thumbnail,114,85, '', true, false)}}
|
|
||||||
<form name="download_form" class="download_form" style="display:none;">
|
|
||||||
<input type="hidden" name="basrec" value="{{element.getRecord(app).get_serialize_key()}}"/>
|
|
||||||
</form>
|
|
||||||
<div tooltipsrc="{{ path('prod_tooltip_preview', { 'sbas_id' : element.getRecord(app).get_sbas_id(), 'record_id' : element.getRecord(app).get_record_id() }) }}" class="previewTips"></div>
|
|
||||||
</div>
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
{% endfor %}
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{% endblock basket %}
|
|
@@ -1,42 +0,0 @@
|
|||||||
<span style="padding:10px 4px 7px;">
|
|
||||||
{% if basket_element %}
|
|
||||||
<button class="previous_button play" title="{{ 'boutton::precedent' | trans }}">
|
|
||||||
<img src="/assets/lightbox/images/previe6.png" />
|
|
||||||
</button>
|
|
||||||
<button class="previous_button pause" title="{{ 'boutton::precedent' | trans }}">
|
|
||||||
<img src="/assets/lightbox/images/prev_pauseie6.png" />
|
|
||||||
</button>
|
|
||||||
<button class="play_button" title="{{ 'boutton::demarrer' | trans }}">
|
|
||||||
<img src="/assets/lightbox/images/playie6.png" />
|
|
||||||
</button>
|
|
||||||
<button class="pause_button" title="{{ 'boutton::pause' | trans }}">
|
|
||||||
<img src="/assets/lightbox/images/pauseie6.png" />
|
|
||||||
</button>
|
|
||||||
<button class="next_button play" title="{{ 'boutton::suivant' | trans }}">
|
|
||||||
<img src="/assets/lightbox/images/nextie6.png" />
|
|
||||||
</button>
|
|
||||||
<button class="next_button pause" title="{{ 'boutton::suivant' | trans }}">
|
|
||||||
<img src="/assets/lightbox/images/next_pauseie6.png" />
|
|
||||||
</button>
|
|
||||||
<button class="download_button" title="{{ 'boutton::telecharger' | trans }}">
|
|
||||||
<img src="/assets/lightbox/images/saveie6.png"/>
|
|
||||||
</button>
|
|
||||||
<form name="download_form" style="display:none;">
|
|
||||||
<input type="hidden" name="basrec" value="{{basket_element.getRecord(app).get_serialize_key()}}"/>
|
|
||||||
</form>
|
|
||||||
|
|
|
||||||
{% if basket_element.getBasket().getValidation() %}
|
|
||||||
<button class="comment_button">
|
|
||||||
<img src="/assets/lightbox/images/noteie6.png"/>
|
|
||||||
{% set n = 0 %}
|
|
||||||
{% for validationData in basket_element.getValidationDatas() %}
|
|
||||||
{% if validationData.getNote() %}
|
|
||||||
{% set n = n+1 %}
|
|
||||||
{% endif %}
|
|
||||||
{% endfor %}
|
|
||||||
{{ n }}
|
|
||||||
</button>
|
|
||||||
{% endif %}
|
|
||||||
{% endif %}
|
|
||||||
</span>
|
|
||||||
|
|
@@ -1,159 +0,0 @@
|
|||||||
{% extends "lightbox/index_layout.html.twig" %}
|
|
||||||
|
|
||||||
{% import 'common/thumbnail.html.twig' as thumbnail %}
|
|
||||||
{% import 'common/macros.html.twig' as macro %}
|
|
||||||
|
|
||||||
{% block javascript %}
|
|
||||||
<script type="text/javascript" src="/assets/common/js/common{% if not app.debug %}.min{% endif %}.js"></script>
|
|
||||||
<script type="text/javascript" src="/assets/lightbox/js/lightboxIe6{% if not app.debug %}.min{% endif %}.js"></script>
|
|
||||||
{% endblock %}
|
|
||||||
|
|
||||||
{% block content %}
|
|
||||||
{% set basket_element = basket.getElements().first() %}
|
|
||||||
<div id="innerWrapper" style="top:10px;left:10px;position:relative;width:100%;height:100%;">
|
|
||||||
<div id="innerTop" style="bottom:186px;position:relative;bottom:0;width:100%;">
|
|
||||||
<div id="record_wrapper" class="single PNBleft" style="overflow:hidden;">
|
|
||||||
<div id="record_main" class="record_display_box PNBleft" style="">
|
|
||||||
<div class="header ui-widget-header ui-corner-all left">
|
|
||||||
<table cellspacing="0" cellpadding="0" border="0" style="width:100%;height:100%;">
|
|
||||||
<tr valign="middle">
|
|
||||||
<td style="width:10px;"></td>
|
|
||||||
<td style="width:35px;text-align:center;">
|
|
||||||
<div class="display_id">{% if basket_element %}{{basket_element.getOrd()}}{% endif %}</div>
|
|
||||||
</td>
|
|
||||||
<td style="text-align:left;width:auto;">
|
|
||||||
<div class="title title15" title="{% if basket_element %}{{basket_element.getRecord(app).get_title}}{% endif %}">
|
|
||||||
{% if basket_element %}{{basket_element.getRecord(app).get_title}}{% endif %}
|
|
||||||
</div>
|
|
||||||
</td>
|
|
||||||
<td style="text-align:right;width:230px;">
|
|
||||||
<div class="options">
|
|
||||||
{% include 'lightbox/IE6/sc_options_box.html.twig' %}
|
|
||||||
</div>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
<div class="lightbox_container left">
|
|
||||||
{% if basket_element %}
|
|
||||||
|
|
||||||
{% set bask_prev = basket_element.getRecord(app).get_preview() %}
|
|
||||||
|
|
||||||
{% set width = bask_prev.get_width() %}
|
|
||||||
{% set height = bask_prev.get_height() %}
|
|
||||||
|
|
||||||
{{ thumbnail.format(bask_prev, width,height, '', false, false) }}
|
|
||||||
|
|
||||||
{% endif %}
|
|
||||||
{% include 'lightbox/selector_box.html.twig' %}
|
|
||||||
{% include 'lightbox/sc_note.html.twig' %}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div id="record_compare" class="record_display_box PNBleft">
|
|
||||||
<div class="header ui-widget-header ui-corner-all left">
|
|
||||||
<table cellspacing="0" cellpadding="0" border="0" style="width:100%;height:100%;">
|
|
||||||
<tr valign="middle">
|
|
||||||
<td style="width:10px;"></td>
|
|
||||||
<td style="width:35px;text-align:center;">
|
|
||||||
<div class="display_id"></div>
|
|
||||||
</td>
|
|
||||||
<td style="text-align:left;width:auto;">
|
|
||||||
<div class="title title15" title="{% if basket_element %}{{basket_element.getRecord(app).get_title}}{% endif %}">
|
|
||||||
{% if basket_element %}{{basket_element.getRecord(app).get_title}}{% endif %}
|
|
||||||
</div>
|
|
||||||
</td>
|
|
||||||
<td style="text-align:right;width:230px;">
|
|
||||||
<div class="options"></div>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
<div class="lightbox_container left">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div id="right_column" class="PNBleft" style="width:250px;overflow-y:scroll;overflow-x:hidden;background-color:#1f1e1b;">
|
|
||||||
<div class="right_column_title unselectable left" style="width:230px;height:30px;">
|
|
||||||
<table style="border:none;width:215px;height:30px;" cellspacing="0" cellpadding="0">
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<img class="collapsed" src="/assets/lightbox/images/collapsedie6.gif"/>
|
|
||||||
<span class="caption">{{ 'notice' | trans }}</span>
|
|
||||||
</td>
|
|
||||||
{% if basket.getValidation() %}
|
|
||||||
<td>
|
|
||||||
<img class="collapsed" src="/assets/lightbox/images/collapsedie6.gif"/>
|
|
||||||
<span class="validate highlight">{{ 'Validation' | trans }}</span>
|
|
||||||
</td>
|
|
||||||
{% endif %}
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="right_column_wrapper right_column_wrapper_caption left unselectable" style="width:230px;height:auto;{% if basket.getValidation() %}display:none;{% endif %}">
|
|
||||||
<div id="record_infos">
|
|
||||||
<div class="lightbox_container">
|
|
||||||
{% if basket_element %}
|
|
||||||
{% set business = app.getAclForUser(app.getAuthenticatedUser()).has_right_on_base(basket_element.getRecord(app).get_base_id(), 'canmodifrecord') %}
|
|
||||||
{{macro.caption(basket_element.getRecord(app), business, false)}}
|
|
||||||
{% endif %}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{% if basket.getValidation() %}
|
|
||||||
<div style="width:230px;height:auto;" id="basket_infos" class="right_column_wrapper unselectable right_column_wrapper_user left">
|
|
||||||
{% include 'lightbox/IE6/agreement_box.html.twig' %}
|
|
||||||
<div id="basket_options" class="ui-corner-all unselectable left" style="height:35px;xmargin-top:10px;">
|
|
||||||
{% include 'lightbox/IE6/basket_options.html.twig' %}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{% endif %}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div id="innerBottom" style="position:relative;bottom:0;width:100%;height:196px;">
|
|
||||||
<div class="" style="height:30px;width:100%;">
|
|
||||||
<table border="0" cellspacing="0" cellpadding="0">
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<select id="navigation">
|
|
||||||
<optgroup label="{{ 'Validations' | trans }}">
|
|
||||||
{% for item in baskets_collection %}
|
|
||||||
{% if item.getValidation() %}
|
|
||||||
<option {% if basket.getId() == item.getId() %} selected="selected" {% endif %}
|
|
||||||
value="{{item.getId()}}">{{item.getName()}}</option>
|
|
||||||
{% endif %}
|
|
||||||
{% endfor %}
|
|
||||||
</optgroup>
|
|
||||||
<optgroup label="{{ 'Paniers' | trans }}">
|
|
||||||
{% for item in baskets_collection %}
|
|
||||||
{% if item.getValidation() is null %}
|
|
||||||
<option {% if basket.getId() == item.getId() %} selected="selected" {% endif %}
|
|
||||||
value="{{item.getId()}}">{{item.getName()}}</option>
|
|
||||||
{% endif %}
|
|
||||||
{% endfor %}
|
|
||||||
</optgroup>
|
|
||||||
</select>
|
|
||||||
<button class="ui-corner-all basket_downloader" title="{{ 'boutton::telecharger tous les documents' | trans }}">
|
|
||||||
<img src="/assets/lightbox/images/save.png"/>
|
|
||||||
</button>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="" style="width:100%;position:relative;height:166px;overflow-x:hidden;overflow-y:hidden;">
|
|
||||||
<div class="" id="sc_wrapper" style="width:100%;position:relative;overflow-x:auto;overflow-y:hidden;">
|
|
||||||
{% include 'lightbox/IE6/sc_container.html.twig' %}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div id="report" style="display:none;">
|
|
||||||
</div>
|
|
||||||
<div id="dialog_dwnl" title="{{ 'action : exporter' | trans }}" style="display:none;"></div>
|
|
||||||
|
|
||||||
{% endblock %}
|
|
||||||
|
|
||||||
|
|
Reference in New Issue
Block a user