This commit is contained in:
zhujinyong
2022-03-22 10:55:21 +08:00
11 changed files with 39 additions and 12 deletions
+1
View File
@@ -23,6 +23,7 @@ ALTER TABLE `zt_story` ADD `activatedDate` datetime NOT NULL AFTER `closedReason
ALTER TABLE `zt_task` MODIFY `activatedDate` datetime NOT NULL AFTER `lastEditedDate`;
ALTER TABLE `zt_kanbancard` ADD `progress` float unsigned NOT NULL DEFAULT '0' AFTER `estimate`;
UPDATE `zt_kanbancard` SET `progress`='100' WHERE `status` = 'done' and `fromtype` = '';
ALTER TABLE `zt_user` ADD `visions` varchar(20) NOT NULL DEFAULT 'rnd,lite' AFTER `visits`;
UPDATE `zt_user` SET `visions`='rnd,lite';
+2 -6
View File
@@ -2895,11 +2895,7 @@ class execution extends control
$this->execution->unlinkStory($executionID, $storyID);
/* if kanban then reload and if ajax request then send result. */
if(isonlybody())
{
return print(js::reload('parent'));
}
elseif(helper::isAjaxRequest())
if(helper::isAjaxRequest())
{
if(dao::isError())
{
@@ -2913,7 +2909,7 @@ class execution extends control
}
return $this->send($response);
}
return print(js::locate($this->app->session->storyList, 'parent'));
return print(js::reload('parent'));
}
}
+1 -1
View File
@@ -1 +1 @@
#mainContent {padding-left: 0px;}
#mainContent {padding-left: 0px; height: 500px;}
+1 -1
View File
@@ -1 +1 @@
#mainContent {padding-left: 0px;}
#mainContent {padding-left: 0px; height: 500px;}
+1
View File
@@ -82,6 +82,7 @@
.kanban-item .has-color .info > .user .lable-teamSumCount,
.kanban-item .has-color .info > .label-light {color: #FFFFFF;}
.kanban-item .has-color .info > .label-pri {border-color: #FFFFFF;}
.kanban-item .has-color .progress-box > .progress-number {color: #FFFFFF;}
.kanban-item .item-more {position: absolute; right: 6px; top: 0px;}
.kanban-card {height: auto !important; padding: 8px 14px !important; min-height: 60px;}
+5
View File
@@ -1587,3 +1587,8 @@ function resetRegionHeight(fold)
$('.region').css('height', regionHeaderHeight);
}
}
$('.dropdown-menu').click(function()
{
$.zui.ContextMenu.hide();
})
+3 -3
View File
@@ -1647,14 +1647,14 @@ class kanbanModel extends model
public function getSpacePairs($browseType = 'private')
{
$account = $this->app->user->account;
$spaceIdList = $this->getCanViewObjects('kanbanspace');
$spaceIdList = $this->getCanViewObjects('kanbanspace', $browseType);
return $this->dao->select('id,name')->from(TABLE_KANBANSPACE)
->where('deleted')->eq(0)
->andWhere('id')->in($spaceIdList)
->beginIF(in_array($browseType, array('private', 'cooperation', 'public')))->andWhere('type')->eq($browseType)->fi()
->beginIF($browseType == 'involved')->andWhere('owner')->ne($account)->fi()
->beginIF($this->cookie->showClosed == 0 and $browseType != 'showClosed')->andWhere('status')->ne('closed')->fi()
->beginIF(!$this->app->user->admin)->andWhere('id')->in($spaceIdList)->fi()
->orderBy('id_desc')
->fetchPairs('id');
}
@@ -1694,7 +1694,7 @@ class kanbanModel extends model
$spaceList = $objectType == 'kanban' ? $this->dao->select('id,owner,type')->from(TABLE_KANBANSPACE)->fetchAll('id') : array();
if($this->app->user->admin and strpos('private,involved', $param) === false) return array_keys($objects);
if($param and $this->app->user->admin and strpos('private,involved', $param) === false) return array_keys($objects);
$account = $this->app->user->account;
foreach($objects as $objectID => $object)
+2
View File
@@ -71,6 +71,7 @@
</div>
</td>
</tr>
<?php if($card->progress):?>
<tr>
<th><?php echo $lang->kanbancard->progress;?></th>
<td>
@@ -80,6 +81,7 @@
</div>
</td>
</tr>
<?php endif;?>
</table>
</div>
</div>
+2
View File
@@ -114,10 +114,12 @@
<th><?php echo $lang->kanbancard->estimate;?></th>
<td><?php echo round($card->estimate, 2) . ' ' . $lang->kanbancard->lblHour;?></td>
</tr>
<?php if($card->progress):?>
<tr>
<th><?php echo $lang->kanbancard->progress;?></th>
<td><?php echo round($card->progress, 2) . ' %';?></td>
</tr>
<?php endif;?>
</tbody>
</table>
</div>
+14 -1
View File
@@ -85,6 +85,18 @@ function copyStoryTitle(num)
/* Set the story module. */
function setStoryRelated(num)
{
setPreview(num);
}
/**
* Set preview.
*
* @param int $num
* @access public
* @return void
*/
function setPreview(num)
{
var storyID = $('#story' + num).val();
if(storyID != 0 && storyID != 'ditto')
@@ -224,6 +236,7 @@ $(document).on('chosen:showing_dropdown', 'select[name^="story"],.chosen-with-dr
$(select).trigger("change");
}
})
$(document).on('mousedown', 'select', function()
{
if($(this).val() == 'ditto')
@@ -253,7 +266,7 @@ $(function()
if($.cookie('zeroTask') == 'true') toggleZeroTaskStory();
markStoryTask();
if(storyID != 0) setStoryRelated(0);
if(storyID != 0) setStoryRelated($('#batchCreateForm table tbody tr:first [id^=story]:first').attr('id').replace('story', ''));
$(document).keydown(function(event)
{
+7
View File
@@ -900,5 +900,12 @@ $(document).ready(function()
$('#globalCreate').hover(function()
{
$(this).prev().removeClass('open');
$(this).addClass('dropdown-hover');
});
/* Hide create button when global create menu is clicked. */
$('#globalCreate').click(function()
{
$(this).removeClass('dropdown-hover');
});
});