[livejournal] r19909: LJSUP-8857: Updating commenting form
Committer: szhirkov
LJSUP-8857: Updating commenting formU 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;
