65 lines
2.3 KiB
JavaScript
Raw Normal View History

2011-06-30 15:30:43 +00:00
$(document).ready( function()
{
$('a.dial').on('click', function(e){
e.preventDefault();
var title = $(this).attr('title');
var href = $(this).attr('href');
var dlgOpts = {
bgiframe: true,
title: title,
width: 710,
height: 530,
modal: true,
open: function(event, ui) {
$(this).html('Chargement...');
$(this).load(href);
},
buttons: {'Fermer': function() { $(this).dialog('close'); }},
close: function() { $('#dial').remove(); }};
$('<div id="dial"></div>').dialog(dlgOpts);
return false;
});
2013-06-12 08:40:01 +00:00
$('.idpr,.id_cr').on('click', function(){
2011-06-30 15:30:43 +00:00
//e.preventDefault();
var n = $(this).attr('id');
if ($('#p'+n).css('display')=='none'){
$('#p'+n).css('display', 'block');
} else {
$('#p'+n).css('display', 'none');
}
});
2011-08-30 07:11:39 +00:00
$('.tooltip').each(function(){
var title = $(this).attr('title');
var width = $(this).attr('wdth');
2011-08-23 15:20:02 +00:00
$(this).attr('title', '');
2011-08-30 07:11:39 +00:00
$(this).qtip({
solo:true,
2011-08-23 15:20:02 +00:00
content: title,
style: { width: width },
position: { at: "bottom center", my: "top center" }
2011-08-26 14:02:45 +00:00
});
});
$(function() {
$( "#radio" ).buttonset();
2013-06-12 08:40:01 +00:00
$("#radio1").trigger('click');
});
$('.radio').on('click', function() {
$('.lang_img').fadeOut();
$.alink = this.value.toLowerCase();
$.alink_h = this.value;
2013-06-12 08:40:01 +00:00
$(".id_cr").attr("href","/giant/"+$.alink+"/Pays/"+location.pathname.match(/\/Pays\/([^\/]+)/)[1]+"/Type/"+$.alink_h+"/CompanyId/"+location.pathname.match(/\/CompanyId\/([^\/]+)/)[1]+"/Language/"+$('.lang0').text().substr($('.lang0').text().length - 2));
$(".lang").attr("src","/themes/default/images/drapeaux/"+$('.lang0').text().substr($('.lang0').text().length - 2)+".png");
$(".lang_val").val($('.lang0').text().substr($('.lang0').text().length - 2));
$('.'+$.alink+'').fadeIn(500);
});
$('select').on('change', function() {
$('.lang_img').fadeOut();
2013-06-12 08:40:01 +00:00
$(".id_cr").attr("href","/giant/"+$.alink+"/Pays/"+location.pathname.match(/\/Pays\/([^\/]+)/)[1]+"/Type/"+$.alink_h+"/CompanyId/"+location.pathname.match(/\/CompanyId\/([^\/]+)/)[1]+"/Language/"+this.value);
$(".lang").attr("src","/themes/default/images/drapeaux/"+this.value+".png");
$('.'+$.alink+'').fadeIn(500);
});
2011-06-30 15:30:43 +00:00
});