           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_func()
+              one_note_synced_callback(guid, synced_note.guid)
             (error) =>
               alert('sync up note ' + guid + ' failed: ' + JSON.stringify(error))
           )

            # then update guid if is new note (when saving new note, tmp guid will be updated to real one)
            if is_new_note
              new_guid = data.note.guid
              return @update_note_guid(guid, new_guid)
          return p
          console.log('sync_up_note(' + guid + ') succeed')

  # 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_callback) =>
    p = @get_all_notes().then (notes) =>
      _must_finish_promise_list = []
      for note in notes
