From 4615c75266ff6dd019a4396d194a2f8dc4802e85 Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Tue, 23 Sep 2014 23:57:35 +0200 Subject: [PATCH] use Ox.Element to avoid leaks --- static/js/info.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/static/js/info.js b/static/js/info.js index 1195b8df..8d54ba1d 100644 --- a/static/js/info.js +++ b/static/js/info.js @@ -40,7 +40,10 @@ pandora.ui.info = function() { pandora.$ui.listInfo && pandora.$ui.listInfo.remove(); pandora.$ui.posterInfo && pandora.$ui.posterInfo.remove(); pandora.$ui.videoPreview && pandora.$ui.videoPreview.remove(); - that.empty(); + that.empty(); + delete pandora.$ui.listInfo; + delete pandora.$ui.posterInfo; + delete pandora.$ui.videoPreview; } function getId() { @@ -164,6 +167,7 @@ pandora.ui.info = function() { }; that.updateListInfo = function() { + emptyInfo(); that.empty().append( pandora.$ui.listInfo = pandora.ui.listInfo() ); @@ -179,7 +183,7 @@ pandora.ui.listInfo = function() { folderItem = folderItems.slice(0, -1), list = pandora.user.ui.section == 'items' ? pandora.user.ui._list : ui[folderItem.toLowerCase()], canEditFeaturedLists = pandora.site.capabilities['canEditFeatured' + folderItems][pandora.user.level], - that = $('
').css({padding: '16px', textAlign: 'center'}), + that = Ox.Element().css({padding: '16px', textAlign: 'center'}), $icon = Ox.Element('') .attr({ src: list