* ajax get todo detail.

This commit is contained in:
chencongzhi520@gmail.com
2013-06-27 02:36:58 +00:00
parent 8bb4649dea
commit 97a6ddd46c
3 changed files with 18 additions and 2 deletions
+3 -2
View File
@@ -24,12 +24,13 @@
<?php if(!$todo->private or ($todo->private and $todo->account == $app->user->account)):?>
<div data-role="collapsible-set">
<div data-role="collapsible" data-collapsed="true">
<h1><?php echo $todo->name;?></h1>
<h1 onClick="showDetail('todo', <?php echo $todo->id;?>)"><?php echo $todo->name;?></h1>
<div><?php echo $todo->desc;?></div>
<div id='item<?php echo $todo->id;?>'><?php echo $todo->desc;?></div>
<div data-role='navbar'>
<ul>
<?php
common::printIcon('todo', 'finish', "id=$todo->id", $todo, 'list', '', 'hiddenwin');
common::printIcon('todo', 'finish', "id=$todo->id", $todo, 'button', '', 'hiddenwin');
if($todo->account == $app->user->account)
{
common::printIcon('todo', 'edit', "todoID=$todo->id");
+13
View File
@@ -401,4 +401,17 @@ class todo extends control
$this->display();
}
/**
* AJAX: get actions of a todo. for web app.
*
* @param int $todoID
* @access public
* @return void
*/
public function ajaxGetDetail($todoID)
{
$this->view->actions = $this->loadModel('action')->getList('todo', $todoID);
$this->display();
}
}
@@ -0,0 +1,2 @@
<?php include '../../common/view/m.action.html.php';?>