mirror of
https://github.com/unraid/webgui.git
synced 2026-01-04 00:19:57 -06:00
21 lines
698 B
Plaintext
21 lines
698 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(x){refresh();});
|
|
});
|
|
}
|
|
|
|
$(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("'+page+'");return false"></i>');
|
|
$(this).hover(function(){$(this).find('i.favo').show();},function(){$(this).find('i.favo').hide();});
|
|
});
|
|
});
|
|
</script>
|