top scrollbar on poll table
This commit is contained in:
parent
fe4e6cd275
commit
50a2866b26
1 changed files with 22 additions and 0 deletions
|
@ -16,6 +16,28 @@ export default Ember.View.extend(Em.I18n.TranslateableProperties, {
|
||||||
this._super();
|
this._super();
|
||||||
Ember.run.scheduleOnce('afterRender', this, function(){
|
Ember.run.scheduleOnce('afterRender', this, function(){
|
||||||
$('.user-selections-table').floatThead({});
|
$('.user-selections-table').floatThead({});
|
||||||
|
|
||||||
|
/*
|
||||||
|
* scrollbar on top of table
|
||||||
|
*/
|
||||||
|
var topScrollbarInner = $('<div></div>')
|
||||||
|
.css('width', $('.user-selections-table').width() )
|
||||||
|
.css('height', '1px');
|
||||||
|
var topScrollbarOuter = $('<div></div>')
|
||||||
|
.addClass('top-scrollbar')
|
||||||
|
.css('width', '100%' )
|
||||||
|
.css('overflow-x', 'scroll')
|
||||||
|
.css('overflow-y', 'hidden');
|
||||||
|
$('.table-scroll').before(
|
||||||
|
topScrollbarOuter.append(topScrollbarInner)
|
||||||
|
);
|
||||||
|
|
||||||
|
$('.table-scroll').scroll(function(){
|
||||||
|
$('.top-scrollbar').scrollLeft( $('.table-scroll').scrollLeft() );
|
||||||
|
});
|
||||||
|
$('.top-scrollbar').scroll(function(){
|
||||||
|
$('.table-scroll').scrollLeft( $('.top-scrollbar').scrollLeft() );
|
||||||
|
});
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue