--- a/cms/app-client/app/components/visu-chrono.js Fri Dec 18 15:21:00 2015 +0100
+++ b/cms/app-client/app/components/visu-chrono.js Fri Dec 18 15:21:52 2015 +0100
@@ -3,6 +3,11 @@
export default Ember.Component.extend({
didInsertElement: function(){
var _this = this;
+
+ if (this.get('container').lookup('controller:application').date !== null){
+ this.highlightQuery(this.get('container').lookup('controller:application').date.split(','));
+ }
+
var isMouseDown = false,
isHighlighted;
$("#our_table li").mousedown(function () {
@@ -30,5 +35,11 @@
}).get().join(',');
dateQuery = (dateQuery == "") ? null : dateQuery;
this.sendAction('action', dateQuery);
+ },
+ highlightQuery: function(list){
+ list.map(function(elt, index){
+ var year = Math.floor(parseInt(elt)/10)*10;
+ $("#"+year+" ."+(parseInt(elt)-year)).toggleClass("highlighted", true);
+ });
}
});