From d7445fe3d8befb2c2380806975acba0174506d2f Mon Sep 17 00:00:00 2001 From: wangchunsheng Date: Mon, 26 Jul 2010 01:43:14 +0000 Subject: [PATCH] * adjust the save user template feature. --- module/bug/control.php | 24 ++++++++++--------- ...etpls.html.php => buildtemplates.html.php} | 0 module/bug/view/create.html.php | 2 +- 3 files changed, 14 insertions(+), 12 deletions(-) rename module/bug/view/{createtpls.html.php => buildtemplates.html.php} (100%) diff --git a/module/bug/control.php b/module/bug/control.php index 7c6966c5e2..96d1c740eb 100644 --- a/module/bug/control.php +++ b/module/bug/control.php @@ -523,25 +523,19 @@ class bug extends control } } - /* 获得用户的bug列表。*/ - public function ajaxGetUserBugs($account = '') - { - if($account == '') $account = $this->app->user->account; - $bugs = $this->bug->getUserBugPairs($account); - die(html::select('bug', $bugs, '', 'class=select-1')); - } - + /* 保存模板。*/ public function saveTemplate() { $this->bug->saveUserBugTemplate(); if(dao::isError()) die(js::error(dao::getError())); - die($this->fetch('bug', 'createTPLS')); + die($this->fetch('bug', 'buildTemplates')); } - public function createTPLS() + /* 生成模板选择页面。*/ + public function buildTemplates() { $this->view->templates = $this->bug->getUserBugTemplates($this->app->user->account); - $this->display('bug', 'createTPLS'); + $this->display('bug', 'buildTemplates'); } /* 删除一个bug模板。*/ @@ -551,6 +545,14 @@ class bug extends control die(); } + /* 获得用户的bug列表。*/ + public function ajaxGetUserBugs($account = '') + { + if($account == '') $account = $this->app->user->account; + $bugs = $this->bug->getUserBugPairs($account); + die(html::select('bug', $bugs, '', 'class=select-1')); + } + /* 发送邮件。*/ private function sendmail($bugID, $actionID) { diff --git a/module/bug/view/createtpls.html.php b/module/bug/view/buildtemplates.html.php similarity index 100% rename from module/bug/view/createtpls.html.php rename to module/bug/view/buildtemplates.html.php diff --git a/module/bug/view/create.html.php b/module/bug/view/create.html.php index d3e6d9f254..3a3b686479 100644 --- a/module/bug/view/create.html.php +++ b/module/bug/view/create.html.php @@ -177,7 +177,7 @@ $(function() { - +
fetch('bug', 'createTPLS');?>fetch('bug', 'buildTemplates');?>