Add link to toggle column scrolling in board view

This commit is contained in:
Patrick Yates 2020-10-05 07:57:34 +11:00 committed by GitHub
parent ee842bf509
commit 8322876d8e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
40 changed files with 170 additions and 3 deletions

View File

@ -45,6 +45,7 @@ class JsCommand extends BaseCommand
'assets/js/src/BoardColumnView.js',
'assets/js/src/BoardHorizontalScrolling.js',
'assets/js/src/BoardPolling.js',
'assets/js/src/BoardVerticalScrolling.js',
'assets/js/src/Column.js',
'assets/js/src/Dropdown.js',
'assets/js/src/Search.js',

View File

@ -1421,4 +1421,7 @@ return array(
// '%d/%d group(s) shown' => '',
// 'Subtask creation or modification' => '',
// 'Assign the task to a specific user when the task is moved to a specific swimlane' => '',
// 'Comment' => '',
// 'Collapse vertically' => '',
// 'Expand vertically' => '',
);

View File

@ -1421,4 +1421,7 @@ return array(
// '%d/%d group(s) shown' => '',
// 'Subtask creation or modification' => '',
// 'Assign the task to a specific user when the task is moved to a specific swimlane' => '',
// 'Comment' => '',
// 'Collapse vertically' => '',
// 'Expand vertically' => '',
);

View File

@ -1421,4 +1421,7 @@ return array(
'%d/%d group(s) shown' => 'zobrazeno(a) %d/%d skupin(a)',
'Subtask creation or modification' => 'Vytvoření nebo úprava dílčího úkolu',
// 'Assign the task to a specific user when the task is moved to a specific swimlane' => '',
// 'Comment' => '',
// 'Collapse vertically' => '',
// 'Expand vertically' => '',
);

View File

@ -1421,4 +1421,7 @@ return array(
'%d/%d group(s) shown' => '%d/%d gruppe(r) vist',
'Subtask creation or modification' => 'Underopgave oprettelse eller ændring',
'Assign the task to a specific user when the task is moved to a specific swimlane' => 'Tildele opgave til bestemt bruger når opgave flyttes til anført spor',
// 'Comment' => '',
// 'Collapse vertically' => '',
// 'Expand vertically' => '',
);

View File

@ -1421,4 +1421,7 @@ return array(
'%d/%d group(s) shown' => '%d/%d Gruppe(n) angezeigt',
'Subtask creation or modification' => 'Teilaufgabe erstellen oder ändern',
'Assign the task to a specific user when the task is moved to a specific swimlane' => 'Aufgabe einem bestimmten Nutzer zuordnen, wenn die Aufgabe in eine bestimmte Swimlane verschoben wird',
// 'Comment' => '',
// 'Collapse vertically' => '',
// 'Expand vertically' => '',
);

View File

@ -1421,4 +1421,7 @@ return array(
// '%d/%d group(s) shown' => '',
// 'Subtask creation or modification' => '',
// 'Assign the task to a specific user when the task is moved to a specific swimlane' => '',
// 'Comment' => '',
// 'Collapse vertically' => '',
// 'Expand vertically' => '',
);

View File

@ -1421,4 +1421,7 @@ return array(
// '%d/%d group(s) shown' => '',
// 'Subtask creation or modification' => '',
// 'Assign the task to a specific user when the task is moved to a specific swimlane' => '',
// 'Comment' => '',
// 'Collapse vertically' => '',
// 'Expand vertically' => '',
);

View File

@ -1421,4 +1421,7 @@ return array(
// '%d/%d group(s) shown' => '',
// 'Subtask creation or modification' => '',
// 'Assign the task to a specific user when the task is moved to a specific swimlane' => '',
// 'Comment' => '',
// 'Collapse vertically' => '',
// 'Expand vertically' => '',
);

View File

@ -1421,4 +1421,7 @@ return array(
// '%d/%d group(s) shown' => '',
// 'Subtask creation or modification' => '',
// 'Assign the task to a specific user when the task is moved to a specific swimlane' => '',
// 'Comment' => '',
// 'Collapse vertically' => '',
// 'Expand vertically' => '',
);

View File

@ -1421,4 +1421,7 @@ return array(
// '%d/%d group(s) shown' => '',
// 'Subtask creation or modification' => '',
// 'Assign the task to a specific user when the task is moved to a specific swimlane' => '',
// 'Comment' => '',
// 'Collapse vertically' => '',
// 'Expand vertically' => '',
);

View File

@ -1421,4 +1421,7 @@ return array(
'%d/%d group(s) shown' => '%d/%d groupe(s) affiché(s)',
'Subtask creation or modification' => 'Création ou modification d\'une sous-tâche',
'Assign the task to a specific user when the task is moved to a specific swimlane' => 'Assigner la tâche à un utilisateur lorsque la tâche est déplacée dans une swimelane spécifique',
'Comment' => 'Commentaire',
'Collapse vertically' => 'Réduire verticalement',
'Expand vertically' => 'Agrandir verticalement',
);

View File

@ -1421,4 +1421,7 @@ return array(
// '%d/%d group(s) shown' => '',
// 'Subtask creation or modification' => '',
// 'Assign the task to a specific user when the task is moved to a specific swimlane' => '',
// 'Comment' => '',
// 'Collapse vertically' => '',
// 'Expand vertically' => '',
);

View File

@ -1421,4 +1421,7 @@ return array(
// '%d/%d group(s) shown' => '',
// 'Subtask creation or modification' => '',
// 'Assign the task to a specific user when the task is moved to a specific swimlane' => '',
// 'Comment' => '',
// 'Collapse vertically' => '',
// 'Expand vertically' => '',
);

View File

@ -1421,4 +1421,7 @@ return array(
// '%d/%d group(s) shown' => '',
// 'Subtask creation or modification' => '',
// 'Assign the task to a specific user when the task is moved to a specific swimlane' => '',
// 'Comment' => '',
// 'Collapse vertically' => '',
// 'Expand vertically' => '',
);

View File

@ -1421,4 +1421,7 @@ return array(
// '%d/%d group(s) shown' => '',
// 'Subtask creation or modification' => '',
// 'Assign the task to a specific user when the task is moved to a specific swimlane' => '',
// 'Comment' => '',
// 'Collapse vertically' => '',
// 'Expand vertically' => '',
);

View File

@ -1421,4 +1421,7 @@ return array(
'%d/%d group(s) shown' => 'グループ %d/%d を表示',
'Subtask creation or modification' => 'サブタスクが作成or更新されました',
'Assign the task to a specific user when the task is moved to a specific swimlane' => '特定のスイムレーンにタスクを移動した時に、特定のユーザーにタスクを割当てる',
// 'Comment' => '',
// 'Collapse vertically' => '',
// 'Expand vertically' => '',
);

View File

@ -1421,4 +1421,7 @@ return array(
// '%d/%d group(s) shown' => '',
// 'Subtask creation or modification' => '',
// 'Assign the task to a specific user when the task is moved to a specific swimlane' => '',
// 'Comment' => '',
// 'Collapse vertically' => '',
// 'Expand vertically' => '',
);

View File

@ -1421,4 +1421,7 @@ return array(
// '%d/%d group(s) shown' => '',
// 'Subtask creation or modification' => '',
// 'Assign the task to a specific user when the task is moved to a specific swimlane' => '',
// 'Comment' => '',
// 'Collapse vertically' => '',
// 'Expand vertically' => '',
);

View File

@ -1421,4 +1421,7 @@ return array(
// '%d/%d group(s) shown' => '',
// 'Subtask creation or modification' => '',
// 'Assign the task to a specific user when the task is moved to a specific swimlane' => '',
// 'Comment' => '',
// 'Collapse vertically' => '',
// 'Expand vertically' => '',
);

View File

@ -1421,4 +1421,7 @@ return array(
'%d/%d group(s) shown' => '%d/%d groep(en) getoond',
// 'Subtask creation or modification' => '',
// 'Assign the task to a specific user when the task is moved to a specific swimlane' => '',
// 'Comment' => '',
// 'Collapse vertically' => '',
// 'Expand vertically' => '',
);

View File

@ -1421,4 +1421,7 @@ return array(
// '%d/%d group(s) shown' => '',
// 'Subtask creation or modification' => '',
// 'Assign the task to a specific user when the task is moved to a specific swimlane' => '',
// 'Comment' => '',
// 'Collapse vertically' => '',
// 'Expand vertically' => '',
);

View File

@ -1421,4 +1421,7 @@ return array(
// '%d/%d group(s) shown' => '',
// 'Subtask creation or modification' => '',
// 'Assign the task to a specific user when the task is moved to a specific swimlane' => '',
// 'Comment' => '',
// 'Collapse vertically' => '',
// 'Expand vertically' => '',
);

View File

@ -1421,4 +1421,7 @@ return array(
'%d/%d group(s) shown' => '%d/%d grupo(s) mostrado(s)',
'Subtask creation or modification' => 'Alteração ou criação de sub-tarefa',
'Assign the task to a specific user when the task is moved to a specific swimlane' => 'Assignar a tarefa a um utilizador especificado quando a tarefa é movida para uma swimlane especificada',
// 'Comment' => '',
// 'Collapse vertically' => '',
// 'Expand vertically' => '',
);

View File

@ -1421,4 +1421,7 @@ return array(
// '%d/%d group(s) shown' => '',
// 'Subtask creation or modification' => '',
// 'Assign the task to a specific user when the task is moved to a specific swimlane' => '',
// 'Comment' => '',
// 'Collapse vertically' => '',
// 'Expand vertically' => '',
);

View File

@ -1421,4 +1421,7 @@ return array(
'%d/%d group(s) shown' => '%d/%d групп показано',
'Subtask creation or modification' => 'Создание или изменение подзадач',
// 'Assign the task to a specific user when the task is moved to a specific swimlane' => '',
// 'Comment' => '',
// 'Collapse vertically' => '',
// 'Expand vertically' => '',
);

View File

@ -1421,4 +1421,7 @@ return array(
'%d/%d group(s) shown' => 'zobrazených %d/%d skupíny(ín)',
'Subtask creation or modification' => 'Vytvorenie alebo úprava podúlohy',
// 'Assign the task to a specific user when the task is moved to a specific swimlane' => '',
// 'Comment' => '',
// 'Collapse vertically' => '',
// 'Expand vertically' => '',
);

View File

@ -1421,4 +1421,7 @@ return array(
// '%d/%d group(s) shown' => '',
// 'Subtask creation or modification' => '',
// 'Assign the task to a specific user when the task is moved to a specific swimlane' => '',
// 'Comment' => '',
// 'Collapse vertically' => '',
// 'Expand vertically' => '',
);

View File

@ -1421,4 +1421,7 @@ return array(
// '%d/%d group(s) shown' => '',
// 'Subtask creation or modification' => '',
// 'Assign the task to a specific user when the task is moved to a specific swimlane' => '',
// 'Comment' => '',
// 'Collapse vertically' => '',
// 'Expand vertically' => '',
);

View File

@ -1421,4 +1421,7 @@ return array(
// '%d/%d group(s) shown' => '',
// 'Subtask creation or modification' => '',
// 'Assign the task to a specific user when the task is moved to a specific swimlane' => '',
// 'Comment' => '',
// 'Collapse vertically' => '',
// 'Expand vertically' => '',
);

View File

@ -1421,4 +1421,7 @@ return array(
'%d/%d group(s) shown' => '%d/%dgrupları göster',
'Subtask creation or modification' => 'Alt görev oluşturma veya değiştirme',
// 'Assign the task to a specific user when the task is moved to a specific swimlane' => '',
// 'Comment' => '',
// 'Collapse vertically' => '',
// 'Expand vertically' => '',
);

View File

@ -1421,4 +1421,7 @@ return array(
// '%d/%d group(s) shown' => '',
// 'Subtask creation or modification' => '',
// 'Assign the task to a specific user when the task is moved to a specific swimlane' => '',
// 'Comment' => '',
// 'Collapse vertically' => '',
// 'Expand vertically' => '',
);

View File

@ -1421,4 +1421,7 @@ return array(
// '%d/%d group(s) shown' => '',
// 'Subtask creation or modification' => '',
// 'Assign the task to a specific user when the task is moved to a specific swimlane' => '',
// 'Comment' => '',
// 'Collapse vertically' => '',
// 'Expand vertically' => '',
);

View File

@ -1421,4 +1421,7 @@ return array(
// '%d/%d group(s) shown' => '',
// 'Subtask creation or modification' => '',
// 'Assign the task to a specific user when the task is moved to a specific swimlane' => '',
// 'Comment' => '',
// 'Collapse vertically' => '',
// 'Expand vertically' => '',
);

View File

@ -1421,4 +1421,7 @@ return array(
// '%d/%d group(s) shown' => '',
// 'Subtask creation or modification' => '',
// 'Assign the task to a specific user when the task is moved to a specific swimlane' => '',
// 'Comment' => '',
// 'Collapse vertically' => '',
// 'Expand vertically' => '',
);

View File

@ -18,6 +18,14 @@
<i class="fa fa-arrows-h fa-fw"></i> <a href="#" class="filter-toggle-scrolling" title="<?= t('Keyboard shortcut: "%s"', 'c') ?>"><?= t('Horizontal scrolling') ?></a>
</span>
</li>
<li>
<span class="filter-vert-collapse">
<i class="fa fa-arrow-up fa-fw"></i> <a href="#" class="filter-vert-toggle-collapse"><?= t('Collapse vertically') ?></a>
</span>
<span class="filter-vert-expand" style="display: none">
<i class="fa fa-arrow-down fa-fw"></i> <a href="#" class="filter-vert-toggle-collapse"><?= t('Expand vertically') ?></a>
</span>
</li>
<?php endif ?>
<?php if ($this->user->hasProjectAccess('TaskCreationController', 'show', $project['id'])): ?>

File diff suppressed because one or more lines are too long

View File

@ -113,9 +113,12 @@ a.board-swimlane-toggle:focus {
}
.board-task-list {
min-height: 60px
}
.board-task-list-compact {
max-height: 90vh;
overflow-y: auto;
min-height: 60px
}
.board-task-list .task-board:last-child {

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,53 @@
Kanboard.BoardVerticalScrolling = function(app) {
this.app = app;
};
Kanboard.BoardVerticalScrolling.prototype.execute = function() {
if (this.app.hasId("board")) {
this.render();
}
};
Kanboard.BoardVerticalScrolling.prototype.listen = function() {
var self = this;
$(document).on('click', ".filter-vert-toggle-collapse", function(e) {
e.preventDefault();
self.toggle();
});
};
Kanboard.BoardVerticalScrolling.prototype.onBoardRendered = function() {
this.render();
};
Kanboard.BoardVerticalScrolling.prototype.toggle = function() {
var self = this;
var scrolling = localStorage.getItem("vertical_scroll") || 1;
localStorage.setItem("vertical_scroll", scrolling == 0 ? 1 : 0);
var task_lists = $(".board-task-list");
task_lists.each(function() {
// clear min-height so that it can be properly recalculated
$(this).css("min-height", "");
});
this.render();
// set up drag and drop again (resets min-height)
self.app.get("BoardDragAndDrop").dragAndDrop();
};
Kanboard.BoardVerticalScrolling.prototype.render = function() {
if (localStorage.getItem("vertical_scroll") == 0) {
$(".filter-vert-expand").show();
$(".filter-vert-collapse").hide();
$("#board td .board-task-list").addClass("board-task-list-compact");
}
else {
$(".filter-vert-expand").hide();
$(".filter-vert-collapse").show();
$("#board td .board-task-list").removeClass("board-task-list-compact");
}
};