* if date equal today or yesterday, highlight.

This commit is contained in:
zhujinyong
2012-10-31 05:35:58 +00:00
parent c4f689c7b5
commit 348c12b564

View File

@@ -30,7 +30,19 @@
echo '<span id="before">' . html::a(inlink('todo', "date=before&account={$app->user->account}&status=undone"), $lang->todo->allUndone) . '</span>';
echo "<span id='bydate'>" . html::input('date', $date, "class='w-date date' onchange=changeDate(this.value)") . '</span>';
?>
<?php if($date == date('Y-m-j') and $type == 'bydate') $type = 'today';?>
<?php
if($type == 'bydate')
{
if($date == date('Y-m-j'))
{
$type = 'today';
}
else if($date == date('Y-m-j', strtotime('-1 day')))
{
$type = 'yesterday';
}
}
?>
<script>$('#<?php echo $type;?>').addClass('active')</script>
</div>
<div class='f-right'>