<commit_before>dojo.provide("voeis.ui.ProjectSitesGrid");
dojo.require("dojox.grid.DataGrid");
dojo.require("voeis.Server");

voeis.ui.ProjectSitesGrid = function(projectId, server) {
    var server = server || voeis.Server.DEFAULT;
    var project = server.projects().get(projectId);
    var sitesDataStore = server.projectSitesDataStore(projectId);
    var grid = new dojox.grid.DataGrid({
        store: sitesDataStore,
        closable: true,
        structure: [
          {field: 'name', name: "Site", width: "auto"},
          {field: 'state', name: "State", width: "auto"}
        ]
    });
    dojo.connect(grid, "onRowDblClick", this, function(evt) {
        var item = grid.getItem(evt.rowIndex);
        if(item && item.id) {
            dojo.publish("voeis/project/site/selected", [projectId, item.id]);
        }
    });
    dojo.when(project, function(project) {
        grid.set("title", project.name);
    });
    return grid;
};
<commit_msg>change voeis.ui.ProjectSitesGrid to produce a dojox.grid.EnhancedGrid will the filter plugin enabled<commit_after>dojo.provide("voeis.ui.ProjectSitesGrid");
dojo.require("dojox.grid.EnhancedGrid");
dojo.require("dojox.grid.enhanced.plugins.Filter");
dojo.require("voeis.Server");

voeis.ui.ProjectSitesGrid = function(projectId, server) {
    var server = server || voeis.Server.DEFAULT;
    var project = server.projects().get(projectId);
    var sitesDataStore = server.projectSitesDataStore(projectId);
    var grid = new dojox.grid.EnhancedGrid({
        store: sitesDataStore,
        closable: true,
        plugins:{filter:{}},
        structure: [
            {field: 'name', name: "Site", width: "auto"},
            {field: 'state', name: "State", width: "auto"},
            {field: 'latitude', name: "Lat", datatype:"number", width: "auto"},
            {field: 'longitude', name: "Lng", datatype:"number", width: "auto"}
        ]
    });
    dojo.connect(grid, "onRowDblClick", this, function(evt) {
        var item = grid.getItem(evt.rowIndex);
        if(item && item.id) {
            dojo.publish("voeis/project/site/selected", [projectId, item.id]);
        }
    });
    dojo.when(project, function(project) {
        grid.set("title", project.name);
    });
    return grid;
};

{'fraction_non_alphanumeric': 0.1615759185480301, 'fraction_numerical': 0.0, 'mean_word_length': 3.0942028985507246, 'pattern_counts': {'":': 0, '<': 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': '6639106', 'n_tokens_mistral': 735, 'n_tokens_neox': 736, 'n_words': 136}