| author | Tomas Zeman <tzeman@volny.cz> |
| Thu, 24 May 2012 11:19:26 +0200 | |
| changeset 99 | 49eb72a46208 |
| parent 88 | 777daf9e0026 |
| child 100 | 1fcbeae1f9da |
| 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._ |
| 99 | 25 |
import fis.sr.ui._ |
|
22
94ed9cfdb123
Squeryl connection manager instead of mapper-based
Tomas Zeman <tzeman@volny.cz>
parents:
16
diff
changeset
|
26 |
import fis.db.SquerylTxMgr |
| 77 | 27 |
import net.datatables.DataTables |
| 11 | 28 |
import net.liftweb.common._ |
29 |
import net.liftweb.http._ |
|
| 15 | 30 |
import net.liftweb.sitemap._ |
| 11 | 31 |
import net.liftweb.squerylrecord.SquerylRecord |
32 |
import net.liftweb.util._ |
|
33 |
import net.liftweb.util.Helpers._ |
|
34 |
import net.tz.lift.boot.ProtoBoot |
|
35 |
||
36 |
class Boot extends ProtoBoot {
|
|
37 |
override def boot = {
|
|
38 |
||
39 |
/* DB stuff */ |
|
|
22
94ed9cfdb123
Squeryl connection manager instead of mapper-based
Tomas Zeman <tzeman@volny.cz>
parents:
16
diff
changeset
|
40 |
SquerylTxMgr.init() |
| 11 | 41 |
|
42 |
super.boot |
|
43 |
||
| 15 | 44 |
import Loc._ |
45 |
||
| 70 | 46 |
AuthnSnippet.init() |
| 49 | 47 |
SecNav.init() |
| 77 | 48 |
DataTables.init() |
| 49 | 49 |
|
| 70 | 50 |
/* Authn wiring */ |
51 |
UserVendors.cur.default.set(Vendor(() => AuthnSnippet.cur)) |
|
52 |
AuthnSnippet. |
|
53 |
registerAuthenticator(FetchUserAuthenticator). |
|
54 |
registerAuthenticator(PasswordAuthenticator) |
|
55 |
||
| 87 | 56 |
val menus = List(Menu("/", "FIS Main page") / "index" >>
|
57 |
EarlyResponse(() => Full(RedirectResponse(ProjectSnippet.url.list))) >> |
|
58 |
Hidden, |
|
| 88 | 59 |
ProjectSnippet.menu, |
60 |
TaskSnippet.menu, |
|
| 67 | 61 |
UserSnippet.menu, |
| 70 | 62 |
AuthnSnippet.menu, |
| 88 | 63 |
CompanySnippet.menu, |
64 |
ContactSnippet.menu, |
|
| 68 | 65 |
CountrySnippet.menu, |
| 79 | 66 |
CitySnippet.menu, |
| 99 | 67 |
LocationSnippet.menu, |
68 |
ServiceSnippet.menu |
|
| 79 | 69 |
) |
| 15 | 70 |
|
71 |
LiftRules.setSiteMap(SiteMap(menus:_*)) |
|
| 41 | 72 |
|
73 |
LiftRules.htmlProperties.default.set { r: Req =>
|
|
74 |
Html5Properties(r.userAgent) } |
|
|
51
523c5c5b84e5
[mq]: twitter-bootstrap-forms-error+help.patch
Tomas Zeman <tzeman@volny.cz>
parents:
49
diff
changeset
|
75 |
|
|
523c5c5b84e5
[mq]: twitter-bootstrap-forms-error+help.patch
Tomas Zeman <tzeman@volny.cz>
parents:
49
diff
changeset
|
76 |
ScreenRules.init() |
| 75 | 77 |
|
78 |
/* Language */ |
|
79 |
LangSwitcher.init() |
|
80 |
LiftRules.localeCalculator = { _ => CurLanguage.get }
|
|
| 11 | 81 |
} |
82 |
} |
|
83 |
||
84 |
// vim: set ts=2 sw=2 et: |