Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* [Project Boards/UX] On project boards, if a column behavior removes…
… a card from the board (e.g. 'Completed'), the card now properly disappears after being dropped into the column. Previously, the card was only removed after a refresh of the board or column. Fixes #767
- Loading branch information
Showing
2 changed files
with
30 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 19 additions & 1 deletion
20
features/cerb.project_boards/templates/boards/board/card.tpl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,25 @@ | ||
{$uniqid = uniqid()} | ||
{$context_ext = Extension_DevblocksContext::get($card->_context)} | ||
<div class="cerb-board-card-type">{$context_ext->manifest->name}</div> | ||
<div> | ||
<div id="{$uniqid}"> | ||
<input type="hidden" name="cards[]" value="{$card->_context}:{$card->id}"> | ||
<h3><a href="javascript:;" class="cerb-peek-trigger" data-context="{$card->_context}" data-context-id="{$card->id}">{$card->_label}</a></h3> | ||
{$board->renderCard($card)} | ||
</div> | ||
|
||
{if $card_is_removed} | ||
<script type="text/javascript"> | ||
$(function() { | ||
var $div = $('#{$uniqid}'); | ||
var $card = $div.closest('.cerb-board-card'); | ||
$card.toggle({ | ||
effect:'scale', | ||
duration: 500, | ||
complete: function() { | ||
$card.remove(); | ||
} | ||
}); | ||
}); | ||
{/if} | ||
</script> |