<commit_before>/**
 * NavigationRoutine
 *
 * This code is responsible for build the primary navigation on the leftside
 *
 * @author <NAME> <<EMAIL>>
 */
$(document).ready(function() {
    $.getJSON('index.php/navigationNodes', function (data) {
        /**
         * @todo Please find another way to handle this
         */
        var firstElement = true;

        $.each(data, function(index, node) {
            if (firstElement)
            {
                firstElement = false;

                return;
            }

            // Set parentNode to highest level tree
            var parentNode = $('.sidebar-menu');

            // Check for parentNode
            if (node.parentNode) {
                // Check whether structure for child elements already exists
                if (!$('#sidebar-menu-node-' + node.parentNode.identifier).hasClass('treeview'))
                {
                    // Add treeview class
                    $('#sidebar-menu-node-' + node.parentNode.identifier).addClass('treeview');

                    // Append subtree
                    $('#sidebar-menu-node-' + node.parentNode.identifier).append('<ul class="treeview-menu"></ul>');

                    // Add expandable row icon
                    $('#sidebar-menu-node-' + node.parentNode.identifier+' a').append('<i class="fa fa-angle-left pull-right"></i>');
                }

                // Reset parentNode to specific navigation element
                parentNode = $('#sidebar-menu-node-' + node.parentNode.identifier+' > ul.treeview-menu');
            }

            // Append node to tree
            parentNode.append(
                '<li id="sidebar-menu-node-'+node.identifier+'"><a href="'+ '#' +'"><i class="fa fa-dashboard"></i> <span>'+node.title+'</span></a></li>'
            );
        });

        // Convert markup to expandable tree
        $(".sidebar .treeview").tree();
    });
});<commit_msg>navigation.js will consider node icon now<commit_after>/**
 * NavigationRoutine
 *
 * This code is responsible for building the primary navigation on the leftside
 *
 * @author <NAME> <<EMAIL>>
 */
$(document).ready(function () {
    $.getJSON('index.php/navigationNodes', function (data) {
        /**
         * @todo Please find another way to handle this
         */
        var firstElement = true;

        $.each(data, function (index, node) {
            if (firstElement) {
                firstElement = false;

                return;
            }

            // Set parentNode to highest level tree
            var parentNode = $('.sidebar-menu');

            // Check for parentNode
            if (node.parentNode) {
                // Check whether structure for child elements already exists
                if (!$('#sidebar-menu-node-' + node.parentNode.identifier).hasClass('treeview')) {
                    // Add treeview class
                    $('#sidebar-menu-node-' + node.parentNode.identifier).addClass('treeview');

                    // Append subtree
                    $('#sidebar-menu-node-' + node.parentNode.identifier).append('<ul class="treeview-menu"></ul>');

                    // Add expandable row icon
                    $('#sidebar-menu-node-' + node.parentNode.identifier + ' a').append('<i class="fa fa-angle-left pull-right"></i>');
                }

                // Reset parentNode to specific navigation element
                parentNode = $('#sidebar-menu-node-' + node.parentNode.identifier + ' > ul.treeview-menu');
            }

            // Append node to tree
            parentNode.append(
                '<li id="sidebar-menu-node-' + node.identifier + '"><a href="' + '#' + '"><i class="' + node.icon + '"></i> <span>' + node.title + '</span></a></li>'
            );
        });

        // Convert markup to expandable tree
        $(".sidebar .treeview").tree();
    });
});
{'fraction_non_alphanumeric': 0.15057915057915058, 'fraction_numerical': 0.0, 'mean_word_length': 1.698611111111111, 'pattern_counts': {'":': 0, '<': 33, '<?xml version=': 0, '>': 35, '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': '3020021', 'n_tokens_mistral': 995, 'n_tokens_neox': 959, 'n_words': 239}