Skip to content

Commit

Permalink
cleaned code
Browse files Browse the repository at this point in the history
  • Loading branch information
kcalumpong committed Oct 5, 2019
1 parent 5dc6dc4 commit 078106f
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 45 deletions.
2 changes: 1 addition & 1 deletion config/config.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"development": {
"username": "root",
"password": "abc12345",
"password": "",
"database": "blackBookApp",
"host": "localhost",
"dialect": "mysql"
Expand Down
35 changes: 0 additions & 35 deletions public/js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,33 +25,7 @@ let currentIndex = null;

renderNotes();
clearValue();
<<<<<<< HEAD

// function renderNotesEditor() {

// var title = $("#title-name").val();
// var content = $("#write-notes").val();

// const newNote = {
// title,
// content
// }

// notes[currentIndex] = newNote

// if (currentIndex === null) {
// return;
// alert("Hey Im null")
// }else {
// notes.push(newNote)
// }
// }

// renderNotesEditor();

=======
// });
>>>>>>> 1bd4491a5d65aee6b3ff536439b73a36d3bdf49e

$(document).on("click", ".back-button", function() {
backButtonandSave();
Expand All @@ -66,8 +40,6 @@ let currentIndex = null;
$(".notes").hide();
});

<<<<<<< HEAD
=======
function renderNotes() {
$(".items").html("");
for (var i = 0; i < notes.length; i++) {
Expand All @@ -83,7 +55,6 @@ let currentIndex = null;
}
}

>>>>>>> 1bd4491a5d65aee6b3ff536439b73a36d3bdf49e

//// SENDING INFO TO BACK END

Expand Down Expand Up @@ -170,10 +141,8 @@ let currentIndex = null;
// .then(res => res.json())
// .then(renderNotes);
// }
<<<<<<< HEAD
// }); // to close document ready function

=======

function submitNote(note) {
$.ajax({
Expand All @@ -195,7 +164,6 @@ let currentIndex = null;
});
}
// }); // to close document ready function
>>>>>>> 1bd4491a5d65aee6b3ff536439b73a36d3bdf49e


//notes
Expand All @@ -210,12 +178,10 @@ let currentIndex = null;
content
};

<<<<<<< HEAD
notes.push(note);
renderNotes();
// renderNotesEditor();
clearValue();
=======
notes.push(note);
renderNotes();

Expand All @@ -225,7 +191,6 @@ let currentIndex = null;
});

clearValue();
>>>>>>> 1bd4491a5d65aee6b3ff536439b73a36d3bdf49e

})

Expand Down
9 changes: 0 additions & 9 deletions views/login.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,7 @@ <h1>Already have an account?</h1>
</form id="message">
<div id="message"></div>
<script>
<<<<<<< HEAD
=======

>>>>>>> 1bd4491a5d65aee6b3ff536439b73a36d3bdf49e
function displayMessage(content) {
$("#message").text(content);
}
Expand All @@ -39,11 +36,8 @@ <h1>Already have an account?</h1>
evt.preventDefault();
var userPassword = $("#password").val();
var userName = $("#username").val();
<<<<<<< HEAD
=======


>>>>>>> 1bd4491a5d65aee6b3ff536439b73a36d3bdf49e
// console.log(userPassword);
$.ajax({
method: 'POST',
Expand Down Expand Up @@ -74,10 +68,7 @@ <h1>Already have an account?</h1>
break;
}
});
<<<<<<< HEAD
=======

>>>>>>> 1bd4491a5d65aee6b3ff536439b73a36d3bdf49e
})
</script>
</body>
Expand Down

0 comments on commit 078106f

Please sign in to comment.