Skip to content

Commit

Permalink
Fixed export
Browse files Browse the repository at this point in the history
  • Loading branch information
adokseo committed Oct 2, 2020
1 parent 06f4289 commit d9d584a
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 47 deletions.
48 changes: 25 additions & 23 deletions popup.js
Original file line number Diff line number Diff line change
Expand Up @@ -301,32 +301,34 @@ function exportData() {
filename: 'todo.json',
saveAs: true
}, function() {
if (location.href.indexOf('action=export') !== -1) {
window.close();
} else {
document.querySelector('.satus-dialog__scrim').click();

satus.render({
type: 'dialog',

message: {
type: 'text',
label: 'dataExportedSuccessfully'
},
section: {
type: 'section',
class: 'controls',
setTimeout(function() {
if (location.href.indexOf('action=export') !== -1) {
window.close();
} else {
document.querySelector('.satus-dialog__scrim').click();

satus.render({
type: 'dialog',

ok: {
type: 'button',
label: 'ok',
onclick: function() {
document.querySelector('.satus-dialog__scrim').click();
message: {
type: 'text',
label: 'dataExportedSuccessfully'
},
section: {
type: 'section',
class: 'controls',

ok: {
type: 'button',
label: 'ok',
onclick: function() {
document.querySelector('.satus-dialog__scrim').click();
}
}
}
}
});
}
});
}
}, 100);
});
}

Expand Down
50 changes: 26 additions & 24 deletions src/js/functions.js
Original file line number Diff line number Diff line change
Expand Up @@ -300,31 +300,33 @@ function exportData() {
filename: 'todo.json',
saveAs: true
}, function() {
if (location.href.indexOf('action=export') !== -1) {
window.close();
} else {
document.querySelector('.satus-dialog__scrim').click();

satus.render({
type: 'dialog',

message: {
type: 'text',
label: 'dataExportedSuccessfully'
},
section: {
type: 'section',
class: 'controls',

ok: {
type: 'button',
label: 'ok',
onclick: function() {
document.querySelector('.satus-dialog__scrim').click();
setTimeout(function() {
if (location.href.indexOf('action=export') !== -1) {
window.close();
} else {
document.querySelector('.satus-dialog__scrim').click();

satus.render({
type: 'dialog',

message: {
type: 'text',
label: 'dataExportedSuccessfully'
},
section: {
type: 'section',
class: 'controls',

ok: {
type: 'button',
label: 'ok',
onclick: function() {
document.querySelector('.satus-dialog__scrim').click();
}
}
}
}
});
}
});
}
}, 100);
});
}

0 comments on commit d9d584a

Please sign in to comment.