Commit 97b02cdd authored by alexandre's avatar alexandre

Merge branch 'master' of gitlab.constantvzw.org:osp/work.w

parents 1d6cbce7 76797158
......@@ -232,9 +232,7 @@ window.W = window.W || {};
});
var num = alt_p;
//exception: si la condition est alt p et alt n = 1 il faut un sous-axe de plus pour définir l'axe
if (alt_p == 1) {
num++;
}
if(alt_p == 1){num++;}
this.addLinesAlternative(num, alt_symbole);
alt_div.hide();
this.render();
......@@ -310,7 +308,7 @@ window.W = window.W || {};
editTimeSequence: function(e) {
if (W.edit_mode) {
if(W.edit_mode){
var $target = $(e.target);
var boucle_div = $target.parent().parent().find('.boucle-infos');
boucle_div.show();
......@@ -415,10 +413,10 @@ window.W = window.W || {};
var title = "Sous axe " + incr;
var title2 = "Sous axe " + (incr + 1);
var alts = '';
if (this.model.get("alternative_mode")) {
if(this.model.get("alternative_mode")){
alts = "V" + this.model.get('alternative_n') + "-" + this.model.get('alternative_p');
if (this.model.get("alternative_mode") == "exclusive") {
alts = "V" + this.model.get('alternative_p');
if(this.model.get("alternative_mode") == "exclusive"){
alts = "V"+this.model.get('alternative_p');
}
}
if (sublines.length == 0) {
......@@ -430,7 +428,7 @@ window.W = window.W || {};
} else {
sublines.add({
title: title,
alternative_symbole: alts
alternative_symbole : alts
});
}
......@@ -555,11 +553,11 @@ window.W = window.W || {};
//console.log(this.$el);
if (!hasparent) {
this.$el.find(".el_tag").addClass("invis_root");
} else if (hasparent.get("alternative_mode") == "exclusive") {
}else if(hasparent.get("alternative_mode") == "exclusive"){
console.log("exclusive");
this.$el.find(".tag").removeClass("vis");
this.$el.find(".tag").addClass("invis");
} else {
}else{
this.$el.find(".tag").removeClass("invis");
this.$el.find(".tag").addClass("vis");
}
......@@ -614,7 +612,6 @@ window.W = window.W || {};
triggers: {
'click .save': 'save',
'click .delete': 'delete',
'blur #title': 'editTextProperty',
'blur #stage_set': 'editTextProperty',
'click .mode': 'setEdit',
......@@ -658,20 +655,6 @@ window.W = window.W || {};
this.model.save();
},
onDelete: function(view, event) {
console.log("ok");
var r = confirm("Vous êtes sur le point de supprimer la partition intitulée \"" + this.model.get("title") + "\". Continuer?");
if (r) {
this.model.destroy({
success: function() {
Backbone.history.navigate('/', {
trigger: true
});
}
});
}
},
onRender: function() {
var mainline = this.model.get("mainline");
......@@ -779,20 +762,7 @@ window.W = window.W || {};
W.ListItemView = Backbone.Marionette.View.extend({
tagName: 'li',
template: '#list-item-template',
triggers: {
"click .delete": "delete"
},
onDelete: function(view, event) {
console.log("ok");
var r = confirm("Vous êtes sur le point de supprimer la partition intitulée \"" + this.model.get("title") + "\". Continuer?");
if (r) {
this.model.destroy();
}
}
template: '#list-item-template'
});
......@@ -823,7 +793,7 @@ window.W = window.W || {};
title: title
}, {
success: function() {
Backbone.history.navigate('/' + myModel.id + '/', {
Backbone.history.navigate('/' + myModel.id + '/edit/', {
trigger: true
});
}
......
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