enables a context menu with card actions
webix.ui({
view:"kanban",
id:"myBoard",
cardActions:true
});
The default context menu contains three options:
If you want to reorder them, remove any of them or add your own, follow these steps:
1. define cardActions as an array:
webix.ui({
view:"kanban",
id:"myBoard",
cardActions:[
"edit", "copy", "remove", "complete"
]
});
2. provide labels for new options:
webix.i18n.kanban.menu.complete = "Mark complete";
3. provide handlers for new options:
$$("myBoard").attachEvents("onBeforeComplete",function(id){
if(this.getItem(id).status !=="done"){
var target = this.queryView({ status:"done" });
var source = this.getOwnerList(id);
source.move(id, 0, target);
}
});
Related sample: Kanban: Custom Card Actions
Back to top