Skip to content
Snippets Groups Projects
Commit 4eb7689d authored by Florian Spreckelsen's avatar Florian Spreckelsen
Browse files

ENH: Open full-version modal if fragment is present

parent b0111cab
Branches
Tags
2 merge requests!68DOC: update CHANGELOG,!63F version uri fragment
......@@ -1169,7 +1169,14 @@ var version_history = new function () {
// check for the version_history fragment and open the modal if present.
if (this._has_version_fragment()) {
logger.debug("Showing full version modal for first entity");
const first_entity = $(".caosdb-entity-panel")[0];
if (first_entity && hasEntityPermission(first_entity, "RETRIEVE:HISTORY")) {
console.log("Showing full version modal for first entity");
const version_button = $(first_entity).find(".caosdb-f-entity-version-button");
version_button.click();
const full_version_history_button = $(first_entity).find(".caosdb-f-entity-version-load-history-btn");
full_version_history_button.click();
}
}
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment