Remove use of global variables + remove ember-cli-content-security-policy from package.json to avoid bogus csp violation warnings
authorymh <ymh.work@gmail.com>
Fri, 12 Feb 2016 22:31:48 +0100
changeset 123 4c97e9da1416
parent 122 b37fde30dd4a
child 124 93234b0b12f3
Remove use of global variables + remove ember-cli-content-security-policy from package.json to avoid bogus csp violation warnings
cms/app-client/app/adapters/application.js
cms/app-client/app/components/visu-carto.js
cms/app-client/app/components/visu-langues.js
cms/app-client/ember-cli-build.js
cms/app-client/package.json
cms/app-client/vendor/shims/ammaps.js
--- a/cms/app-client/app/adapters/application.js	Fri Feb 12 15:30:32 2016 +0100
+++ b/cms/app-client/app/adapters/application.js	Fri Feb 12 22:31:48 2016 +0100
@@ -1,4 +1,4 @@
-import DS from 'ember-data';
+//import DS from 'ember-data';
 
 export { default } from 'ember-data-fixture-adapter';
 
--- a/cms/app-client/app/components/visu-carto.js	Fri Feb 12 15:30:32 2016 +0100
+++ b/cms/app-client/app/components/visu-carto.js	Fri Feb 12 22:31:48 2016 +0100
@@ -1,4 +1,5 @@
 import Ember from 'ember';
+import AmCharts from 'ammaps';
 
 export default Ember.Component.extend({
   // storage: Ember.inject.service(),
--- a/cms/app-client/app/components/visu-langues.js	Fri Feb 12 15:30:32 2016 +0100
+++ b/cms/app-client/app/components/visu-langues.js	Fri Feb 12 22:31:48 2016 +0100
@@ -1,4 +1,5 @@
 import Ember from 'ember';
+import d3 from 'd3';
 
 export default Ember.Component.extend({
   didInsertElement: function(){
@@ -175,7 +176,7 @@
             .attr("y", function(d) { return y(d.y); })
             .attr("width", function(d) { return x(d.x + d.dx) - x(d.x); })
             .attr("height", function(d) { return y(d.y + d.dy) - y(d.y); })
-            .attr("fill", function(d) { return (d.color || "#bbb")});
+            .attr("fill", function(d) { return (d.color || "#bbb"); });
       }
 
       function name(d) {
--- a/cms/app-client/ember-cli-build.js	Fri Feb 12 15:30:32 2016 +0100
+++ b/cms/app-client/ember-cli-build.js	Fri Feb 12 22:31:48 2016 +0100
@@ -30,6 +30,11 @@
   app.import('bower_components/ammap3/ammap/maps/js/worldLow.js');
   app.import('bower_components/ammap3/ammap/maps/js/continentsLow.js');
   app.import('bower_components/ammap3/ammap/maps/js/france2016Low.js');
+  app.import('vendor/shims/ammaps.js', {
+    exports: {
+      'ammaps': ['defaults']
+    }
+  });
 
   return app.toTree();
 };
--- a/cms/app-client/package.json	Fri Feb 12 15:30:32 2016 +0100
+++ b/cms/app-client/package.json	Fri Feb 12 22:31:48 2016 +0100
@@ -28,7 +28,6 @@
     "ember-cli": "2.3.0-beta.2",
     "ember-cli-app-version": "^1.0.0",
     "ember-cli-babel": "^5.1.6",
-    "ember-cli-content-security-policy": "^0.5.0",
     "ember-cli-d3": "1.1.2",
     "ember-cli-dependency-checker": "^1.2.0",
     "ember-cli-font-awesome": "^1.3.0",
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cms/app-client/vendor/shims/ammaps.js	Fri Feb 12 22:31:48 2016 +0100
@@ -0,0 +1,9 @@
+(function() {
+  function vendorModule() {
+    'use strict';
+
+    return { 'default': self['AmCharts'] };
+  }
+
+  define('ammaps', [], vendorModule);
+})();