Subversion Repositories eFlore/Applications.cel

Rev

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

Rev 2614 Rev 2615
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;
18
import org.tela_botanica.client.CarnetEnLigneMediateur;
Line 19... Line 19...
19
import org.tela_botanica.client.i18n.Messages;
19
import org.tela_botanica.client.i18n.Msg;
20
import org.tela_botanica.client.modeles.objets.Configuration;
20
import org.tela_botanica.client.modeles.objets.Configuration;
21
 
21
 
Line 47... Line 47...
47
   * Texte lié à la connexion.
47
   * Texte lié à la connexion.
48
   * 
48
   * 
49
   */
49
   */
Line 50... Line 50...
50
  
50
  
51
  private String labelEtatConnexion = null;
-
 
52
  
-
 
Line 53... Line 51...
53
  private Messages msg = Messages.getInstance();
51
  private String labelEtatConnexion = null;
54
 
52
 
55
  /**
53
  /**
56
   * Ouh c'est pas beau, ça ! Mais avec Google Web Toolshit, ça
54
   * Ouh c'est pas beau, ça ! Mais avec Google Web Toolshit, ça
57
   * marche toujours mieux que quand on fait des trucs beaux :-)
55
   * marche toujours mieux que quand on fait des trucs beaux :-)
58
   */
56
   */
59
  private String liens = "<div id=\"liensExt\">"
57
  private String liens = "<div id=\"liensExt\">"
60
		  + "<a id=\"lienRemarques\" title=\"Adressez-nous vos remarques ou signalez-nous un problème\""
58
		  + "<a id=\"lienRemarques\" title=\""+Msg.get("adresser-remarque-probleme")+"\""
61
		  + 	" href=\"" + Configuration.getRemarquesBaseUrl() + "?service=" + Configuration.getServiceContact()
59
		  + 	" href=\"" + Configuration.getRemarquesBaseUrl() + "?service=" + Configuration.getServiceContact()
62
		  + 	"&pageSource=" + URL.encodeQueryString(Window.Location.getHref()) + "\""
60
		  + 	"&pageSource=" + URL.encodeQueryString(Window.Location.getHref()) + "\""
63
		  + " onClick=\"javascript:window.open(this.getAttribute('href'), 'Tela Botanica - Remarques', config='height=700, width=640, scrollbars=yes, resizable=yes'); return false;\""
61
		  + " onClick=\"javascript:window.open(this.getAttribute('href'), 'Tela Botanica - Remarques', config='height=700, width=640, scrollbars=yes, resizable=yes'); return false;\""
Line 135... Line 133...
135
 */
133
 */
136
public void setEtat(String identifiant, boolean connecte) {
134
public void setEtat(String identifiant, boolean connecte) {
Line 137... Line 135...
137
 
135
 
138
	if(connecte) {
136
	if(connecte) {
139
		String[] params = {identifiant};
137
		String[] params = {identifiant};
140
		labelEtatConnexion = "<div id=\"etatConnexion\">"+msg.get("connecte-en-tant-que", params)+" <a id=\"lienDeconnexion\" href=\"#\">("+msg.get("deconnexion")+")</a>" ;
138
		labelEtatConnexion = "<div id=\"etatConnexion\">"+Msg.get("connecte-en-tant-que", params)+" <a id=\"lienDeconnexion\" href=\"#\">("+Msg.get("deconnexion")+")</a>" ;
Line 141... Line 139...
141
		labelEtatConnexion += "</div>" ;
139
		labelEtatConnexion += "</div>" ;
142
		
140
		
Line 178... Line 176...
178
			});
176
			});
179
		}
177
		}
180
	}
178
	}
181
	else
179
	else
182
	{
180
	{
183
		labelEtatConnexion = "<div id=\"etatConnexion\"> "+msg.get("cel-utilisation")+", <a id=\"lienConnexion\" href=\"#\">"+msg.get("identifiez-vous")+"</a> "+msg.get("pour-transmettre-tela")+"</div>";
181
		labelEtatConnexion = "<div id=\"etatConnexion\"> "+Msg.get("cel-utilisation")+", <a id=\"lienConnexion\" href=\"#\">"+Msg.get("identifiez-vous")+"</a> "+Msg.get("pour-transmettre-tela")+"</div>";
184
		labelEtatConnexion += liens ;
182
		labelEtatConnexion += liens ;
185
		setHtml(labelEtatConnexion);
183
		setHtml(labelEtatConnexion);
186
		ExtElement lienCo = Ext.get("etatConnexion");
184
		ExtElement lienCo = Ext.get("etatConnexion");
187
		if(lienCo != null) {
185
		if(lienCo != null) {
188
			lienCo.addListener("click", new EventCallback() {
186
			lienCo.addListener("click", new EventCallback() {