Subversion Repositories eFlore/Applications.coel

Compare Revisions

Ignore whitespace Rev 1612 → Rev 1613

/trunk/src/org/tela_botanica/client/vues/projet/ProjetListeVue.java
15,6 → 15,7
import org.tela_botanica.client.modeles.Utilisateur;
import org.tela_botanica.client.modeles.projet.Projet;
import org.tela_botanica.client.modeles.projet.ProjetListe;
import org.tela_botanica.client.modeles.publication.Publication;
import org.tela_botanica.client.modeles.structure.StructureListe;
import org.tela_botanica.client.util.Debug;
import org.tela_botanica.client.util.UtilString;
40,6 → 41,7
import com.extjs.gxt.ui.client.widget.layout.FitLayout;
import com.extjs.gxt.ui.client.widget.toolbar.ToolBar;
import com.google.gwt.core.client.GWT;
import com.google.gwt.user.client.Window;
 
public class ProjetListeVue extends ContentPanel implements Rafraichissable {
 
55,6 → 57,9
private Button modifier;
private Button supprimer;
private int indexElementSelectionne = 0;
private Projet projetSelectionne = null;
public ProjetListeVue(Mediateur mediateurCourant) {
super();
mediateur = mediateurCourant;
78,6 → 83,7
modifier.addSelectionListener(new SelectionListener<ButtonEvent>() {
public void componentSelected(ButtonEvent be) {
mediateur.clicModifierProjet(grille.getSelectionModel().getSelectedItems());
indexElementSelectionne = store.indexOf(grille.getSelectionModel().getSelectedItem());
}
});
toolBar.add(modifier);
107,8 → 113,8
GridSelectionModel<Projet> modeleDeSelection = new GridSelectionModel<Projet>();
modeleDeSelection.addSelectionChangedListener(new SelectionChangedListener<Projet>() {
public void selectionChanged(SelectionChangedEvent<Projet> event) {
Projet projet = (Projet) event.getSelectedItem();
clicListe(projet);
projetSelectionne = (Projet) event.getSelectedItem();
clicListe(projetSelectionne);
}
});
188,6 → 194,18
Information info = (Information) nouvellesDonnees;
if (info.getType().equals("maj_utilisateur")) {
gererEtatActivationBouton();
} else if (info.getType().equals("projet_modifie")) {
if(projetSelectionne != null) {
store.remove(indexElementSelectionne);
projetSelectionne = null;
}
Projet projetModifie = (Projet)info.getDonnee(0);
// au cas ou le bouton appliquer aurait été cliqué avant de valider
store.remove(projetModifie);
store.insert(projetModifie, indexElementSelectionne);
grille.repaint();
grille.getSelectionModel().select(indexElementSelectionne, true);
clicListe(projetModifie);
} else if (info.getType().equals("suppression_projet")) {
String message = info.toString();
if (info.getDonnee(0) != null) {
/trunk/src/org/tela_botanica/client/vues/projet/ProjetForm.java
35,6 → 35,7
import com.extjs.gxt.ui.client.widget.layout.FlowLayout;
import com.extjs.gxt.ui.client.widget.layout.FormData;
import com.extjs.gxt.ui.client.widget.layout.FormLayout;
import com.google.gwt.user.client.Window;
 
public class ProjetForm extends Formulaire implements Rafraichissable {
68,7 → 69,7
private Sequenceur sequenceur = new Sequenceur();
 
private Rafraichissable vueExterneARafraichirApresValidation = null;
public Rafraichissable vueExterneARafraichirApresValidation = null;
 
 
public ProjetForm(Mediateur mediateurCourrant, String projetId) {
299,10 → 300,13
if (type.equals("ajout_projet") || type.equals("modif_projet")) {
if (info.getDonnee(0) != null && info.getDonnee(0) instanceof String) {
projetValideOk = true;
String projetId = (String) info.getDonnee(0);
if (vueExterneARafraichirApresValidation != null) {
projet.setId(projetId);
if(!type.equals("modif_projet")) {
String projetId = (String) info.getDonnee(0);
if (vueExterneARafraichirApresValidation != null) {
projet.setId(projetId);
}
}
controlerFermeture();
}
}
310,7 → 314,7
if (type.equals("selection_projet")) {
InfoLogger.display(i18nC.projetTitreFormModif(), info.toString());
} else if (type.equals("modif_projet")) {
InfoLogger.display(i18nC.projetTitreFormModif(), info.toString());
//InfoLogger.display(i18nC.projetTitreFormModif(), info.toString());
} else if (type.equals("ajout_projet")) {
if (info.getDonnee(0) != null && info.getDonnee(0) instanceof String) {
String projetId = (String) info.getDonnee(0);