1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49
| <script language="javascript">
$(document).ready(function () {
$('a[href=' + window.location.hash + ']').addClass('selected');
$('a[rel=ajax_citations]').click(function () {
var hash = this.href;
hash = hash.replace(/^.*#/, '');
$('a[rel=ajax_citations]').removeClass('selected');
$(this).addClass('selected');
$('.ajax_loading_citations').show();
getPage_citations();
return false;
});
});
function pageload_citations(hash) {
if (hash) getPage_citations();
}
function getPage_citations() {
var data = 'page=' + encodeURIComponent(document.location.hash);
$.ajax({
url: "bib_jx_citations.php?id_bibliography=<?php echo $bib_visu->getId() ?>",
type: "GET",
data: data,
cache: false,
success: function (html) {
$('.ajax_loading_citations').hide();
$('#citations').html(html);
$('#ajax_loader_citations').hide();
}
});
}
</script>
<?php
echo "<h4>" . gettext("Citations") . "</h4>";
if ( ($bib_visu_bibliotype == 3) OR ($bib_visu_bibliotype == 1) ) {
echo '<a class="bouton_plus" id="ajax_loader_citations" href="#" rel="ajax_citations">';
echo gettext("Afficher...");
echo '</a>';
echo '<div class="ajax_loading_citations">';
echo '<br />';
echo '<img src="images/ajax-loader.gif" alt="" /> ';
echo gettext('Merci de patienter, chargement de données en cours...');
echo ' <img src="images/ajax-loader.gif" alt="" />';
echo '</div>';
echo '<div id="citations">';
echo '</div>';
echo '<br />';
} |