Commit 996fb789 authored by kalman@chromium.org's avatar kalman@chromium.org

In the extension docs builder, allow DOM nodes to be specified as "volatile"

so that they aren't removed as part of the doc generation. This fixes the
samples page filter.

BUG=139107

Review URL: https://chromiumcodereview.appspot.com/10832363

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@153447 0039d316-1c4b-4281-b951-d872f2087c98
parent 3995789a
......@@ -276,6 +276,7 @@
<div id="searchbox" class="controlbox">
<strong>Filter by keyword:</strong>
<input autofocus="" type="search" id="searchinput" placeholder="Type to search" onkeyup="filterSamples();">
<a id="clearlink" href="javascript:void(0);" onclick="clearFilter();" style="display: none;">clear</a>
</div>
<div id="filterbox" class="controlbox">
<strong>Filter by API:</strong>
......@@ -4025,6 +4026,9 @@
<!-- Only show the Install CRX link if a CRX file is provided -->
</div>
</div>
<div id="noresults" style="display:none">
Sorry, no results were found.
</div>
</div>
<!-- API PAGE -->
<!-- /apiPage -->
......
......@@ -422,9 +422,11 @@ function cleanupJstemplateMess(root) {
// Delete nodes which are hidden. There are lots of these since jsdisplay
// just hides nodes, not deletes them.
if (n.style && n.style.display === 'none') {
if (!n.hasAttribute('volatile') && n.style && n.style.display === 'none') {
displayNone.push(n);
continue;
} else {
n.removeAttribute('volatile');
}
// Delete empty style attributes (this can happen when jsdisplay causes
......
......@@ -62,7 +62,7 @@
<div id="searchbox" class="controlbox">
<strong>Filter by keyword:</strong>
<input autofocus type="search" type="text" id="searchinput" placeholder="Type to search" onkeyup="filterSamples();" />
<a id="clearlink" href="javascript:void(0);" onclick="clearFilter();" style="display: none;">clear</a>
<a id="clearlink" href="javascript:void(0);" onclick="clearFilter();" style="display: none;" volatile>clear</a>
</div>
<div id="filterbox" class="controlbox">
......@@ -112,6 +112,6 @@
</div>
</div>
<div id="noresults" style="display:none">
<div id="noresults" style="display:none" volatile>
Sorry, no results were found.
</div>
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment