Complete overhaul of "Notes" view. Now features AJAX create and edit operations.
[citadel.git] / webcit / static / wclib.js
index 78e7cc5c8fc2e8d542d8b5d7adee6e9394733fc7..bf4ae9aa9876ff4e202b32aef0f34b3bf7704e84 100644 (file)
@@ -465,3 +465,19 @@ function ctdl_ts_getInnerText(el) {
 }
 
 
+
+// This function handles the creation of new notes in the "Notes" view.
+//
+function add_new_note() {
+
+       new_eid = Math.random() + '';
+       new_eid = new_eid.substr(3);
+
+       $('new_notes_here').innerHTML = $('new_notes_here').innerHTML
+               + '<IMG ALIGN=MIDDLE src=\"static/storenotes_48x.gif\">'
+               + '<span id=\"note' + new_eid + '\">' + Date() + '</span><br />'
+       ;
+
+       new Ajax.InPlaceEditor('note' + new_eid,
+               'updatenote?eid=' + new_eid , {rows:5,cols:72});
+}