Git Product home page Git Product logo

Comments (29)

creecros avatar creecros commented on August 20, 2024 1

I'll take a look tonight. You probably know more than myself in regards to js though. I'll at least test the hell out of it and if I see no issues, merge and hope for the best.

from kanboard-backlog.

vistree avatar vistree commented on August 20, 2024

@creecros : do you know if it is possible to extend a core kanboard js-function? Or if I can listen on those functions?
I need to add a class to my top level if the inner column is collapsed.
Collapsing is done by
Kanboard.BoardColumnView.prototype.hideColumn = function (e) { $(".board-column-" + e + " .board-column-expanded").hide(), $(".board-column-" + e + " .board-column-collapsed").show(), $(".board-column-header-" + e + " .board-column-expanded").hide(), $(".board-column-header-" + e + " .board-column-collapsed").show(), $(".board-column-header-" + e).each(function () { $(this).removeClass("board-column-compact"), $(this).addClass("board-column-header-collapsed") }), $(".board-column-" + e).each(function () { $(this).addClass("board-column-task-collapsed") }), $(".board-column-" + e + " .board-rotation").each(function () { $(this).css("width", $(".board-column-" + e).height()) }), localStorage.setItem("hidden_column_" + e, 1) },
in /kanboard-1.2.5/assets/js/app.min.js

from kanboard-backlog.

vistree avatar vistree commented on August 20, 2024

I need to do my own stuff, when .hide() or .show() is called

from kanboard-backlog.

creecros avatar creecros commented on August 20, 2024

Take a look at
https://github.com/creecros/Bak2topbotm
See if that helps

from kanboard-backlog.

vistree avatar vistree commented on August 20, 2024

No, I'm afraid that doesn't help. The problem is that the link to collapse the columns is in a popup that is loaded by Ajax. So the selector is not yet available when opening the board. So I thought I might react to a Kanboard event. But unfortunately I don't know how.
What I need is to extend or react on Kanboard.BoardColumnView.prototype.hideColumn

from kanboard-backlog.

vistree avatar vistree commented on August 20, 2024

Asked the question in kanboard forum: #https://github.com/kanboard/forum/issues/114

from kanboard-backlog.

creecros avatar creecros commented on August 20, 2024

You can write your own js file, and attach the asset.

https://docs.kanboard.org/en/latest/plugins/hooks.html#asset-hooks

from kanboard-backlog.

vistree avatar vistree commented on August 20, 2024

Yes, this is what I did ;-) Problem is, that I don't know how to react on the column collapsing / uncollapsing

from kanboard-backlog.

creecros avatar creecros commented on August 20, 2024

I know very little about js unfortunately

from kanboard-backlog.

creecros avatar creecros commented on August 20, 2024

you could override table_column.php and call your own class around here:

https://github.com/kanboard/kanboard/blob/00228ac12fedaf436869289c7c114dc6f76dd14c/app/Template/board/table_column.php#L10

thus using your own supplied js instead of the current...

...and then add a condition like here:

<?php if ($this->task->projectUsesBacklogBoardModel->backlogIsset($project['id'])) {
$UseBacklog = TRUE;
} ?>

from kanboard-backlog.

vistree avatar vistree commented on August 20, 2024

Did my best to fix the column collapsing. I implemented the code posted in kanboard issues 114. The width problem was easy to be fixed by adding a little bit of CSS in the new css-file in Assets folder. This + initial translation is done in new branch column_collapsing

from kanboard-backlog.

vistree avatar vistree commented on August 20, 2024

Can you have a look at the backlog.js? I absolutly don't know, if this is the correct way to do it (by overriding a core js-function)

from kanboard-backlog.

creecros avatar creecros commented on August 20, 2024

it works, but not for the actual backlog column. when you expand, it freaks out:

image

a refresh fixes it.

easiest solution would be disable column collapsing in the backlog column when backlog mode is activated, at least until we can figure out the better solution. another solution would be to send a redirect after expanding, causing a refresh.

from kanboard-backlog.

vistree avatar vistree commented on August 20, 2024

It should work. Can you please clear browser cache and retry. If this does not help: which browser do you use?

from kanboard-backlog.

vistree avatar vistree commented on August 20, 2024

Tested with firefox, Chrome and Safari on Mac OS X - all fine here

from kanboard-backlog.

creecros avatar creecros commented on August 20, 2024

Cache cleared, same issue.
Chrome:
Version 69.0.3497.100 (Official Build) (64-bit)

Kanboard:
Application version: 1.2.6
PHP version: 7.2.10
PHP SAPI: fpm-fcgi
OS version: Linux 4.9.45-rancher
Database driver: sqlite
Database version: 3.24.0
Browser: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36

from kanboard-backlog.

creecros avatar creecros commented on August 20, 2024

if you want to test on my server:
https://projects.creecros.ml/

admin
admin

from kanboard-backlog.

vistree avatar vistree commented on August 20, 2024

Thanx - using your server I repeated tests - and everything is fine. So maybe a browser related issue? Which OS + browser do you use?

from kanboard-backlog.

creecros avatar creecros commented on August 20, 2024

Interesting.

Using Latest windows and chrome.

from kanboard-backlog.

vistree avatar vistree commented on August 20, 2024

Did you SHIFT + Reload (on Windows it mightbe also F5) to reload the whole page?

from kanboard-backlog.

creecros avatar creecros commented on August 20, 2024

Yes. A reload does fixes it, but it still continues to do it.

image

from kanboard-backlog.

vistree avatar vistree commented on August 20, 2024

Will do some testing as soon I have a windows machine available

from kanboard-backlog.

creecros avatar creecros commented on August 20, 2024

Does it in android too
screenshot_2018-10-19-11-17-47

from kanboard-backlog.

vistree avatar vistree commented on August 20, 2024

Ahh, I think the problem is, that the backlog-column has no min-width. Can you checkout the latest commit on column-branch?

from kanboard-backlog.

vistree avatar vistree commented on August 20, 2024

wait - I found something different!

from kanboard-backlog.

vistree avatar vistree commented on August 20, 2024

OK, can you give it a try?

from kanboard-backlog.

creecros avatar creecros commented on August 20, 2024

no change

from kanboard-backlog.

creecros avatar creecros commented on August 20, 2024

can you add a refresh on expand? That should solve it.

$('#something').click(function() {
    location.reload();
});

from kanboard-backlog.

creecros avatar creecros commented on August 20, 2024

from kanboard-backlog.

Related Issues (18)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.