diff --git a/module/action/lang/zh-cn.php b/module/action/lang/zh-cn.php index 0982cb1fee..ddc7c9f487 100755 --- a/module/action/lang/zh-cn.php +++ b/module/action/lang/zh-cn.php @@ -25,6 +25,7 @@ $lang->action->undelete = '还原'; $lang->action->hideOne = '隐藏'; $lang->action->hideAll = '全部隐藏'; $lang->action->editComment = '修改备注'; +$lang->action->create = '添加备注'; $lang->action->comment = '备注'; $lang->action->trashTips = '提示:为了保证系统的完整性,禅道系统的删除都是标记删除。'; diff --git a/module/block/view/dashboard.html.php b/module/block/view/dashboard.html.php index 8d472a632b..088535fc2a 100644 --- a/module/block/view/dashboard.html.php +++ b/module/block/view/dashboard.html.php @@ -107,7 +107,7 @@ config.confirmRemoveBlock = 'block->confirmRemoveBlock; ?>'; var module = ''; var useGuest = ; -$('#subHeader #pageActions').append(createLink("block", "admin", "id=0&module=$module"), " {$lang->block->createBlock}", '', "class='btn btn-default' data-toggle='modal' data-type='ajax' data-width='700' data-title='{$lang->block->createBlock}'"))?>); +$('#subHeader #pageActions .btn-toolbar:last').append(createLink("block", "admin", "id=0&module=$module"), " {$lang->block->createBlock}", '', "class='btn btn-default' data-toggle='modal' data-type='ajax' data-width='700' data-title='{$lang->block->createBlock}'"))?>); getExtViewFile(__FILE__)){include $extView; return helper::cd();}?> diff --git a/module/block/view/projectblock.html.php b/module/block/view/projectblock.html.php index b1f7597733..0b29104e4a 100644 --- a/module/block/view/projectblock.html.php +++ b/module/block/view/projectblock.html.php @@ -43,7 +43,7 @@ delay)):?> project->delayed;?> - project->statusList[$project->status];?> + project->statusList, $project->status, '');?> hours->totalEstimate;?> diff --git a/module/branch/view/ajaxgetdropmenu.html.php b/module/branch/view/ajaxgetdropmenu.html.php index f1a4791626..1c1008d26c 100644 --- a/module/branch/view/ajaxgetdropmenu.html.php +++ b/module/branch/view/ajaxgetdropmenu.html.php @@ -2,16 +2,16 @@ -search->common;?>'/> -
-
- -
+ +
+ $branch) + { + echo html::a(sprintf($link, $productID, $branchID), " " . $branch, '', "data-filter='{$branchesPinyin[$branch]}'"); + } + ?>
diff --git a/module/common/lang/en.php b/module/common/lang/en.php index 7329269936..bf3f0a738c 100644 --- a/module/common/lang/en.php +++ b/module/common/lang/en.php @@ -555,11 +555,11 @@ $lang->icons['runCase'] = 'play'; $lang->icons['batchRun'] = 'play-sign'; $lang->icons['assign'] = 'hand-right'; $lang->icons['assignTo'] = 'hand-right'; -$lang->icons['change'] = 'random'; +$lang->icons['change'] = 'fork'; $lang->icons['link'] = 'link'; $lang->icons['close'] = 'off'; $lang->icons['activate'] = 'magic'; -$lang->icons['review'] = 'review'; +$lang->icons['review'] = 'glasses'; $lang->icons['confirm'] = 'search'; $lang->icons['confirmBug'] = 'search'; $lang->icons['putoff'] = 'calendar'; diff --git a/module/common/lang/zh-cn.php b/module/common/lang/zh-cn.php index 86461e1c18..d777813d8c 100644 --- a/module/common/lang/zh-cn.php +++ b/module/common/lang/zh-cn.php @@ -190,7 +190,6 @@ $lang->score->menu = $lang->my->menu; $lang->product = new stdclass(); $lang->product->menu = new stdclass(); -$lang->product->menu->list = array('link' => '%s', 'fixed' => true); $lang->product->menu->story = array('link' => '需求|product|browse|productID=%s', 'alias' => 'batchedit', 'subModule' => 'story'); $lang->product->menu->dynamic = '动态|product|dynamic|productID=%s'; $lang->product->menu->plan = array('link' => '计划|productplan|browse|productID=%s', 'subModule' => 'productplan'); @@ -201,9 +200,6 @@ $lang->product->menu->branch = '@branch@|branch|manage|productID=%s'; $lang->product->menu->module = '模块|tree|browse|productID=%s&view=story'; $lang->product->menu->view = array('link' => '概况|product|view|productID=%s', 'alias' => 'edit'); $lang->product->menu->project = "{$lang->projectCommon}|product|project|status=all&productID=%s"; -$lang->product->menu->create = array('link' => " 添加{$lang->productCommon}|product|create", 'float' => 'right'); -$lang->product->menu->all = array('link' => " 所有{$lang->productCommon}|product|all|productID=%s", 'float' => 'right'); -$lang->product->menu->index = array('link' => "{$lang->productCommon}主页|product|index|locate=no", 'float' => 'right'); $lang->story = new stdclass(); $lang->productplan = new stdclass(); @@ -555,11 +551,11 @@ $lang->icons['runCase'] = 'play'; $lang->icons['batchRun'] = 'play-sign'; $lang->icons['assign'] = 'hand-right'; $lang->icons['assignTo'] = 'hand-right'; -$lang->icons['change'] = 'random'; +$lang->icons['change'] = 'fork'; $lang->icons['link'] = 'link'; $lang->icons['close'] = 'off'; $lang->icons['activate'] = 'magic'; -$lang->icons['review'] = 'review'; +$lang->icons['review'] = 'glasses'; $lang->icons['confirm'] = 'search'; $lang->icons['confirmBug'] = 'search'; $lang->icons['putoff'] = 'calendar'; diff --git a/module/common/model.php b/module/common/model.php index c53db915f2..d5cdcbe2db 100644 --- a/module/common/model.php +++ b/module/common/model.php @@ -672,7 +672,7 @@ class commonModel extends model global $lang; if(!commonModel::hasPriv('action', 'comment', $object)) return false; - echo html::a('#commentBox', '', '', "title='$lang->comment' onclick='setComment()' class='btn'"); + echo html::a('#commentBox', ' ' . $lang->action->create, '', "title='$lang->comment' onclick=\"toggleComment('#commentBox')\" class='btn btn-link pull-right'"); } /** @@ -833,6 +833,40 @@ class commonModel extends model } } + static public function printBack($backLink) + { + global $lang, $app; + if(isonlybody()) return false; + + $title = $lang->goback . $lang->backShortcutKey; + echo html::a($backLink, '', '', "id='back' class='btn' title={$title}"); + } + + public static function printPreAndNext($preAndNext = '', $linkTemplate = '') + { + global $lang, $app; + if(isonlybody()) return false; + + echo "'; + } + /** * Create changes of one object. * diff --git a/module/common/view/action.html.php b/module/common/view/action.html.php index d480890fc6..e6facdc367 100755 --- a/module/common/view/action.html.php +++ b/module/common/view/action.html.php @@ -1,183 +1,181 @@ - - -getExtViewFile(__FILE__)){include $extView; return helper::cd();}?> - - - - -
- - - history?> - reverse' class='log-asc icon-'>";?> - switchDisplay' class='change-show icon-'>";?> - - -
-
- history?> - +
+ + + getExtViewFile(__FILE__)){include $extView; return helper::cd();}?> + +
+ history?>   + + + moduleName);?>
-
- -
    - - - comment and $this->methodName == 'view' and $action->actor == $this->app->user->account and common::hasPriv('action', 'editComment'));?> -
  1. - actor])) $action->actor = $users[$action->actor]; - if($action->action == 'assigned' and isset($users[$action->extra]) ) $action->extra = $users[$action->extra]; - if(strpos($action->actor, ':') !== false) $action->actor = substr($action->actor, strpos($action->actor, ':') + 1); - ?> - - action->printAction($action);?> - history)) echo "";?> - - comment) or !empty($action->history)):?> - comment)) echo "
    ";?> -
    - action->printChanges($action->objectType, $action->history);?> -
    - - id . ')', '', '', "class='btn btn-mini' style='border:none'")?> - - comment) - { - echo "
    "; - echo strip_tags($action->comment) == $action->comment ? nl2br($action->comment) : $action->comment; - echo "
    "; - } +
    + +
    +
    +
    + goback, "onclick=\"toggleComment('#commentBox')\"");?> +
    +
    + +
      + + + comment and $this->methodName == 'view' and $action->actor == $this->app->user->account and common::hasPriv('action', 'editComment'));?> +
    1. + actor])) $action->actor = $users[$action->actor]; + if($action->action == 'assigned' and isset($users[$action->extra]) ) $action->extra = $users[$action->extra]; + if(strpos($action->actor, ':') !== false) $action->actor = substr($action->actor, strpos($action->actor, ':') + 1); ?> - -
      -
      id")?>'> - - - -
      comment), "style='width:100%;height:100px'");?>
      id)", $lang->goback, '', "class='btn'");?>
      -
      -
      + + action->printAction($action);?> + history)) echo "";?> + + comment) or !empty($action->history)):?> + comment)) echo "
      ";?> +
      + action->printChanges($action->objectType, $action->history);?> +
      + + ', "onclick=\"toggleComment('{$action->id}')\" style='border:0;'", 'btn btn-mini')?> + + comment) + { + echo "
      "; + echo strip_tags($action->comment) == $action->comment ? nl2br($action->comment) : $action->comment; + echo "
      "; + } + ?> + +
      +
      id")?>'> + + + +
      comment), "style='width:100%;height:100px'");?>
      id)", $lang->goback, '', "class='btn'");?>
      +
      +
      + + + comment)) echo "
      ";?> - - comment)) echo "
    ";?> - -
  2. - -
- - -
- -
- + + + + + diff --git a/module/common/view/header.html.php b/module/common/view/header.html.php index 3ce08b4048..2568c52540 100755 --- a/module/common/view/header.html.php +++ b/module/common/view/header.html.php @@ -38,9 +38,9 @@ if($extHookFiles) foreach($extHookFiles as $extHookFile) include $extHookFile;
- + -
+
modulePageActions)) echo $lang->modulePageActions;?>
requestType == 'PATH_INFO' ? '?' : '&'; $sessionString .= session_name() . '=' . session_id(); ?> - - +
file->common;?> -
- + +
file->common;?>
+
+
    + file->uploadDate . substr($file->addedDate, 0, 10); + $fileTitle = "
  •  " . $file->title .'.' . $file->extension; + $imageWidth = 0; + if(stripos('jpg|jpeg|gif|png|bmp', $file->extension) !== false) + { + $imageSize = getimagesize($file->realPath); + $imageWidth = $imageSize ? $imageSize[0] : 0; + } + + $fileSize = 0; + /* Show size info. */ + if($file->size < 1024) + { + $fileSize = $file->size . 'B'; + } + elseif($file->size < 1024 * 1024) + { + $file->size = round($file->size / 1024, 2); + $fileSize = $file->size . 'K'; + } + elseif($file->size < 1024 * 1024 * 1024) + { + $file->size = round($file->size / (1024 * 1024), 2); + $fileSize = $file->size . 'M'; + } + else + { + $file->size = round($file->size / (1024 * 1024 * 1024), 2); + $fileSize = $file->size . 'G'; + } + echo html::a($this->createLink('file', 'download', "fileID=$file->id") . $sessionString, $fileTitle . " ({$fileSize})", '_blank', "onclick=\"return downloadFile($file->id, '$file->extension', $imageWidth)\""); + + + echo ""; + common::printLink('file', 'edit', "fileID=$file->id", "", '', "class='edit btn-icon' title='{$lang->file->edit}'"); + if(common::hasPriv('file', 'delete')) echo html::a('###', "", '', "class='btn-icon' onclick='deleteFile($file->id)' title='$lang->delete'"); + echo ''; + echo '
  • '; + } + } + ?> +
+
';?> + diff --git a/module/my/view/story.html.php b/module/my/view/story.html.php index a66cd79461..08cffe76db 100644 --- a/module/my/view/story.html.php +++ b/module/my/view/story.html.php @@ -148,7 +148,7 @@ if($withSearch) { echo ''; diff --git a/module/my/view/todo.html.php b/module/my/view/todo.html.php index cc85fd9bf8..92488f33f6 100644 --- a/module/my/view/todo.html.php +++ b/module/my/view/todo.html.php @@ -29,7 +29,7 @@
- +
@@ -123,7 +123,7 @@ $actionLink = $this->createLink('todo', 'import2Today'); echo "
"; echo html::input('date', date('Y-m-d'), "class='form-control form-date'"); - echo ''; + echo ''; echo '
'; echo html::commonButton($lang->todo->import, "onclick=\"setFormAction('$actionLink')\""); } diff --git a/module/product/lang/zh-cn.php b/module/product/lang/zh-cn.php index 086cea20db..13a928e726 100644 --- a/module/product/lang/zh-cn.php +++ b/module/product/lang/zh-cn.php @@ -10,7 +10,7 @@ * @link http://www.zentao.net */ $lang->product->common = $lang->productCommon . '视图'; -$lang->product->index = $lang->productCommon . "首页"; +$lang->product->index = $lang->productCommon . "主页"; $lang->product->browse = "需求列表"; $lang->product->dynamic = "动态"; $lang->product->view = "{$lang->productCommon}概况"; diff --git a/module/product/model.php b/module/product/model.php index 88eddf0328..4893e259c8 100644 --- a/module/product/model.php +++ b/module/product/model.php @@ -50,9 +50,18 @@ class productModel extends model if($currentMethod == 'report') $currentMethod = 'browse'; $selectHtml = $this->select($products, $productID, $currentModule, $currentMethod, $extra, $branch, $module, $moduleType); + + $productIndex = '
'; + $productIndex .= '
'; + $productIndex .= $selectHtml; + + $this->lang->modulePageNav = $productIndex; foreach($this->lang->product->menu as $key => $menu) { - $replace = $key == 'list' ? $selectHtml : $productID; + $replace = $productID; common::setMenuVars($this->lang->product->menu, $key, $replace); } } @@ -81,7 +90,7 @@ class productModel extends model setCookie("lastProduct", $productID, $this->config->cookieLife, $this->config->webRoot); $currentProduct = $this->getById($productID); $this->session->set('currentProductType', $currentProduct->type); - $output = "{$currentProduct->name}
"; + $output = "
"; if($isMobile) $output = "{$currentProduct->name} "; if($currentProduct->type == 'normal') unset($this->lang->product->menu->branch); if($currentProduct->type != 'normal') @@ -92,8 +101,7 @@ class productModel extends model $branchName = isset($branches[$branch]) ? $branches[$branch] : $branches[0]; if(!$isMobile) { - $output .= '
  • '; - $output .= "{$branchName}
    "; + $output .= "
    "; } else { @@ -107,14 +115,14 @@ class productModel extends model $moduleName = $module ? $module->name : $this->lang->tree->all; if(!$isMobile) { - $output .= '
  • '; - $output .= "{$moduleName}
    "; + $output .= "
    "; } else { $output .= "{$moduleName} "; } } + if(!$isMobile) $output .= '
  • '; return $output; } diff --git a/module/product/view/ajaxgetdropmenu.html.php b/module/product/view/ajaxgetdropmenu.html.php index 7e693ad700..8c660ae787 100644 --- a/module/product/view/ajaxgetdropmenu.html.php +++ b/module/product/view/ajaxgetdropmenu.html.php @@ -2,57 +2,45 @@ -search->common;?>'/> -
    -
    -
      - status == 'normal' and $product->PO == $this->app->user->account) $iCharges++; - if($product->status == 'normal' and !($product->PO == $this->app->user->account)) $others++; - if($product->status == 'closed') $closeds++; - } + +
      + status == 'normal' and $product->PO == $this->app->user->account) $iCharges++; + if($product->status == 'normal' and !($product->PO == $this->app->user->account)) $others++; + if($product->status == 'closed') $closeds++; + $productNames[] = $product->name; + } + $productsPinYin = common::convert2Pinyin($productNames); - if($iCharges and $others) echo "
    • {$lang->product->mine}
    • "; - foreach($products as $product) - { - if($product->status == 'normal' and $product->PO == $this->app->user->account) - { - echo "
    • " . html::a(sprintf($link, $product->id), " " . $product->name, '', "class='mine text-important'"). "
    • "; - } - } - - if($iCharges and $others) echo "
    • {$lang->product->other}
    • "; - $class = ($iCharges and $others) ? "class='other text-special'" : ''; - foreach($products as $product) - { - if($product->status == 'normal' and !($product->PO == $this->app->user->account)) - { - echo "
    • " . html::a(sprintf($link, $product->id), " " . $product->name, '', "$class"). "
    • "; - } - } - ?> -
    + foreach($products as $product) + { + if($product->status == 'normal' and $product->PO == $this->app->user->account) + { + echo html::a(sprintf($link, $product->id), " " . $product->name, '', "data-filter='" . zget($productsPinYin, $product->name, '') . "'"); + } + } -
    - createLink('product', 'all', "productID=$productID"), " " . $lang->product->allProduct)?> - - - -
    -
    -
    -
      - status == 'normal' and !($product->PO == $this->app->user->account)) { - if($product->status == 'closed') echo "
    • " . html::a(sprintf($link, $product->id), " " . $product->name, '', "class='closed'"). "
    • "; + echo html::a(sprintf($link, $product->id), " " . $product->name, '', "data-filter='" . zget($productsPinYin, $product->name, '') . "'"); } - ?> -
    -
    + } + + foreach($products as $product) + { + if($product->status == 'closed') echo html::a(sprintf($link, $product->id), " " . $product->name, '', "class='closed' data-filter='" . zget($productsPinYin, $product->name, '') . "'"); + } + ?>
    diff --git a/module/story/view/view.html.php b/module/story/view/view.html.php index 14efabf849..3a81ade692 100644 --- a/module/story/view/view.html.php +++ b/module/story/view/view.html.php @@ -12,378 +12,365 @@ ?> -
    -
    - icons['story']);?> id;?> - title;?> - version > 1):?> - - - - - -
    -
    - session->storyList != false ? $app->session->storyList : $this->createLink('product', 'browse', "productID=$story->product&branch=$story->branch&moduleID=$story->module"); - $actionLinks = ''; - - if(!$story->deleted) - { - ob_start(); - - echo "
    "; - common::printIcon('story', 'change', "storyID=$story->id", $story); - common::printIcon('story', 'review', "storyID=$story->id", $story); - - if($story->status != 'closed' and !isonlybody()) - { - $misc = "class='btn' data-toggle='modal' data-type='iframe' data-width='95%'"; - $link = $this->createLink('story', 'batchCreate', "productID=$story->product&branch=$story->branch&moduleID=$story->module&storyID=$story->id", '', true); - if(common::hasPriv('story', 'batchCreate')) echo html::a($link, " " . $lang->story->subdivide, '', $misc); - } - - common::printIcon('story', 'close', "storyID=$story->id", $story, 'button', '', '', 'iframe text-danger', true); - common::printIcon('story', 'activate', "storyID=$story->id", $story, 'button', '', '', 'iframe text-success', true); - - if($this->config->global->flow != 'onlyStory' and !isonlybody() and (common::hasPriv('testcase', 'create') or common::hasPriv('testcase', 'batchCreate'))) - { - $this->app->loadLang('testcase'); - echo "
    "; - echo ""; - echo ""; - echo "
    "; - } - - if($from == 'project') common::printIcon('task', 'create', "project=$param&storyID=$story->id&moduleID=$story->module", $story, 'button', 'smile'); - echo '
    '; - - echo "
    "; - common::printIcon('story', 'edit', "storyID=$story->id", $story); - common::printCommentIcon('story', $story); - common::printIcon('story', 'create', "productID=$story->product&branch=$story->branch&moduleID=$story->module&storyID=$story->id", $story, 'button', 'copy'); - common::printIcon('story', 'delete', "storyID=$story->id", $story, 'button', '', 'hiddenwin'); - echo '
    '; - - echo "
    "; - common::printRPN($browseLink, $preAndNext); - echo '
    '; - - $actionLinks = ob_get_contents(); - ob_end_clean(); - echo $actionLinks; - } - else - { - common::printRPN($browseLink); - } - ?> -
    -
    - -
    -
    -
    -
    - story->legendSpec;?> -
    spec;?>
    -
    -
    - story->legendVerify;?> -
    verify;?>
    -
    - fetch('file', 'printFiles', array('files' => $story->files, 'fieldset' => 'true'));?> - -
    - deleted) echo $actionLinks;?> -
    -
    - comment;?> -
    id")?>' target='hiddenwin'> -
    - -
    -
    -
    -
    -
    -
    -
    - -
    -
    - - - - - - type != 'normal'):?> - - - - - - - - $module) - { - $moduleTitle .= $module->name; - if(!common::printLink('product', 'browse', "productID=$story->product&branch=$story->branch&browseType=byModule¶m=$module->id", $module->name)) echo $module->name; - if(isset($modulePath[$key + 1])) - { - $moduleTitle .= '/'; - echo $lang->arrow; - } - } - } - $printModule = ob_get_contents(); - ob_end_clean(); - ?> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    story->product;?>product", $product->name);?>
    product->branch;?>product&branch=$story->branch", $branches[$story->branch]);?>
    story->module;?>
    story->plan;?> - planTitle)) - { - foreach($story->planTitle as $planID => $planTitle) - { - if(!common::printLink('productplan', 'view', "planID=$planID", $planTitle)) echo $lanTitle; - echo '
    '; - } - } - ?> -
    story->source;?>story->sourceList[$story->source];?>
    story->sourceNote;?>sourceNote;?>
    story->status;?>story->statusList[$story->status];?>
    story->stage;?> - stages and $branches) - { - foreach($story->stages as $branch => $stage) if(isset($branches[$branch])) echo $branches[$branch] . ' : ' . $lang->story->stageList[$stage] . '
    '; - } - else - { - echo $lang->story->stageList[$story->stage]; - } - ?> -
    story->pri;?>story->priList, $story->pri);?>'>story->priList, $story->pri)?>
    story->estimate;?>estimate;?>
    story->keywords;?>keywords;?>
    story->legendMailto;?>mailto); foreach($mailto as $account) {if(empty($account)) continue; echo "" . $users[trim($account)] . '  '; }?>
    -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    story->openedBy;?>openedBy] . $lang->at . $story->openedDate;?>
    story->assignedTo;?>assignedTo) echo $users[$story->assignedTo] . $lang->at . $story->assignedDate;?>
    story->reviewedBy;?>reviewedBy); foreach($reviewedBy as $account) echo ' ' . $users[trim($account)]; ?>
    story->reviewedDate;?>reviewedBy) echo $story->reviewedDate;?>
    story->closedBy;?>closedBy) echo $users[$story->closedBy] . $lang->at . $story->closedDate;?>
    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]); - } - ?> -
    story->lastEditedBy;?>lastEditedBy) echo $users[$story->lastEditedBy] . $lang->at . $story->lastEditedDate;?>
    -
    - -
    -
    -
    - -
    - global->flow != 'onlyStory'):?> -
    -
      +
      +
      + session->storyList != false ? $app->session->storyList : $this->createLink('product', 'browse', "productID=$story->product&branch=$story->branch&moduleID=$story->module");?> + +
      +
      +
      +
      +
      story->legendSpec;?>
      +
      spec;?>
      - -
      - - global->flow != 'onlyStory'):?> - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + +
      story->legendFromBug;?> -
        - id $fromBug->title'>" . html::a($this->createLink('bug', 'view', "bugID=$fromBug->id"), "#$fromBug->id $fromBug->title") . '';?> -
      -
      story->legendBugs;?> -
        - id $bug->title'>" . html::a($this->createLink('bug', 'view', "bugID=$bug->id"), "#$bug->id $bug->title") . ''; - } - ?> -
      -
      story->legendCases;?> -
        - id $case->title'>" . html::a($this->createLink('testcase', 'view', "caseID=$case->id"), "#$case->id $case->title") . ''; - } - ?> -
      -
      story->legendLinkStories;?> -
        +
        +
        story->legendVerify;?>
        +
        verify;?>
        +
        + fetch('file', 'printFiles', array('files' => $story->files, 'fieldset' => 'false'));?> + createLink('action', 'comment', "objectType=story&objectID=$story->id");?> + + + +
        +
        +
        + story->legendBasicInfo;?> +
        + + + + + + + type != 'normal'):?> + + + + + + + linkStories) ; - foreach($linkStories as $linkStoryID) + $moduleTitle = ''; + ob_start(); + if(empty($modulePath)) { - if(isset($story->extraStories[$linkStoryID])) echo '
      • ' . html::a(inlink('view', "storyID=$linkStoryID"), "#$linkStoryID " . $story->extraStories[$linkStoryID]) . '
      • '; + $moduleTitle .= '/'; + echo "/"; + } + else + { + foreach($modulePath as $key => $module) + { + $moduleTitle .= $module->name; + if(!common::printLink('product', 'browse', "productID=$story->product&branch=$story->branch&browseType=byModule¶m=$module->id", $module->name)) echo $module->name; + if(isset($modulePath[$key + 1])) + { + $moduleTitle .= '/'; + echo $lang->arrow; + } + } + } + $printModule = ob_get_contents(); + ob_end_clean(); + ?> + + + + + - - - - + + + + + + + + + + + + + + + + - -
        story->product;?>createLink('product', 'view', "productID=$story->product"), $product->name);?>
        product->branch;?>product&branch=$story->branch", $branches[$story->branch]);?>
        story->module;?>
        story->plan;?> + planTitle)) + { + foreach($story->planTitle as $planID => $planTitle) + { + if(!common::printLink('productplan', 'view', "planID=$planID", $planTitle)) echo $lanTitle; + echo '
        '; + } } ?> - -
        story->legendChildStories;?> -
          +
        story->source;?>story->sourceList[$story->source];?>
        story->sourceNote;?>sourceNote;?>
        story->status;?> story->statusList[$story->status];?>
        story->stage;?> childStories) ; - foreach($childStories as $childStoryID) + if($story->stages and $branches) { - if(isset($story->extraStories[$childStoryID])) echo '
      • ' . html::a(inlink('view', "storyID=$childStoryID"), "#$childStoryID " . $story->extraStories[$childStoryID]) . '
      • '; + foreach($story->stages as $branch => $stage) if(isset($branches[$branch])) echo $branches[$branch] . ' : ' . $lang->story->stageList[$stage] . '
        '; + } + else + { + echo $lang->story->stageList[$story->stage]; } ?> - -
        -
        +
      story->pri;?>pri;?>'>story->priList, $story->pri)?>
      story->estimate;?>estimate;?>
      story->keywords;?>keywords;?>
      story->legendMailto;?>mailto); foreach($mailto as $account) {if(empty($account)) continue; echo "" . $users[trim($account)] . '  '; }?>
      +
      + +
      +
      +
      + 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 $project) + { + echo "
      • " . html::a($this->createLink('project', 'browse', "projectID=$project->id"), $project->name, '', "class='text-muted'") . '
      • '; + } + } + ?> +
      +
      +
      +
      +
      +
      + story->legendRelated;?> +
      + + + global->flow != 'onlyStory'):?> + + + + + + + + + + + + + + + + + + + + + + + + +
      story->legendFromBug;?> +
        + id $fromBug->title'>" . html::a($this->createLink('bug', 'view', "bugID=$fromBug->id"), "#$fromBug->id $fromBug->title") . '';?> +
      +
      story->legendBugs;?> +
        + id $bug->title'>" . html::a($this->createLink('bug', 'view', "bugID=$bug->id"), "#$bug->id $bug->title") . ''; + } + ?> +
      +
      story->legendCases;?> +
        + id $case->title'>" . html::a($this->createLink('testcase', 'view', "caseID=$case->id"), "#$case->id $case->title") . ''; + } + ?> +
      +
      story->legendLinkStories;?> +
        + linkStories) ; + foreach($linkStories as $linkStoryID) + { + if(isset($story->extraStories[$linkStoryID])) echo '
      • ' . html::a(inlink('view', "storyID=$linkStoryID"), "#$linkStoryID " . $story->extraStories[$linkStoryID]) . '
      • '; + } + ?> +
      +
      story->legendChildStories;?> +
        + childStories) ; + foreach($childStories as $childStoryID) + { + if(isset($story->extraStories[$childStoryID])) echo '
      • ' . html::a(inlink('view', "storyID=$childStoryID"), "#$childStoryID " . $story->extraStories[$childStoryID]) . '
      • '; + } + ?> +
      +
      +
      +
      +
      +
      +
      + story->legendLifeTime;?> +
      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      story->openedBy;?>openedBy] . $lang->at . $story->openedDate;?>
      story->assignedTo;?>assignedTo) echo $users[$story->assignedTo] . $lang->at . $story->assignedDate;?>
      story->reviewedBy;?>reviewedBy); foreach($reviewedBy as $account) echo ' ' . $users[trim($account)]; ?>
      story->reviewedDate;?>reviewedBy) echo $story->reviewedDate;?>
      story->closedBy;?>closedBy) echo $users[$story->closedBy] . $lang->at . $story->closedDate;?>
      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]); + } + ?> +
      story->lastEditedBy;?>lastEditedBy) echo $users[$story->lastEditedBy] . $lang->at . $story->lastEditedDate;?>
      +
      +
      -
    + +
    + +
    + deleted):?> + id", $story); + common::printIcon('story', 'review', "storyID=$story->id", $story); + if($story->status != 'closed' and !isonlybody()) + { + $misc = "class='btn' data-toggle='modal' data-type='iframe' data-width='95%'"; + $link = $this->createLink('story', 'batchCreate', "productID=$story->product&branch=$story->branch&moduleID=$story->module&storyID=$story->id", '', true); + if(common::hasPriv('story', 'batchCreate')) echo html::a($link, " " . $lang->story->subdivide, '', $misc); + } + + common::printIcon('story', 'close', "storyID=$story->id", $story, 'button', '', '', 'iframe', true); + common::printIcon('story', 'activate', "storyID=$story->id", $story, 'button', '', '', 'iframe', true); + + if($this->config->global->flow != 'onlyStory' and !isonlybody() and (common::hasPriv('testcase', 'create') or common::hasPriv('testcase', 'batchCreate'))) + { + $this->app->loadLang('testcase'); + echo "
    "; + echo ""; + echo ""; + echo "
    "; + } + + if($from == 'project') common::printIcon('task', 'create', "project=$param&storyID=$story->id&moduleID=$story->module", $story, 'button', 'smile'); + + echo "
    "; + common::printIcon('story', 'edit', "storyID=$story->id", $story); + common::printIcon('story', 'create', "productID=$story->product&branch=$story->branch&moduleID=$story->module&storyID=$story->id", $story, 'button', 'copy'); + common::printIcon('story', 'delete', "storyID=$story->id", $story, 'button', '', 'hiddenwin'); + + echo "
    "; + common::printBack($browseLink); + ?> + + + +
    +
    + story->create); diff --git a/module/todo/control.php b/module/todo/control.php index 0d8e2815de..fdf9e40ae7 100644 --- a/module/todo/control.php +++ b/module/todo/control.php @@ -101,6 +101,7 @@ class todo extends control { $date= 'today'; } + if(isonlybody())die(js::reload('parent.parent')); die(js::locate($this->createLink('my', 'todo', "type=$date"), 'parent')); } diff --git a/module/todo/view/edit.html.php b/module/todo/view/edit.html.php index 9d7566f8e8..35cf1677bb 100644 --- a/module/todo/view/edit.html.php +++ b/module/todo/view/edit.html.php @@ -29,7 +29,7 @@
    date, "class='form-control form-date'");?> - +
    @@ -125,7 +125,7 @@
    end, 'class="form-control chosen"');?>
    -
    +
    begin == 2400) echo 'checked';?> >
    diff --git a/module/tree/view/ajaxgetdropmenu.html.php b/module/tree/view/ajaxgetdropmenu.html.php index 1f0c1b7c4a..0309832a75 100644 --- a/module/tree/view/ajaxgetdropmenu.html.php +++ b/module/tree/view/ajaxgetdropmenu.html.php @@ -2,16 +2,16 @@ -search->common;?>'/> -
    -
    -
      - $module) - { - echo "
    • " . html::a(sprintf($link, $productID, $moduleID), $module, '', "class='text-important'") . "
    • "; - } - ?> -
    -
    + +
    + $module) + { + echo html::a(sprintf($link, $productID, $moduleID), $module, '', "data-filter='{$modulesPinyin[$module]}'"); + } + ?>
    diff --git a/www/js/my.full.js b/www/js/my.full.js index ba37f3ae16..7031b55f43 100644 --- a/www/js/my.full.js +++ b/www/js/my.full.js @@ -97,8 +97,8 @@ function shortcut() */ function showSearchMenu(objectType, objectID, module, method, extra) { - var $toggle = $(objectType == 'branch' ? '#currentBranch' : (objectType == 'tree' ? '#currentModule' : '#currentItem')).closest('li').toggleClass('show'); - if(!$toggle.hasClass('show')) return; + var $toggle = $(objectType == 'branch' ? '#currentBranch' : (objectType == 'tree' ? '#currentModule' : '#currentItem')).closest('.btn-group').toggleClass('open'); + if(!$toggle.hasClass('open')) return; var $menu = $toggle.find('#dropMenu'); var uuid = $.zui.uuid(); if(!$.cookie('ajax_quickJump')) @@ -106,109 +106,14 @@ function showSearchMenu(objectType, objectID, module, method, extra) $.cookie('ajax_quickJump', 'on', {expires: config.cookieLife, path: config.webRoot}); $.get(createLink('score', 'ajax', "method=quickJump")); } + if(!$menu.data('initData')) { var remoteUrl = createLink(objectType, 'ajaxGetDropMenu', "objectID=" + objectID + "&module=" + module + "&method=" + method + "&extra=" + extra); - $.get(remoteUrl, function(data) - { - var $search = $menu.html(data).find('#search').focus(); - var $items = $menu.find('#searchResult ul > li:not(.heading)'); - var items = []; - $items.each(function() - { - var $item = $(this).removeClass('active'); - var item = $item.data(); - - item.uuid = 'searchItem-' + (uuid++); - item.key = (item.key || '') + $item.text(); - item.tag = (item.tag || '') + '#' + item.id; - $item.attr('id', item.uuid); - items.push(item); - }); - - var searchItems = function() - { - var searchText = $.trim($search.val()); - if(searchText !== null && searchText.length) - { - $items.removeClass('show-search'); - $menu.addClass('searching'); - var isTag = searchText.length > 1 && (searchText[0] === ':' || searchText[0] === '@' || searchText[0] === '#'); - $.each(items, function(idx, item) - { - if((isTag && item.tag.indexOf(searchText) > -1) || item.key.indexOf(searchText) > -1) - { - $('#' + item.uuid).addClass('show-search'); - } - }); - var $resultItems = $items.filter('.show-search'); - if(!$resultItems.filter('.active').length) - { - $resultItems.first().addClass('active'); - } - } - else - { - $menu.removeClass('searching'); - } - }; - var searchCallTask = null; - $search.on('change keyup paste input propertychange', function() - { - clearTimeout(searchCallTask); - searchCallTask = setTimeout(searchItems, 200); - }).on('keydown', function(e) - { - var code = e.which; - var isSearching = $menu.hasClass('searching'); - var $resultItems = isSearching ? $items.filter('.show-search') : $items; - var resultLength = $resultItems.length; - if(!resultLength) return; - var $this = $resultItems.filter('.active:first'); - var getIndex = function() - { - var thisIdx = -1; - $resultItems.each(function(idx) - { - if($(this).is($this)) - { - thisIdx = idx; - return false; - } - }); - return thisIdx; - }; - if(code === 38) // up - { - $items.removeClass('active'); - if($this.length) $resultItems.eq((getIndex() - 1)%resultLength).addClass('active'); - else $resultItems.last().addClass('active'); - } - else if(code === 40) // down - { - $items.removeClass('active'); - if($this.length) $resultItems.eq((getIndex() + 1)%resultLength).addClass('active'); - else $resultItems.first().addClass('active'); - } - else if(code === 13) // enter - { - if($this.length) window.location.href = $this.children('a').attr('href'); - } - }); - $menu.on('mouseenter', ' ul > li:not(.heading)', function() - { - $items.filter('.active').removeClass('active'); - $(this).addClass('active'); - }); - }); + $.get(remoteUrl, function(data){ $menu.html(data); }); $menu.data('initData', true); - $(document).on('click', function(){$toggle.removeClass('show');}); $toggle.on('click', function(e){e.stopPropagation();}); } - else - { - $menu.find('#search').focus(); - } } /**