diff --git a/src/components/EditDictionaryForm.jsx b/src/components/EditDictionaryForm.jsx
index 8de6a4a..c730089 100644
--- a/src/components/EditDictionaryForm.jsx
+++ b/src/components/EditDictionaryForm.jsx
@@ -24,6 +24,7 @@ export class EditDictionaryForm extends React.Component {
saveOnClose() {
this.props.saveChanges({
name: this.nameField.state.value,
+ listTypeName: this.listTypeNameField.state.value,
description: this.descriptionField.state.value,
partsOfSpeech: this.partsOfSpeechField.state.value,
allowDuplicates: this.allowDuplicatesField.state.value,
@@ -54,6 +55,13 @@ export class EditDictionaryForm extends React.Component {
value={this.props.settings.partsOfSpeech}
ref={(inputComponent) => this.partsOfSpeechField = inputComponent} />
+ alert('The word used to describe the list of words represented by this dictionary. By default, it is "Dictionary", but it could be "Lexicon" or some other classification.')
+ }}
+ ref={(inputComponent) => this.listTypeNameField = inputComponent} />
+
this.allowDuplicatesField = inputComponent} />
diff --git a/src/components/Input.jsx b/src/components/Input.jsx
index 245aaac..78fb329 100644
--- a/src/components/Input.jsx
+++ b/src/components/Input.jsx
@@ -38,11 +38,19 @@ export class Input extends React.Component {
showHelperLink() {
if (this.props.helperLink) {
- return (
-
- {this.props.helperLink.label}
-
- );
+ if (this.props.helperLink.url) {
+ return (
+
+ {this.props.helperLink.label}
+
+ );
+ } else {
+ return (
+
+ );
+ }
}
}
diff --git a/src/index.jsx b/src/index.jsx
index 6464927..f6e68c2 100644
--- a/src/index.jsx
+++ b/src/index.jsx
@@ -15,6 +15,7 @@ import {Dictionary} from './components/Dictionary';
import {dynamicSort} from './js/helpers';
const defaultDictionaryName = 'New',
+ defaultListTypeName = 'Dictionary',
defaultDictionaryDescription = 'A new dictionary.',
defaultDictionaryCreatedBy = 'Someone',
defaultDictionaryPartsOfSpeech = 'Noun,Adjective,Verb,Adverb,Preposition,Pronoun,Conjunction';
@@ -33,6 +34,7 @@ class Lexiconga extends React.Component {
details: {
name: defaultDictionaryName,
+ listTypeName: defaultListTypeName,
description: defaultDictionaryDescription,
createdBy: defaultDictionaryCreatedBy,
nextWordId: 1,
@@ -58,6 +60,7 @@ class Lexiconga extends React.Component {
let updatedSettings = this.state.settings;
updatedDetails.name = changesObject.name;
+ updatedDetails.listTypeName = changesObject.listTypeName;
updatedDetails.description = changesObject.description;
updatedSettings.partsOfSpeech = changesObject.partsOfSpeech;
@@ -164,6 +167,7 @@ class Lexiconga extends React.Component {
saveLocalDictionary() {
let saveDictionary = {
name: this.state.details.name,
+ listTypeName: this.state.details.listTypeName,
description: this.state.details.description,
createdBy: this.state.details.createdBy,
words: this.state.words,
@@ -189,6 +193,7 @@ class Lexiconga extends React.Component {
this.setState({
details: {
name: localDictionary.name,
+ listTypeName: localDictionary.listTypeName || defaultListTypeName,
description: localDictionary.description,
createdBy: localDictionary.createdBy,
nextWordId: localDictionary.nextWordId,
@@ -244,7 +249,7 @@ class Lexiconga extends React.Component {
saveChanges={(changesObject) => this.saveChanges(changesObject)} />
- {this.state.details.name}
+ {this.state.details.name} {this.state.details.listTypeName}