Allow unselecting a predefined export

We just toggle the class instead of always add it on click and set the export
only if the resulted element has the class.

issue8628
review280031005
This commit is contained in:
Cédric Krier
2019-09-07 23:32:47 +02:00
parent 3b03a6e621
commit d2a11fcba1
+4 -2
View File
@@ -1648,9 +1648,11 @@
node.click();
}
}).click(function(event) {
node.addClass('bg-primary')
node.toggleClass('bg-primary')
.siblings().removeClass('bg-primary');
this.sel_predef(jQuery(event.target).attr('export_id'));
if (node.hasClass('bg-primary')) {
this.sel_predef(node.attr('export_id'));
}
}.bind(this));
this.predef_exports_list.append(node);
},