Implement function spec for tickets (part I)

I start implementing a Spock specification to test the tickets feature.
I also implement modules for jQuery dialogs and remove all base
statements from the module classes because they work not reliably.