From 2015d87a5565516160c576c053b0acb75ba73630 Mon Sep 17 00:00:00 2001 From: =?utf8?q?G=C3=A9ry=20Debongnie?= Date: Tue, 7 Oct 2014 16:32:22 +0200 Subject: [PATCH] [IMP] integrate mail client actions with search view The mail client actions did not integrate with the search view. (it is actually an ugly hack to fake a view manager and instantiate a search view. of course it was broken when the search view was refactored) --- addons/mail/static/src/js/mail.js | 11 +++++--- addons/mail/static/src/xml/mail.xml | 49 ++++++++++++++--------------------- 2 files changed, 27 insertions(+), 33 deletions(-) diff --git a/addons/mail/static/src/js/mail.js b/addons/mail/static/src/js/mail.js index 2a71c42..ef5cab9 100644 --- a/addons/mail/static/src/js/mail.js +++ b/addons/mail/static/src/js/mail.js @@ -1968,11 +1968,16 @@ openerp.mail = function (session) { * @param {Object} defaults ?? */ load_searchview: function (defaults) { + var self = this; var ds_msg = new session.web.DataSetSearch(this, 'mail.message'); - this.searchview = new session.web.SearchView(this, ds_msg, false, defaults || {}, false); + var options = { + $buttons: this.$('.oe-search-options') + }; + this.searchview = new session.web.SearchView(this, ds_msg, false, defaults || {}, options); this.searchview.on('search_data', this, this.do_searchview_search); - this.searchview.appendTo(this.$('.oe_view_manager_view_search'), - this.$('.oe_searchview_drawer_container')); + this.searchview.appendTo(this.$('.oe-view-manager-search-view')).then(function () { + self.searchview.toggle_visibility(true); + }); if (this.searchview.has_defaults) { this.searchview.ready.then(this.searchview.do_search); } diff --git a/addons/mail/static/src/xml/mail.xml b/addons/mail/static/src/xml/mail.xml index 761091d..5338a1d 100644 --- a/addons/mail/static/src/xml/mail.xml +++ b/addons/mail/static/src/xml/mail.xml @@ -166,36 +166,25 @@ wall main template Template used to display the communication history in the wall. --> -
- - - - - - - - - - - - -
-

- - - -

- -
- - - -
-
-
-
-
-
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
-- 1.7.10.4