Files
webgui/emhttp/plugins/dynamix/Tools.page
bergware ac137e2b06 New feature: Favorites
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
2023-12-27 03:03:38 +01:00

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(&quot;'+page+'&quot;);return false"></i>');
icon.parent().parent().parent().hover(function(){icon.next().show();},function(){icon.next().hide();});
});
});
</script>