The rating widgets are not displaying. I believe because of this error in Firefox's error console.

Error: div2.append is not a function
Source File: mydrupalinstall/sites/all/modules/reference_links/rl.js?lgsm9r
Line: 180

Chrome's console says this:

Uncaught TypeError: Object # has no method 'append' rl.js:180

Comments

jerrac’s picture

And it looks like we just need to change this:

case rl.UpDownWidget:
				div2.append('<span class="span-total-rating">(Rating: {0})</span>'.replace("{0}", link.rating));
				var upImg = jQuery('<img class="icon-vote-up" src="{0}" lid="{1}" linkTitle="{2}" title="Vote Up" />'.replace("{0}", rl.basePath + 'sites/all/modules/reference_links/images/s.gif').replace("{1}", link.lid).replace("{2}", link.title));
				div2.append(upImg);
				upImg.click(function() {
					rl.rateLink(this.getAttribute('lid'), +1, this.getAttribute('linkTitle'));
				});

				if (rl.settings.allowDown) {
					var downImg = jQuery('<img class="icon-vote-down" src="{0}" lid="{1}" linkTitle="{2}" title="Vote Down" />'.replace("{0}", rl.basePath + 'sites/all/modules/reference_links/images/s.gif').replace("{1}", link.lid).replace("{2}", link.title));
					div2.append(downImg);
					downImg.click(function() {
						rl.rateLink(this.getAttribute('lid'), -1, this.getAttribute('linkTitle'));
					});
				}
				break;

to this (just wrapping div2 with jQuery in a couple places):

case rl.UpDownWidget:
				jQuery(div2).append('<span class="span-total-rating">(Rating: {0})</span>'.replace("{0}", link.rating));
				var upImg = jQuery('<img class="icon-vote-up" src="{0}" lid="{1}" linkTitle="{2}" title="Vote Up" />'.replace("{0}", rl.basePath + 'sites/all/modules/reference_links/images/s.gif').replace("{1}", link.lid).replace("{2}", link.title));
				jQuery(div2).append(upImg);
				upImg.click(function() {
					rl.rateLink(this.getAttribute('lid'), +1, this.getAttribute('linkTitle'));
				});

				if (rl.settings.allowDown) {
					var downImg = jQuery('<img class="icon-vote-down" src="{0}" lid="{1}" linkTitle="{2}" title="Vote Down" />'.replace("{0}", rl.basePath + 'sites/all/modules/reference_links/images/s.gif').replace("{1}", link.lid).replace("{2}", link.title));
					jQuery(div2).append(downImg);
					downImg.click(function() {
						rl.rateLink(this.getAttribute('lid'), -1, this.getAttribute('linkTitle'));
					});
				}
				break;
r_honey’s picture

Priority: Major » Normal
Status: Active » Closed (fixed)

Hi jerrac, thanks for reporting this too... Seems like the up-down voting widget was not tested completely for the D7 version.
Fixed and committed...

r_honey’s picture

Status: Closed (fixed) » Fixed

Changing status to fixed to allow Drupal bot to close issue after defined period automatically.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.