mirror of
https://github.com/unraid/webgui.git
synced 2026-01-25 02:58:58 -06:00
Fix next/prev buttons for emulated disks
This commit is contained in:
@@ -41,7 +41,7 @@ if ($type=='New') {
|
||||
$dev = $disk['device'];
|
||||
$file = $disk['id']."-$date.txt";
|
||||
foreach ($disks as $sheet) {
|
||||
if ($sheet['name']=='flash' || strpos($sheet['status'],'_NP')) continue;
|
||||
if ($sheet['type']=='Flash' || ($sheet['type']=='Parity' && $sheet['status']=='DISK_NP_DSBL')) continue;
|
||||
$sheets[] = $sheet['name'];
|
||||
if ($sheet['name']==$name) { $i = $n; $spindown = "diskSpindownDelay.{$sheet['idx']}"; $delay = $sheet['spindownDelay']; }
|
||||
$n++;
|
||||
@@ -149,12 +149,17 @@ function setGlue(form,reset) {
|
||||
$('#helptext').hide();
|
||||
}
|
||||
}
|
||||
<?if (count($sheets)>1):?>
|
||||
var ctrl = "<span class='status vhshift'><span class='waitmsg' style='display:none;font-size:small;font-style:italic;margin-right:8px'>please wait...</span><a href='/Main/<?=$type?>?name=<?=$prev?>' title='previous device'>";
|
||||
ctrl += "<button type='button' style='margin-right:4px' onclick='this.disabled=true;$(\".waitmsg\").show();'><i class='fa fa-chevron-left'></i></button></a>";
|
||||
ctrl += "<a href='/Main/<?=$type?>?name=<?=$next?>' title='next device'><button type='button' onclick='this.disabled=true;$(\".waitmsg\").show();'><i class='fa fa-chevron-right'></i></button></a></span>";
|
||||
<?endif;?>
|
||||
$(function() {
|
||||
<?if (count($sheets)>1):?>
|
||||
var ctrl = "<span class='status vhshift'><span class='waitmsg' style='display:none;font-size:small;font-style:italic;margin-right:8px'>please wait...</span><a href='/Main/<?=$type?>?name=<?=$prev?>' title='previous device'>";
|
||||
ctrl += "<button type='button' style='margin-right:4px' onclick='this.disabled=true;$(\".waitmsg\").show();'><i class='fa fa-chevron-left'></i></button></a>";
|
||||
ctrl += "<a href='/Main/<?=$type?>?name=<?=$next?>' title='next device'><button type='button' onclick='this.disabled=true;$(\".waitmsg\").show();'><i class='fa fa-chevron-right'></i></button></a></span>";
|
||||
<?if ($tabbed):?>
|
||||
$('.tabs').append(ctrl);
|
||||
<?else:?>
|
||||
$('div[id=title]:first').append(ctrl);
|
||||
<?endif;?>
|
||||
<?endif;?>
|
||||
var form = document.smart_settings;
|
||||
<?if (!isset($disk['smType'])):?>
|
||||
form.smType.selectedIndex = 0;
|
||||
|
||||
@@ -171,13 +171,6 @@ function startLongTest() {
|
||||
}
|
||||
}
|
||||
$(function() {
|
||||
<?if (count($sheets)>1):?>
|
||||
<?if ($tabbed):?>
|
||||
$('.tabs').append(ctrl);
|
||||
<?else:?>
|
||||
$('div[id=title]:first').append(ctrl);
|
||||
<?endif;?>
|
||||
<?endif;?>
|
||||
var smarttest = $.cookie('test.<?=addslashes(htmlspecialchars($dev))?>');
|
||||
testUpdate(smarttest===undefined);
|
||||
if (smarttest !== undefined) $('#'+smarttest+'_test').val('Stop').removeAttr('disabled');
|
||||
|
||||
Reference in New Issue
Block a user