diff options
author | Scott Kennedy <skennedy@google.com> | 2012-11-12 10:33:04 -0800 |
---|---|---|
committer | Scott Kennedy <skennedy@google.com> | 2012-11-12 18:08:16 -0800 |
commit | eb9a4bdc53269ee05fe11870b9ebf03f18196585 (patch) | |
tree | e6522353f00c6118fc513b2c940e0cff3d9517fb /assets | |
parent | 6ce3d3da96fca57b91926b7bcaf5c6d67dc4bcd7 (diff) | |
download | android_packages_apps_UnifiedEmail-eb9a4bdc53269ee05fe11870b9ebf03f18196585.tar.gz android_packages_apps_UnifiedEmail-eb9a4bdc53269ee05fe11870b9ebf03f18196585.tar.bz2 android_packages_apps_UnifiedEmail-eb9a4bdc53269ee05fe11870b9ebf03f18196585.zip |
Fix always show pictures for multi-message thread
The always allow pictures button only affects a single message in the
thread, so we need to propogate it to all other messages from the
same sender.
Bug: 7346217
Change-Id: I722ef284afd7b8853ddab622f54b86ebaaa5d463
Diffstat (limited to 'assets')
-rw-r--r-- | assets/script.js | 31 |
1 files changed, 17 insertions, 14 deletions
diff --git a/assets/script.js b/assets/script.js index fa0212201..4a015786f 100644 --- a/assets/script.js +++ b/assets/script.js @@ -334,20 +334,23 @@ function measurePositions() { window.mail.onWebContentGeometryChange(overlayTops, overlayBottoms); } -function unblockImages(messageDomId) { - var i, images, imgCount, image, blockedSrc; - var msg = document.getElementById(messageDomId); - if (!msg) { - console.log("can't unblock, no matching message for id: " + messageDomId); - return; - } - images = msg.getElementsByTagName("img"); - for (i = 0, imgCount = images.length; i < imgCount; i++) { - image = images[i]; - blockedSrc = image.getAttribute(BLOCKED_SRC_ATTR); - if (blockedSrc) { - image.src = blockedSrc; - image.removeAttribute(BLOCKED_SRC_ATTR); +function unblockImages(messageDomIds) { + var i, j, images, imgCount, image, blockedSrc; + for (j = 0, len = messageDomIds.length; j < len; j++) { + var messageDomId = messageDomIds[j]; + var msg = document.getElementById(messageDomId); + if (!msg) { + console.log("can't unblock, no matching message for id: " + messageDomId); + continue; + } + images = msg.getElementsByTagName("img"); + for (i = 0, imgCount = images.length; i < imgCount; i++) { + image = images[i]; + blockedSrc = image.getAttribute(BLOCKED_SRC_ATTR); + if (blockedSrc) { + image.src = blockedSrc; + image.removeAttribute(BLOCKED_SRC_ATTR); + } } } } |