Commit f998fd39 authored by alexandre's avatar alexandre

Merge branch 'rework-scores'

parents b0abdf40 da549cba
This diff is collapsed.
......@@ -935,13 +935,13 @@ window.W = window.W || {};
*/
W.TreeNode = Marionette.View.extend({
tagName: 'li',
className: 'axis',
className: 'axis score__line line',
attributes: function () {
return {
id: "foo-" + this.model.get("title")
}
},
// attributes: function () {
// return {
// id: "foo-" + this.model.get("title")
// }
// },
template: '#node-template-vue',
......@@ -964,7 +964,7 @@ window.W = window.W || {};
ui: {
'title': '.axis-row',
'titleSpan': '.axis-title'
'titleSpan': '.line__title'
},
regions: {
......@@ -1582,7 +1582,6 @@ window.W = window.W || {};
}
return "";
}
});
......@@ -1729,23 +1728,26 @@ window.W = window.W || {};
},
ui: {
'save': '.save',
'edit': '.edit',
'expandLevel': '[name="expand-level"]',
'save': '.js-save',
'edit': '.js-edit',
'delete': '.js-delete',
'duplicate': '.js-duplicate',
// 'expandLevel': '[name="expand-level"]',
'scoreMeta': '.score-meta',
'title': '#title',
'sidebar': '#sidebar',
'meta': '.panel--score-meta'
},
events: {
'click @ui.save': 'save',
'click @ui.edit': 'toggleForm',
'click .delete': 'delete',
'click .duplicate': 'duplicate',
'click @ui.delete': 'delete',
'click @ui.duplicate': 'duplicate',
'click .unfold': 'unfold',
'click .fold': 'fold',
'change @ui.expandLevel': 'expandUntill',
// 'change @ui.expandLevel': 'expandUntill',
'click [data-name="export"]': 'downloadAsJSON',
'click .panel--score-meta .js-toggle': 'toggleMeta'
},
......@@ -1981,7 +1983,6 @@ window.W = window.W || {};
toggleMeta: function () {
this.metaExpanded = !this.metaExpanded;
this.ui.meta.toggleClass('is-collapsed', !this.metaExpanded)
// this.ui.sidebar.attr('data-expanded', this.metaExpanded);
}
});
......@@ -1989,12 +1990,12 @@ window.W = window.W || {};
W.SliderView = Marionette.View.extend({
template: '#slider-template',
tagName: 'div',
tagName: 'ol',
className: 'expand-level',
className: 'score__slider slider',
triggers: {
'click .expand-level-option': 'click',
'click .slider__level': 'click',
},
templateContext: function () {
......
<div class="metadata">
<span class="tag"></span>
<% if (alternative != "") { %>
<span class="alternative-wrapper"><span class="alternative"><%- alternative %></span></span>
<% } %>
<div class="metadata__wrapper">
<span class="tag"></span>
<% if (alternative != "") { %>
<span class="alternative"><%- alternative %></span>
<% } %>
</div>
</div>
<ol></ol>
\ No newline at end of file
<ol></ol>
{% spaceless %}
<header class="axis-row">
<span class="icon icon--handle"></span>
<section class="axis-row--background-wrapper">
<section class="axis-row--header">
<span class="axis-row--header--line"></span>
<span class="icon icon--handle"></span>
</section>
<% if (condition) { %>
<section class="condition">
<span class="label">
<% if (imperative) { %>! <% } %><%- condition %>
</span>
</section>
<span class="line__condition">
<span class="label">
<% if (imperative) { %>! <% } %><%- condition %>
</span>
</span>
<% } else { %>
<span class="line__condition line__condition--hidden"></span>
<% } %>
<% if (actant) { %>
<section class="axis-row--actant">
<%- actant %>
</section>
<span class="line__actant">
<%- actant %>
</span>
<% } %>
<section class="axis-row--body" <% if (aspect) { %> data-aspect="<%- aspect %>"<% } %>>
<span class="axis-title"><%- title %></span>
<section class="line__body" <% if (aspect) { %> data-aspect="<%- aspect %>"<% } %>>
<span class="line__title"><%- title %></span>
<% if (attachment) { %>
&nbsp;
<section class="attachment--view"></section>
<% } %>
<% if (hasIndications) { %>
<span class="indications">
<span class="icon icon--indications"></span>
<span class="full">
<% if (indications) { %>
<%- indications %>
<%- indications %>
<% } %>
<% if (commandement) { %>
<span class="indications-label"><%- t('Commandement') %>:</span>
<%- commandement %>
<span class="indications-label"><%- t('Commandement') %>:</span>
<%- commandement %>
<% } %>
<% if (destination) { %>
<span class="indications-label"><%- t('Destination') %>:</span>
<%- destination %>
<span class="indications-label"><%- t('Destination') %>:</span>
<%- destination %>
<% } %>
<% if (code) { %>
<span class="indications-label"><%- t('Code') %>:</span>
<%- code %>
<span class="indications-label"><%- t('Code') %>:</span>
<%- code %>
<% } %>
</span>
</span>
<% } %>
<span class="axis-inline-title-form"></span>
</section>
<% if (adresse) { %>
<section class="axis-row--adresse">
<span class="line__adresse">
<%- adresse %>
</section>
</span>
<% } %>
<% if (boucle) { %>
<span class="boucle option">
<!-- <sup> -->
<% if (boucle.type === rangeType.exact) { %>
<%- boucle.value %>
<% } else if (boucle.type === rangeType.minimal) { %>
......@@ -67,34 +73,33 @@
<% } else if (boucle.type === rangeType.range) { %>
<%- boucle.value[0] %>-<%- boucle.value[1] %>
<% } %>
<!-- </sup> -->
</span>
<% } %>
<% if (terme) { %>
<section class="terme">
<span class="line__terme">
<span class="label">
<%- terme %>
</span>
</section>
</span>
<% } %>
</section>
<section class="axis-row--actions">
<span class="line__actions">
<% if (isLink) { %>
<button name="unlink"><%- t('rompre le lien') %></button>
<button name="unlink"><%- t('rompre le lien') %></button>
<% } else { %>
<button name="edit" title="Modifier cet axe">⋯</button>
<button name="add" title="Ajoute un sous-axe">+</button>
<button name="edit" title="Modifier cet axe">⋯</button>
<button name="add" title="Ajoute un sous-axe">+</button>
<% } %>
<button name="delete" title="Supprimer cet axe (et tous ses sous-axes)">x</button>
<% if (sublines.length) { %>
<!-- <button name="toggle"></button> -->
<% } %>
</section>
</span>
<form></form>
</header>
<% if (sublines.length) { %>
<section class="sublines"></section>
<section class="sublines"></section>
<% } %>
{% endspaceless %}
<article class="<% if (!is_editable) { %>read-only<% } %>">
<header id="sidebar">
<h1 id="title"><%- title %></h1>
<header class="score__header">
<h1 class="score__title"><%- title %></h1>
<div class="score-actions">
<button class="save" data-label-progress="<%- t('Enregistrer…') %>" data-label="<%- t('Enregistrer') %>" <% if (!hasChanges) { %>disabled<% } %>><%- t('Enregistrer') %></button>
<button class="duplicate"><%- t('Dupliquer') %></button>
<button class="delete"><%- t('Supprimer') %></button>
<div class="score__actions">
<button class="js-save" data-label-progress="<%- t('Enregistrer…') %>" data-label="<%- t('Enregistrer') %>" type="button" <% if (!hasChanges) { %>disabled<% } %>><%- t('Enregistrer') %></button>
<button class="js-duplicate" type="button"><%- t('Dupliquer') %></button>
<button class="js-delete" type="button"><%- t('Supprimer') %></button>
<!--<button data-name="export"><%- t('Export') %></button>-->
</div>
</header>
<div id="main-area">
<div class="score__main">
<div id="expand-level-slider"></div>
<div id="axis-wrapper">
<ol class="root"></ol>
<ol class="score__mainline"></ol>
</div>
</div>
</article>
......@@ -22,7 +22,7 @@
<aside class="panel__alt panel--score-meta <% if (!metaExpanded) { %>is-collapsed<% } %>">
<span class="panel__toggle__alt js-toggle"><%- t('infos') %></span>
<section class="content">
<button class="edit score-edit"><%- t('Éditer') %></button>
<button class="js-edit score-edit"><%- t('Éditer') %></button>
<dl class="score-meta">
<% if (presentation) { %>
......
<% for (var l=1; l <= depth; l++) { %><div class="expand-level-option" data-value="<%= l %>">
<span class="expand-level-option-label">
<% for (var l=1; l <= depth; l++) { %><li class="slider__level" data-value="<%= l %>">
<span class="slider__label">
<%= l %>
</span>
</div><% } %>
</li><% } %>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment