From bcf35c4b7b33a89d5520691f144e7fdd3c706110 Mon Sep 17 00:00:00 2001 From: "chencongzhi520@gmail.com" Date: Sat, 6 Jul 2013 03:00:01 +0000 Subject: [PATCH] * adjust the code. --- module/bug/view/m.activate.html.php | 4 +-- module/bug/view/m.browse.html.php | 8 ----- module/common/control.php | 2 +- module/common/lang/en.php | 2 ++ module/common/lang/zh-cn.php | 2 ++ module/my/view/m.bug.html.php | 8 ----- module/my/view/m.story.html.php | 9 +++--- module/my/view/m.todo.html.php | 2 +- module/product/lang/zh-cn.php | 2 +- module/product/model.php | 1 + module/project/js/bug.js | 34 +++++++++++----------- module/project/lang/zh-cn.php | 2 +- module/project/model.php | 9 +++++- module/task/view/m.activate.html.php | 5 ++-- module/task/view/m.assignto.html.php | 5 ++-- module/task/view/m.finish.html.php | 13 ++++++--- module/task/view/m.recordestimate.html.php | 4 +-- module/task/view/m.start.html.php | 13 ++++++--- module/todo/view/m.batchcreate.html.php | 31 ++++++++++---------- module/user/view/m.login.html.php | 14 +++------ 20 files changed, 84 insertions(+), 86 deletions(-) diff --git a/module/bug/view/m.activate.html.php b/module/bug/view/m.activate.html.php index 5d77b6be75..b2f9910e66 100755 --- a/module/bug/view/m.activate.html.php +++ b/module/bug/view/m.activate.html.php @@ -8,11 +8,11 @@ resolvedBy, 'class=select-3');?> - bug->openedBuild;?> + bug->openedBuild;?> openedBuild, 'size=4 multiple=multiple class=select-3');?> - comment;?> + comment;?> diff --git a/module/bug/view/m.browse.html.php b/module/bug/view/m.browse.html.php index 66364f6999..b85c174a47 100755 --- a/module/bug/view/m.browse.html.php +++ b/module/bug/view/m.browse.html.php @@ -24,14 +24,6 @@
- + private or ($todo->private and $todo->account == $app->user->account)):?>
diff --git a/module/product/lang/zh-cn.php b/module/product/lang/zh-cn.php index a077a6e26b..19172f7ae9 100644 --- a/module/product/lang/zh-cn.php +++ b/module/product/lang/zh-cn.php @@ -87,4 +87,4 @@ $lang->product->aclList['private'] = '私有产品(只有项目团队成员才 $lang->product->aclList['custom'] = '自定义白名单(团队成员和白名单的成员可以访问)'; $lang->product->storySummary = "本页共 %s 个需求,预计 %s 个工时。"; -$lang->product->noMatchedProduct = '找不到包含"%s"的产品'; +$lang->product->noMatchedProduct = '找不到与"%s"相关的产品'; diff --git a/module/product/model.php b/module/product/model.php index 61b8c753b4..3e0b7d983f 100644 --- a/module/product/model.php +++ b/module/product/model.php @@ -145,6 +145,7 @@ class productModel extends model public function getPairs($mode = '') { $orderBy = !empty($this->config->product->orderBy) ? $this->config->product->orderBy : 'isClosed'; + $mode .= $this->cookie->productMode; $products = $this->dao->select('*, IF(INSTR(" closed", status) < 2, 0, 1) AS isClosed') ->from(TABLE_PRODUCT) ->where('deleted')->eq(0) diff --git a/module/project/js/bug.js b/module/project/js/bug.js index a177d6d1fc..02c0a37884 100644 --- a/module/project/js/bug.js +++ b/module/project/js/bug.js @@ -2,25 +2,25 @@ function setModal4List(colorboxClass, replaceID) { replaceID = 'bugList'; $('.' + colorboxClass).colorbox( + { + width:900, + height:500, + iframe:true, + transition:'none', + + onCleanup:function() { - width:900, - height:500, - iframe:true, - transition:'none', + saveWindowSize(); - onCleanup:function() + var link = self.location.href; + $.get(link, {onlybody: "yes"}, function(data) { - saveWindowSize(); + $('#' + replaceID).replaceWith(data) + setModal4List(colorboxClass, replaceID) - var link = self.location.href; - $.get(link, {onlybody: "yes"}, function(data) - { - $('#' + replaceID).replaceWith(data) - setModal4List(colorboxClass, replaceID) - - $('.colored').colorize(); - $('tfoot td').css('background', 'white').unbind('click').unbind('hover'); - }); - } - }); + $('.colored').colorize(); + $('tfoot td').css('background', 'white').unbind('click').unbind('hover'); + }); + } + }); } diff --git a/module/project/lang/zh-cn.php b/module/project/lang/zh-cn.php index 786e0b2f74..f3b608c83d 100644 --- a/module/project/lang/zh-cn.php +++ b/module/project/lang/zh-cn.php @@ -178,7 +178,7 @@ $lang->project->whyNoStories = "看起来没有需求可以关联。请检 $lang->project->doneProjects = '已结束'; $lang->project->unDoneProjects = '未结束'; $lang->project->copyTeam = '复制团队'; -$lang->product->noMatchedProject = '找不到包含"%s"的项目'; +$lang->product->noMatchedProject = '找不到与"%s"相关的项目'; /* 交互提示。*/ $lang->project->confirmDelete = '您确定删除项目[%s]吗?'; diff --git a/module/project/model.php b/module/project/model.php index e17adeeb92..be1c9b5fc6 100644 --- a/module/project/model.php +++ b/module/project/model.php @@ -89,6 +89,12 @@ class projectModel extends model $moduleName = $this->app->getModuleName(); $methodName = $this->app->getMethodName(); + if($this->cookie->projectMode == 'noclosed' and $project->status == 'done') + { + setcookie('projectMode', 'all'); + $this->cookie->projectMode = 'all'; + } + $selectHtml = $this->select($projects, $projectID, $moduleName, $methodName, $extra); foreach($this->lang->project->menu as $key => $menu) { @@ -433,7 +439,8 @@ class projectModel extends model */ public function getPairs($mode = '') { - $orderBy = !empty($this->config->project->orderBy) ? $this->config->project->orderBy : 'isDone, status'; + $orderBy = !empty($this->config->project->orderBy) ? $this->config->project->orderBy : 'isDone, status'; + $mode .= $this->cookie->projectMode; /* Order by status's content whether or not done */ $projects = $this->dao->select('*, IF(INSTR(" done", status) < 2, 0, 1) AS isDone')->from(TABLE_PROJECT) ->where('iscat')->eq(0) diff --git a/module/task/view/m.activate.html.php b/module/task/view/m.activate.html.php index ea31d51a6e..7cbc3dec9c 100644 --- a/module/task/view/m.activate.html.php +++ b/module/task/view/m.activate.html.php @@ -2,18 +2,17 @@

task->activate . $this->lang->colon . $task->name;?>

- - + - + diff --git a/module/task/view/m.assignto.html.php b/module/task/view/m.assignto.html.php index e53020bbe5..cac447d727 100644 --- a/module/task/view/m.assignto.html.php +++ b/module/task/view/m.assignto.html.php @@ -2,18 +2,17 @@

task->assignTo . $this->lang->colon . $task->name;?>

-
task->assignedTo;?> openedBy);?>
task->left;?>task->left;?>
comment;?>comment;?>
- + - + diff --git a/module/task/view/m.finish.html.php b/module/task/view/m.finish.html.php index 056ad57127..30784c7ac4 100644 --- a/module/task/view/m.finish.html.php +++ b/module/task/view/m.finish.html.php @@ -2,22 +2,27 @@

task->finish . $this->lang->colon . $task->name;?>

-
task->assignedTo;?> openedBy);?>
task->left;?>task->left;?> left);?>
comment;?>comment;?>
- + - + - +
task->consumed;?> consumed);?>
task->assignedTo;?>task->assignedTo;?> openedBy);?>
comment;?>comment;?>
+ +
diff --git a/module/task/view/m.recordestimate.html.php b/module/task/view/m.recordestimate.html.php index 03bbd45b8b..3711d75763 100644 --- a/module/task/view/m.recordestimate.html.php +++ b/module/task/view/m.recordestimate.html.php @@ -7,8 +7,8 @@ $allLeft = 0; foreach($estimates as $estimate) { - $allConsumed += $estimate->consumed; - $allLeft = $estimate->left; + $allConsumed += $estimate->consumed; + $allLeft = $estimate->left; } ?> diff --git a/module/task/view/m.start.html.php b/module/task/view/m.start.html.php index 08a2bf0be7..2ba36d2480 100644 --- a/module/task/view/m.start.html.php +++ b/module/task/view/m.start.html.php @@ -2,22 +2,27 @@

task->start . $this->lang->colon . $task->name;?>

-
- + - + - +
task->consumed;?> consumed);?>
task->left;?>task->left;?> left);?>
comment;?>comment;?>
+ +
diff --git a/module/todo/view/m.batchcreate.html.php b/module/todo/view/m.batchcreate.html.php index e9f16d245a..a477692714 100755 --- a/module/todo/view/m.batchcreate.html.php +++ b/module/todo/view/m.batchcreate.html.php @@ -13,22 +13,23 @@
- - -todo->common}{$lang->todo->name}'"); -echo html::hidden("types[$i]", 'custom'); -echo html::hidden("pris[$i]", 3); -echo html::hidden("descs[$i]", ''); -echo html::hidden("begins[$i]", '2400'); -echo html::hidden("ends[$i]", '2400'); -?> - + todo->common}{$lang->todo->name}'"); + echo html::hidden("types[$i]", 'custom'); + echo html::hidden("pris[$i]", 3); + echo html::hidden("descs[$i]", ''); + echo html::hidden("begins[$i]", '2400'); + echo html::hidden("ends[$i]", '2400'); + } + ?>

- +

diff --git a/module/user/view/m.login.html.php b/module/user/view/m.login.html.php index 0375b32aa7..a0a381b5aa 100755 --- a/module/user/view/m.login.html.php +++ b/module/user/view/m.login.html.php @@ -8,23 +8,17 @@ * @package ZenTaoPMS * @version $Id: login.html.php 4612 2013-03-18 07:46:16Z wwccss $ */ -include '../../common/view/m.header.lite.html.php'; ?> +

user->mobileWeb->login;?>

- - - - - - - - - + + +
langs, $this->app->getClientLang(), 'class=select-2 onchange=selectLang(this.value)');?>
langs, $this->app->getClientLang(), 'class=select-2 onchange=selectLang(this.value)');?>