cardActions

enables a context menu with card actions

boolean|array cardActions;

Example

webix.ui({
    view:"kanban",
    id:"myBoard",
    cardActions:true
});

Related samples

Details

The default context menu contains three options:

  • edit
  • copy
  • remove

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
If you have not checked yet, be sure to visit site of our main product Webix javascript ui library and page of javascript grid layout product.