62 lines
1.6 KiB
JavaScript
62 lines
1.6 KiB
JavaScript
$(document).ready(function(){
|
|
|
|
$('img.flag').on('click', function() {
|
|
var url = window.location.href;
|
|
$.post('/user/lang', {lang: $(this).attr('id')}, function(data){
|
|
window.location.href = url;
|
|
});
|
|
});
|
|
|
|
//Auto Scroll
|
|
$(window).scroll(function(e) {
|
|
e.stopPropagation();
|
|
var offset = $(window).scrollTop();
|
|
$("#menu").css('top', offset);
|
|
});
|
|
|
|
$('input.button, button, span.ui-button').button();
|
|
|
|
$('.demanderef').on('click', function(){
|
|
var title = '';
|
|
var hrefSuiv = $(this).attr('href');
|
|
var href = '/surveillance/demanderef/';
|
|
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() {
|
|
var ref = $('input[name=ref]').val();
|
|
var encours = $('input[name=encours]').val();
|
|
var email = $('input[name=email]').val();
|
|
var href = hrefSuiv+'?ref='+ref+'&encours='+encours+'&email='+email;
|
|
window.location.href = href;
|
|
},
|
|
Annuler: function() { $(this).dialog('close'); }
|
|
},
|
|
close: function() { $('#dialogsurv').remove(); }
|
|
};
|
|
$('<div id="dialogsurv"></div>').dialog(dialogOpts);
|
|
return false;
|
|
});
|
|
|
|
//Tooltip de surveillance
|
|
$('u[tooltip]').qtip({
|
|
content: { attr: 'tooltip' },
|
|
style: { classes: 'qtip-dark' },
|
|
position: { at: 'top center', my: 'bottom center' }
|
|
});
|
|
|
|
$('span#bodacc a').on('click', function(e){
|
|
e.preventDefault();
|
|
var href = $(this).attr('href');
|
|
$('span#bodacc').html('Chargement du bodacc...').load(href);
|
|
});
|
|
|
|
}); |