Line 15... |
Line 15... |
15 |
import org.tela_botanica.client.modeles.MenuApplicationId;
|
15 |
import org.tela_botanica.client.modeles.MenuApplicationId;
|
16 |
import org.tela_botanica.client.modeles.Utilisateur;
|
16 |
import org.tela_botanica.client.modeles.Utilisateur;
|
17 |
import org.tela_botanica.client.modeles.Valeur;
|
17 |
import org.tela_botanica.client.modeles.Valeur;
|
18 |
import org.tela_botanica.client.modeles.ValeurListe;
|
18 |
import org.tela_botanica.client.modeles.ValeurListe;
|
19 |
import org.tela_botanica.client.modeles.aDonnee;
|
19 |
import org.tela_botanica.client.modeles.aDonnee;
|
- |
|
20 |
import org.tela_botanica.client.modeles.collection.Collection;
|
20 |
import org.tela_botanica.client.modeles.commentaire.Commentaire;
|
21 |
import org.tela_botanica.client.modeles.commentaire.Commentaire;
|
21 |
import org.tela_botanica.client.modeles.commentaire.CommentaireListe;
|
22 |
import org.tela_botanica.client.modeles.commentaire.CommentaireListe;
|
22 |
import org.tela_botanica.client.modeles.structure.StructureListe;
|
23 |
import org.tela_botanica.client.modeles.structure.StructureListe;
|
23 |
import org.tela_botanica.client.util.Debug;
|
24 |
import org.tela_botanica.client.util.Debug;
|
24 |
import org.tela_botanica.client.vues.BarrePaginationVue;
|
25 |
import org.tela_botanica.client.vues.BarrePaginationVue;
|
Line 49... |
Line 50... |
49 |
import com.extjs.gxt.ui.client.widget.grid.GroupingView;
|
50 |
import com.extjs.gxt.ui.client.widget.grid.GroupingView;
|
50 |
import com.extjs.gxt.ui.client.widget.layout.FitLayout;
|
51 |
import com.extjs.gxt.ui.client.widget.layout.FitLayout;
|
51 |
import com.extjs.gxt.ui.client.widget.menu.Menu;
|
52 |
import com.extjs.gxt.ui.client.widget.menu.Menu;
|
52 |
import com.extjs.gxt.ui.client.widget.toolbar.ToolBar;
|
53 |
import com.extjs.gxt.ui.client.widget.toolbar.ToolBar;
|
53 |
import com.google.gwt.core.client.GWT;
|
54 |
import com.google.gwt.core.client.GWT;
|
- |
|
55 |
import com.google.gwt.user.client.Window;
|
Line 54... |
Line 56... |
54 |
|
56 |
|
Line 55... |
Line 57... |
55 |
public class CommentaireListeVue extends ContentPanel implements Rafraichissable {
|
57 |
public class CommentaireListeVue extends ContentPanel implements Rafraichissable {
|
56 |
|
58 |
|
Line 71... |
Line 73... |
71 |
protected boolean commentairesChargementOk = false;
|
73 |
protected boolean commentairesChargementOk = false;
|
Line 72... |
Line 74... |
72 |
|
74 |
|
73 |
protected HashMap<String, Valeur> ontologie = null;
|
75 |
protected HashMap<String, Valeur> ontologie = null;
|
Line -... |
Line 76... |
- |
|
76 |
protected boolean ontologieChargementOk = false;
|
- |
|
77 |
|
- |
|
78 |
private int indexElementSelectionne = 0;
|
74 |
protected boolean ontologieChargementOk = false;
|
79 |
private Commentaire commentaireSelectionne = null;
|
75 |
|
80 |
|
76 |
public CommentaireListeVue(Mediateur mediateurCourant) {
|
81 |
public CommentaireListeVue(Mediateur mediateurCourant) {
|
Line 77... |
Line 82... |
77 |
mediateur = mediateurCourant;
|
82 |
mediateur = mediateurCourant;
|
Line 125... |
Line 130... |
125 |
modeleDesColonnes = new ColumnModel(colonnes);
|
130 |
modeleDesColonnes = new ColumnModel(colonnes);
|
Line 126... |
Line 131... |
126 |
|
131 |
|
127 |
GridSelectionModel<Commentaire> modeleDeSelection = new GridSelectionModel<Commentaire>();
|
132 |
GridSelectionModel<Commentaire> modeleDeSelection = new GridSelectionModel<Commentaire>();
|
128 |
modeleDeSelection.addSelectionChangedListener(new SelectionChangedListener<Commentaire>() {
|
133 |
modeleDeSelection.addSelectionChangedListener(new SelectionChangedListener<Commentaire>() {
|
129 |
public void selectionChanged(SelectionChangedEvent<Commentaire> event) {
|
134 |
public void selectionChanged(SelectionChangedEvent<Commentaire> event) {
|
- |
|
135 |
commentaireSelectionne = (Commentaire) event.getSelectedItem();
|
130 |
Commentaire commentaire = (Commentaire) event.getSelectedItem();
|
136 |
indexElementSelectionne = store.indexOf(commentaireSelectionne);
|
131 |
clicListe(commentaire);
|
137 |
clicListe(commentaireSelectionne);
|
132 |
}
|
138 |
}
|
Line 133... |
Line 139... |
133 |
});
|
139 |
});
|
134 |
|
140 |
|
Line 276... |
Line 282... |
276 |
message = (String) info.getDonnee(0);
|
282 |
message = (String) info.getDonnee(0);
|
277 |
}
|
283 |
}
|
278 |
InfoLogger.display(i18nC.commentaireTitreSuppression(), message);
|
284 |
InfoLogger.display(i18nC.commentaireTitreSuppression(), message);
|
279 |
supprimerCommentairesSelectionnees();
|
285 |
supprimerCommentairesSelectionnees();
|
280 |
gererEtatActivationBouton();
|
286 |
gererEtatActivationBouton();
|
- |
|
287 |
} else if (info.getType().equals("commentaire_modifiee")) {
|
- |
|
288 |
// GXT c'est pourri et la grille ne prend en compte les modifications
|
- |
|
289 |
// du store, donc en attendant, on recharge tout, comme pour la suppression
|
- |
|
290 |
/*Commentaire commModifie = (Commentaire)info.getDonnee(0);
|
- |
|
291 |
store.remove(indexElementSelectionne);
|
- |
|
292 |
store.insert(commModifie, indexElementSelectionne);
|
- |
|
293 |
grille.reconfigure(store, modeleDesColonnes);
|
- |
|
294 |
grille.repaint();*/
|
- |
|
295 |
mediateur.clicMenu(MenuApplicationId.COMMENTAIRE);
|
281 |
}
|
296 |
}
|
282 |
} else {
|
297 |
} else {
|
283 |
GWT.log(Mediateur.i18nM.erreurRafraichir(nouvellesDonnees.getClass(), this.getClass()), null);
|
298 |
GWT.log(Mediateur.i18nM.erreurRafraichir(nouvellesDonnees.getClass(), this.getClass()), null);
|
284 |
}
|
299 |
}
|