Commit d14da9c7 authored by gijs's avatar gijs

Implementation of inline styles, cut corners on aspect, indications and terme as dot

parent ab0e5ee2
This diff is collapsed.
......@@ -6,7 +6,7 @@ window.W = window.W || {};
(function(undefined) {
'use strict';
W.ScoreApp = new Backbone.Marionette.Application({
W.ScoreApp = new Marionette.Application({
region: 'body',
triggers: {
......
......@@ -6,7 +6,7 @@ window.W = window.W || {};
(function (undefined) {
'use strict';
W.ScoreController = Backbone.Marionette.Object.extend({
W.ScoreController = Marionette.MnObject.extend({
home: function () {
var baseView = this.getOption('application').getView();
var view = new W.HomeView();
......
......@@ -4,20 +4,24 @@ W.lang = W.lang || {};
W.lang.en = {
"Adresse": "",
"À propos": "About",
"Actant": "Actant",
"Adresse": "Adresse",
"Aide": "Help",
"Annuler": "Cancel",
"À propos": "About",
"aspect": "aspect",
"au moins": "at least",
"Auteur de la partition": "Score author",
// "Auteur de la perfomance": "",
"Auteur de la performance": "Performance author",
"Axe": "Axis",
"axe contingent": "contingent axis",
"axe modulé": "modulated axis",
"Bienvenue": "Welcome",
"choisir": "choose",
// "Code": "",
// "Commandement": "",
// "Condition": "",
"Code": "Code",
"Commandement": "Commandement",
"Condition": "Condition",
"Créer": "Create",
"créer un axe lié": "Make a linked axis",
"Créer une nouvelle partition": "Create a new score",
......@@ -26,22 +30,25 @@ W.lang.en = {
"Durée": "Length",
"éditer": "Edit",
"Éditer": "Edit",
// "Effectif": "",
"Effectif": "Effectif",
// "effectuer l’axe": "",
"Enregistrer": "Save",
"Enregistrer…": "Saving…",
"En savoir plus": "Further inforrmation",
"En savoir plus": "Further information",
"entre": "between",
"Etes-vous sur de vouloir vous deconnecter?": "Are you sure you want to disconnect",
"exactement": "exactly",
"Export": "Export",
"Fiche": "File",
"Genre": "Genre",
// "indeterminé": "undefined",
"Impérative": "Imperative",
"indéterminé": "undefined",
"Indications": "Indications",
"Langue": "Language",
// "Mise": "",
"Modifié le": "Modified on",
"OK": "OK",
"Partitions": "Scores",
"Partitions existantes": "Existing score",
"Partitions mises à jour récemment": "Recently updated scores",
......@@ -57,8 +64,9 @@ W.lang.en = {
"Se connecter": "Log in",
"Se déconnecter": "Log out",
"Supprimer": "Delete",
"Tag": "Tag",
"Tags": "Tags",
"Terme": "",
"Terme": "Terme",
"Titre": "Title",
"Traduction": "Translation",
"Transcription": "Transcription",
......
......@@ -11,6 +11,7 @@ window.W = window.W || {};
return W.extendedTemplate(rawTemplate, options);
}
Marionette.setRenderer(Marionette.TemplateCache.render);
var csrftoken = W.utils.getCookie('csrftoken');
......
......@@ -6,7 +6,7 @@ window.W = window.W || {};
(function (undefined) {
'use strict';
W.ScoreRouter = Backbone.Marionette.AppRouter.extend({
W.ScoreRouter = Marionette.AppRouter.extend({
appRoutes: {
'': 'home',
'apropos(/)': 'about',
......
This diff is collapsed.
/**
* @license
* MarionetteJS (Marionette.AppRouter)
* ----------------------------------
* v1.0.1
*
* Copyright (c)2018 Derick Bailey, Muted Solutions, LLC.
* Distributed under MIT license
*
* http://marionettejs.com
*/
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("backbone"),require("underscore"),require("backbone.marionette")):"function"==typeof define&&define.amd?define(["backbone","underscore","backbone.marionette"],e):(t.Marionette=t.Marionette||{},t.Marionette.AppRouter=e(t.Backbone,t._,t.Marionette))}(this,function(t,e,o){"use strict";t=t&&t.hasOwnProperty("default")?t.default:t,e=e&&e.hasOwnProperty("default")?e.default:e;var n="default"in o?o.default:o,r=["triggerMethod","normalizeMethods","_setOptions","mergeOptions","getOption","bindEvents","unbindEvents"],i=["appRoutes","controller"],s=t.Router.extend({constructor:function(e){this._setOptions(e),this.mergeOptions(e,i),t.Router.apply(this,arguments);var o=this.appRoutes,n=this._getController();this.processAppRoutes(n,o),this.on("route",this._processOnRoute,this)},appRoute:function(t,e){var o=this._getController();return this._addAppRoute(o,t,e),this},_processOnRoute:function(t,o){if(e.isFunction(this.onRoute)){var n=e.invert(this.appRoutes)[t];this.onRoute(t,n,o)}},processAppRoutes:function(t,o){var n=this;if(!o)return this;var r=e.keys(o).reverse();return e.each(r,function(e){n._addAppRoute(t,e,o[e])}),this},_getController:function(){return this.controller},_addAppRoute:function(t,o,n){var r=t[n];if(!r)throw new Error('Method "'+n+'" was not found on the controller');this.route(o,n,e.bind(r,t))}});return e.extend(s.prototype,e.pick(o.MnObject.prototype,r)),n.AppRouter=s,s});
//# sourceMappingURL=marionette.approuter.min.js.map
\ No newline at end of file
/**
* @license
* MarionetteJS (Marionette.TemplateCache)
* ----------------------------------
* v1.0.0
*
* Copyright (c)2018 Derick Bailey, Muted Solutions, LLC.
* Distributed under MIT license
*
* http://marionettejs.com
*/
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("underscore"),require("backbone")):"function"==typeof define&&define.amd?define(["underscore","backbone"],t):(e.Marionette=e.Marionette||{},e.Marionette.TemplateCache=t(e._,e.Backbone))}(this,function(e,t){"use strict";e=e&&e.hasOwnProperty("default")?e.default:e,t=t&&t.hasOwnProperty("default")?t.default:t;var n=function(e){this.templateId=e};return e.extend(n,{templateCaches:{},render:function(t,r){if(!t)throw new Error("Cannot render the template since its false, null or undefined.");return(e.isFunction(t)?t:n.get(t))(r)},get:function(e,t){var r=this.templateCaches[e];return r||(r=new n(e),this.templateCaches[e]=r),r.load(t)},clear:function(){for(var e=void 0,t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];var a=n.length;if(a>0)for(e=0;e<a;e++)delete this.templateCaches[n[e]];else this.templateCaches={}}}),e.extend(n.prototype,{load:function(e){if(this.compiledTemplate)return this.compiledTemplate;var t=this.loadTemplate(this.templateId,e);return this.compiledTemplate=this.compileTemplate(t,e),this.compiledTemplate},loadTemplate:function(e,n){var r=t.$(e);if(!r.length)throw new Error('Could not find template: "'+e+'"');return r.html()},compileTemplate:function(t,n){return e.template(t,n)}}),n});
//# sourceMappingURL=marionette.templatecache.min.js.map
\ No newline at end of file
......@@ -143,6 +143,10 @@
<script id="user-list-template" type="text/template">
{% include "playground/underscore/user-list.mtpl" %}
</script>
<script id="node-tree-template" type="text/template">
{% include "playground/underscore/node-tree.mtpl" %}
</script>
</head>
<body class="page">
......@@ -151,6 +155,8 @@
<script src="{% static 'playground/vendors/backbone-min.js' %}"></script>
<script src="{% static 'playground/vendors/backbone.radio.min.js' %}"></script>
<script src="{% static 'playground/vendors/backbone.marionette.min.js' %}"></script>
<script src="{% static 'playground/vendors/backbone.marionette.templatecache.min.js' %}"></script>
<script src="{% static 'playground/vendors/backbone.marionette.approuter.min.js' %}"></script>
<script src="{% static 'playground/vendors/backbone-relational.min.js' %}"></script>
<script src="{% static 'playground/vendors/backbone.paginator.min.js' %}"></script>
<script src="{% static 'playground/vendors/backgrid.js' %}"></script>
......
<% if (hasModel) { %>
<label>Titre: <input type="text" name="title" value="<%- title %>" /></label><a href="<%- attachment %>">Link</a><button>supprimer</delete>
<label><span class="label-text"><%- t('Titre') %></span><input type="text" name="title" value="<%- title %>" /></label><a href="<%- attachment %>">Link</a><button>supprimer</delete>
<% } else { %>
<label>Titre: <input type="text" name="title" ></label>
<label>Fiche: <input type="file" name="file" ></label>
<label><span class="label-text"><%- t('Titre') %></span><input type="text" name="title" ></label>
<label><span class="label-text"><%- t('Fiche') %></span><input type="file" name="file" ></label>
<% } %>
\ No newline at end of file
<fieldset>
<% if (parent) { %>
<label>
<span class="label-text">Tag</span>
<select name="tag">
<% _.each(tagChoices, function(t) {%>
<option value="<%= t %>" <% if (tag===t) { %>selected<% } %>><%= t %></option>
......@@ -17,7 +18,7 @@
<input type="text" name="condition" value="<%- condition %>">
</label>
<label class="inline"><input type="checkbox" name="imperative" <% if (imperative) { %>checked<% } %>>
Impérative
<%- t('Impérative') %>
</label>
<!-- terme -->
......@@ -35,7 +36,7 @@
<section class="fieldgroup toggable">
<label class="inline">
<input type="checkbox" name="aspect" <% if (aspect) { %>checked<% } %>>
aspect
<%- t('aspect') %>
</label>
<label class="inline">
<select name="aspect-value">
......@@ -49,17 +50,17 @@
<!-- contingent -->
<label>
<input type="checkbox" name="contingent" <% if (contingent) { %>checked<% } %>>
axe contingent
<%- t('axe contingent') %>
</label>
<!-- modulé -->
<label>
<input type="checkbox" name="module" <% if (module_) { %>checked<% } %>>
axe modulé
<%- t('axe modulé') %>
</label>
<!-- actant -->
<label><span class="label-text">actant</span>
<label><span class="label-text"><%- t('Actant') %></span>
<input type="text" name="actant" value="<%- actant %>">
</label>
......@@ -76,23 +77,23 @@
<legend></legend>
<section class="fields">
<!-- Commandement -->
<label><span class="label-text">commandement</span>
<label><span class="label-text"><%- t('Commandement') %></span>
<input type="text" name="commandement" value="<%- commandement %>">
</label>
<!-- Destination -->
<label><span class="label-text">destination</span>
<label><span class="label-text"><%- t('Destination') %></span>
<input type="text" name="destination" value="<%- destination %>">
</label>
<!-- Code -->
<label><span class="label-text">code</span>
<label><span class="label-text"><%- t('Code') %></span>
<input type="text" name="code" value="<%- code %>">
</label>
<!-- Indications -->
<label><span class="label-text">indications</span>
<label><span class="label-text"><%- t('Indications') %></span>
<textarea name="indications"><%- indications %></textarea>
</label>
</section>
</fieldset>
<button data-name="close">Annuler</button>
<button data-name="submit">OK</button>
<button data-name="close"><%- t('Annuler') %></button>
<button data-name="submit"><%- t('OK') %></button>
<div class="metadata">
<span class="alternative"><%- alternative %></span>
<span class="tag"></span>
</div>
<ol></ol>
\ No newline at end of file
......@@ -3,27 +3,35 @@
<section class="axis-row--header">
<span class="icon icon--handle"></span>
</section>
<% if (condition) { %>
<section class="condition">
<span class="label">
<% if (imperative) { %>! <% } %><%- condition %>
</span>
</section>
<% } %>
<% if (actant) { %>
<section class="axis-row--actant">
<%- actant %></section>
<% } %>
<section class="axis-row--body">
<% if (actant) { %>
<span class="actant">
<%- actant %></span>
<% } %>
<section class="axis-row--body" <% if (aspect) { %> data-aspect="<%- aspect %>"<% } %>>
<span class="axis-title">
<%- title %>
<% if (adresse) { %>
<span class="adresse">
<%- adresse %></span>
<% } %>
<%- title %></span>
</section>
<% if (adresse) { %>
<section class="axis-row--adresse">
<%- adresse %></section>
<% } %>
<% if (aspect) { %>
<!-- <% 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>
......@@ -55,11 +63,7 @@
<% } %>
</section>
<section class="axis-row--tail">
<% if (condition) { %>
<span class="condition"><% if (imperative) { %>! <% } %><%- condition %></span>
<% } %>
<% if (boucle) { %>
<span id="boucle" class="option">
<span class="icon icon--repeat"></span>
......@@ -74,14 +78,8 @@
<!-- </sup> -->
</span>
<% } %>
<span class="terme option">
<% if (terme) { %>
<span class="icon icon--stop"></span> <%- terme.substring(0,50) %>
<% if(terme.length > 50) { %>
...<span class="full"><%- terme %></span><% } %><% } %></span>
<!-- <span id="alternative">
<% if (alternative) { %>
<%- alternative %><% } %></span> -->
<section class="axis-row--tail">
<% if (attachment) { %>
<section class="attachment">
<a class="attachment--btn" href="#attachment">[<%- attachmentTitle %>]</a>
......@@ -89,6 +87,13 @@
</section>
<% } %>
</section>
<% if (terme) { %>
<section class="terme">
<span class="label">
<%- terme %>
</span>
</section>
<% } %>
<section class="axis-row--actions">
<% if (isLink) { %>
<button name="unlink"><%- t('rompre le lien') %></button>
......@@ -107,5 +112,5 @@
<% if (sublines.length) { %>
<ol></ol>
<section class="sublines"></section>
<% } %>
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