<commit_before>/**
 * @class Denkmal_Component_Event
 * @extends Denkmal_Component_Abstract
 */
var Denkmal_Component_Event = Denkmal_Component_Abstract.extend({

  /** @type String */
  _class: 'Denkmal_Component_Event',

  /** @type {Object} */
  venue: null,

  /** @type {Object} */
  event: null,

  events: {
    'click .showDetails': 'showDetails'
  },

  childrenEvents: {
    'Denkmal_Component_SongPlayerButton play': function(view, song) {
      this.showSongDetails(song.label);
    },
    'Denkmal_Component_SongPlayerButton pause': function() {
      this.hideSongDetails(false);
    }
  },

  showDetails: function() {
    var $event = this.$('.event');
    var details = this.findChild('Denkmal_Component_EventDetails');

    $event.toggleClass('event-details-open');

    if (details) {
      details.$el.slideToggle('fast');
    } else {
      this.loadComponent('Denkmal_Component_EventDetails', {venue: this.venue, event: this.event}, {
        'success': function() {
          this.$el.hide().appendTo($event.parent()).slideDown('fast');
        }
      });
    }
  },

  hideSongDetails: function() {
    this.$('.event').removeClass('song-details-open');
    this.$('.songDetails').slideUp('fast');
  },

  /**
   * @param {String} label
   */
  showSongDetails: function(label) {
    this.$('.event').addClass('song-details-open');
    this.$('.songDetails').slideDown('fast').find('.label').text(label);
  }
});<commit_msg>Stop songdetaile animation before starting new one<commit_after>/**
 * @class Denkmal_Component_Event
 * @extends Denkmal_Component_Abstract
 */
var Denkmal_Component_Event = Denkmal_Component_Abstract.extend({

  /** @type String */
  _class: 'Denkmal_Component_Event',

  /** @type {Object} */
  venue: null,

  /** @type {Object} */
  event: null,

  events: {
    'click .showDetails': 'showDetails'
  },

  childrenEvents: {
    'Denkmal_Component_SongPlayerButton play': function(view, song) {
      this.showSongDetails(song.label);
    },
    'Denkmal_Component_SongPlayerButton pause': function() {
      this.hideSongDetails(false);
    }
  },

  showDetails: function() {
    var $event = this.$('.event');
    var details = this.findChild('Denkmal_Component_EventDetails');

    $event.toggleClass('event-details-open');

    if (details) {
      details.$el.slideToggle('fast');
    } else {
      this.loadComponent('Denkmal_Component_EventDetails', {venue: this.venue, event: this.event}, {
        'success': function() {
          this.$el.hide().appendTo($event.parent()).slideDown('fast');
        }
      });
    }
  },

  hideSongDetails: function() {
    this.$('.event').removeClass('song-details-open');
    this.$('.songDetails').stop(true).slideUp('fast');
  },

  /**
   * @param {String} label
   */
  showSongDetails: function(label) {
    this.$('.event').addClass('song-details-open');
    this.$('.songDetails').stop(true).slideDown('fast').find('.label').text(label);
  }
});
{'fraction_non_alphanumeric': 0.1785593506932702, 'fraction_numerical': 0.0, 'mean_word_length': 3.529862174578867, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3220375', 'n_tokens_mistral': 964, 'n_tokens_neox': 925, 'n_words': 138}