[ADD] Added doc to breadcrumb items callback

bzr revid: fme@openerp.com-20120712095517-itzfdh52fd0zuzi4
This commit is contained in:
Fabien Meghazi
2012-07-12 11:55:17 +02:00
parent bdd6d0e599
commit 76c0b26198
+21 -1
View File
@@ -34,16 +34,36 @@ instance.web.ActionManager = instance.web.Widget.extend({
}
item.id = _.uniqueId('breadcrumb_');
_.defaults(item, {
show: function() {
show: function(index) {
/*
* This callback is used whenever the widget should be shown.
* If multiple titles are used, the index can be used in order
* to define which item of the breadcrumb has been trigerred.
*/
item.widget.$element.show();
},
hide: function() {
/*
* This callback is used whenever the widget should be hidden.
* Called on the last pushed item before pusing a new
* breadcrumb.
*/
item.widget.$element.hide();
},
destroy: function() {
/*
* This callback is used whenever the widget should be
* destroyed. Happens when the breadcrumb is cleared.
*/
item.widget.destroy();
},
get_title: function() {
/*
* Should return the title of the widget as a string. If an
* array is returned, multiple titles can be used (eg: a
* widget switching views). The #show() callback will receive
* the index of the selected title.
*/
return item.title || item.widget.get('title');
}
});