mirror of
https://github.com/unraid/webgui.git
synced 2026-01-28 04:29:15 -06:00
User can add sections from Settings and Tools to a new page: Favorites This allows the user to make a custom list of sections which are preferred Sections can be removed from Favorites as desired
22 lines
714 B
Plaintext
22 lines
714 B
Plaintext
Menu="Tasks:90"
|
|
Type="xmenu"
|
|
Tabs="false"
|
|
Code="e909"
|
|
---
|
|
<script>
|
|
function addPage(page) {
|
|
$.post('/webGui/include/MyFavorites.php',{action:'add',page:page},function(){
|
|
swal({title:"_(Added to Favorites)_",text:"",type:"success",html:true,confirmButtonText:"_(Ok)_"});
|
|
});
|
|
}
|
|
|
|
$(function(){
|
|
$('i.PanelIcon').each(function(){
|
|
var icon = $(this);
|
|
var page = icon.closest('a').prop('href').split('/').pop();
|
|
icon.after('<i class="fa fa-plus-square-o favo" style="display:none" title="_(Add to favorites)_" onclick="addPage("'+page+'");return false"></i>');
|
|
icon.parent().parent().parent().hover(function(){icon.next().show();},function(){icon.next().hide();});
|
|
});
|
|
});
|
|
</script>
|