Skip to content

Commit 937c2ef

Browse files
committed
Remove uses of the word 'plugin'
1 parent 94d54c7 commit 937c2ef

File tree

8 files changed

+124
-122
lines changed

8 files changed

+124
-122
lines changed

css/annotator.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -683,7 +683,7 @@
683683
top: 0;
684684
}
685685

686-
/* Annotator Tags Plugin
686+
/* Annotator Tags
687687
-------------------------------------------------------------------- */
688688

689689
.annotator-tags {
@@ -703,7 +703,7 @@
703703
border-radius: 8px;
704704
}
705705

706-
/* Annotator Filter Plugin
706+
/* Annotator Filter
707707
-------------------------------------------------------------------- */
708708

709709
.annotator-filter {

doc/api/app.rst

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@ annotator package
1212

1313
.. function:: annotator.App.prototype.include(module[, options])
1414

15-
Include a plugin module. If an `options` object is supplied, it will be
16-
passed to the plugin module at initialisation.
15+
Include an extension module. If an `options` object is supplied, it will be
16+
passed to the module at initialisation.
1717

18-
If the returned plugin has a `configure` function, this will be called with
19-
the application registry as a parameter.
18+
If the returned module instance has a `configure` function, this will be
19+
called with the application registry as a parameter.
2020

2121
:param Object module:
2222
:param Object options:
@@ -30,15 +30,15 @@ annotator package
3030
components passed to the registry to their canonical names so they can be
3131
used by the rest of the application.
3232

33-
Runs the 'start' plugin hook.
33+
Runs the 'start' module hook.
3434

35-
:returns: A promise, resolved when all plugin 'start' hooks have completed.
35+
:returns: A promise, resolved when all module 'start' hooks have completed.
3636
:rtype: Promise
3737

3838

3939
.. function:: annotator.App.prototype.destroy()
4040

41-
Destroy the App. Unbinds all event handlers and runs the 'destroy' plugin
41+
Destroy the App. Unbinds all event handlers and runs the 'destroy' module
4242
hook.
4343

4444
:returns: A promise, resolved when destroyed.

doc/api/storage.rst

Lines changed: 81 additions & 79 deletions
Original file line numberDiff line numberDiff line change
@@ -4,166 +4,166 @@ annotator.storage package
44
=========================
55

66
.. function:: annotator.storage.debug()
7-
7+
88
A storage component that can be used to print details of the annotation
99
persistence processes to the console when developing other parts of
1010
Annotator.
11-
12-
Use as a plugin module::
13-
11+
12+
Use as an extension module::
13+
1414
app.include(annotator.storage.debug);
1515

1616

1717
.. function:: annotator.storage.noop()
18-
18+
1919
A no-op storage component. It swallows all calls and does the bare minimum
2020
needed. Needless to say, it does not provide any real persistence.
21-
22-
Use as a plugin module::
23-
21+
22+
Use as a extension module::
23+
2424
app.include(annotator.storage.noop);
2525

2626

2727
.. function:: annotator.storage.http([options])
28-
29-
A module that configures an instance of
28+
29+
A module which configures an instance of
3030
:class:`annotator.storage.HttpStorage` as the storage component.
31-
31+
3232
:param Object options:
3333
Configuration options. For available options see
3434
:attr:`~annotator.storage.HttpStorage.options`.
3535

3636

3737
.. class:: annotator.storage.HttpStorage([options])
38-
38+
3939
HttpStorage is a storage component that talks to a remote JSON + HTTP API
4040
that should be relatively easy to implement with any web application
4141
framework.
42-
42+
4343
:param Object options: See :attr:`~annotator.storage.HttpStorage.options`.
4444

4545

4646
.. function:: annotator.storage.HttpStorage.prototype.create(annotation)
47-
47+
4848
Create an annotation.
49-
49+
5050
**Examples**::
51-
51+
5252
store.create({text: "my new annotation comment"})
5353
// => Results in an HTTP POST request to the server containing the
5454
// annotation as serialised JSON.
55-
55+
5656
:param Object annotation: An annotation.
5757
:returns: The request object.
5858
:rtype: Promise
5959

6060

6161
.. function:: annotator.storage.HttpStorage.prototype.update(annotation)
62-
62+
6363
Update an annotation.
64-
64+
6565
**Examples**::
66-
66+
6767
store.update({id: "blah", text: "updated annotation comment"})
6868
// => Results in an HTTP PUT request to the server containing the
6969
// annotation as serialised JSON.
70-
70+
7171
:param Object annotation: An annotation. Must contain an `id`.
7272
:returns: The request object.
7373
:rtype: Promise
7474

7575

7676
.. function:: annotator.storage.HttpStorage.prototype.delete(annotation)
77-
77+
7878
Delete an annotation.
79-
79+
8080
**Examples**::
81-
81+
8282
store.delete({id: "blah"})
8383
// => Results in an HTTP DELETE request to the server.
84-
84+
8585
:param Object annotation: An annotation. Must contain an `id`.
8686
:returns: The request object.
8787
:rtype: Promise
8888

8989

9090
.. function:: annotator.storage.HttpStorage.prototype.query(queryObj)
91-
91+
9292
Searches for annotations matching the specified query.
93-
93+
9494
:param Object queryObj: An object describing the query.
9595
:returns:
9696
A promise, resolves to an object containing query `results` and `meta`.
9797
:rtype: Promise
9898

9999

100100
.. function:: annotator.storage.HttpStorage.prototype.setHeader(name, value)
101-
101+
102102
Set a custom HTTP header to be sent with every request.
103-
103+
104104
**Examples**::
105-
105+
106106
store.setHeader('X-My-Custom-Header', 'MyCustomValue')
107-
107+
108108
:param string name: The header name.
109109
:param string value: The header value.
110110

111111

112112
.. attribute:: annotator.storage.HttpStorage.options
113-
113+
114114
Available configuration options for HttpStorage. See below.
115115

116116

117117
.. attribute:: annotator.storage.HttpStorage.options.emulateHTTP
118-
119-
Should the plugin emulate HTTP methods like PUT and DELETE for
118+
119+
Should the storage emulate HTTP methods like PUT and DELETE for
120120
interaction with legacy web servers? Setting this to `true` will fake
121121
HTTP `PUT` and `DELETE` requests with an HTTP `POST`, and will set the
122122
request header `X-HTTP-Method-Override` with the name of the desired
123123
method.
124-
124+
125125
**Default**: ``false``
126126

127127

128128
.. attribute:: annotator.storage.HttpStorage.options.emulateJSON
129-
130-
Should the plugin emulate JSON POST/PUT payloads by sending its requests
129+
130+
Should the storage emulate JSON POST/PUT payloads by sending its requests
131131
as application/x-www-form-urlencoded with a single key, "json"
132-
132+
133133
**Default**: ``false``
134134

135135

136136
.. attribute:: annotator.storage.HttpStorage.options.headers
137-
137+
138138
A set of custom headers that will be sent with every request. See also
139139
the setHeader method.
140-
140+
141141
**Default**: ``{}``
142142

143143

144144
.. attribute:: annotator.storage.HttpStorage.options.onError
145-
145+
146146
Callback, called if a remote request throws an error.
147147

148148

149149
.. attribute:: annotator.storage.HttpStorage.options.prefix
150-
150+
151151
This is the API endpoint. If the server supports Cross Origin Resource
152152
Sharing (CORS) a full URL can be used here.
153-
153+
154154
**Default**: ``'/store'``
155155

156156

157157
.. attribute:: annotator.storage.HttpStorage.options.urls
158-
158+
159159
The server URLs for each available action. These URLs can be anything but
160160
must respond to the appropriate HTTP method. The URLs are Level 1 URI
161161
Templates as defined in RFC6570:
162-
162+
163163
http://tools.ietf.org/html/rfc6570#section-1.2
164-
164+
165165
**Default**::
166-
166+
167167
{
168168
create: '/annotations',
169169
update: '/annotations/{id}',
@@ -173,97 +173,99 @@ annotator.storage package
173173

174174

175175
.. class:: annotator.storage.StorageAdapter(store, runHook)
176-
176+
177177
StorageAdapter wraps a concrete implementation of the Storage interface, and
178178
ensures that the appropriate hooks are fired when annotations are created,
179179
updated, deleted, etc.
180-
181-
:param store: The Store implementation that manages persistence
182-
:param Function runHook: A function that can be used to run lifecycle hooks
180+
181+
:param store: The Store implementation which manages persistence
182+
:param Function runHook: A function which can be used to run lifecycle hooks
183183

184184

185185
.. function:: annotator.storage.StorageAdapter.prototype.create(obj)
186-
186+
187187
Creates and returns a new annotation object.
188-
188+
189189
Runs the 'beforeAnnotationCreated' hook to allow the new annotation to be
190190
initialized or its creation prevented.
191-
191+
192192
Runs the 'annotationCreated' hook when the new annotation has been created
193193
by the store.
194-
194+
195195
**Examples**:
196-
196+
197197
::
198-
198+
199199
registry.on('beforeAnnotationCreated', function (annotation) {
200200
annotation.myProperty = 'This is a custom property';
201201
});
202202
registry.create({}); // Resolves to {myProperty: "This is a…"}
203-
204-
205-
:param Object annotation: An object from that to create an annotation.
203+
204+
205+
:param Object annotation: An object from which to create an annotation.
206206
:returns Promise: Resolves to annotation object when stored.
207207

208208

209209
.. function:: annotator.storage.StorageAdapter.prototype.update(obj)
210-
210+
211211
Updates an annotation.
212-
212+
213213
Runs the 'beforeAnnotationUpdated' hook to allow an annotation to be
214214
modified before being passed to the store, or for an update to be prevented.
215-
215+
216216
Runs the 'annotationUpdated' hook when the annotation has been updated by
217217
the store.
218-
218+
219219
**Examples**:
220-
220+
221221
::
222-
222+
223223
annotation = {tags: 'apples oranges pears'};
224224
registry.on('beforeAnnotationUpdated', function (annotation) {
225225
// validate or modify a property.
226226
annotation.tags = annotation.tags.split(' ')
227227
});
228228
registry.update(annotation)
229229
// => Resolves to {tags: ["apples", "oranges", "pears"]}
230-
230+
231231
:param Object annotation: An annotation object to update.
232232
:returns Promise: Resolves to annotation object when stored.
233233

234234

235235
.. function:: annotator.storage.StorageAdapter.prototype.delete(obj)
236-
236+
237237
Deletes the annotation.
238-
238+
239239
Runs the 'beforeAnnotationDeleted' hook to allow an annotation to be
240240
modified before being passed to the store, or for the a deletion to be
241241
prevented.
242-
242+
243243
Runs the 'annotationDeleted' hook when the annotation has been deleted by
244244
the store.
245-
245+
246246
:param Object annotation: An annotation object to delete.
247247
:returns Promise: Resolves to annotation object when deleted.
248248

249249

250250
.. function:: annotator.storage.StorageAdapter.prototype.query(query)
251-
251+
252252
Queries the store
253-
253+
254254
:param Object query:
255255
A query. This may be interpreted differently by different stores.
256-
256+
257257
:returns Promise: Resolves to the store return value.
258258

259259

260260
.. function:: annotator.storage.StorageAdapter.prototype.load(query)
261-
261+
262262
Load and draw annotations from a given query.
263-
264-
Runs the 'load' hook to allow plugins to respond to annotations being loaded.
265-
263+
264+
Runs the 'load' hook to allow modules to respond to annotations being loaded.
265+
266266
:param Object query:
267267
A query. This may be interpreted differently by different stores.
268-
268+
269269
:returns Promise: Resolves when loading is complete.
270+
271+

0 commit comments

Comments
 (0)