(change): Attribution can now be disabled, saving and cancelling
behavior
This commit is contained in:
1 parent
1b3c97516c
commit
a11c313a8e
9 files changed
+59
-20
No files matched your search
@@ -64,6 +64,12 @@
|
||||
focusIdx(0);
|
||||
}, 1);
|
||||
},
|
||||
cancel(){
|
||||
if (itemsBuffer.length > 0) {
|
||||
itemsBuffer.forEach((i) => (i.changed = false));
|
||||
this.getPage();
|
||||
};
|
||||
},
|
||||
prevPage(){
|
||||
((pager.idFrom -= itemsLength), (pager.idTo -= itemsLength));
|
||||
this.getPage();
|
||||
@@ -133,8 +139,8 @@
|
||||
const headers = ['Ticket ID', 'First Name', 'Last Name', 'Phone Number', 'Pref', 'Save?'];
|
||||
|
||||
if (browser) {
|
||||
window.addEventListener('beforeunload', (e) => {
|
||||
if (itemsBuffer.length > 0) e.preventDefault();
|
||||
window.addEventListener('beforeunload', () => {
|
||||
if (itemsBuffer.length > 0) functions.save();
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in new issue
Block a user