From 979785c760d6d4ffe46fa09037844657a32eb727 Mon Sep 17 00:00:00 2001 From: Rob Cresswell Date: Wed, 26 Jul 2017 12:40:35 +0100 Subject: [PATCH] Fix a logic issue in the JS When I updated the icon selector as part of https://review.openstack.org/#/c/485290, I made an error in the logic meaning that the icons appear next to only the first of each item. This was part of an initial proposed solution, but isn't actually needed, and causes multiple usages of versionadded etc to not have icons. Change-Id: If1c1011d8a7ed1e78f2675eca7daf4e497a8bf9e --- doc/source/demo/index.rst | 10 ++++++++++ .../theme/openstackdocs/static/js/docs.js | 6 +++--- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/doc/source/demo/index.rst b/doc/source/demo/index.rst index a8d4885a..156901fc 100644 --- a/doc/source/demo/index.rst +++ b/doc/source/demo/index.rst @@ -130,14 +130,24 @@ Configuration addition and deprecation notices .. versionadded:: 9.0.0-Mitaka +.. versionadded:: 10.0.0-Newton + .. versionchanged:: 10.0.0-Newton Added support for new tags! +.. versionchanged:: 11.0.0-Ocata + + Showing that multiple notices work! + .. deprecated:: 11.0.0-Ocata Use `Notices`_ instead. +.. deprecated:: 12.0.0-Pike + + A second deprecation notice + .. toctree:: :maxdepth: 1 diff --git a/openstackdocstheme/theme/openstackdocs/static/js/docs.js b/openstackdocstheme/theme/openstackdocs/static/js/docs.js index 09e89d7d..a7291251 100644 --- a/openstackdocstheme/theme/openstackdocs/static/js/docs.js +++ b/openstackdocstheme/theme/openstackdocs/static/js/docs.js @@ -86,9 +86,9 @@ $('div.important > p.admonition-title').prepend('
 
'); $('div.seealso > p.admonition-title').prepend('
 
'); $('div.warning > p.admonition-title').prepend('
 
'); -$('div.versionadded > p').first().prepend('
 
'); -$('div.versionchanged > p').first().prepend('
 
'); -$('div.deprecated > p').first().prepend('
 
'); +$('div.versionadded > p').prepend('
 
'); +$('div.versionchanged > p').prepend('
 
'); +$('div.deprecated > p').prepend('
 
'); /* BB 150310 We also insert a space between the icon and the admonition title