Updated Menus and Menu Items to use newer materialize

This commit is contained in:
Brian McGonagill 2024-07-23 14:59:43 -05:00
parent ea3ed117ff
commit 81559683eb
9 changed files with 59 additions and 54 deletions

View file

@ -1,4 +1,5 @@
import { Menus } from '../../imports/api/menu.js';
import { M } from '../lib/assets/materialize.js';
Template.addMenuModal.onCreated(function() {
this.subscribe("myMenus");
@ -6,7 +7,8 @@ Template.addMenuModal.onCreated(function() {
Template.addMenuModal.onRendered(function() {
Session.set("menuNameErr", false);
$('.modal').modal();
var elems = document.querySelectorAll('.modal');
var instances = M.Modal.init(elems, {});
});
Template.addMenuModal.helpers({
@ -31,13 +33,8 @@ Template.addMenuModal.events({
} else {
console.log(" SUCCESS adding menu.");
$("#menuNameInp").val("");
$("#modalMenu").modal('close');
}
});
}
},
'click .renameMenu' (event) {
event.preventDefault();
},
});