* Optimize code.
This commit is contained in:
@@ -247,6 +247,7 @@ $lang->action->desc->unlinkbug = '$date, 由 <strong>$actor</strong> 从计划
|
||||
|
||||
/* 用来描述gantt chat相关操作记录。 */
|
||||
$lang->action->desc->ganttdrag = '$date, 由 <strong>$actor</strong> 拖动了任务 <strong>$extra</strong>';
|
||||
$lang->action->desc->ganttmove = '$date, 由 <strong>$actor</strong> 排序了任务 <strong>$extra</strong>';
|
||||
|
||||
/* 用来显示动态信息。*/
|
||||
$lang->action->label = new stdclass();
|
||||
@@ -386,6 +387,7 @@ $lang->action->label->unlinkbug = '移除BUG从';
|
||||
$lang->action->label->tolib = '导入了';
|
||||
$lang->action->label->updatetolib = '更新了';
|
||||
$lang->action->label->ganttdrag = '拖动了';
|
||||
$lang->action->label->ganttmove = '排序了';
|
||||
|
||||
/* 动态信息按照对象分组 */
|
||||
$lang->action->dynamicAction = new stdclass();
|
||||
|
||||
@@ -274,18 +274,21 @@ class programplan extends control
|
||||
/**
|
||||
* Response gantt move event.
|
||||
*
|
||||
* @param int $productID
|
||||
*
|
||||
* @access public
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function ajaxResponseGanttMoveEvent($productID = 0)
|
||||
public function ajaxResponseGanttMoveEvent()
|
||||
{
|
||||
if(!empty($_POST))
|
||||
{
|
||||
$this->loadModel('task')->updateOrderByGantt($productID);
|
||||
$idList = explode('-', $_POST['id']);
|
||||
$taskID = $idList[1];
|
||||
|
||||
$this->loadModel('task')->updateOrderByGantt();
|
||||
if(dao::isError()) return $this->send(array('result' => 'fail', 'message' => dao::getError()));
|
||||
$this->loadModel('action')->create('task', $taskID, 'ganttMove', '', $this->app->user->account);
|
||||
|
||||
return $this->send(array('result' => 'success'));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -663,7 +663,7 @@ $(function()
|
||||
$.ajax({
|
||||
url: link,
|
||||
dataType: "json",
|
||||
data: {tasks: tasks},
|
||||
data: {id: id, tasks: tasks},
|
||||
type: "post",
|
||||
success: function(result){}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user