diff --git a/web/index-src.php b/web/index-src.php index fc80143..8373228 100644 --- a/web/index-src.php +++ b/web/index-src.php @@ -103,9 +103,14 @@ function autoVer($url) {

Can't find your old notes? We changed addresses. Go to the old address at note5.jasonhanley.com, - sign in and synchronize. Then come back to the new address at - h5note.com, - sign in and synchronize and you're good to go! + and export your notes.
+ Then come back and click here to import. +

Problems or suggestions? http://bit.ly/n5support diff --git a/web/js/note5.js b/web/js/note5.js index f039f77..08483d5 100644 --- a/web/js/note5.js +++ b/web/js/note5.js @@ -150,7 +150,7 @@ var Note5 = { for(i = 0; i < this.notes.length; i++) { if(!this.notes[i].docId) this.notes[i].docId = guidGenerator(); // Set id if not already set - docId = this.notes[i].docId + docId = this.notes[i].docId; this.docIds.push(docId); } } @@ -569,6 +569,28 @@ var Note5 = { $('#saved_message').html('Application has been reset: '+(new Date()).get8601Time()); }, + importOld: function() { + var json = $('#import_data').val(); + if(json) { + data = JSON.parse(json); + if(data) { + for(i = 0; i < data.length; i++) { + var newDoc = new Note5Doc(); + newDoc.name = data[i].name; + newDoc.content = data[i].content; + Note5.doc.setIndex(Note5.doc.add(newDoc)-1); + Note5.doc.docIds.push(newDoc.docId); + } + } + + Note5.doc.saveLocal(); // Update docIdList + Note5.view.refreshPage(true); + } + + $('#import_old').hide(); + $('#button_saved').click(); + }, + //Resize the app window width as necessary onresize: function() {