[ADD] search: prefix to the view title when the current view is searchable:

bzr revid: xmo@openerp.com-20111025132326-83i1t2adn4o5vsjo
This commit is contained in:
Xavier Morel 2011-10-25 15:23:26 +02:00
parent cd5fa3e417
commit 7451d66e4b
1 changed files with 10 additions and 0 deletions

View File

@ -444,6 +444,16 @@ session.web.ViewManagerAction = session.web.ViewManager.extend(/** @lends oepner
if (!self.action.name && fvg) {
self.$element.find('.oe_view_title').text(fvg.arch.attrs.string || fvg.name);
}
var $title = self.$element.find('.oe_view_title'),
$search_prefix = $title.find('span');
if (controller.searchable !== false) {
if (!$search_prefix.length) {
$title.prepend('<span>' + _t("Search:") + '</span>');
}
} else {
$search_prefix.remove();
}
});
},
shortcut_check : function(view) {