src/cm/media/js/client/c_sync.js
changeset 12 f69ff46d3240
parent 0 40c8f766c9b8
child 15 6ed2af5ab085
--- a/src/cm/media/js/client/c_sync.js	Thu Nov 26 12:03:53 2009 +0100
+++ b/src/cm/media/js/client/c_sync.js	Mon Nov 30 13:46:17 2009 +0100
@@ -124,6 +124,21 @@
 				else if (isReply())
 					this._hideNewReplyForm() ;
 				
+				if ("ask_for_notification" in ret) {  
+					if (ret['ask_for_notification']) {
+						// TODO ask for notification ...or use AUTO_CONTRIB ?
+						parent.f_yesNoDialog(gettext("Do you wan to subscribe to all replies notifications in discussions where you have participated?"), gettext("Warning"), null, null, null, 
+							function() { // special case : no waiting for the return, no error check, nothing !
+									var cfg = {
+									method: "POST", 
+									data: urlEncode({'fun':'ownNotify', 'key':sv_key, 'email':ret['email']}) 
+								} ; 
+								CY.io(sv_client_url, cfg);
+							}, this, null) ;
+					}
+				}
+					
+				
 				if ("comment" in ret) { // won't be when add with a priori moderation
 					var comment = ret['comment'] ;