Append filters instead of replacing value for users and categories dropdowns
This commit is contained in:
@@ -18,6 +18,7 @@ Core functionalities moved to plugins:
|
|||||||
|
|
||||||
Improvements:
|
Improvements:
|
||||||
|
|
||||||
|
* Append filters instead of replacing value for users and categories dropdowns
|
||||||
* Do not show empty swimlanes in public view
|
* Do not show empty swimlanes in public view
|
||||||
* Change swimlane layout to save space on the screen
|
* Change swimlane layout to save space on the screen
|
||||||
* Add the possibility to set/unset max column height (column scrolling)
|
* Add the possibility to set/unset max column height (column scrolling)
|
||||||
|
|||||||
@@ -136,7 +136,7 @@ class Board extends Base
|
|||||||
}
|
}
|
||||||
|
|
||||||
$values = $this->request->getJson();
|
$values = $this->request->getJson();
|
||||||
$this->userSession->setFilters($project_id, $values['search']);
|
$this->userSession->setFilters($project_id, empty($values['search']) ? '' : $values['search']);
|
||||||
|
|
||||||
$this->response->html($this->renderBoard($project_id));
|
$this->response->html($this->renderBoard($project_id));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -67,10 +67,9 @@
|
|||||||
<div class="dropdown filters">
|
<div class="dropdown filters">
|
||||||
<i class="fa fa-caret-down"></i> <a href="#" class="dropdown-menu"><?= t('Users') ?></a>
|
<i class="fa fa-caret-down"></i> <a href="#" class="dropdown-menu"><?= t('Users') ?></a>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="#" class="filter-helper" data-filter="status:open"><?= t('All users') ?></a></li>
|
<li><a href="#" class="filter-helper" data-append-filter="assignee:nobody"><?= t('Not assigned') ?></a></li>
|
||||||
<li><a href="#" class="filter-helper" data-filter="status:open assignee:nobody"><?= t('Not assigned') ?></a></li>
|
|
||||||
<?php foreach ($users_list as $user): ?>
|
<?php foreach ($users_list as $user): ?>
|
||||||
<li><a href="#" class="filter-helper" data-filter='status:open assignee:"<?= $this->e($user) ?>"'><?= $this->e($user) ?></a></li>
|
<li><a href="#" class="filter-helper" data-append-filter='assignee:"<?= $this->e($user) ?>"'><?= $this->e($user) ?></a></li>
|
||||||
<?php endforeach ?>
|
<?php endforeach ?>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
@@ -80,10 +79,9 @@
|
|||||||
<div class="dropdown filters">
|
<div class="dropdown filters">
|
||||||
<i class="fa fa-caret-down"></i> <a href="#" class="dropdown-menu"><?= t('Categories') ?></a>
|
<i class="fa fa-caret-down"></i> <a href="#" class="dropdown-menu"><?= t('Categories') ?></a>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="#" class="filter-helper" data-filter="status:open"><?= t('All categories') ?></a></li>
|
<li><a href="#" class="filter-helper" data-append-filter="category:none"><?= t('No category') ?></a></li>
|
||||||
<li><a href="#" class="filter-helper" data-filter="status:open category:none"><?= t('No category') ?></a></li>
|
|
||||||
<?php foreach ($categories_list as $category): ?>
|
<?php foreach ($categories_list as $category): ?>
|
||||||
<li><a href="#" class="filter-helper" data-filter='status:open category:"<?= $this->e($category) ?>"'><?= $this->e($category) ?></a></li>
|
<li><a href="#" class="filter-helper" data-append-filter='category:"<?= $this->e($category) ?>"'><?= $this->e($category) ?></a></li>
|
||||||
<?php endforeach ?>
|
<?php endforeach ?>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@@ -18,7 +18,13 @@ Search.prototype.listen = function() {
|
|||||||
// Filter helper for search
|
// Filter helper for search
|
||||||
$(document).on("click", ".filter-helper", function (e) {
|
$(document).on("click", ".filter-helper", function (e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
|
|
||||||
var filter = $(this).data("filter");
|
var filter = $(this).data("filter");
|
||||||
|
var appendFilter = $(this).data("append-filter");
|
||||||
|
|
||||||
|
if (appendFilter) {
|
||||||
|
filter = $("#form-search").val() + " " + appendFilter;
|
||||||
|
}
|
||||||
|
|
||||||
$("#form-search").val(filter);
|
$("#form-search").val(filter);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user