Subversion Repositories eFlore/Applications.cel

Rev

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

Rev 2621 Rev 2649
Line 42... Line 42...
42
	/**
42
	/**
43
	 * Crée un panel d'upload simple aux fonctions réduites mais utilisant
43
	 * Crée un panel d'upload simple aux fonctions réduites mais utilisant
44
	 * uniquement javascript (pour les utilisateurs qui n'ont pas java)
44
	 * uniquement javascript (pour les utilisateurs qui n'ont pas java)
45
	 */
45
	 */
46
	public static void appelerUploadSimple() {
46
	public static void appelerUploadSimple() {
47
 
-
 
-
 
47
		// Ce composant est moche, compliqué et pas pratique pour l'i18n
-
 
48
		// TODO: trouver un remplacer comme https://code.google.com/p/gwtupload/
48
		UploadDialog up = new UploadDialog(Msg.get("upload-simple-fichiers"));
49
		UploadDialog up = new UploadDialog(Msg.get("upload-simple-fichiers"));
49
		up.setUrl(Configuration.getServiceBaseUrl() + "/InventoryImage");
50
		up.setUrl(Configuration.getServiceBaseUrl() + "/InventoryImage");
50
		UrlParam id = new UrlParam("ce_utilisateur",Utilisateur.getInstance().getIdentifiantUtilisateurConsulte());
51
		UrlParam id = new UrlParam("ce_utilisateur",Utilisateur.getInstance().getIdentifiantUtilisateurConsulte());
51
		UrlParam[] params = { id };
52
		UrlParam[] params = { id };
52
		up.setBaseParams(params);
53
		up.setBaseParams(params);
Line 95... Line 96...
95
		final String paramTransmitMetaData = "<param name=\"pictureTransmitMetadata\" value=\"true\">";
96
		final String paramTransmitMetaData = "<param name=\"pictureTransmitMetadata\" value=\"true\">";
96
		final String paramFilesPerRequest = "<param name=\"nbFilesPerRequest\" value=\"1\">";
97
		final String paramFilesPerRequest = "<param name=\"nbFilesPerRequest\" value=\"1\">";
97
		final String paramAllowedExtensions = "<param name=\"allowedFileExtensions\" value=\"jpg/jpeg/\">";
98
		final String paramAllowedExtensions = "<param name=\"allowedFileExtensions\" value=\"jpg/jpeg/\">";
98
		final String paramUploadSuccess = "<param name=\"stringUploadSuccess\" value=\"OK\">";
99
		final String paramUploadSuccess = "<param name=\"stringUploadSuccess\" value=\"OK\">";
99
		final String paramShowLogWindow = "<param name=\"showLogWindow\" value=\"false\">";
100
		final String paramShowLogWindow = "<param name=\"showLogWindow\" value=\"false\">";
-
 
101
		final String paramLangue = "<param name=\"lang\" value=\""+Msg.getLangue()+"\">";
100
		final String paramFormdata = "<param name=\"formData\" value=\"postid\">";
102
		final String paramFormdata = "<param name=\"formData\" value=\"postid\">";
101
		final String finApplet = "</applet>";
103
		final String finApplet = "</applet>";
Line 102... Line 104...
102
 
104
 
103
		final String appelApplet = applet + paramPostTarget + paramUploadPolicy
105
		final String appelApplet = applet + paramPostTarget + paramUploadPolicy
104
				+ paramMaxChunkSize + paramMaxFileSize + paramTransmitMetaData
106
				+ paramMaxChunkSize + paramMaxFileSize + paramTransmitMetaData
105
				+ paramFilesPerRequest + paramAllowedExtensions
107
				+ paramFilesPerRequest + paramAllowedExtensions + paramLangue
106
				+ paramUploadSuccess + paramShowLogWindow + paramFormdata
108
				+ paramUploadSuccess + paramShowLogWindow + paramFormdata
Line 107... Line 109...
107
				+ finApplet;
109
				+ finApplet;
108
 
110