Skip to content
This repository has been archived by the owner on Jul 25, 2018. It is now read-only.

Commit

Permalink
Allow alert messages to also pass on a custom size for legislator face
Browse files Browse the repository at this point in the history
  • Loading branch information
konklone committed Mar 14, 2011
1 parent 0237a4d commit ba35e43
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions app/views/widgets/embed.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,13 @@
show();
},

alert: function(message, legislator) {
alert: function(message, legislator, size) {
$("#mainContent").hide();
$("#widgetAlert p").html(message);
$("#widgetAlert").show();

if (legislator) {
Widget.populateLegislator(legislator);
Widget.populateLegislator(legislator, size);

if (switcher)
prepareSwitcher(legislator);
Expand Down
6 changes: 3 additions & 3 deletions app/views/widgets/embed/_top_contributions.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@

TransparencyData.getEntityId(bioguide_id, function(entity_id) {
if (entity_id == null)
Widget.alert("We do not yet have any information on this lawmaker's campaign contributions.", legislator);
Widget.alert("We do not yet have any information on this lawmaker's campaign contributions.", legislator, "40x50");
else {

TransparencyData.topContributors(entity_id, cycle, function(top_contributors) {
if (top_contributors == null)
Widget.alert("There was a problem loading contributions for this lawmaker.", legislator);
Widget.alert("There was a problem loading contributions for this lawmaker.", legislator, "40x50");
else if (top_contributors.length == 0)
Widget.alert("We don't have any contribution information for this lawmaker for the " + cycle + " cycle.", legislator);
Widget.alert("We don't have any contribution information for this lawmaker for the " + cycle + " cycle.", legislator, "40x50");
else {

populateWidget(legislator, top_contributors);
Expand Down

0 comments on commit ba35e43

Please sign in to comment.