-
Notifications
You must be signed in to change notification settings - Fork 5
Packages
For more information about packages, see the Synthesepy#Packages chapter.
The require.js library is used to manage JavaScript loading and dependency management.
The list of packages to load can be specified in the initial require
call. Here’s an example of package usage:
<!-- GMap doesn't load correctly through require.js --> <script src="http://maps.google.com/maps/api/js?v=3.5&sensor=false"></script> <script src="/core/vendor/requirejs/require.js"></script> <script data-version=1 src="/core/js/init.js"></script> <script> var stopSelector; require([ "core/js/Synthese", "map/js/CityBrowser", "routePlanner/js/RoutePlanner", "map/js/StopSelector", "routePlanner/js/legacy/core", "routePlanner/js/legacy/interface", ], function(Synthese, CityBrowser, routePlanner, StopSelector) { Synthese.init(); legacyRoutePlannerConfig.minCharsToTriggerAutocomplete = 0; legacyRoutePlannerConfig.routePlannerFormName = "routePlannerForm"; routePlanner.initAutoCompletions(); var form = document.getElementsByName("routePlannerForm")[0]; form.siteId.value = Synthese.siteId; var stopSelector = new StopSelector({ routePlanner: new routePlanner.RoutePlannerView({el: form}), routePlannerOptions: { formName: legacyRoutePlannerConfig.routePlannerFormName } }); if (localStorage.debug_showMap) $(".mapLink:first").trigger("click"); });
{{child_pages}}
- install the synthese package
apt-get install curl python net-tools
curl -s http://ci.rcsmobility.com/~build/synthese/lin/release/trunk/latest/install_synthese.py | python
The next steps are not necessary if you are using the new generated apache config. See Projects_Administration.
- Add the packages aliases to Apache.
Alias /core /opt/synthese/share/synthese/packages/core/files/core
<Directory /opt/synthese/share/synthese/packages/core/files/core>
Options -Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
- reload apache
- If you want to use project specific packages, first create your project in subversion and then check it out in (do the checkout using the
synthese
user)/srv/synthese/PROJECT_NAME
. - Example apache configuration (inside a vhost!) for using the main package files:
DocumentRoot /srv/synthese/chablais/sites/chablais.ch/main/files/
<Directory “/srv/synthese/chablais/sites/chablais.ch/main/files/”>
AllowOverride None
Options FollowSymLinks
Order allow,deny
Allow from all
RewriteEngine on
RewriteBase /
RewriteCond %{REQUEST_fileNAME} !-d
RewriteCond %{REQUEST_fileNAME} !-f
RewriteRule ^(.*)$ synthese?fonction=page&si=7036874417766411&smart_url=/$1 [L,QSA]
Tips : site id is often 7036874417766402
A package is built on http://ci.rcsmobility.com/~build/synthese/lin/release/trunk/ on every commit.
Updating Synthese will update the packages:
curl -s http://ci.rcsmobility.com/~build/synthese/lin/release/trunk/latest/install_synthese.py | python
If the supervisor is already launched you can ignore this error:
Starting supervisor: Error: Another program is already listening on a port that one of our HTTP servers is configured to use. Shut this program down first before starting supervisord.
package name | base_page_index |
core | 0 |
admin | 1 |
map | 2 |
routePlanner | 3 |
testData | 4 |
demo | 5 |
networkExplorer | 6 |
timetable | 7 |
Sidebar
SYNTHESE Documentation
Specifications
Developer documentation
Database
API
CMS template syntax
Interoperability
Administrator manual