Fix css classes indicating changed dates in timeline

pull/1241/head
Till Breuer 11 years ago
parent b57a4aa899
commit ed9bd66ec4
  1. 2
      app/assets/javascripts/angular/directives/timelines/timeline-column-data-directive.js
  2. 4
      karma/tests/directives/timelines/timeline-column-data-directive-test.js

@ -108,7 +108,7 @@ angular.module('openproject.timelines.directives')
var oldDate = planningElement.historical_element[attr];
if (oldDate && newDate) {
return (newDate < oldDate ? 'postponed' : 'preponed');
return (newDate < oldDate ? 'preponed' : 'postponed');
}
return "changed";
}

@ -85,7 +85,7 @@ describe('timelineColumnData Directive', function() {
it('should assign a change kind class to the current date', function() {
var container = element.find('.tl-column');
expect(container.hasClass('tl-preponed')).to.be.true;
expect(container.hasClass('tl-postponed')).to.be.true;
});
describe('the historical data container', function() {
@ -99,7 +99,7 @@ describe('timelineColumnData Directive', function() {
});
it('should contain a link with a css class indicating the change', function() {
expect(historicalContainerElement.find('a').hasClass('tl-icon-preponed')).to.be.true;
expect(historicalContainerElement.find('a').hasClass('tl-icon-postponed')).to.be.true;
});
})
});

Loading…
Cancel
Save