/trunk/src/org/tela_botanica/client/modeles/aDonnee.java |
---|
6,18 → 6,15 |
import java.util.HashMap; |
import java.util.Iterator; |
import java.util.LinkedList; |
import java.util.List; |
import java.util.Map; |
import java.util.Set; |
import java.util.TreeSet; |
import org.tela_botanica.client.util.Debug; |
import org.tela_botanica.client.util.UtilArray; |
import org.tela_botanica.client.util.UtilString; |
import com.extjs.gxt.ui.client.core.FastMap; |
import com.extjs.gxt.ui.client.data.BaseModelData; |
import com.google.gwt.core.client.GWT; |
import com.google.gwt.http.client.URL; |
import com.google.gwt.json.client.JSONObject; |
/trunk/src/org/tela_botanica/client/modeles/collection/CollectionAsyncDao.java |
---|
20,6 → 20,7 |
import com.google.gwt.json.client.JSONNumber; |
import com.google.gwt.json.client.JSONObject; |
import com.google.gwt.json.client.JSONValue; |
import com.google.gwt.user.client.Window; |
public class CollectionAsyncDao { |
211,81 → 212,15 |
postDonnees += "&cc_id_collection=" + URL.encodeComponent(collectionId); |
} |
/* |
postDonnees += "&cpr_abreviation=" + URL.encodeComponent(((ProjetListe) Registry.get(RegistreId.PROJETS)).get(collection.getIdProjet()).getAbreviation()); |
postDonnees += "&cc_ce_projet=" + URL.encodeComponent(collection.getIdProjet()) + |
"&cc_ce_mere=" + URL.encodeComponent(collection.getCollectionMereId()) + |
"&cc_ce_structure=" + URL.encodeComponent(collection.getIdStructure()) + |
"&cc_truk_identifiant_alternatif=" + URL.encodeComponent(collection.getIdAlternatif()) + |
"&cc_truk_code=" + URL.encodeComponent(collection.getCode()) + |
"&cc_nom=" + URL.encodeComponent(collection.getNom()) + |
"&cc_truk_nom_alternatif=" + URL.encodeComponent(collection.getNomAlternatif()) + |
"&cc_description=" + URL.encodeComponent(collection.getDescription()) + |
"&cc_description_specialiste=" + URL.encodeComponent(collection.getDescriptionSpecialiste()) + |
"&cc_historique=" + URL.encodeComponent(collection.getHistorique()) + |
"&cc_truk_url=" + URL.encodeComponent(collection.getUrls()) + |
"&cc_truk_groupement_principe=" + URL.encodeComponent(collection.getGroupementPrincipe()) + |
"&cc_truk_groupement_but=" + URL.encodeComponent(collection.getGroupementBut()) + |
"&cc_ce_type=" + URL.encodeComponent(collection.getTypeNcd()) + |
"&cc_ce_type_depot=" + URL.encodeComponent(collection.getTypeDepot()) + |
"&cc_cote=" + URL.encodeComponent(collection.getCote()) + |
"&cc_truk_periode_constitution=" + URL.encodeComponent(collection.getPeriodeConstitution()) + |
"&cc_truk_couverture_lieu=" + URL.encodeComponent(collection.getCouvertureLieu()) + |
"&cc_ce_specimen_type=" + URL.encodeComponent(collection.getSpecimenType()) + |
"&cc_specimen_type_nbre=" + URL.encodeComponent(collection.getSpecimenTypeNbre()) + |
"&cc_ce_specimen_type_nbre_precision=" + URL.encodeComponent(collection.getSpecimenTypeNbrePrecision()) + |
"&cc_ce_specimen_type_classement=" + URL.encodeComponent(collection.getSpecimenTypeClassement());*/ |
postDonnees += "&" + collection.obtenirChainePOST(); |
} |
if (collection.getBotanique() != null) { |
if (collectionId != null) { |
postDonnees += "&ccb_id_collection=" + URL.encodeComponent(collectionId); |
if (collection.getBotanique() != null) { |
if (collectionId != null) { |
postDonnees += "&ccb_id_collection=" + URL.encodeComponent(collectionId); |
} |
CollectionBotanique collectionBotanique = collection.getBotanique(); |
postDonnees += "&" + collectionBotanique.obtenirChainePOST(); |
} |
CollectionBotanique collectionBotanique = collection.getBotanique(); |
/*postDonnees += "&ccb_nbre_echantillon=" + URL.encodeComponent(collectionBotanique.getNbreEchantillon()) + |
"&ccb_ce_truk_type=" + URL.encodeComponent(collectionBotanique.getType()) + |
"&ccb_truk_unite_rangement=" + URL.encodeComponent(collectionBotanique.getUniteRangement()) + |
"&ccb_ce_unite_rangement_etat=" + URL.encodeComponent(collectionBotanique.getUniteRangementEtat()) + |
"&ccb_truk_unite_base=" + URL.encodeComponent(collectionBotanique.getUniteBase()) + |
"&ccb_truk_conservation_papier_type=" + URL.encodeComponent(collectionBotanique.getConservationPapierType()) + |
"&ccb_truk_conservation_methode=" + URL.encodeComponent(collectionBotanique.getConservationMethode()) + |
"&ccb_specimen_fixation_pourcent=" + URL.encodeComponent(collectionBotanique.getSpecimenFixationPourcent()) + |
"&ccb_etiquette_fixation_pourcent=" + URL.encodeComponent(collectionBotanique.getEtiquetteFixationPourcent()) + |
"&ccb_truk_specimen_fixation_methode=" + URL.encodeComponent(collectionBotanique.getSpecimenFixationMethode()) + |
"&ccb_truk_etiquette_fixation_support=" + URL.encodeComponent(collectionBotanique.getEtiquetteFixationSupport()) + |
"&ccb_truk_etiquette_fixation_specimen=" + URL.encodeComponent(collectionBotanique.getEtiquetteFixationSpecimen()) + |
"&ccb_truk_etiquette_ecriture=" + URL.encodeComponent(collectionBotanique.getEtiquetteEcriture()) + |
"&ccb_ce_traitement=" + URL.encodeComponent(collectionBotanique.getTraitement()) + |
"&ccb_truk_traitement_poison=" + URL.encodeComponent(collectionBotanique.getTraitementPoison()) + |
"&ccb_truk_traitement_insecte=" + URL.encodeComponent(collectionBotanique.getTraitementInsecte()) + |
"&ccb_ce_etat_general=" + URL.encodeComponent(collectionBotanique.getEtatGeneral()) + |
"&ccb_truk_degradation_specimen=" + URL.encodeComponent(collectionBotanique.getDegradationSpecimen()) + |
"&ccb_truk_degradation_presentation=" + URL.encodeComponent(collectionBotanique.getDegradationPresentation()) + |
"&ccb_ce_determination=" + URL.encodeComponent(collectionBotanique.getDetermination()) + |
"&ccb_truk_nature=" + URL.encodeComponent(collectionBotanique.getNature()) + |
"&ccb_specialite=" + URL.encodeComponent(collectionBotanique.getSpecialite()) + |
"&ccb_recolte_date_debut=" + URL.encodeComponent(collectionBotanique.getRecolteDateDebut()) + |
"&ccb_ce_recolte_date_debut_type=" + URL.encodeComponent(collectionBotanique.getRecolteDateDebutType()) + |
"&ccb_recolte_date_fin=" + URL.encodeComponent(collectionBotanique.getRecolteDateFin()) + |
"&ccb_ce_recolte_date_fin_type=" + URL.encodeComponent(collectionBotanique.getRecolteDateFinType()) + |
"&ccb_annotation_classement=" + URL.encodeComponent(collectionBotanique.getClassementAnnotation()) + |
"&ccb_ce_classement_etat=" + URL.encodeComponent(collectionBotanique.getClassementEtat()) + |
"&ccb_truk_etiquette_renseignement=" + URL.encodeComponent(collectionBotanique.getEtiquetteRenseignement()) + |
"&ccb_ce_precision_localite=" + URL.encodeComponent(collectionBotanique.getPrecisionLocalite()) + |
"&ccb_ce_precision_date=" + URL.encodeComponent(collectionBotanique.getPrecisionDate()) + |
"&ccb_annotation_diverse=" + URL.encodeComponent(collectionBotanique.getAnnotationsDiverses()) + |
"&ccb_ce_collection_integre=" + URL.encodeComponent(collectionBotanique.getCollectionIntegre()) + |
"&ccb_ce_collection_integre_info=" + URL.encodeComponent(collectionBotanique.getCollectionIntegreInfo()) + |
"&ccb_ce_inventaire=" + URL.encodeComponent(collectionBotanique.getInventaire()) + |
"&ccb_ce_inventaire_auteur=" + URL.encodeComponent(collectionBotanique.getInventaireAuteur()) + |
"&ccb_ce_inventaire_forme=" + URL.encodeComponent(collectionBotanique.getInventaireForme()) + |
"&ccb_inventaire_info=" + URL.encodeComponent(collectionBotanique.getInventaireInfo()) + |
"&ccb_ce_truk_inventaire_digital=" + URL.encodeComponent(collectionBotanique.getInventaireDigital()) + |
"&ccb_inventaire_digital_pourcent=" + URL.encodeComponent(collectionBotanique.getInventaireDigitalPourcent()) + |
"&ccb_ce_inventaire_etat=" + URL.encodeComponent(collectionBotanique.getInventaireEtat()) + |
"&ccb_inventaire_donnee_type=" + URL.encodeComponent(collectionBotanique.getInventaireDonneesTypes());*/ |
postDonnees += "&" + collectionBotanique.obtenirChainePOST(); |
} |
return postDonnees; |
/trunk/src/org/tela_botanica/client/Mediateur.java |
---|
52,6 → 52,7 |
import org.tela_botanica.client.util.UtilArray; |
import org.tela_botanica.client.vues.ContenuVue; |
import org.tela_botanica.client.vues.EnteteVue; |
import org.tela_botanica.client.vues.FenetreForm; |
import org.tela_botanica.client.vues.Formulaire; |
import org.tela_botanica.client.vues.FenetreJournal; |
import org.tela_botanica.client.vues.NavigationVue; |
516,12 → 517,17 |
// GESTION des PROJETS |
//+----------------------------------------------------------------------------------------------------------------+ |
public void afficherFormProjet(String projetId) { |
panneauCentre.removeAll(); |
ProjetForm projetForm = new ProjetForm(this, projetId); |
panneauCentre.add(projetForm); |
panneauCentre.layout(); |
public void afficherFormProjet(String projetId) { |
final FenetreForm fenetre = new FenetreForm(""); |
ProjetForm projetForm = new ProjetForm(this, projetId) { |
@Override |
public void surFermetureFormulaire() { |
fenetre.hide(); |
} |
}; |
projetForm.vueExterneARafraichirApresValidation = panneauCentre.getContenu(); |
fenetre.add(projetForm); |
fenetre.show(); |
} |
public void afficherListeProjets(ProjetListe projetsACharger) { |
700,10 → 706,17 |
mode = Formulaire.MODE_MODIFIER; |
} |
panneauCentre.removeAll(); |
final FenetreForm fenetre = new FenetreForm(""); |
Sequenceur sequenceur = new Sequenceur(); |
StructureForm structureForm = new StructureForm(this, mode, sequenceur); |
panneauCentre.add(structureForm); |
StructureForm structureForm = new StructureForm(this, mode, sequenceur) { |
@Override |
public void surFermetureFormulaire() { |
fenetre.hide(); |
} |
}; |
structureForm.vueExterneARafraichirApresValidation = panneauCentre.getContenu(); |
fenetre.add(structureForm); |
fenetre.show(); |
if (mode.equals(Formulaire.MODE_MODIFIER)) { |
selectionnerStructure(structureForm, structureId, sequenceur); |
950,11 → 963,16 |
} |
public void afficherFormCollection(String collectionId) { |
panneauCentre.removeAll(); |
CollectionForm collectionForm = new CollectionForm(this, collectionId); |
panneauCentre.add(collectionForm); |
panneauCentre.layout(); |
final FenetreForm fenetre = new FenetreForm(""); |
CollectionForm collectionForm = new CollectionForm(this, collectionId) { |
@Override |
public void surFermetureFormulaire() { |
fenetre.hide(); |
} |
}; |
collectionForm.vueExterneARafraichirApresValidation = panneauCentre.getContenu(); |
fenetre.add(collectionForm); |
fenetre.show(); |
} |
public void clicListeCollection(Collection collectionCliquee) { |
1269,12 → 1287,17 |
panneauCentre.getContenu().rafraichir(personnesACharger); |
} |
public void afficherFormPersonne(String personneId) { |
panneauCentre.removeAll(); |
PersonneForm personneForm = new PersonneForm(this, personneId); |
panneauCentre.add(personneForm); |
panneauCentre.layout(); |
public void afficherFormPersonne(String personneId) { |
final FenetreForm fenetre = new FenetreForm(""); |
PersonneForm personneForm = new PersonneForm(this, personneId) { |
@Override |
public void surFermetureFormulaire() { |
fenetre.hide(); |
} |
}; |
personneForm.vueExterneARafraichirApresValidation = panneauCentre.getContenu(); |
fenetre.add(personneForm); |
fenetre.show(); |
} |
public void clicListePersonne(Personne personne) { |
1448,11 → 1471,16 |
} |
public void afficherFormPublication(String publicationId) { |
panneauCentre.removeAll(); |
PublicationForm publicationForm = new PublicationForm(this, publicationId); |
panneauCentre.add(publicationForm); |
panneauCentre.layout(); |
final FenetreForm fenetre = new FenetreForm(""); |
PublicationForm publicationForm = new PublicationForm(this, publicationId) { |
@Override |
public void surFermetureFormulaire() { |
fenetre.hide(); |
} |
}; |
publicationForm.vueExterneARafraichirApresValidation = panneauCentre.getContenu(); |
fenetre.add(publicationForm); |
fenetre.show(); |
} |
public void clicListePublication(Publication publication) { |
1713,11 → 1741,16 |
} |
public void afficherFormCommentaire(String commentaireId) { |
panneauCentre.removeAll(); |
CommentaireForm commentaireForm = new CommentaireForm(this, commentaireId); |
panneauCentre.add(commentaireForm); |
panneauCentre.layout(); |
final FenetreForm fenetre = new FenetreForm(""); |
CommentaireForm commentaireForm = new CommentaireForm(this, commentaireId) { |
@Override |
public void surFermetureFormulaire() { |
fenetre.hide(); |
} |
}; |
commentaireForm.vueExterneARafraichirApresValidation = panneauCentre.getContenu(); |
fenetre.add(commentaireForm); |
fenetre.show(); |
} |
public void clicListeCommentaire(Commentaire commentaire) { |
/trunk/src/org/tela_botanica/client/vues/personne/PersonneListeVue.java |
---|
13,6 → 13,7 |
import org.tela_botanica.client.modeles.Utilisateur; |
import org.tela_botanica.client.modeles.personne.Personne; |
import org.tela_botanica.client.modeles.personne.PersonneListe; |
import org.tela_botanica.client.modeles.projet.Projet; |
import org.tela_botanica.client.util.Debug; |
import org.tela_botanica.client.vues.BarrePaginationVue; |
49,6 → 50,9 |
private Button modifier = null; |
private Button supprimer = null; |
private int indexElementSelectionne = 0; |
private Personne personneSelectionnee = null; |
public PersonneListeVue() { |
mediateur = Registry.get(RegistreId.MEDIATEUR); |
105,7 → 109,8 |
GridSelectionModel<Personne> gsmSelectionGrille = new GridSelectionModel<Personne>(); |
gsmSelectionGrille.addSelectionChangedListener(new SelectionChangedListener<Personne>() { |
public void selectionChanged(SelectionChangedEvent<Personne> event) { |
Personne personneSelectionnee = (Personne) event.getSelectedItem(); |
personneSelectionnee = (Personne) event.getSelectedItem(); |
indexElementSelectionne = store.indexOf(personneSelectionnee); |
clicListe(personneSelectionnee); |
} |
}); |
181,7 → 186,21 |
} |
} else if (nouvellesDonnees instanceof Information) { |
Information info = (Information) nouvellesDonnees; |
if (info.getType().equals("suppression_personne")) { |
if (info.getType().equals("maj_utilisateur")) { |
gererEtatActivationBouton(); |
} else if(info.getType().equals("personne_modifiee")) { |
if(personneSelectionnee != null) { |
store.remove(indexElementSelectionne); |
personneSelectionnee = null; |
} |
Personne personneModifiee = (Personne)info.getDonnee(0); |
// au cas ou le bouton appliquer aurait été cliqué avant de valider |
store.remove(personneModifiee); |
store.insert(personneModifiee, indexElementSelectionne); |
grille.repaint(); |
grille.getSelectionModel().select(indexElementSelectionne, true); |
clicListe(personneModifiee); |
} else if (info.getType().equals("suppression_personne")) { |
InfoLogger.display("Suppression de personne", info.getMessages().toString()); |
pagination.getlistePaginable().recharger(); |
gererEtatActivationBouton(); |
/trunk/src/org/tela_botanica/client/vues/personne/PersonneForm.java |
---|
893,9 → 893,7 |
} else if (info.getType().equals("modification_personne")) { |
InfoLogger.display("Enregistrement", "Les modifications apportées à la personne " + personneSelectionnee.getId() + " ont été correctement enregistrées."); |
repandreRafraichissement(); |
if (clicBoutonvalidation) { |
mediateur.clicMenu(menuIdCourant); |
} |
controlerFermeture(); |
} else if (info.getType().equals("maj_utilisateur")) { |
gererEtatActivationBouton(); |
} else if (info.getDonnee(0) instanceof PersonneListe) { |
/trunk/src/org/tela_botanica/client/vues/collection/CollectionFormPersonne.java |
---|
365,8 → 365,8 |
&& !cap.getId().equals("")) { |
personnesSupprimees.put("id"+idGenere++, cap); |
grille.getStore().remove(relationCollectionPersonne); |
} |
grille.getStore().remove(relationCollectionPersonne); |
} |
} |
/trunk/src/org/tela_botanica/client/vues/collection/CollectionVue.java |
---|
3,6 → 3,7 |
import org.tela_botanica.client.Mediateur; |
import org.tela_botanica.client.interfaces.Rafraichissable; |
import org.tela_botanica.client.modeles.Information; |
import org.tela_botanica.client.modeles.MenuApplicationId; |
import org.tela_botanica.client.modeles.collection.Collection; |
import org.tela_botanica.client.modeles.collection.CollectionListe; |
import org.tela_botanica.client.synchronisation.Sequenceur; |
13,6 → 14,7 |
import com.extjs.gxt.ui.client.widget.LayoutContainer; |
import com.extjs.gxt.ui.client.widget.layout.BorderLayout; |
import com.extjs.gxt.ui.client.widget.layout.BorderLayoutData; |
import com.google.gwt.user.client.Window; |
public class CollectionVue extends LayoutContainer implements Rafraichissable { |
53,6 → 55,10 |
detailCollectionPanneau.rafraichir(nouvellesDonnees); |
} else if (info.getType().equals("suppression_collection")) { |
listeCollectionPanneau.rafraichir(nouvellesDonnees); |
} else if (info.getType().equals("modif_collection")) { |
listeCollectionPanneau.rafraichir(nouvellesDonnees); |
} else if(info.getType().equals("collection_ajoutee")) { |
mediateur.clicMenu(MenuApplicationId.COLLECTION); |
} |
} else { |
Debug.log(Mediateur.i18nM.erreurRafraichir(nouvellesDonnees.getClass(), this.getClass())); |
/trunk/src/org/tela_botanica/client/vues/collection/CollectionListeVue.java |
---|
14,6 → 14,7 |
import org.tela_botanica.client.modeles.Utilisateur; |
import org.tela_botanica.client.modeles.collection.Collection; |
import org.tela_botanica.client.modeles.collection.CollectionListe; |
import org.tela_botanica.client.modeles.personne.Personne; |
import org.tela_botanica.client.modeles.publication.Publication; |
import org.tela_botanica.client.modeles.structure.StructureListe; |
import org.tela_botanica.client.util.Debug; |
30,7 → 31,6 |
import com.extjs.gxt.ui.client.event.SelectionListener; |
import com.extjs.gxt.ui.client.store.ListStore; |
import com.extjs.gxt.ui.client.widget.ContentPanel; |
import com.extjs.gxt.ui.client.widget.Info; |
import com.extjs.gxt.ui.client.widget.button.Button; |
import com.extjs.gxt.ui.client.widget.grid.ColumnConfig; |
import com.extjs.gxt.ui.client.widget.grid.ColumnModel; |
38,7 → 38,6 |
import com.extjs.gxt.ui.client.widget.grid.GridSelectionModel; |
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; |
public class CollectionListeVue extends ContentPanel implements Rafraichissable { |
53,6 → 52,9 |
private Button ajouter; |
private BarrePaginationVue pagination = null; |
private int indexElementSelectionne = 0; |
private Collection collectionSelectionnee = null; |
public CollectionListeVue(Mediateur mediateurCourant) { |
mediateur = mediateurCourant; |
i18nC = Mediateur.i18nC; |
100,7 → 102,8 |
GridSelectionModel<Collection> modeleDeSelection = new GridSelectionModel<Collection>(); |
modeleDeSelection.addSelectionChangedListener(new SelectionChangedListener<Collection>() { |
public void selectionChanged(SelectionChangedEvent<Collection> event) { |
Collection collectionSelectionnee = (Collection) event.getSelectedItem(); |
collectionSelectionnee = (Collection) event.getSelectedItem(); |
indexElementSelectionne = store.indexOf(collectionSelectionnee); |
clicListe(collectionSelectionnee); |
} |
}); |
177,6 → 180,18 |
Information info = (Information) nouvellesDonnees; |
if (info.getType().equals("maj_utilisateur")) { |
gererEtatActivationBouton(); |
} else if (info.getType().equals("modif_collection")) { |
if(collectionSelectionnee != null) { |
store.remove(indexElementSelectionne); |
collectionSelectionnee = null; |
} |
Collection collecModifiee = (Collection)info.getDonnee(0); |
// au cas ou le bouton appliquer aurait été cliqué avant de valider |
store.remove(collecModifiee); |
store.insert(collecModifiee, indexElementSelectionne); |
grille.repaint(); |
grille.getSelectionModel().select(indexElementSelectionne, true); |
clicListe(collecModifiee); |
} else if (info.getType().equals("suppression_collection")) { |
// Affichage d'un message d'information |
InfoLogger.display(i18nC.suppressionCollection(), info.toString().replaceAll("\n", "<br />")); |
/trunk/src/org/tela_botanica/client/vues/collection/CollectionFormGeneral.java |
---|
366,7 → 366,8 |
public void collecter() { |
initialiserCollection(); |
if (etreAccede()) { |
// l'onglet collection est obligatoirement rempli lors d'un ajout |
if (this.mode == Formulaire.MODE_AJOUTER || etreAccede()) { |
collectionCollectee.setId(idCollectionChp.getValue()); |
collectionCollectee.setIdProjet(getValeurComboProjets()); |
collectionCollectee.setIdStructure(getValeurComboStructures()); |
/trunk/src/org/tela_botanica/client/vues/collection/CollectionForm.java |
---|
21,7 → 21,6 |
import com.extjs.gxt.ui.client.event.BaseEvent; |
import com.extjs.gxt.ui.client.event.Events; |
import com.extjs.gxt.ui.client.event.Listener; |
import com.extjs.gxt.ui.client.widget.Info; |
import com.extjs.gxt.ui.client.widget.MessageBox; |
import com.extjs.gxt.ui.client.widget.TabItem; |
import com.extjs.gxt.ui.client.widget.TabPanel; |
29,7 → 28,7 |
import com.extjs.gxt.ui.client.widget.form.TextField; |
import com.extjs.gxt.ui.client.widget.form.FormPanel.LabelAlign; |
import com.extjs.gxt.ui.client.widget.layout.FormData; |
import com.google.gwt.core.client.GWT; |
import com.google.gwt.user.client.Window; |
public class CollectionForm extends Formulaire implements Rafraichissable { |
262,6 → 261,7 |
if (infoType.equals("modif_collection")) { |
InfoLogger.display("Modification d'une collection", info.toString()); |
repandreRafraichissement(); |
} else if (infoType.equals("selection_collection")) { |
InfoLogger.display("Modification d'une collection", info.toString()); |
if (info.getDonnee(0) != null) { |
315,7 → 315,7 |
if (formulaireValide) { |
// Collecte des données du formulaire |
Collection collectionAEnregistrer = collecterCollection(); |
//Window.alert(collectionAEnregistrer.getDescription()); |
if (mode.equals(MODE_AJOUTER)) { |
mediateur.ajouterCollection(this, collectionAEnregistrer); |
} else if (mode.equals(MODE_MODIFIER)) { |
408,4 → 408,16 |
messages.addAll(personneOnglet.verifier()); |
return messages; |
} |
private void repandreRafraichissement() { |
if (vueExterneARafraichirApresValidation != null) { |
String type = "modif_collection"; |
if (mode.equals(Formulaire.MODE_AJOUTER)) { |
type = "ajout_collection"; |
} |
Information info = new Information(type); |
info.setDonnee(0, collection); |
vueExterneARafraichirApresValidation.rafraichir(info); |
} |
} |
} |
/trunk/src/org/tela_botanica/client/vues/structure/StructureVue.java |
---|
3,6 → 3,7 |
import org.tela_botanica.client.Mediateur; |
import org.tela_botanica.client.interfaces.Rafraichissable; |
import org.tela_botanica.client.modeles.Information; |
import org.tela_botanica.client.modeles.MenuApplicationId; |
import org.tela_botanica.client.modeles.structure.Structure; |
import org.tela_botanica.client.modeles.structure.StructureListe; |
import org.tela_botanica.client.synchronisation.Sequenceur; |
13,6 → 14,7 |
import com.extjs.gxt.ui.client.widget.layout.BorderLayout; |
import com.extjs.gxt.ui.client.widget.layout.BorderLayoutData; |
import com.google.gwt.core.client.GWT; |
import com.google.gwt.user.client.Window; |
public class StructureVue extends LayoutContainer implements Rafraichissable { |
49,6 → 51,13 |
Information info = (Information) nouvellesDonnees; |
if (info.getType().equals("liste_structure_a_personne")) { |
panneauInstitutionDetail.rafraichir(nouvellesDonnees); |
} else { |
if(info.getType().equals("structure_ajoutee")) { |
mediateur.clicMenu(MenuApplicationId.STRUCTURE); |
} else { |
panneauInstitutionListe.rafraichir(nouvellesDonnees); |
} |
} |
} else { |
GWT.log(Mediateur.i18nM.erreurRafraichir(nouvellesDonnees.getClass(), this.getClass()), null); |
/trunk/src/org/tela_botanica/client/vues/structure/StructureListeVue.java |
---|
11,6 → 11,8 |
import org.tela_botanica.client.interfaces.Rafraichissable; |
import org.tela_botanica.client.modeles.Information; |
import org.tela_botanica.client.modeles.Utilisateur; |
import org.tela_botanica.client.modeles.personne.Personne; |
import org.tela_botanica.client.modeles.publication.Publication; |
import org.tela_botanica.client.modeles.structure.Structure; |
import org.tela_botanica.client.modeles.structure.StructureListe; |
import org.tela_botanica.client.vues.BarrePaginationVue; |
50,6 → 52,9 |
private Button ajouter; |
private BarrePaginationVue pagination = null; |
private int indexElementSelectionne = 0; |
private Structure structureSelectionnee = null; |
public StructureListeVue(Mediateur mediateurCourant) { |
mediateur = mediateurCourant; |
96,7 → 101,8 |
GridSelectionModel<Structure> modeleDeSelection = new GridSelectionModel<Structure>(); |
modeleDeSelection.addSelectionChangedListener(new SelectionChangedListener<Structure>() { |
public void selectionChanged(SelectionChangedEvent<Structure> event) { |
Structure structureSelectionnee = (Structure) event.getSelectedItem(); |
structureSelectionnee = (Structure) event.getSelectedItem(); |
indexElementSelectionne = store.indexOf(structureSelectionnee); |
clicListe(structureSelectionnee); |
} |
}); |
185,6 → 191,18 |
} |
gererEtatActivationBouton(); |
} else if(info.getType().equals("structure_modifiee")) { |
if(structureSelectionnee != null) { |
store.remove(indexElementSelectionne); |
structureSelectionnee = null; |
} |
Structure structureModifiee = (Structure)info.getDonnee(0); |
// au cas ou le bouton appliquer aurait été cliqué avant de valider |
store.remove(structureModifiee); |
store.insert(structureModifiee, indexElementSelectionne); |
grille.repaint(); |
grille.getSelectionModel().select(indexElementSelectionne, true); |
clicListe(structureModifiee); |
} else if (info.getType().equals("maj_utilisateur")) { |
gererEtatActivationBouton(); |
} else if (info.getType().equals("suppression_structure_a_personne")) { |
/trunk/src/org/tela_botanica/client/vues/structure/StructureForm.java |
---|
237,6 → 237,10 |
private Sequenceur sequenceur; |
private Structure structure = null; |
public Rafraichissable vueExterneARafraichirApresValidation = null; |
public StructureForm(Mediateur mediateurCourrant, String modeDeCreation, Sequenceur sequenceur) { |
initialiserFormulaire(mediateurCourrant, modeDeCreation, MenuApplicationId.STRUCTURE); |
this.sequenceur = sequenceur; |
281,17 → 285,55 |
} |
} |
private void repandreRafraichissement() { |
if (vueExterneARafraichirApresValidation != null) { |
String type = "structure_modifiee"; |
if (mode.equals(Formulaire.MODE_AJOUTER)) { |
type = "structure_ajoutee"; |
} |
Information info = new Information(type); |
info.setDonnee(0, structure); |
vueExterneARafraichirApresValidation.rafraichir(info); |
} |
} |
public boolean soumettreFormulaire() { |
// Vérification de la validité des champs du formulaire |
boolean fomulaireValide = verifierFormulaire(); |
Structure identification = collecterStructureIdentification(); |
structure = this.identification; |
if(identification != null) { |
structure = identification; |
} else { |
identification = this.identification; |
} |
structure.setConservation(this.conservation); |
structure.setValorisation(this.valorisation); |
if (fomulaireValide) { |
// Collecte des données du formulaire |
Structure structure = collecterStructureIdentification(); |
StructureConservation conservation = collecterStructureConservation(); |
StructureValorisation valorisation = collecterStructureValorisation(); |
if(conservation != null) { |
structure.setConservation(conservation); |
} |
if(valorisation != null) { |
structure.setValorisation(valorisation); |
} |
collecterStructurePersonnel(); |
structure.setPersonnel(personnel); |
structure.setConservation(conservation); |
structure.setValorisation(valorisation); |
if (mode.equals(MODE_AJOUTER)) { |
// Ajout des informations sur la Structure |
mediateur.ajouterStructure(this, structure, conservation, valorisation); |
742,6 → 784,8 |
structureARetourner = identification = structureCollectee; |
} |
} else { |
} |
return structureARetourner; |
} |
2033,6 → 2077,7 |
if (nouvellesDonnees instanceof Information) { |
Information info = (Information) nouvellesDonnees; |
rafraichirInformation(info); |
repandreRafraichissement(); |
} else if (nouvellesDonnees instanceof ValeurListe) { |
ValeurListe listeValeurs = (ValeurListe) nouvellesDonnees; |
rafraichirValeurListe(listeValeurs); |
2053,6 → 2098,7 |
if (info.getType().equals("modif_structure")) { |
InfoLogger.display("Modification d'une institution", info.toString()); |
controlerFermeture(); |
} else if (info.getType().equals("ajout_structure")) { |
if (info.getDonnee(0) != null && info.getDonnee(0) instanceof String) { |
String structureId = (String) info.getDonnee(0); |
/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); |
/trunk/src/org/tela_botanica/client/vues/commentaire/CommentaireListeVue.java |
---|
17,6 → 17,7 |
import org.tela_botanica.client.modeles.Valeur; |
import org.tela_botanica.client.modeles.ValeurListe; |
import org.tela_botanica.client.modeles.aDonnee; |
import org.tela_botanica.client.modeles.collection.Collection; |
import org.tela_botanica.client.modeles.commentaire.Commentaire; |
import org.tela_botanica.client.modeles.commentaire.CommentaireListe; |
import org.tela_botanica.client.modeles.structure.StructureListe; |
51,6 → 52,7 |
import com.extjs.gxt.ui.client.widget.menu.Menu; |
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 CommentaireListeVue extends ContentPanel implements Rafraichissable { |
73,6 → 75,9 |
protected HashMap<String, Valeur> ontologie = null; |
protected boolean ontologieChargementOk = false; |
private int indexElementSelectionne = 0; |
private Commentaire commentaireSelectionne = null; |
public CommentaireListeVue(Mediateur mediateurCourant) { |
mediateur = mediateurCourant; |
i18nC = Mediateur.i18nC; |
127,8 → 132,9 |
GridSelectionModel<Commentaire> modeleDeSelection = new GridSelectionModel<Commentaire>(); |
modeleDeSelection.addSelectionChangedListener(new SelectionChangedListener<Commentaire>() { |
public void selectionChanged(SelectionChangedEvent<Commentaire> event) { |
Commentaire commentaire = (Commentaire) event.getSelectedItem(); |
clicListe(commentaire); |
commentaireSelectionne = (Commentaire) event.getSelectedItem(); |
indexElementSelectionne = store.indexOf(commentaireSelectionne); |
clicListe(commentaireSelectionne); |
} |
}); |
278,6 → 284,15 |
InfoLogger.display(i18nC.commentaireTitreSuppression(), message); |
supprimerCommentairesSelectionnees(); |
gererEtatActivationBouton(); |
} else if (info.getType().equals("commentaire_modifiee")) { |
// GXT c'est pourri et la grille ne prend en compte les modifications |
// du store, donc en attendant, on recharge tout, comme pour la suppression |
/*Commentaire commModifie = (Commentaire)info.getDonnee(0); |
store.remove(indexElementSelectionne); |
store.insert(commModifie, indexElementSelectionne); |
grille.reconfigure(store, modeleDesColonnes); |
grille.repaint();*/ |
mediateur.clicMenu(MenuApplicationId.COMMENTAIRE); |
} |
} else { |
GWT.log(Mediateur.i18nM.erreurRafraichir(nouvellesDonnees.getClass(), this.getClass()), null); |
/trunk/src/org/tela_botanica/client/vues/commentaire/CommentaireForm.java |
---|
30,6 → 30,7 |
import com.extjs.gxt.ui.client.widget.form.Validator; |
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 CommentaireForm extends Formulaire implements Rafraichissable { |
/trunk/src/org/tela_botanica/client/vues/commentaire/CommentaireVue.java |
---|
12,6 → 12,7 |
import com.extjs.gxt.ui.client.widget.layout.BorderLayout; |
import com.extjs.gxt.ui.client.widget.layout.BorderLayoutData; |
import com.google.gwt.core.client.GWT; |
import com.google.gwt.user.client.Window; |
public class CommentaireVue extends LayoutContainer implements Rafraichissable { |
/trunk/src/org/tela_botanica/client/vues/accueil/AccueilVue.java |
---|
13,11 → 13,9 |
import org.tela_botanica.client.modeles.Information; |
import org.tela_botanica.client.util.Debug; |
import com.extjs.gxt.ui.client.GXT; |
import com.extjs.gxt.ui.client.event.ButtonEvent; |
import com.extjs.gxt.ui.client.event.SelectionListener; |
import com.extjs.gxt.ui.client.widget.ContentPanel; |
import com.extjs.gxt.ui.client.widget.Info; |
import com.extjs.gxt.ui.client.widget.LayoutContainer; |
import com.extjs.gxt.ui.client.widget.button.Button; |
import com.extjs.gxt.ui.client.widget.custom.Portal; |
74,9 → 72,7 |
portail = creerPortail(); |
panneauPrincipal.add(portail); |
chargerParametres(); |
add(panneauPrincipal); |
mediateur.desactiverChargement(this); |
} |
101,7 → 97,6 |
private void chargerParametres() { |
viderPortail(); |
Document paramXml = XMLParser.parse(mediateur.getUtilisateur().getParametre()); |
NodeList listeAccueilNoeud = paramXml.getElementsByTagName("accueil"); |
int nbreAccueilNoeud = listeAccueilNoeud.getLength(); |
109,37 → 104,41 |
// Récupération du noeud accueil |
Node accueilNoeud = null; |
if (nbreAccueilNoeud == 0) { |
ajouterPortlet(); |
ajouterPortletsDefaut(); |
} else if (nbreAccueilNoeud == 1) { |
accueilNoeud = listeAccueilNoeud.item(0); |
// Lecture des noeuds "applette" |
NodeList listeAppletteNoeud = accueilNoeud.getChildNodes(); |
int nbreAppletteNoeud = listeAppletteNoeud.getLength(); |
TreeMap<String, HashMap<String, String>> tableApplettes = new TreeMap<String, HashMap<String, String>>(); |
for (int i = 0; i < nbreAppletteNoeud ; i++) { |
Element appletteNoeud = (Element) listeAppletteNoeud.item(i); |
int colonne = Integer.parseInt(appletteNoeud.getAttribute("colonne")); |
int index = Integer.parseInt(appletteNoeud.getAttribute("index")); |
HashMap<String, String> infoApplette = new HashMap<String, String>(); |
infoApplette.put("reduite", appletteNoeud.getAttribute("reduite")); |
infoApplette.put("epingle", appletteNoeud.getAttribute("epingle")); |
infoApplette.put("type", appletteNoeud.getAttribute("type")); |
infoApplette.put("colonne", appletteNoeud.getAttribute("colonne")); |
infoApplette.put("index", appletteNoeud.getAttribute("index")); |
infoApplette.put("contenu", appletteNoeud.getAttribute("contenu")); |
tableApplettes.put(colonne+"-"+index, infoApplette); |
// un noeud de type vide indique que l'utilisateur a explicité effacé les applettes de la page d'accueil |
if(listeAppletteNoeud.getLength() > 0 && !listeAppletteNoeud.item(0).getNodeName().equals("vide")) { |
// Lecture des noeuds "applette" |
int nbreAppletteNoeud = listeAppletteNoeud.getLength(); |
TreeMap<String, HashMap<String, String>> tableApplettes = new TreeMap<String, HashMap<String, String>>(); |
for (int i = 0; i < nbreAppletteNoeud ; i++) { |
Element appletteNoeud = (Element) listeAppletteNoeud.item(i); |
int colonne = Integer.parseInt(appletteNoeud.getAttribute("colonne")); |
int index = Integer.parseInt(appletteNoeud.getAttribute("index")); |
HashMap<String, String> infoApplette = new HashMap<String, String>(); |
infoApplette.put("reduite", appletteNoeud.getAttribute("reduite")); |
infoApplette.put("epingle", appletteNoeud.getAttribute("epingle")); |
infoApplette.put("type", appletteNoeud.getAttribute("type")); |
infoApplette.put("colonne", appletteNoeud.getAttribute("colonne")); |
infoApplette.put("index", appletteNoeud.getAttribute("index")); |
infoApplette.put("contenu", appletteNoeud.getAttribute("contenu")); |
tableApplettes.put(colonne+"-"+index, infoApplette); |
} |
Iterator<String> it = tableApplettes.keySet().iterator(); |
while (it.hasNext()) { |
String id = it.next(); |
HashMap<String, String> infoApplette = tableApplettes.get(id); |
boolean reduite = (infoApplette.get("reduite") != null && infoApplette.get("reduite").equals("true")) ? true : false; |
boolean epingle = (infoApplette.get("epingle") != null && infoApplette.get("epingle").equals("true")) ? true : false; |
int index = Integer.parseInt(infoApplette.get("index")); |
int colonne = Integer.parseInt(infoApplette.get("colonne")); |
ajouterPortlet(reduite, epingle, infoApplette.get("type"), colonne, index, infoApplette.get("contenu")); |
} |
} else if(listeAppletteNoeud.getLength() == 0) { |
ajouterPortletsDefaut(); |
} |
Iterator<String> it = tableApplettes.keySet().iterator(); |
while (it.hasNext()) { |
String id = it.next(); |
HashMap<String, String> infoApplette = tableApplettes.get(id); |
boolean reduite = (infoApplette.get("reduite") != null && infoApplette.get("reduite").equals("true")) ? true : false; |
boolean epingle = (infoApplette.get("epingle") != null && infoApplette.get("epingle").equals("true")) ? true : false; |
int index = Integer.parseInt(infoApplette.get("index")); |
int colonne = Integer.parseInt(infoApplette.get("colonne")); |
ajouterPortlet(reduite, epingle, infoApplette.get("type"), colonne, index, infoApplette.get("contenu")); |
} |
} |
layout(); |
} |
172,24 → 171,31 |
accueilNoeud = paramXml.getElementsByTagName("accueil").item(0); |
} |
// Ajout des noeuds "applette" au noeud "accueil" |
while (it.hasNext()) { |
Portlet applette = it.next(); |
String reduite = (applette.isCollapsed() ? "true" : "false"); |
String epingle = (applette.isPinned() ? "true" : "false"); |
String index = Integer.toString(portail.getPortletIndex(applette)); |
String colonne = Integer.toString(portail.getPortletColumn(applette)); |
String contenu = applette.getData("contenu"); |
Element appletteElement = paramXml.createElement("applette"); |
appletteElement.setAttribute("reduite", reduite); |
appletteElement.setAttribute("epingle", epingle); |
appletteElement.setAttribute("type", "statistique"); |
appletteElement.setAttribute("colonne", colonne); |
appletteElement.setAttribute("index", index); |
appletteElement.setAttribute("contenu", contenu); |
accueilNoeud.appendChild(appletteElement); |
// si il existe des applettes ouvertes |
if(it.hasNext()) { |
// Ajout des noeuds "applette" au noeud "accueil" |
while (it.hasNext()) { |
Portlet applette = it.next(); |
String reduite = (applette.isCollapsed() ? "true" : "false"); |
String epingle = (applette.isPinned() ? "true" : "false"); |
String index = Integer.toString(portail.getPortletIndex(applette)); |
String colonne = Integer.toString(portail.getPortletColumn(applette)); |
String contenu = applette.getData("contenu"); |
Element appletteElement = paramXml.createElement("applette"); |
appletteElement.setAttribute("reduite", reduite); |
appletteElement.setAttribute("epingle", epingle); |
appletteElement.setAttribute("type", "statistique"); |
appletteElement.setAttribute("colonne", colonne); |
appletteElement.setAttribute("index", index); |
appletteElement.setAttribute("contenu", contenu); |
accueilNoeud.appendChild(appletteElement); |
} |
} else { |
// sinon ajout d'un noeud vide |
Element videElement = paramXml.createElement("vide"); |
accueilNoeud.appendChild(videElement); |
} |
enregistrementEnCours = true; |
227,6 → 233,24 |
layout(); |
} |
private void ajouterPortletsDefaut() { |
//TODO créer une énum des différents types de portlet puis faire une boucle |
// dessus |
Applette applette = new AppletteStatistique(mediateur, "NombreDonnees"); |
portail.insert(applette, 0, 0); |
applette.setEpingler(true); |
applette = new AppletteStatistique(mediateur, "MesDonnees"); |
portail.insert(applette, 0, 1); |
applette = new AppletteStatistique(mediateur, "TypeDepot"); |
portail.insert(applette, 0, 2); |
applette = new AppletteStatistique(mediateur, "NombreCollectionParStructure"); |
portail.insert(applette, 1, 0); |
layout(); |
} |
public void rafraichir(Object nouvellesDonnees) { |
if (nouvellesDonnees instanceof Information) { |
Information info = (Information) nouvellesDonnees; |
/trunk/src/org/tela_botanica/client/vues/publication/PublicationListeVue.java |
---|
30,7 → 30,6 |
import com.extjs.gxt.ui.client.event.SelectionListener; |
import com.extjs.gxt.ui.client.store.ListStore; |
import com.extjs.gxt.ui.client.widget.ContentPanel; |
import com.extjs.gxt.ui.client.widget.Info; |
import com.extjs.gxt.ui.client.widget.button.Button; |
import com.extjs.gxt.ui.client.widget.grid.ColumnConfig; |
import com.extjs.gxt.ui.client.widget.grid.ColumnData; |
41,7 → 40,6 |
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 PublicationListeVue extends ContentPanel implements Rafraichissable { |
58,6 → 56,9 |
private BarrePaginationVue pagination = null; |
private int indexElementSelectionne = 0; |
private Publication publicationSelectionnee = null; |
public PublicationListeVue(Mediateur mediateurCourant) { |
mediateur = mediateurCourant; |
i18nC = Mediateur.i18nC; |
111,8 → 112,9 |
GridSelectionModel<Publication> modeleDeSelection = new GridSelectionModel<Publication>(); |
modeleDeSelection.addSelectionChangedListener(new SelectionChangedListener<Publication>() { |
public void selectionChanged(SelectionChangedEvent<Publication> event) { |
Publication publication = (Publication) event.getSelectedItem(); |
clicListe(publication); |
publicationSelectionnee = (Publication) event.getSelectedItem(); |
indexElementSelectionne = store.indexOf(publicationSelectionnee); |
clicListe(publicationSelectionnee); |
} |
}); |
206,6 → 208,19 |
Information info = (Information) nouvellesDonnees; |
if (info.getType().equals("maj_utilisateur")) { |
gererEtatActivationBouton(); |
} else if (info.getType().equals("publication_modifiee")) { |
if(publicationSelectionnee != null) { |
store.remove(indexElementSelectionne); |
publicationSelectionnee = null; |
} |
Publication publiModifee = (Publication)info.getDonnee(0); |
// au cas ou le bouton appliquer aurait été cliqué avant de valider |
store.remove(publiModifee); |
store.insert(publiModifee, indexElementSelectionne); |
grille.repaint(); |
grille.getSelectionModel().select(indexElementSelectionne, true); |
clicListe(publiModifee); |
} else if (info.getType().equals("suppression_publication")) { |
InfoLogger.display(i18nC.publicationTitreSuppression(), info.getMessages().toString()); |
supprimerPublicationsSelectionnees(); |
/trunk/src/org/tela_botanica/client/vues/publication/PublicationForm.java |
---|
530,7 → 530,13 |
} |
private void supprimerDansGrille() { |
ModelData donneeSelectionnee = grilleAuteurs.getSelectionModel().getSelectedItem(); |
List<ModelData> listeDonneesSelectionnees = grilleAuteurs.getSelectionModel().getSelectedItems(); |
for (ModelData donneeSelectionnee : listeDonneesSelectionnees) { |
supprimerAuteurDansGrille(donneeSelectionnee); |
} |
} |
private void supprimerAuteurDansGrille(ModelData donneeSelectionnee) { |
PublicationAPersonne personneSelectionnee = new PublicationAPersonne(donneeSelectionnee, aDonnee.GARDER_PREFIXE); |
Log.debug("Début supprimer auteur dans grille : "+personneSelectionnee.toString()); |
if (personneSelectionnee.getId() == null) { |
1229,5 → 1235,4 |
vueExterneARafraichirApresValidation.rafraichir(info); |
} |
} |
} |
/trunk/src/org/tela_botanica/client/vues/Formulaire.java |
---|
127,7 → 127,7 |
InfoLogger.display(i18nC.modeAnonyme(), i18nC.identificationNecessaire()); |
} |
} else if (code.equals(FormulaireBarreValidation.CODE_BOUTON_ANNULER)) { |
mediateur.clicMenu(menuIdCourant); |
fermerFormulaire(); |
} else if (code.equals(FormulaireBarreValidation.CODE_BOUTON_REINITIALISER)) { |
reinitialiserFormulaire(); |
} |
160,9 → 160,14 |
public void fermerFormulaire() { |
clicBoutonvalidation = false; |
panneauFormulaire.setEnabled(false); |
mediateur.clicMenu(menuIdCourant); |
surFermetureFormulaire(); |
//mediateur.clicMenu(menuIdCourant); |
} |
public void surFermetureFormulaire() { |
// A surcharger si jamais une action spécifique doit être entreprise |
} |
/** Méthode simplifiant la création de FormLayout. |
* Chacun des paramètres peut prendre la valeur null pour utiliser la valeur par défaut. |
* |