$(function () { addComment(); });
function addComment() {
    var title = $('#title').val();
    if (title == null || title == '') {
        title = TaskResources.CommentForEvaluationDialogTitle;
    }
    createModalDialog(title, '<textarea id="commentForEvaluation" rows="8" class="width98 autogrow required" style="height: 98%; min-width: 600px;"/>', function () {
        if ($('#commentForEvaluation').val() == null || $('#commentForEvaluation').val().trim() == '') {
            alert(TaskResources.EvaluationCanceled);
            return false;
        }
        else {
            window.location = base + "Task/ChangeStatusSetMark?id=" + $('#id').val() + "&comment=" + $('#commentForEvaluation').val();
        }
    });
    $(".ui-dialog a.ui-dialog-titlebar-close").bind("click", function () { alert(TaskResources.EvaluationCanceled) });
    $(".ui-dialog button.close-dialog-button").bind("click", function () { alert(TaskResources.EvaluationCanceled) });
}