Added Viewer and
change to App Setting File from Constants
This commit is contained in:
@ -3,8 +3,8 @@
|
||||
ViewData["Title"] = "Run Information";
|
||||
}
|
||||
<style>
|
||||
#HeaderGridDiv, #
|
||||
Div {
|
||||
#HeaderGridDiv,
|
||||
# Div {
|
||||
font-size: 12px;
|
||||
}
|
||||
</style>
|
||||
@ -29,19 +29,6 @@
|
||||
<div class="form-group">
|
||||
<input class="btn btn-primary" type="button" value="Load Headers" id="LoadHeadersButton" />
|
||||
</div>
|
||||
@*<div class="form-group">
|
||||
<label class="form-check-label" for="chkAutoRefresh">
|
||||
Auto-Refresh
|
||||
</label>
|
||||
<input class="form-check-input" type="checkbox" id="chkAutoRefresh">
|
||||
</div>*@
|
||||
@*This checkbox below is for archive flag.*@
|
||||
@*<div class="form-group">
|
||||
<label class="form-check-label" for="isArchive">
|
||||
Archive
|
||||
</label>
|
||||
<input class="form-check-input" type="checkbox" id="isArchive">
|
||||
</div>*@
|
||||
</form>
|
||||
|
||||
<div style="height: 300px;" id="HeaderGridDiv">
|
||||
@ -78,7 +65,7 @@
|
||||
</div>
|
||||
|
||||
<script>
|
||||
|
||||
|
||||
var toolType = null;
|
||||
var toolTypeMetaData = null;
|
||||
|
||||
@ -109,7 +96,7 @@
|
||||
else {
|
||||
toolType = r.Results.ToolType;
|
||||
toolTypeMetaData = r.Results.Metadata;
|
||||
|
||||
|
||||
RequestHeaderData();
|
||||
}
|
||||
},
|
||||
@ -202,18 +189,11 @@
|
||||
return;
|
||||
|
||||
$("#DataAttachmentFrame").prop("src", attachmentUrlBase + "/data/files/" + attachmentId + "/" + toolType.DisplayDataAttachment);
|
||||
//if (CheckArchive()) {
|
||||
// $("#DataAttachmentFrame").prop("src", attachmentUrlBase + "/data/files/" + attachmentId + "/" + toolType.DisplayDataAttachment);
|
||||
//}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
function LoadHeaderAttachment() {
|
||||
|
||||
|
||||
var toolTypeID = $("#ToolTypeID").text();
|
||||
|
||||
var attachmentUrlBase = '@Url.Content("~/api/tooltypes/")' + toolTypeID;
|
||||
var attachmentId = $("#HeaderAttachmentId").text();
|
||||
var dateToUse = new Date($("#HeaderDate").text());
|
||||
@ -222,37 +202,18 @@
|
||||
if ((attachmentId == null) || (attachmentId === '') || (toolType.DisplayHeaderAttachment == null) || (toolType.DisplayHeaderAttachment === '')) {
|
||||
$("#HeaderAttachmentFrame").prop("src", "");
|
||||
} else {
|
||||
$("#HeaderAttachmentFrame").prop("src", attachmentUrlBase + "/header/files/" + attachmentId + "/" + toolType.DisplayHeaderAttachment + "?isArchive=true&date="+dateToUse);
|
||||
$("#HeaderAttachmentFrame").prop("src", attachmentUrlBase + "/header/files/" + attachmentId + "/" + toolType.DisplayHeaderAttachment + "?date=" + dateToUse);
|
||||
}
|
||||
$("#DataAttachmentFrame").prop("src", "");
|
||||
}
|
||||
|
||||
@*function MarkAsReviewed() {
|
||||
|
||||
var toolTypeId = $("#ToolTypeID").text();
|
||||
var headerId = $("#HeaderId").text();
|
||||
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "@Url.Content("~/api/awaitingdispo/markasreviewed")?tooltypeid=" + toolTypeId + "&headerid=" + headerId,
|
||||
success: function () {
|
||||
},
|
||||
error: function (e, ajaxOptions, ex) {
|
||||
DisplayWSMessage("error", "There was an error marking header as reviewed.", e, ex);
|
||||
$("#ReviewButton").prop("disabled", false);
|
||||
}
|
||||
});
|
||||
}*@
|
||||
function CheckDate() {
|
||||
var date = new Date($("#HeaderDate").text());
|
||||
return date;
|
||||
}
|
||||
|
||||
function LoadDetails() {
|
||||
|
||||
|
||||
|
||||
ShowDetailsDiv();
|
||||
|
||||
LoadHeaderAttachment();
|
||||
var dateToUse = $("#HeaderDate").text();
|
||||
var gridCreated = $("#DetailsGrid").data("igGrid");
|
||||
@ -269,19 +230,12 @@
|
||||
else {
|
||||
var detailsURL = "@Url.Content("~/api/tooltypes/")" + toolTypeID + "/headers/" + headerId + "/data";
|
||||
}
|
||||
//Changed from here
|
||||
//if (CheckArchive() == true) {
|
||||
// detailsURL = detailsURL + "?isArchive=true";
|
||||
//}
|
||||
|
||||
//Changed to here
|
||||
var gridColumns = [
|
||||
{ key: "AttachmentID", dataType: "string", hidden: true },
|
||||
{ key: "Title", dataType: "string", hidden: true },
|
||||
];
|
||||
|
||||
for (var i = 0; i < toolTypeMetaData.length; i++)
|
||||
{
|
||||
for (var i = 0; i < toolTypeMetaData.length; i++) {
|
||||
var f = toolTypeMetaData[i];
|
||||
if ((f.Header == false) && (f.GridDisplayOrder > 0)) {
|
||||
var col = {
|
||||
@ -294,7 +248,7 @@
|
||||
if (col.formatter != null) {
|
||||
if (col.formatter == "boolToYesNo")
|
||||
col.formatter = boolToYesNo;
|
||||
else
|
||||
else
|
||||
col.formatter = null;
|
||||
}
|
||||
gridColumns.push(col);
|
||||
@ -312,9 +266,7 @@
|
||||
],
|
||||
columns: gridColumns,
|
||||
dataSource: detailsURL,
|
||||
responseDataKey: "Results",
|
||||
//dataBound: MarkAsReviewed,
|
||||
|
||||
responseDataKey: "Results"
|
||||
};
|
||||
|
||||
if ((toolType != null) && (toolType.DataGridAttributes != null)) {
|
||||
@ -326,11 +278,10 @@
|
||||
|
||||
var initialHeaderId = @Model.HeaderID;
|
||||
var initialHeaderAttachmentId = "@Model.HeaderAttachmentID";
|
||||
|
||||
|
||||
|
||||
function RequestHeaderData()
|
||||
{
|
||||
|
||||
|
||||
function RequestHeaderData() {
|
||||
var startDate = $("#StartDate").igDatePicker("value");
|
||||
var startTime = $("#StartTime").igTimePicker("value");
|
||||
|
||||
@ -350,7 +301,6 @@
|
||||
if (initialHeaderId > 0) {
|
||||
headerId = initialHeaderId;
|
||||
parms.headerid = headerId;
|
||||
//isArchive = CheckArchive()
|
||||
$("#HeaderId").text(headerId);
|
||||
$("#HeaderAttachmentId").text(initialHeaderAttachmentId);
|
||||
initialHeaderId = -1;
|
||||
@ -358,18 +308,13 @@
|
||||
|
||||
var headerURL = "@Url.Content("~/api/tooltypes/")" + toolType.ID + "/headers?" + $.param(parms);
|
||||
|
||||
//if (CheckArchive() == true) {
|
||||
// headerURL = headerURL + "&isArchive=true";
|
||||
//}
|
||||
|
||||
var gridColumns = [
|
||||
{ key: "ID", dataType: "number", hidden: true },
|
||||
{ key: "AttachmentID", dataType: "string", hidden: true },
|
||||
{ key: "Title", dataType: "string", hidden: true },
|
||||
];
|
||||
|
||||
for (var i = 0; i < toolTypeMetaData.length; i++)
|
||||
{
|
||||
for (var i = 0; i < toolTypeMetaData.length; i++) {
|
||||
var f = toolTypeMetaData[i];
|
||||
if ((f.Header == true) && (f.GridDisplayOrder > 0)) {
|
||||
var col = {
|
||||
@ -395,11 +340,11 @@
|
||||
height: "100%",
|
||||
width: "100%",
|
||||
features: [
|
||||
{ name: "Paging", type: "local", recordCountKey: "TotalRows", pageSize: 100, pageSizeList : [50, 100, 250, 500], pageSizeUrlKey: "pageSize", "pageIndexUrlKey": "page" },
|
||||
{ name: "Paging", type: "local", recordCountKey: "TotalRows", pageSize: 100, pageSizeList: [50, 100, 250, 500], pageSizeUrlKey: "pageSize", "pageIndexUrlKey": "page" },
|
||||
{ name: "Selection", mode: "row", rowSelectionChanged: HeaderSelectionChanged },
|
||||
{ name: "Filtering", type: "local" },
|
||||
{ name: 'Resizing' },
|
||||
{ name: "Sorting", type:"local"}
|
||||
{ name: "Sorting", type: "local" }
|
||||
],
|
||||
columns: gridColumns,
|
||||
dataSource: headerURL,
|
||||
@ -427,7 +372,7 @@
|
||||
type: "POST",
|
||||
url: "@Url.Content("~/api/awaitingdispo/markasawaiting")?tooltypeid=" + toolTypeId + "&headerid=" + headerId,
|
||||
success: function (e) {
|
||||
DisplayWSMessage("info", "Marked as awaiting disposition",e);
|
||||
DisplayWSMessage("info", "Marked as awaiting disposition", e);
|
||||
$("#ReviewButton").prop("disabled", false);
|
||||
},
|
||||
error: function (e, ajaxOptions, ex) {
|
||||
@ -463,7 +408,7 @@
|
||||
|
||||
$("#StartDate").igDatePicker({
|
||||
dateInputFormat: "date",
|
||||
value: startTime,
|
||||
value: startTime,
|
||||
width: 125
|
||||
});
|
||||
|
||||
@ -487,13 +432,7 @@
|
||||
width: 110
|
||||
});
|
||||
}
|
||||
//function CheckArchive() {
|
||||
// var isArchive = new Boolean(false);
|
||||
|
||||
// isArchive = document.getElementById("isArchive").checked;
|
||||
|
||||
// return isArchive;
|
||||
//}
|
||||
$(document).ready(function () {
|
||||
|
||||
$("#ToolType").igCombo({
|
||||
@ -507,7 +446,7 @@
|
||||
LoadHeaderGrid();
|
||||
},
|
||||
selectionChanged: LoadHeaderGrid,
|
||||
initialSelectedItems: [ { value: @Model.ToolTypeID } ]
|
||||
initialSelectedItems: [{ value: @Model.ToolTypeID }]
|
||||
});
|
||||
|
||||
SetInitialDateTimes();
|
||||
@ -522,13 +461,6 @@
|
||||
|
||||
$("#OIExportButton").click(OIExportButton);
|
||||
|
||||
//setInterval(function () {
|
||||
// if ($("#chkAutoRefresh").is(':checked')) {
|
||||
// SetInitialDateTimes();
|
||||
// $("#LoadHeadersButton").click();
|
||||
// }
|
||||
// }, 180000);
|
||||
|
||||
});
|
||||
|
||||
</script>
|
Reference in New Issue
Block a user