Author: mallon Date: 2012-06-25 12:13:27 +0200 (Mon, 25 Jun 2012) New Revision: 3471 Url: http://chorem.org/repositories/revision/lima/3471 Log: Suppression du code grisant l'interface d'ajout d'?\195?\169criture (Quand il n'existe aucun journal), et ce pour des raisons d'omptimisation, mais aussi afin d'?\195?\170tre sur la m?\195?\170me logique d'ui que lorsqu'il n'y a pas d'exercie ouvert. Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/FinancialTransactionView.jaxx trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/FinancialTransactionViewHandler.java trunk/lima-swing/src/main/resources/i18n/lima-swing_en_GB.properties trunk/lima-swing/src/main/resources/i18n/lima-swing_fr_FR.properties Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/FinancialTransactionView.jaxx =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/FinancialTransactionView.jaxx 2012-06-22 13:03:22 UTC (rev 3470) +++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/FinancialTransactionView.jaxx 2012-06-25 10:13:27 UTC (rev 3471) @@ -52,8 +52,7 @@ <org.chorem.lima.ui.common.FiscalPeriodComboBoxModel id="fiscalPeriodComboBoxModel"/> <JComboBox id="fiscalPeriodComboBox" model="{fiscalPeriodComboBoxModel}" renderer="{new org.chorem.lima.ui.common.FiscalPeriodListRenderer()}" - onItemStateChanged="handler.fiscalPeriodSelected(event)" - enabled="{isNoEntryBooks()}"/> + onItemStateChanged="handler.fiscalPeriodSelected(event)"/> </cell> <cell anchor="east"> <JLabel text="lima.ui.financialtransaction.financialperiod" labelFor='{financialPeriodComboBox}'/> @@ -64,14 +63,11 @@ <JComboBox id="financialPeriodComboBox" model="{financialPeriodComboBoxModel}" renderer="{new org.chorem.lima.ui.common.FinancialPeriodListRenderer()}" - onItemStateChanged="handler.financialPeriodSelected(event)" - enabled="{isNoEntryBooks()}"/> + onItemStateChanged="handler.financialPeriodSelected(event)"/> <JButton id="back" text="lima.ui.financialtransaction.buttonback" - onActionPerformed="handler.back(financialPeriodComboBox)" - enabled="{isNoEntryBooks()}"/> + onActionPerformed="handler.back(financialPeriodComboBox)"/> <JButton id="next" text="lima.ui.financialtransaction.buttonnext" - onActionPerformed="handler.next(financialPeriodComboBox)" - enabled="{isNoEntryBooks()}"/> + onActionPerformed="handler.next(financialPeriodComboBox)"/> </JPanel> </cell> <cell anchor="east"> @@ -81,8 +77,7 @@ <org.chorem.lima.ui.common.EntryBookComboBoxModel id="entryBookComboBoxModel"/> <JComboBox id="entryBookComboBox" model="{entryBookComboBoxModel}" renderer="{new org.chorem.lima.ui.common.EntryBookListRenderer()}" - onItemStateChanged="handler.entryBookSelected(event)" - enabled="{isNoEntryBooks()}"/> + onItemStateChanged="handler.entryBookSelected(event)"/> </cell> </row> <row> @@ -94,8 +89,7 @@ <JButton text="lima.common.paste" enabled="{isSelectedRow()}" onActionPerformed="handler.pasteRow(financialTransactionTable.getSelectedRow())"/> <JButton text="lima.entries.addTransaction" - onActionPerformed="handler.addFinancialTransaction()" - enabled="{isNoEntryBooks()}"/> + onActionPerformed="handler.addFinancialTransaction()"/> <JButton text="lima.entries.addEntry" enabled="{isSelectedRow()}" onActionPerformed="handler.addEntry()"/> <JButton text="lima.common.remove" enabled="{isSelectedRow()}" Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/FinancialTransactionViewHandler.java =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/FinancialTransactionViewHandler.java 2012-06-22 13:03:22 UTC (rev 3470) +++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/FinancialTransactionViewHandler.java 2012-06-25 10:13:27 UTC (rev 3471) @@ -93,30 +93,11 @@ LimaServiceFactory.addServiceListener(FinancialPeriodService.class, this); LimaServiceFactory.addServiceListener(FiscalPeriodService.class, this); LimaServiceFactory.addServiceListener(ImportService.class, this); - } - - //impossible to add transaction without entrybook - public boolean controlEntryBook(){ - boolean result = true; - - if (entryBookService.getAllEntryBooks().isEmpty()){ - JOptionPane.showMessageDialog(view, _("lima.ui.financialtransaction.messagenoentrybooks"), - _("lima.ui.financialtransaction.titlenoentrybooks"), JOptionPane.ERROR_MESSAGE); - result = false; - }else{ - result=true; - } - - view.setNoEntryBooks(result); - return result; - } - + } /** * Init all combo box in view. */ public void init() { - - if (controlEntryBook()){ // fiscal periods List<FiscalPeriod> fiscalPeriods = fiscalPeriodService.getAllUnblockedFiscalPeriods(); @@ -135,7 +116,6 @@ if (log.isDebugEnabled()) { log.debug(String.format("Loaded %d entry books", allEntryBooks.size())); } - } } /** Modified: trunk/lima-swing/src/main/resources/i18n/lima-swing_en_GB.properties =================================================================== --- trunk/lima-swing/src/main/resources/i18n/lima-swing_en_GB.properties 2012-06-22 13:03:22 UTC (rev 3470) +++ trunk/lima-swing/src/main/resources/i18n/lima-swing_en_GB.properties 2012-06-25 10:13:27 UTC (rev 3471) @@ -250,10 +250,8 @@ lima.ui.financialtransaction.financialperiod= lima.ui.financialtransaction.fiscalyear= lima.ui.financialtransaction.letter= -lima.ui.financialtransaction.messagenoentrybooks=At least one entry books must to be opened to create the corresponding transactions lima.ui.financialtransaction.messageremoveentry= lima.ui.financialtransaction.messageremovetransaction= -lima.ui.financialtransaction.titlenoentrybooks=No entry books opened lima.ui.financialtransaction.titleremoveentry= lima.ui.financialtransaction.titleremovetransaction= lima.ui.financialtransaction.voucher= Modified: trunk/lima-swing/src/main/resources/i18n/lima-swing_fr_FR.properties =================================================================== --- trunk/lima-swing/src/main/resources/i18n/lima-swing_fr_FR.properties 2012-06-22 13:03:22 UTC (rev 3470) +++ trunk/lima-swing/src/main/resources/i18n/lima-swing_fr_FR.properties 2012-06-25 10:13:27 UTC (rev 3471) @@ -250,10 +250,8 @@ lima.ui.financialtransaction.financialperiod=Périodes comptables lima.ui.financialtransaction.fiscalyear=Exercices lima.ui.financialtransaction.letter=Lettre -lima.ui.financialtransaction.messagenoentrybooks=Au moins un journal doit être ouvert pour créer les transactions correspondantes lima.ui.financialtransaction.messageremoveentry=Voulez-vous supprimer cette ligne de transaction? lima.ui.financialtransaction.messageremovetransaction=Voulez-vous supprimer cette transaction? -lima.ui.financialtransaction.titlenoentrybooks=Aucun journal ouvert lima.ui.financialtransaction.titleremoveentry=Suppression lima.ui.financialtransaction.titleremovetransaction=Suppression lima.ui.financialtransaction.voucher=Pièce comptable