Subversion Repositories eFlore/Applications.del

Compare Revisions

Ignore whitespace Rev 454 → Rev 455

/trunk/src/org/tela_botanica/del/client/vues/rechercheobservations/RechercheObservations.css
1,7 → 1,60
.recherchePrincipale {width: 50%; font-size:18px; padding:5px; -moz-border-radius:10px; border:solid 1px #AAA;}
.boutonRecherche {border:solid 1px #AAA; -moz-border-radius:10px; padding:5px; cursor:pointer}
.lienRechercheAvancee {cursor:pointer; text-decoration:underline; color:blue; float:right; margin-right:240px; margin-top:10px}
.rechercheAvancee {border:solid 1px #333; padding:10px; -moz-border-radius:0 0 10px 10px; -moz-box-shadow:5px 5px 10px #EEE;position:absolute; width:700px; margin-top:5px; background:white}
.champRecherche {float:left; width:50%; padding-bottom:5px}
.recherchePrecedente {color:#555; padding:5px; font-style:italic}
.entrerMotClef {margin-bottom:10px}
.recherchePrincipale {
width: 50%;
font-size: 18px;
padding: 5px;
-moz-border-radius: 10px;
border: solid 1px #AAA;
}
 
.boutonRecherche {
border: solid 1px #AAA;
-moz-border-radius: 10px;
padding: 5px;
cursor: pointer
}
 
.lienRechercheAvancee {
cursor: pointer;
text-decoration: underline;
color: blue;
float: right;
margin-right: 240px;
margin-top: 10px
}
 
.rechercheAvancee {
border: solid 1px #333;
padding: 10px;
-moz-border-radius: 0 0 10px 10px;
-moz-box-shadow: 5px 5px 10px #EEE;
position: absolute;
width: 700px;
margin-top: 5px;
background: white
}
 
.champRecherche {
float: left;
width: 50%;
padding-bottom: 5px
}
 
.recherchePrecedente {
color: #555;
padding: 5px;
font-style: italic
}
 
.entrerMotClef {
margin-bottom: 10px
}
 
.boutonTriAsc {
height: 20px;
background: url(./img/fleche-haut.png) no-repeat
}
 
.boutonTriDesc {
height: 20px;
background: url(./img/fleche-bas.png) no-repeat
}
/trunk/src/org/tela_botanica/del/client/vues/rechercheobservations/RechercheObservationsVue.ui.xml
1,16 → 1,33
<ui:UiBinder xmlns:ui='urn:ui:com.google.gwt.uibinder' xmlns:g='urn:import:com.google.gwt.user.client.ui'
ui:generateFormat='com.google.gwt.i18n.rebind.format.PropertiesFormat' ui:generateKeys="com.google.gwt.i18n.rebind.keygen.MD5KeyGenerator" ui:generateLocales="default">
<ui:with field='res' type='org.tela_botanica.del.client.Ressources'/>
<ui:with field="constants" type="org.tela_botanica.del.client.i18n.Vocabulary"/>
<ui:UiBinder xmlns:ui='urn:ui:com.google.gwt.uibinder'
xmlns:g='urn:import:com.google.gwt.user.client.ui' ui:generateFormat='com.google.gwt.i18n.rebind.format.PropertiesFormat'
ui:generateKeys="com.google.gwt.i18n.rebind.keygen.MD5KeyGenerator"
ui:generateLocales="default">
<ui:with field='res' type='org.tela_botanica.del.client.Ressources' />
<ui:with field="constants" type="org.tela_botanica.del.client.i18n.Vocabulary" />
 
<ui:style src="RechercheObservations.css" />
<ui:style src="RechercheObservations.css" />
<g:HTMLPanel>
<g:HTMLPanel>
<g:Label text="{constants.rechercherObservation}" styleName="titre"/>
<g:Label text="{constants.rechercherObservation}" styleName="titre" />
<g:Label text="{constants.entrerMotClef}" styleName="gris {style.entrerMotClef}" />
<g:HTMLPanel ui:field="zoneRecherche"/>
<g:HTMLPanel ui:field="zoneRecherche" />
</g:HTMLPanel>
<g:HTMLPanel>
<g:HorizontalPanel>
<g:HorizontalPanel ui:field="triParNbVotes">
<g:Label text="{constants.triParNbVotes}" />
<g:Button ui:field="triParNbVotesAscendant" styleName="{style.boutonTriAsc}"></g:Button>
<g:Button ui:field="triParNbVotesDescendant" styleName="{style.boutonTriDesc}"></g:Button>
</g:HorizontalPanel>
<g:HorizontalPanel ui:field="triParDate">
<g:Label text="{constants.triParDate}" />
<g:Button ui:field="triParDateAscendant" styleName="{style.boutonTriAsc}"></g:Button>
<g:Button ui:field="triParDateDescendant" styleName="{style.boutonTriDesc}"></g:Button>
</g:HorizontalPanel>
</g:HorizontalPanel>
</g:HTMLPanel>
<g:HTMLPanel>
<g:VerticalPanel ui:field="zoneResultats" />
</g:HTMLPanel>
</g:HTMLPanel>
/trunk/src/org/tela_botanica/del/client/vues/rechercheobservations/RechercheObservationsPresenteur.java
1,14 → 1,20
package org.tela_botanica.del.client.vues.rechercheobservations;
 
import org.tela_botanica.del.client.cache.CacheClient;
import org.tela_botanica.del.client.composants.moteurrecherche.MoteurRecherchePresenteur;
import org.tela_botanica.del.client.composants.moteurrecherche.MoteurRechercheVue;
import org.tela_botanica.del.client.composants.presenteur.Presenteur;
import org.tela_botanica.del.client.modeles.InformationsRecherche;
import org.tela_botanica.del.client.modeles.ModeRecherche;
import org.tela_botanica.del.client.modeles.ModeTri;
import org.tela_botanica.del.client.services.rest.ObservationService;
import org.tela_botanica.del.client.services.rest.ObservationServiceConcret;
import org.tela_botanica.del.client.vues.rechercheobservations.resultats.ResultatsRechercheObservationsPresenteur;
import org.tela_botanica.del.client.vues.rechercheobservations.resultats.ResultatsRechercheObservationsVue;
 
import com.google.gwt.event.dom.client.ClickEvent;
import com.google.gwt.event.dom.client.ClickHandler;
import com.google.gwt.event.dom.client.HasClickHandlers;
import com.google.gwt.user.client.ui.HasWidgets;
import com.google.gwt.user.client.ui.IsWidget;
 
18,6 → 24,14
public HasWidgets getZoneRecherche();
 
public HasWidgets getZoneResultats();
 
public HasClickHandlers getTriParNbVotesAscendant();
 
public HasClickHandlers getTriParNbVotesDescendant();
 
public HasClickHandlers getTriParDateAscendant();
 
public HasClickHandlers getTriParDateDescendant();
}
 
private Vue vue;
31,7 → 45,7
 
composite.add(vue.asWidget());
ajouterMoteurRechercheAvancee();
 
gererEvenements();
}
 
protected void ajouterMoteurRechercheAvancee() {
52,6 → 66,46
}
 
protected void gererEvenements() {
 
vue.getTriParNbVotesAscendant().addClickHandler(new ClickHandler() {
 
@Override
public void onClick(ClickEvent arg0) {
InformationsRecherche informationsRechercheObservations = CacheClient.getInstance().getInformationsRechercheObservation();
informationsRechercheObservations.setTriParNbVotes(ModeTri.TRI_ASCENDANT);
chercherObservations();
}
});
 
vue.getTriParNbVotesDescendant().addClickHandler(new ClickHandler() {
 
@Override
public void onClick(ClickEvent arg0) {
InformationsRecherche informationsRechercheObservations = CacheClient.getInstance().getInformationsRechercheObservation();
informationsRechercheObservations.setTriParNbVotes(ModeTri.TRI_DESCENDANT);
chercherObservations();
}
});
 
vue.getTriParDateAscendant().addClickHandler(new ClickHandler() {
 
@Override
public void onClick(ClickEvent arg0) {
InformationsRecherche informationsRechercheObservations = CacheClient.getInstance().getInformationsRechercheObservation();
informationsRechercheObservations.setTriParDate(ModeTri.TRI_ASCENDANT);
chercherObservations();
}
});
 
vue.getTriParDateDescendant().addClickHandler(new ClickHandler() {
 
@Override
public void onClick(ClickEvent arg0) {
InformationsRecherche informationsRechercheObservations = CacheClient.getInstance().getInformationsRechercheObservation();
informationsRechercheObservations.setTriParDate(ModeTri.TRI_DESCENDANT);
chercherObservations();
}
});
}
 
}
/trunk/src/org/tela_botanica/del/client/vues/rechercheobservations/RechercheObservationsVue.java
3,6 → 3,7
import com.google.gwt.core.client.GWT;
import com.google.gwt.uibinder.client.UiBinder;
import com.google.gwt.uibinder.client.UiField;
import com.google.gwt.user.client.ui.Button;
import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.HasWidgets;
import com.google.gwt.user.client.ui.Panel;
19,6 → 20,9
@UiField
Panel zoneRecherche, zoneResultats;
 
@UiField
Button triParNbVotesAscendant, triParNbVotesDescendant, triParDateAscendant, triParDateDescendant;
 
public HasWidgets getZoneRecherche() {
return zoneRecherche;
}
32,4 → 36,20
return zoneResultats;
}
 
public Button getTriParNbVotesAscendant() {
return triParNbVotesAscendant;
}
 
public Button getTriParNbVotesDescendant() {
return triParNbVotesDescendant;
}
 
public Button getTriParDateAscendant() {
return triParDateAscendant;
}
 
public Button getTriParDateDescendant() {
return triParDateDescendant;
}
 
}
/trunk/src/org/tela_botanica/del/client/vues/rechercheimages/resultats/ResultatRechercheImagePresenteur.java
53,10 → 53,10
vue.startChargement();
 
rechercherImagesEtCreerWidgetPagination();
 
}
 
public void rechercherImagesEtCreerWidgetPagination() {
 
// appel du service d'image pour avoir le nb total d'elements pour la
// pagination
ImagesParTaxonCallback callback = new ImagesParTaxonCallback() {
63,12 → 63,13
@Override
public void surImagesRecues(ImageServiceResultat imagesRecues) {
creerWidgetPagination(imagesRecues.getNbTotalImagesPourLaRecherche());
int debut = (CacheClient.getInstance().getPageCouranteRechercheImage() - 1) * CacheClient.getInstance().getPasPagination();
int fin = (CacheClient.getInstance().getPageCouranteRechercheImage()) * CacheClient.getInstance().getPasPagination();
afficherImages(imagesRecues, debut, fin);
afficherImages(imagesRecues);
}
};
imageService.getImagesParTaxon(CacheClient.getInstance().getInformationsRechercheImage(), 0, CacheClient.getInstance().getPasPagination(), callback);
 
final int debut = (CacheClient.getInstance().getPageCouranteRechercheImage() - 1) * CacheClient.getInstance().getPasPagination();
final int fin = (CacheClient.getInstance().getPageCouranteRechercheImage()) * CacheClient.getInstance().getPasPagination();
imageService.getImagesParTaxon(CacheClient.getInstance().getInformationsRechercheImage(), debut, fin, callback);
}
 
private void chargerEtAfficherImages(final int premier, final int dernier) {
78,7 → 79,7
ImagesParTaxonCallback callback = new ImagesParTaxonCallback() {
@Override
public void surImagesRecues(ImageServiceResultat imagesRecues) {
afficherImages(imagesRecues, premier, dernier);
afficherImages(imagesRecues);
}
};
imageService.getImagesParTaxon(CacheClient.getInstance().getInformationsRechercheImage(), premier, dernier, callback);
85,7 → 86,7
 
}
 
private void afficherImages(ImageServiceResultat imageServiceResult, int premier, int dernier) {
private void afficherImages(ImageServiceResultat imageServiceResult) {
 
List<Image> images = imageServiceResult.getImages();
 
/trunk/src/org/tela_botanica/del/client/vues/rechercheimages/MoteurRechercheImageVue.java
1,15 → 1,13
package org.tela_botanica.del.client.vues.rechercheimages;
 
import org.tela_botanica.del.client.i18n.I18n;
 
import com.google.gwt.core.client.GWT;
import com.google.gwt.event.dom.client.HasChangeHandlers;
import com.google.gwt.uibinder.client.UiBinder;
import com.google.gwt.uibinder.client.UiField;
import com.google.gwt.user.client.ui.Button;
import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.FlowPanel;
import com.google.gwt.user.client.ui.HasWidgets;
import com.google.gwt.user.client.ui.Label;
import com.google.gwt.user.client.ui.ListBox;
import com.google.gwt.user.client.ui.Panel;
import com.google.gwt.user.client.ui.Widget;
25,11 → 23,13
 
@UiField
Panel panneauResultats, zoneRecherche;
 
@UiField
ListBox listeProtocoles;
 
@UiField
Button triParNbVotesAscendant, triParNbVotesDescendant, triParDateAscendant, triParDateDescendant;
 
// Constructeur
public MoteurRechercheImageVue() {
initWidget(uiBinder.createAndBindUi(this));
73,7 → 73,7
public String getNomProtocolSelectionne() {
return listeProtocoles.getValue(listeProtocoles.getSelectedIndex());
}
 
@Override
public int getIdProtocoleSelectionne() {
return listeProtocoles.getSelectedIndex();
83,4 → 83,20
public void ajouterVue(HasWidgets composite) {
composite.add(this.asWidget());
}
 
public Button getTriParNbVotesAscendant() {
return triParNbVotesAscendant;
}
 
public Button getTriParNbVotesDescendant() {
return triParNbVotesDescendant;
}
 
public Button getTriParDateAscendant() {
return triParDateAscendant;
}
 
public Button getTriParDateDescendant() {
return triParDateDescendant;
}
}
/trunk/src/org/tela_botanica/del/client/vues/rechercheimages/MoteurRechercheImageVue.ui.xml
12,10 → 12,26
<g:Label text="{constants.rechercherImage}" styleName="titre" />
<g:Label text="{constants.entrerMotClef}" styleName="gris {style.entrerMotClef}" />
<g:HorizontalPanel styleName="{style.moteurRecherche}">
<g:HorizontalPanel ui:field="zoneRecherche"/>
<g:HorizontalPanel ui:field="zoneRecherche" />
</g:HorizontalPanel>
</g:HTMLPanel>
<g:HTMLPanel styleName="{style.zoneProtocoles}"><g:ListBox ui:field="listeProtocoles"/></g:HTMLPanel>
<g:HTMLPanel styleName="{style.zoneProtocoles}">
<g:ListBox ui:field="listeProtocoles" />
</g:HTMLPanel>
<g:HTMLPanel>
<g:HorizontalPanel>
<g:HorizontalPanel ui:field="triParNbVotes">
<g:Label text="{constants.triParNbVotes}" />
<g:Button ui:field="triParNbVotesAscendant" styleName="{style.boutonTriAsc}"></g:Button>
<g:Button ui:field="triParNbVotesDescendant" styleName="{style.boutonTriDesc}"></g:Button>
</g:HorizontalPanel>
<g:HorizontalPanel ui:field="triParDate">
<g:Label text="{constants.triParDate}" />
<g:Button ui:field="triParDateAscendant" styleName="{style.boutonTriAsc}"></g:Button>
<g:Button ui:field="triParDateDescendant" styleName="{style.boutonTriDesc}"></g:Button>
</g:HorizontalPanel>
</g:HorizontalPanel>
</g:HTMLPanel>
<g:HTMLPanel ui:field="panneauResultats" />
</g:HTMLPanel>
</ui:UiBinder>
/trunk/src/org/tela_botanica/del/client/vues/rechercheimages/rechercheImage.css
1,8 → 1,40
.zoneRecherche{width:100%}
.moteurRecherche {margin-bottom:10px;}
.moteurRecherche button {margin-left:2px; margin-top:-1px}
.labelProtocole {padding:0 5px 0 0; float:left}
.labelProtocole:after {content:" :"}
.entrerMotClef {margin-bottom:10px;}
.zoneProtocoles {margin-left:40%; position:absolute;}
.zoneRecherche {
width: 100%
}
 
.moteurRecherche {
margin-bottom: 10px;
}
 
.moteurRecherche button {
margin-left: 2px;
margin-top: -1px
}
 
.labelProtocole {
padding: 0 5px 0 0;
float: left
}
 
.labelProtocole:after {
content: " :"
}
 
.entrerMotClef {
margin-bottom: 10px;
}
 
.zoneProtocoles {
margin-left: 40%;
position: absolute;
}
 
.boutonTriAsc {
height: 20px;
background: url(./img/fleche-haut.png) no-repeat
}
 
.boutonTriDesc {
height: 20px;
background: url(./img/fleche-bas.png) no-repeat
}
/trunk/src/org/tela_botanica/del/client/vues/rechercheimages/MoteurRechercheImagePresenteur.java
5,7 → 5,9
import org.tela_botanica.del.client.cache.CacheClient;
import org.tela_botanica.del.client.composants.moteurrecherche.MoteurRecherchePresenteur;
import org.tela_botanica.del.client.composants.moteurrecherche.MoteurRechercheVue;
import org.tela_botanica.del.client.modeles.InformationsRecherche;
import org.tela_botanica.del.client.modeles.ModeRecherche;
import org.tela_botanica.del.client.modeles.ModeTri;
import org.tela_botanica.del.client.modeles.Protocole;
import org.tela_botanica.del.client.navigation.evenement.BusEvenementiel;
import org.tela_botanica.del.client.navigation.evenement.changementprotocole.EvenementChangementProtocole;
17,7 → 19,10
 
import com.google.gwt.event.dom.client.ChangeEvent;
import com.google.gwt.event.dom.client.ChangeHandler;
import com.google.gwt.event.dom.client.ClickEvent;
import com.google.gwt.event.dom.client.ClickHandler;
import com.google.gwt.event.dom.client.HasChangeHandlers;
import com.google.gwt.event.dom.client.HasClickHandlers;
import com.google.gwt.user.client.ui.HasWidgets;
import com.google.gwt.user.client.ui.IsWidget;
 
26,13 → 31,28
public interface Vue extends IsWidget {
 
public void ajouterProtocole(String protocole);
 
public void selectionnerProtocole(int index);
 
public HasChangeHandlers getListeProtocoles();
 
public HasWidgets getZoneResultats();
 
public HasWidgets getZoneRecherche();
 
public String getNomProtocolSelectionne();
 
public int getIdProtocoleSelectionne();
 
public void ajouterVue(HasWidgets composite);
 
public HasClickHandlers getTriParNbVotesAscendant();
 
public HasClickHandlers getTriParNbVotesDescendant();
 
public HasClickHandlers getTriParDateAscendant();
 
public HasClickHandlers getTriParDateDescendant();
}
 
private Vue vue;
77,8 → 97,48
surChangementProtocole();
}
});
 
vue.getTriParNbVotesAscendant().addClickHandler(new ClickHandler() {
 
@Override
public void onClick(ClickEvent arg0) {
InformationsRecherche informationsRechercheImages = CacheClient.getInstance().getInformationsRechercheImage();
informationsRechercheImages.setTriParNbVotes(ModeTri.TRI_ASCENDANT);
chercherImages();
}
});
 
vue.getTriParNbVotesDescendant().addClickHandler(new ClickHandler() {
 
@Override
public void onClick(ClickEvent arg0) {
InformationsRecherche informationsRechercheImages = CacheClient.getInstance().getInformationsRechercheImage();
informationsRechercheImages.setTriParNbVotes(ModeTri.TRI_DESCENDANT);
chercherImages();
}
});
 
vue.getTriParDateAscendant().addClickHandler(new ClickHandler() {
 
@Override
public void onClick(ClickEvent arg0) {
InformationsRecherche informationsRechercheImages = CacheClient.getInstance().getInformationsRechercheImage();
informationsRechercheImages.setTriParDate(ModeTri.TRI_ASCENDANT);
chercherImages();
}
});
 
vue.getTriParDateDescendant().addClickHandler(new ClickHandler() {
 
@Override
public void onClick(ClickEvent arg0) {
InformationsRecherche informationsRechercheImages = CacheClient.getInstance().getInformationsRechercheImage();
informationsRechercheImages.setTriParDate(ModeTri.TRI_DESCENDANT);
chercherImages();
}
});
}
 
public void surChangementProtocole() {
Protocole protocoleCourant = null;
for (Protocole protocole : protocoles) {