Subversion Repositories eFlore/Applications.coel

Rev

Rev 1860 | Rev 1906 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1860 Rev 1863
Line 1408... Line 1408...
1408
			public void surSoumissionFormulaire(SubmitEvent event) {
1408
			public void surSoumissionFormulaire(SubmitEvent event) {
1409
				afficherPopinChargement();
1409
				afficherPopinChargement();
1410
			}
1410
			}
Line 1411... Line 1411...
1411
			
1411
			
1412
			@Override
1412
			@Override
1413
			public void surFormulaireEnvoye(SubmitCompleteEvent event) {
1413
			public void surFormulaireEnvoye(JSONValue responseValue) {
-
 
1414
				traiterRetourImportFormulaire(responseValue);
-
 
1415
				publiListeVue.afficherDernierePage();
-
 
1416
				fenetre.hide();
-
 
1417
			}
-
 
1418
			
-
 
1419
			@Override
-
 
1420
			public void surClicAnnuler() {
-
 
1421
				fenetre.hide();
-
 
1422
			}
-
 
1423
		});
-
 
1424
		fenetre.setTailleFenetre(75, 300);
-
 
1425
		fenetre.show();
Line -... Line 1426...
-
 
1426
	}
1414
				JSONValue responseValue = JSONParser.parseStrict(event.getResults());
1427
	
Line 1415... Line 1428...
1415
				
1428
	private void traiterRetourImportFormulaire(JSONValue responseValue) {
1416
				String message = "";
1429
		String message = "";
1417
				
1430
	
1418
				if(PublicationAsyncDao.importEstUnSucces(responseValue)) {				
1431
		if(PublicationAsyncDao.importEstUnSucces(responseValue)) {				
1419
					String nbPubliImportee = PublicationAsyncDao.getNbPublisImportees(responseValue);
1432
			String nbPubliImportee = PublicationAsyncDao.getNbPublisImportees(responseValue);
1420
					int nbPublint = Integer.parseInt(nbPubliImportee);
-
 
Line 1421... Line 1433...
1421
					message = (nbPublint == 1) ? i18nM.retourSuccesImportPublication(nbPubliImportee) : 
1433
			int nbPublint = Integer.parseInt(nbPubliImportee);
1422
												 i18nM.retourSuccesImportPublicationPluriel(nbPubliImportee);			
1434
			message = (nbPublint == 1) ? i18nM.retourSuccesImportPublication(nbPubliImportee) : 
1423
					fenetre.hide();
-
 
1424
					
1435
										 i18nM.retourSuccesImportPublicationPluriel(nbPubliImportee);			
1425
					// Tri artificiel par id de publications pour voir apparaître ce qui vient d'être importé
1436
			
1426
					PublicationAsyncDao.tri = "cpu_id_publication";
1437
			// Tri artificiel par id de publications pour voir apparaître ce qui vient d'être importé
1427
					publiListeVue.afficherDernierePage();
1438
			PublicationAsyncDao.tri = "cpu_id_publication";
1428
				} else {	
1439
		} else {	
1429
					message = i18nM.retourEchecImportPublication(PublicationAsyncDao.getErreursImport(responseValue));
1440
			message = i18nM.retourEchecImportPublication(PublicationAsyncDao.getErreursImport(responseValue));
Line 1430... Line -...
1430
				}
-
 
1431
				Window.alert(message);
-
 
1432
				masquerPopinChargement();
-
 
1433
			}
-
 
1434
			
-
 
1435
			@Override
-
 
1436
			public void surClicAnnuler() {
-
 
1437
				fenetre.hide();
-
 
1438
			}
-
 
1439
		});
1441
		}
1440
		fenetre.setTailleFenetre(75, 300);
1442
		Window.alert(message);
Line 1441... Line 1443...
1441
		fenetre.show();
1443
		masquerPopinChargement();
1442
	}
1444
	}