Subversion Repositories eFlore/Applications.coel

Compare Revisions

Ignore whitespace Rev 1703 → Rev 1702

/trunk/widget/modules/cartodepartement/squelettes/scripts/carto.js
37,7 → 37,7
$.ajax({
dataType: "json",
url: urlWebService + "CoelRecherche/Nombre/*/*/*/*/*/*/" + departement + "/*/*/",
data: { formatRetour: "text/plain", pays: pays },
data: { formatRetour: "text/plain" },
async: false
}).complete(function(msg) {
if (! estStatutRequeteOK(msg.status)) {
90,24 → 90,13
function chargerStructures() {
if (requeteEnCours()) {
window.setTimeout('chargerStructures()', 400);
return;
} else {
chargementEnCours = true;
var url = urlWebService+"CoelRecherche/ParDefaut/*/*/*/*/*/*/"+departement+"/*/*/?limit="+nombreCollections;
xmlHttpRequest = $.getJSON(url).complete(function() {
traiterLocalisationsJSON();
});
}
 
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() {
118,6 → 107,17
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,7 → 24,6
<script type="text/javascript">
//<![CDATA[
var departement = '<?= $departement ?>';
var pays = '<?= $pays ?>';
var urlWebService = '<?= $url_web_service ?>';
//]]>
</script>
59,4 → 58,4
</script>
<div id="structure" style="display:none"></div>
</body>
</html>
</html>
/trunk/widget/modules/cartodepartement/CartoDepartement.php
38,7 → 38,6
extract($this->parametres);
$this->carte = (isset($carte) ? $carte : self::SERVICE_CARTO_ACTION_DEFAUT);
$this->departement = (isset($dept) ? $dept : '*');
$this->pays = (isset($pays) ? $pays : '*');
}
/**
52,7 → 51,6
$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;
}