ToDoList is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/js/app.js b/js/app.js index 4fff16c..1c6ac2f 100644 --- a/js/app.js +++ b/js/app.js @@ -175,5 +175,20 @@ window.addEventListener('DOMContentLoaded', function() { var listID = $('#delete_list').data('currentlist'); deleteListClicked(listID); }); + + $('#reset_app').click(function() { + $.afui.popup({ + title: translate('warning_popup_title'), + message: translate('warning_popup_message'), + cancelText: translate('warning_popup_cancel'), + doneText: translate('warning_popup_done'), + doneCallback: function() { + $('ul#list_of_lists').find('[id^=list_]').parent().remove(); + db.lists.clear(); + db.items.clear(); + }, + cancelOnly: false + }); + }); } });