<commit_before>define([
        'backbone', 
        'zen',
        'lakaxita/utils/loading', 
        'text',
        ], function(Backbone, zen, Loading) {

    View = Backbone.View.extend({
        template_uri: function() {
            return 'text!/template/'+this.template+'/';
        },
        render: function() {
            Loading.show();
            var view = this;
            require([this.template_uri()], function(template) {
                var template = Handlebars.compile(template);
                view.$el.html(template(view));
            });
            Loading.hide();
            return this;
        },
    });

    ScrollView = Backbone.View.extend({
        list: 'ul.scroll',
        initialize: function(options) {
            if (! this.$list) {
                this.$list = zen(this.list);
            };
            this.$el.html(this.$list);
            this.collection.on('sync', this.render, this);
        },
        render: function() {
            Loading.show();
            this.$list.empty();
            this.collection.each(function(model) {
                var view = new this.subView({model: model});
                this.$list.append(view.render().el);
            }, this);
            Loading.hide();
            return this;
        },
        events: {
            'click li > a': 'remove',
        },
    });

    return {
        View: View,
        ScrollView: ScrollView
    };
})<commit_msg>don't remove the menu element, empty it instead<commit_after>define([
        'backbone', 
        'zen',
        'lakaxita/utils/loading', 
        'text',
        ], function(Backbone, zen, Loading) {

    View = Backbone.View.extend({
        template_uri: function() {
            return 'text!/template/'+this.template+'/';
        },
        render: function() {
            Loading.show();
            var view = this;
            require([this.template_uri()], function(template) {
                var template = Handlebars.compile(template);
                view.$el.html(template(view));
            });
            Loading.hide();
            return this;
        },
    });

    ScrollView = Backbone.View.extend({
        list: 'ul.scroll',
        initialize: function(options) {
            if (! this.$list) {
                this.$list = zen(this.list);
            };
            this.$el.html(this.$list);
            this.collection.on('sync', this.render, this);
        },
        render: function() {
            Loading.show();
            this.$list.empty();
            this.collection.each(function(model) {
                var view = new this.subView({model: model});
                this.$list.append(view.render().el);
            }, this);
            Loading.hide();
            return this;
        },
        events: {
            'click li > a': 'empty',
        },
        empty: function() {
            this.$el.empty();
        },
    });

    return {
        View: View,
        ScrollView: ScrollView
    };
})
{'fraction_non_alphanumeric': 0.14790139906728847, 'fraction_numerical': 0.0, 'mean_word_length': 1.4004796163069544, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '662394', 'n_tokens_mistral': 831, 'n_tokens_neox': 791, 'n_words': 146}