Commit d0628979 authored by gijs's avatar gijs

Many visual adjustments

parent 56647300
This diff is collapsed.
......@@ -48,6 +48,7 @@ W.lang.en = {
"Langue": "Language",
// "Mise": "",
"Modifié le": "Modified on",
"Meta donneés": "Meta data",
"OK": "OK",
"Partitions": "Scores",
"Partitions existantes": "Existing score",
......
......@@ -584,6 +584,7 @@ window.W = window.W || {};
'extraFields': '[name="extra-fields"]',
'close': '[data-name="close"]',
'submit': '[data-name="submit"]',
'link': '[data-name="link"]',
},
regions: {
......@@ -611,7 +612,8 @@ window.W = window.W || {};
},
triggers: {
'click @ui.close': 'form:close'
'click @ui.close': 'form:close',
'click @ui.link': 'form:makeLink'
},
templateContext: function () {
......@@ -868,7 +870,7 @@ window.W = window.W || {};
'click [name="edit"]': 'toggleForm',
'click [name="add"]': 'addLine',
'click [name="delete"]': 'delete',
'click [name="link"]': 'makeLink',
// 'click [name="link"]': 'makeLink',
'click [name="unlink"]': 'unlink',
'click .attachment--btn': 'showAttachment',
'change #tag': 'editSiblings',
......@@ -879,6 +881,7 @@ window.W = window.W || {};
childViewEvents: {
'form:submit': 'update',
'form:close': 'toggleForm',
'form:makeLink': 'makeLink',
'inlinetitleform:submit': 'updateTitle',
'inlinetitleform:close': 'closeInlineForm',
'attachment:close': 'hideAttachment'
......@@ -975,9 +978,6 @@ window.W = window.W || {};
},
makeLink: function (e) {
e.preventDefault();
e.stopImmediatePropagation();
var link = new W.LinkModel({ target: this.model });
var parent = this.model.get('parent');
......@@ -987,6 +987,7 @@ window.W = window.W || {};
sublines.add(link, { at: sublines.indexOf(this.model) + 1 });
}
this.toggleForm();
this.trigger('change');
// console.log(link, link.toJSON());
},
......@@ -1558,7 +1559,6 @@ window.W = window.W || {};
W.ScoreDetailView = Marionette.View.extend({
// Conditionnal rendering according we are in edit mode or not
template: '#score-template-vue',
attributes: {
......@@ -1573,7 +1573,7 @@ window.W = window.W || {};
mainline: 'ol',
form: {
el: '#sidebar form',
el: 'aside form',
replaceElement: true
},
......@@ -1589,7 +1589,8 @@ window.W = window.W || {};
'expandLevel': '[name="expand-level"]',
'scoreMeta': '.score-meta',
'title': '#title',
'sidebar': '#sidebar'
'sidebar': '#sidebar',
'meta': '.panel--score-meta'
},
events: {
......@@ -1601,7 +1602,7 @@ window.W = window.W || {};
'click .fold': 'fold',
'change @ui.expandLevel': 'expandUntill',
'click [data-name="export"]': 'downloadAsJSON',
'click @ui.title': 'toggleMeta'
'click .panel--score-meta .js-toggle': 'toggleMeta'
},
childViewEvents: {
......@@ -1827,7 +1828,8 @@ window.W = window.W || {};
toggleMeta: function () {
this.metaExpanded = !this.metaExpanded;
this.ui.sidebar.attr('data-expanded', this.metaExpanded);
this.ui.meta.toggleClass('is-collapsed', !this.metaExpanded)
// this.ui.sidebar.attr('data-expanded', this.metaExpanded);
}
});
......
......@@ -97,3 +97,4 @@
<button data-name="close"><%- t('Annuler') %></button>
<button data-name="submit"><%- t('OK') %></button>
<button data-name="link"><%- t('créer un axe lié') %></button>
<input type="text" name="axis-inline-title" value="<%- title %>" />
<input type="button" name="submit" value="OK" />
<button name="submit"><%- t('OK') %></button>
<button data-name="close"><%- t('Annuler') %></button>
<div class="metadata">
<span class="alternative"><%- alternative %></span>
<span class="tag"></span>
<% if (alternative != "") { %>
<span class="alternative-wrapper"><span class="alternative"><%- alternative %></span></span>
<% } %>
</div>
<ol></ol>
\ No newline at end of file
......@@ -17,25 +17,8 @@
<% } %>
<section class="axis-row--body" <% if (aspect) { %> data-aspect="<%- aspect %>"<% } %>>
<span class="axis-title">
<%- title %></span>
</section>
<% if (adresse) { %>
<section class="axis-row--adresse">
<%- adresse %></section>
<% } %>
<!-- <% if (aspect) { %>
<span class="aspect">
<% if (aspect == 'duratif') { %> <span class="icon icon--dur"></span> <% } %>
<% if (aspect == 'sémelfactif') { %> <span class="icon icon--semel"></span> <% } %>
<% if (aspect == 'itératif') { %> <span class="icon icon--iter"></span> <% } %></span>
<% } %> -->
<span class="axis-inline-title-form"></span>
<% if (hasIndications) { %>
<span class="axis-title"><%- title %></span>
<% if (hasIndications) { %>
<span class="indications">
<span class="icon icon--indications"></span>
<span class="full">
......@@ -60,33 +43,37 @@
<% } %>
</span>
</span>
<% } %>
</section>
<% if (boucle) { %>
<span id="boucle" class="option">
<span class="icon icon--repeat"></span>
<!-- <sup> -->
<% if (boucle.type === rangeType.exact) { %>
<%- boucle.value %>
<% } else if (boucle.type === rangeType.minimal) { %>
<%- boucle.value %>+
<% } else if (boucle.type === rangeType.range) { %>
<%- boucle.value[0] %>-<%- boucle.value[1] %>
<% } %>
<!-- </sup> -->
</span>
<% } %>
<section class="axis-row--tail">
<% if (attachment) { %>
<section class="attachment">
<a class="attachment--btn" href="#attachment">[<%- attachmentTitle %>]</a>
<div class="attachment--view"></div>
<span class="axis-inline-title-form"></span>
</section>
<% if (adresse) { %>
<section class="axis-row--adresse">
<%- adresse %></section>
</section>
<% } %>
<% if (boucle) { %>
<span class="boucle option">
<span class="icon icon--repeat"></span>
<!-- <sup> -->
<% if (boucle.type === rangeType.exact) { %>
<%- boucle.value %>
<% } else if (boucle.type === rangeType.minimal) { %>
<%- boucle.value %>+
<% } else if (boucle.type === rangeType.range) { %>
<%- boucle.value[0] %>-<%- boucle.value[1] %>
<% } %>
<!-- </sup> -->
</span>
<% } %>
<% if (attachment) { %>
<section class="attachment">
<a class="attachment--btn" href="#attachment">[<%- attachmentTitle %>]</a>
<div class="attachment--view"></div>
</section>
<% } %>
<% if (terme) { %>
<section class="terme">
<span class="label">
......@@ -98,7 +85,6 @@
<% if (isLink) { %>
<button name="unlink"><%- t('rompre le lien') %></button>
<% } else { %>
<button name="link"><%- t('créer un axe lié') %></button>
<button name="edit" title="Modifier cet axe"><%- t('éditer') %></button>
<button name="add" title="Ajoute un sous-axe">+</button>
<% } %>
......
<div>
<header id="sidebar" data-expanded="<%- metaExpanded %>">
<article>
<header id="sidebar">
<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>
<button class="edit score-edit"><%- t('Éditer') %></button>
<button data-name="export"><%- t('Export') %></button>
</div>
<h1 id="title"><%- title %></h1>
</header>
<div id="main-area">
<div id="expand-level-slider"></div>
<div id="axis-wrapper">
<ol></ol>
</div>
</div>
</article>
<aside class="panel__alt panel--score-meta <% if (!metaExpanded) { %>is-collapsed<% } %>">
<span class="panel__toggle__alt js-toggle"><%- t('Meta donneés') %></span>
<section class="content">
<button class="edit score-edit"><%- t('Éditer') %></button>
<dl class="score-meta">
<% if (presentation) { %>
<% if (presentation) { %>
<dt><%- t('Présentation') %></dt>
<dd><%- presentation %></dd>
<% } %>
......@@ -73,9 +86,9 @@
<dd class="extended">
<ul>
<%
tag_list = tags;
tag_list = tags;
for (var i=0; i < tag_list.length; i++) { %>
for (var i=0; i < tag_list.length; i++) { %>
<li><%- tag_list[i] %></li>
<% } %>
</ul>
......@@ -99,15 +112,7 @@
</dl>
<div id="permissions"></div>
<form></form>
</header>
<div id="main-area">
<div id="expand-level-slider"></div>
<div id="axis-wrapper">
<ol></ol>
</div>
</div>
</div>
</section>
</aside>
\ No newline at end of file
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