[IMP] only display shortcut toggle star in case the grandparent of the viewmanager is the WebClient
it's absolutely disgusting, but so far I have not find an other good way to know we're not in a weird place such as a dashboard action, so... bzr revid: xmo@openerp.com-20110816141236-f95jnr2u9s34ho95
This commit is contained in:
@@ -361,9 +361,11 @@ openerp.base.ViewManagerAction = openerp.base.ViewManager.extend({
|
||||
},
|
||||
shortcut_check : function(view) {
|
||||
var self = this;
|
||||
var grandparent = this.widget_parent && this.widget_parent.widget_parent;
|
||||
// display shortcuts if on the first view for the action
|
||||
var $shortcut_toggle = this.$element.find('.oe-shortcut-toggle');
|
||||
if (!(view.view_type === this.views_src[0].view_type
|
||||
if (!(grandparent instanceof openerp.base.WebClient) ||
|
||||
!(view.view_type === this.views_src[0].view_type
|
||||
&& view.view_id === this.views_src[0].view_id)) {
|
||||
$shortcut_toggle.hide();
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user