diff --git a/src/main/webapp/dataset.xhtml b/src/main/webapp/dataset.xhtml
index e67139a1941..57e7bc2f602 100644
--- a/src/main/webapp/dataset.xhtml
+++ b/src/main/webapp/dataset.xhtml
@@ -628,6 +628,51 @@
+
@@ -1672,47 +1717,6 @@
$('button[id$="updateOwnerDataverse"]').trigger('click');
}
- // javascript for refreshing page when locks
- $(this).ready(function () {
- refreshIfStillLocked();
- });
- function refreshIfStillLocked() {
- if ($('input[id$="datasetLockedForAnyReasonVariable"]').val() === 'true') {
- // if dataset is locked, instruct the page to
- // wait and check again:
- waitAndCheckLockAgain();
- } else {
- // if not locked, has it just been unlocked?
- if ($('input[id$="datasetStateChangedVariable"]').val() === 'true') {
- // For whatever unknown PrimeFaces reason
- // the page needs to be refreshed twice, for all
- // the pull down menus to update properly:
- refreshAllCommand();
- // You can't just run 2 refreshAllCommand()s in a row
- // either; because the command has an "update=@all" on it,
- // so I guess if you try to execute the 2nd one right after
- // the first one, this fragment is still going to be loading -
- // so there would not yet be a command to run! (it needs to
- // be rendered, before you can execute it, that is)
- setTimeout(function () {
- // this button doesn't do anything, but it has an update="@all"
- // attribute:
- $('button[id$="refreshButton"]').trigger('click');
- //refreshAllCommand();
- }, 1500);
- }
- }
- }
- function waitAndCheckLockAgain() {
- setTimeout(function () {
- // refresh the lock in the
- // backing bean; i.e., check, if the ingest has
- // already completed in the background:
- //$('button[id$="refreshButton"]').trigger('click');
- //refreshLockCommand();
- refreshAllLocksCommand();
- }, 10000);
- }
//]]>