Subversion Repositories eFlore/Applications.coel

Rev

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

Rev 519 Rev 540
Line 443... Line 443...
443
						lcTelephone.add(cbTelephone, new ColumnData(0.40));
443
						lcTelephone.add(cbTelephone, new ColumnData(0.40));
444
						hmIdentite.put("cbTelephone", cbTelephone);
444
						hmIdentite.put("cbTelephone", cbTelephone);
Line 445... Line 445...
445
			
445
			
Line 446... Line 446...
446
						mediateur.obtenirListeValeurEtRafraichir(this, "tel");
446
						mediateur.obtenirListeValeurEtRafraichir(this, "tel");
-
 
447
			
-
 
448
						Button bAjouter = new Button();
447
			
449
						bAjouter.setIcon(Images.ICONES.ajouter());
448
						IconButton bAjouter = new IconButton(ComposantClass.ICONE_AJOUTER);
450
						// TODO : taille du bouton trop grande
449
						bAjouter.addSelectionListener(
451
						bAjouter.addSelectionListener(
Line 450... Line 452...
450
								new SelectionListener<IconButtonEvent>() {
452
								new SelectionListener<ButtonEvent>() {
451
									public void componentSelected(IconButtonEvent ce) {
453
									public void componentSelected(ButtonEvent ce) {
452
			
454
			
453
										String strTelephone = ((TextField<String>) hmIdentite.get("tfTelephone")).getValue();
455
										String strTelephone = ((TextField<String>) hmIdentite.get("tfTelephone")).getValue();
Line 511... Line 513...
511
						
513
						
512
						add(hfHiddenCourriel);
514
						add(hfHiddenCourriel);
513
						hmIdentite.put("hfHiddenCourriel", hfHiddenCourriel);
515
						hmIdentite.put("hfHiddenCourriel", hfHiddenCourriel);
Line 514... Line 516...
514
						hmIdentite.put("tfCourriel", tfCourriel);
516
						hmIdentite.put("tfCourriel", tfCourriel);
-
 
517
			
515
			
518
						Button bAjouterCourriel = new Button();
516
						IconButton bAjouterCourriel = new IconButton(ComposantClass.ICONE_AJOUTER);
519
						bAjouterCourriel.setIcon(Images.ICONES.ajouter());
Line 517... Line 520...
517
						bAjouterCourriel.addSelectionListener(
520
						bAjouterCourriel.addSelectionListener(
Line 518... Line 521...
518
								new SelectionListener<IconButtonEvent>() {
521
								new SelectionListener<ButtonEvent>() {
519
						
522
						
520
									public void componentSelected(IconButtonEvent ce) {
523
									public void componentSelected(ButtonEvent ce) {
521
										
524
										
Line 566... Line 569...
566
						tfUrl.setValue("http://");
569
						tfUrl.setValue("http://");
Line 567... Line 570...
567
			
570
			
568
						lcUrl.add(tfUrl, new ColumnData(0.8));
571
						lcUrl.add(tfUrl, new ColumnData(0.8));
Line 569... Line 572...
569
						hmIdentite.put("tfUrl", tfUrl);
572
						hmIdentite.put("tfUrl", tfUrl);
-
 
573
			
570
			
574
						Button ibAjouterUrl = new Button();
Line 571... Line 575...
571
						IconButton ibAjouterUrl = new IconButton(ComposantClass.ICONE_AJOUTER);
575
						ibAjouterUrl.setIcon(Images.ICONES.ajouter());
Line 572... Line 576...
572
						ibAjouterUrl.addSelectionListener(new SelectionListener<IconButtonEvent>() {
576
						ibAjouterUrl.addSelectionListener(new SelectionListener<ButtonEvent>() {
573
 
577
 
Line 574... Line 578...
574
							public void componentSelected(IconButtonEvent ce) {
578
							public void componentSelected(ButtonEvent ce) {
575
								
579
								
576
								TextField<String> tfUrl = (TextField) hmIdentite.get("tfUrl");
580
								TextField<String> tfUrl = (TextField) hmIdentite.get("tfUrl");
577
								String strUrl = tfUrl.getValue();
581
								String strUrl = tfUrl.getValue();
578
								
582
								
579
								if ((strUrl == null)||(strUrl.trim().equals("http://"))||(strUrl.trim().equals("")))	{
583
								if ((strUrl == null)||(strUrl.trim().equals("http://"))||(strUrl.trim().equals("")))	{
580
									MessageBox.alert("Erreur de saisie", "Vous devez saisir un URL", null);
584
									MessageBox.alert("Erreur de saisie", "Vous devez saisir un URL", null);
581
								} else if(hmIdentite.get("url-" + strUrl) != null)	{
585
								} else if(hmIdentite.get("url-" + strUrl) != null)	{
582
									MessageBox.alert("Erreur de saisie", "L'url est déjà présente dans la liste.", null);
586
									MessageBox.alert("Erreur de saisie", "L'url est déjà présente dans la liste.", null);
583
								}	else	{
587
								}	else	{
584
									tfUrl.setValue("");
588
									tfUrl.setValue("http://");
Line 659... Line 663...
659
				hmIdentite.put("hfUrlLogo", hfUrlLogo);
663
				hmIdentite.put("hfUrlLogo", hfUrlLogo);
Line 660... Line 664...
660
	
664
	
661
				lcUrlLogo.add(tfUrlLogo, new ColumnData(0.8));
665
				lcUrlLogo.add(tfUrlLogo, new ColumnData(0.8));
Line 662... Line 666...
662
				hmIdentite.put("tfUrlLogo", tfUrlLogo);
666
				hmIdentite.put("tfUrlLogo", tfUrlLogo);
-
 
667
	
663
	
668
				Button ibAjouterUrlLogo = new Button();
Line 664... Line 669...
664
				IconButton ibAjouterUrlLogo = new IconButton(ComposantClass.ICONE_AJOUTER);
669
				ibAjouterUrlLogo.setIcon(Images.ICONES.ajouter());
Line 665... Line 670...
665
				ibAjouterUrlLogo.addSelectionListener(new SelectionListener<IconButtonEvent>() {
670
				ibAjouterUrlLogo.addSelectionListener(new SelectionListener<ButtonEvent>() {
666
 
671
 
Line 667... Line 672...
667
					public void componentSelected(IconButtonEvent ce) {
672
					public void componentSelected(ButtonEvent ce) {
668
						
673
						
669
						TextField<String> tfUrlLogo = (TextField) hmIdentite.get("tfUrlLogo");
674
						TextField<String> tfUrlLogo = (TextField) hmIdentite.get("tfUrlLogo");
670
						String strUrl = tfUrlLogo.getValue();
675
						String strUrl = tfUrlLogo.getValue();
671
						
676
						
672
						if ((strUrl == null)||(strUrl.trim().equals("http://"))||(strUrl.trim().equals("")))	{
677
						if ((strUrl == null)||(strUrl.trim().equals("http://"))||(strUrl.trim().equals("")))	{
673
							MessageBox.alert("Erreur de saisie", "Vous devez saisir un URL", null);
678
							MessageBox.alert("Erreur de saisie", "Vous devez saisir un URL", null);
674
						} else if(hmIdentite.get("url-" + strUrl) != null)	{
679
						} else if(hmIdentite.get("url-" + strUrl) != null)	{
675
							MessageBox.alert("Erreur de saisie", "L'url est déjà présente dans la liste.", null);
680
							MessageBox.alert("Erreur de saisie", "L'url est déjà présente dans la liste.", null);
676
						}	else	{
681
						}	else	{
677
							tfUrlLogo.setValue("");
682
							tfUrlLogo.setValue("http://");
Line 852... Line 857...
852
		Button enregistrer = new Button("Enregistrer et revenir à la liste");
857
		Button enregistrer = new Button("Enregistrer et revenir à la liste");
853
		enregistrer.setIcon(Images.ICONES.scriptGo());
858
		enregistrer.setIcon(Images.ICONES.scriptGo());
854
		enregistrer.setIconAlign(IconAlign.LEFT);
859
		enregistrer.setIconAlign(IconAlign.LEFT);
855
		enregistrer.addSelectionListener(new SelectionListener<ButtonEvent>() {  
860
		enregistrer.addSelectionListener(new SelectionListener<ButtonEvent>() {  
856
			public void componentSelected(ButtonEvent ce) {  
861
			public void componentSelected(ButtonEvent ce) {  
857
				
-
 
-
 
862
				enregistrer();
858
			}  
863
			}  
859
		});
864
		});
860
		enregistrer.setEnabled(false);
865
		enregistrer.setEnabled(false);
Line 861... Line 866...
861
		
866
		
Line 1276... Line 1281...
1276
				Text tTelephone = new Text();
1281
				Text tTelephone = new Text();
1277
				tTelephone.setText(strTelephone);
1282
				tTelephone.setText(strTelephone);
1278
				hmIdentite.put("tel-" + strIdTelephone, tTelephone);
1283
				hmIdentite.put("tel-" + strIdTelephone, tTelephone);
1279
				lcTelephone.add(tTelephone, new ColumnData(0.40));
1284
				lcTelephone.add(tTelephone, new ColumnData(0.40));
Line 1280... Line 1285...
1280
				
1285
				
-
 
1286
				Button bSupprimer = new Button();
1281
				IconButton bSupprimer = new IconButton(ComposantClass.ICONE_SUPPRIMER);
1287
				bSupprimer.setIcon(Images.ICONES.supprimer());
Line 1282... Line 1288...
1282
				bSupprimer.setId(strIdTelephone);
1288
				bSupprimer.setId(strIdTelephone);
1283
				
1289
				
Line 1284... Line 1290...
1284
				bSupprimer.addSelectionListener(new SelectionListener<IconButtonEvent>() {
1290
				bSupprimer.addSelectionListener(new SelectionListener<ButtonEvent>() {
1285
						public void componentSelected(IconButtonEvent ce) {
1291
						public void componentSelected(ButtonEvent ce) {
Line 1286... Line 1292...
1286
							
1292
							
Line 1344... Line 1350...
1344
			
1350
			
1345
			lcCourriel.add(lfCourriel, new ColumnData(0.8));
1351
			lcCourriel.add(lfCourriel, new ColumnData(0.8));
Line 1346... Line 1352...
1346
			hmIdentite.put("lc-" + strEmail, lcCourriel);
1352
			hmIdentite.put("lc-" + strEmail, lcCourriel);
1347
			
1353
			
-
 
1354
			//Bouton supprimer
1348
			//Bouton supprimer
1355
			Button btnSupprimerCourriel = new Button();
1349
			IconButton btnSupprimerCourriel = new IconButton(ComposantClass.ICONE_SUPPRIMER);
1356
			btnSupprimerCourriel.setIcon(Images.ICONES.supprimer());
Line 1350... Line 1357...
1350
			btnSupprimerCourriel.setId(strEmail);
1357
			btnSupprimerCourriel.setId(strEmail);
1351
			btnSupprimerCourriel.addSelectionListener(new SelectionListener<IconButtonEvent>() {
1358
			btnSupprimerCourriel.addSelectionListener(new SelectionListener<ButtonEvent>() {
1352
				
1359
				
1353
				public void componentSelected(IconButtonEvent ce) {
1360
				public void componentSelected(ButtonEvent ce) {
1354
					//Suppression de l'adresse email
1361
					//Suppression de l'adresse email
1355
					String strEmail = ce.getComponent().getId();
1362
					String strEmail = ce.getComponent().getId();
Line 1400... Line 1407...
1400
		Text tUrl = new Text(strUrl);
1407
		Text tUrl = new Text(strUrl);
1401
		hmIdentite.put("url-"+strUrl, tUrl);
1408
		hmIdentite.put("url-"+strUrl, tUrl);
Line 1402... Line 1409...
1402
		
1409
		
Line 1403... Line 1410...
1403
		lcUrl.add(tUrl, new ColumnData(0.8));
1410
		lcUrl.add(tUrl, new ColumnData(0.8));
-
 
1411
		
1404
		
1412
		Button ibSupprimerUrl = new Button();
1405
		IconButton ibSupprimerUrl = new IconButton(ComposantClass.ICONE_SUPPRIMER);
1413
		ibSupprimerUrl.setIcon(Images.ICONES.supprimer());
Line 1406... Line 1414...
1406
		ibSupprimerUrl.setId(strUrl);
1414
		ibSupprimerUrl.setId(strUrl);
Line 1407... Line 1415...
1407
		ibSupprimerUrl.addSelectionListener(new SelectionListener<IconButtonEvent>() {
1415
		ibSupprimerUrl.addSelectionListener(new SelectionListener<ButtonEvent>() {
1408
 
1416
 
1409
			public void componentSelected(IconButtonEvent ce) {
1417
			public void componentSelected(ButtonEvent ce) {
1410
				
1418
				
Line 1454... Line 1462...
1454
		Text tUrl = new Text(strUrl);
1462
		Text tUrl = new Text(strUrl);
1455
		hmIdentite.put("url-"+strUrl, tUrl);
1463
		hmIdentite.put("url-"+strUrl, tUrl);
Line 1456... Line 1464...
1456
		
1464
		
Line 1457... Line 1465...
1457
		lcUrl.add(tUrl, new ColumnData(0.8));
1465
		lcUrl.add(tUrl, new ColumnData(0.8));
-
 
1466
		
1458
		
1467
		Button ibSupprimerUrl = new Button();
1459
		IconButton ibSupprimerUrl = new IconButton(ComposantClass.ICONE_SUPPRIMER);
1468
		ibSupprimerUrl.setIcon(Images.ICONES.supprimer());
Line 1460... Line 1469...
1460
		ibSupprimerUrl.setId(strUrl);
1469
		ibSupprimerUrl.setId(strUrl);
Line 1461... Line 1470...
1461
		ibSupprimerUrl.addSelectionListener(new SelectionListener<IconButtonEvent>() {
1470
		ibSupprimerUrl.addSelectionListener(new SelectionListener<ButtonEvent>() {
1462
 
1471
 
1463
			public void componentSelected(IconButtonEvent ce) {
1472
			public void componentSelected(ButtonEvent ce) {
1464
				
1473