Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ADD getALLBoards! #75

Closed
ghost opened this issue Nov 26, 2019 · 6 comments
Closed

ADD getALLBoards! #75

ghost opened this issue Nov 26, 2019 · 6 comments

Comments

@ghost
Copy link

ghost commented Nov 26, 2019

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.

@ghost ghost changed the title ADD getBoardsALLElements! ADD getALLBoards! Nov 26, 2019
@marcosrocha85
Copy link
Contributor

I guess you can use

var boardsJson = JSON.stringify(jkanban.boards);

@youradds
Copy link

youradds commented Feb 4, 2020

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)
    });

  });

@marcosrocha85
Copy link
Contributor

Sorry, I missed a property. It's jkanbanInstance.options.boards where jkanbanInstance is the name of the variable you initiated jKanban.

@youradds
Copy link

youradds commented Feb 5, 2020

Awesome - thanks , that did it :) Am I missing this in the docs?

@marcosrocha85
Copy link
Contributor

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. ;)

@riktar riktar closed this as completed Feb 5, 2020
@ColinFay
Copy link

ColinFay commented Apr 8, 2022

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.

Screenshot 2022-04-08 at 13 07 59

Is there a way to get the current state of the whole kanban?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants