Update sql types; Add html input maxlength
This commit is contained in:
parent
b6e6390dde
commit
502065b08a
33
index.html
33
index.html
|
@ -81,17 +81,17 @@
|
||||||
<div id="mobileWordFormShow">+</div>
|
<div id="mobileWordFormShow">+</div>
|
||||||
<form id="wordForm">
|
<form id="wordForm">
|
||||||
<label>Word<span class="red">*</span><br>
|
<label>Word<span class="red">*</span><br>
|
||||||
<input id="wordName">
|
<input id="wordName" maxlength="200">
|
||||||
</label>
|
</label>
|
||||||
<label>Pronunciation<a class="label-button ipa-table-button">IPA Chart</a><br>
|
<label>Pronunciation<a class="label-button ipa-table-button">IPA Chart</a><br>
|
||||||
<input id="wordPronunciation" class="ipa-field"><br>
|
<input id="wordPronunciation" class="ipa-field" maxlength="200"><br>
|
||||||
<a class="label-help-button ipa-field-help-button">Field Help</a>
|
<a class="label-help-button ipa-field-help-button">Field Help</a>
|
||||||
</label>
|
</label>
|
||||||
<label>Part of Speech<br>
|
<label>Part of Speech<br>
|
||||||
<select id="wordPartOfSpeech" class="part-of-speech-select"></select>
|
<select id="wordPartOfSpeech" class="part-of-speech-select"></select>
|
||||||
</label>
|
</label>
|
||||||
<label>Definition<span class="red">*</span><br>
|
<label>Definition<span class="red">*</span><br>
|
||||||
<input id="wordDefinition" placeholder="Equivalent words">
|
<input id="wordDefinition" maxlength="2500" placeholder="Equivalent words">
|
||||||
</label>
|
</label>
|
||||||
<label>Details<span class="red">*</span><a class="label-button maximize-button">Maximize</a><br>
|
<label>Details<span class="red">*</span><a class="label-button maximize-button">Maximize</a><br>
|
||||||
<textarea id="wordDetails" placeholder="Markdown formatting allowed"></textarea>
|
<textarea id="wordDetails" placeholder="Markdown formatting allowed"></textarea>
|
||||||
|
@ -193,10 +193,10 @@
|
||||||
</nav>
|
</nav>
|
||||||
<section id="editDescriptionTab">
|
<section id="editDescriptionTab">
|
||||||
<label>Name<br>
|
<label>Name<br>
|
||||||
<input id="editName">
|
<input id="editName" maxlength="50">
|
||||||
</label>
|
</label>
|
||||||
<label>Specification<br>
|
<label>Specification<br>
|
||||||
<input id="editSpecification">
|
<input id="editSpecification" maxlength="50">
|
||||||
</label>
|
</label>
|
||||||
<label>Description<a class="label-button maximize-button">Maximize</a><br>
|
<label>Description<a class="label-button maximize-button">Maximize</a><br>
|
||||||
<textarea id="editDescription"></textarea>
|
<textarea id="editDescription"></textarea>
|
||||||
|
@ -205,7 +205,7 @@
|
||||||
|
|
||||||
<section id="editDetailsTab" style="display:none;">
|
<section id="editDetailsTab" style="display:none;">
|
||||||
<label>Parts of Speech <small>(Comma Separated List)</small><br>
|
<label>Parts of Speech <small>(Comma Separated List)</small><br>
|
||||||
<input id="editPartsOfSpeech">
|
<input id="editPartsOfSpeech" maxlength="2500" placeholder="Noun,Adjective,Verb">
|
||||||
</label>
|
</label>
|
||||||
<label>Alphabetical Order <small>(Comma Separated List. Include every letter!)</small><br>
|
<label>Alphabetical Order <small>(Comma Separated List. Include every letter!)</small><br>
|
||||||
<input id="editAlphabeticalOrder" disabled value="English Alphabet">
|
<input id="editAlphabeticalOrder" disabled value="English Alphabet">
|
||||||
|
@ -215,7 +215,7 @@
|
||||||
<div>
|
<div>
|
||||||
<label>Consonants<br>
|
<label>Consonants<br>
|
||||||
<small>(Space separated list)</small><br>
|
<small>(Space separated list)</small><br>
|
||||||
<input id="editConsonants" class="ipa-field" placeholder="p b m n t ..."><br>
|
<input id="editConsonants" class="ipa-field" maxlength="100" placeholder="p b m n t ..."><br>
|
||||||
<a class="label-help-button ipa-field-help-button">Field Help</a>
|
<a class="label-help-button ipa-field-help-button">Field Help</a>
|
||||||
<a class="label-button ipa-table-button">IPA Chart</a>
|
<a class="label-button ipa-table-button">IPA Chart</a>
|
||||||
</label>
|
</label>
|
||||||
|
@ -223,7 +223,7 @@
|
||||||
<div>
|
<div>
|
||||||
<label>Vowels<br>
|
<label>Vowels<br>
|
||||||
<small>(Space separated list)</small><br>
|
<small>(Space separated list)</small><br>
|
||||||
<input id="editVowels" class="ipa-field" placeholder="æ u e ɪ ..."><br>
|
<input id="editVowels" class="ipa-field" maxlength="100" placeholder="æ u e ɪ ..."><br>
|
||||||
<a class="label-help-button ipa-field-help-button">Field Help</a>
|
<a class="label-help-button ipa-field-help-button">Field Help</a>
|
||||||
<a class="label-button ipa-table-button">IPA Chart</a>
|
<a class="label-button ipa-table-button">IPA Chart</a>
|
||||||
</label>
|
</label>
|
||||||
|
@ -231,7 +231,7 @@
|
||||||
<div>
|
<div>
|
||||||
<label>Polyphthongs / Blends<br>
|
<label>Polyphthongs / Blends<br>
|
||||||
<small>(Space separated list)</small><br>
|
<small>(Space separated list)</small><br>
|
||||||
<input id="editBlends" class="ipa-field" placeholder="ai ou ue ..."><br>
|
<input id="editBlends" class="ipa-field" maxlength="100" placeholder="ai ou ue ..."><br>
|
||||||
<a class="label-help-button ipa-field-help-button">Field Help</a>
|
<a class="label-help-button ipa-field-help-button">Field Help</a>
|
||||||
<a class="label-button ipa-table-button">IPA Chart</a>
|
<a class="label-button ipa-table-button">IPA Chart</a>
|
||||||
</label>
|
</label>
|
||||||
|
@ -241,29 +241,32 @@
|
||||||
<div class="split three">
|
<div class="split three">
|
||||||
<div>
|
<div>
|
||||||
<label>Onset<br>
|
<label>Onset<br>
|
||||||
<input id="editOnset">
|
<small>(Comma separated list)</small><br>
|
||||||
|
<input id="editOnset" maxlength="100" placeholder="Consonants,Vowels">
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<label>Nucleus<br>
|
<label>Nucleus<br>
|
||||||
<input id="editNucleus">
|
<small>(Comma separated list)</small><br>
|
||||||
|
<input id="editNucleus" maxlength="100" placeholder="Vowels,Blends">
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<label>Coda<br>
|
<label>Coda<br>
|
||||||
<input id="editCoda">
|
<small>(Comma separated list)</small><br>
|
||||||
|
<input id="editCoda" maxlength="100" placeholder="Any">
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<label>Exceptions<br>
|
<label>Exceptions <small>(Markdown-enabled)</small><br>
|
||||||
<textarea id="editExceptions"></textarea>
|
<textarea id="editExceptions"></textarea>
|
||||||
</label>
|
</label>
|
||||||
<h3>Orthography</h3>
|
<h3>Orthography</h3>
|
||||||
<label>Notes<a class="label-button maximize-button">Maximize</a><br>
|
<label>Notes <small>(Markdown-enabled)</small><a class="label-button maximize-button">Maximize</a><br>
|
||||||
<textarea id="editOrthography"></textarea>
|
<textarea id="editOrthography"></textarea>
|
||||||
</label>
|
</label>
|
||||||
<h3>Grammar</h3>
|
<h3>Grammar</h3>
|
||||||
<label>Notes<a class="label-button maximize-button">Maximize</a><br>
|
<label>Notes <small>(Markdown-enabled)</small><a class="label-button maximize-button">Maximize</a><br>
|
||||||
<textarea id="editGrammar"></textarea>
|
<textarea id="editGrammar"></textarea>
|
||||||
</label>
|
</label>
|
||||||
</section>
|
</section>
|
||||||
|
|
|
@ -11,10 +11,10 @@ export function renderLoginForm() {
|
||||||
<div>
|
<div>
|
||||||
<h2>Log In</h2>
|
<h2>Log In</h2>
|
||||||
<label>Email<br>
|
<label>Email<br>
|
||||||
<input type="email" required id="loginEmail">
|
<input type="email" required id="loginEmail" maxlength="100">
|
||||||
</label>
|
</label>
|
||||||
<label>Password<br>
|
<label>Password<br>
|
||||||
<input type="password" required id="loginPassword">
|
<input type="password" required id="loginPassword" maxlength="100">
|
||||||
</label>
|
</label>
|
||||||
<section id="loginErrorMessages"></section>
|
<section id="loginErrorMessages"></section>
|
||||||
<a id="loginSubmit" class="button">Log In</a><br>
|
<a id="loginSubmit" class="button">Log In</a><br>
|
||||||
|
@ -26,16 +26,16 @@ export function renderLoginForm() {
|
||||||
<p>Plus if you allow us to send you emails, we'll make sure that you're the first to hear about any new features that get added or if any of our policies change for any reason. We'll never spam you or sell your information.</p>
|
<p>Plus if you allow us to send you emails, we'll make sure that you're the first to hear about any new features that get added or if any of our policies change for any reason. We'll never spam you or sell your information.</p>
|
||||||
<p>By creating an account, you are indicating that you agree to the Terms of Service and that you understand Lexiconga's Privacy Policy.</p>
|
<p>By creating an account, you are indicating that you agree to the Terms of Service and that you understand Lexiconga's Privacy Policy.</p>
|
||||||
<label>Email<br>
|
<label>Email<br>
|
||||||
<input type="email" id="createNewEmail">
|
<input type="email" id="createNewEmail" maxlength="100">
|
||||||
</label>
|
</label>
|
||||||
<label>Password<br>
|
<label>Password<br>
|
||||||
<input type="password" id="createNewPassword">
|
<input type="password" id="createNewPassword" maxlength="100">
|
||||||
</label>
|
</label>
|
||||||
<label>Confirm Password<br>
|
<label>Confirm Password<br>
|
||||||
<input type="password" id="createNewConfirm">
|
<input type="password" id="createNewConfirm" maxlength="100">
|
||||||
</label>
|
</label>
|
||||||
<label>Public Name<br>
|
<label>Public Name<br>
|
||||||
<input type="text" id="createNewPublicName">
|
<input type="text" id="createNewPublicName" maxlength="50">
|
||||||
</label>
|
</label>
|
||||||
<label>Allow Emails
|
<label>Allow Emails
|
||||||
<input type="checkbox" id="createNewAllowEmails">
|
<input type="checkbox" id="createNewAllowEmails">
|
||||||
|
|
|
@ -244,15 +244,15 @@ export function renderEditForm(wordId = false) {
|
||||||
const word = window.currentDictionary.words.find(w => w.wordId === wordId);
|
const word = window.currentDictionary.words.find(w => w.wordId === wordId);
|
||||||
if (word) {
|
if (word) {
|
||||||
const ipaPronunciationField = `<label>Pronunciation<a class="label-button ipa-table-button">IPA Chart</a><br>
|
const ipaPronunciationField = `<label>Pronunciation<a class="label-button ipa-table-button">IPA Chart</a><br>
|
||||||
<input id="wordPronunciation_${wordId}" class="ipa-field" value="${word.pronunciation}"><br>
|
<input id="wordPronunciation_${wordId}" class="ipa-field" maxlength="200" value="${word.pronunciation}"><br>
|
||||||
<a class="label-help-button ipa-field-help-button">Field Help</a>
|
<a class="label-help-button ipa-field-help-button">Field Help</a>
|
||||||
</label>`;
|
</label>`;
|
||||||
const plainPronunciationField = `<label>Pronunciation<br>
|
const plainPronunciationField = `<label>Pronunciation<br>
|
||||||
<input id="wordPronunciation_${wordId}" value="${word.pronunciation}">
|
<input id="wordPronunciation_${wordId}" maxlength="200" value="${word.pronunciation}">
|
||||||
</label>`;
|
</label>`;
|
||||||
const editForm = `<form id="editForm_${wordId}" class="edit-form">
|
const editForm = `<form id="editForm_${wordId}" class="edit-form">
|
||||||
<label>Word<span class="red">*</span><br>
|
<label>Word<span class="red">*</span><br>
|
||||||
<input id="wordName_${wordId}" value="${word.name}">
|
<input id="wordName_${wordId}" maxlength="200" value="${word.name}">
|
||||||
</label>
|
</label>
|
||||||
${window.settings.useIPAPronunciationField ? ipaPronunciationField : plainPronunciationField}
|
${window.settings.useIPAPronunciationField ? ipaPronunciationField : plainPronunciationField}
|
||||||
<label>Part of Speech<br>
|
<label>Part of Speech<br>
|
||||||
|
@ -261,7 +261,7 @@ export function renderEditForm(wordId = false) {
|
||||||
</select>
|
</select>
|
||||||
</label>
|
</label>
|
||||||
<label>Definition<span class="red">*</span><br>
|
<label>Definition<span class="red">*</span><br>
|
||||||
<input id="wordDefinition_${wordId}" value="${word.definition}" placeholder="Equivalent words">
|
<input id="wordDefinition_${wordId}" maxlength="2500" value="${word.definition}" placeholder="Equivalent words">
|
||||||
</label>
|
</label>
|
||||||
<label>Details<span class="red">*</span><a class="label-button maximize-button">Maximize</a><br>
|
<label>Details<span class="red">*</span><a class="label-button maximize-button">Maximize</a><br>
|
||||||
<textarea id="wordDetails_${wordId}" placeholder="Markdown formatting allowed">${word.details}</textarea>
|
<textarea id="wordDetails_${wordId}" placeholder="Markdown formatting allowed">${word.details}</textarea>
|
||||||
|
|
|
@ -10,9 +10,9 @@ CREATE TABLE IF NOT EXISTS `deleted_words` (
|
||||||
CREATE TABLE IF NOT EXISTS `dictionaries` (
|
CREATE TABLE IF NOT EXISTS `dictionaries` (
|
||||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||||
`user` int(11) NOT NULL,
|
`user` int(11) NOT NULL,
|
||||||
`name` varchar(50) COLLATE utf8_unicode_ci NOT NULL DEFAULT 'New',
|
`name` varchar(80) COLLATE utf8_unicode_ci NOT NULL DEFAULT 'New',
|
||||||
`specification` varchar(50) COLLATE utf8_unicode_ci NOT NULL DEFAULT 'Dictionary',
|
`specification` varchar(80) COLLATE utf8_unicode_ci NOT NULL DEFAULT 'Dictionary',
|
||||||
`description` text COLLATE utf8_unicode_ci NOT NULL DEFAULT 'A new dicitonary.' COMMENT 'Markdown',
|
`description` text COLLATE utf8_unicode_ci NOT NULL COMMENT 'Markdown. Default: "A new dictionary."',
|
||||||
`allow_duplicates` tinyint(1) NOT NULL DEFAULT 0,
|
`allow_duplicates` tinyint(1) NOT NULL DEFAULT 0,
|
||||||
`case_sensitive` tinyint(1) NOT NULL DEFAULT 0,
|
`case_sensitive` tinyint(1) NOT NULL DEFAULT 0,
|
||||||
`sort_by_definition` tinyint(1) NOT NULL DEFAULT 0,
|
`sort_by_definition` tinyint(1) NOT NULL DEFAULT 0,
|
||||||
|
@ -33,16 +33,16 @@ DELIMITER ;
|
||||||
|
|
||||||
CREATE TABLE IF NOT EXISTS `dictionary_linguistics` (
|
CREATE TABLE IF NOT EXISTS `dictionary_linguistics` (
|
||||||
`dictionary` int(11) NOT NULL,
|
`dictionary` int(11) NOT NULL,
|
||||||
`parts_of_speech` text NOT NULL DEFAULT '' COMMENT 'JSON array',
|
`parts_of_speech` text COLLATE utf8_unicode_ci NOT NULL COMMENT 'Comma-separated',
|
||||||
`consonants` text NOT NULL DEFAULT '' COMMENT 'JSON array',
|
`consonants` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT 'Space-separated',
|
||||||
`vowels` text NOT NULL DEFAULT '' COMMENT 'JSON array',
|
`vowels` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT 'Space-separated',
|
||||||
`blends` text NOT NULL DEFAULT '' COMMENT 'JSON array',
|
`blends` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT 'Space-separated',
|
||||||
`onset` text NOT NULL DEFAULT '' COMMENT 'JSON array',
|
`onset` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT 'Comma-separated',
|
||||||
`nucleus` text NOT NULL DEFAULT '' COMMENT 'JSON array',
|
`nucleus` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT 'Comma-separated',
|
||||||
`coda` text NOT NULL DEFAULT '' COMMENT 'JSON array',
|
`coda` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT 'Comma-separated',
|
||||||
`exceptions` text NOT NULL DEFAULT '' COMMENT 'Markdown',
|
`exceptions` text COLLATE utf8_unicode_ci NOT NULL COMMENT 'Markdown',
|
||||||
`orthography_notes` text NOT NULL DEFAULT '' COMMENT 'Markdown',
|
`orthography_notes` text COLLATE utf8_unicode_ci NOT NULL COMMENT 'Markdown',
|
||||||
`grammar_notes` text NOT NULL DEFAULT '' COMMENT 'Markdown',
|
`grammar_notes` text COLLATE utf8_unicode_ci NOT NULL COMMENT 'Markdown',
|
||||||
UNIQUE KEY `dictionary` (`dictionary`)
|
UNIQUE KEY `dictionary` (`dictionary`)
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||||
|
|
||||||
|
@ -80,8 +80,8 @@ CREATE TABLE IF NOT EXISTS `words` (
|
||||||
`name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
|
`name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
|
||||||
`pronunciation` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
|
`pronunciation` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
|
||||||
`part_of_speech` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
|
`part_of_speech` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
|
||||||
`definition` text COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
|
`definition` text COLLATE utf8_unicode_ci NOT NULL,
|
||||||
`details` text COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT 'Markdown',
|
`details` text COLLATE utf8_unicode_ci NOT NULL COMMENT 'Markdown',
|
||||||
`last_updated` int(11) DEFAULT NULL,
|
`last_updated` int(11) DEFAULT NULL,
|
||||||
`created_on` int(11) NOT NULL,
|
`created_on` int(11) NOT NULL,
|
||||||
UNIQUE KEY `unique_index` (`dictionary`,`word_id`)
|
UNIQUE KEY `unique_index` (`dictionary`,`word_id`)
|
||||||
|
|
Loading…
Reference in New Issue