209,6 → 209,8 |
contenuZoneFiche.appendTo('#ui-tabs-'+(indexTabSelectionneDefaut+1)); |
$("#zone_contenu_fiche").hide(); |
$('#ui-tabs-'+(indexTabSelectionneDefaut+1)).show(); |
ongletNomCode = $('#ui-tabs-'+(indexTabSelectionneDefaut+1)).children(".onglet_contenu").attr("id"); |
$(".lien_retour_synthese").toggle((ongletNomCode != "synthese")); |
}, |
active: indexTabSelectionneDefaut , |
beforeLoad: function( event, ui ) { |
481,6 → 483,7 |
// celui qui a été explicitement demandé |
mettreAJourUrl(permalienNumNom+"-"+onglet, onglet); |
} |
gererInteractionsPermaliens(); |
}); |
|
$(document).one('ongletSyntheseCharge', function() { |
633,9 → 636,12 |
tmp.close(); |
} |
|
|
// met à jour l'url dans la barre du navigateur ainsi que dans le permalien en bas |
// de la fiche |
function mettreAJourUrl(nouvelleUrl, etat) { |
// javascript double negative trick |
// pour plus d'info http://stackoverflow.com/questions/4686583/can-someone-explain-this-double-negative-trick |
$('#permalien_num_nom').val(nouvelleUrl); |
$('#permalien_num_nom').select(); |
if (!!(window.history && window.history.pushState)) { |
var currentState = window.history.state; |
if (currentState != nouvelleUrl && !!etat) { |
644,6 → 650,23 |
} |
} |
|
function gererInteractionsPermaliens() { |
$(".conteneur_permalien > a").each(function() { |
var txt = '<input type="text" id="'+$(this).attr('id')+'" readonly="readonly" class="lien_externe" value="'+$(this).attr('href')+'">'; |
$(this).replaceWith(txt); |
}); |
$(".conteneur_permalien > input").each(function() { |
$(this).attr('size', $(this).val().length - 7); |
}); |
$(".conteneur_permalien > input").hover( |
function() { |
$(this).select(); |
}, function() { |
// rien à faire sur le mouseout |
} |
); |
} |
|
$(document).ajaxStop(function() { |
gererChargementGraphiqueEcologie(); |
gererAffichageLegendeEcologie(); |