diff --git a/data/en-US.properties b/data/en-US.properties index 95cf3eb..a287627 100644 --- a/data/en-US.properties +++ b/data/en-US.properties @@ -21,3 +21,7 @@ about_text_1 = ToDoList is free software: you can redistribute it and/or modify about_text_2 = ToDoList is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. about_text_3 = You should have received a copy of the GNU General Public License along with ToDoList. If not, see . about_text_4 = Started and written originally by José Carlos Cuevas +warning_popup_title = Warning - All data will be lost +warning_popup_message = This will erase all data and it cannot be undone. Are you sure you want to reset the app? +warning_popup_cancel = Cancel +warning_popup_done = Ok diff --git a/data/es.properties b/data/es.properties index e4e8416..64d0781 100644 --- a/data/es.properties +++ b/data/es.properties @@ -21,4 +21,7 @@ about_text_1 = ToDoList is free software: you can redistribute it and/or modify about_text_2 = ToDoList is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. about_text_3 = You should have received a copy of the GNU General Public License along with ToDoList. If not, see . about_text_4 = Iniciado y escrito originalmente por José Carlos Cuevas ; - +warning_popup_title = Peligro - Toda la información se perderá +warning_popup_message = Esto borrará toda la información y no se puede deshacer. ¿Está seguro de que quiere reiniciar la aplicación? +warning_popup_cancel = Cancelar +warning_popup_done = Aceptar diff --git a/index.html b/index.html index 6e92e45..25c23bc 100644 --- a/index.html +++ b/index.html @@ -67,7 +67,7 @@
- Visit the source code + Visit the source code

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 + }); + }); } });