Subversion Repositories eFlore/Applications.cel

Compare Revisions

No changes between revisions

Ignore whitespace Rev 478 → Rev 479

/trunk/widget/modules/carto/Carto.php
57,11 → 57,11
public function executerCarteDefaut() {
$widget = null;
extract($this->parametres);
 
$utilisateur = (isset($utilisateur) ? $utilisateur : '*');
// Création url données json
$url_json = sprintf($this->config['chemins']['baseURLServicesCelTpl'], 'CelWidgetMap');
$url_json .= '/carte-defaut-json/';
$url_json .= (isset($utilisateur) ? $utilisateur : '*');
$url_json .= "/carte-defaut-json/$utilisateur";
 
$url_base = sprintf($this->config['chemins']['baseURLAbsoluDyn'], '');
 
69,6 → 69,7
$widget['donnees']['url_json'] = $url_json;
$widget['donnees']['url_base'] = $url_base;
$widget['donnees']['jquery_version'] = '1.4.3';
$widget['donnees']['utilisateur'] = $utilisateur;
$widget['squelette'] = 'carte_defaut';
if (isset($dept)) {
106,8 → 107,9
public function executerObservations() {
$widget = null;
extract($this->parametres);
$utilisateur = (isset($utilisateur) ? $utilisateur : '*');
$observations = $this->chargerObservation($station);
$observations = $this->chargerObservation($station, $utilisateur);
// Création des infos du widget
if (isset($observations['commune'])) {
123,9 → 125,9
return $widget;
}
private function chargerObservation($station) {
private function chargerObservation($station, $utilisateur) {
// Récupération des données au format Json
$url = sprintf($this->config['chemins']['baseURLServicesCelTpl'], "CelWidgetMap/observations/$station");
$url = sprintf($this->config['chemins']['baseURLServicesCelTpl'], "CelWidgetMap/observations/$station/$utilisateur");
$json = $this->getDao()->envoyerRequeteConsultation($url);
$donnees = json_decode($json);
/trunk/widget/modules/carto/squelettes/obs_tableau.tpl.html
1,7 → 1,7
<div class="onglets">
<ul>
<li class="onglet-actif">Tableau</li>
<li class="onglet-inactif"><a onclick="chargerFormatObs('<?=$station_id?>', 'liste');return false;" href="#">Liste</a></li>
<li class="actif"><span class="onglet">Tableau</span></li>
<li class="inactif"><a class="onglet" onclick="chargerFormatObs('<?=$station_id?>', 'liste');return false;" href="#">Liste</a></li>
</ul>
</div>
<div id="observations">
23,11 → 23,4
<? endforeach; ?>
</tbody>
</table>
</div>
<script type="text/javascript">
//<![CDATA[
$(document).ready(function() {
$("#observations table").tablesorter();
});
//]]>
</script>
</div>
/trunk/widget/modules/carto/squelettes/obs_liste.tpl.html
1,12 → 1,12
<div class="onglets">
<ul>
<li class="onglet-inactif"><a onclick="chargerFormatObs('<?=$station_id?>', 'tableau');return false;" href="#">Tableau</a></li>
<li class="onglet-actif">Liste</li>
<li class="inactif"><a class="onglet" onclick="chargerFormatObs('<?=$station_id?>', 'tableau');return false;" href="#">Tableau</a></li>
<li class="actif"><span class="onglet">Liste</span></li>
</ul>
</div>
<div id="observations">
<h2><?=count($observations)?> observations pour <?=(isset($commune) ? $commune : '?')?></h2>
<ul>
<ol>
<? foreach ($observations as $obs) : ?>
<li>
<dl>
17,5 → 17,5
</dl>
</li>
<? endforeach; ?>
</ul>
</ol>
</div>
/trunk/widget/modules/carto/squelettes/images/trie_decroissant.png
Cannot display: file marked as a binary type.
svn:mime-type = image/png
/trunk/widget/modules/carto/squelettes/images/trie_decroissant.png
New file
Property changes:
Added: svn:mime-type
+image/png
\ No newline at end of property
/trunk/widget/modules/carto/squelettes/images/trie.png
Cannot display: file marked as a binary type.
svn:mime-type = image/png
/trunk/widget/modules/carto/squelettes/images/trie.png
New file
Property changes:
Added: svn:mime-type
+image/png
\ No newline at end of property
/trunk/widget/modules/carto/squelettes/images/trie_croissant.png
Cannot display: file marked as a binary type.
svn:mime-type = image/png
/trunk/widget/modules/carto/squelettes/images/trie_croissant.png
New file
Property changes:
Added: svn:mime-type
+image/png
\ No newline at end of property
/trunk/widget/modules/carto/squelettes/carte_defaut.tpl.html
25,7 → 25,6
<script type="text/javascript" src="http://maps.google.com/maps/api/js?v=3.2&amp;sensor=false"></script>
<script type="text/javascript" src="<?=$url_base?>modules/carto/squelettes/markerclusterer_compiled.js"></script>
<script type="text/javascript" src="http://www.tela-botanica.org/commun/jquery/<?=$jquery_version?>/jquery-<?=$jquery_version?>.min.js"></script>
<!-- <script type="text/javascript" src="http://www.tela-botanica.org/commun/jquery/jsquery-ui/<?=$jquery-ui_version?>/js/jquery-ui-<?=$jquery-ui_version?>.custom.min.js"></script> -->
<script type="text/javascript" src="http://www.tela-botanica.org/commun/jquery/tablesorter/2.0.5/jquery.tablesorter.min.js"></script>
<!-- Javascript : données -->
37,6 → 36,11
var markerClusterer = null;
var map = null;
var infoBulle = new google.maps.InfoWindow();
google.maps.event.addListener(infoBulle, 'domready', function() {
if ($("#observations table").get() != 'undefined') {
$("#observations table").tablesorter();
}
});
var pointImageUrl = 'http://chart.apis.google.com/chart?cht=mm&chs=24x32&chco=FFFFFF,008CFF,000000&ext=.png';
var carteCentre = new google.maps.LatLng(46.4, 3.10);
var carteOptions = {
65,13 → 69,7
google.maps.event.addListener(point, 'click', function() {
afficherMsgChargement();
infoBulle.open(map, this);
 
var station = this.stationId;
var urlObs = 'http://localhost/cel-widget/carto?carte=observations&station='+station;
$.get(urlObs, function(observations){
infoBulle.setContent(observations);
});
chargerFormatObs(this.stationId, '*');
});
points.push(point);
87,7 → 85,7
}
 
function chargerFormatObs(stationId, format) {
var url = 'http://localhost/cel-widget/carto?carte=observations&format='+format+'&station='+stationId;
var url = '<?=$url_base?>carto?carte=observations&utilisateur=<?=$utilisateur?>&format='+format+'&station='+stationId;
$.get(url, function(observations){
infoBulle.setContent(observations);
});
148,65 → 146,7
</script>
<!-- CSS -->
<style type="text/css">
html, body {
margin:0;
padding:0;
height: 100%;
font-family:Arial;
font-size:12px;
}
#carte {
width:100%;
height:100%;
}
.bouton {
background-color:white;
border:2px solid black;
cursor:pointer;
text-align:center;
}
#chargement {
display:none;
}
#chargement-copie img{
display:block;
margin:auto;
}
#panneau-lateral {
width:300px;
height:100%;
padding:0;
display:none;
background-color:white;
border-right:1px solid grey;
box-shadow:2px 2px 6px #979797;-webkit-box-shadow:2px 2px 6px #979797;-moz-box-shadow:2px 2px 6px #979797;
}
#pl-entete {
text-align:right;
}
#pl-corps {
height:86%;
overflow:auto;
padding:5px;
}
#pl-ouverture, #pl-fermeture {
position:relative;
top:0;
width:95px;
background-color:#FFF;
text-align:center;
border:1px solid black;
cursor:pointer;
}
#pl-ouverture {
border-left:0;
}
#pl-fermeture {
border-right:0;
float:right;
}
</style>
<link href="<?=$url_base?>modules/carto/squelettes/css/carto.css" rel="stylesheet" type="text/css" media="screen" />
</head>
 
<body onload="initialize()">
/trunk/widget/modules/carto/squelettes/css/carto.css
New file
0,0 → 1,185
@charset "UTF-8";
 
html, body {
margin:0;
padding:0;
height: 100%;
font-family:Arial;
font-size:12px;
}
/*+-----------------------------------------------------------------------------------------------------------------+*/
/* Carte */
#carte {
width:100%;
height:100%;
}
.bouton {
background-color:white;
border:2px solid black;
cursor:pointer;
text-align:center;
}
/*+-----------------------------------------------------------------------------------------------------------------+*/
/* Message de chargement */
#chargement {
display:none;
}
#chargement-copie img{
display:block;
margin:auto;
}
/*+-----------------------------------------------------------------------------------------------------------------+*/
/* Panneau latéral */
#panneau-lateral {
width:300px;
height:100%;
padding:0;
display:none;
background-color:white;
border-right:1px solid grey;
box-shadow:2px 2px 6px #979797;-webkit-box-shadow:2px 2px 6px #979797;-moz-box-shadow:2px 2px 6px #979797;
}
#pl-entete {
text-align:right;
}
#pl-corps {
height:86%;
overflow:auto;
padding:5px;
}
#pl-ouverture, #pl-fermeture {
position:relative;
top:0;
width:95px;
background-color:#FFF;
text-align:center;
border:1px solid black;
cursor:pointer;
}
#pl-ouverture {
border-left:0;
}
#pl-fermeture {
border-right:0;
float:right;
}
/*+-----------------------------------------------------------------------------------------------------------------+*/
/* Pop-up observations */
#observations {
margin:23px 0 0 0;
padding:5px;
border:1px solid black;
border-radius:0 0 10px 10px;-moz-border-radius:0 0 10px 10px;-webkit-border-radius:0 0 10px 10px;
border-top:none !important;
overflow:none;
}
#observations ol {
padding-left:20px;
}
.champ_nom_latin {
display:none;
}
/*+-----------------------------------------------------------------------------------------------------------------+*/
/* Onglets */
.onglets {
position:relative;
float:left;
height:22px;
padding:0;
margin:0;
border-bottom:1px solid black;
width:100%;
}
.onglets ul {
margin:0;
padding:0;
list-style:none;
}
.onglets li {
float:left;
text-transform:uppercase;
text-align:center;
}
.onglets .onglet {
display:block;
padding:5px 15px 4px 15px;
margin:0;
font-size:12px;
line-height:12px;
border:1px solid black;
border-radius:10px 10px 0 0;-moz-border-radius:10px 10px 0 0;-webkit-border-radius:10px 10px 0 0;
text-decoration:none;
}
.onglets .actif .onglet {
border-bottom:1px solid white;
color:black;
background-color:white;
font-weight:bold;
}
.onglets .inactif .onglet {
border-bottom:1px solid #000000;
color:white;
background-color:gray;
}
.onglets .inactif .onglet:hover {
color:black;
background-color:Gainsboro;
}
/*+-----------------------------------------------------------------------------------------------------------------+*/
/* Présentation des listes de définitions */
dl {
width:100%;
}
dt {
float:left;
font-weight:bold;
text-align:top left;
margin-right:0.3em;
}
dt:after {
content:" :";
}
dd {
width:auto;
margin:0.5em 0;
}
/*+-----------------------------------------------------------------------------------------------------------------+*/
/* Tableau : */
table {
border:1px solid gray;
border-collapse:collapse;
}
table thead, table tfoot, table tbody {
background-color:Gainsboro;
border:1px solid gray;
}
table tbody {
background-color:#FFF;
}
table th {
font-family:monospace;
border:1px dotted gray;
padding:5px;
background-color:Gainsboro;
}
table td {
font-family:arial;
border:1px dotted gray;
padding:5px;
text-align:left;
}
table caption {
font-family:sans-serif;
}
/*+-----------------------------------------------------------------------------------------------------------------+*/
/* Tableau : tablesorter */
th.header {
background:url(../images/trie.png) no-repeat center right;
padding-right:20px;
}
th.headerSortUp {
background:url(../images/trie_croissant.png) no-repeat center right #3399FF;
}
th.headerSortDown {
background:url(../images/trie_decroissant.png) no-repeat center right #3399FF;
}