X-Git-Url: https://code.citadel.org/?a=blobdiff_plain;f=webcit%2Fstatic%2Fwclib.js;h=f1e7eaf9f501c2273ce0b3b4e808e9491716f956;hb=ede1caec4c133a74236cc15b3efcc1074fab59fb;hp=e6a57cfaa96951badb4efe67fe06f8b850d415a4;hpb=8b15ba21b25ea45e21d5a4f10a8c5be108a54f77;p=citadel.git diff --git a/webcit/static/wclib.js b/webcit/static/wclib.js index e6a57cfaa..f1e7eaf9f 100644 --- a/webcit/static/wclib.js +++ b/webcit/static/wclib.js @@ -440,9 +440,19 @@ function NotesDragMouseUp(evt) { d = $('note-' + uid_of_note_being_dragged); d.style.cursor = saved_cursor_style; - // Only submit the change if motion actually happened + // If any motion actually occurred, submit an ajax http call to record it to the server if (note_was_dragged > 0) { - alert('FIXME do ajax call to move position x=' + d.style.left + ' y=' + d.style.top); + p = 'note_uid=' + uid_of_note_being_dragged + + '&left=' + d.style.left + + '&top=' + d.style.top + + '&r=' + CtdlRandomString(); + new Ajax.Request( + 'ajax_update_note', + { + method: 'post', + parameters: p + } + ); } uid_of_note_being_dragged = '';