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); |
} |
}-*/; |
|
}-*/; |
} |