Merge branch 'master' of https://gitlab.zcorp.cc/easycorp/zentaopms
This commit is contained in:
@@ -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';
|
||||
|
||||
@@ -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 @@
|
||||
#mainContent {padding-left: 0px;}
|
||||
#mainContent {padding-left: 0px; height: 500px;}
|
||||
|
||||
@@ -1 +1 @@
|
||||
#mainContent {padding-left: 0px;}
|
||||
#mainContent {padding-left: 0px; height: 500px;}
|
||||
|
||||
@@ -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;}
|
||||
|
||||
@@ -1587,3 +1587,8 @@ function resetRegionHeight(fold)
|
||||
$('.region').css('height', regionHeaderHeight);
|
||||
}
|
||||
}
|
||||
|
||||
$('.dropdown-menu').click(function()
|
||||
{
|
||||
$.zui.ContextMenu.hide();
|
||||
})
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
@@ -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');
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user