/trunk/src/org/tela_botanica/del/Del.gwt.xml |
---|
21,6 → 21,10 |
<!-- Other module inherits --> |
<inherits name="com.google.gwt.activity.Activity" /> |
<inherits name="com.google.gwt.place.Place" /> |
<!-- Permet d'accélérer le temps de compilation en compilant que pour Firefox > à 1.5 --> |
<!-- Bien mettre gecko1_8 (et pas gecko) sinon ne marche pas dans Firefox > à 1.5 --> |
<!-- <set-property name="user.agent" value="gecko1_8"/> --> |
<!-- Specify the app entry point class. --> |
<entry-point class='org.tela_botanica.del.client.Del' /> |
/trunk/src/org/tela_botanica/del/client/composants/votes/moyennevotes/MoyenneVotePresenteur.java |
---|
79,6 → 79,8 |
public HasMouseMoveHandlers getZoneVoter(); |
public void masquerZoneVoter(); |
public void afficherMessageVoteIdentifie(boolean doitEtreIdentifiePourVoter); |
public void setNoteGeneraleToolTip(double valeurVoteTotalPrecise); |
134,11 → 136,14 |
public void gererEvenements() { |
vue.afficherMessageVoteIdentifie(utilisateurPeutVoter()); |
vue.getZoneVoter().addMouseMoveHandler(new MouseMoveHandler() { |
@Override |
public void onMouseMove(MouseMoveEvent event) { |
vue.masquerZoneVoter(); |
if(utilisateurPeutVoter()) { |
vue.masquerZoneVoter(); |
} |
} |
}); |
145,9 → 150,14 |
vue.getVotes().addClickHandler(new ClickHandler() { |
@Override |
public void onClick(ClickEvent event) { |
valeurVoteUtilisateur = vue.getValeurVote(); |
enregistrerVote(); |
vue.afficherBoutonAnnuler(); |
if(utilisateurPeutVoter()) { |
valeurVoteUtilisateur = vue.getValeurVote(); |
enregistrerVote(); |
vue.afficherBoutonAnnuler(); |
} else { |
Window.alert("Voter pour ce protocole nécéssite d'être identifié"); |
} |
} |
}); |
187,6 → 197,10 |
} |
}); |
} |
public boolean utilisateurPeutVoter() { |
return !protocole.doitEtreIdentifiePourVoter() || CacheClient.getInstance().getUtilisateur().estIdentifie(); |
} |
public void setValeurVoteUtilisateur(int valeurVoteUtilisateur) { |
this.valeurVoteUtilisateur = valeurVoteUtilisateur; |
277,6 → 291,8 |
if(image.utilisateurAVotePourProtocole(protocole.getId()+"", CacheClient.getInstance().getUtilisateur().getId())) { |
vue.afficherBoutonAnnuler(); |
} |
vue.afficherMessageVoteIdentifie(utilisateurPeutVoter()); |
VoteFleurPresenteur presenteurFleur = new VoteFleurPresenteur( |
new VoteFleurVue()); |
/trunk/src/org/tela_botanica/del/client/composants/votes/moyennevotes/MoyenneVoteVue.java |
---|
277,4 → 277,13 |
boutonAnnuler.removeStyleName("elementMasque"); |
votes.removeStyleName("elementMasque"); |
} |
@Override |
public void afficherMessageVoteIdentifie(boolean peutVoter) { |
String message = I18n.getVocabulary().votez(); |
if(!peutVoter) { |
message = I18n.getVocabulary().identifiezVousPourVoter(); |
} |
zoneVoter.getElement().setInnerHTML("<span>"+message+" !</span>"); |
} |
} |
/trunk/src/org/tela_botanica/del/client/composants/votes/moyennevotes/moyenne.css |
---|
97,13 → 97,19 |
} |
.zoneVoter { |
background: none repeat scroll 0 0 #8EB533; |
background: #8eb533 none repeat scroll 0 0; |
color: white; |
font-size: 15px; |
height: 29px; |
height: 40px; |
margin-left: -5px; |
margin-top: -18px; |
padding: 10px 5px 0 39px; |
position: absolute; |
width: 82px; |
text-align: center; |
width: 126px; |
display: table; |
} |
.zoneVoter span { |
display: table-cell; |
vertical-align: middle; |
} |
/trunk/src/org/tela_botanica/del/client/composants/votes/moyennevotes/MoyenneVoteVue.ui.xml |
---|
84,7 → 84,7 |
<g:HorizontalPanel> |
<g:Label styleName="{style.petit} {style.protocole}" ui:field="protocole" text="protocole"/> |
</g:HorizontalPanel> |
<g:Label ui:field="zoneVoter" styleName="{style.zoneVoter}">Votez !</g:Label> |
<g:Label ui:field="zoneVoter" styleName="{style.zoneVoter}" text="Votez !"></g:Label> |
<g:HorizontalPanel ui:field="zoneDeVote"> |
<g:FocusPanel ui:field="voter" styleName="{style.barreVote}"/> |
<g:HTMLPanel ui:field="votePrisEnCompte"><g:Label text="{constants.votePrisEnCompte}"></g:Label></g:HTMLPanel> |
/trunk/src/org/tela_botanica/del/client/modeles/Protocole.java |
---|
7,6 → 7,7 |
private String description; |
private String tag; |
private String motsClesProtocoles; |
private boolean doitEtreIdentifiePourVoter = false; |
public int getId() { |
return id; |
48,4 → 49,12 |
return motsClesProtocoles; |
} |
public boolean doitEtreIdentifiePourVoter() { |
return doitEtreIdentifiePourVoter; |
} |
public void setDoitEtreIdentifiePourVoter(boolean doitEtreIdentifiePourVoter) { |
this.doitEtreIdentifiePourVoter = doitEtreIdentifiePourVoter; |
} |
} |
/trunk/src/org/tela_botanica/del/client/i18n/Vocabulary.properties |
---|
206,6 → 206,7 |
monVote = Mon vote |
nbVotes = vote |
nbPoints = pt |
identifiezVousPourVoter = Identifiez-vous <br /> pour voter |
votez = Votez |
# Vue detail de votes détermination |
/trunk/src/org/tela_botanica/del/client/i18n/Vocabulary.java |
---|
1725,6 → 1725,15 |
@DefaultStringValue("Votez") |
@Key("votez") |
String votez(); |
/** |
* Translated "Identifiez-vous pour voter". |
* |
* @return translated "Identifiez-vous pour voter" |
*/ |
@DefaultStringValue("Identifiez-vous pour voter") |
@Key("identifiezVousPourVoter") |
String identifiezVousPourVoter(); |
/** |
* Translated "Vous". |
/trunk/src/org/tela_botanica/del/client/utils/UtilitairesServiceResultat.java |
---|
610,7 → 610,10 |
JSONObject protocoleJSON = tableauProto.get(it.next()).isObject(); |
Protocole protocole = new Protocole(); |
String idProtocole = UtilitairesServiceResultat.getValeurOuVide(protocoleJSON, "protocole.id"); |
protocole.setId(Integer.parseInt(idProtocole)); |
protocole.setId(Integer.parseInt(idProtocole)); |
String doitEtreIdentifiePourVoter = UtilitairesServiceResultat.getValeurOuVide(protocoleJSON, "protocole.identifie"); |
boolean boolDoitEtreIdentifie = doitEtreIdentifiePourVoter.equals("1") ? true : false; |
protocole.setDoitEtreIdentifiePourVoter(boolDoitEtreIdentifie); |
protocole.setNom(UtilitairesServiceResultat.getValeurOuVide(protocoleJSON, "protocole.intitule")); |
protocole.setDescription(UtilitairesServiceResultat.getValeurOuVide(protocoleJSON, "protocole.descriptif")); |
protocole.setTag(UtilitairesServiceResultat.getValeurOuVide(protocoleJSON, "protocole.tag")); |