Utilize the knowledge of whether a dictionary is complete or not on when viewing.

This commit is contained in:
Robbie Antenesse 2015-12-22 15:16:36 -07:00
parent 2176488109
commit 6be4798bbc
2 changed files with 6 additions and 0 deletions

View File

@ -43,6 +43,11 @@ function ShowPublicDictionary() {
var dictionaryByArea = document.getElementById("dictionaryBy"); var dictionaryByArea = document.getElementById("dictionaryBy");
dictionaryByArea.innerHTML = "created by " + htmlEntitiesParse(publicDictionary.createdBy); dictionaryByArea.innerHTML = "created by " + htmlEntitiesParse(publicDictionary.createdBy);
var dictionaryIncompleteArea = document.getElementById("incompleteNotice");
if (!publicDictionary.settings.isComplete) {
dictionaryIncompleteArea.innerHTML = "<em>Note: This dictionary is not yet complete and is likely to change.</em>";
}
var dictionaryDescriptionArea = document.getElementById("dictionaryDescription"); var dictionaryDescriptionArea = document.getElementById("dictionaryDescription");
dictionaryDescriptionArea.innerHTML = marked(htmlEntitiesParse(publicDictionary.description)); dictionaryDescriptionArea.innerHTML = marked(htmlEntitiesParse(publicDictionary.description));

View File

@ -73,6 +73,7 @@ catch (PDOException $ex) {}
<div id="dictionaryContainer"> <div id="dictionaryContainer">
<h1 id="dictionaryName"></h1> <h1 id="dictionaryName"></h1>
<h4 id="dictionaryBy"></h4> <h4 id="dictionaryBy"></h4>
<div id="incompleteNotice"></div>
<span id="descriptionToggle" class="clickable" onclick="ToggleDescription();">Hide Description</span> <span id="descriptionToggle" class="clickable" onclick="ToggleDescription();">Hide Description</span>
<div id="dictionaryDescription" style="display:block;"></div> <div id="dictionaryDescription" style="display:block;"></div>