/trunk/src/org/tela_botanica/client/Mediateur.java |
---|
938,8 → 938,28 |
panneauCentre.getContenu().rafraichir(projet); |
} |
public void clicSupprimerProjet(List<Projet> selectedItems) { |
// TODO Auto-generated method stub |
public void clicSupprimerProjet(final List<Projet> projetListe) { |
if (projetListe.size() <= 0) { |
MessageBox.alert("Attention", "Vous devez sélectionner un projet", null); |
} else { |
String message = "Voulez-vous vraiment supprimer ces projets ?"; |
if (projetListe.size() == 1) { |
message = "Voulez-vous vraiment supprimer ce projet ?"; |
} |
final Listener<MessageBoxEvent> listenerSuppression = new Listener<MessageBoxEvent>() { |
public void handleEvent(MessageBoxEvent ce) { |
Dialog dialog = (Dialog) ce.getComponent(); |
Button btn = ce.getButtonClicked(); |
if (btn.getText().equals(dialog.yesText)) { |
modele.supprimerProjet(panneauCentre.getContenu(), projetListe); |
} |
} |
}; |
MessageBox.confirm("Supprimer un projet", message, listenerSuppression); |
} |
} |
/trunk/src/org/tela_botanica/client/vues/ProjetForm.java |
---|
291,7 → 291,9 |
} |
if(mode.equals(MODE_MODIFIER)) { |
indexationDureeChp.setRawValue(valeurListeIndexationDuree.get(projet.getIndexationDuree()).getNom()); |
if(valeurListeIndexationDuree.get(projet.getIndexationDuree()) != null) { |
indexationDureeChp.setRawValue(valeurListeIndexationDuree.get(projet.getIndexationDuree()).getNom()); |
} |
} |
indexationDureeChp.expand(); |
308,7 → 310,9 |
} |
if(mode.equals(MODE_MODIFIER)) { |
indexationFrequenceChp.setRawValue(valeurListeIndexationFrequence.get(projet.getIndexationFreq()).getNom()); |
if(valeurListeIndexationFrequence.get(projet.getIndexationFreq()) != null) { |
indexationFrequenceChp.setRawValue(valeurListeIndexationFrequence.get(projet.getIndexationFreq()).getNom()); |
} |
} |
indexationFrequenceChp.expand(); |
324,8 → 328,9 |
} |
if(mode.equals(MODE_MODIFIER)) { |
langueChp.setRawValue(valeurListeLangue.get(projet.getLangue()).getNom()); |
GWT.log(valeurListeLangue.get(projet.getLangue()).getNom(),null); |
if(valeurListeLangue.get(projet.getLangue()) != null) { |
langueChp.setRawValue(valeurListeLangue.get(projet.getLangue()).getNom()); |
} |
} |
} |
453,9 → 458,11 |
} |
String[] heureTab = projet.getIndexationHeure().split(":"); |
String heure = heureTab[0]+":"+heureTab[1]; |
if(heure.matches(Pattern.heureMinute)) { |
indexationHeureChp.setValue(heure); |
if(heureTab.length > 1) { |
String heure = heureTab[0]+":"+heureTab[1]; |
if(heure.matches(Pattern.heureMinute)) { |
indexationHeureChp.setValue(heure); |
} |
} |
doLayout(true); |
/trunk/src/org/tela_botanica/client/Modele.java |
---|
329,4 → 329,19 |
publicationAPersonneDao.supprimer(publicationsAPersonneId); |
} |
public void supprimerProjet(Rafraichissable vueARafraichir, |
List<Projet> projetListe) { |
String projetsId = ""; |
for(Iterator<Projet> it = projetListe.iterator(); it.hasNext();) { |
Projet proj = it.next(); |
projetsId += proj.getId(); |
if(it.hasNext()) { |
projetsId += ","; |
} |
} |
ProjetAsyncDao pADAO = new ProjetAsyncDao(vueARafraichir); |
pADAO.supprimer(projetsId); |
} |
} |