All Downloads are FREE. Search and download functionalities are using the official Maven repository.

ui.static.git.entityHistory.js Maven / Gradle / Ivy

There is a newer version: 0.8.0
Show newest version
$(document).ready(function (){
   $(".history-container").each(loadChangesHistory);
});

function loadChangesHistory() {
    let container = $(this);
    let url = container.attr("data-url");
    let historyTable = container.find(".history-table");
    showOpProgressOnId("historyChanges", "Loading history...");
    $
        .ajax(url, {
            method: "GET",
            headers: {ajax: 'true'},
        })
        .done(function (response) {
            hideServerOpOnId("historyChanges");
            historyTable.html(response);
            registerAllInfoTooltips();
            createTextLinks(container);
            formatTimestamp();
        })
        .fail(function (error) {
            let errHtml = extractErrHtml(error);
            if (errHtml) {
                hideServerOpOnId("historyChanges");
                historyTable.html(errHtml);
            } else {
                let errorMsg = extractErrMsg(error);
                showOpErrorOnId("historyChanges", "Loading changes history failed", errorMsg);
            }
        });
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy