mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-01 02:03:22 +00:00
Create a new angularjs module: OFNShared
- This module could be shared between Darkswarm and admin - add this new module to test environment
This commit is contained in:
@@ -8,6 +8,7 @@ angular.module("ofn.admin", [
|
||||
"admin.dropdown",
|
||||
"admin.products",
|
||||
"admin.taxons",
|
||||
"infinite-scroll"
|
||||
"infinite-scroll",
|
||||
"OFNShared"
|
||||
]).config ($httpProvider) ->
|
||||
$httpProvider.defaults.headers.common["Accept"] = "application/json, text/javascript, */*"
|
||||
|
||||
@@ -10,7 +10,8 @@ window.Darkswarm = angular.module("Darkswarm", [
|
||||
'uiGmapgoogle-maps',
|
||||
'duScroll',
|
||||
'angularFileUpload',
|
||||
'angularSlideables'
|
||||
'angularSlideables',
|
||||
'OFNShared'
|
||||
]).config ($httpProvider, $tooltipProvider, $locationProvider, $anchorScrollProvider) ->
|
||||
$httpProvider.defaults.headers['common']['X-Requested-With'] = 'XMLHttpRequest'
|
||||
$httpProvider.defaults.headers.common['Accept'] = "application/json, text/javascript, */*"
|
||||
|
||||
4
app/assets/javascripts/shared/shared.js.coffee
Normal file
4
app/assets/javascripts/shared/shared.js.coffee
Normal file
@@ -0,0 +1,4 @@
|
||||
window.OFNShared = angular.module("OFNShared", [
|
||||
|
||||
]).config ($httpProvider) ->
|
||||
$httpProvider.defaults.headers.common["Accept"] = "application/json, text/javascript, */*"
|
||||
@@ -16,6 +16,7 @@ module.exports = function(config) {
|
||||
'app/assets/javascripts/admin/**/*.js*',
|
||||
'app/assets/javascripts/darkswarm/*.js*',
|
||||
'app/assets/javascripts/darkswarm/**/*.js*',
|
||||
'app/assets/javascripts/shared/shared.js.coffee',
|
||||
'spec/javascripts/unit/**/*.js*'
|
||||
],
|
||||
|
||||
|
||||
Reference in New Issue
Block a user