Commit graph

9322 commits

Author SHA1 Message Date
Jeroen Baten
ff5f31e110 i18n: Adding Norwegian Bokmal language 2015-04-01 15:15:41 +02:00
Oscar Gonzalez Fernandez
5b7f751cf1 Bindings must be reloaded
Otherwise it wouldn't update the original and total labels in the
extended view. The setup method is called when the rows are retrieved
again.
2014-05-14 13:43:09 +02:00
Oscar Gonzalez Fernandez
b0d8bf4629 Upgrade Hibernate version
Move to a Hibernate version compatible with Jahira. When running with
Java 8 an exception was caused when initializing the session factory.

java.lang.NoSuchMethodError: org.hibernate.engine.jdbc.spi.JdbcServices.getConnectionProvider()Lorg/hibernate/engine/jdbc/connections/spi/ConnectionProvider;
at org.jadira.usertype.spi.shared.AbstractUserTypeHibernateIntegrator.use42Api(AbstractUserTypeHibernateIntegrator.java:80)
2014-05-07 01:05:16 +02:00
Oscar Gonzalez Fernandez
f27bc7dffc Upgrade to Spring 4.0.3 version
This is the latest stable version available.
2014-05-06 21:16:43 +02:00
Oscar Gonzalez Fernandez
2c7246f868 Remove uses of @NotTransactional
@NotTransactional is deprecrated and in the next major Spring version
is removed.
2014-05-06 21:16:00 +02:00
Oscar Gonzalez Fernandez
7b54a5063e Upgrade Spring to 3.2.8 and Hibernate to 4.2.8
Now Libreplan can be run on Java8.

This implied some changes:

* Latest versions of hibernate use the Bean Validation API. This
  implied renaming the imports and use ConstraintViolationException
  instead of InvalidValue. Besides some constraints had to be renamed,
  otherwise they wouldn't be recognized by Hibernate validation. In
  the new version of Hibernate validator @AssertTrue can only be
  applied to properties. So all methods it was applied to must follow
  the is.* format.

  Automatic execution of Bean Validation API is disabled, otherwise an
  infinite loop would happen. This is because there are some
  validation constraints that do launch queries to the database. This
  causes a flush of the objects in the session and automatic
  validation is called again.

* A new library for persisting JodaTime is necessary since
  joda-time-hibernate is incompatible with hibernate 4. This library
  can automatically register its types for Date conversion so they're
  removed from configuration.

* Now, in some places, an InvalidDataAccessApiUsageException is thrown
  instead of a DataIntegrityViolationException.

  This is because no constraint is violated, the API is being used
  incorrectly because a transient instance is being provided where a
  persisted one was expected.

* In hibernate 4 listeners cannot be configured via properties.
  HibernateDatabaseModificationsListener registers itself in its @PostConstruct method.

* ehcache classes used are now different.
2014-05-06 17:47:15 +02:00
Oscar Gonzalez Fernandez
b52ad5de23 Use a newer version of surefire plugin 2014-05-06 13:03:44 +02:00
Oscar Gonzalez Fernandez
6ea1be5037 Simplify security configuration using form-login 2014-05-06 13:03:37 +02:00
Oscar Gonzalez Fernandez
4633da0140 Upgrade schema files for Spring configuration 2014-05-01 00:53:09 +02:00
Oscar Gonzalez Fernandez
64a630255c Remove CustomTargetUrlResolver
It's not necessary, the standard strategy redirect to the original URL
and if it's the default one, IndexController will redirect to the user
default location.
2014-05-01 00:53:09 +02:00
Oscar Gonzalez Fernandez
368cbb7fa0 Reorder dependencies in libreplan-business/pom.xml
Follow the order defined in top pom.xml
2014-05-01 00:53:09 +02:00
Oscar Gonzalez Fernandez
fda0f8a7d4 Remove dependencies already present in business
If the dependency is already present in business, no need to declare
it in webapp, since webapp depends on business.
2014-05-01 00:53:09 +02:00
Oscar Gonzalez Fernandez
bc675c7332 Upgrade Spring version 2014-04-30 20:04:32 +02:00
Oscar Gonzalez Fernandez
80f6f6e0cf Make tests independent of tests order execution
When changing JUnit and Spring version the test failed because of the
different order execution.
2014-04-29 20:15:03 +02:00
Oscar Gonzalez Fernandez
cbd195791d Fix bug #1646
A regression was introduced when adding filtering for the WBS screen.
Instead of being associated to the original TreeModel, the tree is
associated to a newly created one based on the current filtering
predicate. So any changes to the original TreeModel aren't
automatically shown in the Tree UI.

A method must be called to associate a new TreeModel, with the new
changes incorporated, to the tree. The method `filterByPredicateIfAny`
implemented this functionality, but it was renamed to
`reloadTreeUIAfterChanges` to convey better its purpose.

Now when adding a new template, `reloadTreeUIAfterChanges` is called
and the newly created element is shown.
2014-04-26 22:58:34 +02:00
Oscar Gonzalez Fernandez
8ada055b3a Remove unnecessary clearAll calls 2014-04-26 18:43:11 +02:00
Oscar Gonzalez Fernandez
3c21e72f14 Improve test
It was dependant on the order of the base calendars returned. This
caused spurious errors.
2014-04-20 18:45:31 +02:00
Oscar Gonzalez Fernandez
db7ef145a1 Improve test to avoid spurious errors 2014-04-20 18:18:47 +02:00
Oscar Gonzalez Fernandez
a109c50984 Performance improvement
When calculating the load ratio of each resource, a new transaction is
being created for each one. Now one transaction is reused for
everyone, which gives a good performance boost when loading the
`Advanced search`.
2014-04-20 18:07:47 +02:00
Oscar Gonzalez Fernandez
18b187fad8 Declare transaction declaratively
Use @Transactional attribute instead of opening transaction manually.
2014-04-20 17:57:42 +02:00
Oscar Gonzalez Fernandez
bc3583104d Fix performance regression
When opening the `resource allocation modal window` (double-click on a
task), the advanced search was calculating the load of the resources
when it should do it when clicking advanced search button. This leads
to a big delay when opening the `resource allocation modal window` if
there is a moderate amount of data.

Now these calculations are only done when clicking advanced search
button and the `resource allocation modal window` is opened almost
instantly.
2014-04-20 17:41:23 +02:00
Oscar Gonzalez Fernandez
63343353d2 Fix bug #1645
A JavaScript string is being generated quoted by the ' character. If
it finds that character in a string inside the evaled JavaScript it
would terminate the string prematurely, causing syntax errors.
2014-04-14 21:14:01 +02:00
Oscar Gonzalez Fernandez
cbe9ca6c69 Fix bug #1644
When an allocation cannot be done, the error message on the input
disappeared because the rows were re-rendered due to reloadBindings
call. Now this call is avoided and some extracted functionality from
getCurrentRows is called.
2014-04-11 19:22:54 +02:00
Oscar Gonzalez Fernandez
466bcdf585 Remove the listener allResourcesPerDay
It's not strictly necessary since inside the listener is checked that
effortInput is enabled, but for consistency do it the same way as with
effortInput.
2014-04-11 19:22:41 +02:00
Oscar Gonzalez Fernandez
27e5926d8c Be more restrictive when discarding messages
MessagesForUser doesn't discard the messages when changing focus.
2014-04-11 19:22:18 +02:00
Oscar Gonzalez Fernandez
73e0a44c6b Some renamings and documentation added
This would make AllocationRow more understandable.
2014-04-11 19:22:12 +02:00
Oscar Gonzalez Fernandez
d45b801ed2 Fix issue with messages for users
The MessagesForUser component is used for showing information and
error messages to the users. It's designed to disappear once the user
does some action and a minimum of time has passed.

This is done listening to the events being produced in the page. In
previous versions of ZK this was enough to identify user activity, but
in the version currently used, 5.0.11, events not related to user
activity are generated. This causes the messages to disappear without
user action.

With this fix, only when the user clicks on something, or changes the
value of some input the shown message is cleared.
2014-04-10 01:29:21 +02:00
Oscar Gonzalez Fernandez
5530184f8a Escape ' characters used along with positional parameters
The command `find -ipath "*src*.po"|xargs sed -ie "/msgstr.*{[0-9]}/
s/\([^']\)'\([^']\)/\1''\2/g"` was used to do the fix.
2014-04-02 20:05:21 +02:00
Oscar Gonzalez Fernandez
f1a7c0370a Fix bug #1643
Java's Gettext Commons,
http://xnap-commons.sourceforge.net/gettext-commons/, uses
java.text.MessageFormat for doing the parameter substitution.
MessageFormat interprets ' as an escaping character. In order to
introduce ', you have to escape it, i.e., you have to type '' instead.
Otherwise posterior positional parameters like {0} aren't interpreted.
2014-04-02 18:49:35 +02:00
Oscar Gonzalez Fernandez
70a8013eb9 Fix bug #1642
When checking the condition
`isOnlyChildAndParentAlreadyInUseByHoursOrExpenses` the parent might
be a new object. In that case the check if false and no further
querying must be done in the parent.
2014-04-01 18:50:49 +02:00
Jeroen Baten
d57890ffa8 A script to change strings in the whole source tree. Use with care! 2014-03-26 13:06:48 +01:00
Jeroen Baten
e4b2f5783d Batch of changed english strings, including in po files 2014-03-26 12:36:00 +01:00
Oscar Gonzalez Fernandez
1820f98488 Remove dead code
The removed code is never executed. editWindow is always not null at
that moment.
2014-03-18 16:27:53 +01:00
miciele Ghiorghis
e3bbe83aae filter-on-projectname: textbox to enter projectname is added 2014-03-17 23:04:09 +01:00
miciele Ghiorghis
ee415e2dca filter-on-projectname: modified to use project name as filter criteria 2014-03-17 23:04:09 +01:00
miciele Ghiorghis
fb98fa0a4f filter-on-projectname: modified to support filter on part of project name 2014-03-17 23:04:09 +01:00
miciele Ghiorghis
917110efec filter-on-projectname: acceptFilerName method added to accept filter on part of projectname 2014-03-17 23:04:09 +01:00
miciele Ghiorghis
6a6110ab7a filter-on-projectname: acceptFilerName method added to accept filter on part of projectname 2014-03-17 23:04:09 +01:00
miciele Ghiorghis
e5fdc5ea47 filter-on-projectname: modified to support filter on part of project name 2014-03-17 23:04:09 +01:00
miciele Ghiorghis
20eb7d50b1 filter-on-projectname: new methods added to read and write filter name attribute 2014-03-17 23:04:09 +01:00
Oscar Gonzalez Fernandez
e80647ee8c Remove unused method 2014-03-17 22:47:49 +01:00
Oscar Gonzalez Fernandez
c93a1399f3 Use parameters instead of concatenating
The structure of the tooltip can change depending on the language.
Concatenating strings hardwires it to the English language. Using
parameters instead.
2014-03-17 22:44:44 +01:00
Jeroen Baten
8cafdd2d62 small adjustments to representation 2014-03-17 21:45:36 +01:00
miciele Ghiorghis
54bc5aff14 project-margins-and-status: project status red image. Used when hover on the component 2014-03-10 18:39:01 +01:00
miciele Ghiorghis
33f57569c8 project-margins-and-status: project status red image. Used as background-image 2014-03-10 18:39:01 +01:00
miciele Ghiorghis
1024fbcd0a project-margins-and-status: project status orange image. Used when hover on the component 2014-03-10 18:39:01 +01:00
miciele Ghiorghis
9b7d83e0c2 project-margins-and-status: project status orange image. Used as background-image 2014-03-10 18:39:01 +01:00
miciele Ghiorghis
a6ed82cfac project-margins-and-status: project status green image. Used when hover on the component 2014-03-10 18:39:00 +01:00
miciele Ghiorghis
776225fe79 project-margins-and-status: project status green image. Used as background-image 2014-03-10 18:39:00 +01:00
miciele Ghiorghis
3f524129c7 project-margins-and-status: new styles added for project status 2014-03-10 18:39:00 +01:00