Reloading broser when helpers change
diff --git a/views/ngXosLib/.gitignore b/views/ngXosLib/.gitignore
index 9b2df09..34bf3a1 100644
--- a/views/ngXosLib/.gitignore
+++ b/views/ngXosLib/.gitignore
@@ -1,3 +1,4 @@
node_modules
bower_components
-docs
\ No newline at end of file
+docs
+xosHelpers/.tmp
\ No newline at end of file
diff --git a/views/ngXosLib/gulp/ngXosHelpers.js b/views/ngXosLib/gulp/ngXosHelpers.js
index f833fb8..7424218 100644
--- a/views/ngXosLib/gulp/ngXosHelpers.js
+++ b/views/ngXosLib/gulp/ngXosHelpers.js
@@ -5,10 +5,33 @@
var angularFilesort = require('gulp-angular-filesort');
var gulpDocs = require('gulp-ngdocs');
var del = require('del');
+var babel = require('gulp-babel');
+const sourcemaps = require('gulp-sourcemaps');
module.exports = function(options){
- gulp.task('helpers', function(){
- return gulp.src([options.xosHelperSource + '**/*.js'])
+
+ // transpile js with sourceMaps
+ gulp.task('babel', function(){
+ return gulp.src(options.xosHelperSource + '**/*.js')
+ .pipe(babel({
+ presets: ['es2015']
+ }))
+ .pipe(gulp.dest(options.xosHelperTmp));
+ });
+
+ gulp.task('babelDev', function(){
+ return gulp.src(options.xosHelperSource + '**/*.js')
+ .pipe(sourcemaps.init())
+ .pipe(babel({
+ presets: ['es2015']
+ }))
+ .pipe(sourcemaps.write('./maps'))
+ .pipe(gulp.dest(options.xosHelperTmp));
+ });
+
+ // build
+ gulp.task('helpers', ['babel'], function(){
+ return gulp.src([options.xosHelperTmp + '**/*.js'])
.pipe(angularFilesort())
.pipe(concat('ngXosHelpers.js'))
.pipe(ngAnnotate())
@@ -16,6 +39,15 @@
.pipe(gulp.dest(options.ngXosVendor));
});
+ // build Dev (no minify, sourcemaps)
+ gulp.task('helpersDev', ['babelDev'], function(){
+ return gulp.src([options.xosHelperTmp + '**/*.js'])
+ .pipe(angularFilesort())
+ .pipe(concat('ngXosHelpers.js'))
+ .pipe(ngAnnotate())
+ .pipe(gulp.dest(options.ngXosVendor));
+ });
+
gulp.task('cleanDocs', function(){
console.log(options);
return del([options.docs + '**/*']);
@@ -49,4 +81,8 @@
}
}).pipe(gulpDocs.process(ngOptions)).pipe(gulp.dest('./docs'));
});
+
+ gulp.task('dev', function(){
+ gulp.watch(options.xosHelperSource + '**/*.js', ['helpersDev']);
+ });
};
\ No newline at end of file
diff --git a/views/ngXosLib/gulpfile.js b/views/ngXosLib/gulpfile.js
index bb6bc5e..77a5c07 100644
--- a/views/ngXosLib/gulpfile.js
+++ b/views/ngXosLib/gulpfile.js
@@ -6,6 +6,7 @@
var options = {
ngXosVendor: '../../xos/core/xoslib/static/js/vendor/', //save here the minfied vendor file, this is automatically loaded in the django page
xosHelperSource: './xosHelpers/src/',
+ xosHelperTmp: './xosHelpers/.tmp/',
docs: './docs'
};
diff --git a/views/ngXosLib/package.json b/views/ngXosLib/package.json
index 486db22..c25c24a 100644
--- a/views/ngXosLib/package.json
+++ b/views/ngXosLib/package.json
@@ -28,9 +28,11 @@
"del": "^2.2.0",
"gulp": "^3.9.0",
"gulp-angular-filesort": "^1.1.1",
+ "gulp-babel": "^6.1.2",
"gulp-concat": "^2.6.0",
"gulp-ng-annotate": "^1.1.0",
"gulp-ngdocs": "^0.2.13",
+ "gulp-sourcemaps": "^1.6.0",
"gulp-uglify": "^1.4.2",
"http-server": "^0.9.0",
"jasmine-core": "^2.4.1",
diff --git a/views/ngXosLib/xosHelpers/src/ui_components/table/table.component.js b/views/ngXosLib/xosHelpers/src/ui_components/table/table.component.js
index faeaa26..692b49d 100644
--- a/views/ngXosLib/xosHelpers/src/ui_components/table/table.component.js
+++ b/views/ngXosLib/xosHelpers/src/ui_components/table/table.component.js
@@ -9,6 +9,7 @@
(function () {
'use strict';
+
angular.module('xos.uiComponents.table', [])
.directive('xosTable', function(){
return {
@@ -17,25 +18,26 @@
data: '=',
columns: '='
},
- template: [
- '<!--<pre>{{vm.data | json}}</pre>-->',
- '<table class="table table-striped" ng-show="vm.data.length > 0">',
- '<thead>',
- '<tr>',
- '<th ng-repeat="col in vm.columns">{{col}}</th>',
- '</tr>',
- '</thead>',
- '<tbody>',
- '<tr ng-repeat="item in vm.data">',
- '<td ng-repeat="col in vm.columns">{{item[col]}}</td>',
- '</tr>',
- '</tbody>',
- '</table>'
- ].join(),
+ template: `
+ <!--<pre>{{vm.data | json}}</pre>-->
+ <table class="table table-striped" ng-show="vm.data.length > 0">
+ <thead>
+ <tr>
+ <th ng-repeat="col in vm.columns">{{col}}</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr ng-repeat="item in vm.data">
+ <td ng-repeat="col in vm.columns">{{item[col]}}</td>
+ </tr>
+ </tbody>
+ </table>
+ `,
bindToController: true,
controllerAs: 'vm',
controller: function(){
console.log(this.data, this.columns);
+ console.log('Bella dello zio, RELOAD');
}
}
})
diff --git a/views/ngXosViews/sampleView/gulp/server.js b/views/ngXosViews/sampleView/gulp/server.js
index fe55ce3..3c6a8e3 100644
--- a/views/ngXosViews/sampleView/gulp/server.js
+++ b/views/ngXosViews/sampleView/gulp/server.js
@@ -3,6 +3,7 @@
var gulp = require('gulp');
var browserSync = require('browser-sync').create();
var inject = require('gulp-inject');
+var es = require('event-stream');
var runSequence = require('run-sequence');
var angularFilesort = require('gulp-angular-filesort');
var babel = require('gulp-babel');
@@ -10,6 +11,7 @@
var httpProxy = require('http-proxy');
var del = require('del');
var sass = require('gulp-sass');
+var debug = require('gulp-debug');
const environment = process.env.NODE_ENV;
@@ -60,7 +62,6 @@
// req.url.indexOf('/hpcapi/') !== -1 ||
req.url.indexOf('/api/') !== -1
){
- console.log('proxyed' + req.url);
if(conf.xoscsrftoken && conf.xossessionid){
req.headers.cookie = `xoscsrftoken=${conf.xoscsrftoken}; xossessionid=${conf.xossessionid}`;
req.headers['x-csrftoken'] = conf.xoscsrftoken;
@@ -84,6 +85,11 @@
gulp.watch(options.css + '**/*.css', function(){
browserSync.reload();
});
+
+ gulp.watch(options.helpers + 'ngXosHelpers.js', function(){
+ browserSync.reload();
+ });
+
gulp.watch(`${options.sass}/**/*.scss`, ['sass'], function(){
browserSync.reload();
});
@@ -103,16 +109,40 @@
.pipe(gulp.dest(options.tmp));
});
+ // // inject sourceMap
+ // gulp.task('injectMaps', function(){
+ // return gulp.src(options.src + 'index.html')
+ // .pipe(
+ // inject(
+ // gulp.src([
+ // options.helpersSourceMaps + '**/*.js.map'
+ // ], {read: false}).pipe(debug()),
+ // {
+ // starttag: '<!-- inject:maps -->',
+ // // ignorePath: [options.src, '/../../ngXosLib']
+ // }
+ // )
+ // )
+ // .pipe(gulp.dest(options.src));
+ // });
+
// inject scripts
gulp.task('injectScript', ['cleanTmp', 'babel'], function(){
+
+ var appScripts = gulp.src([
+ options.tmp + '**/*.js',
+ options.helpers + 'ngXosHelpers.js'
+ ])
+ .pipe(angularFilesort()).pipe(debug());
+
+ var helpersSourceMaps = gulp.src([
+ options.helpersSourceMaps + '**/*.js.map'
+ ]).pipe(debug());
+
return gulp.src(options.src + 'index.html')
.pipe(
inject(
- gulp.src([
- options.tmp + '**/*.js',
- options.helpers + 'ngXosHelpers.js'
- ])
- .pipe(angularFilesort()),
+ es.merge(appScripts, helpersSourceMaps),
{
ignorePath: [options.src, '/../../ngXosLib']
}
diff --git a/views/ngXosViews/sampleView/gulpfile.js b/views/ngXosViews/sampleView/gulpfile.js
index 08df554..8b50345 100644
--- a/views/ngXosViews/sampleView/gulpfile.js
+++ b/views/ngXosViews/sampleView/gulpfile.js
@@ -12,6 +12,7 @@
dist: 'dist/',
api: '../../ngXosLib/api/',
helpers: '../../../xos/core/xoslib/static/js/vendor/',
+ helpersSourceMaps: '../../ngXosLib/xosHelpers/.tmp/maps/',
static: '../../../xos/core/xoslib/static/', // this is the django static folder
dashboards: '../../../xos/core/xoslib/dashboards/' // this is the django html folder
};
diff --git a/views/ngXosViews/sampleView/package.json b/views/ngXosViews/sampleView/package.json
index 0ffe32c..e92f937 100644
--- a/views/ngXosViews/sampleView/package.json
+++ b/views/ngXosViews/sampleView/package.json
@@ -28,12 +28,14 @@
"easy-mocker": "^1.2.0",
"eslint": "^1.8.0",
"eslint-plugin-angular": "linkmesrl/eslint-plugin-angular",
+ "event-stream": "^3.3.2",
"gulp": "^3.9.0",
"gulp-angular-filesort": "^1.1.1",
"gulp-angular-templatecache": "^1.8.0",
"gulp-babel": "^5.3.0",
"gulp-concat": "^2.6.0",
"gulp-concat-util": "^0.5.5",
+ "gulp-debug": "^2.1.2",
"gulp-eslint": "^1.0.0",
"gulp-inject": "^3.0.0",
"gulp-minify-html": "^1.0.4",
diff --git a/views/ngXosViews/sampleView/src/index.html b/views/ngXosViews/sampleView/src/index.html
index 5779012..d04fc3b 100644
--- a/views/ngXosViews/sampleView/src/index.html
+++ b/views/ngXosViews/sampleView/src/index.html
@@ -24,3 +24,6 @@
<script src="/../../../xos/core/xoslib/static/js/vendor/ngXosHelpers.js"></script>
<script src="/.tmp/main.js"></script>
<!-- endinject -->
+
+<!-- inject:map -->
+<!-- endinject -->
\ No newline at end of file
diff --git a/xos/core/xoslib/static/css/xosSampleView.css b/xos/core/xoslib/static/css/xosSampleView.css
index 1a67321..e69de29 100644
--- a/xos/core/xoslib/static/css/xosSampleView.css
+++ b/xos/core/xoslib/static/css/xosSampleView.css
@@ -1 +0,0 @@
-#xosSampleView .row{color:#d9534f}
\ No newline at end of file
diff --git a/xos/core/xoslib/static/js/vendor/ngXosHelpers.js b/xos/core/xoslib/static/js/vendor/ngXosHelpers.js
index 23316a7..82bd090 100644
--- a/xos/core/xoslib/static/js/vendor/ngXosHelpers.js
+++ b/xos/core/xoslib/static/js/vendor/ngXosHelpers.js
@@ -1 +1,304 @@
-!function(){"use strict";angular.module("xos.uiComponents.table",[]).directive("xosTable",function(){return{restrict:"E",scope:{data:"=",columns:"="},template:["<!--<pre>{{vm.data | json}}</pre>-->",'<table class="table table-striped" ng-show="vm.data.length > 0">',"<thead>","<tr>",'<th ng-repeat="col in vm.columns">{{col}}</th>',"</tr>","</thead>","<tbody>",'<tr ng-repeat="item in vm.data">','<td ng-repeat="col in vm.columns">{{item[col]}}</td>',"</tr>","</tbody>","</table>"].join(),bindToController:!0,controllerAs:"vm",controller:function(){console.log(this.data,this.columns)}}})}(),function(){"use strict";function e(e,r,s){e.interceptors.push("SetCSRFToken"),r.startSymbol("{$"),r.endSymbol("$}"),s.defaults.stripTrailingSlashes=!1}e.$inject=["$httpProvider","$interpolateProvider","$resourceProvider"],console.log("XOS Helpers Module"),angular.module("bugSnag",[]).factory("$exceptionHandler",function(){return function(e,r){window.Bugsnag?Bugsnag.notifyException(e,{diagnostics:{cause:r}}):console.error(e,r,e.stack)}}),angular.module("xos.helpers",["ngCookies","ngResource","bugSnag","xos.uiComponents"]).config(e)}(),function(){"use strict";angular.module("xos.helpers").service("vSG-Collection",["$resource",function(e){return e("/api/service/vsg/")}])}(),function(){"use strict";angular.module("xos.helpers").service("vOLT-Collection",["$resource",function(e){return e("/api/tenant/cord/volt/:volt_id/",{volt_id:"@id"})}])}(),function(){"use strict";angular.module("xos.helpers").service("Users",["$resource",function(e){return e("/api/core/users/")}])}(),function(){"use strict";angular.module("xos.helpers").service("Truckroll-Collection",["$resource",function(e){return e("/api/tenant/truckroll/:truckroll_id/",{truckroll_id:"@id"})}])}(),function(){"use strict";angular.module("xos.helpers").service("Subscribers",["$resource",function(e){return e("/api/tenant/cord/subscriber/:subscriber_id/",{subscriber_id:"@id"})}]).service("Subscriber-features",["$resource",function(e){return e("/api/tenant/cord/subscriber/:subscriber_id/features/",{subscriber_id:"@id"})}]).service("Subscriber-features-uplink_speed",["$resource",function(e){return e("/api/tenant/cord/subscriber/:subscriber_id/features/uplink_speed/",{subscriber_id:"@id"})}]).service("Subscriber-features-downlink_speed",["$resource",function(e){return e("/api/tenant/cord/subscriber/:subscriber_id/features/downlink_speed/",{subscriber_id:"@id"})}]).service("Subscriber-features-cdn",["$resource",function(e){return e("/api/tenant/cord/subscriber/:subscriber_id/features/cdn/",{subscriber_id:"@id"})}]).service("Subscriber-features-uverse",["$resource",function(e){return e("/api/tenant/cord/subscriber/:subscriber_id/features/uverse/",{subscriber_id:"@id"})}]).service("Subscriber-features-status",["$resource",function(e){return e("/api/tenant/cord/subscriber/:subscriber_id/features/status/",{subscriber_id:"@id"})}])}(),function(){"use strict";angular.module("xos.helpers").service("ONOS-Services-Collection",["$resource",function(e){return e("/api/service/onos/")}])}(),function(){"use strict";angular.module("xos.helpers").service("ONOS-App-Collection",["$resource",function(e){return e("/api/tenant/onos/app/")}])}(),function(){"use strict";angular.module("xos.uiComponents",["xos.uiComponents.table"])}(),function(){"use strict";function e(){return{request:function(e){return-1===e.url.indexOf(".html")&&(e.url+="?no_hyperlinks=1"),e}}}angular.module("xos.helpers").factory("NoHyperlinks",e)}(),function(){"use strict";function e(e){return{request:function(r){return"GET"!==r.method&&(r.headers["X-CSRFToken"]=e.get("xoscsrftoken")),r}}}e.$inject=["$cookies"],angular.module("xos.helpers").factory("SetCSRFToken",e)}();
\ No newline at end of file
+'use strict';
+
+/**
+ * © OpenCORD
+ *
+ * Visit http://guide.xosproject.org/devguide/addview/ for more information
+ *
+ * Created by teone on 3/24/16.
+ */
+
+(function () {
+ 'use strict';
+
+ angular.module('xos.uiComponents.table', []).directive('xosTable', function () {
+ return {
+ restrict: 'E',
+ scope: {
+ data: '=',
+ columns: '='
+ },
+ template: '\n <!--<pre>{{vm.data | json}}</pre>-->\n <table class="table table-striped" ng-show="vm.data.length > 0">\n <thead>\n <tr>\n <th ng-repeat="col in vm.columns">{{col}}</th>\n </tr>\n </thead>\n <tbody>\n <tr ng-repeat="item in vm.data">\n <td ng-repeat="col in vm.columns">{{item[col]}}</td>\n </tr>\n </tbody>\n </table>\n ',
+ bindToController: true,
+ controllerAs: 'vm',
+ controller: function controller() {
+ console.log(this.data, this.columns);
+ console.log('Bella dello zio, RELOAD');
+ }
+ };
+ });
+})();
+//# sourceMappingURL=../../maps/ui_components/table/table.component.js.map
+
+'use strict';
+
+(function () {
+ 'use strict';
+
+ config.$inject = ["$httpProvider", "$interpolateProvider", "$resourceProvider"];
+ angular.module('bugSnag', []).factory('$exceptionHandler', function () {
+ return function (exception, cause) {
+ if (window.Bugsnag) {
+ Bugsnag.notifyException(exception, { diagnostics: { cause: cause } });
+ } else {
+ console.error(exception, cause, exception.stack);
+ }
+ };
+ });
+
+ /**
+ * @ngdoc overview
+ * @name xos.helpers
+ * @description this is the module that group all the helpers service and components for XOS
+ **/
+
+ angular.module('xos.helpers', ['ngCookies', 'ngResource', 'bugSnag', 'xos.uiComponents']).config(config);
+
+ function config($httpProvider, $interpolateProvider, $resourceProvider) {
+ $httpProvider.interceptors.push('SetCSRFToken');
+
+ $interpolateProvider.startSymbol('{$');
+ $interpolateProvider.endSymbol('$}');
+
+ // NOTE http://www.masnun.com/2013/09/18/django-rest-framework-angularjs-resource-trailing-slash-problem.html
+ $resourceProvider.defaults.stripTrailingSlashes = false;
+ }
+})();
+//# sourceMappingURL=maps/xosHelpers.module.js.map
+
+'use strict';
+
+(function () {
+ 'use strict';
+
+ angular.module('xos.helpers')
+ /**
+ * @ngdoc service
+ * @name xos.helpers.vSG-Collection
+ * @description Angular resource to fetch /api/service/vsg/
+ **/
+ .service('vSG-Collection', ["$resource", function ($resource) {
+ return $resource('/api/service/vsg/');
+ }]);
+})();
+//# sourceMappingURL=../../maps/services/rest/vSG.js.map
+
+'use strict';
+
+(function () {
+ 'use strict';
+
+ angular.module('xos.helpers')
+ /**
+ * @ngdoc service
+ * @name xos.helpers.vOLT-Collection
+ * @description Angular resource to fetch /api/tenant/cord/volt/:volt_id/
+ **/
+ .service('vOLT-Collection', ["$resource", function ($resource) {
+ return $resource('/api/tenant/cord/volt/:volt_id/', { volt_id: '@id' });
+ }]);
+})();
+//# sourceMappingURL=../../maps/services/rest/vOLT.js.map
+
+'use strict';
+
+(function () {
+ 'use strict';
+
+ angular.module('xos.helpers')
+ /**
+ * @ngdoc service
+ * @name xos.helpers.Users
+ * @description Angular resource to fetch /api/core/users/
+ **/
+ .service('Users', ["$resource", function ($resource) {
+ return $resource('/api/core/users/');
+ }]);
+})();
+//# sourceMappingURL=../../maps/services/rest/Users.js.map
+
+'use strict';
+
+(function () {
+ 'use strict';
+
+ angular.module('xos.helpers')
+ /**
+ * @ngdoc service
+ * @name xos.helpers.Truckroll-Collection
+ * @description Angular resource to fetch /api/tenant/truckroll/:truckroll_id/
+ **/
+ .service('Truckroll-Collection', ["$resource", function ($resource) {
+ return $resource('/api/tenant/truckroll/:truckroll_id/', { truckroll_id: '@id' });
+ }]);
+})();
+//# sourceMappingURL=../../maps/services/rest/Truckroll.js.map
+
+'use strict';
+
+(function () {
+ 'use strict';
+
+ angular.module('xos.helpers')
+ /**
+ * @ngdoc service
+ * @name xos.helpers.Subscribers
+ * @description Angular resource to fetch /api/tenant/cord/subscriber/:subscriber_id/
+ **/
+ .service('Subscribers', ["$resource", function ($resource) {
+ return $resource('/api/tenant/cord/subscriber/:subscriber_id/', { subscriber_id: '@id' });
+ }])
+ /**
+ * @ngdoc service
+ * @name xos.helpers.Subscriber-features
+ * @description Angular resource to fetch /api/tenant/cord/subscriber/:subscriber_id/features/
+ **/
+ .service('Subscriber-features', ["$resource", function ($resource) {
+ return $resource('/api/tenant/cord/subscriber/:subscriber_id/features/', { subscriber_id: '@id' });
+ }])
+ /**
+ * @ngdoc service
+ * @name xos.helpers.Subscriber-features-uplink_speed
+ * @description Angular resource to fetch /api/tenant/cord/subscriber/:subscriber_id/features/uplink_speed/
+ **/
+ .service('Subscriber-features-uplink_speed', ["$resource", function ($resource) {
+ return $resource('/api/tenant/cord/subscriber/:subscriber_id/features/uplink_speed/', { subscriber_id: '@id' });
+ }])
+ /**
+ * @ngdoc service
+ * @name xos.helpers.Subscriber-features-downlink_speed
+ * @description Angular resource to fetch /api/tenant/cord/subscriber/:subscriber_id/features/downlink_speed/
+ **/
+ .service('Subscriber-features-downlink_speed', ["$resource", function ($resource) {
+ return $resource('/api/tenant/cord/subscriber/:subscriber_id/features/downlink_speed/', { subscriber_id: '@id' });
+ }])
+ /**
+ * @ngdoc service
+ * @name xos.helpers.Subscriber-features-cdn
+ * @description Angular resource to fetch /api/tenant/cord/subscriber/:subscriber_id/features/cdn/
+ **/
+ .service('Subscriber-features-cdn', ["$resource", function ($resource) {
+ return $resource('/api/tenant/cord/subscriber/:subscriber_id/features/cdn/', { subscriber_id: '@id' });
+ }])
+ /**
+ * @ngdoc service
+ * @name xos.helpers.Subscriber-features-uverse
+ * @description Angular resource to fetch /api/tenant/cord/subscriber/:subscriber_id/features/uverse/
+ **/
+ .service('Subscriber-features-uverse', ["$resource", function ($resource) {
+ return $resource('/api/tenant/cord/subscriber/:subscriber_id/features/uverse/', { subscriber_id: '@id' });
+ }])
+ /**
+ * @ngdoc service
+ * @name xos.helpers.Subscriber-features-status
+ * @description Angular resource to fetch /api/tenant/cord/subscriber/:subscriber_id/features/status/
+ **/
+ .service('Subscriber-features-status', ["$resource", function ($resource) {
+ return $resource('/api/tenant/cord/subscriber/:subscriber_id/features/status/', { subscriber_id: '@id' });
+ }]);
+})();
+//# sourceMappingURL=../../maps/services/rest/Subscribers.js.map
+
+'use strict';
+
+(function () {
+ 'use strict';
+
+ angular.module('xos.helpers')
+ /**
+ * @ngdoc service
+ * @name xos.helpers.ONOS-Services-Collection
+ * @description Angular resource to fetch /api/service/onos/
+ **/
+ .service('ONOS-Services-Collection', ["$resource", function ($resource) {
+ return $resource('/api/service/onos/');
+ }]);
+})();
+//# sourceMappingURL=../../maps/services/rest/ONOS-Services.js.map
+
+'use strict';
+
+(function () {
+ 'use strict';
+
+ angular.module('xos.helpers')
+ /**
+ * @ngdoc service
+ * @name xos.helpers.ONOS-App-Collection
+ * @description Angular resource to fetch /api/tenant/onos/app/
+ **/
+ .service('ONOS-App-Collection', ["$resource", function ($resource) {
+ return $resource('/api/tenant/onos/app/');
+ }]);
+})();
+//# sourceMappingURL=../../maps/services/rest/ONOS-Apps.js.map
+
+'use strict';
+
+/**
+ * © OpenCORD
+ *
+ * Visit http://guide.xosproject.org/devguide/addview/ for more information
+ *
+ * Created by teone on 3/24/16.
+ */
+
+(function () {
+ 'use strict';
+
+ angular.module('xos.uiComponents', ['xos.uiComponents.table']);
+})();
+//# sourceMappingURL=../maps/ui_components/ui-components.module.js.map
+
+'use strict';
+
+(function () {
+ 'use strict';
+
+ /**
+ * @ngdoc service
+ * @name xos.helpers.NoHyperlinks
+ * @description This factory is automatically loaded trough xos.helpers and will add an $http interceptor that will add ?no_hyperlinks=1 to your api request, that is required by django
+ **/
+
+ angular.module('xos.helpers').factory('NoHyperlinks', noHyperlinks);
+
+ function noHyperlinks() {
+ return {
+ request: function request(_request) {
+ if (_request.url.indexOf('.html') === -1) {
+ _request.url += '?no_hyperlinks=1';
+ }
+ return _request;
+ }
+ };
+ }
+})();
+//# sourceMappingURL=../maps/services/noHyperlinks.interceptor.js.map
+
+'use strict';
+
+(function () {
+ 'use strict';
+
+ /**
+ * @ngdoc service
+ * @name xos.helpers.SetCSRFToken
+ * @description This factory is automatically loaded trough xos.helpers and will add an $http interceptor that will the CSRF-Token to your request headers
+ **/
+
+ setCSRFToken.$inject = ["$cookies"];
+ angular.module('xos.helpers').factory('SetCSRFToken', setCSRFToken);
+
+ function setCSRFToken($cookies) {
+ return {
+ request: function request(_request) {
+ if (_request.method !== 'GET') {
+ _request.headers['X-CSRFToken'] = $cookies.get('xoscsrftoken');
+ }
+ return _request;
+ }
+ };
+ }
+})();
+//# sourceMappingURL=../maps/services/csrfToken.interceptor.js.map