Commit 567c22ce authored by Kristof De Jaeger's avatar Kristof De Jaeger
Browse files

Issue #3186516: alter the read more

parent d0fc12b0
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -159,17 +159,17 @@
    let duration	= '1000';
    let easing = 'linear';

    $('.main-content').once().each(function() {
    $('.status__content').once().each(function() {
      if ($(this).height() > height) {
        $(this).data('fullHeight', $(this).height()).css('height', height);
        $(this).after('<a href="javascript:void(0);" class="reader-more-link closed">' + moreText + '</a>');
        $(this).append('<a href="javascript:void(0);" class="reader-more-link closed">' + moreText + '</a>');
      }
    });

    let openSlider = function() {
      let link = $(this);
      let openHeight = link.prev('.main-content').data('fullHeight') + 'px';
      link.prev('.main-content').animate({'height': openHeight}, {duration: duration }, easing);
      let openHeight = (link.parent('.status__content').data('fullHeight') + 40) + 'px';
      link.parent('.status__content').animate({'height': openHeight}, {duration: duration }, easing);
      link.text(lessText).addClass('open').removeClass('closed');
      link.unbind('click', openSlider);
      link.bind('click', closeSlider);
@@ -177,7 +177,7 @@

    let closeSlider = function() {
      let link = $(this);
      link.prev('.main-content').animate({'height': closeHeight}, {duration: duration }, easing);
      link.parent('.status__content').animate({'height': closeHeight}, {duration: duration }, easing);
      link.text(moreText).addClass('closed').removeClass('open');
      link.unbind('click');
      link.bind('click', openSlider);