Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
alexandre melard committed Jun 5, 2015
1 parent 247be6e commit 32eb163
Show file tree
Hide file tree
Showing 43 changed files with 131 additions and 134 deletions.
7 changes: 0 additions & 7 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,3 @@
/libpeerconnection.log
npm-debug.log
testem.log
.idea
.bowerrc
.editorconfig
.ember-cli
.jshintrc
.travis.yml

14 changes: 6 additions & 8 deletions .jshintrc
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
{
"predef": [
"document",
"window",
"-Promise",
"Promise",
"ol",
"$",
"google"
],
"document",
"window",
"-Promise",
"ol",
"$",
"google"],
"browser": true,
"boss": true,
"curly": true,
Expand Down
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ cache:
- node_modules

before_install:
- export PATH=/usr/local/phantomjs-2.0.0/bin:$PATH
- "npm config set spin false"
- "npm install -g npm@^2"

Expand Down
12 changes: 6 additions & 6 deletions Brocfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,21 +30,21 @@ app.import('bower_components/x-editable/dist/bootstrap3-editable/js/bootstrap-ed

app.import('bower_components/x-editable/dist/bootstrap3-editable/css/bootstrap-editable.css');
app.import('bower_components/x-editable/dist/bootstrap3-editable/img/loading.gif', {
destDir: 'assets/images'
destDir: 'assets/images'
});
app.import('bower_components/x-editable/dist/bootstrap3-editable/img/clear.png', {
destDir: 'assets/images'
destDir: 'assets/images'
});

app.import('bower_components/bootstrap/dist/css/bootstrap.css');
app.import('bower_components/bootstrap/dist/css/bootstrap.css.map', {
destDir: 'assets'
destDir: 'assets'
});

var bootstrapFonts = pickFiles('bower_components/bootstrap/dist/', {
srcDir: '/fonts',
files: ['*'],
destDir: '/fonts'
srcDir: '/fonts',
files: ['*'],
destDir: '/fonts'
});


Expand Down
8 changes: 5 additions & 3 deletions app/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,11 @@ import Resolver from 'ember/resolver';
import loadInitializers from 'ember/load-initializers';
import config from './config/environment';

var App;

Ember.MODEL_FACTORY_INJECTIONS = true;

var App = Ember.Application.extend({
App = Ember.Application.extend({
modulePrefix: config.modulePrefix,
podModulePrefix: config.podModulePrefix,
Resolver: Resolver
Expand All @@ -24,8 +26,8 @@ Ember.Route.reopen({
'mtgItem',
'mtgLevel',
'mtgTrail'].forEach(function(model) {
me.store.find(model);
});
me.store.find(model);
});
}
});

Expand Down
14 changes: 7 additions & 7 deletions app/controllers/map-draw.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
* Created by alex on 04/04/2015.
*/
import Ember from 'ember';
import * as consts from '../utils/map-constants.js';
import * as consts from '../utils/map-constants';
import tooltip from '../utils/ol-tooltip';
import getRGB from "../utils/color-get-rgb.js";
import calcBrightness from "../utils/color-get-brightness.js";
import colorLuminance from "../utils/color-get-luminance.js";
import getRoute from "../utils/google-route-between-a-and-b.js";
import formatLength from "../utils/map-format-length.js";
import formatArea from "../utils/map-format-area.js";
import getRGB from "../utils/color-get-rgb";
import calcBrightness from "../utils/color-get-brightness";
import colorLuminance from "../utils/color-get-luminance";
import getRoute from "../utils/google-route-between-a-and-b";
import formatLength from "../utils/map-format-length";
import formatArea from "../utils/map-format-area";

export default Ember.Controller.extend({

Expand Down
6 changes: 3 additions & 3 deletions app/controllers/map-location.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
* Created by alex on 06/04/2015.
*/
import Ember from 'ember';
import getLatLng from '../utils/google-geocoder-latlng.js';
import geoLoc from '../utils/geocoding-watch-position.js';
import consts from '../utils/map-constants.js';
import getLatLng from '../utils/google-geocoder-latlng';
import geoLoc from '../utils/geocoding-watch-position';
import consts from '../utils/map-constants';

export default Ember.Controller.extend({
needs: ['map'],
Expand Down
4 changes: 2 additions & 2 deletions app/controllers/map-settings.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Ember from 'ember';
import getStyleFunction from "../utils/map-style.js";
import consts from "../utils/map-constants.js";
import getStyleFunction from "../utils/map-style";
import consts from "../utils/map-constants";

/**
* Created by alex on 29/03/2015.
Expand Down
4 changes: 2 additions & 2 deletions app/controllers/map.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Ember from 'ember';
import getStyleFunction from "../utils/map-style.js";
import conf from "../config/environment.js";
import getStyleFunction from "../utils/map-style";
import conf from "../config/environment";

/**
* Created by alex on 29/03/2015.
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/mtg-item.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Created by alex on 22/04/2015.
*/
import Ember from 'ember';
import consts from '../utils/map-constants.js';
import consts from '../utils/map-constants';

export default Ember.Controller.extend({
needs: ["mtgTrail"],
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/mtg-level.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Created by alex on 04/04/2015.
*/
import Ember from 'ember';
import * as consts from '../utils/map-constants.js';
import * as consts from '../utils/map-constants';

export default Ember.Controller.extend({
needs: ["mtgTrail"],
Expand Down
6 changes: 3 additions & 3 deletions app/controllers/mtg-trace.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
* Created by alex on 04/04/2015.
*/
import Ember from 'ember';
import * as consts from '../utils/map-constants.js';
import formatLength from "../utils/map-format-length.js";
import file from "../utils/file-io.js";
import * as consts from '../utils/map-constants';
import formatLength from "../utils/map-format-length";
import file from "../utils/file-io";

export default Ember.Controller.extend({
needs: ["mtgTrail"],
Expand Down
8 changes: 4 additions & 4 deletions app/controllers/mtg-trail.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
* Created by alex on 04/04/2015.
*/
import Ember from 'ember';
import * as consts from '../utils/map-constants.js';
import getStyleFunction from "../utils/map-style.js";
import formatLength from "../utils/map-format-length.js";
import file from "../utils/file-io.js";
import * as consts from '../utils/map-constants';
import getStyleFunction from "../utils/map-style";
import formatLength from "../utils/map-format-length";
import file from "../utils/file-io";

export default Ember.Controller.extend({

Expand Down
36 changes: 18 additions & 18 deletions app/index.html
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Mantrailling</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Mantrailling</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">

{{content-for 'head'}}
{{content-for 'head'}}

<link rel="stylesheet" href="assets/vendor.css">
<link rel="stylesheet" href="assets/mantrailling.css">
<link rel="stylesheet" href="assets/vendor.css">
<link rel="stylesheet" href="assets/mantrailling.css">

{{content-for 'head-footer'}}
</head>
<body>
{{content-for 'body'}}
{{content-for 'head-footer'}}
</head>
<body>
{{content-for 'body'}}

<script src="https://maps.googleapis.com/maps/api/js?libraries=places&key=AIzaSyBb1BipElNZJQPhdkSUdX5DxZpPnQV_D3k"></script>
<script src="assets/vendor.js"></script>
<script src="assets/mantrailling.js"></script>
<script src="https://maps.googleapis.com/maps/api/js?libraries=places&key=AIzaSyBb1BipElNZJQPhdkSUdX5DxZpPnQV_D3k"></script>
<script src="assets/vendor.js"></script>
<script src="assets/mantrailling.js"></script>

{{content-for 'body-footer'}}
</body>
{{content-for 'body-footer'}}
</body>
</html>
17 changes: 9 additions & 8 deletions app/initializers/map-command-initializer.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import MapCmd from "../controllers/map-command.js";
import MapCmd from "../controllers/map-command";

export default {
name: 'map-command-initializer',
initialize: function(container, application) {
application.register('map-command-initializer:main', MapCmd, { instantiate: true });
application.inject('controller', 'command', 'map-command-initializer:main');
application.inject('model', 'command', 'map-command-initializer:main');
export default({
name: 'map-command',

initialize: function(registry, application) {
application.register('map-command:main', MapCmd, { instantiate: true });
application.inject('controller', 'command', 'map-command:main');
application.inject('model', 'command', 'map-command:main');
}
};
});

8 changes: 4 additions & 4 deletions app/models/map-linestring.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
* Created by alex on 31/03/2015.
*/
import DS from 'ember-data';
import GeoJSON from '../models/geo-json.js';
import xml2json from '../utils/xml2json.js';
import json2xml from '../utils/json2xml.js';
import consts from '../utils/map-constants.js';
import GeoJSON from '../models/geo-json';
import xml2json from '../utils/xml2json';
import json2xml from '../utils/json2xml';
import consts from '../utils/map-constants';

export default GeoJSON.extend({
gpx: DS.attr('string'), // XML GPS exchange format
Expand Down
2 changes: 1 addition & 1 deletion app/models/map-point.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Created by alex on 31/03/2015.
*/
import DS from 'ember-data';
import GeoJSON from '../models/geo-json.js';
import GeoJSON from '../models/geo-json';

export default GeoJSON.extend({
mapDraw: DS.belongsTo('mapDraw')
Expand Down
2 changes: 1 addition & 1 deletion app/models/map-polygon.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Created by alex on 31/03/2015.
*/
import DS from 'ember-data';
import GeoJSON from '../models/geo-json.js';
import GeoJSON from '../models/geo-json';

export default GeoJSON.extend({
mapDraw: DS.belongsTo('mapDraw')
Expand Down
2 changes: 1 addition & 1 deletion app/models/map-style-color.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import DS from 'ember-data';
import * as consts from '../utils/map-constants.js';
import * as consts from '../utils/map-constants';

/**
* Created by alex on 31/03/2015.
Expand Down
2 changes: 1 addition & 1 deletion app/models/map-style-linestring.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import DS from 'ember-data';
import * as consts from '../utils/map-constants.js';
import * as consts from '../utils/map-constants';

/**
* Created by alex on 31/03/2015.
Expand Down
2 changes: 1 addition & 1 deletion app/models/map-style-point.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import DS from 'ember-data';
import * as consts from '../utils/map-constants.js';
import * as consts from '../utils/map-constants';

/**
* Created by alex on 31/03/2015.
Expand Down
2 changes: 1 addition & 1 deletion app/models/map-style-polygon.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import DS from 'ember-data';
import * as consts from '../utils/map-constants.js';
import * as consts from '../utils/map-constants';

/**
* Created by alex on 31/03/2015.
Expand Down
2 changes: 1 addition & 1 deletion app/models/map-style-stroke.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import DS from 'ember-data';
import * as consts from '../utils/map-constants.js';
import * as consts from '../utils/map-constants';

/**
* Created by alex on 31/03/2015.
Expand Down
2 changes: 1 addition & 1 deletion app/models/map-style-text.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import DS from 'ember-data';
import * as consts from '../utils/map-constants.js';
import * as consts from '../utils/map-constants';

/**
* Created by alex on 31/03/2015.
Expand Down
2 changes: 1 addition & 1 deletion app/models/mtg-style.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import DS from 'ember-data';
import * as consts from '../utils/map-constants.js';
import * as consts from '../utils/map-constants';

/**
* Created by alex on 31/03/2015.
Expand Down
2 changes: 1 addition & 1 deletion app/models/mtg-trail.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import DS from 'ember-data';
import * as consts from '../utils/map-constants.js';
import * as consts from '../utils/map-constants';

/**
* Created by alex on 31/03/2015.
Expand Down
4 changes: 2 additions & 2 deletions app/templates/map-draw.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@
<li>
<table class="">
<tbody>
{{#each row in colors}}
{{#each colors as |row|}}
<tr class="">
{{#each color in row}}
{{#each row as |color|}}
<td {{action 'changeColor' color}} {{bind-attr title=color}} class="color-picker"/>
{{/each}}
</tr>
Expand Down
7 changes: 4 additions & 3 deletions app/templates/map-layers.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,13 @@
</tr>
</thead>
<tbody>
{{#each layer in tileLayers itemController="mapLayer"}}
{{#each tileLayers as |layer|}}

<tr {{bind-attr id=layer.model.identifier}}>
<td class="layer-id">
<label class="hint--top" {{bind-attr data-toggle="tooltip" data-original-title=layer.model.title}}>
<label {{bind-attr data-toggle="tooltip" data-original-title=layer.title}}>
{{input type="checkbox" checked=layer.visible}}
{{str-sub layer.model.title 20}}
{{str-sub layer.title 20}}
</label>
</td>
<td>
Expand Down
2 changes: 1 addition & 1 deletion app/templates/mtg-items.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
</tr>
</thead>
<tbody>
{{#each item in selectedTrail.items itemController="mtgItem"}}
{{#each selectedTrail.items as |item|}}
<tr>
<td class="mtg-item-index-container">
{{item.model.index}}
Expand Down
2 changes: 1 addition & 1 deletion app/templates/mtg-levels.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
</tr>
</thead>
<tbody>
{{#each level in levels}}
{{#each levels as |level|}}
<tr class={{if level.selected 'success' ''}}>
<td {{action 'changeLevel' level }}>
{{level.name}}
Expand Down
Loading

0 comments on commit 32eb163

Please sign in to comment.