VM Remove subpools, Disable Favorites.

This commit is contained in:
SimonFair
2024-06-29 19:29:20 +01:00
parent 3fdcbf125d
commit 282cfc41ca
5 changed files with 32 additions and 4 deletions

View File

@@ -1606,6 +1606,9 @@ Image will be scaled to 1920x90 pixels. The maximum image file upload size is 51
:display_temperature_unit_help:
Selects the temperature unit for the disk temperature thresholds. Changing the unit will adjust the existing value in the disk temperature thresholds as appropriate.
:display_favorites_disabled_help:
Sets favorites adding to disabled. Stops heart icon showing. favorties tab and pre-saved options will still continue to function.
Make sure any newly entered values represent the selected temperature unit.
:end

View File

@@ -404,6 +404,7 @@
// Available cache pools
foreach ($pools as $pool) {
if (isSubpool($pool)) continue;
$strLabel = $pool.' - '.my_scale($disks[$pool]['fsFree']*1024, $strUnit).' '.$strUnit.' '._('free');
echo mk_option($default_storage, $pool, $strLabel);
}
@@ -790,6 +791,7 @@
// Available cache pools
foreach ($pools as $pool) {
if (isSubpool($pool)) continue;
$strLabel = $pool.' - '.my_scale($disks[$pool]['fsFree']*1024, $strUnit).' '.$strUnit.' '._('free');
echo mk_option($default_option, $pool, $strLabel);
}
@@ -945,6 +947,7 @@
// Available cache pools
foreach ($pools as $pool) {
if (isSubpool($pool)) continue;
$strLabel = $pool.' - '.my_scale($disks[$pool]['fsFree']*1024, $strUnit).' '.$strUnit.' '._('free');
echo mk_option($default_option, $pool, $strLabel);
}

View File

@@ -315,6 +315,14 @@ _(Show banner background color fade)_:
</select>
</div>
_(Favorites disabled)_:
: <select name="favorites">
<?=mk_option($display['favorites'], "no",_('No'))?>
<?=mk_option($display['favorites'], "yes",_('Yes'))?>
</select>
:display_favorites_disabled_help:
<input type="submit" name="#default" value="_(Default)_" onclick="filename='reset'">
: <input type="submit" name="#apply" value="_(Apply)_" disabled><input type="button" value="_(Done)_" onclick="done()">
</form>

View File

@@ -3,6 +3,13 @@ Type="xmenu"
Tabs="false"
Code="e924"
---
<?PHP
if (!isset($display['favorites'])) {
$favorites = true;
} else {
$favorites = $display['favorites'] == "no" ? true : false;
}
?>
<script>
function addPage(page) {
$.post('/webGui/include/MyFavorites.php',{action:'add',page:page},function(){
@@ -13,8 +20,8 @@ function addPage(page) {
$(function(){
$('div.Panel').each(function(){
var page = $(this).find('a').prop('href').split('/').pop();
$(this).find('span').append('<i class="fa fa-heart favo" title="_(Add to favorites)_" onclick="addPage(&quot;'+page+'&quot;);return false"></i>');
$(this).hover(function(){$(this).find('i.favo').show();},function(){$(this).find('i.favo').hide();});
if (<?=$favorites?>) $(this).find('span').append('<i class="fa fa-heart favo" title="_(Add to favorites)_" onclick="addPage(&quot;'+page+'&quot;);return false"></i>');
if (<?=$favorites?>) $(this).hover(function(){$(this).find('i.favo').show();},function(){$(this).find('i.favo').hide();});
});
});
</script>

View File

@@ -3,6 +3,13 @@ Type="xmenu"
Tabs="false"
Code="e909"
---
<?PHP
if (!isset($display['favorites'])) {
$favorites = true;
} else {
$favorites = $display['favorites'] == "no" ? true : false;
}
?>
<script>
function addPage(page) {
$.post('/webGui/include/MyFavorites.php',{action:'add',page:page},function(){
@@ -13,8 +20,8 @@ function addPage(page) {
$(function(){
$('div.Panel').each(function(){
var page = $(this).find('a').prop('href').split('/').pop();
$(this).find('span').append('<i class="fa fa-heart favo" title="_(Add to favorites)_" onclick="addPage(&quot;'+page+'&quot;);return false"></i>');
$(this).hover(function(){$(this).find('i.favo').show();},function(){$(this).find('i.favo').hide();});
if (<?=$favorites?>) {$(this).find('span').append('<i class="fa fa-heart favo" title="_(Add to favorites)_" onclick="addPage(&quot;'+page+'&quot;);return false"></i>');}
if (<?=$favorites?>) { $(this).hover(function(){$(this).find('i.favo').show();},function(){$(this).find('i.favo').hide();});}
});
});
</script>