diff --git a/module/my/js/todo.js b/module/my/js/todo.js index 9ce579181e..a3a789eb21 100644 --- a/module/my/js/todo.js +++ b/module/my/js/todo.js @@ -20,37 +20,4 @@ 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'}); diff --git a/module/my/view/testtask.html.php b/module/my/view/testtask.html.php index b147cb8c50..11e7680528 100644 --- a/module/my/view/testtask.html.php +++ b/module/my/view/testtask.html.php @@ -12,6 +12,7 @@ ?> +testtask->confirmDelete)?>
- +
@@ -51,7 +52,9 @@ common::printIcon('testtask', 'cases', "taskID=$task->id", '', 'list'); common::printIcon('testtask', 'linkCase', "taskID=$task->id", '', 'list'); common::printIcon('testtask', 'edit', "taskID=$task->id", '', 'list'); - common::printIcon('testtask', 'delete', "taskID=$task->id", '', 'list', '', 'hiddenwin'); + + $deleteURL = $this->createLink('testtask', 'delete', "taskID=$task->id&confirm=yes"); + echo html::a("javascript:ajaxDelete(\"$deleteURL\",\"taskList\",confirmDelete)", ' ', '', "class='icon-green-common-delete' title='{$lang->testtask->delete}'"); ?> diff --git a/module/my/view/todo.html.php b/module/my/view/todo.html.php index cf223b6350..20b7f9dfd7 100644 --- a/module/my/view/todo.html.php +++ b/module/my/view/todo.html.php @@ -83,7 +83,9 @@ id", $todo, 'list', '', 'hiddenwin'); common::printIcon('todo', 'edit', "id=$todo->id", '', 'list', '', '', 'iframe', true); - common::printIcon('todo', 'delete', "id=$todo->id", '', 'list', '', 'hiddenwin'); + + $deleteURL = $this->createLink('todo', 'delete', "todoID=$todo->id&confirm=yes"); + echo html::a("javascript:ajaxDelete(\"$deleteURL\",\"todoList\",confirmDelete)", ' ', '', "class='icon-green-common-delete' title='{$lang->todo->delete}'"); ?>