diff --git a/module/bug/css/common.css b/module/bug/css/common.css
index b516f19da6..0f9457d364 100644
--- a/module/bug/css/common.css
+++ b/module/bug/css/common.css
@@ -6,6 +6,3 @@
#batchCreateForm .input-group .form-control, #batchEditForm .input-group .form-control {position: static;}
#batchCreateForm .input-group .colorpicker, #batchEditForm .input-group .colorpicker {z-index: 2;}
#batchCreateForm .input-group .colorpicker.open, #batchEditForm .input-group .colorpicker.open {z-index: 5;}
-
-.table td {overflow:hidden;}
-
diff --git a/module/common/model.php b/module/common/model.php
index c78dc167bf..8dd0837d47 100644
--- a/module/common/model.php
+++ b/module/common/model.php
@@ -300,7 +300,7 @@ class commonModel extends model
echo "
";
echo "" . $lang->help . " ";
echo "\n";
diff --git a/module/product/css/common.css b/module/product/css/common.css
index 2b6aca623e..c3e6c23e1c 100644
--- a/module/product/css/common.css
+++ b/module/product/css/common.css
@@ -1,2 +1,2 @@
#whitelistBox .checkbox-primary, #whitelistBox .radio-inline{margin-left: 10px; display: inline-block; padding-left: 0px; padding-right: 10px;}
-.table td {overflow:hidden;}
+.c-pri {overflow:hidden;}
diff --git a/module/project/css/kanban.css b/module/project/css/kanban.css
index fd062ae104..57474a4b6b 100644
--- a/module/project/css/kanban.css
+++ b/module/project/css/kanban.css
@@ -1,4 +1,4 @@
-.boards {display: table; table-layout: fixed; width: 100%; }
+.boards {display: table; table-layout: fixed; width: auto; }
.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;}
.board-item.disabled {cursor: not-allowed;}
@@ -17,6 +17,8 @@
.board-item.dragging {opacity: .35;}
.board-item .btn {padding: 2px 10px 2px 23px; font-size: 12px; position: relative; left: -2px;}
.board-item .btn-icon-left > .icon {width: 22px; height: 22px; line-height: 20px; font-size: 14px;}
+#kanban {overflow-y: auto}
+#kanban > .table {min-width: 1100px;}
#kanban.dragging .boards.dragging .board {background: #eee; opacity: .35; border-color: #f1f1f1}
#kanban thead .c-side {padding: 5px;}
#kanban .label-pri {width: 16px; height: 16px; line-height: 16px; min-width: 16px; font-size: 12px;}
diff --git a/module/project/css/story.css b/module/project/css/story.css
index 6b08c2e40b..bc4f55afb1 100644
--- a/module/project/css/story.css
+++ b/module/project/css/story.css
@@ -1 +1,4 @@
tbody > tr > td > .btn-icon {margin-right: 4px}
+@media (max-width: 1200px) {#storyList .c-user, #storyList .c-estimate {display: none!important;}}
+@media (max-width: 1000px) {#storyList .c-status, #storyList .c-pri {display: none!important;}}
+@media (max-width: 820px) {#storyList .c-sort, #storyList .c-stage {display: none!important;}}
\ No newline at end of file
diff --git a/module/project/css/storykanban.css b/module/project/css/storykanban.css
index 6e0fd5fb34..3565f17f59 100644
--- a/module/project/css/storykanban.css
+++ b/module/project/css/storykanban.css
@@ -1,4 +1,4 @@
-.boards {display: table; table-layout: fixed; width: 100%; }
+.boards {display: table; table-layout: fixed; width: auto; }
.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;}
.board-item.disabled {cursor: not-allowed;}
@@ -17,6 +17,8 @@
.board-item .btn {padding: 2px 10px 2px 30px; font-size: 12px;}
.board-item .btn-icon-left > .icon {width: 22px; height: 22px; line-height: 20px; font-size: 14px;}
.board-item .status {line-height: 20px; display: inline-block; vertical-align: middle;}
+#kanban {overflow-y: auto}
+#kanban > .table {min-width: 1100px;}
#kanban.dragging .boards.dragging .board {background: #eee; opacity: .35; border-color: #f1f1f1}
#kanban thead .c-side {padding: 5px;}
#kanban .label-pri {width: 16px; height: 16px; line-height: 16px; min-width: 16px; font-size: 12px;}
diff --git a/module/project/js/kanban.js b/module/project/js/kanban.js
index a43547f313..cc7ce500c0 100644
--- a/module/project/js/kanban.js
+++ b/module/project/js/kanban.js
@@ -26,6 +26,58 @@ $(function()
}
};
+ // Get scrollbar width
+ var getScrollbarWidth = function ()
+ {
+ var outer = document.createElement("div");
+ 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);
+
+ var widthWithScroll = inner.offsetWidth;
+
+ // remove divs
+ outer.parentNode.removeChild(outer);
+
+ return widthNoScroll - widthWithScroll;
+ };
+
+ var scrollbarWidth = getScrollbarWidth();
+ var fixBoardWidth = function()
+ {
+ var $table = $kanban.find('.table');
+ var kanbanWidth = $table.width();
+ 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;
+ if ($cSide.length) totalWidth = totalWidth - ($cSide.outerWidth() + 5);
+ var cBoardWidth = Math.floor(totalWidth/boardCount) - 16;
+ $cBoards.not(':last').width(cBoardWidth);
+ $cBoards.first().width(cBoardWidth + 5);
+ $kanban.find('.boards > .board').width(cBoardWidth + 16 - 22);
+ };
+ fixBoardWidth();
+ $(window).on('resize', fixBoardWidth);
+
+ var refresh = function()
+ {
+ var selfClose = $.cookie('selfClose');
+ $.cookie('selfClose', 0, {expires:config.cookieLife, path:config.webRoot});
+ if(selfClose == 1) $kanban.load(location.href + ' #kanban', fixBoardWidth);
+ };
+
var kanbanModalTrigger = new $.zui.ModalTrigger({type: 'iframe', width:800});
var lastOperation;
var dropTo = function(id, from, to, type)
@@ -37,29 +89,7 @@ $(function()
{
url: $.createLink(type, statusMap[type][from][to], 'id=' + id) + onlybody,
shown: function(){$('.modal-iframe').addClass('with-titlebar').data('cancel-reload', true)},
- hidden: function()
- {
- var selfClose = $.cookie('selfClose');
- $.cookie('selfClose', 0, {expires: config.cookieLife, path: config.webRoot});
- $item = $('#' + type + '-' + id);
- $item.removeClass('board-' + type + '-' + lastOperation.to).removeClass('drop-in');
- if(selfClose != 1 && lastOperation)
- {
- $item.appendTo($item.closest('.boards').find('.board[data-type="'+ lastOperation.from + '"]'));
- }
- else
- {
- $.get($.createLink(type, 'ajaxGetByID', 'id=' + id), function(data)
- {
- $('#' + type + '-' + id).find('.' + type + '-assignedTo .text').html(data.assignedTo);
- if(type == 'task')
- {
- $('#task-' + id).find('.task-left').html(data.left + 'h');
- if(data.story) $('div.board-story[data-id="' + data.story + '"]').find('.story-stage').html(data.storyStage);
- }
- }, 'json');
- }
- }
+ hidden: refresh
});
return true;
}
@@ -113,13 +143,6 @@ $(function()
}
});
- var refresh = function()
- {
- var selfClose = $.cookie('selfClose');
- $.cookie('selfClose', 0, {expires:config.cookieLife, path:config.webRoot});
- if(selfClose == 1) $kanban.load(location.href + ' #kanban');
- }
-
$kanban.on('click', '.kanbaniframe', function(e)
{
var $link = $(this);
@@ -130,8 +153,8 @@ $(function()
width: '80%',
}, $link.data())).show(
{
- shown: function(){$('.modal-iframe').addClass('with-titlebar').data('cancel-reload', true)},
- hidden: function(){refresh();}
+ shown: function(){$('.modal-iframe').data('cancel-reload', true)},
+ hidden: refresh
});
return false;
});
diff --git a/module/project/js/storykanban.js b/module/project/js/storykanban.js
index 704d0bf8c0..d50761fca0 100644
--- a/module/project/js/storykanban.js
+++ b/module/project/js/storykanban.js
@@ -4,6 +4,7 @@ $(function()
var onlybody = config.requestType == 'GET' ? "&onlybody=yes" : "?onlybody=yes";
$.cookie('selfClose', 0, {expires:config.cookieLife, path:config.webRoot});
var $kanban = $('#kanban');
+ var kanbanModalTrigger = new $.zui.ModalTrigger({type: 'iframe', width:800});
var stageMap =
{
@@ -17,14 +18,68 @@ $(function()
}
};
+ // Get scrollbar width
+ var getScrollbarWidth = function ()
+ {
+ var outer = document.createElement("div");
+ 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);
+
+ var widthWithScroll = inner.offsetWidth;
+
+ // remove divs
+ outer.parentNode.removeChild(outer);
+
+ return widthNoScroll - widthWithScroll;
+ };
+
+ var scrollbarWidth = getScrollbarWidth();
+ var fixBoardWidth = function()
+ {
+ var $table = $kanban.find('.table');
+ var kanbanWidth = $table.width();
+ 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;
+ if ($cSide.length) totalWidth = totalWidth - ($cSide.outerWidth() + 5);
+ var cBoardWidth = Math.floor(totalWidth/boardCount) - 16;
+ $cBoards.not(':last').width(cBoardWidth);
+ $cBoards.first().width(cBoardWidth + 5);
+ $kanban.find('.boards > .board').width(cBoardWidth + 16 - 22);
+ };
+ fixBoardWidth();
+ $(window).on('resize', fixBoardWidth);
+
+ var refresh = function()
+ {
+ var selfClose = $.cookie('selfClose');
+ $.cookie('selfClose', 0, {expires:config.cookieLife, path:config.webRoot});
+ if(selfClose == 1) $kanban.load(location.href + ' #kanban', fixBoardWidth);
+ };
+
var lastOperation;
var dropTo = function(id, from, to, type)
{
- console.log(id);
if(stageMap[type][from] && stageMap[type][from][to])
{
lastOperation = {id: id, from: from, to: to};
- $.post(createLink(type, stageMap[type][from][to], 'stage=' + to), {'storyIDList[]':[id]});
+ $.post(createLink(type, stageMap[type][from][to], 'stage=' + to), {'storyIDList[]':[id]}, function()
+ {
+ refresh();
+ });
return true;
}
return false;
@@ -77,13 +132,6 @@ $(function()
}
});
- var refresh = function()
- {
- var selfClose = $.cookie('selfClose');
- $.cookie('selfClose', 0, {expires:config.cookieLife, path:config.webRoot});
- if(selfClose == 1) $kanban.load(location.href + ' #kanban');
- }
-
$kanban.on('click', '.kanbaniframe', function(e)
{
var $link = $(this);
@@ -94,15 +142,9 @@ $(function()
width: '80%',
}, $link.data())).show(
{
- shown: function(){$('.modal-iframe').addClass('with-titlebar').data('cancel-reload', true)},
- hidden: function(){refresh();}
+ shown: function(){$('.modal-iframe').data('cancel-reload', true)},
+ hidden: refresh
});
- return false;
+ return false;
});
-
- $.extend({'closeModal':function(callback, location)
- {
- kanbanModalTrigger.close();
- if(callback && $.isFunction(callback)) callback();
- }});
});
diff --git a/module/project/model.php b/module/project/model.php
index 5002129c70..4437c32e68 100644
--- a/module/project/model.php
+++ b/module/project/model.php
@@ -2748,7 +2748,7 @@ class projectModel extends model
$productPlans = array();
foreach($products as $productID => $product)
{
- $productPlans[$productID] = $this->productplan->getPairs($product->id, $product->branch);
+ $productPlans[$productID] = $this->productplan->getPairs($product->id, isset($product->branch) ? $product->branch : '');
}
return $productPlans;
}
diff --git a/module/project/view/story.html.php b/module/project/view/story.html.php
index c06a685534..8df30c51f4 100644
--- a/module/project/view/story.html.php
+++ b/module/project/view/story.html.php
@@ -100,15 +100,15 @@
idAB);?>
- project->updateOrder);?> |
+ project->updateOrder);?> |
priAB);?> |
- story->title);?> |
- openedByAB);?> |
- assignedToAB);?> |
- story->estimateAB);?> |
- statusAB);?> |
- story->stageAB);?> |
+ story->title);?> |
+ openedByAB);?> |
+ assignedToAB);?> |
+ story->estimateAB);?> |
+ statusAB);?> |
+ story->stageAB);?> |
story->taskCountAB;?> |
story->bugCountAB;?> |
story->caseCountAB;?> |
@@ -130,23 +130,23 @@
- |
+ |
- pri?>' title='story->priList, $story->pri, $story->pri);?>'>story->priList, $story->pri, $story->pri);?> |
-
+ | pri?>' title='story->priList, $story->pri, $story->pri);?>'>story->priList, $story->pri, $story->pri);?> |
+
product][$story->branch])) echo "" . $branchGroups[$story->product][$story->branch] . '';?>
title, null, "style='color: $story->color'");?>
|
- openedBy];?> |
- assignedTo];?> |
- estimate;?> |
-
+ | openedBy];?> |
+ assignedTo];?> |
+ estimate;?> |
+
story->statusList, $story->status);?>
|
- story->stageList[$story->stage];?> |
+ story->stageList[$story->stage];?> |
createLink('story', 'tasks', "storyID=$story->id&projectID=$project->id");
diff --git a/module/search/view/buildform.html.php b/module/search/view/buildform.html.php
index acf329e8a8..6954877b6c 100644
--- a/module/search/view/buildform.html.php
+++ b/module/search/view/buildform.html.php
@@ -42,6 +42,7 @@ $formId = 'searchForm-' . uniqid('');
#userQueries .label:hover {background-color: #aaa; color: #fff;}
#userQueries .label > .icon-close {position: absolute; top: 2px; right: 2px; border-radius: 9px; font-size: 12px; line-height: 18px; width: 18px; display: inline-block;}
#userQueries .label > .icon-close:hover {background-color: #ff5d5d; color: #fff;}
+@media (max-width: 1150px) {#userQueries {display: none}}
|