| author | Tomas Zeman <tzeman@volny.cz> |
| Tue, 01 May 2012 22:29:32 +0200 | |
| changeset 87 | 80b87b8de739 |
| parent 81 | c7d21399c726 |
| child 88 | 777daf9e0026 |
| permissions | -rw-r--r-- |
| 11 | 1 |
/* |
|
22
94ed9cfdb123
Squeryl connection manager instead of mapper-based
Tomas Zeman <tzeman@volny.cz>
parents:
16
diff
changeset
|
2 |
* Copyright 2011-2012 Tomas Zeman <tzeman@volny.cz> |
| 11 | 3 |
* |
4 |
* Licensed under the Apache License, Version 2.0 (the "License"); |
|
5 |
* you may not use this file except in compliance with the License. |
|
6 |
* You may obtain a copy of the License at |
|
7 |
* |
|
8 |
* http://www.apache.org/licenses/LICENSE-2.0 |
|
9 |
* |
|
10 |
* Unless required by applicable law or agreed to in writing, software |
|
11 |
* distributed under the License is distributed on an "AS IS" BASIS, |
|
12 |
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
|
13 |
* See the License for the specific language governing permissions and |
|
14 |
* limitations under the License. |
|
15 |
*/ |
|
16 |
package bootstrap.liftweb |
|
17 |
||
18 |
import fis.base.model._ |
|
| 49 | 19 |
import fis.base.ui._ |
| 70 | 20 |
import fis.aaa.model._ |
21 |
import fis.aaa.ui._ |
|
| 69 | 22 |
import fis.crm.ui._ |
| 76 | 23 |
import fis.geo.ui._ |
| 79 | 24 |
import fis.pm.ui._ |
|
22
94ed9cfdb123
Squeryl connection manager instead of mapper-based
Tomas Zeman <tzeman@volny.cz>
parents:
16
diff
changeset
|
25 |
import fis.db.SquerylTxMgr |
| 77 | 26 |
import net.datatables.DataTables |
| 11 | 27 |
import net.liftweb.common._ |
28 |
import net.liftweb.http._ |
|
| 15 | 29 |
import net.liftweb.sitemap._ |
| 11 | 30 |
import net.liftweb.squerylrecord.SquerylRecord |
31 |
import net.liftweb.util._ |
|
32 |
import net.liftweb.util.Helpers._ |
|
33 |
import net.tz.lift.boot.ProtoBoot |
|
34 |
||
35 |
class Boot extends ProtoBoot {
|
|
36 |
override def boot = {
|
|
37 |
||
38 |
/* DB stuff */ |
|
|
22
94ed9cfdb123
Squeryl connection manager instead of mapper-based
Tomas Zeman <tzeman@volny.cz>
parents:
16
diff
changeset
|
39 |
SquerylTxMgr.init() |
| 11 | 40 |
|
41 |
super.boot |
|
42 |
||
| 15 | 43 |
import Loc._ |
44 |
||
| 70 | 45 |
AuthnSnippet.init() |
| 49 | 46 |
SecNav.init() |
| 77 | 47 |
DataTables.init() |
| 49 | 48 |
|
| 70 | 49 |
/* Authn wiring */ |
50 |
UserVendors.cur.default.set(Vendor(() => AuthnSnippet.cur)) |
|
51 |
AuthnSnippet. |
|
52 |
registerAuthenticator(FetchUserAuthenticator). |
|
53 |
registerAuthenticator(PasswordAuthenticator) |
|
54 |
||
| 87 | 55 |
val menus = List(Menu("/", "FIS Main page") / "index" >>
|
56 |
EarlyResponse(() => Full(RedirectResponse(ProjectSnippet.url.list))) >> |
|
57 |
Hidden, |
|
58 |
ContactSnippet.menu, |
|
| 69 | 59 |
CompanySnippet.menu, |
| 67 | 60 |
UserSnippet.menu, |
| 70 | 61 |
AuthnSnippet.menu, |
| 68 | 62 |
CountrySnippet.menu, |
| 76 | 63 |
LocationSnippet.menu, |
| 79 | 64 |
CitySnippet.menu, |
| 81 | 65 |
ProjectSnippet.menu, |
66 |
TaskSnippet.menu |
|
| 79 | 67 |
) |
| 15 | 68 |
|
69 |
LiftRules.setSiteMap(SiteMap(menus:_*)) |
|
| 41 | 70 |
|
71 |
LiftRules.htmlProperties.default.set { r: Req =>
|
|
72 |
Html5Properties(r.userAgent) } |
|
|
51
523c5c5b84e5
[mq]: twitter-bootstrap-forms-error+help.patch
Tomas Zeman <tzeman@volny.cz>
parents:
49
diff
changeset
|
73 |
|
|
523c5c5b84e5
[mq]: twitter-bootstrap-forms-error+help.patch
Tomas Zeman <tzeman@volny.cz>
parents:
49
diff
changeset
|
74 |
ScreenRules.init() |
| 75 | 75 |
|
76 |
/* Language */ |
|
77 |
LangSwitcher.init() |
|
78 |
LiftRules.localeCalculator = { _ => CurLanguage.get }
|
|
| 11 | 79 |
} |
80 |
} |
|
81 |
||
82 |
// vim: set ts=2 sw=2 et: |