diff --git a/module/doc/config.php b/module/doc/config.php index 738fdf9289..888bc9bfb6 100644 --- a/module/doc/config.php +++ b/module/doc/config.php @@ -2,13 +2,13 @@ global $lang; $config->doc = new stdclass(); -$config->doc->createLib = new stdclass(); -$config->doc->editLib = new stdclass(); +$config->doc->createlib = new stdclass(); +$config->doc->editlib = new stdclass(); $config->doc->create = new stdclass(); $config->doc->edit = new stdclass(); -$config->doc->createLib->requiredFields = 'name'; -$config->doc->editLib->requiredFields = 'name'; +$config->doc->createlib->requiredFields = 'name'; +$config->doc->editlib->requiredFields = 'name'; $config->doc->create->requiredFields = 'title'; $config->doc->edit->requiredFields = 'title'; diff --git a/module/doc/css/createlib.css b/module/doc/css/createlib.css index e69de29bb2..d5f518687f 100644 --- a/module/doc/css/createlib.css +++ b/module/doc/css/createlib.css @@ -0,0 +1,3 @@ +form {margin-right: 30px;} + +#whiteListBox div.input-group {margin-bottom: 2px;} diff --git a/module/doc/css/editlib.css b/module/doc/css/editlib.css index 8b13789179..afb55c8159 100644 --- a/module/doc/css/editlib.css +++ b/module/doc/css/editlib.css @@ -1 +1,5 @@ +form {margin-right: 30px;} +.chosen-container .chosen-results {max-height: 180px;} + +#whiteListBox div.input-group {margin-bottom: 2px;} diff --git a/module/doc/model.php b/module/doc/model.php index 8dccc428cd..e8cb9f8134 100644 --- a/module/doc/model.php +++ b/module/doc/model.php @@ -237,7 +237,7 @@ class docModel extends model if($lib->acl == 'private') $lib->users = $this->app->user->account; $this->dao->insert(TABLE_DOCLIB)->data($lib)->autoCheck() - ->batchCheck('name', 'notempty') + ->batchCheck($this->config->doc->createlib->requiredFields, 'notempty') ->exec(); return $this->dao->lastInsertID(); @@ -261,7 +261,7 @@ class docModel extends model $lib->users = $libCreatedBy ? $libCreatedBy : $this->app->user->account; } $this->dao->update(TABLE_DOCLIB)->data($lib)->autoCheck() - ->batchCheck('name', 'notempty') + ->batchCheck($this->config->doc->editlib->requiredFields, 'notempty') ->where('id')->eq($libID) ->exec(); if(!dao::isError()) return common::createChanges($oldLib, $lib); diff --git a/module/doc/view/objectlibs.html.php b/module/doc/view/objectlibs.html.php index 48efa281e8..ca9465809a 100644 --- a/module/doc/view/objectlibs.html.php +++ b/module/doc/view/objectlibs.html.php @@ -73,8 +73,8 @@
", 'hiddenwin', "title='{$collectTitle}' class='btn btn-link'")?> ", '', "title='{$lang->edit}' class='btn btn-link iframe'")?> - ", 'hiddenwin', "title='{$lang->delete}' class='btn btn-link'")?> - ", '', "title='{$lang->tree->manage}' class='btn btn-link'")?> + main)) common::printLink('doc', 'deleteLib', "libID=$libID", "", 'hiddenwin', "title='{$lang->delete}' class='btn btn-link'")?> + ", '', "title='{$lang->doc->manageType}' class='btn btn-link'")?>
diff --git a/module/project/css/view.css b/module/project/css/view.css index c01cadeb57..43675ad00b 100644 --- a/module/project/css/view.css +++ b/module/project/css/view.css @@ -1,3 +1,5 @@ +.block-burn .panel-body{margin-top: 20px;} + #burnWrapper {max-width: 400px; margin: 0 auto; padding: 8px; position: relative;} #burnYUnit {position: absolute; color: #CBD0DB; top: -10px; left: 10px;} #burnLegend {position: absolute; right: 0; width: 80px; height: 40px; top: 0; margin-top: -20px; line-height: 20px; color: #838A9D; font-size: 12px;} diff --git a/module/project/js/tree.js b/module/project/js/tree.js index 42ca6e3b16..6647669151 100644 --- a/module/project/js/tree.js +++ b/module/project/js/tree.js @@ -11,17 +11,22 @@ $(function() // 根据列表展开树形列表 var showTreeLevel = function(level) { + $('.btn-tree-view').removeClass('btn-active-text'); + if (level === 'root') { + $('[data-type=root]').addClass('btn-active-text'); taskTree.collapse(); } else if (level === 'all') { + $('[data-type=all]').addClass('btn-active-text'); taskTree.collapse(); taskTree.expand($taskTree.find('li.has-list'), true); } else if (level === 'task') { + $('[data-type=task]').addClass('btn-active-text'); taskTree.collapse(); taskTree.show($taskTree.find('li.item-task').parent().parent(), true); } @@ -29,13 +34,15 @@ $(function() { taskTree.collapse(); taskTree.show($taskTree.find('li.item-story').parent().parent(), true); + $('[data-type=story]').addClass('btn-active-text'); } $('#main').toggleClass('tree-show-root', level === 'root'); }; $(document).on('click', '.btn-tree-view', function() { - showTreeLevel($(this).data('type')); + showTreeLevel($(this).data('type')); + return false; }); // 第一次访问时,展示所以节点 diff --git a/module/project/model.php b/module/project/model.php index 1e731bcadc..2d01fefcd0 100644 --- a/module/project/model.php +++ b/module/project/model.php @@ -2758,23 +2758,23 @@ class projectModel extends model case 'module': $this->app->loadLang('tree'); $html .= "
  • "; - $html .= '' . (empty($tree->parent) ? $this->lang->tree->module : $this->lang->tree->child) . '' . $tree->name . ''; + $html .= '' . (empty($tree->parent) ? $this->lang->tree->module : $this->lang->tree->child) . "" . $tree->name . ''; break; case 'task': $link = helper::createLink('project', 'treeTask', "taskID={$tree->id}"); $html .= '
  • '; - $html .= '' . $tree->id . '' . (empty($tree->parent) ? $this->lang->task->common : $this->lang->task->children) . '' . $tree->title . ' ' . (empty($tree->assignedTo) ? $tree->openedBy : $tree->assignedTo) . ''; + $html .= '' . $tree->id . '' . (empty($tree->parent) ? $this->lang->task->common : $this->lang->task->children) . "" . $tree->title . ' ' . (empty($tree->assignedTo) ? $tree->openedBy : $tree->assignedTo) . ''; break; case 'product': $this->app->loadLang('product'); $html .= '
  • '; - $html .= '' . $this->lang->productCommon . '' . $tree->name . ''; + $html .= '' . $this->lang->productCommon . "" . $tree->name . ''; break; case 'story': $this->app->loadLang('story'); $link = helper::createLink('project', 'treeStory', "storyID={$tree->storyId}"); $html .= '
  • '; - $html .= '' . $tree->storyId . '' . $this->lang->story->common . '' . $tree->title . ' ' . (empty($tree->assignedTo) ? $tree->openedBy : $tree->assignedTo) . ''; + $html .= '' . $tree->storyId . '' . $this->lang->story->common . "" . $tree->title . ' ' . (empty($tree->assignedTo) ? $tree->openedBy : $tree->assignedTo) . ''; break; } if(isset($tree->children)) diff --git a/module/project/view/tree.html.php b/module/project/view/tree.html.php index b9d57cb38f..60a9d4bb5a 100644 --- a/module/project/view/tree.html.php +++ b/module/project/view/tree.html.php @@ -19,7 +19,7 @@ if($name == 'root') $icon = ' '; if($name == 'all') $icon = ' '; ?> - +
    diff --git a/module/project/view/treestory.html.php b/module/project/view/treestory.html.php index 58f0fddd44..3d912074f4 100644 --- a/module/project/view/treestory.html.php +++ b/module/project/view/treestory.html.php @@ -3,8 +3,8 @@
    story->statusList[$story->status];?> - story->stage;?>: story->stageList[$story->stage];?> - story->estimate;?>: estimate;?> + story->stage;?> story->stageList[$story->stage];?> + story->estimate;?> estimate;?>
    story->legendSpec;?>
    -
    spec;?>
    +
    + spec) ? $story->spec : "
    " . $lang->noData . '
    ';?> +
    story->legendVerify;?>
    -
    verify;?>
    +
    + verify) ? $story->verify : "
    " . $lang->noData . '
    ';?> +
    fetch('file', 'printFiles', array('files' => $story->files, 'fieldset' => 'true'));?> @@ -40,7 +44,7 @@ type != 'normal'):?> - product->branch;?> + product->branch, zget($lang->product->branchName, $product->type));?> product&branch=$story->branch", $branches[$story->branch]);?> @@ -75,25 +79,29 @@ story->plan;?> - planTitle)) - { - foreach($story->planTitle as $planID => $planTitle) - { - if(!common::printLink('productplan', 'view', "planID=$planID", $planTitle)) echo $lanTitle; - echo '
    '; - } - } - ?> + planTitle)) + { + foreach($story->planTitle as $planID => $planTitle) + { + if(!common::printLink('productplan', 'view', "planID=$planID", $planTitle)) echo $lanTitle; + echo '
    '; + } + } + else + { + echo $lang->noData; + } + ?> story->source;?> - story->sourceList[$story->source];?> + source ? $lang->story->sourceList[$story->source] : $lang->noData;?> story->sourceNote;?> - sourceNote;?> + sourceNote ? $story->sourceNote : $lang->noData;?> story->status;?> @@ -116,7 +124,13 @@ story->pri;?> - pri;?>' title='story->priList, $story->pri)?>'>story->priList, $story->pri)?> + + pri):?> + pri;?>' title='story->priList, $story->pri)?>'>story->priList, $story->pri)?> + + noData;?> + + story->estimate;?> @@ -124,11 +138,26 @@ story->keywords;?> - keywords;?> + keywords ? $story->keywords : $lang->noData;?> story->legendMailto;?> - mailto); foreach($mailto as $account) {if(empty($account)) continue; echo "" . $users[trim($account)] . '  '; }?> + + mailto); + if(empty($mainto)) + { + echo $lang->noData; + } + else + { + foreach($mailto as $account) + { + if(empty($account)) continue; echo "" . $users[trim($account)] . '  '; + } + } + ?> + @@ -139,25 +168,25 @@ story->legendProjectAndTask;?>
      - tasks as $projectTasks) - { - foreach($projectTasks as $task) - { - if(!isset($projects[$task->project])) continue; - $projectName = $projects[$task->project]; - echo "
    • " . html::a($this->createLink('task', 'view', "taskID=$task->id", '', true), "#$task->id $task->name", '', "class='iframe' data-width='80%'"); - echo html::a($this->createLink('project', 'browse', "projectID=$task->project"), $projectName, '', "class='text-muted'") . '
    • '; - } - } - if(count($story->tasks) == 0) - { - foreach($story->projects as $projectID => $project) - { - echo "
    • " . html::a($this->createLink('project', 'browse', "projectID=$projectID"), $project->name, '', "class='text-muted'") . '
    • '; - } - } - ?> + tasks as $projectTasks) + { + foreach($projectTasks as $task) + { + if(!isset($projects[$task->project])) continue; + $projectName = $projects[$task->project]; + echo "
    • " . html::a($this->createLink('task', 'view', "taskID=$task->id", '', true), "#$task->id $task->name", '', "class='iframe' data-width='80%'"); + echo html::a($this->createLink('project', 'browse', "projectID=$task->project"), $projectName, '', "class='text-muted'") . '
    • '; + } + } + if(count($story->tasks) == 0) + { + foreach($story->projects as $projectID => $project) + { + echo "
    • " . html::a($this->createLink('project', 'browse', "projectID=$projectID"), $project->name, '', "class='text-muted'") . '
    • '; + } + } + ?>
    @@ -167,70 +196,86 @@
    - global->flow != 'onlyStory'):?> - - - - - - + global->flow != 'onlyStory'):?> + + + + + + - + @@ -249,35 +294,47 @@ - + - + - + - + - +
    story->legendFromBug;?> -
      - id $fromBug->title'>" . html::a($this->createLink('bug', 'view', "bugID=$fromBug->id"), "#$fromBug->id $fromBug->title") . '';?> -
    -
    story->legendFromBug;?> +
      + id $fromBug->title'>" . html::a($this->createLink('bug', 'view', "bugID=$fromBug->id"), "#$fromBug->id $fromBug->title") . '';?> +
    +
    story->legendBugs;?> + + noData;?> +
      - id $bug->title'>" . html::a($this->createLink('bug', 'view', "bugID=$bug->id"), "#$bug->id $bug->title") . ''; - } - ?> + id $bug->title'>" . html::a($this->createLink('bug', 'view', "bugID=$bug->id"), "#$bug->id $bug->title") . ''; + } + ?>
    +
    story->legendCases;?> + + noData;?> +
      - id $case->title'>" . html::a($this->createLink('testcase', 'view', "caseID=$case->id"), "#$case->id $case->title") . ''; - } - ?> + id $case->title'>" . html::a($this->createLink('testcase', 'view', "caseID=$case->id"), "#$case->id $case->title") . ''; + } + ?>
    +
    story->legendLinkStories;?>story->legendLinkStories;?> + linkStories);?> + + noData;?> +
      - linkStories) ; - foreach($linkStories as $linkStoryID) - { - if(isset($story->extraStories[$linkStoryID])) echo '
    • ' . html::a(inlink('view', "storyID=$linkStoryID"), "#$linkStoryID " . $story->extraStories[$linkStoryID]) . '
    • '; - } - ?> + extraStories[$linkStoryID])) echo '
    • ' . html::a($this->createLink('story', 'view', "storyID=$linkStoryID"), "#$linkStoryID " . $story->extraStories[$linkStoryID]) . '
    • '; + } + ?>
    +
    story->legendChildStories;?> + childStories);?> + + noData;?> +
      - childStories) ; - foreach($childStories as $childStoryID) - { - if(isset($story->extraStories[$childStoryID])) echo '
    • ' . html::a(inlink('view', "storyID=$childStoryID"), "#$childStoryID " . $story->extraStories[$childStoryID]) . '
    • '; - } - ?> + extraStories[$childStoryID])) echo '
    • ' . html::a($this->createLink('story', 'view', "storyID=$childStoryID"), "#$childStoryID " . $story->extraStories[$childStoryID]) . '
    • '; + } + ?>
    +
    story->assignedTo;?>assignedTo) echo $users[$story->assignedTo] . $lang->at . $story->assignedDate;?>assignedTo ? $users[$story->assignedTo] . $lang->at . $story->assignedDate : $lang->noData;?>
    story->reviewedBy;?>reviewedBy); foreach($reviewedBy as $account) echo ' ' . $users[trim($account)]; ?> + reviewedBy); + if(count($reviewedBy) < 2) + { + echo $lang->noData; + } + else + { + foreach($reviewedBy as $account) echo ' ' . $users[trim($account)]; + } + ?> +
    story->reviewedDate;?>reviewedBy) echo $story->reviewedDate;?>reviewedBy ? $story->reviewedDate : $lang->noData;?>
    story->closedBy;?>closedBy) echo $users[$story->closedBy] . $lang->at . $story->closedDate;?>closedBy ? $users[$story->closedBy] . $lang->at . $story->closedDate : $lang->noData;?>
    story->closedReason;?> - closedReason) echo $lang->story->reasonList[$story->closedReason]; - if(isset($story->extraStories[$story->duplicateStory])) - { - echo html::a(inlink('view', "storyID=$story->duplicateStory"), '#' . $story->duplicateStory . ' ' . $story->extraStories[$story->duplicateStory]); - } - ?> + closedReason ? $lang->story->reasonList[$story->closedReason] : $lang->noData; + if(isset($story->extraStories[$story->duplicateStory])) + { + echo html::a(inlink('view', "storyID=$story->duplicateStory"), '#' . $story->duplicateStory . ' ' . $story->extraStories[$story->duplicateStory]); + } + ?>
    story->lastEditedBy;?>lastEditedBy) echo $users[$story->lastEditedBy] . $lang->at . $story->lastEditedDate;?>lastEditedBy ? $users[$story->lastEditedBy] . $lang->at . $story->lastEditedDate : $lang->noData;?>
    diff --git a/module/project/view/treetask.html.php b/module/project/view/treetask.html.php index 96e243f89f..85d6e76618 100644 --- a/module/project/view/treetask.html.php +++ b/module/project/view/treetask.html.php @@ -16,8 +16,8 @@ task->left;?> left . $lang->workingHour;?>
    - task->type;?>: task->typeList[$task->type];?> - task->deadline;?>: deadline; if(isset($task->delay)) printf($lang->task->delayWarning, $task->delay);?> + task->type;?> task->typeList[$task->type];?> + task->deadline;?> deadline; if(isset($task->delay)) printf($lang->task->delayWarning, $task->delay);?>