mirror of
https://gitlab.com/bmcgonag/get_my.git
synced 2026-03-27 00:08:49 +00:00
Updated Menus and Menu Items to use newer materialize
This commit is contained in:
parent
ea3ed117ff
commit
81559683eb
9 changed files with 59 additions and 54 deletions
|
|
@ -1,4 +1,5 @@
|
|||
import { Menus } from '../../imports/api/menu.js';
|
||||
import { M } from '../lib/assets/materialize.js';
|
||||
|
||||
Template.mainMenuTbl.onCreated(function() {
|
||||
this.subscribe("myMenus");
|
||||
|
|
@ -6,6 +7,8 @@ Template.mainMenuTbl.onCreated(function() {
|
|||
|
||||
Template.mainMenuTbl.onRendered(function() {
|
||||
Session.set("menuEditMode", false);
|
||||
var elems = document.querySelectorAll('.modal');
|
||||
var instances = M.Modal.init(elems, {});
|
||||
});
|
||||
|
||||
Template.mainMenuTbl.helpers({
|
||||
|
|
@ -23,7 +26,7 @@ Template.mainMenuTbl.events({
|
|||
if (sender.localName == "li") {
|
||||
let menuId = event.currentTarget.id;
|
||||
if (menuId == "addMenu") {
|
||||
$('#modalMenu').modal('open');
|
||||
// console.log("add menu clicked");
|
||||
} else {
|
||||
console.log("menuId is: " + menuId);
|
||||
Session.set("menuId", menuId);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue