Skip to content

Commit

Permalink
fix a download button bug in website
Browse files Browse the repository at this point in the history
  • Loading branch information
farthinker committed May 10, 2014
1 parent 738037a commit 35033e8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
3 changes: 3 additions & 0 deletions site/assets/_coffee/page-download.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,6 @@ $ ->
.toggleClass('fa-caret-down', !expanded)
.toggleClass('fa-caret-right', expanded)

$page.on 'mousedown', '.btn-download', (e) ->
e.stopPropagation()

5 changes: 4 additions & 1 deletion site/assets/scripts/page-download.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,16 @@
$(function() {
var $page;
$page = $('#page-download');
return $page.on('mousedown', '.version .title', function(e) {
$page.on('mousedown', '.version .title', function(e) {
var $versionEl, expanded;
$versionEl = $(this).closest('.version');
expanded = $versionEl.hasClass('expand');
$versionEl.toggleClass('expand', !expanded);
return $versionEl.find('.icon').toggleClass('fa-caret-down', !expanded).toggleClass('fa-caret-right', expanded);
});
return $page.on('mousedown', '.btn-download', function(e) {
return e.stopPropagation();
});
});

}).call(this);

0 comments on commit 35033e8

Please sign in to comment.