Subversion Repositories eFlore/Applications.cel

Rev

Rev 2615 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2615 Rev 2617
Line 5... Line 5...
5
 
5
 
6
import com.google.gwt.ajaxloader.client.AjaxLoader;
6
import com.google.gwt.ajaxloader.client.AjaxLoader;
7
import com.google.gwt.ajaxloader.client.AjaxLoader.AjaxLoaderOptions;
7
import com.google.gwt.ajaxloader.client.AjaxLoader.AjaxLoaderOptions;
8
import com.google.gwt.core.client.EntryPoint;
8
import com.google.gwt.core.client.EntryPoint;
-
 
9
import com.google.gwt.user.client.Timer;
9
import com.google.gwt.user.client.Timer;
10
import com.google.gwt.user.client.Window.Location;
10
import com.gwtext.client.core.Ext;
11
import com.gwtext.client.core.Ext;
Line 11... Line 12...
11
import com.gwtext.client.widgets.Viewport;
12
import com.gwtext.client.widgets.Viewport;
12
 
13
 
Line 35... Line 36...
35
			}
36
			}
36
		});
37
		});
37
		*/
38
		*/
38
		// TODO: config devrait être un singleton
39
		// TODO: config devrait être un singleton
39
		Configuration config = new Configuration();	
40
		Configuration config = new Configuration();	
-
 
41
		// Si la langue est précisée dans l'url on la prend, sinon on prend celle par défaut
-
 
42
		// @TODO: avertissement si la langue indiquée dans l'url n'est pas la bonne
-
 
43
		String langueURL = Location.getParameter("lang");
40
		Msg.init();
44
		if (! Msg.init()) {
-
 
45
			cel2.LogVersFirebug("La langue par défaut \"" + Msg.getLangueDefaut() + "\" n'a pas pu être chargée");
-
 
46
		}	
-
 
47
		if (langueURL != null && ! langueURL.equals("")) {
-
 
48
			cel2.LogVersFirebug("Langue passée dans l'URL: " + langueURL);
-
 
49
			if (! Msg.setLangue(langueURL)) {
-
 
50
				cel2.LogVersFirebug("La langue demandée \"" + langueURL + "\" n'a pas pu être chargée");
-
 
51
			}
-
 
52
		}
41
		
53
 
42
		// Chargement de l'api google maps v3 avant l'initialisation pour 
54
		// Chargement de l'api google maps v3 avant l'initialisation pour 
43
		// éviter des "complications"
55
		// éviter des "complications"
44
		// TODO: fabriquer une classe qui cherche dans la config une liste d'api
56
		// TODO: fabriquer une classe qui cherche dans la config une liste d'api
45
		// à charger, les instancie et ensuite lance l'application
57
		// à charger, les instancie et ensuite lance l'application
46
		AjaxLoaderOptions optAj = AjaxLoaderOptions.newInstance();
58
		AjaxLoaderOptions optAj = AjaxLoaderOptions.newInstance();
Line 91... Line 103...
91
		    	 log += buildStackTrace(cause, "CausedBy:\n");
103
		    	 log += buildStackTrace(cause, "CausedBy:\n");
92
		     }
104
		     }
93
	     }
105
	     }
94
	     return log;
106
	     return log;
95
	}*/
107
	}*/
96
	
108
 
97
	public static native void  LogVersFirebug(Object o) /*-{
109
	public static native void  LogVersFirebug(Object o) /*-{
98
		if (!!($wnd.console && $wnd.console.log)) {
110
		if (!!($wnd.console && $wnd.console.log)) {
99
			console.log(o);
111
			console.log(o);
100
		}
112
		}
101
	}-*/;
113
	}-*/;