Skip to content

Commit

Permalink
refactor: jsonMenu
Browse files Browse the repository at this point in the history
  • Loading branch information
theus77 committed Feb 15, 2024
1 parent bc138ae commit 3d7f704
Show file tree
Hide file tree
Showing 7 changed files with 639 additions and 613 deletions.
16 changes: 0 additions & 16 deletions EMS/admin-ui-bundle/_to_be_ref/js/initEms.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
*
*/
import EmsListeners from "./EmsListeners";
import JsonMenu from "./module/jsonMenu";
import JsonMenuNested from "./module/jsonMenuNested";
import ajaxModal from "../../js/core/helpers/ajaxModal";

(function(factory) {
Expand Down Expand Up @@ -69,17 +67,6 @@ import ajaxModal from "../../js/core/helpers/ajaxModal";
});
}

function initJsonMenu() {
$('.json_menu_editor_fieldtype').each(function(){ new JsonMenu(this); });

let jsonMenuNestedList = [];
$('.json-menu-nested').each(function () {
let menu = new JsonMenuNested(this);
jsonMenuNestedList[menu.getId()] = menu;
});
window.jsonMenuNested = jsonMenuNestedList;
}

function intAjaxModalLinks() {
let ajaxModalLinks = document.querySelectorAll('a[data-ajax-modal-url]');
[].forEach.call(ajaxModalLinks, function (link) {
Expand All @@ -102,10 +89,7 @@ import ajaxModal from "../../js/core/helpers/ajaxModal";
toggleMenu();
initSearchForm();
autoOpenModal(queryString());
initJsonMenu();
intAjaxModalLinks();

window.dispatchEvent(new CustomEvent('emsReady'));
});

}));
138 changes: 0 additions & 138 deletions EMS/admin-ui-bundle/_to_be_ref/js/module/jsonMenu.js

This file was deleted.

Loading

0 comments on commit 3d7f704

Please sign in to comment.