diff --git a/components/ILIAS/Repository/Service/Modal/class.ModalAdapterGUI.php b/components/ILIAS/Repository/Service/Modal/class.ModalAdapterGUI.php index d8717e007e8e..36b81163cc62 100755 --- a/components/ILIAS/Repository/Service/Modal/class.ModalAdapterGUI.php +++ b/components/ILIAS/Repository/Service/Modal/class.ModalAdapterGUI.php @@ -154,9 +154,6 @@ protected function getModalWithContent(): Modal\RoundTrip if ($this->cancel_label !== "") { $modal = $modal->withCancelButtonLabel($this->cancel_label); } - $modal = $modal->withAdditionalOnLoadCode(function ($id) { - return "il.repository.ui.initModal('$id');"; - }); return $modal; } diff --git a/components/ILIAS/Repository/resources/repository.js b/components/ILIAS/Repository/resources/repository.js index 03a95a3c0b26..90810b11ec64 100755 --- a/components/ILIAS/Repository/resources/repository.js +++ b/components/ILIAS/Repository/resources/repository.js @@ -1,3 +1,19 @@ +/** + * This file is part of ILIAS, a powerful learning management system + * published by ILIAS open source e-Learning e.V. + * + * ILIAS is licensed with the GPL-3.0, + * see https://www.gnu.org/licenses/gpl-3.0.en.html + * You should have received a copy of said license along with the + * source code, too. + * + * If this is not the case or you just want to try ILIAS, you'll find + * us at: + * https://www.ilias.de + * https://github.com/ILIAS-eLearning + * + *********************************************************************/ + /* global il, $ */ il = il || {}; @@ -55,16 +71,6 @@ il.repository.ui = (function (il, $) { const initForms = function () { }; - const initModal = function (id) { - const modal = document.getElementById(id); - const buttons = modal.querySelectorAll('.modal-footer button'); - if (buttons.length >= 2) { - const penultimate = buttons[buttons.length - 2]; - penultimate.remove(); - } - modal.dataset.modalInitialised = '1'; - }; - const init = function () { initForms(); }; @@ -82,7 +88,6 @@ il.repository.ui = (function (il, $) { return { init, submitModalForm, - initModal, }; }(il, $));