X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=view%2Ftheme%2Ffrost%2Fjs%2Fmain.js;h=91e79ffc383164f9619dd44e4e663fd8a0c7be49;hb=dbf8f711cffbc7b659a06856b2301820c66274ca;hp=03ffd0381e914fb1b6aaf58fcae502774eaceb90;hpb=999c3439e6897525ff23bcbac9beb6a61f4bb421;p=friendica.git diff --git a/view/theme/frost/js/main.js b/view/theme/frost/js/main.js index 03ffd0381e..91e79ffc38 100644 --- a/view/theme/frost/js/main.js +++ b/view/theme/frost/js/main.js @@ -1,20 +1,32 @@ - function openClose(theID) { - if(document.getElementById(theID).style.display == "block") { - document.getElementById(theID).style.display = "none" - } - else { - document.getElementById(theID).style.display = "block" - } - } + function openClose(listID) { +/* if(document.getElementById(theID).style.display == "block") { + document.getElementById(theID).style.display = "none" + } + else { + document.getElementById(theID).style.display = "block" + }*/ + listID = "#" + listID.replace(/:/g, "\\:"); + listID = listID.replace(/\./g, "\\."); + listID = listID.replace(/@/g, "\\@"); + + if($j(listID).is(":visible")) { + $j(listID).hide(); + $j(listID+"-wrapper").show(); + } + else { + $j(listID).show(); + $j(listID+"-wrapper").hide(); + } + } - function openMenu(theID) { - document.getElementById(theID).style.display = "block" - } + function openMenu(theID) { + document.getElementById(theID).style.display = "block" + } - function closeMenu(theID) { - document.getElementById(theID).style.display = "none" - } + function closeMenu(theID) { + document.getElementById(theID).style.display = "none" + } @@ -167,6 +179,12 @@ html = notifications_tpl.format(e.attr('href'),e.attr('photo'), text, e.attr('date'), e.attr('seen')); nnm.append(html); }); + + $("img[data-src]", nnm).each(function(i, el){ + // Replace data-src attribute with src attribute for every image + $(el).attr('src', $(el).data("src")); + $(el).removeAttr("data-src"); + }); } notif = eNotif.attr('count'); if (notif>0){