Index: lams_tool_laqa/web/monitoring/MonitoringMaincontent.jsp
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_laqa/web/monitoring/MonitoringMaincontent.jsp,v
diff -u -r1.31 -r1.32
--- lams_tool_laqa/web/monitoring/MonitoringMaincontent.jsp 18 Mar 2011 17:14:25 -0000 1.31
+++ lams_tool_laqa/web/monitoring/MonitoringMaincontent.jsp 16 May 2011 03:17:57 -0000 1.32
@@ -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
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_laqa/web/monitoring/SummaryContent.jsp,v
diff -u -r1.41 -r1.42
--- lams_tool_laqa/web/monitoring/SummaryContent.jsp 18 Mar 2011 19:28:44 -0000 1.41
+++ lams_tool_laqa/web/monitoring/SummaryContent.jsp 16 May 2011 03:17:57 -0000 1.42
@@ -21,7 +21,7 @@
<%@ include file="/common/taglibs.jsp"%>
-
-
+
+ <%@include file="dateRestriction.jsp"%>
+