Switch the twitter view to use a carousel
This commit is contained in:
parent
4480d2d8e2
commit
ad8b72b3aa
3 changed files with 163 additions and 22 deletions
|
@ -306,6 +306,52 @@ function LandingCtrl($scope, UserService, ApiService, Features, Config) {
|
|||
|
||||
$scope.chromify = function() {
|
||||
browserchrome.update();
|
||||
|
||||
var jcarousel = $('.jcarousel');
|
||||
|
||||
jcarousel
|
||||
.on('jcarousel:reload jcarousel:create', function () {
|
||||
var width = jcarousel.innerWidth();
|
||||
jcarousel.jcarousel('items').css('width', width + 'px');
|
||||
})
|
||||
.jcarousel({
|
||||
wrap: 'circular'
|
||||
});
|
||||
|
||||
$('.jcarousel-control-prev')
|
||||
.on('jcarouselcontrol:active', function() {
|
||||
$(this).removeClass('inactive');
|
||||
})
|
||||
.on('jcarouselcontrol:inactive', function() {
|
||||
$(this).addClass('inactive');
|
||||
})
|
||||
.jcarouselControl({
|
||||
target: '-=1'
|
||||
});
|
||||
|
||||
$('.jcarousel-control-next')
|
||||
.on('jcarouselcontrol:active', function() {
|
||||
$(this).removeClass('inactive');
|
||||
})
|
||||
.on('jcarouselcontrol:inactive', function() {
|
||||
$(this).addClass('inactive');
|
||||
})
|
||||
.jcarouselControl({
|
||||
target: '+=1'
|
||||
});
|
||||
|
||||
$('.jcarousel-pagination')
|
||||
.on('jcarouselpagination:active', 'a', function() {
|
||||
$(this).addClass('active');
|
||||
})
|
||||
.on('jcarouselpagination:inactive', 'a', function() {
|
||||
$(this).removeClass('active');
|
||||
})
|
||||
.jcarouselPagination({
|
||||
'item': function(page, carouselItems) {
|
||||
return '<a href="javascript:void(0)" class="jcarousel-page"></a>';
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
$scope.getEnterpriseLogo = function() {
|
||||
|
|
Reference in a new issue