Skip to content

Commit

Permalink
[#2304] Javascript code formatting tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
Sean Hammond committed Apr 30, 2012
1 parent 6a27937 commit 42c16b5
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions ckan/public/scripts/application.js
Expand Up @@ -1418,29 +1418,23 @@ CKAN.Utils = function($, my) {
};

my.setupUserFollowButton = function() {
if ($('#user_follow_button').attr('state') == 'follow')
{
if ($('#user_follow_button').attr('state') == 'follow') {
$('#user_follow_button').off("click", userUnfollowClicked);
$('#user_follow_button').html('Follow');
$('#user_follow_button').on("click", userFollowClicked);
}
else
{
} else {
$('#user_follow_button').off("click", userFollowClicked);
$('#user_follow_button').html('Unfollow');
$('#user_follow_button').on("click", userUnfollowClicked);
}
};

my.setupDatasetFollowButton = function() {
if ($('#dataset_follow_button').attr('state') == 'follow')
{
if ($('#dataset_follow_button').attr('state') == 'follow') {
$('#dataset_follow_button').off("click", datasetUnfollowClicked);
$('#dataset_follow_button').html('Follow');
$('#dataset_follow_button').on("click", datasetFollowClicked);
}
else
{
} else {
$('#dataset_follow_button').off("click", datasetFollowClicked);
$('#dataset_follow_button').html('Unfollow');
$('#dataset_follow_button').on("click", datasetUnfollowClicked);
Expand Down

0 comments on commit 42c16b5

Please sign in to comment.