From a8999f601b561ba56dc9977af2fc1b89a81c894f Mon Sep 17 00:00:00 2001 From: Tim Schaub Date: Fri, 22 Aug 2014 17:30:29 -0600 Subject: [PATCH] Hide unstable items by default, provide checkbox for toggling --- config/jsdoc/api/template/static/scripts/main.js | 11 ++++++++++- config/jsdoc/api/template/static/styles/jaguar.css | 9 +++++++++ config/jsdoc/api/template/tmpl/layout.tmpl | 5 ++++- 3 files changed, 23 insertions(+), 2 deletions(-) diff --git a/config/jsdoc/api/template/static/scripts/main.js b/config/jsdoc/api/template/static/scripts/main.js index 0ced914598..84f6ffb542 100644 --- a/config/jsdoc/api/template/static/scripts/main.js +++ b/config/jsdoc/api/template/static/scripts/main.js @@ -52,4 +52,13 @@ $(function () { $(window).on('resize', _onResize); _onResize(); -}); \ No newline at end of file + + // show/hide unstable items + var unstable = $('.unstable'); + var stabilityToggle = $('#stability-toggle'); + stabilityToggle.change(function() { + unstable.toggle(!this.checked); + return false; + }); + unstable.toggle(!stabilityToggle[0].checked); +}); diff --git a/config/jsdoc/api/template/static/styles/jaguar.css b/config/jsdoc/api/template/static/styles/jaguar.css index ae0d3cc16f..c3f55f84b7 100644 --- a/config/jsdoc/api/template/static/styles/jaguar.css +++ b/config/jsdoc/api/template/static/styles/jaguar.css @@ -372,3 +372,12 @@ footer { .main .readme table ul li { margin-bottom: 0; } +.unstable { + display: none; +} +#stability { + color: white; + position: absolute; + top: 1em; + right: 8em; +} diff --git a/config/jsdoc/api/template/tmpl/layout.tmpl b/config/jsdoc/api/template/tmpl/layout.tmpl index 42c0a49830..5e1789e190 100644 --- a/config/jsdoc/api/template/tmpl/layout.tmpl +++ b/config/jsdoc/api/template/tmpl/layout.tmpl @@ -18,8 +18,11 @@