2011-04-04 11:28:12 +00:00
|
|
|
$(document).ready(function(){
|
2011-07-04 08:12:50 +00:00
|
|
|
|
2013-05-27 15:22:43 +00:00
|
|
|
$('img.flag').on('click', function() {
|
|
|
|
var url = window.location.href;
|
2013-05-29 13:10:19 +00:00
|
|
|
$.post('/user/lang', {lang: $(this).attr('id')}, function(data){
|
2013-06-03 07:17:05 +00:00
|
|
|
window.location.href = url;
|
2013-05-27 15:22:43 +00:00
|
|
|
});
|
|
|
|
});
|
|
|
|
|
2013-01-17 14:27:04 +00:00
|
|
|
//Auto Scroll
|
|
|
|
$(window).scroll(function(e) {
|
|
|
|
e.stopPropagation();
|
|
|
|
var offset = $(window).scrollTop();
|
2013-01-18 16:28:43 +00:00
|
|
|
$("#menu").css('top', offset);
|
2013-01-17 14:27:04 +00:00
|
|
|
});
|
|
|
|
|
2013-06-03 07:17:05 +00:00
|
|
|
$('input.button, button, span.ui-button').button();
|
2011-04-14 13:33:43 +00:00
|
|
|
|
2011-11-09 10:07:02 +00:00
|
|
|
$('.demanderef').on('click', function(){
|
2011-10-18 08:21:26 +00:00
|
|
|
var title = '';
|
|
|
|
var hrefSuiv = $(this).attr('href');
|
2012-02-13 12:56:10 +00:00
|
|
|
var href = '/surveillance/demanderef/';
|
2011-10-18 08:21:26 +00:00
|
|
|
var dialogOpts = {
|
|
|
|
bgiframe: true,
|
|
|
|
title: title,
|
|
|
|
width: 500,
|
|
|
|
height: 200,
|
|
|
|
modal: true,
|
|
|
|
open: function(event, ui) {
|
|
|
|
$(this).html('Chargement...');
|
|
|
|
$(this).load(href);
|
|
|
|
},
|
|
|
|
buttons: {
|
|
|
|
Ok: function() {
|
2013-01-17 14:27:04 +00:00
|
|
|
var ref = $('input[name=ref]').val();
|
|
|
|
var encours = $('input[name=encours]').val();
|
|
|
|
var email = $('input[name=email]').val();
|
2011-11-29 15:00:11 +00:00
|
|
|
var href = hrefSuiv+'?ref='+ref+'&encours='+encours+'&email='+email;
|
2011-10-18 08:21:26 +00:00
|
|
|
window.location.href = href;
|
|
|
|
},
|
|
|
|
Annuler: function() { $(this).dialog('close'); }
|
|
|
|
},
|
|
|
|
close: function() { $('#dialogsurv').remove(); }
|
|
|
|
};
|
|
|
|
$('<div id="dialogsurv"></div>').dialog(dialogOpts);
|
|
|
|
return false;
|
2012-03-02 13:54:47 +00:00
|
|
|
});
|
2012-11-20 20:58:21 +00:00
|
|
|
|
|
|
|
//Tooltip de surveillance
|
2012-12-23 17:34:25 +00:00
|
|
|
$('u[tooltip]').qtip({
|
|
|
|
content: { attr: 'tooltip' },
|
|
|
|
style: { classes: 'qtip-dark' },
|
|
|
|
position: { at: 'top center', my: 'bottom center' }
|
2012-11-20 20:58:21 +00:00
|
|
|
});
|
2012-03-02 13:54:47 +00:00
|
|
|
|
|
|
|
$('span#bodacc a').on('click', function(e){
|
|
|
|
e.preventDefault();
|
|
|
|
var href = $(this).attr('href');
|
|
|
|
$('span#bodacc').html('Chargement du bodacc...').load(href);
|
2012-11-20 20:58:21 +00:00
|
|
|
});
|
2011-04-14 13:33:43 +00:00
|
|
|
|
2011-09-30 09:51:09 +00:00
|
|
|
});
|