Closed ghost closed 4 years ago
I guess you can use
var boardsJson = JSON.stringify(jkanban.boards);
Am I missing something? jkanban.boards isn't a valid query? Even trying jKanban.board doesn't work? I found a dirty way to grab them all (and the entries), but I'd prefer if there as a native way to do it!
var entries = Array.from(document.querySelectorAll(".kanban-container .kanban-board"));
console.dir(entries);
entries.forEach(function (entry, index) {
console.log("FOO: " + entry.getAttribute("data-id")+ " and sort " + entry.getAttribute("data-order"));
// get each of the elements in this one...
var allEle = KanbanTest.getBoardElements(entry.getAttribute("data-id"));
allEle.forEach(function(item, index) {
console.log(item);
var theContents = item.innerHTML;
theContents = theContents.replace("<div class=\"item_handle drag_handler\"><i class=\"item_handle drag_handler_icon\"></i></div><div>","");
theContents = theContents.replace("</div>","");
console.log("CONTENTS: " + theContents)
});
});
Sorry, I missed a property. It's jkanbanInstance.options.boards
where jkanbanInstance is the name of the variable you initiated jKanban.
Awesome - thanks , that did it :) Am I missing this in the docs?
Awesome - thanks , that did it :) Am I missing this in the docs?
Not at all, the docs are a little bit outdated since we added options attribute to jKanban. By the way, pull requests are welcome. ;)
Hey,
I'm trying to get the content of all boards but in the current state, not in the initial state.
If I use the example.html file, after dragging the item, I still have the initial item state.
Is there a way to get the current state of the whole kanban?
Hello. I have a suggestion. how about provided getALLBoards? input boardID then return all boards by JSON standard format.
When I add/update board and board's item end then update this result into API input parameter, If getALLBoards function supported, It'll be cool.
Thanks.