diff --git a/src/views/account.form.tmpl.html b/src/js/accounts/account.form.tmpl.html
similarity index 100%
rename from src/views/account.form.tmpl.html
rename to src/js/accounts/account.form.tmpl.html
diff --git a/src/views/accounts.html b/src/js/accounts/accounts.html
similarity index 100%
rename from src/views/accounts.html
rename to src/js/accounts/accounts.html
diff --git a/src/js/accounts/index.js b/src/js/accounts/index.js
index 3fc8814..3429bb7 100644
--- a/src/js/accounts/index.js
+++ b/src/js/accounts/index.js
@@ -28,8 +28,7 @@ var ngResource = require('angular-resource'),
// Note: ngBootbox seems to have no module.exports.
ngBootbox = 'ngBootbox';
-// FIXME Alexis Lahouze 2017-06-06 move into templates.js.
-require('../../views/account.form.tmpl.html');
+var accountFormTmpl = require('./account.form.tmpl.html');
var accountModule = angular.module('accountant.accounts', [
ngResource,
@@ -240,7 +239,7 @@ var accountModule = angular.module('accountant.accounts', [
$ngBootbox.customDialog({
scope: scope,
title: title,
- templateUrl: '/views/account.form.tmpl.html',
+ templateUrl: accountFormTmpl,
onEscape: true,
buttons: {
save: {
diff --git a/src/js/app.js b/src/js/app.js
index e80dc71..d7a61f3 100644
--- a/src/js/app.js
+++ b/src/js/app.js
@@ -39,11 +39,11 @@ var accountModule = require('./accounts'),
require('bootstrap-webpack!./bootstrap.config.js');
-require('../views/operations.html');
-require('../views/accounts.html');
-require('../views/scheduler.html');
+var operationsTmpl = require('./operations/operations.html');
+var accountsTmpl = require('./accounts/accounts.html');
+var schedulerTmpl = require('./scheduler/scheduler.html');
-require('../views/login.tmpl.html');
+var loginTmpl = require('../views/login.tmpl.html');
var app = angular.module('accountant', [
accountModule.name,
@@ -83,17 +83,17 @@ var app = angular.module('accountant', [
// Defining template and controller in function of route.
$routeProvider
.when('/account/:accountId/operations', {
- templateUrl: '/views/operations.html',
+ templateUrl: operationsTmpl,
controller: 'OperationController',
controllerAs: 'operationsCtrl'
})
.when('/account/:accountId/scheduler', {
- templateUrl: '/views/scheduler.html',
+ templateUrl: schedulerTmpl,
controller: 'SchedulerController',
controllerAs: 'schedulerCtrl'
})
.when('/accounts', {
- templateUrl: '/views/accounts.html',
+ templateUrl: accountsTmpl,
controller: 'AccountController',
controllerAs: 'accountsCtrl'
})
@@ -153,7 +153,7 @@ var app = angular.module('accountant', [
$ngBootbox.customDialog({
title: 'Authentification requise',
- templateUrl: '/views/login.tmpl.html',
+ templateUrl: loginTmpl,
buttons: {
login: {
label: 'Login',
diff --git a/src/js/operations/index.js b/src/js/operations/index.js
index 9910ed9..4fa6edb 100644
--- a/src/js/operations/index.js
+++ b/src/js/operations/index.js
@@ -23,7 +23,7 @@ var moment = require('moment'),
var angular = require('angular');
-require('../../views/operation.form.tmpl.html');
+var operationFormTmpl = require('./operation.form.tmpl.html');
var ngResource = require('angular-resource'),
ngMessages = require('angular-messages'),
@@ -531,7 +531,7 @@ var operationModule = angular.module('accountant.operations', [
$ngBootbox.customDialog({
scope: scope,
title: title,
- templateUrl: '/views/operation.form.tmpl.html',
+ templateUrl: operationFormTmpl,
onEscape: true,
buttons: {
save: {
diff --git a/src/views/operation.form.tmpl.html b/src/js/operations/operation.form.tmpl.html
similarity index 100%
rename from src/views/operation.form.tmpl.html
rename to src/js/operations/operation.form.tmpl.html
diff --git a/src/views/operations.html b/src/js/operations/operations.html
similarity index 100%
rename from src/views/operations.html
rename to src/js/operations/operations.html
diff --git a/src/views/scheduler.html b/src/js/scheduler/scheduler.html
similarity index 100%
rename from src/views/scheduler.html
rename to src/js/scheduler/scheduler.html