Fix asciidoc formatting in JS API documentation

If anchor names contain dots they are not properly handled by
asciidoc.  The sections don't appear in the index block, and
any links to them cause warnings during formatting to html.

Replace dots with underscores in anchor names.

Also fix a couple of typos.

Change-Id: I3cdd65fbf987018c480373e5a3b4648eab283647
This commit is contained in:
David Pursehouse 2013-08-01 14:13:17 +09:00
parent 42f420482f
commit 8d0b520079

View File

@ -26,7 +26,7 @@ Plugin Instance
The plugin instance is passed to the plugin's initialization function
and provides a number of utility services to plugin authors.
[[self.delete]]
[[self_delete]]
self.delete()
~~~~~~~~~~~~~
Issues a DELETE REST API request to the Gerrit server.
@ -43,7 +43,7 @@ Gerrit.delete(url, callback)
JSON result of the API call. DELETE methods often return
`204 No Content`, which is passed as null.
[[self.get]]
[[self_get]]
self.get()
~~~~~~~~~~
Issues a GET REST API request to the Gerrit server.
@ -61,14 +61,14 @@ self.get(url, callback)
a string, otherwise the result is a JavaScript object or array,
as described in the relevant REST API documentation.
[[self.getPluginName]]
[[self_getPluginName]]
self.getPluginName()
~~~~~~~~~~~~~~~~~~~~
Returns the name this plugin was installed as by the server
administrator. The plugin name is required to access REST API
views installed by the plugin, or to access resources.
[[self.post]]
[[self_post]]
self.post()
~~~~~~~~~~~
Issues a POST REST API request to the Gerrit server.
@ -95,7 +95,7 @@ self.post(
function (r) {});
----
[[self.put]]
[[self_put]]
self.put()
~~~~~~~~~~
Issues a PUT REST API request to the Gerrit server.
@ -122,7 +122,7 @@ self.put(
function (r) {});
----
[[self.onAction]]
[[self_onAction]]
self.onAction()
~~~~~~~~~~~~~~~
Register a JavaScript callback to be invoked when the user clicks
@ -143,11 +143,11 @@ Gerrit.onAction(type, view_name, callback);
* callback: JavaScript function to invoke when the user clicks. The
function will be passed a link:#ActionContext[action context].
[[self.url]]
[[self_url]]
self.url()
~~~~~~~~~~
Returns a URL within the plugin's URL space. If invoked with no
parameter the the URL of the plugin is returned. If passed a string
parameter the URL of the plugin is returned. If passed a string
the argument is appended to the plugin URL.
----
@ -164,14 +164,14 @@ each time the associated action button is clicked by the user. A
context is initialized with sufficient state to issue the associated
REST API RPC.
[[context.action]]
[[context_action]]
context.action
~~~~~~~~~~~~~~
A link:rest-api-changes.html#action-info[ActionInfo] object instance
supplied by the server describing the UI button the user used to
invoke the action.
[[context.call]]
[[context_call]]
context.call()
~~~~~~~~~~~~~~
Issues the REST API call associated with the action. The HTTP method
@ -199,7 +199,7 @@ context.call(
});
----
[[context.change]]
[[context_change]]
context.change
~~~~~~~~~~~~~~
When the action is invoked on a change a
@ -207,7 +207,7 @@ link:rest-api-changes.html#change-info[ChangeInfo] object instance
describing the change. Available fields of the ChangeInfo may vary
based on the options used by the UI when it loaded the change.
[[context.delete]]
[[context_delete]]
context.delete()
~~~~~~~~~~~~~~~~
Issues a DELETE REST API call to the URL associated with the action.
@ -225,7 +225,7 @@ context.delete(callback)
context.delete(function () {});
----
[[context.get]]
[[context_get]]
context.get()
~~~~~~~~~~~~~
Issues a GET REST API call to the URL associated with the action.
@ -246,18 +246,18 @@ context.get(function (result) {
});
----
[[context.go]]
[[context_go]]
context.go()
~~~~~~~~~~~~
Go to a page. Shorthand for link:#Gerrit.go[`Gerrit.go()`].
Go to a page. Shorthand for link:#Gerrit_go[`Gerrit.go()`].
[[context.hide]]
[[context_hide]]
context.hide()
~~~~~~~~~~~~~~
Hide the currently visible popup displayed by
link:#context.popup[`context.popup()`].
link:#context_popup[`context.popup()`].
[[context.post]]
[[context_post]]
context.post()
~~~~~~~~~~~~~~
Issues a POST REST API call to the URL associated with the action.
@ -282,7 +282,7 @@ context.post(
});
----
[[context.popup]]
[[context_popup]]
context.popup()
~~~~~~~~~~~~~~~
@ -290,7 +290,7 @@ Displays a small popup near the activation button to gather
additional input from the user before executing the REST API RPC.
The caller is always responsible for closing the popup with
link#context.hide[`context.hide()`]. Gerrit will handle closing a
link#context_hide[`context.hide()`]. Gerrit will handle closing a
popup if the user presses `Escape` while keyboard focus is within
the popup.
@ -323,7 +323,7 @@ self.onAction('revision', 'start-build', function (c) {
});
----
[[context.put]]
[[context_put]]
context.put()
~~~~~~~~~~~~~
Issues a PUT REST API call to the URL associated with the action.
@ -348,13 +348,13 @@ context.put(
});
----
[[context.refresh]]
[[context_refresh]]
context.refresh()
~~~~~~~~~~~~~~~~~
Refresh the current display. Shorthand for
link:#Gerrit.refresh[`Gerrit.refresh()`].
link:#Gerrit_refresh[`Gerrit.refresh()`].
[[context.revision]]
[[context_revision]]
context.revision
~~~~~~~~~~~~~~~~
When the action is invoked on a specific revision of a change,
@ -404,11 +404,11 @@ The `Gerrit` object is the only symbol provided into the global
namespace by Gerrit Code Review. All top-level functions can be
accessed through this name.
[[Gerrit.delete]]
[[Gerrit_delete]]
Gerrit.delete()
~~~~~~~~~~~~~~~
Issues a DELETE REST API request to the Gerrit server. For plugin
private REST API URLs see link:#self.delete[self.delete()].
private REST API URLs see link:#self_delete[self.delete()].
.Signature
----
@ -428,11 +428,11 @@ Gerrit.delete(
function () {});
----
[[Gerrit.get]]
[[Gerrit_get]]
Gerrit.get()
~~~~~~~~~~~~
Issues a GET REST API request to the Gerrit server. For plugin
private REST API URLs see link:#self.get[self.get()].
private REST API URLs see link:#self_get[self.get()].
.Signature
----
@ -455,18 +455,18 @@ Gerrit.get('/changes/?q=status:open', function (open) {
});
----
[[Gerrit.getPluginName]]
[[Gerrit_getPluginName]]
Gerrit.getPluginName()
~~~~~~~~~~~~~~~~~~~~~~
Returns the name this plugin was installed as by the server
administrator. The plugin name is required to access REST API
views installed by the plugin, or to access resources.
Unlike link:#self.getPluginName[`self.getPluginName()`] this method
Unlike link:#self_getPluginName[`self.getPluginName()`] this method
must guess the name from the JavaScript call stack. Plugins are
encouraged to use `self.getPluginName()` whenever possible.
[[Gerrit.go]]
[[Gerrit_go]]
Gerrit.go()
~~~~~~~~~~~
Updates the web UI to display the view identified by the supplied
@ -480,7 +480,7 @@ If the URL passed matches `http://...`, `https://...`, or `//...`
the current browser window will navigate to the non-Gerrit URL.
The user can return to Gerrit with the back button.
[[Gerrit.install]]
[[Gerrit_install]]
Gerrit.install()
~~~~~~~~~~~~~~~~
Registers a new plugin by invoking the supplied initialization
@ -492,11 +492,11 @@ Gerrit.install(function (self) {
});
----
[[Gerrit.post]]
[[Gerrit_post]]
Gerrit.post()
~~~~~~~~~~~~~
Issues a POST REST API request to the Gerrit server. For plugin
private REST API URLs see link:#self.post[self.post()].
private REST API URLs see link:#self_post[self.post()].
.Signature
----
@ -520,11 +520,11 @@ Gerrit.post(
function (r) {});
----
[[Gerrit.put]]
[[Gerrit_put]]
Gerrit.put()
~~~~~~~~~~~~
Issues a PUT REST API request to the Gerrit server. For plugin
private REST API URLs see link:#self.put[self.put()].
private REST API URLs see link:#self_put[self.put()].
.Signature
----
@ -548,7 +548,7 @@ Gerrit.put(
function (r) {});
----
[[Gerrit.onAction]]
[[Gerrit_onAction]]
Gerrit.onAction()
~~~~~~~~~~~~~~~~~
Register a JavaScript callback to be invoked when the user clicks
@ -569,12 +569,12 @@ Gerrit.onAction(type, view_name, callback);
* callback: JavaScript function to invoke when the user clicks. The
function will be passed a link:#ActionContext[ActionContext].
[[Gerrit.refresh]]
[[Gerrit_refresh]]
Gerrit.refresh()
~~~~~~~~~~~~~~~~
Redisplays the current web UI view, refreshing all information.
[[Gerrit.url]]
[[Gerrit_url]]
Gerrit.url()
~~~~~~~~~~~~
Returns the URL of the Gerrit Code Review server. If invoked with
@ -586,7 +586,7 @@ Gerrit.url(); // "https://gerrit-review.googlesource.com/"
Gerrit.url('/123'); // "https://gerrit-review.googlesource.com/123"
----
For a plugin specific version see link:#self.url()[`self.url()`].
For a plugin specific version see link:#self_url()[`self.url()`].
GERRIT
------