Skip to content

Commit

Permalink
Merge pull request #142 from eroamane/patch-1
Browse files Browse the repository at this point in the history
fix: hide the pause button for completed or error task.
  • Loading branch information
binux authored May 20, 2020
2 parents 8988ad3 + e738841 commit 46eef96
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ <h1>Yet Another Aria2 Web Frontend</h1>
<ul id="task-contextmenu" class="dropdown-menu">
<li class="task-restart"><a href="#" id="menuRestart" >ReStart</a></li>
<li class="task-start"><a href="#" id="menuStart" >Start</a></li>
<li><a href="#" id="menuPause" >Pause</a></li>
<li class="task-pause"><a href="#" id="menuPause" >Pause</a></li>
<li><a href="#" id="menuRemove" >Remove</a></li>
<li class="task-move divider"></li>
<li class="task-move"><a href="#" id="menuMoveTop" >MoveTop</a></li>
Expand Down
9 changes: 8 additions & 1 deletion js/yaaw.js
Original file line number Diff line number Diff line change
Expand Up @@ -819,9 +819,16 @@ var YAAW = (function() {
if (status == "removed" || status == "complete" || status == "error") {
$(".task-restart").show();
$(".task-start").hide();
$(".task-pause").hide();
} else {
$(".task-restart").hide();
$(".task-start").show();
if (status == "active" || status == "waiting") {
$(".task-start").hide();
$(".task-pause").show();
} else {
$(".task-start").show();
$(".task-pause").hide();
}
}
return false;
}).live("mouseout", function(ev) {
Expand Down

0 comments on commit 46eef96

Please sign in to comment.