Changeset 10715 for extensions/jiwigo/trunk/src
- Timestamp:
- May 1, 2011, 12:21:14 PM (14 years ago)
- Location:
- extensions/jiwigo/trunk/src/main
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/jiwigo/trunk/src/main/java/fr/mael/jiwigo/ui/mainframe/CategoriesTree.java
r10697 r10715 72 72 * the menu to add a category 73 73 */ 74 private JMenuItem menuA jouter;74 private JMenuItem menuAdd; 75 75 /** 76 76 * the menu to refresh the categories 77 77 */ 78 private JMenuItem menu Actualiser;78 private JMenuItem menuRefresh; 79 79 /** 80 80 * the root of the tree which is not displayed … … 85 85 */ 86 86 private Category selectedCategory; 87 /** 88 * the menu to add a category 89 */ 90 private JMenuItem menuDelete; 87 91 88 92 /** … … 197 201 if (e.getButton() == 3) { 198 202 JPopupMenu popup = new JPopupMenu(); 199 menuAjouter = new JMenuItem(Messages.getMessage("categories_add")); 200 menuAjouter.addActionListener(this); 201 popup.add(menuAjouter); 202 menuActualiser = new JMenuItem(Messages.getMessage("categories_update")); 203 menuActualiser.addActionListener(this); 204 popup.add(menuActualiser); 203 menuAdd = new JMenuItem(Messages.getMessage("categories_add")); 204 menuAdd.addActionListener(this); 205 popup.add(menuAdd); 206 menuRefresh = new JMenuItem(Messages.getMessage("categories_update")); 207 menuRefresh.addActionListener(this); 208 popup.add(menuRefresh); 209 menuDelete = new JMenuItem(Messages.getMessage("categories_delete")); 210 menuDelete.addActionListener(this); 211 popup.add(menuDelete); 205 212 popup.show(tree, e.getX(), e.getY()); 206 213 if (selRow != -1) { … … 222 229 @Override 223 230 public void actionPerformed(ActionEvent arg0) { 224 if (arg0.getSource().equals(menuA jouter)) {231 if (arg0.getSource().equals(menuAdd)) { 225 232 String nomcategorie = JOptionPane.showInputDialog(null, Messages.getMessage("categories_enterName"), 226 233 Messages.getMessage("categories_add"), JOptionPane.INFORMATION_MESSAGE); … … 263 270 } 264 271 } 265 } else if (arg0.getSource().equals(menu Actualiser)) {272 } else if (arg0.getSource().equals(menuRefresh)) { 266 273 setUpUi(); 274 } else if (arg0.getSource().equals(menuDelete)) { 275 try { 276 if (SpringUtils.getCategoryService().delete(selectedCategory)) { 277 setUpUi(); 278 } else { 279 JOptionPane.showMessageDialog(null, Messages.getMessage("deletingCategoryError"), 280 Messages.getMessage("error"), JOptionPane.ERROR_MESSAGE); 281 } 282 } catch (Exception e) { 283 LOG.error(Tools.getStackTrace(e)); 284 JOptionPane.showMessageDialog(null, Messages.getMessage("deletingCategoryError"), 285 Messages.getMessage("error"), JOptionPane.ERROR_MESSAGE); 286 } 267 287 } 268 288 } -
extensions/jiwigo/trunk/src/main/resources/fr/mael/jiwigo/trad/messages.properties
r9894 r10715 71 71 unexpectedSendingError=<html><center>Unexpected error while sending images. The images will probably not be created.<br/>Affected images are :</center><ul>%s</ul></html> 72 72 fileAlreadyExistsError=<html><center>Some of the selected files exist on the server. They will not be created.<br/>Affected images are :</center><ul>%s</ul></html> 73 deletingCategoryError=Unexpected error while deleting the category 73 74 74 75 ##################################################### … … 83 84 categories_update=Refresh 84 85 categories_enterName=Fill the category name 86 categories_delete=Delete 85 87 86 88 -
extensions/jiwigo/trunk/src/main/resources/fr/mael/jiwigo/trad/messages_en.properties
r9897 r10715 71 71 unexpectedSendingError=<html><center>Unexpected error while sending images. The images will probably not be created.<br/>Affected images are :</center><ul>%s</ul></html> 72 72 fileAlreadyExistsError=<html><center>Some of the selected files exist on the server. They will not be created.<br/>Affected images are :</center><ul>%s</ul></html> 73 deletingCategoryError=Unexpected error while deleting the category 73 74 74 75 ##################################################### … … 83 84 categories_update=Refresh 84 85 categories_enterName=Fill the category name 86 categories_delete=Delete 85 87 86 88 -
extensions/jiwigo/trunk/src/main/resources/fr/mael/jiwigo/trad/messages_fr.properties
r9894 r10715 71 71 unexpectedSendingError=<html><center>Erreur inattendue lors de l'envoi des images. Les images ne seront probablement pas créées.<br/>Les images concernées sont : </center><ul>%s</ul></html> 72 72 fileAlreadyExistsError=<html><center>Certains des fichiers envoyés existent sur le serveur. Les images ne seront pas créées.<br/>Les images concernées sont : </center><ul>%s</ul></html> 73 deletingCategoryError=Erreur inattendue lors de la suppression de la catégorie 73 74 74 75 ##################################################### … … 83 84 categories_update=Actualiser 84 85 categories_enterName=Entrez le nom de la catégorie 86 categories_delete=Supprimer 85 87 86 88
Note: See TracChangeset
for help on using the changeset viewer.