function deleterules(options) {
    if (selectedIds.length == 0) { alert(TableResources.NoRecordsSelected); return false; }
    jConfirm(TableResources.SureDeleteRecords + '<br/><input id="delchilds" class="rowid cb" type="checkbox" onclick="togglecb($(this));"> ' + TaskRepeatResources.DeleteTasks, MeetingResources.ConfirmAction, function(confirmed) {
        if (confirmed) {
            params = { id: selectedIds.join(','), nolayout: true, deletetasks: $('#deletechildrens').val(), timestamp: new Date().toString() };
            if (options != null) $.extend(params, options);
            var url = base + tableController() + 'Delete';
            selectedIds.length = 0;
            $(tableRootDiv).load(url, params, initTable);
            return false;
        }
        else {
            return false;
        }
    });
    return false;
}

function togglecb(cb) {
    if (cb.prop("checked")) {
        $('#deletechildrens').val("true");
    }
    else {
        $('#deletechildrens').val("false");
    }
}

function pausedclick(id) {
    var url = base + 'taskrepeat.ivp/togglepause';
    $(tableRootDiv).load(url, { id: id, nolayout: true, timestamp: new Date().toString() }, initTable);
    return false;
}