frayerjj-frontend 0.3.6 → 0.3.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/modal.js +4 -4
package/package.json
CHANGED
package/src/modal.js
CHANGED
|
@@ -85,13 +85,13 @@ export const modal = {
|
|
|
85
85
|
}
|
|
86
86
|
},
|
|
87
87
|
|
|
88
|
-
alert: (
|
|
88
|
+
alert: (messsage, title = "Alert", button = "OK") => {
|
|
89
89
|
msg.verbose('Building Alert Modal');
|
|
90
90
|
let randomId = modal.randomId('confirm');
|
|
91
91
|
document.querySelector('body').insertAdjacentHTML('beforeend', modal.build.modal({
|
|
92
92
|
id: randomId,
|
|
93
93
|
title: title,
|
|
94
|
-
body: '<p>' +
|
|
94
|
+
body: '<p>' + messsage + '</p>',
|
|
95
95
|
buttons: [ { text: button } ]
|
|
96
96
|
}));
|
|
97
97
|
let alertModal = document.getElementById(randomId),
|
|
@@ -258,13 +258,13 @@ export const modal = {
|
|
|
258
258
|
});
|
|
259
259
|
},
|
|
260
260
|
|
|
261
|
-
confirm: (
|
|
261
|
+
confirm: (messsage, onConfirm, onCancel, title = "Are you sure?", buttonYes = "Yes", buttonNo = "No") => {
|
|
262
262
|
msg.verbose('Building Confirm Modal');
|
|
263
263
|
let randomId = modal.randomId('confirm');
|
|
264
264
|
document.querySelector('body').insertAdjacentHTML('beforeend', modal.build.modal({
|
|
265
265
|
id: randomId,
|
|
266
266
|
title: title,
|
|
267
|
-
body: '<p>' +
|
|
267
|
+
body: '<p>' + messsage + '</p>',
|
|
268
268
|
buttons: [
|
|
269
269
|
{ text: buttonYes, class: 'btn-confirm' },
|
|
270
270
|
{ text: buttonNo, class: 'btn-outline-danger' } ]
|