Merge branch 'master' of github.com:easysoft/zentaopms
This commit is contained in:
@@ -27,8 +27,7 @@
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php $isOnlybody = helper::inOnlyBodyMode(); ?>
|
||||
<?php if(!$isOnlybody):?>
|
||||
<?php if(!isonlybody()):?>
|
||||
<div class="btn-toolbar pull-right">
|
||||
<?php common::printLink('bug', 'create', "productID={$bug->product}&branch={$bug->branch}&extra=moduleID={$bug->module}", "<i class='icon icon-plus'></i>" . $lang->bug->create, '', "class='btn btn-primary'"); ?>
|
||||
</div>
|
||||
|
||||
@@ -14,16 +14,22 @@ $(function()
|
||||
$('#contentBox').addClass('hidden');
|
||||
$('#urlBox').removeClass('hidden');
|
||||
}
|
||||
})
|
||||
});
|
||||
|
||||
// hide #module chosen dropdown on #lib dropdown show
|
||||
$('#lib').on('chosen:showing_dropdown', function()
|
||||
{
|
||||
$('#module').trigger('chosen:close');
|
||||
});
|
||||
})
|
||||
|
||||
function loadDocModule(libID)
|
||||
{
|
||||
link = createLink('doc', 'ajaxGetChild', 'libID=' + libID);
|
||||
$.post(link, function(data)
|
||||
{
|
||||
{
|
||||
$('#module').replaceWith(data);
|
||||
$('#module_chosen').remove();
|
||||
$('#module').chosen();
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
@@ -41,8 +41,7 @@
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php $isOnlybody = helper::inOnlyBodyMode(); ?>
|
||||
<?php if(!$isOnlybody):?>
|
||||
<?php if(!isonlybody()):?>
|
||||
<div class="btn-toolbar pull-right">
|
||||
<?php common::printLink('story', 'create', "productID={$story->product}&branch={$story->branch}&moduleID={$story->module}", "<i class='icon icon-plus'></i>" . $lang->story->create, '', "class='btn btn-primary'"); ?>
|
||||
</div>
|
||||
|
||||
@@ -335,13 +335,15 @@ class task extends control
|
||||
$noclosedProjects = $this->project->getPairs('noclosed,nocode');
|
||||
unset($noclosedProjects[$this->view->project->id]);
|
||||
$this->view->projects = array($this->view->project->id => $this->view->project->name) + $noclosedProjects;
|
||||
$tasks = $this->task->getParentTaskPairs($this->view->project->id);
|
||||
if(isset($tasks[$taskID])) unset($tasks[$taskID]);
|
||||
|
||||
if(!isset($this->view->members[$this->view->task->assignedTo])) $this->view->members[$this->view->task->assignedTo] = $this->view->task->assignedTo;
|
||||
$this->view->title = $this->lang->task->edit . 'TASK' . $this->lang->colon . $this->view->task->name;
|
||||
$this->view->position[] = $this->lang->task->common;
|
||||
$this->view->position[] = $this->lang->task->edit;
|
||||
$this->view->stories = $this->story->getProjectStoryPairs($this->view->project->id);
|
||||
$this->view->tasks = $this->task->getParentTaskPairs($this->view->project->id);
|
||||
$this->view->tasks = $tasks;
|
||||
$this->view->users = $this->loadModel('user')->getPairs('nodeleted', "{$this->view->task->openedBy},{$this->view->task->canceledBy},{$this->view->task->closedBy}");
|
||||
$this->view->modules = $this->tree->getTaskOptionMenu($this->view->task->project);
|
||||
$this->display();
|
||||
|
||||
@@ -34,8 +34,7 @@
|
||||
<?php endif;?>
|
||||
</div>
|
||||
</div>
|
||||
<?php $isOnlybody = helper::inOnlyBodyMode(); ?>
|
||||
<?php if(!$isOnlybody):?>
|
||||
<?php if(!isonlybody()):?>
|
||||
<div class="btn-toolbar pull-right">
|
||||
<?php
|
||||
$checkObject = new stdclass();
|
||||
|
||||
@@ -44,8 +44,7 @@
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php $isOnlybody = helper::inOnlyBodyMode(); ?>
|
||||
<?php if(!$isOnlybody):?>
|
||||
<?php if(!isonlybody()):?>
|
||||
<div class='btn-toolbar pull-right'>
|
||||
<?php common::printLink('testcase', 'create', "productID={$case->product}&branch={$case->branch}&moduleID={$case->module}", "<i class='icon icon-plus'></i>" . $lang->testcase->create, '', "class='btn btn-primary'"); ?>
|
||||
</div>
|
||||
|
||||
@@ -451,12 +451,11 @@ class testtask extends control
|
||||
{
|
||||
$changes = $this->testtask->update($taskID);
|
||||
if(dao::isError()) die(js::error(dao::getError()));
|
||||
if($changes)
|
||||
if($changes or $this->post->comment)
|
||||
{
|
||||
$actionID = $this->loadModel('action')->create('testtask', $taskID, 'edited');
|
||||
$actionID = $this->loadModel('action')->create('testtask', $taskID, 'edited', $this->post->comment);
|
||||
$this->action->logHistory($actionID, $changes);
|
||||
}
|
||||
if($this->post->comment != '') $actionID = $this->action->create('testtask', $taskID, 'Commented', $this->post->comment);
|
||||
die(js::locate(inlink('view', "taskID=$taskID"), 'parent'));
|
||||
}
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ js::set('type', $type);
|
||||
</div>
|
||||
<div class='modal-body'>
|
||||
<form action="<?php echo inlink('edit', 'module=' . $module->id .'&type=' .$type);?>" target='hiddenwin' method='post' class='mt-10px' id='dataform'>
|
||||
<table class='table table-form'>
|
||||
<table class='table table-form'>
|
||||
<?php if($showProduct):?>
|
||||
<tr>
|
||||
<th class='w-80px'><?php echo $lang->tree->product;?></th>
|
||||
@@ -51,12 +51,12 @@ js::set('type', $type);
|
||||
<tr>
|
||||
<th class='w-80px'><?php echo $lang->tree->owner;?></th>
|
||||
<td><?php echo html::select('owner', $users, $module->owner, "class='form-control chosen'", true);?></td>
|
||||
</tr>
|
||||
</tr>
|
||||
<?php endif;?>
|
||||
<tr>
|
||||
<th><?php echo $lang->tree->short;?></th>
|
||||
<td><?php echo html::input('short', $module->short, "class='form-control' autocomplete='off'");?></td>
|
||||
</tr>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan='2' class='text-center'>
|
||||
<?php echo html::submitButton();?>
|
||||
@@ -96,13 +96,20 @@ $(function()
|
||||
})
|
||||
function loadDocModule(libID)
|
||||
{
|
||||
link = createLink('doc', 'ajaxGetChild', 'libID=' + libID + '&type=parent');
|
||||
var link = createLink('doc', 'ajaxGetChild', 'libID=' + libID + '&type=parent');
|
||||
$.post(link, function(data)
|
||||
{
|
||||
$('#parent').replaceWith(data);
|
||||
$('#parent_chosen').remove();
|
||||
$('#parent').chosen();
|
||||
})
|
||||
{
|
||||
$('#parent').empty().append($(data).children()).trigger('chosen:updated');
|
||||
});
|
||||
}
|
||||
$(function(){$('.chosen').chosen();})
|
||||
$(function()
|
||||
{
|
||||
$('#dataform .chosen').chosen();
|
||||
|
||||
// hide #parent chosen dropdown on root dropdown show
|
||||
$('#root').on('chosen:showing_dropdown', function()
|
||||
{
|
||||
$('#parent').trigger('chosen:close');
|
||||
});
|
||||
})
|
||||
</script>
|
||||
|
||||
@@ -2560,12 +2560,8 @@ class upgradeModel extends model
|
||||
|
||||
if(strpos($value->value, 'finishedDate') === false) return;
|
||||
|
||||
$values = explode(',', $value->value);
|
||||
foreach($values as $id => $value)
|
||||
{
|
||||
if($value == 'finishedDate') unset($values[$id]);
|
||||
}
|
||||
$value = implode(',', $values);
|
||||
$value = ',' . $value->value . ',';
|
||||
$value = trim(str_replace(',finishedDate,', '', $value), ',');
|
||||
|
||||
$this->dao->update(TABLE_CONFIG)->set('`value`')->eq($value)
|
||||
->where('`module`')->eq('task')
|
||||
|
||||
Reference in New Issue
Block a user