Index: lams_tool_task/web/pages/learning/learning.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_tool_task/web/pages/learning/learning.jsp,v diff -u -r1.25.2.5 -r1.25.2.6 --- lams_tool_task/web/pages/learning/learning.jsp 17 Feb 2017 08:43:55 -0000 1.25.2.5 +++ lams_tool_task/web/pages/learning/learning.jsp 1 Mar 2017 04:54:46 -0000 1.25.2.6 @@ -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;