Merge branch '15.0.beta3' of https://gitlab.zcorp.cc/easycorp/zentaopms into 15.0.beta3
This commit is contained in:
@@ -17,7 +17,15 @@ $(function()
|
||||
<?php $mode = isset($config->datatable->$datatableId->mode) ? $config->datatable->$datatableId->mode : 'table';?>
|
||||
var $dropdown = $('<div class="dropdown"><button id="tableCustomBtn" type="button" class="btn btn-link" data-toggle="dropdown"><i class="icon-cog-outline"></i></button></div>');
|
||||
var $dropmenu = $('<ul class="dropdown-menu pull-right"></ul>');
|
||||
$dropmenu.append("<li><a href='<?php echo $this->createLink('datatable', 'ajaxCustom', 'id=' . $this->moduleName . '&method=' . $this->methodName)?>' data-toggle='modal' data-type='ajax'><?php echo $lang->datatable->custom?></a></li>");
|
||||
if(typeof(storyType) != 'undefined' && storyType == 'requirement')
|
||||
{
|
||||
$dropmenu.append("<li><a href='<?php echo $this->createLink('datatable', 'ajaxCustom', 'id=' . $this->moduleName . '&method=' . $this->methodName . '&extra=requirement')?>' data-toggle='modal' data-type='ajax'><?php echo $lang->datatable->custom?></a></li>");
|
||||
}
|
||||
else
|
||||
{
|
||||
$dropmenu.append("<li><a href='<?php echo $this->createLink('datatable', 'ajaxCustom', 'id=' . $this->moduleName . '&method=' . $this->methodName)?>' data-toggle='modal' data-type='ajax'><?php echo $lang->datatable->custom?></a></li>");
|
||||
|
||||
}
|
||||
$dropmenu.append("<li><a href='javascript:saveDatatableConfig(\"mode\", \"<?php echo $mode == 'table' ? 'datatable' : 'table';?>\", true);' id='switchToDatatable'><?php echo $mode == 'table' ? $lang->datatable->switchToDatatable : $lang->datatable->switchToTable;?></a></li>");
|
||||
$dropdown.append($dropmenu).appendTo($btnToolbar);
|
||||
}
|
||||
|
||||
@@ -3,17 +3,17 @@
|
||||
* The view file of datatable module of ZenTaoPMS.
|
||||
*
|
||||
* @copyright Copyright 2014-2014 青岛易软天创网络科技有限公司 (QingDao Nature Easy Soft Network Technology Co,LTD www.cnezsoft.com)
|
||||
* @license business(商业软件)
|
||||
* @license business(商业软件)
|
||||
* @author Hao sun <sunhao@cnezsoft.com>
|
||||
* @package datatable
|
||||
* @package datatable
|
||||
* @version $Id$
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
class datatable extends control
|
||||
{
|
||||
/**
|
||||
* Construct function, set menu.
|
||||
*
|
||||
* Construct function, set menu.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
@@ -24,7 +24,7 @@ class datatable extends control
|
||||
|
||||
/**
|
||||
* Save config
|
||||
*
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
@@ -47,13 +47,14 @@ class datatable extends control
|
||||
|
||||
/**
|
||||
* custom fields.
|
||||
*
|
||||
* @param string $module
|
||||
* @param string $method
|
||||
*
|
||||
* @param string $module
|
||||
* @param string $method
|
||||
* @param string $extra
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function ajaxCustom($module, $method)
|
||||
public function ajaxCustom($module, $method, $extra = '')
|
||||
{
|
||||
$target = $module . ucfirst($method);
|
||||
$mode = isset($this->config->datatable->$target->mode) ? $this->config->datatable->$target->mode : 'table';
|
||||
@@ -85,17 +86,24 @@ class datatable extends control
|
||||
$setting = json_encode($this->config->$module->datatable->defaultField);
|
||||
}
|
||||
|
||||
$this->view->cols = $this->datatable->getFieldList($module);
|
||||
$cols = $this->datatable->getFieldList($module);
|
||||
if($extra == 'requirement')
|
||||
{
|
||||
unset($cols['plan']);
|
||||
unset($cols['stage']);
|
||||
}
|
||||
|
||||
$this->view->cols = $cols;
|
||||
$this->view->setting = $setting;
|
||||
$this->display();
|
||||
}
|
||||
|
||||
/**
|
||||
* Ajax reset cols
|
||||
*
|
||||
* @param string $module
|
||||
* @param string $method
|
||||
* @param string $confirm
|
||||
*
|
||||
* @param string $module
|
||||
* @param string $method
|
||||
* @param string $confirm
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
|
||||
@@ -248,6 +248,7 @@ class product extends control
|
||||
$this->lang->story->create = str_replace($this->lang->SRCommon, $this->lang->URCommon, $this->lang->story->create);
|
||||
$this->config->product->search['fields']['title'] = $this->lang->story->title;
|
||||
unset($this->config->product->search['fields']['plan']);
|
||||
unset($this->config->product->search['fields']['stage']);
|
||||
}
|
||||
|
||||
/* Build search form. */
|
||||
|
||||
@@ -402,24 +402,27 @@ $projectIDParam = $isProjectStory ? "projectID=$projectID&" : '';
|
||||
echo '</div></li>';
|
||||
}
|
||||
|
||||
if($canBatchChangeStage)
|
||||
if($storyType == 'story')
|
||||
{
|
||||
echo "<li class='dropdown-submenu'>";
|
||||
echo html::a('javascript:;', $lang->story->stageAB, '', "id='stageItem'");
|
||||
echo "<ul class='dropdown-menu'>";
|
||||
foreach($lang->story->stageList as $key => $stage)
|
||||
if($canBatchChangeStage)
|
||||
{
|
||||
if(empty($key)) continue;
|
||||
if(strpos('tested|verified|released|closed', $key) === false) continue;
|
||||
$actionLink = $this->createLink('story', 'batchChangeStage', "stage=$key");
|
||||
echo "<li>" . html::a('#', $stage, '', "onclick=\"setFormAction('$actionLink', 'hiddenwin')\"") . "</li>";
|
||||
echo "<li class='dropdown-submenu'>";
|
||||
echo html::a('javascript:;', $lang->story->stageAB, '', "id='stageItem'");
|
||||
echo "<ul class='dropdown-menu'>";
|
||||
foreach($lang->story->stageList as $key => $stage)
|
||||
{
|
||||
if(empty($key)) continue;
|
||||
if(strpos('tested|verified|released|closed', $key) === false) continue;
|
||||
$actionLink = $this->createLink('story', 'batchChangeStage', "stage=$key");
|
||||
echo "<li>" . html::a('#', $stage, '', "onclick=\"setFormAction('$actionLink', 'hiddenwin')\"") . "</li>";
|
||||
}
|
||||
echo '</ul></li>';
|
||||
}
|
||||
else
|
||||
{
|
||||
$class= "class='disabled'";
|
||||
echo "<li $class>" . html::a('javascript:;', $lang->story->stageAB, '', $class) . '</li>';
|
||||
}
|
||||
echo '</ul></li>';
|
||||
}
|
||||
else
|
||||
{
|
||||
$class= "class='disabled'";
|
||||
echo "<li $class>" . html::a('javascript:;', $lang->story->stageAB, '', $class) . '</li>';
|
||||
}
|
||||
?>
|
||||
</ul>
|
||||
|
||||
@@ -24,6 +24,7 @@ class qaModel extends model
|
||||
public function setMenu($products, $productID, $branch = 0, $extra = '')
|
||||
{
|
||||
if(!in_array($this->app->rawModule, $this->config->qa->noDropMenuModule)) $this->lang->switcherMenu = $this->loadModel('product')->getSwitcher($productID, $extra, $branch);
|
||||
if($this->app->rawModule == 'product' and $this->app->rawMethod == 'showerrornone') $this->lang->switcherMenu = '';
|
||||
common::setMenuVars('qa', $productID);
|
||||
}
|
||||
|
||||
|
||||
@@ -749,7 +749,9 @@ class story extends control
|
||||
if($storyType == 'requirement')
|
||||
{
|
||||
unset($customFields['plan']);
|
||||
$showFields = str_replace('plan', '', $showFields);
|
||||
unset($customFields['stage']);
|
||||
$showFields = str_replace('plan', '', $showFields);
|
||||
$showFields = str_replace('stage', '', $showFields);
|
||||
}
|
||||
$this->view->customFields = $customFields;
|
||||
$this->view->showFields = $showFields;
|
||||
@@ -1907,18 +1909,23 @@ class story extends control
|
||||
unset($stories[$story->id]);
|
||||
}
|
||||
}
|
||||
|
||||
if(!empty($children))
|
||||
{
|
||||
$position = 0;
|
||||
$reorderStory = array();
|
||||
foreach($stories as $story)
|
||||
{
|
||||
$position ++;
|
||||
$reorderStory[$story->id] = $story;
|
||||
if(isset($children[$story->id]))
|
||||
{
|
||||
array_splice($stories, $position, 0, $children[$story->id]);
|
||||
$position += count($children[$story->id]);
|
||||
foreach($children[$story->id] as $childrenID => $childrenStory)
|
||||
{
|
||||
$reorderStory[$childrenID] = $childrenStory;
|
||||
}
|
||||
}
|
||||
unset($stories[$story->id]);
|
||||
}
|
||||
$stories = $reorderStory;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1068,7 +1068,7 @@ class storyModel extends model
|
||||
if($oldStory->plan != $story->plan) $this->updateStoryOrderOfPlan($storyID, $story->plan, $oldStory->plan);
|
||||
|
||||
$this->executeHooks($storyID);
|
||||
$this->batchChangeStage(array($storyID), $story->stage);
|
||||
if($story->type == 'story') $this->batchChangeStage(array($storyID), $story->stage);
|
||||
if($story->closedReason == 'done') $this->loadModel('score')->create('story', 'close');
|
||||
$allChanges[$storyID] = common::createChanges($oldStory, $story);
|
||||
}
|
||||
|
||||
@@ -318,6 +318,7 @@
|
||||
<th><?php echo $lang->story->status;?></th>
|
||||
<td><span class='status-story status-<?php echo $story->status?>'><span class="label label-dot"></span> <?php echo $this->processStatus('story', $story);?></span></td>
|
||||
</tr>
|
||||
<?php if($story->type != 'requirement'):?>
|
||||
<tr class='stage-line'>
|
||||
<th><?php echo $lang->story->stage;?></th>
|
||||
<td>
|
||||
@@ -333,6 +334,7 @@
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endif;?>
|
||||
<tr>
|
||||
<th><?php echo $lang->story->pri;?></th>
|
||||
<td><span class='label-pri <?php echo 'label-pri-' . $story->pri;?>' title='<?php echo zget($lang->story->priList, $story->pri)?>'><?php echo zget($lang->story->priList, $story->pri)?></span></td>
|
||||
|
||||
@@ -194,7 +194,15 @@ $(document).on('mousedown', 'select', function()
|
||||
$(function()
|
||||
{
|
||||
/* Adjust width for ie chosen width. */
|
||||
var chosenWidth = $('#module1_chosen').width();
|
||||
if(!hiddenStory)
|
||||
{
|
||||
var chosenWidth = $('#module1_chosen').width();
|
||||
}
|
||||
else
|
||||
{
|
||||
var chosenWidth = 170;
|
||||
}
|
||||
|
||||
$('.chosen-container[id^=module]').width(chosenWidth);
|
||||
$('.chosen-container[id^=module]').css('max-width', chosenWidth);
|
||||
|
||||
|
||||
@@ -200,5 +200,6 @@
|
||||
<?php js::set('mainField', 'name');?>
|
||||
<?php js::set('ditto', $lang->task->ditto);?>
|
||||
<?php js::set('storyID', $storyID);?>
|
||||
<?php js::set('hiddenStory', $hiddenStory);?>
|
||||
<?php include '../../common/view/pastetext.html.php';?>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
|
||||
@@ -2790,7 +2790,7 @@ class upgradeModel extends model
|
||||
$fromVersion = $this->config->installedVersion;
|
||||
$needProcess = array();
|
||||
if(strpos($fromVersion, 'max') === false and strpos($fromVersion, 'biz') === false and (strpos($fromVersion, 'pro') === false ? version_compare($fromVersion, '8.3', '<') : version_compare($fromVersion, 'pro5.4', '<'))) $needProcess['updateFile'] = true;
|
||||
if(strpos($fromVersion, 'max') === false)
|
||||
if(strpos($fromVersion, 'max') === false and $this->config->systemMode == 'new')
|
||||
{
|
||||
if(strpos($fromVersion, 'pro') !== false and version_compare($fromVersion, 'pro10.0', '<'))
|
||||
{
|
||||
@@ -2800,7 +2800,7 @@ class upgradeModel extends model
|
||||
{
|
||||
$needProcess['search'] = true;
|
||||
}
|
||||
elseif(version_compare($fromVersion, '15.0', '<'))
|
||||
elseif(version_compare($fromVersion, '15.0.rc1', '<'))
|
||||
{
|
||||
$needProcess['search'] = true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user