diff --git a/css/notes_app.css b/css/notes_app.css index 7ad2e9c..8d877bb 100644 --- a/css/notes_app.css +++ b/css/notes_app.css @@ -26,12 +26,12 @@ body{ border:1px black solid; } -#memo{ +#noteText{ width: 300px; height: 150px; box-sizing: border-box; } -#input1{ +#inputTitle{ margin-bottom:5px; } diff --git a/html/index.html b/html/index.html index 1817482..52f5dc3 100644 --- a/html/index.html +++ b/html/index.html @@ -18,18 +18,16 @@
- +
-
- +
- +
- +
- \ No newline at end of file diff --git a/scripts/notes_app.js b/scripts/notes_app.js index 823462c..36e7a10 100644 --- a/scripts/notes_app.js +++ b/scripts/notes_app.js @@ -2,4 +2,38 @@ $(document).ready(function(){ $("#addNoteDiv").on('click', function() { $("#noteFormDiv").toggle() }) -}) \ No newline at end of file + $("#saveNoteButton").click(getNoteObject); +}) + +const noteFolder = "C:\\Users\\wuest\\Desktop\\Studium\\Master\\MDT5\\Hofmann\\Praktikum\\WebApp\\notes\\"; + +function saveNoteObject(){ + let noteTitle = document.getElementById('inputTitle').value; + let noteText = document.getElementById('noteText').value; + + let noteObj = { + title: noteTitle, + text: noteText + }; + + let noteObj_serialized = JSON.stringify(noteObj); + localStorage.setItem("noteObj", noteObj_serialized); +} + +function getNoteObject(){ + +} + + + + + + + + + + + + + +