* improve kanban UI.

This commit is contained in:
Catouse
2018-10-25 13:55:17 +08:00
parent a0fbccf7ce
commit faddacafef
2 changed files with 10 additions and 6 deletions
+1
View File
@@ -22,6 +22,7 @@
#kanban {overflow-y: auto}
#kanban > .table {min-width: 1100px;}
#kanban.dragging .boards.dragging .board {background: #eee; opacity: .35; border-color: #f1f1f1}
#kanban thead > tr > th {padding-left: 0; padding-right: 0;}
#kanban thead .c-side {padding: 5px; max-width: 15%;}
#kanban .label-pri {width: 16px; height: 16px; line-height: 12px; min-width: 16px; font-size: 12px; padding: 0;}
#kanban tbody > tr > td {line-height: 24px;}
+9 -6
View File
@@ -1,5 +1,6 @@
$(function()
{
var isFirefox = $.zui.browser.firefox;
var adjustBoardsHeight = function()
{
var $cBoards = $('.c-boards');
@@ -9,7 +10,7 @@ $(function()
$boardsWrapper.css('min-height', $(window).height() - $('#header').height() - $('#footer').height() - 111);
if($boardsWrapper.height() > $boardsWrapper.find('.boards').height())
{
$boardsWrapper.find('.boards').css('min-height', $boardsWrapper.height() - 1);
$boardsWrapper.find('.boards').css(isFirefox ? 'height' : 'min-height', $boardsWrapper.height() - 1);
}
return
}
@@ -22,7 +23,9 @@ $(function()
$boardsWrapper.css({maxHeight: height, minHeight: minHeight});
if($boardsWrapper.height() > $boardsWrapper.find('.boards').height())
{
$boardsWrapper.find('.boards').css({maxHeight: $theBoards.height(), minHeight: minHeight});
var $boards = $boardsWrapper.find('.boards');
$boards.css({maxHeight: $theBoards.height(), minHeight: minHeight});
if ($boards.outerHeight() < minHeight) $boards.css('height', minHeight);
}
});
};
@@ -89,12 +92,12 @@ $(function()
var $cBoards = $table.find('thead>tr>th.c-board:not(.c-side)');
var boardCount = $cBoards.length;
var $cSide = $table.find('thead>tr>th.c-board.c-side');
var totalWidth = kanbanWidth - scrollbarWidth;
var totalWidth = kanbanWidth - scrollbarWidth - 1;
if ($cSide.length) totalWidth = totalWidth - ($cSide.outerWidth() + 5);
var cBoardWidth = Math.floor(totalWidth/boardCount) - 16;
var cBoardWidth = Math.floor(totalWidth/boardCount);
$cBoards.not(':last').width(cBoardWidth);
$cBoards.first().width(cBoardWidth + 5);
$kanban.find('.boards > .board').width(cBoardWidth + 16 - 22);
if ($cSide.length) $cBoards.first().width(cBoardWidth + (isFirefox ? 0 : 5));
$kanban.find('.boards > .board').width(cBoardWidth - (isFirefox ? 21 : 22));
};
fixBoardWidth();