* finish task #4670.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
.boards {display: table; table-layout: fixed; width: auto; }
|
||||
.boards {display: table; table-layout: fixed; width: auto; min-height: 50px;}
|
||||
.boards .board:not(:last-child) {border-right: 1px solid #ddd;}
|
||||
.board {display: table-cell; width: 16.666666667%; padding: 10px; border: 1px solid transparent; transition: background-color .2s, opacity .2s; vertical-align: top;}
|
||||
.board-item {border: 1px solid #EBEBEB; padding: 5px 10px; cursor: move; border-radius: 2px; background-color: #fff; transition: border .2s, opacity .2s; overflow: hidden;}
|
||||
|
||||
+23
-15
@@ -1,15 +1,19 @@
|
||||
$(function()
|
||||
{
|
||||
$('.c-boards').each(function()
|
||||
var adjustBoardsHeight = function()
|
||||
{
|
||||
var height = $(window).height() - $('#header').height() - $('#footer').height() - 40 - 105;
|
||||
var $boardsWrapper = $(this).find('.boards-wrapper');
|
||||
$boardsWrapper.height(height);
|
||||
if($boardsWrapper.height() > $boardsWrapper.find('.boards').height())
|
||||
$('.c-boards').each(function()
|
||||
{
|
||||
$boardsWrapper.find('.boards').css('height', $(this).height() - 1);
|
||||
}
|
||||
});
|
||||
var height = $(window).height() - $('#header').height() - $('#footer').height() - 40 - 105;
|
||||
var $boardsWrapper = $(this).find('.boards-wrapper');
|
||||
$boardsWrapper.height(height);
|
||||
if($boardsWrapper.height() > $boardsWrapper.find('.boards').height())
|
||||
{
|
||||
$boardsWrapper.find('.boards').css('height', $(this).height() - 1);
|
||||
}
|
||||
});
|
||||
};
|
||||
adjustBoardsHeight();
|
||||
|
||||
var boardID = '';
|
||||
var onlybody = config.requestType == 'GET' ? "&onlybody=yes" : "?onlybody=yes";
|
||||
@@ -44,23 +48,23 @@ $(function()
|
||||
outer.style.visibility = "hidden";
|
||||
outer.style.width = "100px";
|
||||
outer.style.msOverflowStyle = "scrollbar"; // needed for WinJS apps
|
||||
|
||||
|
||||
document.body.appendChild(outer);
|
||||
|
||||
|
||||
var widthNoScroll = outer.offsetWidth;
|
||||
// force scrollbars
|
||||
outer.style.overflow = "scroll";
|
||||
|
||||
|
||||
// add innerdiv
|
||||
var inner = document.createElement("div");
|
||||
inner.style.width = "100%";
|
||||
outer.appendChild(inner);
|
||||
|
||||
outer.appendChild(inner);
|
||||
|
||||
var widthWithScroll = inner.offsetWidth;
|
||||
|
||||
// remove divs
|
||||
outer.parentNode.removeChild(outer);
|
||||
|
||||
|
||||
return widthNoScroll - widthWithScroll;
|
||||
};
|
||||
|
||||
@@ -86,7 +90,11 @@ $(function()
|
||||
{
|
||||
var selfClose = $.cookie('selfClose');
|
||||
$.cookie('selfClose', 0, {expires:config.cookieLife, path:config.webRoot});
|
||||
if(selfClose == 1) $kanban.load(location.href + ' #kanban', fixBoardWidth);
|
||||
if(selfClose == 1) $kanban.load(location.href + ' #kanban', function()
|
||||
{
|
||||
fixBoardWidth();
|
||||
adjustBoardsHeight();
|
||||
});
|
||||
};
|
||||
|
||||
var kanbanModalTrigger = new $.zui.ModalTrigger({type: 'iframe', width:800});
|
||||
|
||||
Reference in New Issue
Block a user