Commit b8fe3dba authored by Nicolas's avatar Nicolas

chahgements suite au retour Joris

- éviter bouton ”(dé)plier" en mode vue (clic n’importe où sur l'axe)
- (i) en noir et indications au survol (mode vue)
- ne pas noter l’alternative ("entre n et p axes") dans l’axe supérieur
- marquer les axes contingents comme barrés
- marquer les axes modulés comme soulignés
parent 43181b67
......@@ -118,6 +118,12 @@ li li {
/*color:blue;*/
cursor: pointer;
}
.trigger_infos_vue{
background: white;
border: 0;
/*color:blue;*/
cursor: pointer;
}
.vis{
display: inline;
}
......@@ -134,9 +140,13 @@ li li li li li li li .axis-title { color: rgb(171,104, 87); }
li li li li li li li li .axis-title { color: rgb(204,194, 16); }
[data-contingent="true" ] {
opacity: 0.8;
/*opacity: 0.8;*/
text-decoration: line-through;
}
[data-module="true" ] {
/*opacity: 0.8;*/
text-decoration: underline;
}
[data-toggled="true" ] ol {
display: none
}
......@@ -35,11 +35,14 @@ window.W = window.W || {};
events: {
'click .effaceAxe': 'effaceAxe',
'blur .axis-title-edit': 'editTitle',
'dblclick .axis-title': 'toggleLine',
'click .edit': 'editLine',
'click .toggle': 'toggleLine',
'click .add': 'addLine',
'click .trigger_infos': 'openInfos',
'mouseover .trigger_infos_vue': 'openInfos',
'click .axis-fermer-infos': 'closeInfos',
// 'mouseout .axis-infos-vue': 'closeInfosVue',
'blur #terme': 'editTextProperty',
'click #boucle': 'editTimeSequence',
'click #boucle_ok': 'saveTimeSequence',
......@@ -342,12 +345,15 @@ window.W = window.W || {};
infos.show();
infos.css('top', $target.offset().top);
infos.css('left', $target.offset().left);
return false;
},
closeInfos: function(e) {
//console.log("close infos");
var $target = $(e.target);
var infos_div = $target.parent().parent();
var selected = infos_div.find("#contingent").is(':checked');
// this.model.set("contingent", selected);
var selected_m = infos_div.find("#module_").is(':checked');
......@@ -361,64 +367,74 @@ window.W = window.W || {};
"aspect": selected_a,
"indications": selected_indications
});
infos_div.hide();
//this.render();
//console.log(infos);
},
closeInfosVue: function(e){
var $target = $(e.target);
$target.hide();
return false;
},
onRender: function() {
if(W.edit_mode){
console.log("rendering");
//console.log(this.model.get('title'));
if(this.model.get('contingent')){
console.log("contingent")
this.$el.find("#condition").removeClass("invis");
this.$el.find("#condition").addClass("vis");
}else{
this.$el.find("#condition").removeClass("vis");
this.$el.find("#condition").addClass("invis");
}
//console.log("rendering el ",this.$el);
this.$el.attr("data-id", this.model.get("id"));
this.$el.attr("data-contingent", this.model.get("contingent"));
var hasparent = this.model.get("parent");
//console.log(this.$el);
if (!hasparent) {
this.$el.find(".el_tag").addClass("invis_root");
}else if(hasparent.get("alternative_mode") == "exclusive"){
console.log("exclusive");
this.$el.find("#tag").removeClass("vis");
this.$el.find("#tag").addClass("invis");
}else{
this.$el.find("#tag").removeClass("invis");
this.$el.find("#tag").addClass("vis");
}
if(hasparent && (hasparent.get("alternative_mode"))){
console.log("PARENT", hasparent.get("alternative_mode"));
}
if(hasparent && ((hasparent.get("alternative_mode") == "inclusive") | (hasparent.get("alternative_mode") == "exclusive"))){
this.$el.find("#condition").removeClass("invis");
this.$el.find("#condition").addClass("vis");
this.$el.find("#imperative_env").removeClass("invis");
this.$el.find("#imperative_env").addClass("vis");
}else if(hasparent && !(hasparent.get("alternative_mode"))){
this.$el.find("#condition").removeClass("vis");
this.$el.find("#condition").addClass("invis");
this.$el.find("#imperative_env").removeClass("vis");
this.$el.find("#imperative_env").addClass("invis");
}
var sublines = this.model.get('sublines');
console.log("rendering");
//console.log(this.model.get('title'));
if(this.model.get('contingent')){
console.log("contingent")
this.$el.find("#condition").removeClass("invis");
this.$el.find("#condition").addClass("vis");
}else{
this.$el.find("#condition").removeClass("vis");
this.$el.find("#condition").addClass("invis");
}
//console.log("rendering el ",this.$el);
this.$el.attr("data-id", this.model.get("id"));
this.$el.attr("data-contingent", this.model.get("contingent"));
var hasparent = this.model.get("parent");
//console.log(this.$el);
if (!hasparent) {
this.$el.find(".el_tag").addClass("invis_root");
}else if(hasparent.get("alternative_mode") == "exclusive"){
console.log("exclusive");
this.$el.find("#tag").removeClass("vis");
this.$el.find("#tag").addClass("invis");
}else{
this.$el.find("#tag").removeClass("invis");
this.$el.find("#tag").addClass("vis");
}
if(hasparent && (hasparent.get("alternative_mode"))){
console.log("PARENT", hasparent.get("alternative_mode"));
}
if(hasparent && ((hasparent.get("alternative_mode") == "inclusive") | (hasparent.get("alternative_mode") == "exclusive"))){
this.$el.find("#condition").removeClass("invis");
this.$el.find("#condition").addClass("vis");
this.$el.find("#imperative_env").removeClass("invis");
this.$el.find("#imperative_env").addClass("vis");
}else if(hasparent && !(hasparent.get("alternative_mode"))){
this.$el.find("#condition").removeClass("vis");
this.$el.find("#condition").addClass("invis");
this.$el.find("#imperative_env").removeClass("vis");
this.$el.find("#imperative_env").addClass("invis");
}
var sublines = this.model.get('sublines');
//show mainline nodes if they are present
if (sublines.length) {
var treeView = new W.TreeView({
collection: sublines
});
this.showChildView('tree', treeView);
}
}else{
var sublines = this.model.get('sublines');
//show mainline nodes if they are present
if (sublines.length) {
var treeView = new W.TreeView({
collection: sublines
});
this.showChildView('tree', treeView);
}
}else{
this.$el.attr("data-module", this.model.get("module_"));
this.$el.attr("data-contingent", this.model.get("contingent"));
var sublines = this.model.get('sublines');
console.log("mode lecture");
if (sublines.length) {
var treeView = new W.TreeView({
......
......@@ -176,7 +176,7 @@
<% if (alternative_symbole) { %><%= alternative_symbole %><% } else { %><% }%>
</span>
<span class="axis-title-edit"><%- title %></span>
<span class="trigger_infos">(i)</span>
<span class="trigger_infos_vue">(i)</span>
<!-- autre possibilité avec placeholder
<input type="text" id="boucle" value="" placeholder="placeholder" />
......@@ -191,9 +191,9 @@
<% if (boucle) { %><%= boucle %><% } else { %><% }%>
</span>
<span id="alternative">
<!-- <span id="alternative">
<% if (alternative) { %><%= alternative %><% } else { %><% }%>
</span>
</span> -->
<span id="condition" class="invis">
<% if (condition) { %><%= condition %><% } else { %><% }%>
</span>
......@@ -204,7 +204,7 @@
<!--- les conditions sont au niveau des Sous-axes donc ne doit pas apparaitre dans le menu déroulant -->
<button class="toggle">(Dé)plier</button>
<!-- <button class="toggle">(Dé)plier</button> -->
</span>
<div class="boucle-infos" class="invis">
......@@ -233,15 +233,15 @@
<input type="button" id="alt_x" value="effacer" />
</div>
<div class="axis-infos">
<div class="axis-infos axis-infos-vue">
Axe:
<div>
<!-- <div>
<input type="checkbox" name="contingent" id="contingent" value="1" <% if (contingent) { %>checked<% } %> tabindex="0"> contingent
</div>
<div>
<input type="checkbox" name="module_" id="module_" value="1" <% if (module_) { %>checked<% } %>> modulé
</div>
</div> -->
<div>
Aspect: <% if (aspect) { %><%= aspect %><% } %>
......
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