<commit_before>define([
    'jquery',
    'underscore',
    'backbone',
    'models/faunaSpeciesList',
    'models/floraSpeciesList',
    'models/communityList',
    'models/wetlandList',
    'views/assets/assetsSpeciesSummaryView',
    'views/assets/assetsCommunitySummaryView',
    'text!templates/assets.html'
], function ($, _, Backbone, FaunaList, FloraList, CommunityList, WetlandList, SpeciesSummaryView, CommunitySummaryView, template) {

    function getSpeciesLabel(model) {
        var result = model.taxon();
        if (model.common()) {
            result += ' (' + model.common() + ')';
        }
        return result;
    }

    function getCommunityLabel(model) {
        var result = model.id();
        if (model.name()) {
            result += ' (' + model.name() + ')';
        }
        return result;
    }

    function getWetlandLabel(model) {
        return model.id();
    }

    return Backbone.View.extend({
        el: '#content',
        events: {
            "click #species_header": function () {
                this.clear('species')
            },
            "click #communities_header": function () {
                this.clear('community')
            },
            "click #wetlands_header": function () {
                this.clear('wetland')
            }
        },

        initialize: function () {
            this.fauna = new FaunaList();
            this.flora = new FloraList();
            this.communities = new CommunityList();
            this.wetlands = new WetlandList();
            this.fauna.on("reset", this.setFaunaValues, this);
            this.flora.on("reset", this.setFloraValues, this);
            this.communities.on("reset", this.initCommunityInputs(), this);
            this.wetlands.on("reset", this.initCommunityInputs, this);
        },

        render: function () {
            this.$el.html(_.template(template, {}));
            if (this.fauna || this.flora) {
                this.initSpeciesInputs();
            }
            if (this.communities) {
                this.initCommunityInputs();
            }
            if (this.wetlands) {
                this.initWetlandInputs();
            }<commit_msg>- fixed bug, the jquery-ui dependency was missing (deleted in previous commit)<commit_after>define([
    'jquery',
    'jqueryui',
    'underscore',
    'backbone',
    'models/faunaSpeciesList',
    'models/floraSpeciesList',
    'models/communityList',
    'models/wetlandList',
    'views/assets/assetsSpeciesSummaryView',
    'views/assets/assetsCommunitySummaryView',
    'text!templates/assets.html'
], function ($, ui, _, Backbone, FaunaList, FloraList, CommunityList, WetlandList, SpeciesSummaryView, CommunitySummaryView, template) {

    function getSpeciesLabel(model) {
        var result = model.taxon();
        if (model.common()) {
            result += ' (' + model.common() + ')';
        }
        return result;
    }

    function getCommunityLabel(model) {
        var result = model.id();
        if (model.name()) {
            result += ' (' + model.name() + ')';
        }
        return result;
    }

    function getWetlandLabel(model) {
        return model.id();
    }

    return Backbone.View.extend({
        el: '#content',
        events: {
            "click #species_header": function () {
                this.clear('species')
            },
            "click #communities_header": function () {
                this.clear('community')
            },
            "click #wetlands_header": function () {
                this.clear('wetland')
            }
        },

        initialize: function () {
            this.fauna = new FaunaList();
            this.flora = new FloraList();
            this.communities = new CommunityList();
            this.wetlands = new WetlandList();
        },

        render: function () {
            this.$el.html(_.template(template, {}));
            this.initSpeciesInputs();
            this.initCommunityInputs();
            this.initWetlandInputs();
            this.fauna.on("reset", this.setFaunaValues, this);
            this.flora.on("reset", this.setFloraValues, this);
            this.communities.on("reset", this.initCommunityInputs(), this);
            this.wetlands.on("reset", this.initCommunityInputs, this);
{'fraction_non_alphanumeric': 0.1366387337057728, 'fraction_numerical': 0.0, 'mean_word_length': 1.9431506849315068, 'pattern_counts': {'":': 6, '<': 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': '5794182', 'n_tokens_mistral': 1226, 'n_tokens_neox': 1193, 'n_words': 210}