-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
implement new annotator widget plugins framework and apply to form
- Loading branch information
1 parent
e161f7a
commit 5d0f0f5
Showing
9 changed files
with
106 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
if (!window.hasOwnProperty("doaj")) { doaj = {}} | ||
if (!doaj.hasOwnProperty("annotators")) { doaj.annotators = {}} | ||
|
||
doaj.annotators.ISSNActive = class { | ||
|
||
MESSAGES = { | ||
"unable_to_access": "We were unable to access the ISSN.org service", | ||
"not_found": "The ISSN was not found at ISSN.org", | ||
"fully_validated": "The ISSN is fully registered at ISSN.org", | ||
"not_validated": "The ISSN has not been registered at ISSN.org" | ||
} | ||
|
||
ICONS = { | ||
"unable_to_access": "clock", | ||
"not_found": "x-circle", | ||
"fully_validated": "check-circle", | ||
"not_validated": "x-circle" | ||
} | ||
|
||
draw(annotation) { | ||
let icon = this.ICONS[annotation.advice]; | ||
let message = this.MESSAGES[annotation.advice]; | ||
|
||
let frag = `<span data-feather="${icon}" aria-hidden="true"></span> | ||
Checked ${annotation.original_value}: ${message} (see | ||
<a href="${annotation.reference_url}">${annotation.reference_url})</a>`; | ||
return frag; | ||
} | ||
} | ||
|
||
doaj.annotators.registry = { | ||
"issn_active": doaj.annotators.ISSNActive | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters