<commit_before>chorus.dialogs.ManageJoinTables = chorus.dialogs.Base.extend({
    className: "manage_join_tables",
    title: t("dataset.manage_join_tables.title"),

    events: {
        "click li": "tableClicked"
    },

    setup: function() {
        this.model = this.pageModel.schema();
        this.resource = this.collection = this.model.databaseObjects();
        this.collection.fetch();
    },

    postRender: function() {
        var originalId = this.pageModel.get("id");

        this.collection.remove(this.collection.get(originalId));
    },

    tableClicked: function(e) {
        var clickedLi = $(e.target);
        this.$("li").removeClass("selected");
        clickedLi.addClass("selected");
    },

    additionalContext: function() {
        return { canonicalName: this.model.canonicalName() }
    },

    collectionModelContext: function(model) {
        return { iconUrl: model.iconUrl({ size: "small" })};
    }
});
<commit_msg>fix click on li in manage join tables dialog<commit_after>chorus.dialogs.ManageJoinTables = chorus.dialogs.Base.extend({
    className: "manage_join_tables",
    title: t("dataset.manage_join_tables.title"),

    events: {
        "click li": "tableClicked"
    },

    setup: function() {
        this.model = this.pageModel.schema();
        this.resource = this.collection = this.model.databaseObjects();
        this.collection.fetch();
    },

    postRender: function() {
        var originalId = this.pageModel.get("id");

        this.collection.remove(this.collection.get(originalId));
    },

    tableClicked: function(e) {
        var clickedLi = $(e.target).closest("li");
        this.$("li").removeClass("selected");
        clickedLi.addClass("selected");
    },

    additionalContext: function() {
        return { canonicalName: this.model.canonicalName() }
    },

    collectionModelContext: function(model) {
        return { iconUrl: model.iconUrl({ size: "small" })};
    }
});

{'fraction_non_alphanumeric': 0.15058703420112302, 'fraction_numerical': 0.0, 'mean_word_length': 2.904382470119522, 'pattern_counts': {'":': 2, '<': 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': '4936147', 'n_tokens_mistral': 580, 'n_tokens_neox': 563, 'n_words': 94}