summaryrefslogtreecommitdiff
path: root/addons/web_view_editor/static/src
diff options
context:
space:
mode:
authorAaron Bohy <aab@odoo.com>2015-01-21 16:36:23 +0100
committerAaron Bohy <aab@odoo.com>2015-03-20 16:17:06 +0100
commit53a9f6c081d0d91c99d8f035fd09d813a16172e8 (patch)
treea4da311c1bda804c4800b4b272a316320ef9c25b /addons/web_view_editor/static/src
parentdb592efca282d12f6fcef38a13dc2cbff31522b8 (diff)
[IMP] Web et al.: ControlPanel extracted from ViewManager
The ControlPanel is still instantiated by the ViewManager. Changes details: * web: views.js: Code related to views header is extracted from the ViewManager to a new Widget named ControlPanel. Also uses the headless flag to tell the inner view not to put its buttons (use case: kanban) or pager (use case: list) in the header as it is hidden. * web: view_form.js, base.xml: Uses the headless flag at initialization of the One2ManyViewManager widget instead of extending the ViewManager template (which doesn't handle the header anymore). * web: view_list.js: Test on this.options.$pager instead of this.options.$buttons when dealing with pager. Note: the behavior for list view is unchanged and has a bug. If there are more then 80 records to display, only the 80th first are display, and as there is no pager, there is no way to see the remaining ones. A fix for this would be to use a light ControlPanel in One2Many views as well. With this, there won't be duplicated .oe-'view'-buttons/sidebar/pager anymore. * web: view_graph.js, view_pivot.js: Only render buttons in non-headless mode * web_dashboard: dashboard.js: Fix some references that were broken with ControlPanel extraction * web_view_editor: web_view_editor.js: Extend ControlPanel instead of ViewManager * Changes in selector of ControlPanel elements in several addons: * base_import * mail * web
Diffstat (limited to 'addons/web_view_editor/static/src')
-rw-r--r--addons/web_view_editor/static/src/js/view_editor.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/addons/web_view_editor/static/src/js/view_editor.js b/addons/web_view_editor/static/src/js/view_editor.js
index ac41cb953bd..1e8c21a9dba 100644
--- a/addons/web_view_editor/static/src/js/view_editor.js
+++ b/addons/web_view_editor/static/src/js/view_editor.js
@@ -2,6 +2,7 @@ odoo.define('web_view_editor.view_editor', function (require) {
"use strict";
var ActionManager = require('web.ActionManager');
+var ControlPanel = require('web.ControlPanel');
var core = require('web.core');
var data = require('web.data');
var Dialog = require('web.Dialog');
@@ -9,13 +10,12 @@ var formats = require('web.formats');
var Registry = require('web.Registry');
var session = require('web.session');
var utils = require('web.utils');
-var ViewManager = require('web.ViewManager');
var Widget = require('web.Widget');
var QWeb = core.qweb;
var _t = core._t;
-ViewManager.include({
+ControlPanel.include({
on_debug_changed:function(evt){
var val = $(evt.target).data('action'),
current_view = this.active_view.controller;