Skip to content

Commit adae9a8

Browse files
committed
Move view class to table under div and fix failing unit tests
1 parent caaaf5c commit adae9a8

File tree

16 files changed

+17
-17
lines changed

16 files changed

+17
-17
lines changed

src/js/datetimepicker.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,8 @@
9696
return {
9797
restrict: 'E',
9898
require: 'ngModel',
99-
template: '<div class="datetimepicker table-responsive {{data.currentView}}-view">' +
100-
'<table class="table table-striped">' +
99+
template: '<div class="datetimepicker table-responsive">' +
100+
'<table class="table table-striped {{ data.currentView }}-view">' +
101101
' <thead>' +
102102
' <tr>' +
103103
' <th class="left" data-ng-click="changeView(data.currentView, data.leftDate, $event)" data-ng-show="data.leftDate.selectable"><i class="glyphicon glyphicon-arrow-left"/></th>' +

test/view/de/day.spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ describe('current view displayed on the markup', function(){
2727
}));
2828

2929
it('should have `.day-view` class', function () {
30-
expect(jQuery(element).hasClass('day-view')).toBeTruthy();
30+
expect(jQuery('table', element).hasClass('day-view')).toBeTruthy();
3131
});
3232
});
3333

test/view/de/hour.spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ describe('current view displayed on the markup', function(){
2727
}));
2828

2929
it('should have `.hour-view` class', function () {
30-
expect(jQuery(element).hasClass('hour-view')).toBeTruthy();
30+
expect(jQuery('table', element).hasClass('hour-view')).toBeTruthy();
3131
});
3232
});
3333

test/view/de/minute.spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ describe('current view displayed on the markup', function(){
2727
}));
2828

2929
it('should have `.minute-view` class', function () {
30-
expect(jQuery(element).hasClass('minute-view')).toBeTruthy();
30+
expect(jQuery('table', element).hasClass('minute-view')).toBeTruthy();
3131
});
3232
});
3333

test/view/de/month.spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ describe('current view displayed on the markup', function(){
2727
}));
2828

2929
it('should have `.month-view` class', function () {
30-
expect(jQuery(element).hasClass('month-view')).toBeTruthy();
30+
expect(jQuery('table', element).hasClass('month-view')).toBeTruthy();
3131
});
3232
});
3333

test/view/de/year.spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ describe('current view displayed on the markup', function(){
2727
}));
2828

2929
it('should have `.year-view` class', function () {
30-
expect(jQuery(element).hasClass('year-view')).toBeTruthy();
30+
expect(jQuery('table', element).hasClass('year-view')).toBeTruthy();
3131
});
3232
});
3333

test/view/en/day.spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ describe('current view displayed on the markup', function(){
2727
}));
2828

2929
it('should have `.day-view` class', function () {
30-
expect(jQuery(element).hasClass('day-view')).toBeTruthy();
30+
expect(jQuery('table', element).hasClass('day-view')).toBeTruthy();
3131
});
3232
});
3333

test/view/en/hour.spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ describe('current view displayed on the markup', function(){
2727
}));
2828

2929
it('should have `.hour-view` class', function () {
30-
expect(jQuery(element).hasClass('hour-view')).toBeTruthy();
30+
expect(jQuery('table', element).hasClass('hour-view')).toBeTruthy();
3131
});
3232
});
3333

test/view/en/minute.spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ describe('current view displayed on the markup', function(){
2727
}));
2828

2929
it('should have `.minute-view` class', function () {
30-
expect(jQuery(element).hasClass('minute-view')).toBeTruthy();
30+
expect(jQuery('table', element).hasClass('minute-view')).toBeTruthy();
3131
});
3232
});
3333

test/view/en/month.spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ describe('current view displayed on the markup', function(){
2727
}));
2828

2929
it('should have `.month-view` class', function () {
30-
expect(jQuery(element).hasClass('month-view')).toBeTruthy();
30+
expect(jQuery('table', element).hasClass('month-view')).toBeTruthy();
3131
});
3232
});
3333

0 commit comments

Comments
 (0)