Add checkboxes in list view to move tasks to another column at once
This commit is contained in:
parent
cd6da13897
commit
912cf378d7
|
|
@ -0,0 +1,44 @@
|
|||
<?php
|
||||
|
||||
namespace Kanboard\Controller;
|
||||
|
||||
use Kanboard\Core\Controller\AccessForbiddenException;
|
||||
|
||||
class TaskBulkMoveColumnController extends BaseController
|
||||
{
|
||||
public function show(array $values = [], array $errors = [])
|
||||
{
|
||||
$project = $this->getProject();
|
||||
|
||||
if (empty($values)) {
|
||||
$values['task_ids'] = $this->request->getStringParam('task_ids');
|
||||
}
|
||||
|
||||
$this->response->html($this->template->render('task_bulk_move_column/show', [
|
||||
'project' => $project,
|
||||
'values' => $values,
|
||||
'errors' => $errors,
|
||||
'columns' => $this->columnModel->getList($project['id']),
|
||||
'swimlanes' => $this->swimlaneModel->getList($project['id'], false, true),
|
||||
]));
|
||||
}
|
||||
|
||||
public function save()
|
||||
{
|
||||
$project = $this->getProject();
|
||||
$values = $this->request->getValues();
|
||||
$taskIDs = explode(',', $values['task_ids']);
|
||||
|
||||
foreach ($taskIDs as $taskID) {
|
||||
$task = $this->taskFinderModel->getById($taskID);
|
||||
|
||||
if (! $this->helper->projectRole->canMoveTask($task['project_id'], $task['column_id'], $values['column_id'])) {
|
||||
throw new AccessForbiddenException(e('You are not allowed to move this task.'));
|
||||
}
|
||||
|
||||
$this->taskPositionModel->moveBottom($project['id'], $taskID, $values['swimlane_id'], $values['column_id']);
|
||||
}
|
||||
|
||||
$this->response->redirect($this->helper->url->to('TaskListController', 'show', ['project_id' => $project['id']]), true);
|
||||
}
|
||||
}
|
||||
|
|
@ -1377,4 +1377,8 @@ return array(
|
|||
// '%s moved the task #%d to the swimlane "%s"' => '',
|
||||
// '%sh spent' => '',
|
||||
// '%sh estimated' => '',
|
||||
// 'Select All' => '',
|
||||
// 'Unselect All' => '',
|
||||
// 'Apply action' => '',
|
||||
// 'Move selected tasks to another column' => '',
|
||||
);
|
||||
|
|
|
|||
|
|
@ -1377,4 +1377,8 @@ return array(
|
|||
// '%s moved the task #%d to the swimlane "%s"' => '',
|
||||
// '%sh spent' => '',
|
||||
// '%sh estimated' => '',
|
||||
// 'Select All' => '',
|
||||
// 'Unselect All' => '',
|
||||
// 'Apply action' => '',
|
||||
// 'Move selected tasks to another column' => '',
|
||||
);
|
||||
|
|
|
|||
|
|
@ -1377,4 +1377,8 @@ return array(
|
|||
// '%s moved the task #%d to the swimlane "%s"' => '',
|
||||
// '%sh spent' => '',
|
||||
// '%sh estimated' => '',
|
||||
// 'Select All' => '',
|
||||
// 'Unselect All' => '',
|
||||
// 'Apply action' => '',
|
||||
// 'Move selected tasks to another column' => '',
|
||||
);
|
||||
|
|
|
|||
|
|
@ -1377,4 +1377,8 @@ return array(
|
|||
'%s moved the task #%d to the swimlane "%s"' => '%s flyttet opgave #%d til spor "%s"',
|
||||
'%sh spent' => '%sh brugt',
|
||||
'%sh estimated' => '%sh anslået',
|
||||
// 'Select All' => '',
|
||||
// 'Unselect All' => '',
|
||||
// 'Apply action' => '',
|
||||
// 'Move selected tasks to another column' => '',
|
||||
);
|
||||
|
|
|
|||
|
|
@ -1377,4 +1377,8 @@ return array(
|
|||
// '%s moved the task #%d to the swimlane "%s"' => '',
|
||||
// '%sh spent' => '',
|
||||
// '%sh estimated' => '',
|
||||
// 'Select All' => '',
|
||||
// 'Unselect All' => '',
|
||||
// 'Apply action' => '',
|
||||
// 'Move selected tasks to another column' => '',
|
||||
);
|
||||
|
|
|
|||
|
|
@ -1377,4 +1377,8 @@ return array(
|
|||
// '%s moved the task #%d to the swimlane "%s"' => '',
|
||||
// '%sh spent' => '',
|
||||
// '%sh estimated' => '',
|
||||
// 'Select All' => '',
|
||||
// 'Unselect All' => '',
|
||||
// 'Apply action' => '',
|
||||
// 'Move selected tasks to another column' => '',
|
||||
);
|
||||
|
|
|
|||
|
|
@ -1377,4 +1377,8 @@ return array(
|
|||
// '%s moved the task #%d to the swimlane "%s"' => '',
|
||||
// '%sh spent' => '',
|
||||
// '%sh estimated' => '',
|
||||
// 'Select All' => '',
|
||||
// 'Unselect All' => '',
|
||||
// 'Apply action' => '',
|
||||
// 'Move selected tasks to another column' => '',
|
||||
);
|
||||
|
|
|
|||
|
|
@ -1377,4 +1377,8 @@ return array(
|
|||
// '%s moved the task #%d to the swimlane "%s"' => '',
|
||||
// '%sh spent' => '',
|
||||
// '%sh estimated' => '',
|
||||
// 'Select All' => '',
|
||||
// 'Unselect All' => '',
|
||||
// 'Apply action' => '',
|
||||
// 'Move selected tasks to another column' => '',
|
||||
);
|
||||
|
|
|
|||
|
|
@ -1377,4 +1377,8 @@ return array(
|
|||
'%s moved the task #%d to the swimlane "%s"' => '%s a déplacé la tâche #%d vers la swimlane « %s »',
|
||||
'%sh spent' => '%sh passé',
|
||||
'%sh estimated' => '%sh estimé',
|
||||
'Select All' => 'Tout sélectionner',
|
||||
'Unselect All' => 'Tout désélectionner',
|
||||
'Apply action' => 'Appliquer une action',
|
||||
'Move selected tasks to another column' => 'Déplaçer les tâches sélectionnées vers une autre colonne',
|
||||
);
|
||||
|
|
|
|||
|
|
@ -1377,4 +1377,8 @@ return array(
|
|||
// '%s moved the task #%d to the swimlane "%s"' => '',
|
||||
// '%sh spent' => '',
|
||||
// '%sh estimated' => '',
|
||||
// 'Select All' => '',
|
||||
// 'Unselect All' => '',
|
||||
// 'Apply action' => '',
|
||||
// 'Move selected tasks to another column' => '',
|
||||
);
|
||||
|
|
|
|||
|
|
@ -1377,4 +1377,8 @@ return array(
|
|||
// '%s moved the task #%d to the swimlane "%s"' => '',
|
||||
// '%sh spent' => '',
|
||||
// '%sh estimated' => '',
|
||||
// 'Select All' => '',
|
||||
// 'Unselect All' => '',
|
||||
// 'Apply action' => '',
|
||||
// 'Move selected tasks to another column' => '',
|
||||
);
|
||||
|
|
|
|||
|
|
@ -1377,4 +1377,8 @@ return array(
|
|||
// '%s moved the task #%d to the swimlane "%s"' => '',
|
||||
// '%sh spent' => '',
|
||||
// '%sh estimated' => '',
|
||||
// 'Select All' => '',
|
||||
// 'Unselect All' => '',
|
||||
// 'Apply action' => '',
|
||||
// 'Move selected tasks to another column' => '',
|
||||
);
|
||||
|
|
|
|||
|
|
@ -1377,4 +1377,8 @@ return array(
|
|||
// '%s moved the task #%d to the swimlane "%s"' => '',
|
||||
// '%sh spent' => '',
|
||||
// '%sh estimated' => '',
|
||||
// 'Select All' => '',
|
||||
// 'Unselect All' => '',
|
||||
// 'Apply action' => '',
|
||||
// 'Move selected tasks to another column' => '',
|
||||
);
|
||||
|
|
|
|||
|
|
@ -1377,4 +1377,8 @@ return array(
|
|||
// '%s moved the task #%d to the swimlane "%s"' => '',
|
||||
// '%sh spent' => '',
|
||||
// '%sh estimated' => '',
|
||||
// 'Select All' => '',
|
||||
// 'Unselect All' => '',
|
||||
// 'Apply action' => '',
|
||||
// 'Move selected tasks to another column' => '',
|
||||
);
|
||||
|
|
|
|||
|
|
@ -1377,4 +1377,8 @@ return array(
|
|||
// '%s moved the task #%d to the swimlane "%s"' => '',
|
||||
// '%sh spent' => '',
|
||||
// '%sh estimated' => '',
|
||||
// 'Select All' => '',
|
||||
// 'Unselect All' => '',
|
||||
// 'Apply action' => '',
|
||||
// 'Move selected tasks to another column' => '',
|
||||
);
|
||||
|
|
|
|||
|
|
@ -1377,4 +1377,8 @@ return array(
|
|||
// '%s moved the task #%d to the swimlane "%s"' => '',
|
||||
// '%sh spent' => '',
|
||||
// '%sh estimated' => '',
|
||||
// 'Select All' => '',
|
||||
// 'Unselect All' => '',
|
||||
// 'Apply action' => '',
|
||||
// 'Move selected tasks to another column' => '',
|
||||
);
|
||||
|
|
|
|||
|
|
@ -1377,4 +1377,8 @@ return array(
|
|||
// '%s moved the task #%d to the swimlane "%s"' => '',
|
||||
// '%sh spent' => '',
|
||||
// '%sh estimated' => '',
|
||||
// 'Select All' => '',
|
||||
// 'Unselect All' => '',
|
||||
// 'Apply action' => '',
|
||||
// 'Move selected tasks to another column' => '',
|
||||
);
|
||||
|
|
|
|||
|
|
@ -1377,4 +1377,8 @@ return array(
|
|||
// '%s moved the task #%d to the swimlane "%s"' => '',
|
||||
// '%sh spent' => '',
|
||||
// '%sh estimated' => '',
|
||||
// 'Select All' => '',
|
||||
// 'Unselect All' => '',
|
||||
// 'Apply action' => '',
|
||||
// 'Move selected tasks to another column' => '',
|
||||
);
|
||||
|
|
|
|||
|
|
@ -1377,4 +1377,8 @@ return array(
|
|||
// '%s moved the task #%d to the swimlane "%s"' => '',
|
||||
// '%sh spent' => '',
|
||||
// '%sh estimated' => '',
|
||||
// 'Select All' => '',
|
||||
// 'Unselect All' => '',
|
||||
// 'Apply action' => '',
|
||||
// 'Move selected tasks to another column' => '',
|
||||
);
|
||||
|
|
|
|||
|
|
@ -1377,4 +1377,8 @@ return array(
|
|||
// '%s moved the task #%d to the swimlane "%s"' => '',
|
||||
// '%sh spent' => '',
|
||||
// '%sh estimated' => '',
|
||||
// 'Select All' => '',
|
||||
// 'Unselect All' => '',
|
||||
// 'Apply action' => '',
|
||||
// 'Move selected tasks to another column' => '',
|
||||
);
|
||||
|
|
|
|||
|
|
@ -1377,4 +1377,8 @@ return array(
|
|||
// '%s moved the task #%d to the swimlane "%s"' => '',
|
||||
// '%sh spent' => '',
|
||||
// '%sh estimated' => '',
|
||||
// 'Select All' => '',
|
||||
// 'Unselect All' => '',
|
||||
// 'Apply action' => '',
|
||||
// 'Move selected tasks to another column' => '',
|
||||
);
|
||||
|
|
|
|||
|
|
@ -1377,4 +1377,8 @@ return array(
|
|||
// '%s moved the task #%d to the swimlane "%s"' => '',
|
||||
// '%sh spent' => '',
|
||||
// '%sh estimated' => '',
|
||||
// 'Select All' => '',
|
||||
// 'Unselect All' => '',
|
||||
// 'Apply action' => '',
|
||||
// 'Move selected tasks to another column' => '',
|
||||
);
|
||||
|
|
|
|||
|
|
@ -1377,4 +1377,8 @@ return array(
|
|||
'%s moved the task #%d to the swimlane "%s"' => '%s перенёс задачу #%d на дорожку "%s"',
|
||||
'%sh spent' => '%sч затрачено',
|
||||
'%sh estimated' => '%sч запланировано',
|
||||
// 'Select All' => '',
|
||||
// 'Unselect All' => '',
|
||||
// 'Apply action' => '',
|
||||
// 'Move selected tasks to another column' => '',
|
||||
);
|
||||
|
|
|
|||
|
|
@ -1377,4 +1377,8 @@ return array(
|
|||
// '%s moved the task #%d to the swimlane "%s"' => '',
|
||||
// '%sh spent' => '',
|
||||
// '%sh estimated' => '',
|
||||
// 'Select All' => '',
|
||||
// 'Unselect All' => '',
|
||||
// 'Apply action' => '',
|
||||
// 'Move selected tasks to another column' => '',
|
||||
);
|
||||
|
|
|
|||
|
|
@ -1377,4 +1377,8 @@ return array(
|
|||
// '%s moved the task #%d to the swimlane "%s"' => '',
|
||||
// '%sh spent' => '',
|
||||
// '%sh estimated' => '',
|
||||
// 'Select All' => '',
|
||||
// 'Unselect All' => '',
|
||||
// 'Apply action' => '',
|
||||
// 'Move selected tasks to another column' => '',
|
||||
);
|
||||
|
|
|
|||
|
|
@ -1377,4 +1377,8 @@ return array(
|
|||
// '%s moved the task #%d to the swimlane "%s"' => '',
|
||||
// '%sh spent' => '',
|
||||
// '%sh estimated' => '',
|
||||
// 'Select All' => '',
|
||||
// 'Unselect All' => '',
|
||||
// 'Apply action' => '',
|
||||
// 'Move selected tasks to another column' => '',
|
||||
);
|
||||
|
|
|
|||
|
|
@ -1377,4 +1377,8 @@ return array(
|
|||
'%s moved the task #%d to the swimlane "%s"' => '%s , #%d görevini "%s" kulvarına taşıdı',
|
||||
'%sh spent' => '%sh harcandı',
|
||||
'%sh estimated' => '%sh tahmin edildi',
|
||||
// 'Select All' => '',
|
||||
// 'Unselect All' => '',
|
||||
// 'Apply action' => '',
|
||||
// 'Move selected tasks to another column' => '',
|
||||
);
|
||||
|
|
|
|||
|
|
@ -1377,4 +1377,8 @@ return array(
|
|||
'%s moved the task #%d to the swimlane "%s"' => '%s перемістив задачу #%d на доріжку "%s"',
|
||||
// '%sh spent' => '',
|
||||
// '%sh estimated' => '',
|
||||
// 'Select All' => '',
|
||||
// 'Unselect All' => '',
|
||||
// 'Apply action' => '',
|
||||
// 'Move selected tasks to another column' => '',
|
||||
);
|
||||
|
|
|
|||
|
|
@ -1377,4 +1377,8 @@ return array(
|
|||
// '%s moved the task #%d to the swimlane "%s"' => '',
|
||||
// '%sh spent' => '',
|
||||
// '%sh estimated' => '',
|
||||
// 'Select All' => '',
|
||||
// 'Unselect All' => '',
|
||||
// 'Apply action' => '',
|
||||
// 'Move selected tasks to another column' => '',
|
||||
);
|
||||
|
|
|
|||
|
|
@ -1377,4 +1377,8 @@ return array(
|
|||
'%s moved the task #%d to the swimlane "%s"' => '%s将任务 #%d 移动到了里程碑 "%s" 下',
|
||||
'%sh spent' => '花费%s小时',
|
||||
'%sh estimated' => '预估%s小时',
|
||||
// 'Select All' => '',
|
||||
// 'Unselect All' => '',
|
||||
// 'Apply action' => '',
|
||||
// 'Move selected tasks to another column' => '',
|
||||
);
|
||||
|
|
|
|||
|
|
@ -1377,4 +1377,8 @@ return array(
|
|||
// '%s moved the task #%d to the swimlane "%s"' => '',
|
||||
// '%sh spent' => '',
|
||||
// '%sh estimated' => '',
|
||||
// 'Select All' => '',
|
||||
// 'Unselect All' => '',
|
||||
// 'Apply action' => '',
|
||||
// 'Move selected tasks to another column' => '',
|
||||
);
|
||||
|
|
|
|||
|
|
@ -12,6 +12,42 @@ use Kanboard\Core\Base;
|
|||
*/
|
||||
class TaskPositionModel extends Base
|
||||
{
|
||||
public function moveBottom($project_id, $task_id, $swimlane_id, $column_id)
|
||||
{
|
||||
$this->db->startTransaction();
|
||||
|
||||
$task = $this->taskFinderModel->getById($task_id);
|
||||
|
||||
$result = $this->db->table(TaskModel::TABLE)
|
||||
->eq('project_id', $project_id)
|
||||
->eq('swimlane_id', $swimlane_id)
|
||||
->eq('column_id', $column_id)
|
||||
->columns('MAX(position) AS pos')
|
||||
->findOne();
|
||||
|
||||
$position = 1;
|
||||
if (! empty($result)) {
|
||||
$position = $result['pos'] + 1;
|
||||
}
|
||||
|
||||
$result = $this->db->table(TaskModel::TABLE)
|
||||
->eq('id', $task_id)
|
||||
->eq('project_id', $project_id)
|
||||
->update([
|
||||
'swimlane_id' => $swimlane_id,
|
||||
'column_id' => $column_id,
|
||||
'position' => $position
|
||||
]);
|
||||
|
||||
$this->db->closeTransaction();
|
||||
|
||||
if ($result) {
|
||||
$this->fireEvents($task, $column_id, $position, $swimlane_id);
|
||||
}
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Move a task to another column or to another position
|
||||
*
|
||||
|
|
|
|||
|
|
@ -106,6 +106,7 @@ class AuthenticationProvider implements ServiceProviderInterface
|
|||
$acl->add('TaskSuppressionController', '*', Role::PROJECT_MEMBER);
|
||||
$acl->add('TaskCreationController', '*', Role::PROJECT_MEMBER);
|
||||
$acl->add('TaskBulkController', '*', Role::PROJECT_MEMBER);
|
||||
$acl->add('TaskBulkMoveColumnController', '*', Role::PROJECT_MEMBER);
|
||||
$acl->add('TaskDuplicationController', '*', Role::PROJECT_MEMBER);
|
||||
$acl->add('TaskRecurrenceController', '*', Role::PROJECT_MEMBER);
|
||||
$acl->add('TaskImportController', '*', Role::PROJECT_MANAGER);
|
||||
|
|
|
|||
|
|
@ -0,0 +1,16 @@
|
|||
<div class="page-header">
|
||||
<h2><?= t('Move selected tasks to another column') ?></h2>
|
||||
</div>
|
||||
|
||||
<form action="<?= $this->url->href('TaskBulkMoveColumnController', 'save', ['project_id' => $project['id']]) ?>" method="post">
|
||||
<?= $this->form->csrf() ?>
|
||||
<?= $this->form->hidden('task_ids', $values) ?>
|
||||
|
||||
<?= $this->form->label(t('Swimlane'), 'swimlane_id') ?>
|
||||
<?= $this->form->select('swimlane_id', $swimlanes, $values) ?>
|
||||
|
||||
<?= $this->form->label(t('Column'), 'column_id') ?>
|
||||
<?= $this->form->select('column_id', $columns, $values) ?>
|
||||
|
||||
<?= $this->modal->submitButtons() ?>
|
||||
</form>
|
||||
|
|
@ -6,6 +6,24 @@
|
|||
<?= t('%d task', $paginator->getTotal()) ?>
|
||||
<?php endif ?>
|
||||
</div>
|
||||
<?php if (isset($show_items_selection)): ?>
|
||||
<?php if ($this->user->hasProjectAccess('TaskModificationController', 'save', $project['id'])): ?>
|
||||
<div class="list-item-links">
|
||||
<a href="#" data-list-item-selection="all"><?= t('Select All') ?></a> / <a href="#" data-list-item-selection="none"><?= t('Unselect All') ?></a>
|
||||
</div>
|
||||
<div class="list-item-actions list-item-action-hidden">
|
||||
-
|
||||
<div class="dropdown">
|
||||
<a href="#" class="dropdown-menu dropdown-menu-link-icon"><strong><?= t('Apply action') ?> <i class="fa fa-caret-down"></i></strong></a>
|
||||
<ul>
|
||||
<li>
|
||||
<a href="<?= $this->url->href('TaskBulkMoveColumnController', 'show', ['project_id' => $project['id']]) ?>" data-list-item-action="modal"><?= t('Move selected tasks to another column') ?></a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif ?>
|
||||
<?php endif ?>
|
||||
<div class="table-list-header-menu">
|
||||
<?php if (isset($project)): ?>
|
||||
<?php if ($this->user->hasSubtaskListActivated()): ?>
|
||||
|
|
|
|||
|
|
@ -7,12 +7,14 @@
|
|||
<?= $this->render('task_list/header', array(
|
||||
'paginator' => $paginator,
|
||||
'project' => $project,
|
||||
'show_items_selection' => true,
|
||||
)) ?>
|
||||
|
||||
<?php foreach ($paginator->getCollection() as $task): ?>
|
||||
<div class="table-list-row color-<?= $task['color_id'] ?>">
|
||||
<?= $this->render('task_list/task_title', array(
|
||||
'task' => $task,
|
||||
'show_items_selection' => true,
|
||||
)) ?>
|
||||
|
||||
<?= $this->render('task_list/task_details', array(
|
||||
|
|
|
|||
|
|
@ -1,5 +1,8 @@
|
|||
<div>
|
||||
<?php if ($this->user->hasProjectAccess('TaskModificationController', 'edit', $task['project_id'])): ?>
|
||||
<?php if (isset($show_items_selection)): ?>
|
||||
<input type="checkbox" data-list-item="selectable" name="tasks[]" value="<?= $task['id'] ?>">
|
||||
<?php endif ?>
|
||||
<?= $this->render('task/dropdown', array('task' => $task)) ?>
|
||||
<?php else: ?>
|
||||
<strong><?= '#'.$task['id'] ?></strong>
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -0,0 +1,82 @@
|
|||
document.addEventListener("DOMContentLoaded", function () {
|
||||
|
||||
function selectAllItems(event) {
|
||||
event.preventDefault();
|
||||
|
||||
var items = document.querySelectorAll("input[data-list-item=selectable]");
|
||||
for (var i = 0; i < items.length; i++) {
|
||||
items[i].checked = true;
|
||||
}
|
||||
|
||||
showActionMenu();
|
||||
}
|
||||
|
||||
function unselectAllItems(event) {
|
||||
event.preventDefault();
|
||||
|
||||
var items = document.querySelectorAll("input[data-list-item=selectable]");
|
||||
for (var i = 0; i < items.length; i++) {
|
||||
items[i].checked = false;
|
||||
}
|
||||
|
||||
hideActionMenu();
|
||||
}
|
||||
|
||||
function onItemChange(event) {
|
||||
var selectedItems = document.querySelectorAll("input[data-list-item=selectable]:checked");
|
||||
|
||||
if (selectedItems.length > 0) {
|
||||
showActionMenu();
|
||||
}
|
||||
}
|
||||
|
||||
function showActionMenu() {
|
||||
var element = document.querySelector(".list-item-actions");
|
||||
if (element) {
|
||||
element.classList.remove("list-item-action-hidden");
|
||||
}
|
||||
}
|
||||
|
||||
function hideActionMenu() {
|
||||
var element = document.querySelector(".list-item-actions");
|
||||
if (element && ! element.classList.contains("list-item-action-hidden")) {
|
||||
element.classList.add("list-item-action-hidden");
|
||||
}
|
||||
}
|
||||
|
||||
function onActionClick(event) {
|
||||
event.preventDefault();
|
||||
var selectedItems = document.querySelectorAll("input[data-list-item=selectable]:checked");
|
||||
var taskIDs = [];
|
||||
|
||||
for (var i = 0; i < selectedItems.length; i++) {
|
||||
taskIDs.push(selectedItems[i].value);
|
||||
}
|
||||
|
||||
var link = event.target.href + "&task_ids=" + taskIDs.join(",");
|
||||
KB.modal.open(link, "medium", true);
|
||||
}
|
||||
|
||||
var selectAllLink = document.querySelector("a[data-list-item-selection=all]");
|
||||
if (selectAllLink) {
|
||||
selectAllLink.addEventListener("click", selectAllItems);
|
||||
}
|
||||
|
||||
var unselectLink = document.querySelector("a[data-list-item-selection=none]");
|
||||
if (unselectLink) {
|
||||
unselectLink.addEventListener("click", unselectAllItems);
|
||||
}
|
||||
|
||||
var items = document.querySelectorAll("input[data-list-item=selectable]");
|
||||
for (var i = 0; i < items.length; i++) {
|
||||
items[i].addEventListener("change", onItemChange);
|
||||
}
|
||||
|
||||
KB.on('dropdown.afterRender', function () {
|
||||
var actionLinks = document.querySelectorAll("a[data-list-item-action=modal]");
|
||||
|
||||
for (var i = 0; i < actionLinks.length; i++) {
|
||||
actionLinks[i].addEventListener("click", onActionClick, false);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
.list-item-links, .list-item-actions
|
||||
display: inline-block
|
||||
float: left
|
||||
margin-left: 10px
|
||||
|
||||
.list-item-links
|
||||
a
|
||||
margin: 0
|
||||
|
||||
.list-item-action-hidden
|
||||
display: none
|
||||
|
|
@ -51,4 +51,5 @@
|
|||
@import panel
|
||||
@import activity_stream
|
||||
@import user_mentions
|
||||
@import image_slideshow
|
||||
@import image_slideshow
|
||||
@import list_items
|
||||
|
|
|
|||
|
|
@ -235,6 +235,7 @@ return array(
|
|||
'Kanboard\\Controller\\TagController' => $baseDir . '/app/Controller/TagController.php',
|
||||
'Kanboard\\Controller\\TaskAjaxController' => $baseDir . '/app/Controller/TaskAjaxController.php',
|
||||
'Kanboard\\Controller\\TaskBulkController' => $baseDir . '/app/Controller/TaskBulkController.php',
|
||||
'Kanboard\\Controller\\TaskBulkMoveColumnController' => $baseDir . '/app/Controller/TaskBulkMoveColumnController.php',
|
||||
'Kanboard\\Controller\\TaskCreationController' => $baseDir . '/app/Controller/TaskCreationController.php',
|
||||
'Kanboard\\Controller\\TaskDuplicationController' => $baseDir . '/app/Controller/TaskDuplicationController.php',
|
||||
'Kanboard\\Controller\\TaskExternalLinkController' => $baseDir . '/app/Controller/TaskExternalLinkController.php',
|
||||
|
|
|
|||
|
|
@ -361,6 +361,7 @@ class ComposerStaticInitbdc3716ceecc7570f8ff9a8407f0ca0e
|
|||
'Kanboard\\Controller\\TagController' => __DIR__ . '/../..' . '/app/Controller/TagController.php',
|
||||
'Kanboard\\Controller\\TaskAjaxController' => __DIR__ . '/../..' . '/app/Controller/TaskAjaxController.php',
|
||||
'Kanboard\\Controller\\TaskBulkController' => __DIR__ . '/../..' . '/app/Controller/TaskBulkController.php',
|
||||
'Kanboard\\Controller\\TaskBulkMoveColumnController' => __DIR__ . '/../..' . '/app/Controller/TaskBulkMoveColumnController.php',
|
||||
'Kanboard\\Controller\\TaskCreationController' => __DIR__ . '/../..' . '/app/Controller/TaskCreationController.php',
|
||||
'Kanboard\\Controller\\TaskDuplicationController' => __DIR__ . '/../..' . '/app/Controller/TaskDuplicationController.php',
|
||||
'Kanboard\\Controller\\TaskExternalLinkController' => __DIR__ . '/../..' . '/app/Controller/TaskExternalLinkController.php',
|
||||
|
|
|
|||
Loading…
Reference in New Issue