<commit_before>/**
 * Unobstrusive drop line menu widget using jQuery.
 *
 * @author     <NAME> <<EMAIL>>
 */
var uo_widget_list_drop_line_config = {};
(function($) {

  $.fn.uoWidgetListDropLine = function(customConfiguration)
  {
    // default configuration
    var configuration = {};

    // merge default and custom configuration
    $.extend(true, configuration, customConfiguration);

    return this.each(function(index)
    {
      var $widget    = $(this);
      var $container = false;

      /**
       * Initialize widget
       */
      function init()
      {
        // prevent initialize twice
        if ($widget.hasClass('uo_widget_list_drop_line_ON'))
        {
          return $widget;
        }

        $widget.removeClass('uo_widget_list_drop_line');
        $widget.addClass('uo_widget_list_drop_line_ON');
        
        //create container
        var containerId = 'uo_widget_list_drop_line_container_' + $widget.attr('id');
        $widget.before('<div class="uo_widget_list_drop_line_ON_container" id="'+containerId+'"></div>');
        $container = $widget.prev();
        $widget.appendTo($container);
        
        //fix float style
        $container.append('<div style="clear:both"></div>');
        
        //create A element
        $('li', $widget).each(function()
        {
          var firstchild = this.firstChild;
          if ('a' != firstchild.nodeName.toLowerCase())
          {
            $(firstchild).before('<a href="#"></a>');
            $(firstchild).appendTo(this.firstChild);
            $(this.firstChild).click(function()
            { 
              return false;
            });
          }
        });
        
        hideAll();
        
        $('li', $widget).each(function()
        {
          if ($(this).parents('ul:first').hasClass('uo_widget_list_drop_line_ON'))
          {
            $('a:first', $(this)).click(displaySubLMenu);
          }
        });
        
        // open active
        $('a.active', $widget).parents('ul:first').show();<commit_msg>[sfUnobstrusiveWidgetPlugin] add "active" class to all active link parents LI elements<commit_after>/**
 * Unobstrusive drop line menu widget using jQuery.
 *
 * @author     <NAME> <<EMAIL>>
 */
var uo_widget_list_drop_line_config = {};
(function($) {

  $.fn.uoWidgetListDropLine = function(customConfiguration)
  {
    // default configuration
    var configuration = {};

    // merge default and custom configuration
    $.extend(true, configuration, customConfiguration);

    return this.each(function(index)
    {
      var $widget    = $(this);
      var $container = false;

      /**
       * Initialize widget
       */
      function init()
      {
        // prevent initialize twice
        if ($widget.hasClass('uo_widget_list_drop_line_ON'))
        {
          return $widget;
        }

        $widget.removeClass('uo_widget_list_drop_line');
        $widget.addClass('uo_widget_list_drop_line_ON');
        
        //create container
        var containerId = 'uo_widget_list_drop_line_container_' + $widget.attr('id');
        $widget.before('<div class="uo_widget_list_drop_line_ON_container" id="'+containerId+'"></div>');
        $container = $widget.prev();
        $widget.appendTo($container);
        
        //fix float style
        $container.append('<div style="clear:both"></div>');
        
        //create A element
        $('li', $widget).each(function()
        {
          var firstchild = this.firstChild;
          if ('a' != firstchild.nodeName.toLowerCase())
          {
            $(firstchild).before('<a href="#"></a>');
            $(firstchild).appendTo(this.firstChild);
            $(this.firstChild).click(function()
            { 
              return false;
            });
          }
        });
        
        hideAll();
        
        $('li', $widget).each(function()
        {
          if ($(this).parents('ul:first').hasClass('uo_widget_list_drop_line_ON'))
          {
            $('a:first', $(this)).click(displaySubLMenu);
          }
        });
        
        // open active
        $('a.active', $widget)
          .parents('ul:first').show().end()
          .parents('li').addClass('active');
{'fraction_non_alphanumeric': 0.15042775665399238, 'fraction_numerical': 0.0, 'mean_word_length': 2.036796536796537, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 0, '>': 21, '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': '3437905', 'n_tokens_mistral': 1183, 'n_tokens_neox': 1175, 'n_words': 199}