<commit_before>Ext.namespace('Kwc.Directories.Category.Directory');
Kwc.Directories.Category.Directory.Plugin = function(config) {
    Ext.apply(this, config);
};
Ext.extend(Kwc.Directories.Category.Directory.Plugin, Ext.util.Observable,
{
    init: function(newsPanel)
    {
        newsPanel.on('beforerendergrid', function(grid) {
            grid.getTopToolbar().add({
                text    : trlKwf('Categories'),
                handler : function(o, p) {
                    var dlg = new Ext.Window({
                        width:  450,
                        height: 370,
                        layout: 'fit',
                        title:  trlKwf('Categories'),
                        modal:  true,
                        items:  new Kwf.Auto.GridPanel({
                            controllerUrl: this.controllerUrl,
                            baseParams: newsPanel.getBaseParams()
                        })
                    }, this);<commit_msg>fix directory plugin in TabsPanel<commit_after>Ext.namespace('Kwc.Directories.Category.Directory');
Kwc.Directories.Category.Directory.Plugin = function(config) {
    Ext.apply(this, config);
};
Ext.extend(Kwc.Directories.Category.Directory.Plugin, Ext.util.Observable,
{
    init: function(newsPanel)
    {
        if (newsPanel instanceof Kwc.Directories.Item.Directory.TabsPanel) {
            newsPanel = newsPanel.grid;
        }
        newsPanel.on('beforerendergrid', function(grid) {
            grid.getTopToolbar().add({
                text    : trlKwf('Categories'),
                handler : function(o, p) {
                    var dlg = new Ext.Window({
                        width:  450,
                        height: 370,
                        layout: 'fit',
                        title:  trlKwf('Categories'),
                        modal:  true,
                        items:  new Kwf.Auto.GridPanel({
                            controllerUrl: this.controllerUrl,
                            baseParams: newsPanel.getBaseParams()
                        })
                    }, this);
{'fraction_non_alphanumeric': 0.10589362721609967, 'fraction_numerical': 0.005749880210828941, 'mean_word_length': 1.413872832369942, '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': '5516266', 'n_tokens_mistral': 558, 'n_tokens_neox': 511, 'n_words': 87}