/trunk/src/org/tela_botanica/del/client/i18n/Vocabulary.properties |
---|
45,6 → 45,7 |
par = par |
publiee = Publiée le |
votePrisEnCompte = Vote pris en compte |
voteModifie = Vote modifié |
#ecran recherche image |
rechercherImage = Rechercher et voter |
/trunk/src/org/tela_botanica/del/client/i18n/Vocabulary.java |
---|
2,7 → 2,7 |
/** |
* Interface to represent the constants contained in resource bundle: |
* '/home/aurelien/web/del/src/org/tela_botanica/del/client/i18n/Vocabulary.properties'. |
* 'D:/dev/svn/del/src/org/tela_botanica/del/client/i18n/Vocabulary.properties'. |
*/ |
public interface Vocabulary extends com.google.gwt.i18n.client.Constants { |
1006,6 → 1006,15 |
String voirFicheIndividu(); |
/** |
* Translated "Vote modifié". |
* |
* @return translated "Vote modifié" |
*/ |
@DefaultStringValue("Vote modifié") |
@Key("voteModifie") |
String voteModifie(); |
/** |
* Translated "Vote pris en compte". |
* |
* @return translated "Vote pris en compte" |
/trunk/src/org/tela_botanica/del/client/gestionhistorique/GestionnaireHistorique.java |
---|
45,6 → 45,9 |
RootPanel.get("contenu").clear(); |
MoteurRechercheObservationsPresenteur presenteur = new MoteurRechercheObservationsPresenteur(new ObservationServiceConcret(), new MoteurRechercheObservationsVue()); |
presenteur.go(RootPanel.get("contenu")); |
} else { |
RootPanel.get("contenu").clear(); |
new MoteurRechercheImagePresenteur(new MoteurRechercheImageVue(), new ProtocoleServiceConcret()).go(RootPanel.get("contenu")); |
} |
} |
} |
/trunk/src/org/tela_botanica/del/client/composants/votes/barrerepartition/BarreRepartitionVoteVue.ui.xml |
---|
13,6 → 13,7 |
</g:HTMLPanel> |
<g:PushButton ui:field="boutonOui" text="+" styleName="{style.boutonOui}"/> |
<g:HTMLPanel ui:field="votePrisEnCompte"><g:Label text="{constants.votePrisEnCompte}"></g:Label></g:HTMLPanel> |
<g:HTMLPanel ui:field="voteModifie"><g:Label text="{constants.voteModifie}"></g:Label></g:HTMLPanel> |
</g:HTMLPanel> |
</g:HTMLPanel> |
</ui:UiBinder> |
/trunk/src/org/tela_botanica/del/client/composants/votes/barrerepartition/BarreRepartitionVotePresenteur.java |
---|
29,6 → 29,7 |
public void setVoteOuiEffectue(); |
public void setVoteNonEffectue(); |
public void afficherVotePrisEnCompte(boolean b); |
public void afficherVoteModifie(boolean b); |
public void toggleNomEspece(); |
} |
69,7 → 70,7 |
@Override |
public void onClick(ClickEvent event) { |
voter(true); |
vue.afficherVotePrisEnCompte(true); |
} |
}); |
77,7 → 78,7 |
@Override |
public void onClick(ClickEvent event) { |
voter(false); |
vue.afficherVotePrisEnCompte(false); |
} |
}); |
} |
104,9 → 105,13 |
}; |
if (moyenneVote.getPropositionAssociee().utilisateurAVotePourDetermination(vd.getContributeur())) { |
voteDeterminationService.modifierVote(vd, vdc); |
vue.afficherVoteModifie(vd.getVote()==1); |
} else { |
voteDeterminationService.ajouterVote(vd, vdc); |
vue.afficherVotePrisEnCompte(vd.getVote()==1); |
} |
} |
} |
/trunk/src/org/tela_botanica/del/client/composants/votes/barrerepartition/BarreRepartitionVoteVue.java |
---|
4,8 → 4,6 |
import com.google.gwt.event.dom.client.HasClickHandlers; |
import com.google.gwt.uibinder.client.UiBinder; |
import com.google.gwt.uibinder.client.UiField; |
import com.google.gwt.user.client.Element; |
import com.google.gwt.user.client.Window; |
import com.google.gwt.user.client.ui.Composite; |
import com.google.gwt.user.client.ui.Label; |
import com.google.gwt.user.client.ui.Panel; |
13,29 → 11,37 |
import com.google.gwt.user.client.ui.Widget; |
public class BarreRepartitionVoteVue extends Composite implements BarreRepartitionVotePresenteur.Vue { |
interface MyUiBinder extends UiBinder<Widget, BarreRepartitionVoteVue> {} |
interface MyUiBinder extends UiBinder<Widget, BarreRepartitionVoteVue> { |
} |
private static MyUiBinder uiBinder = GWT.create(MyUiBinder.class); |
private InfoBulleAnim animer; |
@UiField Label nomTaxon; |
@UiField Panel barreOui, barreNon, votePrisEnCompte; |
@UiField PushButton boutonOui, boutonNon; |
private InfoBulleAnim animerVotePrisEnCompte; |
private InfoBulleAnim animerVoteModifie; |
@UiField |
Label nomTaxon; |
@UiField |
Panel barreOui, barreNon, votePrisEnCompte, voteModifie; |
@UiField |
PushButton boutonOui, boutonNon; |
public BarreRepartitionVoteVue() { |
initWidget(uiBinder.createAndBindUi(this)); |
votePrisEnCompte.setVisible(false); |
animer = new InfoBulleAnim(votePrisEnCompte); |
voteModifie.setVisible(false); |
animerVotePrisEnCompte = new InfoBulleAnim(votePrisEnCompte); |
animerVoteModifie = new InfoBulleAnim(voteModifie); |
} |
@Override |
public void afficherVotes(int pourcentage, String nomTaxon) { |
this.nomTaxon.setText(nomTaxon); |
this.nomTaxon.setTitle(nomTaxon); |
if (pourcentage > -1) { |
int pourcentageNon = 100-pourcentage; |
int pourcentageNon = 100 - pourcentage; |
barreOui.setWidth(pourcentage + "%"); |
barreNon.setWidth(pourcentageNon + "%"); |
} else { |
43,12 → 49,12 |
barreOui.setWidth("0px"); |
} |
} |
@Override |
public HasClickHandlers getBoutonOui() { |
return boutonOui; |
} |
@Override |
public HasClickHandlers getBoutonNon() { |
return boutonNon; |
68,7 → 74,7 |
@Override |
public void afficherVotePrisEnCompte(boolean voteOui) { |
if (voteOui) { |
if (voteOui) { |
votePrisEnCompte.removeStyleName("votePrisEnCompteNon"); |
votePrisEnCompte.setStyleName("votePrisEnCompteOui"); |
} else { |
75,9 → 81,20 |
votePrisEnCompte.removeStyleName("votePrisEnCompteOui"); |
votePrisEnCompte.setStyleName("votePrisEnCompteNon"); |
} |
animer.run(2000); |
animerVotePrisEnCompte.run(2000); |
} |
public void afficherVoteModifie(boolean voteOui) { |
if (voteOui) { |
voteModifie.removeStyleName("votePrisEnCompteNon"); |
voteModifie.setStyleName("votePrisEnCompteOui"); |
} else { |
voteModifie.removeStyleName("votePrisEnCompteOui"); |
voteModifie.setStyleName("votePrisEnCompteNon"); |
} |
animerVoteModifie.run(2000); |
} |
@Override |
public void desactiverBoutons() { |
boutonNon.setEnabled(false); |