<commit_before>openerp.website = function(instance) {

instance.web.ActionManager.include({
    // Temporary fix until un-webclientization of the editorbar
    ir_actions_client: function (action) {
        if (instance.web.client_actions.get_object(action.tag)) {
            return this._super.apply(this, arguments);
        } else {
            console.warn("Action '%s' not found in registry", action.tag);
            return $.when();
        }
    }
});

var _lt = instance.web._lt;
var QWeb = instance.web.qweb;
instance.website.EditorBar = instance.web.Widget.extend({
    template: 'Website.EditorBar',
    events: {
        'click button[data-action=edit]': 'edit',
        'click button[data-action=save]': 'save',
        'click button[data-action=cancel]': 'cancel',
        'click button[data-action=snippet]': 'snippet',
    },
    container: 'body',
    init: function () {
        this._super.apply(this, arguments);
        this.saving_mutex = new $.Mutex();
    },
    customize_setup: function() {
        var self = this;
        this.$('#customize-menu-button').click(function(event) {
            self.rpc('/website/customize_template_get', {'xml_id': 'website.contactus'}).then(<commit_msg>[IMP] add comment<commit_after>openerp.website = function(instance) {

instance.web.ActionManager.include({
    // Temporary fix until un-webclientization of the editorbar
    ir_actions_client: function (action) {
        if (instance.web.client_actions.get_object(action.tag)) {
            return this._super.apply(this, arguments);
        } else {
            console.warn("Action '%s' not found in registry", action.tag);
            return $.when();
        }
    }
});

var _lt = instance.web._lt;
var QWeb = instance.web.qweb;
instance.website.EditorBar = instance.web.Widget.extend({
    template: 'Website.EditorBar',
    events: {
        'click button[data-action=edit]': 'edit',
        'click button[data-action=save]': 'save',
        'click button[data-action=cancel]': 'cancel',
        'click button[data-action=snippet]': 'snippet',
    },
    container: 'body',
    init: function () {
        this._super.apply(this, arguments);
        this.saving_mutex = new $.Mutex();
    },
    customize_setup: function() {
        var self = this;
        this.$('#customize-menu-button').click(function(event) {
            // TODO: replace contactus by the current view name (from website.render?)
            self.rpc('/website/customize_template_get', {'xml_id': 'website.contactus'}).then(
{'fraction_non_alphanumeric': 0.1495438318127727, 'fraction_numerical': 0.0, 'mean_word_length': 2.8740399385560678, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, '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': '4540182', 'n_tokens_mistral': 758, 'n_tokens_neox': 745, 'n_words': 149}