diff options
| author | Antony Lesuisse <al@openerp.com> | 2012-04-02 01:12:12 +0200 |
|---|---|---|
| committer | Antony Lesuisse <al@openerp.com> | 2012-04-02 01:12:12 +0200 |
| commit | 7f1eecc8d36a69716892b040c5c31cdffc0987e0 (patch) | |
| tree | 4e80255d90aa7462387b2192589d264d4303eef0 /addons/web/static/src/js/view_form.js | |
| parent | a5aa1bc1a7c7f5aeee290ccb5e5fdec9cd28a00c (diff) | |
sidebar removal part1
bzr revid: al@openerp.com-20120401231212-dln0svoqcc0pmpxy
Diffstat (limited to 'addons/web/static/src/js/view_form.js')
| -rw-r--r-- | addons/web/static/src/js/view_form.js | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/addons/web/static/src/js/view_form.js b/addons/web/static/src/js/view_form.js index bf79f6adabb..b28f2e92c52 100644 --- a/addons/web/static/src/js/view_form.js +++ b/addons/web/static/src/js/view_form.js @@ -108,13 +108,11 @@ openerp.web.FormView = openerp.web.View.extend( /** @lends openerp.web.FormView# this.$form_header.find('button.oe_form_button_cancel').click(this.on_button_cancel); if (!this.sidebar && this.options.sidebar && this.options.sidebar_id) { - this.sidebar = new openerp.web.Sidebar(this, this.options.sidebar_id); - this.sidebar.start(); - this.sidebar.do_unfold(); + this.sidebar = new openerp.web.Sidebar(this); + this.sidebar.appendTo(this.$element.find(".oe_form_sidebar")); this.sidebar.attachments = new openerp.web.form.SidebarAttachments(this.sidebar, this); this.sidebar.add_toolbar(this.fields_view.toolbar); this.set_common_sidebar_sections(this.sidebar); - this.sidebar.add_section(_t('Customize'), 'customize'); this.sidebar.add_items('customize', [{ label: _t('Set Default'), @@ -156,17 +154,11 @@ openerp.web.FormView = openerp.web.View.extend( /** @lends openerp.web.FormView# result.pipe(function() { self.$element.css('visibility', 'visible'); }); - if (self.sidebar) { - self.sidebar.$element.show(); - } return result; }); }, do_hide: function () { this._super(); - if (this.sidebar) { - this.sidebar.$element.hide(); - } }, on_record_loaded: function(record) { var self = this, set_values = []; |
