OpenConcerto

Dépôt officiel du code source de l'ERP OpenConcerto
sonarqube

svn://code.openconcerto.org/openconcerto

Rev

Rev 157 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 157 Rev 181
Line 50... Line 50...
50
import org.openconcerto.utils.CollectionUtils;
50
import org.openconcerto.utils.CollectionUtils;
51
import org.openconcerto.utils.ListMap;
51
import org.openconcerto.utils.ListMap;
52
import org.openconcerto.utils.PrefType;
52
import org.openconcerto.utils.PrefType;
53
import org.openconcerto.utils.Tuple2;
53
import org.openconcerto.utils.Tuple2;
54
import org.openconcerto.utils.cc.ITransformer;
54
import org.openconcerto.utils.cc.ITransformer;
55
import org.openconcerto.utils.i18n.TranslationManager;
-
 
56
 
55
 
57
public final class Module extends AbstractModule {
56
public final class Module extends AbstractModule {
58
 
57
 
59
    public Module(ModuleFactory f) throws IOException {
58
    public Module(ModuleFactory f) throws IOException {
60
        super(f);
59
        super(f);
Line 84... Line 83...
84
    }
83
    }
85
 
84
 
86
    @Override
85
    @Override
87
    protected void setupElements(SQLElementDirectory dir) {
86
    protected void setupElements(SQLElementDirectory dir) {
88
        super.setupElements(dir);
87
        super.setupElements(dir);
89
        TranslationManager.getInstance().addTranslationStreamFromClass(this.getClass());
-
 
90
 
88
 
91
        GlobalMapper.getInstance().map(ProjectTimeTrackingSQLElement.ELEMENT_CODE + ".default", new ProjectTimeTrackingGroup());
89
        GlobalMapper.getInstance().map(ProjectTimeTrackingSQLElement.ELEMENT_CODE + ".default", new ProjectTimeTrackingGroup());
92
        final ProjectTimeTrackingSQLElement element = new ProjectTimeTrackingSQLElement();
90
        final ProjectTimeTrackingSQLElement element = new ProjectTimeTrackingSQLElement();
93
        dir.addSQLElement(element);
91
        dir.addSQLElement(element);
94
 
92
 
Line 117... Line 115...
117
 
115
 
118
    }
116
    }
119
 
117
 
120
    private RowAction getSendMailTempsAffaireAction() {
118
    private RowAction getSendMailTempsAffaireAction() {
121
 
119
 
122
        final PredicateRowAction action = new PredicateRowAction(new AbstractAction() {
120
        final PredicateRowAction action = new PredicateRowAction(new AbstractAction("Envoyer les temps par mail") {
123
 
121
 
124
            @Override
122
            @Override
125
            public void actionPerformed(ActionEvent e) {
123
            public void actionPerformed(ActionEvent e) {
126
 
124
 
127
                final SQLTable tableTemps = Configuration.getInstance().getRoot().findTable("AFFAIRE_TEMPS");
125
                final SQLTable tableTemps = Configuration.getInstance().getRoot().findTable("AFFAIRE_TEMPS");
Line 185... Line 183...
185
        action.setPredicate(IListeEvent.createSelectionCountPredicate(0, Integer.MAX_VALUE));
183
        action.setPredicate(IListeEvent.createSelectionCountPredicate(0, Integer.MAX_VALUE));
186
        return action;
184
        return action;
187
    }
185
    }
188
 
186
 
189
    private RowAction getCreateTempsAffaireAction() {
187
    private RowAction getCreateTempsAffaireAction() {
190
        PredicateRowAction action = new PredicateRowAction(new AbstractAction() {
188
        PredicateRowAction action = new PredicateRowAction(new AbstractAction("Saisir un temps") {
191
 
189
 
192
            @Override
190
            @Override
193
            public void actionPerformed(ActionEvent e) {
191
            public void actionPerformed(ActionEvent e) {
194
 
192
 
195
                final SQLElement element = Configuration.getInstance().getDirectory().getElement("AFFAIRE_TEMPS");
193
                final SQLElement element = Configuration.getInstance().getDirectory().getElement("AFFAIRE_TEMPS");
Line 211... Line 209...
211
        action.setPredicate(IListeEvent.getNonEmptySelectionPredicate());
209
        action.setPredicate(IListeEvent.getNonEmptySelectionPredicate());
212
        return action;
210
        return action;
213
    }
211
    }
214
 
212
 
215
    private RowAction getReportingAction() {
213
    private RowAction getReportingAction() {
216
        final PredicateRowAction action = new PredicateRowAction(new AbstractAction() {
214
        final PredicateRowAction action = new PredicateRowAction(new AbstractAction("Reporting") {
217
 
215
 
218
            @Override
216
            @Override
219
            public void actionPerformed(ActionEvent e) {
217
            public void actionPerformed(ActionEvent e) {
220
                final PanelFrame frame = new PanelFrame(new ReportingPanel(), "Reporting");
218
                final PanelFrame frame = new PanelFrame(new ReportingPanel(), "Reporting");
221
                frame.pack();
219
                frame.pack();