mirror of
https://gitlab.com/bmcgonag/get_my.git
synced 2026-03-27 00:08:49 +00:00
initial commit
This commit is contained in:
parent
b7c7d8b449
commit
750811a81f
52 changed files with 25204 additions and 92 deletions
41
client/General/modal/modal.js
Normal file
41
client/General/modal/modal.js
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
|
||||
|
||||
Template.myModal.onCreated(function() {
|
||||
|
||||
});
|
||||
|
||||
Template.myModal.onRendered(function() {
|
||||
$('.modal').modal();
|
||||
});
|
||||
|
||||
Template.myModal.helpers({
|
||||
modalHeader: function() {
|
||||
return Session.get("confirmationDialogTitle");
|
||||
},
|
||||
modalBody: function() {
|
||||
return Session.get("confirmationDialogContent");
|
||||
}
|
||||
});
|
||||
|
||||
Template.myModal.events({
|
||||
'click #continue' (event) {
|
||||
event.preventDefault();
|
||||
|
||||
let callFunction = Session.get("eventConfirmCallBackFunction");
|
||||
let functionPassId = Session.get("eventConfirmNecessaryId"); // <-- this can be an actual ID, an object, a function, whatever...
|
||||
|
||||
if (functionPassId == "disallowCom") {
|
||||
$("#genModal").modal('close');
|
||||
return;
|
||||
} else {
|
||||
$("#genModal").modal('close');
|
||||
|
||||
window[callFunction](functionPassId); // <-- calls the function and passed the Id on confirm.
|
||||
}
|
||||
},
|
||||
'click #cancel' (event) {
|
||||
event.preventDefault();
|
||||
|
||||
$("#genModal").modal('close');
|
||||
},
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue