Updating the materialize library and calls.

This commit is contained in:
Brian McGonagill 2024-07-22 11:56:35 -05:00
parent a118bf38fc
commit e44ef98be4
17 changed files with 10582 additions and 15529 deletions

View file

@ -3,7 +3,8 @@ Template.deleteConfirmationModal.onCreated(function() {
});
Template.deleteConfirmationModal.onRendered(function() {
$('.modal').modal();
// put new modal init here
// $('.modal').modal();
});
Template.deleteConfirmationModal.helpers({
@ -26,7 +27,8 @@ Template.deleteConfirmationModal.events({
console.log(" ERROR deleting item from modal: " + err);
} else {
// console.log(" SUCCESSFULLY deleted.");
$('#modalDelete').modal('close');
// put the new modal open / close here
// $('#modalDelete').modal('close');
}
});
},

View file

@ -1,19 +1,14 @@
import { M } from '../lib/assets/materialize';
Template.headerBar.onCreated(function() {
});
Template.headerBar.onRendered(function() {
$('.sidenav').sidenav();
setTimeout(function() {
$('.sidenav').sidenav();
$(".dropdown-trigger").dropdown();
$('.collapsible').collapsible();
}, 200)
$(".dropdown-trigger").dropdown();
$('.collapsible').collapsible();
var elems = document.querySelectorAll('.sidenav');
var instances = M.Sidenav.init(elems, {});
var elemd = document.querySelectorAll('.dropdown-trigger');
var instances = M.Dropdown.init(elemd, {});
});
Template.headerBar.helpers({

View file

@ -1,11 +1,12 @@
import { M } from '../../lib/assets/materialize.js';
Template.myModal.onCreated(function() {
});
Template.myModal.onRendered(function() {
$('.modal').modal();
var elems = document.querySelectorAll('.modal');
var instances = M.Modal.init(elems, {});
});
Template.myModal.helpers({
@ -30,7 +31,7 @@ Template.myModal.events({
} else {
$("#genModal").modal('close');
window[callFunction](functionPassId); // <-- calls the function and passed the Id on confirm.
window[callFunction](functionPassId); // <-- calls the function and passes the Id on confirm.
}
},
'click #cancel' (event) {