Subversion Repositories eFlore/Applications.del

Compare Revisions

Ignore whitespace Rev 1516 → Rev 1517

/trunk/src/org/tela_botanica/del/client/utils/StringUtils.java
24,5 → 24,10
return mot;
}
 
public static native void logChaine(String s) /*-{
if(!!($wnd.console && $wnd.console.log)) {
$wnd.console.log(s);
}
}-*/;
}
/trunk/src/org/tela_botanica/del/client/cache/CacheClient.java
73,6 → 73,21
}
 
public void initialiserAvecParametres() {
if(Location.getPath().contains("identiplante")) {
if(Location.getHash().contains(ConstantesNavigation.PAGE_VALIDATION)) {
setPageCourante(ConstantesNavigation.PAGE_VALIDATION+"~"+URLUtils.getURLSpecialParameterValue());
} else {
setPageCourante(ConstantesNavigation.PAGE_RECHERCHE_OBSERVATIONS);
}
} else if(Location.getPath().contains("pictoflora")) {
if(Location.getHash().contains(ConstantesNavigation.PAGE_VALIDATION_PICTOFLORA)) {
setPageCourante(ConstantesNavigation.PAGE_VALIDATION+URLUtils.getURLSpecialParameterValue());
} else {
setPageCourante(ConstantesNavigation.PAGE_RECHERCHE_IMAGES);
}
}
String rechercheLibre = Location.getParameter("masque");
String famille = Location.getParameter("masque.famille");
String taxon = Location.getParameter("masque.ns");
135,7 → 150,6
if(pageInt != null) setPageCouranteRechercheObservations(pageInt);
}
String tri = Location.getParameter("tri");
String ordre = Location.getParameter("ordre");
184,6 → 198,8
informationsRechercheImage = rechercheParArguments;
informationsRechercheObservation = rechercheParArguments;
mettreAjourUrlCourante();
}
public void setIdProtocoleEnAttente(String idProtocole) {
338,14 → 354,13
public String genererUrlCourante() {
String url = Window.Location.getHref();
CacheClient cache = CacheClient.getInstance();
String arguments = "";
String argumentsRecherche = "";
if (cache.getPageCourante().equals(ConstantesNavigation.PAGE_RECHERCHE_IMAGES)) {
if (getPageCourante().equals(ConstantesNavigation.PAGE_RECHERCHE_IMAGES)) {
InformationsRecherche infoRecherche;
infoRecherche = cache.getInformationsRechercheImage();
infoRecherche = getInformationsRechercheImage();
if (CacheClient.getInstance().getProtocoleCourant() != null) {
infoRecherche.setIdProtocoleSelectionne(""+CacheClient.getInstance().getProtocoleCourant().getId());
}
359,13 → 374,13
argumentsRecherche += "page="+getPageCouranteRechercheImage()+"&pas="+getPasPagination();
argumentsRecherche = (argumentsRecherche.isEmpty()) ? argumentsRecherche : "?" + argumentsRecherche;
arguments = argumentsRecherche + "#" + ConstantesNavigation.PAGE_RECHERCHE_IMAGES;
url = new Config().getUrl("del") + arguments;
 
} else if (cache.getPageCourante().equals(ConstantesNavigation.PAGE_RECHERCHE_OBSERVATIONS) || cache.getPageCourante().equals("")) {
arguments = argumentsRecherche;
url = new Config().getUrl("pictoflora") + arguments;
url += "#"+ConstantesNavigation.PAGE_RECHERCHE_IMAGES;
} else if (getPageCourante().equals(ConstantesNavigation.PAGE_RECHERCHE_OBSERVATIONS) || getPageCourante().equals("")) {
InformationsRecherche infoRecherche;
infoRecherche = cache.getInformationsRechercheObservation();
infoRecherche = getInformationsRechercheObservation();
argumentsRecherche = "masque.type="+statut;
argumentsRecherche += "&page="+getPageCouranteRechercheObservations()+"&pas="+getPasPagination();
argumentsRecherche += "&"+infoRecherche.versChaineRequete();
374,14 → 389,20
argumentsRecherche += "&gwt.codesvr="+Location.getParameter("gwt.codesvr")+"";
}
arguments = "?"+argumentsRecherche + "#" + ConstantesNavigation.PAGE_RECHERCHE_OBSERVATIONS;
url = new Config().getUrl("del") + arguments;
} else if (cache.getPageCourante().contains(ConstantesNavigation.PAGE_VALIDATION) || cache.getPageCourante().contains(ConstantesNavigation.PAGE_VALIDATION_PICTOFLORA)) {
arguments = "?"+argumentsRecherche;
url = new Config().getUrl("identiplante") + arguments;
url += "#"+ConstantesNavigation.PAGE_RECHERCHE_OBSERVATIONS;
} else if (getPageCourante().contains(ConstantesNavigation.PAGE_VALIDATION) || getPageCourante().contains(ConstantesNavigation.PAGE_VALIDATION_PICTOFLORA)) {
url = new Config().getUrl("del");
if(getPageCourante().contains(ConstantesNavigation.PAGE_VALIDATION)) {
url = new Config().getUrl("identiplante");
} else {
url = new Config().getUrl("pictoflora");
}
if(!GWT.isScript()) {
url += "?gwt.codesvr="+Location.getParameter("gwt.codesvr");
}
url += "#"+cache.getPageCourante();
url += "#"+getPageCourante();
}
// remplacements batards pour corriger l'url
// TODO: factoriser toute la fonction
403,6 → 424,5
if(!!($wnd.history && $wnd.history.pushState)) {
$wnd.history.pushState(nouvelleUrl, "", nouvelleUrl);
}
}-*/;
}-*/;
}
/trunk/src/org/tela_botanica/del/client/services/rest/async/PHPCallback.java
1,8 → 1,11
package org.tela_botanica.del.client.services.rest.async;
 
import org.tela_botanica.del.client.utils.StringUtils;
 
import com.google.gwt.http.client.Request;
import com.google.gwt.http.client.RequestCallback;
import com.google.gwt.http.client.Response;
import com.google.gwt.json.client.JSONException;
import com.google.gwt.user.client.Window;
 
/**
51,7 → 54,12
}
 
if (statusCode == codeAttendu) {
surRetour(parserJSON(response.getText()));
try {
T reponseParsee = parserJSON(response.getText());
surRetour(reponseParsee);
} catch (JSONException e) {
StringUtils.logChaine("Une erreur est survenue, le serveur a répondu : "+response.getText());
}
} else {
surErreur("Erreur " + statusCode + ": " + response.getText());
}
/trunk/src/org/tela_botanica/del/client/Del.java
8,6 → 8,7
import com.google.gwt.core.client.GWT.UncaughtExceptionHandler;
import com.google.gwt.event.shared.UmbrellaException;
import com.google.gwt.user.client.History;
import com.google.gwt.user.client.Timer;
import com.google.gwt.user.client.Window;
 
public class Del implements EntryPoint {
28,9 → 29,9
}
});*/
 
CacheClient.getInstance().initialiserAvecParametres();
History.addValueChangeHandler(new GestionnaireHistorique());
CacheClient.getInstance().initialiserAvecParametres();
History.addValueChangeHandler(new GestionnaireHistorique());
History.newItem(CacheClient.getInstance().getPageCourante());
History.fireCurrentHistoryState();
}
/trunk/src/org/tela_botanica/del/client/config/Config.java
34,6 → 34,8
Dictionary configuration = Dictionary.getDictionary("configuration");
urls.put("base", configuration.get("serviceBaseUrl"));
urls.put("del", configuration.get("delUrl"));
urls.put("identiplante", configuration.get("identiplanteUrl"));
urls.put("pictoflora", configuration.get("pictofloraUrl"));
urls.put("bogue", configuration.get("bogueUrl"));
urls.put("commentaire", configuration.get("commentaireUrl"));
urls.put("applisaisie", configuration.get("appliSaisieUrl"));
/trunk/war/del.html
File deleted
\ No newline at end of file
/trunk/war/identiplante.php
New file
0,0 → 1,46
<!doctype html>
<html>
<head>
<title>IdentiPlante</title>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<base href="<?= dirname($_SERVER['PHP_SELF'])."/"; ?>" />
<!-- Fichier JS de configuration spécifique à l'application -->
<script type="text/javascript" language="javascript" src="config/config.js"></script>
<script type="text/javascript" language="javascript" src="config/apropos.js"></script>
<!-- Le script ci-dessous charger vos modules compilés. Ajoutez les méta-tags GWT avant cette ligne. -->
<script type="text/javascript" language="javascript" src="del/del.nocache.js"></script>
<link type="text/css" rel="stylesheet" href="del.css">
</head>
<!-- Le corps peut contenir du HTML ou peut rester vide si vous voulez créer une UI complêtement dynamique -->
<body>
<noscript>
<p style="width: 22em; position: absolute; left: 50%; margin-left: -11em; color: red; background-color: white; border: 1px solid red; padding: 4px; font-family: sans-serif">
<span class="attention">ATTENTION : </span>
il semblerait que le Javascript ne soit pas activé sur votre navigateur.
Veuillez l'activer pour utiliser cette application.
</p>
</noscript>
<div id="zoneEntete">
</div>
<div id="main">
<div id="zoneTitre"></div>
<div id="zoneLiens"></div>
</div>
<div id="contenu"></div>
<!-- OPTIONAL: inclure la ligne ci-dessous si vous utilisez le supprot de l'historique du navigateur -->
<iframe src="javascript:''" id="__gwt_historyFrame" tabIndex='-1' style="position:absolute;width:0;height:0;border:0"></iframe>
<div id="zoneFooter"><br /><hr />Projet financ&eacute; par : <br /><br />
<a class="logo_ue" href="http://europa.eu/index_fr.htm" target="_blank"></a>
<a class="logo_lr" href="http://www.laregion.fr/" target="_blank"></a>
<a class="logo_nd" href="http://www.fondation-natureetdecouvertes.com/" target="_blank"></a>
<a class="logo_nh" href="http://www.fondation-nicolas-hulot.org/" target="_blank"></a>
</div>
</body>
</html>
/trunk/war/pictoflora.php
New file
0,0 → 1,46
<!doctype html>
<html>
<head>
<title>Pictoflora</title>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<base href="<?= dirname($_SERVER['PHP_SELF'])."/"; ?>" />
<!-- Fichier JS de configuration spécifique à l'application -->
<script type="text/javascript" language="javascript" src="config/config.js"></script>
<script type="text/javascript" language="javascript" src="config/apropos.js"></script>
<!-- Le script ci-dessous charger vos modules compilés. Ajoutez les méta-tags GWT avant cette ligne. -->
<script type="text/javascript" language="javascript" src="del/del.nocache.js"></script>
<link type="text/css" rel="stylesheet" href="del.css">
</head>
<!-- Le corps peut contenir du HTML ou peut rester vide si vous voulez créer une UI complêtement dynamique -->
<body>
<noscript>
<p style="width: 22em; position: absolute; left: 50%; margin-left: -11em; color: red; background-color: white; border: 1px solid red; padding: 4px; font-family: sans-serif">
<span class="attention">ATTENTION : </span>
il semblerait que le Javascript ne soit pas activé sur votre navigateur.
Veuillez l'activer pour utiliser cette application.
</p>
</noscript>
<div id="zoneEntete">
</div>
<div id="main">
<div id="zoneTitre"></div>
<div id="zoneLiens"></div>
</div>
<div id="contenu"></div>
<!-- OPTIONAL: inclure la ligne ci-dessous si vous utilisez le supprot de l'historique du navigateur -->
<iframe src="javascript:''" id="__gwt_historyFrame" tabIndex='-1' style="position:absolute;width:0;height:0;border:0"></iframe>
<div id="zoneFooter"><br /><hr />Projet financ&eacute; par : <br /><br />
<a class="logo_ue" href="http://europa.eu/index_fr.htm" target="_blank"></a>
<a class="logo_lr" href="http://www.laregion.fr/" target="_blank"></a>
<a class="logo_nd" href="http://www.fondation-natureetdecouvertes.com/" target="_blank"></a>
<a class="logo_nh" href="http://www.fondation-nicolas-hulot.org/" target="_blank"></a>
</div>
</body>
</html>
/trunk/war/del.php
New file
0,0 → 1,46
<!doctype html>
<html>
<head>
<title>IdentiPlante</title>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<base href="<?= dirname($_SERVER['PHP_SELF'])."/"; ?>" />
<!-- Fichier JS de configuration spécifique à l'application -->
<script type="text/javascript" language="javascript" src="config/config.js"></script>
<script type="text/javascript" language="javascript" src="config/apropos.js"></script>
<!-- Le script ci-dessous charger vos modules compilés. Ajoutez les méta-tags GWT avant cette ligne. -->
<script type="text/javascript" language="javascript" src="del/del.nocache.js"></script>
<link type="text/css" rel="stylesheet" href="del.css">
</head>
<!-- Le corps peut contenir du HTML ou peut rester vide si vous voulez créer une UI complêtement dynamique -->
<body>
<noscript>
<p style="width: 22em; position: absolute; left: 50%; margin-left: -11em; color: red; background-color: white; border: 1px solid red; padding: 4px; font-family: sans-serif">
<span class="attention">ATTENTION : </span>
il semblerait que le Javascript ne soit pas activé sur votre navigateur.
Veuillez l'activer pour utiliser cette application.
</p>
</noscript>
<div id="zoneEntete">
</div>
<div id="main">
<div id="zoneTitre"></div>
<div id="zoneLiens"></div>
</div>
<div id="contenu"></div>
<!-- OPTIONAL: inclure la ligne ci-dessous si vous utilisez le supprot de l'historique du navigateur -->
<iframe src="javascript:''" id="__gwt_historyFrame" tabIndex='-1' style="position:absolute;width:0;height:0;border:0"></iframe>
<div id="zoneFooter"><br /><hr />Projet financ&eacute; par : <br /><br />
<a class="logo_ue" href="http://europa.eu/index_fr.htm" target="_blank"></a>
<a class="logo_lr" href="http://www.laregion.fr/" target="_blank"></a>
<a class="logo_nd" href="http://www.fondation-natureetdecouvertes.com/" target="_blank"></a>
<a class="logo_nh" href="http://www.fondation-nicolas-hulot.org/" target="_blank"></a>
</div>
</body>
</html>
/trunk/war/index.html
1,7 → 1,7
<html>
<head>
<title>Redirection en html</title>
<meta http-equiv="refresh" content="0;url=del.html" />
<meta http-equiv="refresh" content="0;url=del.php" />
</head>
<body>
<p><a href="del.html">Si la redirection ne se fait pas automatiquement, cliquez sur ce lien.</a></p>
/trunk/services/configurations/config_images.ini
45,5 → 45,7
nn = "nom_sel_nn"
date = "date_observation"
tag = "mots_cles_texte"
tag_cel = "mots_cles_texte"
tag_pictoflora = "mots_cles_texte"
commune = "zone_geo"
referentiel = "nom_referentiel"