From f91d88e1f010c56cb1e95ac12ac06809df49ee71 Mon Sep 17 00:00:00 2001 From: Simon Redfern Date: Fri, 2 Oct 2015 18:37:05 +0200 Subject: [PATCH] Adding anchor and href so can link to calls --- src/main/scala/code/snippet/ApiExplorer.scala | 4 +++- src/main/webapp/api-explorer.html | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main/scala/code/snippet/ApiExplorer.scala b/src/main/scala/code/snippet/ApiExplorer.scala index 136db5ae..009a1963 100644 --- a/src/main/scala/code/snippet/ApiExplorer.scala +++ b/src/main/scala/code/snippet/ApiExplorer.scala @@ -166,7 +166,9 @@ class ApiExplorer extends Loggable { // replace the node identified by the class "resource" with the following // This creates the list of resources in the DOM ".resource" #> resources.map { i => - ".resource_description" #> i.description & + ".resource_description *" #> i.description & + ".resource_description [href]" #> s"#${i.id}" & + ".resource_description [name]" #> s"${i.id}" & // Replace attribute named overview_text with the value (whole div/span element is replaced leaving just the text) "@overview_text" #> i.overview & // Give attributes named overview an id diff --git a/src/main/webapp/api-explorer.html b/src/main/webapp/api-explorer.html index d35a0f28..8e23304a 100644 --- a/src/main/webapp/api-explorer.html +++ b/src/main/webapp/api-explorer.html @@ -17,7 +17,7 @@ - + Description
Overview