Closed cmparrela closed 5 years ago
I made a modification to use in my projeto, i added in line 258 next comment //create item
if (itemKanban.class != '' && itemKanban != undefined) {
nodeItem.classList.add(itemKanban.class);
}
It's a very simple and very functional making the library more flexible for us
Hello @cmparrela, in a project of mine I set cover image by jQuery. I think css for an item would be handy. I can do a pull request for that. Thank you for your suggestion.
I also made a modification to add items with specific classes in addElement
function:
this.addElement = function(boardID, element, className) {
//...
if (className)
nodeItem.classList.add(className);
//...
}
Hi Guys
Is there any update on this ?
And if it's already implemented, how do I set the class of an item from the start ?
Cheers Mike
@Mikeproove @cmparrela Now is possible to add custom classes to an item.
{
"id" : "item-id-1", // id of the item
"title" : "Item 1" // title of the item
"class" : ["myClass",...] // array of additional classes
}
https://github.com/riktar/jkanban/commit/e3fa10ad69133e4b29fa6c5183c185631b90617c
It would be nice if were possible to add class to items like already have in boards