29 lines
722 B
JavaScript
29 lines
722 B
JavaScript
import Application from '@ember/application';
|
|
import Resolver from './resolver';
|
|
import loadInitializers from 'ember-load-initializers';
|
|
import config from './config/environment';
|
|
import $ from 'jquery'
|
|
|
|
const App = Application.extend({
|
|
modulePrefix: config.modulePrefix,
|
|
podModulePrefix: config.podModulePrefix,
|
|
Resolver
|
|
});
|
|
|
|
$.ajaxSetup({
|
|
beforeSend(jqXHR, opt) {
|
|
jqXHR.setRequestHeader('X-Request-Type', 'Ajax');
|
|
if (config.environment === 'production') {
|
|
opt.url = 'api/' + opt.url;
|
|
}
|
|
}
|
|
});
|
|
|
|
$(document).on('click', '.popover .close' , function() {
|
|
$(this).parents('.popover').popover('hide');
|
|
});
|
|
|
|
loadInitializers(App, config.modulePrefix);
|
|
|
|
export default App;
|