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

Commit

Permalink
Merge pull request #424 from allenwq/bugfixing/dup-submissions
Browse files Browse the repository at this point in the history
Disable mission attempt button after clicking for the first time
  • Loading branch information
jsyeo committed Apr 17, 2015
2 parents 46eff43 + 33594a8 commit 9d7dc04
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions app/assets/javascripts/assignments.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,14 @@ $(document).ready(function() {
klass = 'btn-success';
break;
}
$div.html('<a href="' + actions_map[mid].url + '" class="btn ' + klass + '" >' + actions_map[mid].action + '</a>')
var link = $('<a>', {
'href': actions_map[mid].url,
'class': 'btn ' + klass,
'text': actions_map[mid].action
}).appendTo($div);
if ( actions_map[mid].action == 'Attempt' ){
link.attr('data-disable-with', 'Attempting...');
}
}
var $title = $("#title-"+mid);
if ($title.length > 0) {
Expand Down Expand Up @@ -61,4 +68,4 @@ $(document).ready(function() {
console.log(e);
}
}
});
});

0 comments on commit 9d7dc04

Please sign in to comment.