Index: lams_tool_larsrc/conf/language/lams/ApplicationResources.properties =================================================================== RCS file: /usr/local/cvsroot/lams_tool_larsrc/conf/language/lams/ApplicationResources.properties,v diff -u -r1.35.2.9 -r1.35.2.10 --- lams_tool_larsrc/conf/language/lams/ApplicationResources.properties 18 Dec 2016 18:07:08 -0000 1.35.2.9 +++ lams_tool_larsrc/conf/language/lams/ApplicationResources.properties 1 Mar 2017 00:29:02 -0000 1.35.2.10 @@ -136,8 +136,10 @@ message.step.of =Step {0} of {1} message.no.reflection.available =No notebook available button.edit =Edit -errors.maxfilesize =The uploaded file has exceeded the maximum file size limit of {0} bytes -error.attachment.executable =The uploaded file is executable, please zip it before uploading. +errors.maxfilesize=Uploaded file exceeded maximum size of {0} +label.upload.info =Uploaded file must not be executable and not exceed size of {0} +error.attachment.executable =The uploaded file can not be an executable. +error.file.type.zip=File must be a zip file. message.alertContentEdit =Warning: One of more learners have accessed this activity. Changing this content will result in learners getting different information. message.warnLockOnFinish =Note: After you click on "Next Activity\u201d, if you come back to this Share Resource, you won\u2019t be able to share new resources. message.activityLocked =The instructor has set this activity not to allow you to view or share any more resources after you have finished it. Index: lams_tool_larsrc/conf/language/lams/ApplicationResources_en_AU.properties =================================================================== RCS file: /usr/local/cvsroot/lams_tool_larsrc/conf/language/lams/ApplicationResources_en_AU.properties,v diff -u -r1.34.2.4 -r1.34.2.5 --- lams_tool_larsrc/conf/language/lams/ApplicationResources_en_AU.properties 18 Dec 2016 18:07:08 -0000 1.34.2.4 +++ lams_tool_larsrc/conf/language/lams/ApplicationResources_en_AU.properties 1 Mar 2017 00:29:02 -0000 1.34.2.5 @@ -136,8 +136,9 @@ message.step.of =Step {0} of {1} message.no.reflection.available =No notebook available button.edit =Edit -errors.maxfilesize =The uploaded file has exceeded the maximum file size limit of {0} bytes -error.attachment.executable =The uploaded file is executable, please zip it before uploading. +errors.maxfilesize=Uploaded file exceeded maximum size of {0} +label.upload.info =Uploaded file must not be executable and not exceed size of {0} +error.attachment.executable =The uploaded file can not be an executable. message.alertContentEdit =Warning: One of more learners have accessed this activity. Changing this content will result in learners getting different information. message.warnLockOnFinish =Note: After you click on "Next Activity\u201d, if you come back to this Share Resource, you won\u2019t be able to share new resources. message.activityLocked =The instructor has set this activity not to allow you to view or share any more resources after you have finished it. Index: lams_tool_larsrc/web/WEB-INF/tags/AuthoringButton.tag =================================================================== RCS file: /usr/local/cvsroot/lams_tool_larsrc/web/WEB-INF/tags/AuthoringButton.tag,v diff -u -r1.23.2.2 -r1.23.2.3 --- lams_tool_larsrc/web/WEB-INF/tags/AuthoringButton.tag 13 Dec 2016 04:27:39 -0000 1.23.2.2 +++ lams_tool_larsrc/web/WEB-INF/tags/AuthoringButton.tag 1 Mar 2017 00:29:01 -0000 1.23.2.3 @@ -123,7 +123,7 @@ }
- + Fisheye: Tag 1.1 refers to a dead (removed) revision in file `lams_tool_larsrc/web/WEB-INF/tags/FileUpload.tag'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.1 refers to a dead (removed) revision in file `lams_tool_larsrc/web/WEB-INF/tags/WaitingSpinner.tag'. Fisheye: No comparison available. Pass `N' to diff? Index: lams_tool_larsrc/web/WEB-INF/tlds/lams/lams.tld =================================================================== RCS file: /usr/local/cvsroot/lams_tool_larsrc/web/WEB-INF/tlds/lams/lams.tld,v diff -u -r1.25.2.7 -r1.25.2.8 --- lams_tool_larsrc/web/WEB-INF/tlds/lams/lams.tld 25 Nov 2016 17:09:18 -0000 1.25.2.7 +++ lams_tool_larsrc/web/WEB-INF/tlds/lams/lams.tld 1 Mar 2017 00:29:02 -0000 1.25.2.8 @@ -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_larsrc/web/includes/javascript/rsrcresourceitem.js =================================================================== RCS file: /usr/local/cvsroot/lams_tool_larsrc/web/includes/javascript/rsrcresourceitem.js,v diff -u -r1.13.2.2 -r1.13.2.3 --- lams_tool_larsrc/web/includes/javascript/rsrcresourceitem.js 2 Dec 2016 09:14:19 -0000 1.13.2.2 +++ lams_tool_larsrc/web/includes/javascript/rsrcresourceitem.js 1 Mar 2017 00:29:02 -0000 1.13.2.3 @@ -109,7 +109,8 @@ document.getElementById("instructionList").value = $("#instructionForm").serialize(); var formData = new FormData(document.getElementById("resourceItemForm")); - + showBusy(instructionTargetDiv); + // after submit, it direct to itemlist.jsp, // then refresh "basic tab" resource list and close this window. $.ajax({ // create an AJAX call... Index: lams_tool_larsrc/web/pages/authoring/parts/addfile.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_tool_larsrc/web/pages/authoring/parts/addfile.jsp,v diff -u -r1.21.2.7 -r1.21.2.8 --- lams_tool_larsrc/web/pages/authoring/parts/addfile.jsp 2 Dec 2016 21:04:57 -0000 1.21.2.7 +++ lams_tool_larsrc/web/pages/authoring/parts/addfile.jsp 1 Mar 2017 00:29:01 -0000 1.21.2.8 @@ -2,27 +2,40 @@ <%@ 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" %> <%=Configuration.get(ConfigurationKeys.UPLOAD_FILE_LARGE_MAX_SIZE)%> +<%=FileValidatorUtil.formatSize(Configuration.getAsInt(ConfigurationKeys.UPLOAD_FILE_LARGE_MAX_SIZE))%> +<%=Configuration.get(ConfigurationKeys.EXE_EXTENSIONS)%> - <%@ include file="addheader.jsp"%> + <%@ include file="addheader.jsp"%> @@ -68,7 +88,8 @@ <%@ include file="/pages/authoring/parts/itemattachment.jsp"%> - + +
Index: lams_tool_larsrc/web/pages/authoring/parts/addheader.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_tool_larsrc/web/pages/authoring/parts/Attic/addheader.jsp,v diff -u -r1.1.2.1 -r1.1.2.2 --- lams_tool_larsrc/web/pages/authoring/parts/addheader.jsp 2 Dec 2016 09:14:19 -0000 1.1.2.1 +++ lams_tool_larsrc/web/pages/authoring/parts/addheader.jsp 1 Mar 2017 00:29:01 -0000 1.1.2.2 @@ -9,9 +9,10 @@ - + + @@ -79,8 +89,9 @@ <%@ include file="/pages/authoring/parts/itemattachment.jsp"%> - + + Index: lams_tool_larsrc/web/pages/authoring/parts/addwebsite.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_tool_larsrc/web/pages/authoring/parts/addwebsite.jsp,v diff -u -r1.18.2.7 -r1.18.2.8 --- lams_tool_larsrc/web/pages/authoring/parts/addwebsite.jsp 2 Dec 2016 21:04:57 -0000 1.18.2.7 +++ lams_tool_larsrc/web/pages/authoring/parts/addwebsite.jsp 1 Mar 2017 00:29:02 -0000 1.18.2.8 @@ -2,7 +2,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" %> <%=Configuration.get(ConfigurationKeys.UPLOAD_FILE_LARGE_MAX_SIZE)%> +<%=FileValidatorUtil.formatSize(Configuration.getAsInt(ConfigurationKeys.UPLOAD_FILE_LARGE_MAX_SIZE))%> @@ -18,10 +20,11 @@ return this.optional(element) || (element.files[0].type == 'application/zip') }); - $.validator.addMethod('filesize', function (value, element, param) { - return this.optional(element) || (element.files[0].size <= param) - }, '{0}'); - + $.validator.addMethod('validateSize', function (value, element, param) { + return validateFileSize(element.files[0], param); + }, '${UPLOAD_FILE_MAX_SIZE_AS_USER_STRING}'); + + $( "#resourceItemForm" ).validate({ ignore: [], errorClass: "text-danger", @@ -30,7 +33,7 @@ file: { required: true, fileType: true, - filesize: UPLOAD_FILE_LARGE_MAX_SIZE, + validateSize: UPLOAD_FILE_LARGE_MAX_SIZE, }, title: { required: true @@ -39,12 +42,19 @@ messages : { file : { required : ' ', - fileType: 'File type incorrect?' + fileType: '' }, title : { required : ' ' } - } + }, + errorPlacement: function(error, element) { + if (element.hasClass("fileUpload")) { + error.insertAfter(element.parent()); + } else { + error.insertAfter(element); + } + } }); @@ -80,8 +90,9 @@ <%@ include file="/pages/authoring/parts/itemattachment.jsp"%> - + + Index: lams_tool_larsrc/web/pages/authoring/parts/instructions.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_tool_larsrc/web/pages/authoring/parts/instructions.jsp,v diff -u -r1.16.2.2 -r1.16.2.3 --- lams_tool_larsrc/web/pages/authoring/parts/instructions.jsp 13 Sep 2016 09:24:56 -0000 1.16.2.2 +++ lams_tool_larsrc/web/pages/authoring/parts/instructions.jsp 1 Mar 2017 00:29:02 -0000 1.16.2.3 @@ -8,8 +8,6 @@ - - @@ -37,7 +35,9 @@
- + + +   Index: lams_tool_larsrc/web/pages/authoring/parts/itemattachment.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_tool_larsrc/web/pages/authoring/parts/itemattachment.jsp,v diff -u -r1.5.16.2 -r1.5.16.3 --- lams_tool_larsrc/web/pages/authoring/parts/itemattachment.jsp 2 Dec 2016 21:04:57 -0000 1.5.16.2 +++ lams_tool_larsrc/web/pages/authoring/parts/itemattachment.jsp 1 Mar 2017 00:29:01 -0000 1.5.16.3 @@ -1,34 +1,12 @@ <%@ include file="/common/taglibs.jsp"%> +   - -
- - - - - -
- - - +
Index: lams_tool_larsrc/web/pages/authoring/parts/itemlist.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_tool_larsrc/web/pages/authoring/parts/itemlist.jsp,v diff -u -r1.21.2.3 -r1.21.2.4 --- lams_tool_larsrc/web/pages/authoring/parts/itemlist.jsp 19 May 2016 04:22:36 -0000 1.21.2.3 +++ lams_tool_larsrc/web/pages/authoring/parts/itemlist.jsp 1 Mar 2017 00:29:02 -0000 1.21.2.4 @@ -5,7 +5,7 @@
- +
Index: lams_tool_larsrc/web/pages/learning/addfile.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_tool_larsrc/web/pages/learning/addfile.jsp,v diff -u -r1.17.2.5 -r1.17.2.6 --- lams_tool_larsrc/web/pages/learning/addfile.jsp 16 Feb 2017 00:43:03 -0000 1.17.2.5 +++ lams_tool_larsrc/web/pages/learning/addfile.jsp 1 Mar 2017 00:29:02 -0000 1.17.2.6 @@ -1,7 +1,10 @@ <%@ 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" %> <%=Configuration.get(ConfigurationKeys.UPLOAD_FILE_MAX_SIZE)%> +<%=FileValidatorUtil.formatSize(Configuration.getAsInt(ConfigurationKeys.UPLOAD_FILE_MAX_SIZE))%> +<%=Configuration.get(ConfigurationKeys.EXE_EXTENSIONS)%>
@@ -23,34 +26,14 @@
-
- - - - - -
+ - -
+
@@ -63,17 +46,19 @@ Index: lams_tool_larsrc/web/pages/learning/learning.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_tool_larsrc/web/pages/learning/learning.jsp,v diff -u -r1.53.2.8 -r1.53.2.9 --- lams_tool_larsrc/web/pages/learning/learning.jsp 16 Feb 2017 00:43:03 -0000 1.53.2.8 +++ lams_tool_larsrc/web/pages/learning/learning.jsp 1 Mar 2017 00:29:02 -0000 1.53.2.9 @@ -23,18 +23,20 @@ - - + +