<commit_before>zeit.cms.sitecontrol = {}

zeit.cms.sitecontrol.Sidebar = gocept.Class.extend({

    construct: function(view_url) {
        var self = this;
        self.view_url = view_url;
        self.load();
    },

    load: function() {
        var self = this;
        var d = MochiKit.Async.doSimpleXMLHttpRequest(self.view_url);
        d.addCallback(function(result) {
            self.replace(result.responseText);   
        });
    },

    replace: function(html) {
        var self = this;
        var container = $('zeit.cms.sitecontrol.panelcontent');
        container.innerHTML = html;
        MochiKit.Signal.signal('sidebar', 'panel-content-changed');
        self.select = MochiKit.DOM.getFirstElementByTagAndClassName(
            'select', null, container);
        var button = MochiKit.DOM.getFirstElementByTagAndClassName(
            'input', null, container);
        MochiKit.Signal.connect(self.select, 'onchange', self, self.goto);
        MochiKit.Signal.connect(button, 'onclick', self, self.goto);
        self.highlight();
    },

    highlight: function() {
        var self = this;
        for (var i=0; i<self.select.options.length; i++) {
            var option = self.select.options[i];<commit_msg>added busy-indicator for site control<commit_after>zeit.cms.sitecontrol = {}

zeit.cms.sitecontrol.Sidebar = gocept.Class.extend({

    construct: function(view_url) {
        var self = this;
        self.view_url = view_url;
        self.container = $('zeit.cms.sitecontrol.panelcontent');
        self.load();
    },

    load: function() {
        var self = this;
        MochiKit.DOM.addElementClass(self.container, 'busy');
        var d = MochiKit.Async.doSimpleXMLHttpRequest(self.view_url);
        d.addCallback(function(result) {
            self.replace(result.responseText);   
        });
    },

    replace: function(html) {
        var self = this;
        self.container.innerHTML = html;
        MochiKit.Signal.signal('sidebar', 'panel-content-changed');
        self.select = MochiKit.DOM.getFirstElementByTagAndClassName(
            'select', null, self.container);
        var button = MochiKit.DOM.getFirstElementByTagAndClassName(
            'input', null, self.container);
        MochiKit.Signal.connect(self.select, 'onchange', self, self.goto);
        MochiKit.Signal.connect(button, 'onclick', self, self.goto);
        self.highlight();
        MochiKit.DOM.removeElementClass(self.container, 'busy');
    },

    highlight: function() {
        var self = this;
        for (var i=0; i<self.select.options.length; i++) {
            var option = self.select.options[i];
{'fraction_non_alphanumeric': 0.13280363223609534, 'fraction_numerical': 0.0007567158531971245, 'mean_word_length': 2.5206391478029295, 'pattern_counts': {'":': 0, '<': 5, '<?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': '5281243', 'n_tokens_mistral': 809, 'n_tokens_neox': 790, 'n_words': 138}