Subversion Repositories eFlore/Applications.coel

Compare Revisions

Ignore whitespace Rev 1702 → Rev 1703

/trunk/widget/modules/cartodepartement/squelettes/scripts/carto.js
37,7 → 37,7
$.ajax({
dataType: "json",
url: urlWebService + "CoelRecherche/Nombre/*/*/*/*/*/*/" + departement + "/*/*/",
data: { formatRetour: "text/plain" },
data: { formatRetour: "text/plain", pays: pays },
async: false
}).complete(function(msg) {
if (! estStatutRequeteOK(msg.status)) {
90,13 → 90,24
function chargerStructures() {
if (requeteEnCours()) {
window.setTimeout('chargerStructures()', 400);
} else {
chargementEnCours = true;
var url = urlWebService+"CoelRecherche/ParDefaut/*/*/*/*/*/*/"+departement+"/*/*/?limit="+nombreCollections;
xmlHttpRequest = $.getJSON(url).complete(function() {
traiterLocalisationsJSON();
});
return;
}
 
chargementEnCours = true;
$.ajax({
dataType: "json",
url: urlWebService + "CoelRecherche/ParDefaut/*/*/*/*/*/*/" + departement + "/*/*/",
data: { limit: nombreCollections, pays: pays },
async: true
}).complete(function(msg) {
if (!estStatutRequeteOK(msg.status)) {
alert(msg.responseText);
return;
}
collections = eval("(function(){return " + msg.responseText + ";})()");
ordonnerCollectionsParStructures();
chargerLocalisations();
});
}
 
function requeteEnCours() {
107,17 → 118,6
return (x_status == 200 || x_status == 304 || x_status == 0);
}
 
function traiterLocalisationsJSON() {
var texte = xmlHttpRequest.responseText;
if (!estStatutRequeteOK(xmlHttpRequest.status)) {
alert(texte);
} else {
collections = eval("(function(){return " + texte + ";})()");
ordonnerCollectionsParStructures();
chargerLocalisations();
}
}
 
function ordonnerCollectionsParStructures() {
for (var index = 0; index < collections.length; index ++) {
var indexStructure = 0;
/trunk/widget/modules/cartodepartement/squelettes/carto_departement.tpl.html
24,6 → 24,7
<script type="text/javascript">
//<![CDATA[
var departement = '<?= $departement ?>';
var pays = '<?= $pays ?>';
var urlWebService = '<?= $url_web_service ?>';
//]]>
</script>
58,4 → 59,4
</script>
<div id="structure" style="display:none"></div>
</body>
</html>
</html>
/trunk/widget/modules/cartodepartement/CartoDepartement.php
38,6 → 38,7
extract($this->parametres);
$this->carte = (isset($carte) ? $carte : self::SERVICE_CARTO_ACTION_DEFAUT);
$this->departement = (isset($dept) ? $dept : '*');
$this->pays = (isset($pays) ? $pays : '*');
}
/**
51,6 → 52,7
$widget['donnees']['url_web_service'] = sprintf($this->config['chemins']['baseURLServicesTpl'], '');
$widget['donnees']['url_page_fiche'] = $this->config['carto']["urlPageFiche"];
$widget['donnees']['departement'] = $this->departement;
$widget['donnees']['pays'] = $this->pays;
$widget['squelette'] = 'carto_departement';
return $widget;
}