├── .bowerrc ├── .github └── first-timers.yml ├── .gitignore ├── LICENSE ├── README.md ├── bower.json ├── package.json ├── public ├── assets │ ├── app.css │ ├── app.js │ ├── config.js │ ├── controls │ │ ├── controls.css │ │ └── controls.js │ ├── dialogs │ │ ├── dialogs.css │ │ └── login.js │ ├── images │ │ ├── active-marker-icon.png │ │ ├── marker-icon.png │ │ ├── marker-shadow.png │ │ └── noise.png │ ├── locale │ │ ├── data.ini │ │ └── jquery.timeago.de.js │ ├── map │ │ ├── map.css │ │ └── map.js │ ├── marker-detail │ │ ├── marker-detail.css │ │ └── marker-detail.js │ └── marker-list │ │ ├── marker-list.css │ │ └── marker-list.js ├── index.html └── vendor │ ├── ICanHaz.min.js │ ├── bootstrap.modalform │ ├── LICENSE │ ├── README.md │ ├── assets │ │ └── screenshot.png │ ├── bootstrap.modalform.js │ └── bower.json │ ├── bootstrap │ ├── .gitignore │ ├── .travis.yml │ ├── CHANGELOG.md │ ├── CONTRIBUTING.md │ ├── LICENSE │ ├── Makefile │ ├── README.md │ ├── component.json │ ├── composer.json │ ├── docs │ │ ├── assets │ │ │ ├── css │ │ │ │ ├── bootstrap-responsive.css │ │ │ │ ├── bootstrap.css │ │ │ │ └── docs.css │ │ │ ├── ico │ │ │ │ ├── apple-touch-icon-114-precomposed.png │ │ │ │ ├── apple-touch-icon-144-precomposed.png │ │ │ │ ├── apple-touch-icon-57-precomposed.png │ │ │ │ ├── apple-touch-icon-72-precomposed.png │ │ │ │ ├── favicon.ico │ │ │ │ └── favicon.png │ │ │ ├── img │ │ │ │ ├── bootstrap-docs-readme.png │ │ │ │ ├── bootstrap-mdo-sfmoma-01.jpg │ │ │ │ ├── bootstrap-mdo-sfmoma-02.jpg │ │ │ │ ├── bootstrap-mdo-sfmoma-03.jpg │ │ │ │ ├── bs-docs-bootstrap-features.png │ │ │ │ ├── bs-docs-masthead-pattern.png │ │ │ │ ├── bs-docs-responsive-illustrations.png │ │ │ │ ├── bs-docs-twitter-github.png │ │ │ │ ├── example-sites │ │ │ │ │ ├── 8020select.png │ │ │ │ │ ├── adoptahydrant.png │ │ │ │ │ ├── breakingnews.png │ │ │ │ │ ├── fleetio.png │ │ │ │ │ ├── gathercontent.png │ │ │ │ │ ├── jshint.png │ │ │ │ │ ├── kippt.png │ │ │ │ │ └── soundready.png │ │ │ │ ├── examples │ │ │ │ │ ├── bootstrap-example-carousel.png │ │ │ │ │ ├── bootstrap-example-fluid.png │ │ │ │ │ ├── bootstrap-example-justified-nav.png │ │ │ │ │ ├── bootstrap-example-marketing-narrow.png │ │ │ │ │ ├── bootstrap-example-marketing.png │ │ │ │ │ ├── bootstrap-example-signin.png │ │ │ │ │ ├── bootstrap-example-starter.png │ │ │ │ │ ├── bootstrap-example-sticky-footer.png │ │ │ │ │ ├── browser-icon-chrome.png │ │ │ │ │ ├── browser-icon-firefox.png │ │ │ │ │ ├── browser-icon-safari.png │ │ │ │ │ ├── slide-01.jpg │ │ │ │ │ ├── slide-02.jpg │ │ │ │ │ └── slide-03.jpg │ │ │ │ ├── glyphicons-halflings-white.png │ │ │ │ ├── glyphicons-halflings.png │ │ │ │ ├── grid-baseline-20px.png │ │ │ │ ├── less-logo-large.png │ │ │ │ └── responsive-illustrations.png │ │ │ └── js │ │ │ │ ├── README.md │ │ │ │ ├── application.js │ │ │ │ ├── bootstrap-affix.js │ │ │ │ ├── bootstrap-alert.js │ │ │ │ ├── bootstrap-button.js │ │ │ │ ├── bootstrap-carousel.js │ │ │ │ ├── bootstrap-collapse.js │ │ │ │ ├── bootstrap-dropdown.js │ │ │ │ ├── bootstrap-modal.js │ │ │ │ ├── bootstrap-popover.js │ │ │ │ ├── bootstrap-scrollspy.js │ │ │ │ ├── bootstrap-tab.js │ │ │ │ ├── bootstrap-tooltip.js │ │ │ │ ├── bootstrap-transition.js │ │ │ │ ├── bootstrap-typeahead.js │ │ │ │ ├── bootstrap.js │ │ │ │ ├── bootstrap.min.js │ │ │ │ ├── google-code-prettify │ │ │ │ ├── prettify.css │ │ │ │ └── prettify.js │ │ │ │ ├── holder │ │ │ │ └── holder.js │ │ │ │ ├── html5shiv.js │ │ │ │ └── jquery.js │ │ ├── base-css.html │ │ ├── build │ │ │ ├── index.js │ │ │ └── package.json │ │ ├── components.html │ │ ├── customize.html │ │ ├── examples │ │ │ ├── carousel.html │ │ │ ├── fluid.html │ │ │ ├── hero.html │ │ │ ├── justified-nav.html │ │ │ ├── marketing-narrow.html │ │ │ ├── signin.html │ │ │ ├── starter-template.html │ │ │ ├── sticky-footer-navbar.html │ │ │ └── sticky-footer.html │ │ ├── extend.html │ │ ├── getting-started.html │ │ ├── index.html │ │ ├── javascript.html │ │ ├── scaffolding.html │ │ └── templates │ │ │ ├── layout.mustache │ │ │ └── pages │ │ │ ├── base-css.mustache │ │ │ ├── components.mustache │ │ │ ├── customize.mustache │ │ │ ├── extend.mustache │ │ │ ├── getting-started.mustache │ │ │ ├── index.mustache │ │ │ ├── javascript.mustache │ │ │ └── scaffolding.mustache │ ├── img │ │ ├── glyphicons-halflings-white.png │ │ └── glyphicons-halflings.png │ ├── js │ │ ├── .jshintrc │ │ ├── bootstrap-affix.js │ │ ├── bootstrap-alert.js │ │ ├── bootstrap-button.js │ │ ├── bootstrap-carousel.js │ │ ├── bootstrap-collapse.js │ │ ├── bootstrap-dropdown.js │ │ ├── bootstrap-modal.js │ │ ├── bootstrap-popover.js │ │ ├── bootstrap-scrollspy.js │ │ ├── bootstrap-tab.js │ │ ├── bootstrap-tooltip.js │ │ ├── bootstrap-transition.js │ │ ├── bootstrap-typeahead.js │ │ └── tests │ │ │ ├── index.html │ │ │ ├── phantom.js │ │ │ ├── server.js │ │ │ ├── unit │ │ │ ├── bootstrap-affix.js │ │ │ ├── bootstrap-alert.js │ │ │ ├── bootstrap-button.js │ │ │ ├── bootstrap-carousel.js │ │ │ ├── bootstrap-collapse.js │ │ │ ├── bootstrap-dropdown.js │ │ │ ├── bootstrap-modal.js │ │ │ ├── bootstrap-phantom.js │ │ │ ├── bootstrap-popover.js │ │ │ ├── bootstrap-scrollspy.js │ │ │ ├── bootstrap-tab.js │ │ │ ├── bootstrap-tooltip.js │ │ │ ├── bootstrap-transition.js │ │ │ └── bootstrap-typeahead.js │ │ │ └── vendor │ │ │ ├── jquery.js │ │ │ ├── qunit.css │ │ │ └── qunit.js │ ├── less │ │ ├── accordion.less │ │ ├── alerts.less │ │ ├── bootstrap.less │ │ ├── breadcrumbs.less │ │ ├── button-groups.less │ │ ├── buttons.less │ │ ├── carousel.less │ │ ├── close.less │ │ ├── code.less │ │ ├── component-animations.less │ │ ├── dropdowns.less │ │ ├── forms.less │ │ ├── grid.less │ │ ├── hero-unit.less │ │ ├── labels-badges.less │ │ ├── layouts.less │ │ ├── media.less │ │ ├── mixins.less │ │ ├── modals.less │ │ ├── navbar.less │ │ ├── navs.less │ │ ├── pager.less │ │ ├── pagination.less │ │ ├── popovers.less │ │ ├── progress-bars.less │ │ ├── reset.less │ │ ├── responsive-1200px-min.less │ │ ├── responsive-767px-max.less │ │ ├── responsive-768px-979px.less │ │ ├── responsive-navbar.less │ │ ├── responsive-utilities.less │ │ ├── responsive.less │ │ ├── scaffolding.less │ │ ├── sprites.less │ │ ├── tables.less │ │ ├── tests │ │ │ ├── buttons.html │ │ │ ├── css-tests.css │ │ │ ├── css-tests.html │ │ │ ├── forms-responsive.html │ │ │ ├── forms.html │ │ │ ├── navbar-fixed-top.html │ │ │ ├── navbar-static-top.html │ │ │ └── navbar.html │ │ ├── thumbnails.less │ │ ├── tooltip.less │ │ ├── type.less │ │ ├── utilities.less │ │ ├── variables.less │ │ └── wells.less │ └── package.json │ ├── date-utils.min.js │ ├── fastclick.js │ ├── hoodie.accountbar.bootstrap.js │ ├── jquery.hammer.min.js │ ├── jquery.scrollTo.min.js │ ├── jquery.timeago.js │ ├── jquery │ ├── .gitignore │ ├── README.md │ ├── component.json │ ├── composer.json │ ├── jquery-migrate.js │ ├── jquery-migrate.min.js │ ├── jquery.js │ ├── jquery.min.js │ └── package.json │ ├── l10n.js │ ├── leaflet.label │ ├── .gitattributes │ ├── .gitignore │ ├── CHANGELOG.md │ ├── Jakefile.js │ ├── MIT-LICENCE.txt │ ├── README.md │ ├── bower.json │ ├── build │ │ ├── build.js │ │ ├── deps.js │ │ ├── hint.js │ │ └── hintrc.js │ ├── dist │ │ ├── images │ │ │ └── death.png │ │ ├── leaflet.label-src.js │ │ ├── leaflet.label.css │ │ └── leaflet.label.js │ ├── example │ │ └── label.html │ ├── libs │ │ └── leaflet │ │ │ ├── images │ │ │ ├── layers.png │ │ │ ├── marker-icon.png │ │ │ ├── marker-icon@2x.png │ │ │ └── marker-shadow.png │ │ │ ├── leaflet-src.js │ │ │ ├── leaflet.css │ │ │ ├── leaflet.ie.css │ │ │ └── leaflet.js │ └── src │ │ ├── FeatureGroup.Label.js │ │ ├── Label.js │ │ ├── Leaflet.label.js │ │ ├── Map.Label.js │ │ ├── Marker.Label.js │ │ ├── Path.Label.js │ │ └── copyright.js │ ├── leaflet │ ├── .gitignore │ ├── CHANGELOG.md │ ├── CONTRIBUTING.md │ ├── Jakefile.js │ ├── LICENSE │ ├── README.md │ ├── bower.json │ ├── build │ │ ├── build.html │ │ ├── build.js │ │ ├── deps.js │ │ └── hintrc.js │ ├── debug │ │ ├── css │ │ │ ├── mobile.css │ │ │ └── screen.css │ │ ├── hacks │ │ │ └── jitter.html │ │ ├── leaflet-include.js │ │ ├── map │ │ │ ├── canvas.html │ │ │ ├── controls.html │ │ │ ├── geolocation.html │ │ │ ├── image-overlay.html │ │ │ ├── map-mobile.html │ │ │ ├── map.html │ │ │ ├── max-bounds.html │ │ │ ├── scroll.html │ │ │ ├── simple-proj.html │ │ │ ├── wms-marble.html │ │ │ ├── wms.html │ │ │ └── zoomlevels.html │ │ ├── tests │ │ │ ├── add_remove_layers.html │ │ │ ├── bringtoback.html │ │ │ ├── click_on_canvas.html │ │ │ ├── click_on_canvas_broken.html │ │ │ ├── opacity.html │ │ │ └── removetilewhilepan.html │ │ └── vector │ │ │ ├── bounds-extend.html │ │ │ ├── editable.html │ │ │ ├── feature-group-bounds.html │ │ │ ├── geojson-sample.js │ │ │ ├── geojson.html │ │ │ ├── rectangle.html │ │ │ ├── route.js │ │ │ ├── touchzoomemu.html │ │ │ ├── us-states.js │ │ │ ├── vector-bounds.html │ │ │ ├── vector-canvas.html │ │ │ ├── vector-mobile.html │ │ │ ├── vector-simple.html │ │ │ └── vector.html │ ├── dist │ │ ├── images │ │ │ ├── layers.png │ │ │ ├── marker-icon.png │ │ │ ├── marker-icon@2x.png │ │ │ └── marker-shadow.png │ │ ├── leaflet-src.js │ │ ├── leaflet.css │ │ ├── leaflet.ie.css │ │ └── leaflet.js │ ├── spec │ │ ├── happen.js │ │ ├── jasmine │ │ │ ├── MIT.LICENSE │ │ │ ├── jasmine-html.js │ │ │ ├── jasmine.css │ │ │ └── jasmine.js │ │ ├── runner.html │ │ └── suites │ │ │ ├── LeafletSpec.js │ │ │ ├── SpecHelper.js │ │ │ ├── control │ │ │ ├── Control.LayersSpec.js │ │ │ └── Control.ScaleSpec.js │ │ │ ├── core │ │ │ ├── ClassSpec.js │ │ │ ├── EventsSpec.js │ │ │ └── UtilSpec.js │ │ │ ├── dom │ │ │ ├── DomEventSpec.js │ │ │ └── DomUtilSpec.js │ │ │ ├── geo │ │ │ ├── LatLngBoundsSpec.js │ │ │ ├── LatLngSpec.js │ │ │ └── ProjectionSpec.js │ │ │ ├── geometry │ │ │ ├── BoundsSpec.js │ │ │ ├── PointSpec.js │ │ │ └── TransformationSpec.js │ │ │ ├── layer │ │ │ ├── TileLayerSpec.js │ │ │ └── vector │ │ │ │ ├── CircleSpec.js │ │ │ │ └── PolylineGeometrySpec.js │ │ │ └── map │ │ │ └── MapSpec.js │ └── src │ │ ├── Leaflet.js │ │ ├── control │ │ ├── Control.Attribution.js │ │ ├── Control.Layers.js │ │ ├── Control.Scale.js │ │ ├── Control.Zoom.js │ │ └── Control.js │ │ ├── copyright.js │ │ ├── core │ │ ├── Browser.js │ │ ├── Class.js │ │ ├── Events.js │ │ ├── Handler.js │ │ └── Util.js │ │ ├── dom │ │ ├── DomEvent.DoubleTap.js │ │ ├── DomEvent.MsTouch.js │ │ ├── DomEvent.js │ │ ├── DomUtil.js │ │ ├── Draggable.js │ │ ├── PosAnimation.Timer.js │ │ └── PosAnimation.js │ │ ├── geo │ │ ├── LatLng.js │ │ ├── LatLngBounds.js │ │ ├── crs │ │ │ ├── CRS.EPSG3395.js │ │ │ ├── CRS.EPSG3857.js │ │ │ ├── CRS.EPSG4326.js │ │ │ ├── CRS.Simple.js │ │ │ └── CRS.js │ │ └── projection │ │ │ ├── Projection.LonLat.js │ │ │ ├── Projection.Mercator.js │ │ │ ├── Projection.SphericalMercator.js │ │ │ └── Projection.js │ │ ├── geometry │ │ ├── Bounds.js │ │ ├── LineUtil.js │ │ ├── Point.js │ │ ├── PolyUtil.js │ │ └── Transformation.js │ │ ├── images │ │ └── marker.svg │ │ ├── layer │ │ ├── FeatureGroup.js │ │ ├── GeoJSON.js │ │ ├── ImageOverlay.js │ │ ├── LayerGroup.js │ │ ├── Popup.js │ │ ├── marker │ │ │ ├── DivIcon.js │ │ │ ├── Icon.Default.js │ │ │ ├── Icon.js │ │ │ ├── Marker.Drag.js │ │ │ ├── Marker.Popup.js │ │ │ └── Marker.js │ │ ├── tile │ │ │ ├── TileLayer.Canvas.js │ │ │ ├── TileLayer.WMS.js │ │ │ └── TileLayer.js │ │ └── vector │ │ │ ├── Circle.js │ │ │ ├── CircleMarker.js │ │ │ ├── MultiPoly.js │ │ │ ├── Path.Popup.js │ │ │ ├── Path.SVG.js │ │ │ ├── Path.VML.js │ │ │ ├── Path.js │ │ │ ├── Polygon.js │ │ │ ├── Polyline.Edit.js │ │ │ ├── Polyline.js │ │ │ ├── Rectangle.js │ │ │ └── canvas │ │ │ ├── Circle.Canvas.js │ │ │ ├── Path.Canvas.js │ │ │ ├── Polygon.Canvas.js │ │ │ └── Polyline.Canvas.js │ │ └── map │ │ ├── Map.js │ │ ├── anim │ │ ├── Map.PanAnimation.js │ │ └── Map.ZoomAnimation.js │ │ ├── ext │ │ ├── Map.Control.js │ │ ├── Map.Geolocation.js │ │ └── Map.Popup.js │ │ └── handler │ │ ├── Map.BoxZoom.js │ │ ├── Map.DoubleClickZoom.js │ │ ├── Map.Drag.js │ │ ├── Map.Keyboard.js │ │ ├── Map.ScrollWheelZoom.js │ │ └── Map.TouchZoom.js │ └── underscore │ ├── .gitignore │ ├── .npmignore │ ├── .travis.yml │ ├── CNAME │ ├── CONTRIBUTING.md │ ├── LICENSE │ ├── README.md │ ├── Rakefile │ ├── bower.json │ ├── docs │ ├── docco.css │ ├── favicon.ico │ ├── images │ │ ├── background.png │ │ └── underscore.png │ └── underscore.html │ ├── favicon.ico │ ├── index.html │ ├── index.js │ ├── package.json │ ├── test │ ├── arrays.js │ ├── chaining.js │ ├── collections.js │ ├── functions.js │ ├── index.html │ ├── objects.js │ ├── speed.js │ ├── utility.js │ └── vendor │ │ ├── jquery.js │ │ ├── jslitmus.js │ │ ├── qunit.css │ │ ├── qunit.js │ │ └── runner.js │ ├── underscore-min.js │ └── underscore.js └── screenshot.png /.bowerrc: -------------------------------------------------------------------------------- 1 | { 2 | "directory": "www/vendor" 3 | } -------------------------------------------------------------------------------- /.github/first-timers.yml: -------------------------------------------------------------------------------- 1 | repository: camp 2 | labels: 3 | - first-timers-only 4 | - hacktoberfest 5 | - available 6 | template: .github/FIRST_TIMERS_ISSUE_TEMPLATE.md -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules 3 | .hoodie 4 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | Hoodie MapChat 2 | ============== 3 | 4 | An open source, offline capable, map based demo app. 5 | 6 | ![Screenshot](https://raw.github.com/hoodiehq/example-mapchat/master/screenshot.png) 7 | 8 | Local Setup 9 | ----------- 10 | 11 | ``` 12 | git clone https://github.com/hoodiehq/hoodie-app-mapchat.git 13 | cd hoodie-app-mapchat 14 | npm install --production 15 | npm start 16 | ``` 17 | 18 | Note that there are a few [known issues](https://github.com/hoodiehq/hoodie-app-mapchat/issues/15). 19 | 20 | Implementation / Dependencies 21 | ----------------------------- 22 | 23 | Hoodie MapChat is implemented with static HTML, JavaScript and CSS, 24 | optimized for a low learning curve. There is no build process or 25 | pre compilation necessary to use it. The following libraries are used: 26 | 27 | 1. [jQuery](http://jquery.com) 28 | 2. [ICanHaz](http://icanhazjs.com/) – Simple & powerful client-side templating 29 | 3. [Leaflet](http://leafletjs.com/) – Mobile-Friendly Interactive Maps 30 | 4. [webL10n](https://github.com/fabi1cazenave/) – Client-side internationalization / localization library 31 | 32 | 33 | License 34 | ------- 35 | 36 | Licensed under the Apache License 2.0. 37 | -------------------------------------------------------------------------------- /bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "hoodie-mapchat", 3 | "dependencies": { 4 | "jquery": "~1.9", 5 | "bootstrap": "~2.3", 6 | "bootstrap.modalform": "~1.0", 7 | "leaflet": "~0.5", 8 | "leaflet.label": "git://github.com/Leaflet/Leaflet.label.git", 9 | "underscore": "~1.4", 10 | "icanhaz": "~0.10" 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "hoodie-app-mapchat", 3 | "version": "1.0.2", 4 | "type": "app", 5 | "scripts": { 6 | "start": "hoodie" 7 | }, 8 | "dependencies": { 9 | "hoodie": "^28.0.0" 10 | } 11 | } -------------------------------------------------------------------------------- /public/assets/app.css: -------------------------------------------------------------------------------- 1 | * { 2 | -moz-box-sizing: border-box; 3 | -webkit-box-sizing: border-box; 4 | box-sizing: border-box; 5 | 6 | /* This gets rid of the ugly orange android focus rects*/ 7 | -webkit-tap-highlight-color: rgba(0,0,0,0); 8 | } 9 | 10 | .group:after { 11 | content: ""; 12 | display: table; 13 | clear: both; 14 | } 15 | 16 | a{ 17 | color: inherit; 18 | } 19 | 20 | .right{ 21 | float:right; 22 | } 23 | 24 | 25 | /* ========================================================================== 26 | Hoodie Sign In / Sign Up / Sign out stylings 27 | ========================================================================== */ 28 | 29 | /* hide contents until we know if user is signed in or not */ 30 | body .hoodie-account-signedin, 31 | body .hoodie-account-signedout, 32 | body .hoodie-account-error { 33 | display: none; 34 | } 35 | 36 | html[data-hoodie-account-status=signedin] .hoodie-account-signedin, 37 | html[data-hoodie-account-status=error] .hoodie-account-error, 38 | html[data-hoodie-account-status=signedout] .hoodie-account-signedout { 39 | display: block; 40 | } 41 | 42 | 43 | 44 | @media (max-width: 480px) 45 | { 46 | .modal { 47 | position: fixed; 48 | top: 3%; 49 | right: 3%; 50 | left: 3%; 51 | width: auto; 52 | margin: 0; 53 | } 54 | .modal.fade.in { 55 | top: 2%; 56 | width: 94%; 57 | margin-left: 0; 58 | } 59 | .modal-body { 60 | max-height: 350px; 61 | padding: 15px; 62 | overflow-y: auto; 63 | -webkit-overflow-scrolling: touch; 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /public/assets/app.js: -------------------------------------------------------------------------------- 1 | // Set correct Hoodie API endpoint depending on where the app is running 2 | var HOODIE_API_URL; 3 | if (! /(localhost|\.dev)$/.test(location.hostname)) { 4 | // when running localy, use standard andpoint (defaults to current host) 5 | HOODIE_API_URL = Config.hoodieUrl; 6 | } 7 | 8 | // Init Hoodie and tell it where its API is 9 | var t = document.webL10n.get; 10 | 11 | // getting rid of this one soon 12 | bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, 13 | 14 | (function(window, document, $){ 15 | 16 | var $document = $(document) 17 | var $window = $(window) 18 | var $el 19 | 20 | // 21 | // gets executed when dom ready 22 | // 23 | function init (event) { 24 | 25 | // FastClick makes mobile devices respond quicker to touch events 26 | new FastClick(document.body); 27 | 28 | // localization 29 | document.documentElement.lang = document.webL10n.getLanguage(); 30 | document.documentElement.dir = document.webL10n.getDirection(); 31 | 32 | 33 | var throttledResize = _.throttle(sendResizeEvent, 300); 34 | $window.on('resize', function(event){ 35 | throttledResize(); 36 | }) 37 | 38 | findElements() 39 | render() 40 | $.event.trigger('app:ready') 41 | } 42 | window.addEventListener('localized', init, false); 43 | 44 | 45 | // 46 | // 47 | // 48 | function findElements() { 49 | $el = $('html') 50 | $title = $('title') 51 | } 52 | 53 | 54 | // 55 | // 56 | // 57 | function render() { 58 | $title.text( Config.appName ) 59 | } 60 | 61 | 62 | // 63 | // 64 | // 65 | function sendResizeEvent() { 66 | $.event.trigger('app:resize') 67 | } 68 | 69 | })(window, document, jQuery); 70 | -------------------------------------------------------------------------------- /public/assets/config.js: -------------------------------------------------------------------------------- 1 | var Config = { 2 | appName : 'Hoodie MapChat', 3 | hoodieUrl : undefined, // undefined defaults to current host 4 | 5 | messageTemplates : [ 6 | // see local/data.in 7 | "ILikeIt", 8 | "SeeYouThere", 9 | "WhatIsThisAbout" 10 | ], 11 | 12 | bookmarks : [ 13 | { name: "Berlin", lat : 52.500274, lng:13.419693, zoom: 16 }, 14 | { name: "Zurich", lat : 47.369234, lng:8.539252, zoom: 14 }, 15 | { name: "Nottingham", lat : 52.95474, lng:-1.158972, zoom: 16 }, 16 | ] 17 | } 18 | -------------------------------------------------------------------------------- /public/assets/controls/controls.css: -------------------------------------------------------------------------------- 1 | #controls .hoodie-username { 2 | font-weight: bold; 3 | } 4 | #controls .hoodie-accountbar { 5 | position: fixed; 6 | top: 10px; 7 | right: 10px; 8 | z-index: 100; 9 | white-space: nowrap; 10 | transition: top .2s linear; 11 | } 12 | #controls.hide .hoodie-accountbar { 13 | top: -20px; 14 | 15 | } 16 | #controls .hoodie-accountbar > div { 17 | float: left; 18 | margin-left: 10px; 19 | } 20 | #controls .btn-group { 21 | box-shadow: 0 0 8px rgba(0, 0, 0, 0.4); 22 | border-radius: 4px; 23 | } 24 | 25 | #controls .geolocation i.icon-refresh, 26 | #controls .geolocation.loading i.icon-screenshot{ 27 | display: none; 28 | } 29 | @-webkit-keyframes rotating { 30 | from { -webkit-transform: rotate(0deg); } 31 | to { -webkit-transform: rotate(360deg); } 32 | } 33 | 34 | #controls .geolocation.loading i.icon-refresh{ 35 | display: inline-block; 36 | -webkit-animation: rotating 1.3s linear infinite; 37 | } 38 | 39 | @media (max-width: 480px) { 40 | #marker-detail.detail ~ .mapContainer #controls, 41 | #marker-detail.detail ~ .mapContainer .leaflet-control-container, 42 | #markerList[data-mode="show"] ~ .mapContainer #controls, 43 | #markerList[data-mode="show"] ~ .mapContainer .leaflet-control-container { 44 | display: none; 45 | } 46 | } -------------------------------------------------------------------------------- /public/assets/controls/controls.js: -------------------------------------------------------------------------------- 1 | (function(document, window, $, hoodie){ 2 | 3 | var $document = $(document); 4 | var $el, $leafletControls, $geolocateButton; 5 | 6 | // 7 | // init gets run when app:ready event gets fired 8 | // on app startup. 9 | // 10 | function init() { 11 | findElements() 12 | bindToEvents() 13 | render() 14 | show() 15 | }; 16 | $document.on('app:ready', init) 17 | 18 | // 19 | // cache jQuery selectors 20 | // 21 | function findElements () { 22 | $el = $('#controls') 23 | $menu = $el.find('ul.menu') 24 | $leafletControls = $('.leaflet-control-container') 25 | $geolocateButton = $el.find('.geolocation') 26 | } 27 | 28 | // 29 | // bind to outsite events 30 | // 31 | function bindToEvents() { 32 | $el.on('click','.geolocate' , handleGeolocateClick); 33 | $el.on('click','.bookmark' , handleBookmarkSelect); 34 | 35 | $document.on("map:geolocated", handleGeolocateDone) 36 | $document.on("map:geolocation:error", handleGeolocateDone) 37 | $document.on("dialog:show", hide) 38 | $document.on("dialog:hide", show) 39 | 40 | hoodie.account.on('signout', hide) 41 | } 42 | 43 | // 44 | // 45 | // 46 | function render () { 47 | var html = ich.menu( {username: hoodie.account.username, Config: Config} ); 48 | $menu.html( html ) 49 | translate() 50 | } 51 | 52 | // 53 | // 54 | // 55 | function translate () { 56 | document.webL10n.translate( $menu[0] ) 57 | } 58 | 59 | // 60 | // 61 | // 62 | function show() { 63 | $el.removeClass('hide') 64 | $leafletControls.show() 65 | } 66 | 67 | // 68 | // 69 | // 70 | function hide() { 71 | $el.addClass('hide') 72 | $leafletControls.hide() 73 | } 74 | 75 | // 76 | // 77 | // 78 | function handleGeolocateClick (event) { 79 | event.preventDefault() 80 | $geolocateButton.addClass('loading'); 81 | $.event.trigger("map:geolocate") 82 | } 83 | 84 | // 85 | // 86 | // 87 | function handleGeolocateDone (event) { 88 | $geolocateButton.removeClass('loading'); 89 | } 90 | 91 | // 92 | // 93 | // 94 | function handleBookmarkSelect (event) { 95 | var $target = $(event.target) 96 | $.event.trigger('bookmark:open', [$target.data(), $target.data('zoom')]) 97 | } 98 | 99 | })(document, window, jQuery, hoodie); -------------------------------------------------------------------------------- /public/assets/dialogs/dialogs.css: -------------------------------------------------------------------------------- 1 | #dialog { 2 | width: 100%; 3 | height: 100%; 4 | position: absolute; 5 | z-index: 1000; 6 | color: #fff; 7 | 8 | background: rgba(0,0,0,.9) 9 | } 10 | 11 | #dialog .content { 12 | overflow: hidden; 13 | padding: 40px; 14 | position: relative; 15 | 16 | background: #111; 17 | background: url(../images/noise.png), -moz-radial-gradient(50% 0, circle cover, #333 0%, #000 100%); 18 | background: url(../images/noise.png), -webkit-radial-gradient(50% 0, circle cover, #333 0%,#000 100%); 19 | background: url(../images/noise.png), -o-radial-gradient(50% 0, circle cover, #333 0%,#000 100%); 20 | background: url(../images/noise.png), -ms-radial-gradient(50% 0, circle cover, #333 0%,#000 100%); 21 | background: url(../images/noise.png), radial-gradient(circle at 50% 0, #333 0%,#000 100%); 22 | } 23 | 24 | #dialog h1, 25 | #dialog h2{ 26 | text-align: center; 27 | } 28 | #dialog h2 { 29 | font-size: 24px; 30 | } 31 | 32 | #dialog .alert { 33 | padding: 16px 35px 16px 14px; 34 | margin-bottom: 10px; 35 | } 36 | #dialog button { 37 | margin-top: 10px; 38 | } 39 | #dialog img{ 40 | margin: 1em auto; 41 | display: block; 42 | } 43 | 44 | #dialog input[type="text"], 45 | #dialog input[type="password"]{ 46 | border-radius: 6px; 47 | margin: .75em 0 .5em; 48 | padding: 18px 10px; 49 | font-size: 16px; 50 | line-height: 16px; 51 | height: 52px; 52 | } 53 | 54 | /* login */ 55 | #dialog .login.content { 56 | border-radius: 0 0 10px 10px; 57 | box-shadow: 0 0 5px 1px #000; 58 | max-width: 30em; 59 | margin: 0 auto; 60 | } 61 | 62 | 63 | @media (max-width: 480px) { 64 | #dialog .content { 65 | padding: 20px; 66 | } 67 | } 68 | -------------------------------------------------------------------------------- /public/assets/images/active-marker-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hoodiehq/hoodie-app-mapchat/96792cd7ece1a21c385eb4e8e26f2583f860014d/public/assets/images/active-marker-icon.png -------------------------------------------------------------------------------- /public/assets/images/marker-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hoodiehq/hoodie-app-mapchat/96792cd7ece1a21c385eb4e8e26f2583f860014d/public/assets/images/marker-icon.png -------------------------------------------------------------------------------- /public/assets/images/marker-shadow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hoodiehq/hoodie-app-mapchat/96792cd7ece1a21c385eb4e8e26f2583f860014d/public/assets/images/marker-shadow.png -------------------------------------------------------------------------------- /public/assets/images/noise.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hoodiehq/hoodie-app-mapchat/96792cd7ece1a21c385eb4e8e26f2583f860014d/public/assets/images/noise.png -------------------------------------------------------------------------------- /public/assets/locale/data.ini: -------------------------------------------------------------------------------- 1 | [en] 2 | NewMarker = New marker 3 | searchInput.placeholder = search 4 | SignIn = Sign in 5 | SignOut = Sign out 6 | SignUp = Sign up 7 | usernameInput.placeholder = username 8 | passwordInput.placeholder = password 9 | Name = Name 10 | Save = Save 11 | Messages = {[ plural(n) ]} 12 | Messages[zero] = 0 messages 13 | Messages[one] = 1 message 14 | Messages[other] = {{n}} messages 15 | edit = edit 16 | delete = delete 17 | NewMessage.placeholder = New message 18 | noName = no Name 19 | Send = Send 20 | Bookmarks = Bookmarks 21 | Templates = Templates: 22 | ILikeIt = I like it! 23 | SeeYouThere = See you there! 24 | WhatIsThisAbout = What is this about? 25 | 26 | [de] 27 | NewMarker = Neuer Marker 28 | searchInput.placeholder = Suche 29 | SignIn = Anmelden 30 | SignOut = Abmelden 31 | SignOut = Registrieren 32 | usernameInput.placeholder = Nutzername 33 | passwordInput.placeholder = Passwort 34 | Name = Name 35 | Save = Speichern 36 | Messages = {[ plural(n) ]} 37 | Messages[zero] = 0 Nachrichten 38 | Messages[one] = 1 Nachricht 39 | Messages[other] = {{n}} Nachrichten 40 | edit = bearbeiten 41 | delete = löschen 42 | NewMessage.placeholder = Neue Nachricht 43 | noName = Kein Name 44 | Send = Senden 45 | Bookmarks = Favoriten 46 | Templates = Vorlagen: 47 | ILikeIt = Finde ich gut! 48 | SeeYouThere = Bis gleich! 49 | WhatIsThisAbout = Worum geht es hier? 50 | -------------------------------------------------------------------------------- /public/assets/locale/jquery.timeago.de.js: -------------------------------------------------------------------------------- 1 | // German 2 | jQuery.timeago.settings.strings = { 3 | prefixAgo: "vor", 4 | prefixFromNow: "in", 5 | suffixAgo: "", 6 | suffixFromNow: "", 7 | seconds: "wenigen Sekunden", 8 | minute: "etwa einer Minute", 9 | minutes: "%d Minuten", 10 | hour: "etwa einer Stunde", 11 | hours: "%d Stunden", 12 | day: "etwa einem Tag", 13 | days: "%d Tagen", 14 | month: "etwa einem Monat", 15 | months: "%d Monaten", 16 | year: "etwa einem Jahr", 17 | years: "%d Jahren" 18 | }; -------------------------------------------------------------------------------- /public/assets/marker-detail/marker-detail.css: -------------------------------------------------------------------------------- 1 | #marker-detail { 2 | position: absolute; 3 | left: 280px; 4 | right: 0; 5 | background: #FFF; 6 | z-index: 200; 7 | padding: 10px; 8 | display: none; 9 | transition: left .2s; 10 | } 11 | 12 | #marker-detail.preview { 13 | display: block; 14 | bottom: 0; 15 | } 16 | 17 | #marker-detail.preview .messages{ 18 | display: none; 19 | } 20 | 21 | #marker-detail.detail { 22 | display: block; 23 | top: 40%; 24 | } 25 | 26 | #marker-detail:before { 27 | content: ''; 28 | display: block; 29 | position: absolute; 30 | top: -20px; 31 | left: 0; 32 | right: 0; 33 | bottom: 100%; 34 | background: rgba(255,255,255,.5); 35 | } 36 | /* 37 | #marker-detail[data-mode="hide"] { 38 | display: none; 39 | } 40 | */ 41 | 42 | #marker-detail .close { 43 | position: absolute; 44 | top: 10px; 45 | right: 15px; 46 | font-size: 36px; 47 | font-weight: bold; 48 | } 49 | 50 | #marker-detail article.message { 51 | padding-top: 10px; 52 | margin: 10px 0 0; 53 | border-top: 1px solid #ddd; 54 | } 55 | 56 | #marker-detail h3, 57 | #marker-detail p { 58 | margin: 0; 59 | padding: 0; 60 | margin: 0; 61 | } 62 | 63 | #marker-detail header h3{ 64 | margin: 0 40px 0 0; 65 | } 66 | 67 | #marker-detail select.messageTemplates{ 68 | margin: 3px; 69 | width: auto; 70 | } 71 | 72 | #marker-detail .messages { 73 | margin: 10px 0 0; 74 | } 75 | #marker-detail textarea { 76 | display: block; 77 | width: 100%; 78 | height: 5em; 79 | } 80 | 81 | #marker-detail h3 input { 82 | font-size: inherit; 83 | line-height: 1em; 84 | height: 1.6em; 85 | width: auto; 86 | } 87 | 88 | #markerList[data-mode="show"] ~ #marker-detail { 89 | left: 280px; 90 | } 91 | 92 | @media only screen and (max-width: 480px){ 93 | #marker-detail { 94 | left: 0px; 95 | width: 100%; 96 | } 97 | } -------------------------------------------------------------------------------- /public/vendor/bootstrap.modalform/LICENSE: -------------------------------------------------------------------------------- 1 | Permission is hereby granted, free of charge, to any person obtaining 2 | a copy of this software and associated documentation files (the 3 | "Software"), to deal in the Software without restriction, including 4 | without limitation the rights to use, copy, modify, merge, publish, 5 | distribute, sublicense, and/or sell copies of the Software, and to 6 | permit persons to whom the Software is furnished to do so, subject to 7 | the following conditions: 8 | 9 | The above copyright notice and this permission notice shall be 10 | included in all copies or substantial portions of the Software. 11 | 12 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 13 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 14 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 15 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 16 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 17 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 18 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------- /public/vendor/bootstrap.modalform/README.md: -------------------------------------------------------------------------------- 1 | bootstrap modal forms 2 | ======================= 3 | 4 | Example usage: 5 | 6 | ```javascript 7 | $.modalForm({ 8 | fields: [ 'username', 'password' ], 9 | submit: 'Sign In' 10 | }).on('submit', function(event, inputs) { 11 | // event.target =>