Revert template literals use
They were adding spaces at some places.
This commit is contained in:
parent
cb0c0be8a2
commit
24b9aaae39
2 changed files with 15 additions and 96 deletions
|
@ -5,53 +5,12 @@ class KHistory {
|
|||
static get default_options() {
|
||||
return {
|
||||
'templates': {
|
||||
'purchase': `
|
||||
<div class="ope">
|
||||
<span class="amount"></span>
|
||||
<span class="infos1"></span>
|
||||
<span class="infos2"></span>
|
||||
<span class="addcost"></span>
|
||||
<span class="canceled"></span>
|
||||
</div>
|
||||
`,
|
||||
'specialope': `
|
||||
<div class="ope">
|
||||
<span class="amount"></span>
|
||||
<span class="infos1"></span>
|
||||
<span class="infos2"></span>
|
||||
<span class="addcost"></span>
|
||||
<span class="canceled"></span>
|
||||
</div>
|
||||
`,
|
||||
'opegroup': `
|
||||
<div class="opegroup">
|
||||
<span class="time"></span>
|
||||
<span class="trigramme"></span>
|
||||
<span class="amount"></span>
|
||||
<span class="valid_by"></span>
|
||||
<span class="comment"></span>
|
||||
</div>`,
|
||||
'transfergroup': `
|
||||
<div class="opegroup">
|
||||
<span class="time"></span>
|
||||
<span class="infos"></span>
|
||||
<span class="valid_by"></span>
|
||||
<span class="comment"></span>
|
||||
</div>
|
||||
`,
|
||||
'day': `
|
||||
<div class="day">
|
||||
<span class="date"></span>
|
||||
</div>
|
||||
`,
|
||||
'transfer': `
|
||||
<div class="ope">
|
||||
<span class="amount"></span>
|
||||
<span class="infos1"></span>
|
||||
<span class="glyphicon glyphicon-arrow-right"></span>
|
||||
<span class="infos2"></span>
|
||||
<span class="canceled"></span>
|
||||
</div>`,
|
||||
'purchase': '<div class="ope"><span class="amount"></span><span class="infos1"></span><span class="infos2"></span><span class="addcost"></span><span class="canceled"></span></div>',
|
||||
'specialope': '<div class="ope"><span class="amount"></span><span class="infos1"></span><span class="infos2"></span><span class="addcost"></span><span class="canceled"></span></div>',
|
||||
'opegroup': '<div class="opegroup"><span class="time"></span><span class="trigramme"></span><span class="amount"></span><span class="valid_by"></span><span class="comment"></span></div>',
|
||||
'transfergroup': '<div class="opegroup"><span class="time"></span><span class="infos"></span><span class="valid_by"></span><span class="comment"></span></div>',
|
||||
'day': '<div class="day"><span class="date"></span></div>',
|
||||
'transfer': '<div class="ope"><span class="amount"></span><span class="infos1"></span><span class="glyphicon glyphicon-arrow-right"></span><span class="infos2"></span><span class="canceled"></span></div>',
|
||||
},
|
||||
|
||||
'api_options': {
|
||||
|
@ -78,14 +37,7 @@ class KHistory {
|
|||
|
||||
var templates = all_options.templates;
|
||||
if (all_options.no_trigramme)
|
||||
templates['opegroup'] = `
|
||||
<div class="opegroup">
|
||||
<span class="time"></span>
|
||||
<span class="amount"></span>
|
||||
<span class="valid_by"></span>
|
||||
<span class="comment"></span>
|
||||
</div>
|
||||
`;
|
||||
templates['opegroup'] = '<div class="opegroup"><span class="time"></span><span class="amount"></span><span class="valid_by"></span><span class="comment"></span></div>';
|
||||
|
||||
this.display = new ForestDisplay(this._$container, templates, this.data);
|
||||
|
||||
|
|
|
@ -64,21 +64,9 @@ class AccountManager {
|
|||
// buttons: search, read or create
|
||||
this._$buttons_container = this._$container.find('.buttons');
|
||||
this._buttons_templates = {
|
||||
create: template`
|
||||
<a href="${'url'}" class="btn btn-primary" target="_blank" title="Créer ce compte">
|
||||
<span class="glyphicon glyphicon-plus"></span>
|
||||
</a>
|
||||
`,
|
||||
read: template`
|
||||
<a href="${'url'}" class="btn btn-primary" target="_blank" title="Détails du compte">
|
||||
<span class="glyphicon glyphicon-info-sign"></span>
|
||||
</a>
|
||||
`,
|
||||
search: template`
|
||||
<button class="btn btn-primary search" title="Rechercher">
|
||||
<span class="glyphicon glyphicon-search"></span>
|
||||
</button>
|
||||
`,
|
||||
create: template`<a href="${'url'}" class="btn btn-primary" target="_blank" title="Créer ce compte"><span class="glyphicon glyphicon-plus"></span></a>`,
|
||||
read: template`<a href="${'url'}" class="btn btn-primary" target="_blank" title="Détails du compte"><span class="glyphicon glyphicon-info-sign"></span></a>`,
|
||||
search: template`<button class="btn btn-primary search" title="Rechercher"><span class="glyphicon glyphicon-search"></span></button>`,
|
||||
};
|
||||
|
||||
}
|
||||
|
@ -208,10 +196,7 @@ class AccountSearch {
|
|||
constructor(manager) {
|
||||
this.manager = manager;
|
||||
|
||||
this._content = `
|
||||
<input type="text" name="q" id="search_autocomplete" autocomplete="off" spellcheck="false" autofocus>
|
||||
<div id="account_results"></div>
|
||||
`;
|
||||
this._content = '<input type="text" name="q" id="search_autocomplete" autocomplete="off" spellcheck="false" autofocus><div id="account_results"></div>';
|
||||
this._input = '#search_autocomplete';
|
||||
this._results_container = '#account_results';
|
||||
|
||||
|
@ -305,16 +290,8 @@ class CheckoutManager {
|
|||
|
||||
this._$buttons_container = this._$container.find('.buttons');
|
||||
this._buttons_templates = {
|
||||
read: template`
|
||||
<a class="btn btn-primary" href="${'url'}" title="En savoir plus" target="_blank">
|
||||
<span class="glyphicon glyphicon-info-sign"></span>
|
||||
</a>
|
||||
`,
|
||||
statement_create: template`
|
||||
<a href="${'url'}" title="Effectuer un relevé" class="btn btn-primary" target="_blank">
|
||||
<span class="glyphicon glyphicon-euro"></span>
|
||||
</a>
|
||||
`,
|
||||
read: template`<a class="btn btn-primary" href="${'url'}" title="En savoir plus" target="_blank"><span class="glyphicon glyphicon-info-sign"></span></a>`,
|
||||
statement_create: template`<a href="${'url'}" title="Effectuer un relevé" class="btn btn-primary" target="_blank"><span class="glyphicon glyphicon-euro"></span></a>`,
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -457,18 +434,8 @@ class ArticleManager {
|
|||
this.data = new ArticleList();
|
||||
var $container = $('#articles_data');
|
||||
var templates = {
|
||||
category: `
|
||||
<div class="category">
|
||||
<span class="name"></span>
|
||||
</div>
|
||||
`,
|
||||
article: `
|
||||
<div class="article">
|
||||
<span class="name"></span>
|
||||
<span class="price"></span>
|
||||
<span class="stock"></span>
|
||||
</div>
|
||||
`,
|
||||
category: '<div class="category"><span class="name"></span></div>',
|
||||
article: '<div class="article"><span class="name"></span><span class="price"></span><span class="stock"></span></div>',
|
||||
};
|
||||
this.display = new ForestDisplay($container, templates, this.data);
|
||||
this.autocomplete = new ArticleAutocomplete(this, $container);
|
||||
|
|
Loading…
Reference in a new issue