public/javascript/saved.js
// this function is designed to save a note
this function is designed to save a note
this function is designed to save a note
function handleNoteSave() {
    var noteData;
    var newNote = $(".bootbox-body textarea").val().trim();
    if (newNote) {
        noteData = {
            _id: $(this).data("article")._id,
            noteText: newNote
        };
        $.post("/api/notes", noteData).then(function(){
            bootbox.hideAll();
        });
    }
}
function handleNoteSave ( ) { var noteData ; var newNote = $ ( ".bootbox-body textarea" ) . val ( ) . trim ( ) ; if ( newNote ) { noteData = { _id : $ ( this ) . data ( "article" ) . _id , noteText : newNote } ; $ . post ( "/api/notes" , noteData ) . then ( function ( ) { bootbox . hideAll ( ) ; } ) ; } }
this function is designed to save a note
this function is designed to save a note