show all button not working across all APIs

Bug #1734075 reported by Gilles Dubreuil on 2017-11-23
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
openstack-doc-tools
Undecided
binoy m v

Bug Description

On the API Guide pages, the "Show All" button doesn't work, it used to expand all resources.

For replicating use [2] or [3] and click on "Show All" button on top right.

This is important because the feature is used to "web crawl" all the API references.

[1] https://developer.openstack.org/api-guide/quick-start/
[2] https://developer.openstack.org/api-ref/compute/
[3] https://developer.openstack.org/api-ref/network/v2/

binoy m v (binoy.v) on 2017-12-05
Changed in openstack-doc-tools:
assignee: nobody → binoy m v (binoy.v)
binoy m v (binoy.v) wrote :

We can solve this bug by adding jquery code into the docs.js file.

//Toggle api details section.
$(".detail-control").addClass('collapse');
$("#expand-all").click(function () {
  $(".detail-control").toggleClass('collapse');
  $(this).text("Hide All");
});

In the above code hiding all the api section first and when we click on the "Show All" button it shows all the api section and changing the button text to "Hide All".

Changed in openstack-doc-tools:
status: New → In Progress
binoy m v (binoy.v) wrote :
Ian Y. Choi (ianychoi) wrote :

There is already javascript codes in http://git.openstack.org/cgit/openstack/os-api-ref/tree/os_api_ref/assets/api-site.js#n35 but the problem I think is that those javascript files are not loaded via index.html . http://git.openstack.org/cgit/openstack/os-api-ref/tree/os_api_ref/__init__.py#n668 describes some procedures. A stylesheet file is successfully referenced to index.html but two javascript files are not.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers