   # Params:
   #   jq_div: jQuery div element for rendering
   #   one_note_synced_func: function called whenever a note is successfully synced up
-  sync_up_all_notes: (jq_div, one_note_synced_func) =>
+  sync_up_all_notes: (jq_div, one_note_synced_callback) =>
     p = @get_all_notes().then (notes) =>
       _must_finish_promise_list = []
       for note in notes

    console.log('enter sync_up_all_notes()')
    if vm.saving_note == false
      vm.saving_note = true
      noteManager.sync_up_all_notes($('#md_html_div_hidden'), vm.reload_local_note_list).then(
        () =>
          alert('sync_up_all_notes() succeeded for all notes!')
          vm.saving_note = false

          is_new_note = (note.status == @NOTE_STATUS.NEW)
          console.log('note ' + guid + ' sent for sync up')
          _p = @sync_up_note(is_new_note, guid, jq_div, md).then(
            (synced_note) =>
              console.log('sync up note ' + guid + ' succeeded')
              one_note_synced_callback(guid, synced_note.guid)
            (error) =>
              alert('sync up note ' + guid + ' failed: ' + JSON.stringify(error))
          )
