Index: lams_tool_task/conf/language/lams/ApplicationResources.properties =================================================================== diff -u -r816962c9f50fa4103fad5743264e28de164da9cd -r20d56e5a580f9c44979e40663e21cd981f75dc80 --- lams_tool_task/conf/language/lams/ApplicationResources.properties (.../ApplicationResources.properties) (revision 816962c9f50fa4103fad5743264e28de164da9cd) +++ lams_tool_task/conf/language/lams/ApplicationResources.properties (.../ApplicationResources.properties) (revision 20d56e5a580f9c44979e40663e21cd981f75dc80) @@ -40,7 +40,7 @@ label.authoring.basic.resource.delete =Delete label.authoring.basic.resource.title.input =Title label.authoring.basic.resource.description.input =Description -label.authoring.choosefile.button =Choose file +label.authoring.choosefile.button =File label.authoring.advance.allow.contribute.tasks =Allow Learners to contribute tasks label.authoring.advance.lock.on.finished =Lock when finished label.authoring.advance.monitor.verification.required =Monitor needs to verify these tasks before letting Learners to complete activity @@ -167,7 +167,8 @@ label.confirm =Confirm label.task.options =Task options label.activity.completion =End of activity -errors.maxfilesize =The uploaded file has exceeded the maximum file size limit of {0} bytes. +errors.maxfilesize =Uploaded file exceeded maximum size: {0} +error.attachment.executable =Uploaded file is executable +label.upload.info =Uploaded file must not be executable and not exceed size of {0} - #======= End labels: Exported 162 labels for en AU ===== Index: lams_tool_task/conf/language/lams/ApplicationResources_en_AU.properties =================================================================== diff -u -r816962c9f50fa4103fad5743264e28de164da9cd -r20d56e5a580f9c44979e40663e21cd981f75dc80 --- lams_tool_task/conf/language/lams/ApplicationResources_en_AU.properties (.../ApplicationResources_en_AU.properties) (revision 816962c9f50fa4103fad5743264e28de164da9cd) +++ lams_tool_task/conf/language/lams/ApplicationResources_en_AU.properties (.../ApplicationResources_en_AU.properties) (revision 20d56e5a580f9c44979e40663e21cd981f75dc80) @@ -40,7 +40,7 @@ label.authoring.basic.resource.delete =Delete label.authoring.basic.resource.title.input =Title label.authoring.basic.resource.description.input =Description -label.authoring.choosefile.button =Choose file +label.authoring.choosefile.button =File label.authoring.advance.allow.contribute.tasks =Allow Learners to contribute tasks label.authoring.advance.lock.on.finished =Lock when finished label.authoring.advance.monitor.verification.required =Monitor needs to verify these tasks before letting Learners to complete activity Index: lams_tool_task/web/WEB-INF/tags/AuthoringButton.tag =================================================================== diff -u -rb5ab72c783a98abeb08431bafb067ad4b9edf1df -r20d56e5a580f9c44979e40663e21cd981f75dc80 --- lams_tool_task/web/WEB-INF/tags/AuthoringButton.tag (.../AuthoringButton.tag) (revision b5ab72c783a98abeb08431bafb067ad4b9edf1df) +++ lams_tool_task/web/WEB-INF/tags/AuthoringButton.tag (.../AuthoringButton.tag) (revision 20d56e5a580f9c44979e40663e21cd981f75dc80) @@ -123,7 +123,7 @@ }
- + Index: lams_tool_task/web/WEB-INF/tags/FileUpload.tag =================================================================== diff -u --- lams_tool_task/web/WEB-INF/tags/FileUpload.tag (revision 0) +++ lams_tool_task/web/WEB-INF/tags/FileUpload.tag (revision 20d56e5a580f9c44979e40663e21cd981f75dc80) @@ -0,0 +1,84 @@ +<%@ taglib uri="tags-core" prefix="c"%> +<%@ taglib uri="tags-lams" prefix="lams"%> +<%@ taglib uri="tags-function" prefix="fn" %> +<%@ taglib uri="tags-fmt" prefix="fmt" %> + +<%-- Usually fileFieldname and fileFieldId are the same, but DACO needs them to be different. + If they can be the same, set fileFieldname and fileFieldId will be set to the same. + If you need them different, then define both. + If you define neither, fileFieldname = fileFieldId = "fileSelector" --%> +<%@ attribute name="fileFieldname" required="false" rtexprvalue="true"%> +<%@ attribute name="fileFieldId" required="false" rtexprvalue="true"%> + +<%@ attribute name="fileInputNameFieldname" required="false" rtexprvalue="true"%> +<%@ attribute name="fileInputMessageKey" required="false" rtexprvalue="true"%> + +<%-- Set uploadInfoMessageKey to '-' to NOT show the "not exe and max file size" type message. Leave it blank for the default key label.upload.info --%> +<%@ attribute name="uploadInfoMessageKey" required="false" rtexprvalue="true"%> +<%@ attribute name="maxFileSize" required="true" rtexprvalue="true"%> +<%@ attribute name="tabindex" required="false" rtexprvalue="true"%> + +<%-- Only set if you have more than one file field on the screen (such as DACO) --%> +<%@ attribute name="errorMsgDiv" required="false" rtexprvalue="true"%> +<%@ attribute name="fileButtonBrowse" required="false" rtexprvalue="true"%> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ <%-- font-size:inherit needed for Share Resources authoring or the button is too small --%> + + + + +
+ +

${maxFileSize}

+
+ + + + Index: lams_tool_task/web/WEB-INF/tags/WaitingSpinner.tag =================================================================== diff -u --- lams_tool_task/web/WEB-INF/tags/WaitingSpinner.tag (revision 0) +++ lams_tool_task/web/WEB-INF/tags/WaitingSpinner.tag (revision 20d56e5a580f9c44979e40663e21cd981f75dc80) @@ -0,0 +1,17 @@ +<%@ taglib uri="tags-core" prefix="c"%> + +<%@ attribute name="id" required="false" rtexprvalue="true"%> +<%@ attribute name="showInline" required="false" rtexprvalue="true"%> + + + id="${id}" + + + + + + + + + + \ No newline at end of file Index: lams_tool_task/web/WEB-INF/tlds/lams/lams.tld =================================================================== diff -u -r1f99d03199a3995cfffe0cb1536c08f0220e88b0 -r20d56e5a580f9c44979e40663e21cd981f75dc80 --- lams_tool_task/web/WEB-INF/tlds/lams/lams.tld (.../lams.tld) (revision 1f99d03199a3995cfffe0cb1536c08f0220e88b0) +++ lams_tool_task/web/WEB-INF/tlds/lams/lams.tld (.../lams.tld) (revision 20d56e5a580f9c44979e40663e21cd981f75dc80) @@ -529,5 +529,13 @@ CommentsAuthor /WEB-INF/tags/CommentsAuthor.tag + + FileUpload + /WEB-INF/tags/FileUpload.tag + + + WaitingSpinner + /WEB-INF/tags/WaitingSpinner.tag + Index: lams_tool_task/web/pages/learning/learning.jsp =================================================================== diff -u -r3d7ad32687edeec93585fe3ef54b554d891dbe98 -r20d56e5a580f9c44979e40663e21cd981f75dc80 --- lams_tool_task/web/pages/learning/learning.jsp (.../learning.jsp) (revision 3d7ad32687edeec93585fe3ef54b554d891dbe98) +++ lams_tool_task/web/pages/learning/learning.jsp (.../learning.jsp) (revision 20d56e5a580f9c44979e40663e21cd981f75dc80) @@ -1,5 +1,9 @@ <%@ include file="/common/taglibs.jsp"%> +<%@ page import="org.lamsfoundation.lams.util.Configuration" %> +<%@ page import="org.lamsfoundation.lams.util.ConfigurationKeys" %> +<%@ page import="org.lamsfoundation.lams.util.FileValidatorUtil" %> + @@ -9,6 +13,10 @@ +<%=Configuration.get(ConfigurationKeys.UPLOAD_FILE_MAX_SIZE)%> +<%=FileValidatorUtil.formatSize(Configuration.getAsInt(ConfigurationKeys.UPLOAD_FILE_MAX_SIZE))%> +<%=Configuration.get(ConfigurationKeys.EXE_EXTENSIONS)%> + <fmt:message key="label.learning.title" /> @@ -24,9 +32,31 @@ if ( addTaskArea && addTaskArea.contentWindow.disableButtons ) { addTaskArea.contentWindow.disableButtons(); } + + // show the waiting area during the upload + var div = document.getElementById("attachmentArea_Busy"); + if(div != null){ + div.style.display = ''; + } } catch(err) {} } + function validateFiles() { + var fileSelect = document.getElementById('uploadButton'); + var files = fileSelect.files; + if (files.length == 0) { + return false; + } else { + var file = files[0]; + if ( ! validateShowErrorNotExecutable(file, '', false, '${EXE_FILE_TYPES}') + || ! validateShowErrorFileSize(file, '${UPLOAD_FILE_MAX_SIZE}', '') ) { + return false; + } + } + disableButtons(); + return true; + } + function checkNew() { document.location.href = "?mode=${mode}&toolSessionID=${toolSessionID}"; return false; Index: lams_tool_task/web/pages/learning/parts/itemdetails.jsp =================================================================== diff -u -re11fef2ebb0ae3b3d8261d8d01de83107037c5a8 -r20d56e5a580f9c44979e40663e21cd981f75dc80 --- lams_tool_task/web/pages/learning/parts/itemdetails.jsp (.../itemdetails.jsp) (revision e11fef2ebb0ae3b3d8261d8d01de83107037c5a8) +++ lams_tool_task/web/pages/learning/parts/itemdetails.jsp (.../itemdetails.jsp) (revision 20d56e5a580f9c44979e40663e21cd981f75dc80) @@ -23,7 +23,7 @@ + class="btn btn-default btn-disable-on-submit voffset5" />
@@ -32,8 +32,9 @@ +
+ method="post" enctype="multipart/form-data" onsubmit="return validateFiles();"> @@ -44,20 +45,19 @@ +
+ +
<%@ include file="filelist.jsp"%> - -
- -
- - - - + + class="btn btn-default btn-disable-on-submit voffset5" />
+ +
Index: lams_tool_task/web/pages/learning/parts/itemlist.jsp =================================================================== diff -u -rbfb35f4f0e90063d8ea06eea71a7f6768ee0f1dc -r20d56e5a580f9c44979e40663e21cd981f75dc80 --- lams_tool_task/web/pages/learning/parts/itemlist.jsp (.../itemlist.jsp) (revision bfb35f4f0e90063d8ea06eea71a7f6768ee0f1dc) +++ lams_tool_task/web/pages/learning/parts/itemlist.jsp (.../itemlist.jsp) (revision 20d56e5a580f9c44979e40663e21cd981f75dc80) @@ -2,12 +2,8 @@ + - -