diff --git a/css/styles.css b/css/styles.css index 0c3d784..5811dd4 100644 --- a/css/styles.css +++ b/css/styles.css @@ -2,6 +2,7 @@ padding: 0; margin: 0; border: none; + font-family: Georgia, 'Times New Roman', Times, serif; } footer { @@ -38,11 +39,25 @@ label span { font-weight: bold; } +label label { + margin-left: 20px; +} + +label span.checkboxlabel { + display: inline; + margin-left: 10px; +} + input, textarea { display: block; padding-left: 5px; } +input[type=checkbox] { + display: inline; + margin: 5px; +} + #longDefinition { width: 350px; height: 200px; @@ -69,6 +84,15 @@ input, textarea { margin: 0 0 5px; } +#dictionaryDescription { + width: 100%; + max-height: 400px; + overflow-y: auto; + padding: 15px; + border: 1px solid #cacaca; + margin: 10px; +} + .clickable { font-weight: bold; cursor: pointer; @@ -98,6 +122,7 @@ entry { word { font-weight: bold; + font-size: 20px; } partofspeech { @@ -105,8 +130,9 @@ partofspeech { font-size: 10px; } -shortdefinition { +simpledefinition { display: block; + font-style: italic; } longdefinition { @@ -167,6 +193,7 @@ longDefinition p { .deleteConfirm { display: block; font-size: 10px; + margin: 10px; } #settingsBackgroundFade, #aboutBackgroundFade { diff --git a/index.html b/index.html index 4b331e6..1d68df0 100644 --- a/index.html +++ b/index.html @@ -76,8 +76,9 @@

Dictionary Settings

+
+
+
@@ -147,11 +157,11 @@ Please note that if you have other parts of speech added to existing words, those words will not update and will keep the old parts of speech. You will need to manually update any words with incorrect parts of speech after the fact, which is why I recommend you update the available parts of speech as one of the first things you do if you need to change them at all!

- The Allow Duplicates checkbox allows you to control whether or not Dictionary Builder will allow you to add the same word multiple times. If you leave Allow Duplicates unchecked and you try to add a word that is already in the dictionary, Dictionary Builder will tell you that the word already exists and will ask if you want to update it with the newly entered word. Note: Allow Duplicates is not yet in the Settings menu! + The Allow Duplicates checkbox allows you to control whether or not Dictionary Builder will allow you to add the same word multiple times. If you leave Allow Duplicates unchecked and you try to add a word that is already in the dictionary, Dictionary Builder will tell you that the word already exists and will ask if you want to update it with the newly entered word.

The Case-Sensitive checkbox allows you to control Dictionary Builder's duplicate detection. If you leave Case-Sensitive unchecked, you will be alerted when you are trying to add a word with the same letters to your dictionary a second time. For example, "dog" is identified as the same word as "DOG" or "doG". The dictionary will keep whatever capitalization you save but it will identify words with the same spelling as duplicates. If Case-Sensitive is checked, then it will not identify "dog" and "DOG" as the same word.
- If Allow Duplicates is checked, this checkbox becomes unavailable. Note: Case-Sensitive is not yet in the Settings menu! + If Allow Duplicates is checked, this checkbox becomes unavailable.

The "Dictionary is complete" checkbox will make the word add/edit form go away so you can view or share it more easily/safely. Plus when you export your dictionary, all of the options to change anything about your dictionary will be excluded when it is re-imported! Your dictionary will become static, and will not be able to be changed or updated without a password. Note: At the moment, ONLY the word form goes away. Nothing else in this paragraph is implemented yet! diff --git a/js/dictionaryBuilder.js b/js/dictionaryBuilder.js index a64ca0a..0211fc7 100644 --- a/js/dictionaryBuilder.js +++ b/js/dictionaryBuilder.js @@ -6,8 +6,8 @@ var currentDictionary = { description: "A new dictionary.", words: [], settings: { + allowDuplicates: false, caseSensitive: false, - preferUpperCase: false, partsOfSpeech: "Noun,Adjective,Verb,Adverb,Preposition,Pronoun,Conjunction", isComplete: false }, @@ -96,7 +96,7 @@ function AddWord() { currentDictionary.words.sort(dynamicSort("name")); errorMessageArea.innerHTML = ""; - ShowDictionary(); + ShowDictionary(document.getElementById("wordFilter").value); SaveDictionary(); } else { if (word == "") { @@ -152,7 +152,7 @@ function UpdateWord(wordIndex, word, simpleDefinition, longDefinition, partOfSpe currentDictionary.words[wordIndex].simpleDefinition = simpleDefinition; currentDictionary.words[wordIndex].longDefinition = longDefinition; currentDictionary.words[wordIndex].partOfSpeech = partOfSpeech; - ShowDictionary(); + ShowDictionary(document.getElementById("wordFilter").value); SaveDictionary(); ClearForm(); CloseUpdateConflictArea(); @@ -165,7 +165,7 @@ function DeleteWord(index) { ClearForm(); currentDictionary.words.splice(index, 1); - ShowDictionary(); + ShowDictionary(document.getElementById("wordFilter").value); SaveDictionary(); CloseUpdateConflictArea(); @@ -189,9 +189,7 @@ function ClearForm() { } function UpdateFilter() { - var filter = document.getElementById("wordFilter").value; - - ShowDictionary(filter); + ShowDictionary(document.getElementById("wordFilter").value); } function ShowDictionary(filter) { @@ -244,14 +242,16 @@ function DictionaryEntry(itemIndex) { entryText += "
"; if (currentDictionary.words[itemIndex].simpleDefinition != "") { - entryText += " ==> " + currentDictionary.words[itemIndex].simpleDefinition + ""; + entryText += "" + currentDictionary.words[itemIndex].simpleDefinition + ""; } if (currentDictionary.words[itemIndex].longDefinition != "") { entryText += "" + markdown.toHTML(htmlEntitiesParse(currentDictionary.words[itemIndex].longDefinition)) + ""; } - entryText += ManagementArea(itemIndex); + if (!currentDictionary.settings.isComplete) { + entryText += ManagementArea(itemIndex); + } entryText += ""; @@ -264,7 +264,7 @@ function ManagementArea(itemIndex) { managementHTML += "Edit"; managementHTML += "Delete"; - managementHTML += "