* adjust the save user template feature.

This commit is contained in:
wangchunsheng
2010-07-26 01:43:14 +00:00
parent 7601aa7a1b
commit d7445fe3d8
3 changed files with 14 additions and 12 deletions
+13 -11
View File
@@ -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)
{
+1 -1
View File
@@ -177,7 +177,7 @@ $(function() {
<table class='w-p100 bd-none'>
<tr class='bd-none' valign='top'>
<td class='w-p85 bd-none padding-zero'><?php echo html::textarea('steps', $steps, "class='w-p100' rows='6'");?></td>
<td class='bd-none pl-10px' id='tplBox'><?php echo $this->fetch('bug', 'createTPLS');?></td>
<td class='bd-none pl-10px' id='tplBox'><?php echo $this->fetch('bug', 'buildTemplates');?></td>
</tr>
</table>
</td>