diff options
author | Joey Hess <joey@kitenet.net> | 2012-08-08 17:07:38 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2012-08-08 17:07:38 -0400 |
commit | 09449792fa50686e2fb9af6c392b8644dddae5d6 (patch) | |
tree | 52c706411d5f4d8ec4e28081dacabf83353059bb /templates/dashboard | |
parent | 94fcd0cf59f94dd29ab171f0875bd25af65fd527 (diff) |
factor out onclick javascript
Diffstat (limited to 'templates/dashboard')
-rw-r--r-- | templates/dashboard/transfers.hamlet | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/templates/dashboard/transfers.hamlet b/templates/dashboard/transfers.hamlet index 150dcc296..6ace2ae84 100644 --- a/templates/dashboard/transfers.hamlet +++ b/templates/dashboard/transfers.hamlet @@ -28,10 +28,7 @@ <div .bar style="width: #{percent};"> <div .btn-group .span2> $if isNothing (startedTime info) - <a .btn href="@{StartTransferR transfer}" onclick="(function( $ ) { $.post('@{StartTransferR transfer}'); })( jQuery ); return false;"> - <i .icon-play title="start"></i> + ^{actionButton (StartTransferR transfer) Nothing "btn" "icon-play"} $else - <a .btn href="@{PauseTransferR transfer}" onclick="(function( $ ) { $.post('@{PauseTransferR transfer}'); })( jQuery ); return false;"> - <i .icon-pause title="pause"></i> - <a .btn href="@{CancelTransferR transfer}" onclick="(function( $ ) { $.post('@{CancelTransferR transfer}'); })( jQuery ); return false;"> - <i .icon-remove title="cancel"></i> + ^{actionButton (PauseTransferR transfer) Nothing "btn" "icon-pause"} + ^{actionButton (CancelTransferR transfer) Nothing "btn" "icon-remove"} |