This commit is contained in:
reneeteng
2018-11-01 09:50:36 +08:00
12 changed files with 52 additions and 17 deletions
+3 -2
View File
@@ -141,7 +141,7 @@ class bug extends control
/* Set view. */
$this->view->title = $this->products[$productID] . $this->lang->colon . $this->lang->bug->common;
$this->view->position[] = html::a($this->createLink('bug', 'browse', "productID=$productID"), $this->products[$productID]);
$this->view->position[] = html::a($this->createLink('bug', 'browse', "productID=$productID"), $this->products[$productID],'','title=' . $this->products[$productID]);
$this->view->position[] = $this->lang->bug->common;
$this->view->productID = $productID;
$this->view->product = $this->product->getById($productID);
@@ -1542,7 +1542,8 @@ class bug extends control
$bug->closedDate = substr($bug->closedDate, 0, 10);
$bug->resolvedDate = substr($bug->resolvedDate, 0, 10);
$bug->lastEditedDate = substr($bug->lastEditedDate, 0, 10);
$bug->title = htmlspecialchars_decode($bug->title,ENT_QUOTES);
if($bug->linkBug)
{
$tmpLinkBugs = array();
+2
View File
@@ -426,12 +426,14 @@ function setStories(moduleID, productID)
function loadProductBranches(productID)
{
$('#branch').remove();
$('#branch_chosen').remove();
$.get(createLink('branch', 'ajaxGetBranches', "productID=" + productID), function(data)
{
if(data)
{
$('#product').closest('.input-group').append(data);
$('#branch').css('width', page == 'create' ? '120px' : '65px');
$('#branch').chosen();
}
})
}
+1 -1
View File
@@ -9,7 +9,7 @@ function loadAllUsers()
var link = createLink('bug', 'ajaxLoadAllUsers', 'selectedUser=' + $('#assignedTo').val());
$.get(link, function(data)
{
if (data)
if(data)
{
var moduleID = $('#module').val();
var productID = $('#product').val();
+1 -1
View File
@@ -16,7 +16,7 @@
.board.drop-to .board-drag-holder {display: block;}
.board-item + .board-drag-holder {margin-top: 10px;}
.board-item.dragging {opacity: .35;}
.board-item .btn {padding: 2px 10px 2px 23px; font-size: 12px; position: relative; left: -2px;}
.board-item .btn {padding: 2px 10px 2px 23px; font-size: 12px; position: relative; left: -2px; height: 24px;}
.board-item .btn-icon-left > .icon {width: 22px; height: 22px; line-height: 20px; font-size: 14px; opacity: 1; top: 1px}
.board-item .btn-icon-left > span {max-width: 80px; white-space: nowrap; text-overflow: ellipsis; overflow: hidden; display: inline-block;}
#kanban {overflow-y: auto}
+22
View File
@@ -6,3 +6,25 @@ $(function()
location.href = createLink('project', 'burn', 'projectID=' + projectID + '&type=' + type + '&interval=' + $(this).val());
});
})
/* Save burn as image.*/
function downloadBurn()
{
var canvas = $('#burnCanvas');
var type = 'png';
var imgSrc = canvas.get(0).toDataURL("image/png");
imgData = imgSrc.replace(type,'image/octet-stream');
var filename = 'burn.' + type;
saveFile(imgData,filename);
}
var saveFile = function(data, filename)
{
var saveLink = document.createElement('a');
saveLink.href = data;
saveLink.download = filename;
var event = document.createEvent('MouseEvents');
event.initMouseEvent('click', true, false, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null);
saveLink.dispatchEvent(event);
};
+1 -1
View File
@@ -116,7 +116,7 @@ $(function()
$.cookie('selfClose', 0, {expires:config.cookieLife, path:config.webRoot});
if(selfClose == 1 || force)
{
$kanban.load(location.href + ' #kanban', updateUI);
$kanban.load(location.href + ' #kanban>*', updateUI);
}
};
window.refreshKanban = refresh;
+3
View File
@@ -30,6 +30,9 @@
</div>
<?php endif;?>
</div>
<div class='pull-right'>
<?php echo html::submitButton($lang->export, "onclick='downloadBurn();'", 'btn btn-primary');?>
</div>
</div>
<div id='mainContent' class='main-content'>
<h2 class='text-center'><?php echo $projectName . ' ' . $this->lang->project->burn;?></h2>
+2 -2
View File
@@ -14,8 +14,8 @@
<?php echo html::a($this->createLink('project', 'ajaxKanbanSetting', "projectID=$projectID"), "<i class='icon-cog muted'></i> " . $lang->project->kanbanSetting, '', "class='iframe btn btn-link'");?>
<?php if(common::hasPriv('project', 'printKanban')) echo html::a($this->createLink('project', 'printKanban', "projectID=$projectID"), "<i class='icon-printer muted'></i> " . $lang->project->printKanban, '', "class='iframe btn btn-link' id='printKanban' title='{$lang->project->printKanban}' data-width='500'");?>
<?php
$link = $this->createLink('task', 'export', "project=$projectID&orderBy=$orderBy&type=$browseType");
if(common::hasPriv('task', 'export')) echo html::a($link, "<i class='icon-import muted'></i> " . $lang->task->export, '', "class='btn btn-link iframe' data-width='700'");
$link = $this->createLink('task', 'export', "project=$projectID&orderBy=$orderBy&type=kanban");
if(common::hasPriv('task', 'export')) echo html::a($link, "<i class='icon-import muted'></i> " . $lang->task->export, '', "class='btn btn-link iframe export' data-width='700'");
?>
<div class='btn-group'>
<button type='button' class='btn btn-link dropdown-toggle' data-toggle='dropdown' id='importAction'>
+3 -3
View File
@@ -1472,8 +1472,8 @@ class story extends control
$story->verify = str_replace('&nbsp;', ' ', $story->verify);
}
/* fill some field with useful value. */
if(isset($products[$story->product])) $story->product = $products[$story->product] . "(#$story->product)";
if(isset($relatedModules[$story->module])) $story->module = $relatedModules[$story->module] . "(#$story->module)";
if(isset($products[$story->product])) $story->product = $this->post->fileType == 'word' ? $products[$story->product] : $products[$story->product] . "(#$story->product)";
if(isset($relatedModules[$story->module])) $story->module = $this->post->fileType == 'word' ? $relatedModules[$story->module] : $relatedModules[$story->module] . "(#$story->module)";
if(isset($relatedBranch[$story->branch])) $story->branch = $relatedBranch[$story->branch] . "(#$story->branch)";
if(isset($story->plan))
{
@@ -1481,7 +1481,7 @@ class story extends control
foreach(explode(',', $story->plan) as $planID)
{
if(empty($planID)) continue;
if(isset($relatedPlans[$planID])) $plans .= $relatedPlans[$planID] . "(#$planID)";
if(isset($relatedPlans[$planID])) $plans .= $this->post->fileType == 'word' ? $relatedPlans[$planID] : $relatedPlans[$planID] . "(#$planID)";
}
$story->plan = $plans;
}
+10 -3
View File
@@ -1278,7 +1278,7 @@ class task extends control
$task->progress .= '%';
}
}
else
elseif($this->session->taskQueryCondition)
{
$stmt = $this->dbh->query($this->session->taskQueryCondition . ($this->post->exportType == 'selected' ? " AND t1.id IN({$this->cookie->checkedItem})" : '') . " ORDER BY " . strtr($orderBy, '_', ' '));
while($row = $stmt->fetch()) $tasks[$row->id] = $row;
@@ -1307,7 +1307,7 @@ class task extends control
$relatedFiles = $this->dao->select('id, objectID, pathname, title')->from(TABLE_FILE)->where('objectType')->eq('task')->andWhere('objectID')->in(@array_keys($tasks))->andWhere('extra')->ne('editor')->fetchGroup('objectID');
$relatedModules = $this->loadModel('tree')->getTaskOptionMenu($projectID);
if(!$this->session->taskWithChildren)
if(!$this->session->taskWithChildren and $tasks)
{
$children = $this->dao->select('*')->from(TABLE_TASK)->where('deleted')->eq(0)
->andWhere('parent')->ne(0)
@@ -1359,8 +1359,14 @@ class task extends control
if($type == 'group')
{
$stories = $this->loadModel('story')->getProjectStories($projectID);
$groupTasks = array();
foreach($tasks as $task) $groupTasks[$task->$orderBy][] = $task;
foreach($tasks as $task)
{
$task->storyTitle = isset($stories[$task->story]) ? $stories[$task->story]->title : '';
$groupTasks[$task->$orderBy][] = $task;
}
$tasks = array();
foreach($groupTasks as $groupTask)
{
@@ -1424,6 +1430,7 @@ class task extends control
$this->view->allExportFields = $allExportFields;
$this->view->customExport = true;
$this->view->orderBy = $orderBy;
$this->view->type = $type;
$this->view->projectID = $projectID;
$this->display();
+2 -2
View File
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long