mirror of
https://github.com/unraid/webgui.git
synced 2026-05-04 08:49:47 -05:00
Parity check: re-introduce Done button when finished
Previous PR had this removed, but now it is properly coded.
This commit is contained in:
@@ -279,11 +279,18 @@ devices.on('message', function(msg,meta) {
|
||||
$.each(msg.split(';'),function(k,v) {if ($('#line'+k).length>0) $('#line'+k).html(v);});
|
||||
// button control
|
||||
if ($('#pauseButton').length>0 && $('#pauseButton').prop('disabled')==false) {
|
||||
var form = document.arrayOps;
|
||||
if ($('#pauseButton').val()=="_(Pause)_" && msg.search("_(paused)_")!=-1) {
|
||||
$('#pauseButton').val("_(Resume)_").prop('onclick',null).off('click').click(function(){resumeParity(form);});
|
||||
} else if ($('#pauseButton').val()=="_(Resume)_" && msg.search("_(paused)_")==-1) {
|
||||
$('#pauseButton').val("_(Pause)_").prop('onclick',null).off('click').click(function(){pauseParity(form);});
|
||||
if (!msg && $('#cancelButton').length>0 && $('#cancelButton').val()=="_(Cancel)_") {
|
||||
$('#cancelButton').val("_(Done)_").prop('onclick',null).off('click').click(function(){refresh();});
|
||||
$('#pauseButton').prop('disabled',true);
|
||||
$('#cancelText').html('');
|
||||
$('#line4').html("_(completed)_");
|
||||
} else {
|
||||
var form = document.arrayOps;
|
||||
if ($('#pauseButton').val()=="_(Pause)_" && msg.search("_(paused)_")!=-1) {
|
||||
$('#pauseButton').val("_(Resume)_").prop('onclick',null).off('click').click(function(){resumeParity(form);});
|
||||
} else if ($('#pauseButton').val()=="_(Resume)_" && msg.search("_(paused)_")==-1) {
|
||||
$('#pauseButton').val("_(Pause)_").prop('onclick',null).off('click').click(function(){pauseParity(form);});
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user