can3p (can3p) wrote in changelog,
can3p
can3p
changelog

[livejournal] r17696: LJSUP-7357: Potd widget now sends vertic...

Committer: dpetrov
LJSUP-7357: Potd widget now sends vertical_account and vertical_name parameters if availible.
U   trunk/htdocs/js/widgets/potd.js
Modified: trunk/htdocs/js/widgets/potd.js
===================================================================
--- trunk/htdocs/js/widgets/potd.js	2010-11-16 07:08:09 UTC (rev 17695)
+++ trunk/htdocs/js/widgets/potd.js	2010-11-16 09:00:38 UTC (rev 17696)
@@ -22,8 +22,17 @@
 			return;
 		}
 		this.pause = true;
-		var widget_node = jQuery(node).closest('.appwidget');
+		var widget_node = jQuery(node).closest('.appwidget'),
+			widget = this;
 
+		widget_node.find('input[type=hidden]').each( function() {
+			switch( this.name ) {
+				case "vertical_account" :
+				case "vertical_name" :
+					if( this.value.length > 0 ) { widget.ajax_params[ this.name ] = this.value; }
+			};
+		} );
+
 		this.cache[skip] ?
 			this.setQuestion(this.cache[skip], widget_node) :
 			jQuery.getJSON(

Tags: can3p, 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