summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/apps.js
diff options
context:
space:
mode:
authorJérome Maes <jem@openerp.com>2016-12-05 11:27:02 +0100
committerJérome Maes <jem@openerp.com>2016-12-05 11:30:03 +0100
commit13f84b9aca163a8d295678f234ddc0f5b9407111 (patch)
tree5004f039409db4965f6ca7d96c9c1cdc55cc5ea7 /addons/web/static/src/js/apps.js
parentd25c8e7aa5d610db5d13f7dd041b25a4220d84dc (diff)
[REM] *: remove ir.needaction mixin
ir.needaction_mixin is not used anymore by the webclient. From 9.0, the concept has changed: this feature is now available in mail module, with the mail.thread mixin, and message_neeadction field. Remove all code handeling needaction bullet and counter on ir.ui.menu, knowing that since 9.0 webclient does not display the counter anymore. This code was, thus, useless and some RPC calls were done for nothing, and adapt accounting reconcialiation widget.
Diffstat (limited to 'addons/web/static/src/js/apps.js')
-rw-r--r--addons/web/static/src/js/apps.js46
1 files changed, 0 insertions, 46 deletions
diff --git a/addons/web/static/src/js/apps.js b/addons/web/static/src/js/apps.js
index 520fb3210c4..7250674272c 100644
--- a/addons/web/static/src/js/apps.js
+++ b/addons/web/static/src/js/apps.js
@@ -105,50 +105,6 @@ var Apps = Widget.extend({
}
},
- _on_update_count: function(m) {
- var self = this;
- var count = m.count;
- var get_upd_menu_id = function() {
- if (_.isUndefined(self._upd_menu_id)) {
- var IMD = new Model('ir.model.data');
- return IMD.call('get_object_reference', ['base', 'menu_module_updates']).then(function(r) {
- var mid = r[1];
- if(r[0] !== 'ir.ui.menu') {
- // invalid reference, return null
- mid = null;
- }
- self._upd_menu_id = mid;
- return mid;
- });
- } else {
- return $.Deferred().resolve(self._upd_menu_id).promise();
- }
- };
-
- $.when(get_upd_menu_id()).done(function(menu_id) {
- if (_.isNull(menu_id)) {
- return;
- }
- var $menu = web_client.menu.$secondary_menus.find(_.str.sprintf('a[data-menu=%s]', menu_id));
- if ($menu.length === 0) {
- return;
- }
- if (_.isUndefined(count)) {
- count = 0;
- }
- var needupdate = $menu.find('#menu_counter');
- if (needupdate && needupdate.length !== 0) {
- if (count > 0) {
- needupdate.text(count);
- } else {
- needupdate.remove();
- }
- } else if (count > 0) {
- $menu.append(qweb.render("Menu.needaction_counter", {widget: {needaction_counter: count}}));
- }
- });
- },
-
start: function() {
var self = this;
var def = $.Deferred();
@@ -182,8 +138,6 @@ var Apps = Widget.extend({
this.$ifr.height(m.height);
});
- self.on('message:update_count', self, self._on_update_count);
-
self.on('message:blockUI', self, function() { framework.blockUI(); });
self.on('message:unblockUI', self, function() { framework.unblockUI(); });
self.on('message:warn', self, function(m) {self.do_warn(m.title, m.message, m.sticky); });