* code for task#1657.

This commit is contained in:
xia0ta0
2013-07-31 10:28:37 +08:00
parent 00586a2b39
commit 44376ef1d1
3 changed files with 38 additions and 2 deletions
+33
View File
@@ -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'});