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

Header of kanban boards - adding a button #175

Closed
Brecht272727 opened this issue Aug 26, 2022 · 5 comments
Closed

Header of kanban boards - adding a button #175

Brecht272727 opened this issue Aug 26, 2022 · 5 comments

Comments

@Brecht272727
Copy link

Brecht272727 commented Aug 26, 2022

Hi, is it possible to add something to the header with the title inside?
I want to add an edit button so we can change the title of the board via ajax.

I know it is possible to use this:

itemAddOptions: {
    enabled: true,                                              // add a button to board for easy item creation
    content: '+',                                                // text or html content of the board button   
    class: 'kanban-title-button btn btn-info btn-sm',         // default class of the button
    footer: false                                                // position the button on footer
},

But this way i can't add an data-id attribute for knowing the board id.
I am also trying to use <i class="fa fa-edit"></i> as content item, but it gives me the html instead of an icon.

@marcosrocha85
Copy link
Contributor

If you include bootstrap (or font-awesome) script AFTER your loading code. It should work. Remember, jKanban is a vanilla javascript plugin, so in order to make it work with another plugins (such as Font Awesome) you have to manage another plugin functions manually.

@Brecht272727
Copy link
Author

Yes i know, i have loaded font awesome plugin. But it shows me the HTML like <i class="fa fa-edit"></i> instead of showing me the edit icon.
And can you tell me what about the other question: 'But this way i can't add an data-id attribute for knowing the board id.'

@WriterStat
Copy link

Hi @Brecht272727, Marcos

The JKanban Option : content: '+', appears to treat everything like text. At least it has for us. So adding HTML there might come out as text. Depending on what version of the library you have.

You may need to do this outside of the library. Just a heads up. Using the library as a base.

@Brecht272727
Copy link
Author

Hi @WriterStat I have the latest version and it comes out as text. Thanks for the reply.
I will try to do this outside of the library.

@marcosrocha85
Copy link
Contributor

That's I was trying to say. I had to develop every "custom" feature and used jKanban only as a main lib.

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

3 participants