Move templates, improve inclusion.
This commit is contained in:
parent
12414a9dc7
commit
9eed69363f
@ -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: {
|
||||
|
@ -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',
|
||||
|
@ -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: {
|
||||
|
Loading…
Reference in New Issue
Block a user