59 lines
1.4 KiB
JavaScript

$(document).ready(function(){
$('input.button').button();
//Tooltip de surveillance
$('u[tooltip]').each(function(){
$(this).qtip({
content: $(this).attr('tooltip'),
style: { lasses: "ui-tooltip-dark" },
position: {
at: "top center",
my: "bottom center"
}
});
});
$('.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;
});
$('span#bodacc a').on('click', function(e){
e.preventDefault();
var href = $(this).attr('href');
$('span#bodacc').html('Chargement du bodacc...').load(href);
});
//Auto Scroll
$(window).scroll(function() {
var offset = $(window).scrollTop();
$("#menu").css('margin-top',offset);
});
});