Aralot (aralot) wrote in changelog,
Aralot
aralot
changelog

[livejournal] r19909: LJSUP-8857: Updating commenting form

Committer: szhirkov
LJSUP-8857: Updating commenting form
U   trunk/htdocs/js/commentmanage.js
Modified: trunk/htdocs/js/commentmanage.js
===================================================================
--- trunk/htdocs/js/commentmanage.js	2011-08-31 07:13:49 UTC (rev 19908)
+++ trunk/htdocs/js/commentmanage.js	2011-08-31 07:48:39 UTC (rev 19909)
@@ -537,6 +537,7 @@
 
 	window.LiveJournal.CommentManager = function() {
 		this.bindLinks();
+		this.showIfScreened();
 	}
 
 	LiveJournal.CommentManager.prototype.bindLinks = function() {
@@ -579,6 +580,25 @@
 			ev.stopPropagation();
 		} );
 	}
+	
+	/**
+	 * Shows message (in LJ Bubble) that new added comment is screened (if there are GET-param)
+	 */
+	LiveJournal.CommentManager.prototype.showIfScreened = function() {
+		var getParams = LiveJournal.parseGetArgs( location.href ),
+			message;
+		
+		if( getParams.screen ) {
+			message = Site.ml_text[decodeURIComponent( getParams.screen )];
+			
+			$( '<p style="width: 40em;">' + message + '</p>' )
+				.bubble( {
+					target: '#ljcmtxt' + getParams.view,
+					align: 'left'
+				} )
+				.bubble( 'show' );
+		}
+	}
 
 	var manager = window.LiveJournal.CommentManager;
 

Tags: aralot, js, livejournal
Subscribe
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 0 comments