{"size": 894, "ext": "js", "max_stars_repo_path": "resources/js/konfirmasi.js", "max_stars_repo_name": "windaangellina/PROBIS_Web_SqueeSteak", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "resources/js/konfirmasi.js", "max_issues_repo_name": "windaangellina/PROBIS_Web_SqueeSteak", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "resources/js/konfirmasi.js", "max_forks_repo_name": "windaangellina/PROBIS_Web_SqueeSteak", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 28.8387096774, "max_line_length": 56, "alphanum_fraction": 0.5738255034}
// node js / laravel mix. keterangan baca di CATATAN.txt
function setModalMode(mode, action, item){
    if (mode == "Hapus") {
        $("#btnAction").addClass('btn-danger');
    }
    else {
        $("#btnAction").addClass('btn-success');
    }

    $("#modalTitle").html(mode + ' ' + item)
    $("#btnAction").html(mode);
    $("#modalBody").html('Yakin ingin '
            + mode.toLowerCase() + " " + item + ' ?');
    $("#btnAction").attr('formaction', action);
    $("#modalConfirmation").modal('show');
}

function refreshAjaxDataTables(){
    //refresh ajax di datatables
    var table = $("#dataTable").DataTable();
    table.ajax.reload();
}

$(document).on('click', ".btnAksiModal", function(){
    // console.log(this);
    let action = $(this).attr('formaction');
    let mode = $(this).attr("mode");
    let item = $(this).attr("item");
    setModalMode(mode, action, item);
});
