Subversion Repositories eFlore/Applications.cel

Rev

Rev 2600 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2600 Rev 2614
Line 14... Line 14...
14
 */
14
 */
Line 15... Line 15...
15
 
15
 
Line 16... Line 16...
16
package org.tela_botanica.client.vues;
16
package org.tela_botanica.client.vues;
-
 
17
 
17
 
18
import org.tela_botanica.client.CarnetEnLigneMediateur;
Line 18... Line 19...
18
import org.tela_botanica.client.CarnetEnLigneMediateur;
19
import org.tela_botanica.client.i18n.Messages;
19
import org.tela_botanica.client.modeles.objets.Configuration;
20
import org.tela_botanica.client.modeles.objets.Configuration;
20
 
21
 
Line 46... Line 47...
46
   * Texte lié à la connexion.
47
   * Texte lié à la connexion.
47
   * 
48
   * 
48
   */
49
   */
Line 49... Line 50...
49
  
50
  
-
 
51
  private String labelEtatConnexion = null;
-
 
52
  
Line 50... Line 53...
50
  private String labelEtatConnexion = null;
53
  private Messages msg = Messages.getInstance();
51
 
54
 
52
  /**
55
  /**
53
   * Ouh c'est pas beau, ça ! Mais avec Google Web Toolshit, ça
56
   * Ouh c'est pas beau, ça ! Mais avec Google Web Toolshit, ça
Line 131... Line 134...
131
 * @param connecte
134
 * @param connecte
132
 */
135
 */
133
public void setEtat(String identifiant, boolean connecte) {
136
public void setEtat(String identifiant, boolean connecte) {
Line 134... Line 137...
134
 
137
 
-
 
138
	if(connecte) {
135
	if(connecte) {
139
		String[] params = {identifiant};
136
		labelEtatConnexion = "<div id=\"etatConnexion\">Connecté en tant que "+identifiant+" <a id=\"lienDeconnexion\" href=\"#\">(deconnexion)</a>" ;
140
		labelEtatConnexion = "<div id=\"etatConnexion\">"+msg.get("connecte-en-tant-que", params)+" <a id=\"lienDeconnexion\" href=\"#\">("+msg.get("deconnexion")+")</a>" ;
Line 137... Line 141...
137
		labelEtatConnexion += "</div>" ;
141
		labelEtatConnexion += "</div>" ;
138
		
142
		
Line 174... Line 178...
174
			});
178
			});
175
		}
179
		}
176
	}
180
	}
177
	else
181
	else
178
	{
182
	{
179
		labelEtatConnexion = "<div id=\"etatConnexion\"> Utilisez ce carnet en ligne pour saisir vos observations, <a id=\"lienConnexion\" href=\"#\">identifiez-vous</a> pour les transmettre à Tela Botanica</div>";
183
		labelEtatConnexion = "<div id=\"etatConnexion\"> "+msg.get("cel-utilisation")+", <a id=\"lienConnexion\" href=\"#\">"+msg.get("identifiez-vous")+"</a> "+msg.get("pour-transmettre-tela")+"</div>";
180
		labelEtatConnexion += liens ;
184
		labelEtatConnexion += liens ;
181
		setHtml(labelEtatConnexion);
185
		setHtml(labelEtatConnexion);
182
		ExtElement lienCo = Ext.get("etatConnexion");
186
		ExtElement lienCo = Ext.get("etatConnexion");
183
		if(lienCo != null) {
187
		if(lienCo != null) {
184
			lienCo.addListener("click", new EventCallback() {
188
			lienCo.addListener("click", new EventCallback() {