Index: lams_tool_laqa/web/monitoring/MonitoringMaincontent.jsp
===================================================================
diff -u -r91f0740e75daa643981b757e49d1ed2ed7f0a528 -rcd0b7b82232971e95d54348b03049beb1dfe0ecb
--- lams_tool_laqa/web/monitoring/MonitoringMaincontent.jsp (.../MonitoringMaincontent.jsp) (revision 91f0740e75daa643981b757e49d1ed2ed7f0a528)
+++ lams_tool_laqa/web/monitoring/MonitoringMaincontent.jsp (.../MonitoringMaincontent.jsp) (revision cd0b7b82232971e95d54348b03049beb1dfe0ecb)
@@ -46,7 +46,7 @@
-
+
@@ -56,21 +56,27 @@
+
+
+
+
+
-
-
-
+
+
+
+
-
+
@@ -81,7 +87,70 @@
rateMax : 5,
isDisabled : true
});
+
+
+ $("#datetime").datetimepicker();
+
+ var submissionDeadline = "${submissionDeadline}";
+ if (submissionDeadline != "") {
+ var date = new Date(eval(submissionDeadline));
+ $("#dateInfo").html( formatDate(date) );
+
+ //open up date restriction area
+ toggleAdvancedOptionsVisibility(document.getElementById('restrictUsageDiv'), document.getElementById('restrictUsageTreeIcon'),'${lams}');
+ }
});
+
+ function formatDate(date) {
+ var currHour = "" + date.getHours();
+ if (currHour.length == 1) {
+ currHour = "0" + currHour;
+ }
+ var currMin = "" + date.getMinutes();
+ if (currMin.length == 1) {
+ currMin = "0" + currMin;
+ }
+ return $.datepicker.formatDate( 'mm/dd/yy', date ) + " " + currHour + ":" + currMin;
+ }
+
+ function setSubmissionDeadline() {
+ //get the timestamp in milliseconds since midnight Jan 1, 1970
+ var date = $("#datetime").datetimepicker('getDate');
+ if (date == null) {
+ return;
+ }
+
+ var reqIDVar = new Date();
+ var url = "
?dispatch=setSubmissionDeadline&toolContentID=${param.toolContentID}&submissionDeadline="
+ + date.getTime() + "&reqID=" + reqIDVar.getTime();
+
+ $.ajax({
+ url : url,
+ success : function() {
+ $.growlUI('
', '
');
+ $("#datetimeDiv").hide();
+ $("#dateInfo").html(formatDate(date) );
+ $("#dateInfoDiv").show();
+ }
+ });
+ }
+ function removeSubmissionDeadline() {
+ var reqIDVar = new Date();
+ var url = "
?dispatch=setSubmissionDeadline&toolContentID=${param.toolContentID}&submissionDeadline="
+ + "&reqID=" + reqIDVar.getTime();
+
+ $.ajax({
+ url : url,
+ success : function() {
+ $.growlUI('
', '
');
+ $("#dateInfoDiv").hide();
+
+ $("#datetimeDiv").show();
+ $("#datetime").val("");
+ }
+ });
+ }
+
function submitMonitoringMethod(actionMethod)
{
Index: lams_tool_laqa/web/monitoring/SummaryContent.jsp
===================================================================
diff -u -r6578a27494e05e43b274023060899ede28b17e59 -rcd0b7b82232971e95d54348b03049beb1dfe0ecb
--- lams_tool_laqa/web/monitoring/SummaryContent.jsp (.../SummaryContent.jsp) (revision 6578a27494e05e43b274023060899ede28b17e59)
+++ lams_tool_laqa/web/monitoring/SummaryContent.jsp (.../SummaryContent.jsp) (revision cd0b7b82232971e95d54348b03049beb1dfe0ecb)
@@ -21,7 +21,7 @@
<%@ include file="/common/taglibs.jsp"%>
-
-
+
+ <%@include file="dateRestriction.jsp"%>
+