|
1 # |
|
2 # Copyright (c) 2008-2015 Thierry Florac <tflorac AT ulthar.net> |
|
3 # All Rights Reserved. |
|
4 # |
|
5 # This software is subject to the provisions of the Zope Public License, |
|
6 # Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution. |
|
7 # THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED |
|
8 # WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED |
|
9 # WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS |
|
10 # FOR A PARTICULAR PURPOSE. |
|
11 # |
|
12 |
|
13 __docformat__ = 'restructuredtext' |
|
14 |
|
15 |
|
16 from fanstatic import Library, Resource |
|
17 from pyams_utils.fanstatic import ExternalResource |
|
18 |
|
19 |
|
20 from pyramid.i18n import TranslationStringFactory |
|
21 _ = TranslationStringFactory('pyams_gis') |
|
22 |
|
23 |
|
24 library = Library('pyams_gis', 'resources') |
|
25 |
|
26 leaflet_css = Resource(library, 'css/leaflet-1.0.3.css', |
|
27 minified='css/leaflet-1.0.3.min.css') |
|
28 |
|
29 leaflet = Resource(library, 'js/leaflet-1.0.3.js', |
|
30 minified='js/leaflet-1.0.3.min.js', |
|
31 depends=[leaflet_css, ], |
|
32 bottom=True) |
|
33 |
|
34 leaflet_gp = Resource(library, 'js/leaflet-gp-3.0.2.js', |
|
35 minified='js/leaflet-gp-3.0.2.min.js', |
|
36 depends=[leaflet, ], |
|
37 bottom=True) |
|
38 |
|
39 leaflet_esri = Resource(library, 'js/leaflet-esri-2.0.8.js', |
|
40 minified='js/leaflet-esri-2.0.8.min.js', |
|
41 depends=[leaflet, ], |
|
42 bottom=True) |
|
43 |
|
44 leaflet_google = ExternalResource(library, 'https://maps.googleapis.com/maps/api/js', |
|
45 bottom=True) |
|
46 |
|
47 leaflet_google_mutant = Resource(library, 'js/leaflet-google-mutant.js', |
|
48 minified='js/leaflet-google-mutant.min.js', |
|
49 depends=[leaflet, ], |
|
50 bottom=True) |
|
51 |
|
52 pyams_gis = Resource(library, 'js/pyams_gis.js', |
|
53 minified='js/pyams_gis.min.js', |
|
54 depends=[leaflet, ], |
|
55 bottom=True) |
|
56 |
|
57 |
|
58 def includeme(config): |
|
59 """Pyramid include""" |
|
60 |
|
61 from .include import include_package |
|
62 include_package(config) |