* code for task#1657.
This commit is contained in:
@@ -20,4 +20,37 @@ function changeAction(formName, actionName, actionLink)
|
||||
$('#' + formName).attr('action', actionLink).submit();
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete todo.
|
||||
*
|
||||
* @param int todoID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
function deleteTodo(todoID)
|
||||
{
|
||||
if(confirm(confirmDelete))
|
||||
{
|
||||
url = createLink('todo', 'delete','todoID=' + todoID + '&confrim=yes');
|
||||
$.ajax(
|
||||
{
|
||||
type: 'GET',
|
||||
url: url,
|
||||
dataType: 'json',
|
||||
success: function(data)
|
||||
{
|
||||
if(data.result == 'success')
|
||||
{
|
||||
url = createLink('my', 'todo');
|
||||
$('#todo').load(url + ' #todoList', function()
|
||||
{
|
||||
$('.colored').colorize();
|
||||
$('tfoot td').css('background', 'white').unbind('click').unbind('hover');
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
$(".colorbox").colorbox({width:960, height:550, iframe:true, transition:'none'});
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<?php include '../../common/view/colorize.html.php';?>
|
||||
<?php include '../../common/view/datepicker.html.php';?>
|
||||
<?php js::set('confirmDelete', $lang->todo->confirmDelete)?>
|
||||
<form method='post' id='todoform'>
|
||||
<div id='featurebar'>
|
||||
<div class='f-left'>
|
||||
@@ -48,7 +49,9 @@
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<?php include "./todolist.html.php"?>
|
||||
<div id='todo'>
|
||||
<?php include "./todolist.html.php"?>
|
||||
</div>
|
||||
</form>
|
||||
<?php js::set('listName', 'todoList')?>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
<?php
|
||||
common::printIcon('todo', 'finish', "id=$todo->id", $todo, 'list', '', 'hiddenwin');
|
||||
common::printIcon('todo', 'edit', "id=$todo->id", '', 'list', '', '', 'iframe', true);
|
||||
common::printIcon('todo', 'delete', "id=$todo->id", '', 'list', '', 'hiddenwin');
|
||||
echo html::a("javascript:deleteTodo($todo->id)", ' ', '', "class='icon-green-common-delete' title='{$lang->todo->delete}'");
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
Reference in New Issue
Block a user