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