Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: include.postload.js

Issue 5838948538515456: Issue 370 - Make "Block element" hide elements for added filters (Closed)
Patch Set: Created March 4, 2015, 10:19 a.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « block.js ('k') | include.preload.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include.postload.js
===================================================================
--- a/include.postload.js
+++ b/include.postload.js
@@ -721,10 +721,11 @@
case "clickhide-close":
if (currentElement && msg.remove)
{
- // Explicitly get rid of currentElement
- var element = currentElement.prisoner || currentElement;
- if (element && element.parentNode)
- element.parentNode.removeChild(element);
+ checkCollapse(currentElement.prisoner || currentElement);
kzar 2015/03/04 13:09:03 IMHO there should be a comment here to mention we'
+
+ var selectors = msg.selectors;
kzar 2015/03/04 11:04:02 Shouldn't we check msg.remove is true first?
Sebastian Noack 2015/03/04 11:34:52 Well, we do above. ;)
kzar 2015/03/04 13:09:03 Gah, sorry!
kzar 2015/03/04 13:09:03 I think there should also be a comment here to say
Sebastian Noack 2015/03/04 14:02:01 I don't think it needs to be that verbose. But the
kzar 2015/03/04 14:04:14 Looks great.
+ if (selectors.length > 0)
+ hideElements(selectors);
}
clickHide_deactivate();
break;
« no previous file with comments | « block.js ('k') | include.preload.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld