diff --git a/module/common/view/datatable.fix.html.php b/module/common/view/datatable.fix.html.php index 6ed9254b0d..fbb3031a4e 100644 --- a/module/common/view/datatable.fix.html.php +++ b/module/common/view/datatable.fix.html.php @@ -17,7 +17,15 @@ $(function() datatable->$datatableId->mode) ? $config->datatable->$datatableId->mode : 'table';?> var $dropdown = $(''); var $dropmenu = $(''); - $dropmenu.append("
  • datatable->custom?>
  • "); + if(typeof(storyType) != 'undefined' && storyType == 'requirement') + { + $dropmenu.append("
  • ' data-toggle='modal' data-type='ajax'>datatable->custom?>
  • "); + } + else + { + $dropmenu.append("
  • datatable->custom?>
  • "); + + } $dropmenu.append("
  • \", true);' id='switchToDatatable'>datatable->switchToDatatable : $lang->datatable->switchToTable;?>
  • "); $dropdown.append($dropmenu).appendTo($btnToolbar); } diff --git a/module/datatable/control.php b/module/datatable/control.php index 4c2b53230b..6707a493bf 100644 --- a/module/datatable/control.php +++ b/module/datatable/control.php @@ -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 - * @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 */ diff --git a/module/product/control.php b/module/product/control.php index 5996b5b15f..7a4b1c24bb 100644 --- a/module/product/control.php +++ b/module/product/control.php @@ -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. */ diff --git a/module/product/view/browse.html.php b/module/product/view/browse.html.php index f9c941754e..52255f52fe 100644 --- a/module/product/view/browse.html.php +++ b/module/product/view/browse.html.php @@ -402,24 +402,27 @@ $projectIDParam = $isProjectStory ? "projectID=$projectID&" : ''; echo ''; } - if($canBatchChangeStage) + if($storyType == 'story') { - echo "'; - } - else - { - $class= "class='disabled'"; - echo "
  • " . html::a('javascript:;', $lang->story->stageAB, '', $class) . '
  • '; } ?> diff --git a/module/qa/model.php b/module/qa/model.php index 0737fccc04..7635bf30d5 100644 --- a/module/qa/model.php +++ b/module/qa/model.php @@ -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); } diff --git a/module/story/control.php b/module/story/control.php index f921378519..70759ad1da 100644 --- a/module/story/control.php +++ b/module/story/control.php @@ -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; } } diff --git a/module/story/model.php b/module/story/model.php index e057aafc49..8277649b58 100644 --- a/module/story/model.php +++ b/module/story/model.php @@ -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); } diff --git a/module/story/view/view.html.php b/module/story/view/view.html.php index 869350d735..8d3282d80e 100644 --- a/module/story/view/view.html.php +++ b/module/story/view/view.html.php @@ -318,6 +318,7 @@ story->status;?> processStatus('story', $story);?> + type != 'requirement'):?> story->stage;?> @@ -333,6 +334,7 @@ ?> + story->pri;?> pri;?>' title='story->priList, $story->pri)?>'>story->priList, $story->pri)?> diff --git a/module/task/js/batchcreate.js b/module/task/js/batchcreate.js index dd2ff4963f..bc3669ef4b 100755 --- a/module/task/js/batchcreate.js +++ b/module/task/js/batchcreate.js @@ -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); diff --git a/module/task/view/batchcreate.html.php b/module/task/view/batchcreate.html.php index 0c0b3a886c..c762761c8b 100644 --- a/module/task/view/batchcreate.html.php +++ b/module/task/view/batchcreate.html.php @@ -200,5 +200,6 @@ task->ditto);?> + diff --git a/module/upgrade/model.php b/module/upgrade/model.php index 10d5310de1..3a323df66d 100644 --- a/module/upgrade/model.php +++ b/module/upgrade/model.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; }