document.js 3.02 KB
$(function () {

    $(".reprocess-document").each( function () {
      $(this).modalForm({formURL: $(this).data("id")});
    });

    $(".add-chunk").each( function () {
      $(this).modalForm({formURL: $(this).data("id")});
    });

    $(".add-chunk-between").each( function () {
      $(this).modalForm({formURL: $(this).data("id")});
    });

    $(".edit-chunk").each(function () {
      $(this).modalForm({formURL: $(this).data("id")});
    });

    $(".delete-chunk").each(function () {
      $(this).modalForm({formURL: $(this).data("id")});
    });

    $(".move-chunk").each( function () {
      $(this).modalForm({formURL: $(this).data("id")});
    });

    $(".merge-chunk").each( function () {
      $(this).modalForm({formURL: $(this).data("id")});
    });

    $(".split-chunk").each( function () {
      $(this).modalForm({formURL: $(this).data("id")});
    });

    $(".add-subchunk").each( function () {
      $(this).modalForm({formURL: $(this).data("id")});
    });

    $(".edit-subchunk").each(function () {
      $(this).modalForm({formURL: $(this).data("id")});
    });

    $(".delete-subchunk").each(function () {
      $(this).modalForm({formURL: $(this).data("id")});
    });

    $(".add-participant").each( function () {
      $(this).modalForm({formURL: $(this).data("id")});
    });

    $(".edit-participant").each(function () {
      $(this).modalForm({formURL: $(this).data("id")});
    });

    $(".delete-participant").each(function () {
      $(this).modalForm({formURL: $(this).data("id")});
    });

    $(".add-metadata").each( function () {
      $(this).modalForm({formURL: $(this).data("id")});
    });

    $(".edit-metadata").each(function () {
      $(this).modalForm({formURL: $(this).data("id")});
    });

    $(".delete-metadata").each(function () {
      $(this).modalForm({formURL: $(this).data("id")});
    });

    $(".edit-doc-details").each(function () {
      $(this).modalForm({formURL: $(this).data("id")});
    });

    $(".add-keyword").each(function () {
      $(this).modalForm({formURL: $(this).data("id")});
    });

    $(".edit-keyword").each(function () {
      $(this).modalForm({formURL: $(this).data("id")});
    });

    $(".delete-keyword").each(function () {
      $(this).modalForm({formURL: $(this).data("id")});
    });

    $(".finish-annotation").each(function () {
      $(this).modalForm({formURL: $(this).data("id")});
    });

    $(".split-doc").each(function () {
      $(this).modalForm({formURL: $(this).data("id")});
    });

    $(".revert-subdoc-division").each(function () {
      $(this).modalForm({formURL: $(this).data("id")});
    });

    $(".retake-doc-for-anno").each(function () {
      $(this).modalForm({formURL: $(this).data("id")});
    });

    $(".retake-doc-for-anno-for-prev-annot").each(function () {
      $(this).modalForm({formURL: $(this).data("id")});
    });
});

function closeModal() {
    $('#modal').modal('hide');
}

function startReprocessingAnimation() {
    $('#reprocess-spinner').removeClass("d-none");
    $('#reprocess-button-text').text("Przetwarzanie...");
}