* finish task #1130.

This commit is contained in:
wangyidong
2013-02-27 01:51:51 +00:00
parent 50106ccfaf
commit 7c7ec70572
3 changed files with 6 additions and 7 deletions

View File

@@ -12,7 +12,6 @@
?>
<?php include '../../common/view/header.html.php';?>
<?php include '../../common/view/datepicker.html.php';?>
<?php $onlybody = $config->requestType == 'GET' ? '&onlybody=yes' : '?onlybody=yes';?>
<form method='post' id='todoform'>
<div id='featurebar'>
<div class='f-left'>
@@ -74,7 +73,7 @@
<td><?php echo $todo->date == '2030-01-01' ? $lang->todo->periods['future'] : $todo->date;?></td>
<td><?php echo $lang->todo->typeList[$todo->type];?></td>
<td><span class='<?php echo 'pri' . $todo->pri;?>'><?php echo $todo->pri?></span></td>
<td class='a-left'><?php echo html::a($this->createLink('todo', 'view', "id=$todo->id&from=my") . $onlybody, $todo->name, '', "class='colorbox'");?></td>
<td class='a-left'><?php echo html::a($this->createLink('todo', 'view', "id=$todo->id&from=my", '', true), $todo->name, '', "class='colorbox'");?></td>
<td><?php echo $todo->begin;?></td>
<td><?php echo $todo->end;?></td>
<td class='<?php echo $todo->status;?>'><?php echo $lang->todo->statusList[$todo->status];?></td>

View File

@@ -13,7 +13,6 @@
<?php include '../../common/view/header.html.php';?>
<?php include "../../common/view/datepicker.html.php"; ?>
<?php include './featurebar.html.php';?>
<?php $onlybody = $config->requestType == 'GET' ? '&onlybody=yes' : '?onlybody=yes';?>
<script language='Javascript'>var account='<?php echo $account;?>'</script>
<table class='cont-lt1'>
<tr valign='top'>
@@ -54,7 +53,7 @@
<td><?php echo $todo->date == '2030-01-01' ? $lang->todo->periods['future'] : $todo->date;?></td>
<td><?php echo $lang->todo->typeList[$todo->type];?></td>
<td><span class='<?php echo 'pri' . $todo->pri;?>'><?php echo $todo->pri?></span></td>
<td class='a-left'><?php echo html::a($this->createLink('todo', 'view', "id=$todo->id") . $onlybody, $todo->name, '', "class='colorbox'");?></td>
<td class='a-left'><?php echo html::a($this->createLink('todo', 'view', "id=$todo->id", '' true), $todo->name, '', "class='colorbox'");?></td>
<td><?php echo $todo->begin;?></td>
<td><?php echo $todo->end;?></td>
<td class='<?php echo $todo->status;?>'><?php echo $lang->todo->statusList[$todo->status];?></td>

View File

@@ -47,9 +47,10 @@ function loadFixedCSS()
* @access public
* @return string
*/
function createLink(moduleName, methodName, vars, viewType)
function createLink(moduleName, methodName, vars, viewType, isOnlyBody)
{
if(!viewType) viewType = config.defaultView;
if(!viewType) viewType = config.defaultView;
if(!isOnlyBody) isOnlyBody = false;
if(vars)
{
vars = vars.split('&');
@@ -78,7 +79,7 @@ function createLink(moduleName, methodName, vars, viewType)
}
/* if page has onlybody param then add this param in all link. the param hide header and footer. */
if(onlybody == 'yes')
if(onlybody == 'yes' || isOnlyBody)
{
var onlybody = config.requestType == 'PATH_INFO' ? "?onlybody=yes" : '&onlybody=yes';
link = link + onlybody;