Socket
Socket
Sign inDemoInstall

hn-kanbanboard-npm

Package Overview
Dependencies
1
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    hn-kanbanboard-npm

JavaScript library help you to build and manage a Kanban Board easily in your project, (no jQuery required)


Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

hn-kanbanboard  npm

JavaScript library help you to build and manage a Kanban Board easily in your project, no jQuery required

Demo

https://hasannaser.github.io/HN-kanbanboard/index.html

Getting Started

Install via command line using npm.

npm install hn-kanbanboard-npm

Or

Clone the repo and use the javascript and the css files in the dist folder.

include css file

 <link rel="stylesheet" href="../dist/hn_kanbanboard.css"> 

include js file

 <script src="../dist/hn_kanbanboard.js"></script> 

Usage

<div id="myDiv">

</div>
let cards_ = [
    {"board_id": "1", "card_id": "1", "card_title": "Hello People" },
    {"board_id": "2", "card_id": "2",  "card_title": "Hello People" },
    {"board_id": "3", "card_id": "4", "card_title": "Hello People"}, 
];

var knbn = HN_kanbanTable({
    container: "#myDiv",
    lists:  [{"id": "1", "title": "Todo"}, {"id": "2", "title": "Doing"}, {"id": "3", "title": "Done"}],
    cards: cards_,
    onCardAdd: function (data) {
        //data.boardId,
        //data.title,
        console.info(data);
    },
    onCardDrgStart: function (evt) {
        //evt.currentList   :current list
        //evt.cardSelf      :card element
        console.info(evt)
    },
    onCardDrgEnd: function (evt) {
        //evt.listTo           : target list
        //evt.boardFrom       : previous list
        //evt.oldIndex        : element's old index within old parent
        //evt.newInde         : element's new index within new parent
        //evt.cardSelf        : card element
        console.info(evt)
    },
    onCardSortChange: function (evt) {
        //evt.currentList     :current list
        //evt.oldIndex        : element's old index within old parent
        //evt.newInde         : element's new index within new parent
        //evt.cardSelf        : card element
        console.info(evt)
    },
    onCardClick: function (data) {
        //data.title,
        //data.currentListId,
        //data.currentList,
        console.info(data);
    }
});

knbn.init();



Thanks

hn-kanbanboard use sortablejs for drag&drop

License

hn-kanbanboard is OpenSource and licensed under the Terms of Mozilla Public License 2.0. You're welcome to contribute

Keywords

FAQs

Last updated on 17 Dec 2020

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc