mirror of
https://github.com/unraid/webgui.git
synced 2026-02-25 11:49:12 -06:00
Favorites: fix not all items could be added to favorites
This commit is contained in:
@@ -6,16 +6,15 @@ Code="e924"
|
||||
<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)_"});
|
||||
swal({title:"_(Added to Favorites)_",text:"",type:"success",html:true,confirmButtonText:"_(Ok)_"},function(x){refresh();});
|
||||
});
|
||||
}
|
||||
|
||||
$(function(){
|
||||
$('i.PanelIcon').each(function(){
|
||||
var icon = $(this);
|
||||
var page = icon.closest('a').prop('href').split('/').pop();
|
||||
icon.after('<i class="fa fa-heart favo" title="_(Add to favorites)_" onclick="addPage("'+page+'");return false"></i>');
|
||||
icon.parent().parent().parent().hover(function(){icon.next().show();},function(){icon.next().hide();});
|
||||
$('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>
|
||||
|
||||
@@ -6,16 +6,14 @@ 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)_"});
|
||||
swal({title:"_(Added to Favorites)_",text:"",type:"success",html:true,confirmButtonText:"_(Ok)_"},function(x){refresh();});
|
||||
});
|
||||
}
|
||||
|
||||
$(function(){
|
||||
$('i.PanelIcon').each(function(){
|
||||
var icon = $(this);
|
||||
var page = icon.closest('a').prop('href').split('/').pop();
|
||||
icon.after('<i class="fa fa-heart favo" title="_(Add to favorites)_" onclick="addPage("'+page+'");return false"></i>');
|
||||
icon.parent().parent().parent().hover(function(){icon.next().show();},function(){icon.next().hide();});
|
||||
$('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>
|
||||
|
||||
Reference in New Issue
Block a user