From 787688ef33cc0a738104fdd43025d3b4712110df Mon Sep 17 00:00:00 2001 From: Tim Schaub Date: Fri, 22 Aug 2014 17:27:29 -0600 Subject: [PATCH 1/3] Copy stability from doclet to observable --- config/jsdoc/api/plugins/observable.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/config/jsdoc/api/plugins/observable.js b/config/jsdoc/api/plugins/observable.js index bd9076647e..cc480d42c0 100644 --- a/config/jsdoc/api/plugins/observable.js +++ b/config/jsdoc/api/plugins/observable.js @@ -34,6 +34,9 @@ exports.handlers = { } else if (doclet.name.indexOf('set') === 0) { observable.readonly = false; } + if (doclet.stability) { + observable.stability = doclet.stability; + } if (!cls.observables) { cls.observables = []; } From ecaedff89076b65a20b288f0c99be27e703893fe Mon Sep 17 00:00:00 2001 From: Tim Schaub Date: Fri, 22 Aug 2014 17:28:50 -0600 Subject: [PATCH 2/3] Add "unstable" class to unstable items This also removes the events from the sidebar. These are repeated on the main page and only add unnecessary length to the sidebar. --- .../api/template/static/styles/jaguar.css | 1 - config/jsdoc/api/template/tmpl/method.tmpl | 6 ++-- .../jsdoc/api/template/tmpl/navigation.tmpl | 33 ++----------------- .../jsdoc/api/template/tmpl/observables.tmpl | 2 +- config/jsdoc/api/template/tmpl/params.tmpl | 2 +- 5 files changed, 8 insertions(+), 36 deletions(-) diff --git a/config/jsdoc/api/template/static/styles/jaguar.css b/config/jsdoc/api/template/static/styles/jaguar.css index cb4fc866a3..ae0d3cc16f 100644 --- a/config/jsdoc/api/template/static/styles/jaguar.css +++ b/config/jsdoc/api/template/static/styles/jaguar.css @@ -286,7 +286,6 @@ span.type-signature.static { width: 110px; } .main table .type { - width: 60px; color: #aaa; font-size: 12px; } diff --git a/config/jsdoc/api/template/tmpl/method.tmpl b/config/jsdoc/api/template/tmpl/method.tmpl index da9542236d..6f5d4c6e0c 100644 --- a/config/jsdoc/api/template/tmpl/method.tmpl +++ b/config/jsdoc/api/template/tmpl/method.tmpl @@ -2,7 +2,7 @@ var data = obj; var self = this; ?> -
+

@@ -23,7 +23,7 @@ var self = this;

-
+
@@ -67,7 +67,7 @@ var self = this; description = eventDoclet.description.replace(/<[^>]*>/g, ''); } ?> -
  • +
  • -
  • - - -
      - - Fires - -
    • - -
    -
      - - Events - -
    • +
    • + +
    • - + diff --git a/config/jsdoc/api/template/tmpl/params.tmpl b/config/jsdoc/api/template/tmpl/params.tmpl index e1fd3c1f14..8b6fb22de4 100644 --- a/config/jsdoc/api/template/tmpl/params.tmpl +++ b/config/jsdoc/api/template/tmpl/params.tmpl @@ -71,7 +71,7 @@ if (!param) { return; } ?> - + From a8999f601b561ba56dc9977af2fc1b89a81c894f Mon Sep 17 00:00:00 2001 From: Tim Schaub Date: Fri, 22 Aug 2014 17:30:29 -0600 Subject: [PATCH 3/3] 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 @@