Restore former tl comparison markup (but donate an extra span tag)

pull/1241/head
Till Breuer 11 years ago
parent c9902f7c0e
commit b57a4aa899
  1. 22
      karma/tests/directives/timelines/timeline-column-data-directive-test.js
  2. 3
      public/templates/timelines/timeline_column_data.html

@ -83,23 +83,23 @@ describe('timelineColumnData Directive', function() {
compile();
})
it('should assign a historical date kind class to the data container', 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;
});
describe('the historical data container', function() {
beforeEach(function() {
historicalDataContainer = element.find('.tl-historical a');
historicalContainerElement = element.find('.tl-historical');
historicalDataContainer = historicalContainerElement.find('.historical-data');
});
it('should contain the historical data', function() {
var historicalContent = historicalDataContainer.text();
expect(historicalContent).to.equal(historicalStartDate);
expect(historicalDataContainer.text()).to.equal(historicalStartDate);
});
it('should have a css class indicating the change', function() {
expect(historicalDataContainer.hasClass('tl-icon-preponed')).to.be.true;
it('should contain a link with a css class indicating the change', function() {
expect(historicalContainerElement.find('a').hasClass('tl-icon-preponed')).to.be.true;
});
})
});
@ -118,16 +118,16 @@ describe('timelineColumnData Directive', function() {
describe('the historical data container', function() {
beforeEach(function() {
historicalDataContainer = element.find('.tl-historical a');
historicalContainerElement = element.find('.tl-historical');
historicalDataContainer = historicalContainerElement.find('.historical-data');
});
it('should contain the historical data', function() {
var historicalContent = historicalDataContainer.text();
expect(historicalContent).to.equal(historicalType.name);
expect(historicalDataContainer.text()).to.equal(historicalType.name);
});
it('should have a css class indicating the change', function() {
expect(historicalDataContainer.hasClass('tl-icon-changed')).to.be.true;
it('should contain a link with a css class indicating the change', function() {
expect(historicalContainerElement.find('a').hasClass('tl-icon-changed')).to.be.true;
});
})

@ -1,9 +1,10 @@
<span class="tl-historical" ng-if="historicalDataDiffers">
<span ng-bind="historicalData" class="historical-data"></span>
<a href="javascript://" title="{{labelTimelineChanged}}"
ng-class="[
'icon',
'tl-icon-' + (isDateColumn && historicalDateKind || 'changed')
]" ng-bind="historicalData"></a>
]"></a>
<br/>
</span>

Loading…
Cancel
Save