Index: lams_tool_wiki/web/pages/learning/wiki.jsp
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_wiki/web/pages/learning/wiki.jsp,v
diff -u -r1.25 -r1.25.2.1
--- lams_tool_wiki/web/pages/learning/wiki.jsp 14 Apr 2014 12:57:18 -0000 1.25
+++ lams_tool_wiki/web/pages/learning/wiki.jsp 23 Feb 2016 19:40:37 -0000 1.25.2.1
@@ -1,512 +1,539 @@
<%@ include file="/common/taglibs.jsp"%>
-<%@ page import="org.lamsfoundation.lams.tool.wiki.util.WikiConstants"%>
-
-
-
-
-
+
+
- function disableFinishButton() {
- document.getElementById("finishButton").disabled = true;
- }
-
- function validateForm() {
-
- // Validates that there's input from the user.
-
- // disables the Finish button to avoid double submission
- disableFinishButton();
+
+ function validateForm() {
+ // Validates that there's input from the user.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- ${wikiDTO.minimumEdits}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- ${editsLeft}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+ // disables the Finish button to avoid double submission
+ disableFinishButton();
-
+ if (mode == "learner") {
+ // if this is learner mode, then we add this validation see (LDEV-1319)
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
${fn:escapeXml(currentWikiPage.title)}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - ${fn:escapeXml(currentWikiPage.title)}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- ${wikiContentPageVersion.version}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- ">
-
-
-
-
- ">
-
-
-
-
- ">
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - ${fn:escapeXml(currentWikiPage.title)}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+ if (document.learningForm.entryText.value == "") {
-
-
- ${fn:escapeXml(mainWikiPage.title)}
-
-
+ // if the input is blank, then we further inquire to make sure it is correct
+ if (confirm("
message.learner.blank.input ")) {
+ // if correct, submit form
+ return true;
+ } else {
+ // otherwise, focus on the text area
+ document.learningForm.entryText.focus();
+ document.getElementById("finishButton").disabled = false;
+ return false;
+ }
+ } else {
+ // there was something on the form, so submit the form
+ return true;
+ }
+ }
+ }
-
-
-
- <%@ include file="parts/finishButton.jsp"%>
-
-
+ -->
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+ editorInstance.wikiLinkArray = wikiLinkArray;
+ });
+
+ function refreshPage()
+ {
+ var url = " /learning.do?mode=${mode}&toolSessionID=${lrnForm.toolSessionID}¤tWikiPageId=${currentWikiPage.uid}"
+ window.location=url;
+ }
+
+ -->
+
+
\ No newline at end of file