55 lines
1.3 KiB
JavaScript

$(document).ready(function(){
$('input.button').button();
//Tooltip de surveillance
$('u[tooltip]').each(function(){
$(this).qtip({
content: $(this).attr('tooltip'),
style: {
classes: "ui-tooltip-dark"
},
position: {
at: "top center",
my: "bottom center"
}
});
});
$('.demanderef').live('click', function(){
var title = '';
var hrefSuiv = $(this).attr('href');
var href = './?page=surveillance&q=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;
});
//Auto Scroll
$(window).scroll(function() {
var offset = $(window).scrollTop();
$("#menu").css('margin-top',offset);
});
});