initial source commit
This commit is contained in:
@@ -0,0 +1,114 @@
|
||||
@model Disco.Web.Models.Device.AddOfflineModel
|
||||
@{
|
||||
ViewBag.Title = Html.ToBreadcrumb("Devices", MVC.Device.Index(), "Add Offline");
|
||||
}
|
||||
@using (Html.BeginForm())
|
||||
{
|
||||
@Html.ValidationSummary(true)
|
||||
<div class="form" style="width: 450px">
|
||||
<table>
|
||||
<tr>
|
||||
<th>
|
||||
Serial Number:
|
||||
</th>
|
||||
<td>
|
||||
@Html.TextBoxFor(model => model.Device.SerialNumber)<br />
|
||||
@Html.ValidationMessageFor(model => model.Device.SerialNumber)
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>
|
||||
Asset Number:
|
||||
</th>
|
||||
<td>@Html.TextBoxFor(model => model.Device.AssetNumber)<br />
|
||||
@Html.ValidationMessageFor(model => model.Device.AssetNumber)
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>
|
||||
Location:
|
||||
</th>
|
||||
<td>@Html.TextBoxFor(model => model.Device.Location)<br />
|
||||
@Html.ValidationMessageFor(model => model.Device.Location)
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>
|
||||
Device Batch:
|
||||
</th>
|
||||
<td>
|
||||
@Html.DropDownListFor(model => model.Device.DeviceBatchId, Model.DeviceBatches) <br />
|
||||
@Html.ValidationMessageFor(model => model.Device.DeviceBatchId)
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>
|
||||
Device Profile:
|
||||
</th>
|
||||
<td>
|
||||
@Html.DropDownListFor(model => model.Device.DeviceProfileId, Model.DeviceProfiles.ToSelectListItems(Model.DefaultDeviceProfileId))<br />
|
||||
@Html.ValidationMessageFor(model => model.Device.DeviceProfileId)
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>
|
||||
Assigned User:
|
||||
</th>
|
||||
<td>
|
||||
@Html.TextBoxFor(model => model.Device.AssignedUserId)<br />
|
||||
@Html.ValidationMessageFor(model => model.Device.AssignedUserId)
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<p class="actions">
|
||||
<input type="submit" class="button" value="Add" />
|
||||
</p>
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
$SerialNumber = $('#Device_SerialNumber');
|
||||
$AssetNumber = $('#Device_AssetNumber');
|
||||
$Location = $('#Device_Location');
|
||||
$AssignedUserId = $('#Device_AssignedUserId');
|
||||
|
||||
$SerialNumber.focus().keydown(function (e) {
|
||||
if (e.which == 13) {
|
||||
$AssignedUserId.focus();
|
||||
return false;
|
||||
}
|
||||
});
|
||||
$AssetNumber.keydown(function (e) {
|
||||
if (e.which == 13) {
|
||||
$Location.focus();
|
||||
return false;
|
||||
}
|
||||
});
|
||||
$Location.keydown(function (e) {
|
||||
if (e.which == 13) {
|
||||
$AssignedUserId.focus();
|
||||
return false;
|
||||
}
|
||||
});
|
||||
$AssignedUserId
|
||||
.watermark('Search Users')
|
||||
.focus(function () { $AssignedUserId.select() })
|
||||
.autocomplete({
|
||||
source: '@(Url.Action(MVC.API.User.UpstreamUsers()))',
|
||||
minLength: 2,
|
||||
focus: function (e, ui) {
|
||||
$AssignedUserId.val(ui.item.DisplayName + ' (' + ui.item.Id + ')');
|
||||
return false;
|
||||
},
|
||||
select: function (e, ui) {
|
||||
$AssignedUserId.val(ui.item.Id).blur();
|
||||
return false;
|
||||
}
|
||||
}).data('autocomplete')._renderItem = function (ul, item) {
|
||||
return $("<li></li>")
|
||||
.data("item.autocomplete", item)
|
||||
.append("<a><strong>" + item.DisplayName + "</strong><br>" + item.Id + " (" + item.Type + ")</a>")
|
||||
.appendTo(ul);
|
||||
};
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
}
|
||||
@@ -0,0 +1,304 @@
|
||||
#pragma warning disable 1591
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.17929
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace Disco.Web.Views.Device
|
||||
{
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Text;
|
||||
using System.Web;
|
||||
using System.Web.Helpers;
|
||||
using System.Web.Mvc;
|
||||
using System.Web.Mvc.Ajax;
|
||||
using System.Web.Mvc.Html;
|
||||
using System.Web.Routing;
|
||||
using System.Web.Security;
|
||||
using System.Web.UI;
|
||||
using System.Web.WebPages;
|
||||
using Disco.BI.Extensions;
|
||||
using Disco.Models.Repository;
|
||||
using Disco.Web;
|
||||
using Disco.Web.Extensions;
|
||||
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "1.5.0.0")]
|
||||
[System.Web.WebPages.PageVirtualPathAttribute("~/Views/Device/AddOffline.cshtml")]
|
||||
public class AddOffline : System.Web.Mvc.WebViewPage<Disco.Web.Models.Device.AddOfflineModel>
|
||||
{
|
||||
public AddOffline()
|
||||
{
|
||||
}
|
||||
public override void Execute()
|
||||
{
|
||||
|
||||
#line 2 "..\..\Views\Device\AddOffline.cshtml"
|
||||
|
||||
ViewBag.Title = Html.ToBreadcrumb("Devices", MVC.Device.Index(), "Add Offline");
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n");
|
||||
|
||||
|
||||
#line 5 "..\..\Views\Device\AddOffline.cshtml"
|
||||
using (Html.BeginForm())
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 7 "..\..\Views\Device\AddOffline.cshtml"
|
||||
Write(Html.ValidationSummary(true));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 7 "..\..\Views\Device\AddOffline.cshtml"
|
||||
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <div");
|
||||
|
||||
WriteLiteral(" class=\"form\"");
|
||||
|
||||
WriteLiteral(" style=\"width: 450px\"");
|
||||
|
||||
WriteLiteral(">\r\n <table>\r\n <tr>\r\n <th>\r\n S" +
|
||||
"erial Number:\r\n </th>\r\n <td>\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 15 "..\..\Views\Device\AddOffline.cshtml"
|
||||
Write(Html.TextBoxFor(model => model.Device.SerialNumber));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("<br />\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 16 "..\..\Views\Device\AddOffline.cshtml"
|
||||
Write(Html.ValidationMessageFor(model => model.Device.SerialNumber));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n </td>\r\n </tr>\r\n <tr>\r\n <th" +
|
||||
">\r\n Asset Number:\r\n </th>\r\n <td" +
|
||||
">");
|
||||
|
||||
|
||||
#line 23 "..\..\Views\Device\AddOffline.cshtml"
|
||||
Write(Html.TextBoxFor(model => model.Device.AssetNumber));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("<br />\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 24 "..\..\Views\Device\AddOffline.cshtml"
|
||||
Write(Html.ValidationMessageFor(model => model.Device.AssetNumber));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n </td>\r\n </tr>\r\n <tr>\r\n <th" +
|
||||
">\r\n Location:\r\n </th>\r\n <td>");
|
||||
|
||||
|
||||
#line 31 "..\..\Views\Device\AddOffline.cshtml"
|
||||
Write(Html.TextBoxFor(model => model.Device.Location));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("<br />\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 32 "..\..\Views\Device\AddOffline.cshtml"
|
||||
Write(Html.ValidationMessageFor(model => model.Device.Location));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n </td>\r\n </tr>\r\n <tr>\r\n <th" +
|
||||
">\r\n Device Batch:\r\n </th>\r\n <td" +
|
||||
">\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 40 "..\..\Views\Device\AddOffline.cshtml"
|
||||
Write(Html.DropDownListFor(model => model.Device.DeviceBatchId, Model.DeviceBatches));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <br />\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 41 "..\..\Views\Device\AddOffline.cshtml"
|
||||
Write(Html.ValidationMessageFor(model => model.Device.DeviceBatchId));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n </td>\r\n </tr>\r\n <tr>\r\n <th" +
|
||||
">\r\n Device Profile:\r\n </th>\r\n <" +
|
||||
"td>\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 49 "..\..\Views\Device\AddOffline.cshtml"
|
||||
Write(Html.DropDownListFor(model => model.Device.DeviceProfileId, Model.DeviceProfiles.ToSelectListItems(Model.DefaultDeviceProfileId)));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("<br />\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 50 "..\..\Views\Device\AddOffline.cshtml"
|
||||
Write(Html.ValidationMessageFor(model => model.Device.DeviceProfileId));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n </td>\r\n </tr>\r\n <tr>\r\n <th" +
|
||||
">\r\n Assigned User:\r\n </th>\r\n <t" +
|
||||
"d>\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 58 "..\..\Views\Device\AddOffline.cshtml"
|
||||
Write(Html.TextBoxFor(model => model.Device.AssignedUserId));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("<br />\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 59 "..\..\Views\Device\AddOffline.cshtml"
|
||||
Write(Html.ValidationMessageFor(model => model.Device.AssignedUserId));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n </td>\r\n </tr>\r\n </table>\r\n <p");
|
||||
|
||||
WriteLiteral(" class=\"actions\"");
|
||||
|
||||
WriteLiteral(">\r\n <input");
|
||||
|
||||
WriteLiteral(" type=\"submit\"");
|
||||
|
||||
WriteLiteral(" class=\"button\"");
|
||||
|
||||
WriteLiteral(" value=\"Add\"");
|
||||
|
||||
WriteLiteral(" />\r\n </p>\r\n <script");
|
||||
|
||||
WriteLiteral(" type=\"text/javascript\"");
|
||||
|
||||
WriteLiteral(@">
|
||||
$(function () {
|
||||
$SerialNumber = $('#Device_SerialNumber');
|
||||
$AssetNumber = $('#Device_AssetNumber');
|
||||
$Location = $('#Device_Location');
|
||||
$AssignedUserId = $('#Device_AssignedUserId');
|
||||
|
||||
$SerialNumber.focus().keydown(function (e) {
|
||||
if (e.which == 13) {
|
||||
$AssignedUserId.focus();
|
||||
return false;
|
||||
}
|
||||
});
|
||||
$AssetNumber.keydown(function (e) {
|
||||
if (e.which == 13) {
|
||||
$Location.focus();
|
||||
return false;
|
||||
}
|
||||
});
|
||||
$Location.keydown(function (e) {
|
||||
if (e.which == 13) {
|
||||
$AssignedUserId.focus();
|
||||
return false;
|
||||
}
|
||||
});
|
||||
$AssignedUserId
|
||||
.watermark('Search Users')
|
||||
.focus(function () { $AssignedUserId.select() })
|
||||
.autocomplete({
|
||||
source: '");
|
||||
|
||||
|
||||
#line 95 "..\..\Views\Device\AddOffline.cshtml"
|
||||
Write(Url.Action(MVC.API.User.UpstreamUsers()));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(@"',
|
||||
minLength: 2,
|
||||
focus: function (e, ui) {
|
||||
$AssignedUserId.val(ui.item.DisplayName + ' (' + ui.item.Id + ')');
|
||||
return false;
|
||||
},
|
||||
select: function (e, ui) {
|
||||
$AssignedUserId.val(ui.item.Id).blur();
|
||||
return false;
|
||||
}
|
||||
}).data('autocomplete')._renderItem = function (ul, item) {
|
||||
return $(""<li></li>"")
|
||||
.data(""item.autocomplete"", item)
|
||||
.append(""<a><strong>"" + item.DisplayName + ""</strong><br>"" + item.Id + "" ("" + item.Type + "")</a>"")
|
||||
.appendTo(ul);
|
||||
};
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
");
|
||||
|
||||
|
||||
#line 114 "..\..\Views\Device\AddOffline.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
}
|
||||
}
|
||||
}
|
||||
#pragma warning restore 1591
|
||||
@@ -0,0 +1,193 @@
|
||||
@model Disco.Web.Models.Device.ShowModel
|
||||
@{
|
||||
Html.BundleDeferred("~/Style/Shadowbox");
|
||||
Html.BundleDeferred("~/ClientScripts/Modules/Shadowbox");
|
||||
}
|
||||
<table id="deviceShowResources">
|
||||
<tr>
|
||||
<td id="Attachments">
|
||||
<div class="attachmentOutput">
|
||||
@if (Model.Device.DeviceAttachments != null)
|
||||
{
|
||||
foreach (var da in Model.Device.DeviceAttachments)
|
||||
{
|
||||
<a href="@Url.Action(MVC.API.Device.AttachmentDownload(da.Id))" data-attachmentid="@da.Id" data-mimetype="@da.MimeType">
|
||||
<span class="icon" title="@da.Filename">
|
||||
<img alt="Attachment Thumbnail" src="@(Url.Action(MVC.API.Device.AttachmentThumbnail(da.Id)))" /></span>
|
||||
<span class="comments" title="@da.Comments">
|
||||
@{if (!string.IsNullOrEmpty(da.DocumentTemplateId))
|
||||
{ @da.DocumentTemplate.Description}
|
||||
else
|
||||
{ @da.Comments }}
|
||||
</span><span class="author">@da.TechUser.ToString()</span><span class="remove"></span><span class="timestamp" title="@da.Timestamp.ToFullDateTime()">@da.Timestamp.ToFuzzy()</span>
|
||||
</a>
|
||||
}
|
||||
}
|
||||
</div>
|
||||
<div class="attachmentInput clearfix">
|
||||
<span class="action upload"></span><span class="action photo"></span>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
Shadowbox.init({
|
||||
skipSetup: true,
|
||||
modal: true
|
||||
});
|
||||
$(function () {
|
||||
if (!document.DiscoFunctions) {
|
||||
document.DiscoFunctions = {};
|
||||
}
|
||||
document.DiscoFunctions.addAttachment = addAttachment;
|
||||
|
||||
$Attachments = $('#Attachments');
|
||||
$attachmentOutput = $Attachments.find('.attachmentOutput');
|
||||
|
||||
$attachmentOutput.find('span.remove').click(removeAttachment);
|
||||
|
||||
$('#dialogUpload').dialog({ autoOpen: false,
|
||||
draggable: false,
|
||||
modal: true,
|
||||
resizable: false,
|
||||
width: 860,
|
||||
height: 550,
|
||||
close: function () {
|
||||
silverlightUploadAttachment.content.Navigator.Navigate('/Hidden');
|
||||
}
|
||||
});
|
||||
|
||||
$('#dialogRemoveAttachment').dialog({
|
||||
resizable: false,
|
||||
height: 140,
|
||||
modal: true,
|
||||
autoOpen: false
|
||||
});
|
||||
|
||||
var onLoadNavigation = null;
|
||||
var isLoaded = null;
|
||||
Silverlight.createObject(
|
||||
'@(Links.ClientBin.Disco_Silverlight_AttachmentUpload_xap)',
|
||||
$('#silverlightHostUploadAttachment').get(0),
|
||||
'silverlightUploadAttachment',
|
||||
{ width: '840px', height: '500px', background: 'white', version: '4.0.60310.0' },
|
||||
{ onLoad: function () {
|
||||
if (onLoadNavigation) {
|
||||
silverlightUploadAttachment.content.Navigator.Navigate(onLoadNavigation);
|
||||
isLoaded = true;
|
||||
}
|
||||
}
|
||||
},
|
||||
'UploadUrl=@(Url.Action(MVC.API.Device.AttachmentUpload(Model.Device.SerialNumber, null)))'
|
||||
);
|
||||
|
||||
$attachmentInput = $Attachments.find('.attachmentInput');
|
||||
$attachmentInput.find('.photo').click(function () {
|
||||
showDialog('/WebCam');
|
||||
});
|
||||
$attachmentInput.find('.upload').click(function () {
|
||||
showDialog('/File');
|
||||
});
|
||||
|
||||
silverlightUploadAttachment = $('#silverlightUploadAttachment').get(0);
|
||||
function showDialog(navigationPath) {
|
||||
$('#dialogUpload').dialog('open');
|
||||
if (isLoaded) {
|
||||
silverlightUploadAttachment.content.Navigator.Navigate(navigationPath);
|
||||
} else {
|
||||
onLoadNavigation = navigationPath;
|
||||
}
|
||||
};
|
||||
function addAttachment(id, quick) {
|
||||
var data = { id: id };
|
||||
$.ajax({
|
||||
url: '@Url.Action(MVC.API.Device.Attachment())',
|
||||
dataType: 'json',
|
||||
data: data,
|
||||
success: function (d) {
|
||||
if (d.Result == 'OK') {
|
||||
var a = d.Attachment;
|
||||
|
||||
var e = $('<a><span class="icon"><img alt="Attachment Thumbnail" /></span><span class="comments"></span><span class="author"></span><span class="remove"></span><span class="timestamp"></span></a>');
|
||||
|
||||
e.attr('data-attachmentid', a.Id).attr('data-mimetype', a.MimeType).attr('href', '@(Url.Action(MVC.API.Device.AttachmentDownload()))/' + a.Id);
|
||||
e.find('.icon img').attr('src', '@(Url.Action(MVC.API.Device.AttachmentThumbnail()))/' + a.Id);
|
||||
e.find('.comments').text(a.Comments);
|
||||
e.find('.author').text(a.Author);
|
||||
e.find('.timestamp').text(a.TimestampFuzzy).attr('title', a.TimestampFull);
|
||||
e.find('.remove').click(removeAttachment);
|
||||
if (!quick)
|
||||
e.hide();
|
||||
$attachmentOutput.append(e);
|
||||
if (!quick)
|
||||
e.show('slow');
|
||||
if (a.MimeType.toLowerCase().indexOf('image/') == 0)
|
||||
e.shadowbox({ gallery: 'attachments', player: 'img', title: a.Comments });
|
||||
} else {
|
||||
alert('Unable to add attachment: ' + d.Result);
|
||||
}
|
||||
},
|
||||
error: function (jqXHR, textStatus, errorThrown) {
|
||||
alert('Unable to add attachment: ' + textStatus);
|
||||
}
|
||||
});
|
||||
}
|
||||
function removeAttachment() {
|
||||
$this = $(this).closest('a');
|
||||
|
||||
var data = { id: $this.attr('data-attachmentid') };
|
||||
var $dialogRemoveAttachment = $('#dialogRemoveAttachment');
|
||||
$dialogRemoveAttachment.dialog("enable");
|
||||
$dialogRemoveAttachment.dialog('option', 'buttons', {
|
||||
"Remove": function () {
|
||||
$dialogRemoveAttachment.dialog("disable");
|
||||
$dialogRemoveAttachment.dialog("option", "buttons", null);
|
||||
$.ajax({
|
||||
url: '@Url.Action(MVC.API.Device.AttachmentRemove())',
|
||||
dataType: 'json',
|
||||
data: data,
|
||||
success: function (d) {
|
||||
if (d == 'OK') {
|
||||
$this.hide(300).delay(300).queue(function () {
|
||||
var $this = $(this);
|
||||
if ($this.attr('data-mimetype').toLowerCase().indexOf('image/') == 0)
|
||||
Shadowbox.removeCache(this);
|
||||
$this.remove();
|
||||
});
|
||||
} else {
|
||||
alert('Unable to remove attachment: ' + d);
|
||||
}
|
||||
$dialogRemoveAttachment.dialog("close");
|
||||
},
|
||||
error: function (jqXHR, textStatus, errorThrown) {
|
||||
alert('Unable to remove attachment: ' + textStatus);
|
||||
$dialogRemoveAttachment.dialog("close");
|
||||
}
|
||||
});
|
||||
},
|
||||
"Cancel": function () {
|
||||
$dialogRemoveAttachment.dialog("close");
|
||||
}
|
||||
});
|
||||
|
||||
$dialogRemoveAttachment.dialog('open');
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
$attachmentOutput.children('a').each(function () {
|
||||
$this = $(this);
|
||||
if ($this.attr('data-mimetype').toLowerCase().indexOf('image/') == 0)
|
||||
$this.shadowbox({ gallery: 'attachments', player: 'img', title: $this.find('.comments').text() });
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<div id="dialogUpload" title="Upload Attachment">
|
||||
<div id="silverlightHostUploadAttachment">
|
||||
</div>
|
||||
</div>
|
||||
<div id="dialogRemoveAttachment" title="Remove this Attachment?">
|
||||
<p>
|
||||
<span class="ui-icon ui-icon-alert" style="float: left; margin: 0 7px 20px 0;"></span>
|
||||
Are you sure?</p>
|
||||
</div>
|
||||
@@ -0,0 +1,480 @@
|
||||
#pragma warning disable 1591
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.17929
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace Disco.Web.Views.Device.DeviceParts
|
||||
{
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Text;
|
||||
using System.Web;
|
||||
using System.Web.Helpers;
|
||||
using System.Web.Mvc;
|
||||
using System.Web.Mvc.Ajax;
|
||||
using System.Web.Mvc.Html;
|
||||
using System.Web.Routing;
|
||||
using System.Web.Security;
|
||||
using System.Web.UI;
|
||||
using System.Web.WebPages;
|
||||
using Disco.BI.Extensions;
|
||||
using Disco.Models.Repository;
|
||||
using Disco.Web;
|
||||
using Disco.Web.Extensions;
|
||||
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "1.5.0.0")]
|
||||
[System.Web.WebPages.PageVirtualPathAttribute("~/Views/Device/DeviceParts/Resources.cshtml")]
|
||||
public class Resources : System.Web.Mvc.WebViewPage<Disco.Web.Models.Device.ShowModel>
|
||||
{
|
||||
public Resources()
|
||||
{
|
||||
}
|
||||
public override void Execute()
|
||||
{
|
||||
|
||||
#line 2 "..\..\Views\Device\DeviceParts\Resources.cshtml"
|
||||
|
||||
Html.BundleDeferred("~/Style/Shadowbox");
|
||||
Html.BundleDeferred("~/ClientScripts/Modules/Shadowbox");
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n<table");
|
||||
|
||||
WriteLiteral(" id=\"deviceShowResources\"");
|
||||
|
||||
WriteLiteral(">\r\n <tr>\r\n <td");
|
||||
|
||||
WriteLiteral(" id=\"Attachments\"");
|
||||
|
||||
WriteLiteral(">\r\n <div");
|
||||
|
||||
WriteLiteral(" class=\"attachmentOutput\"");
|
||||
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
|
||||
#line 10 "..\..\Views\Device\DeviceParts\Resources.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 10 "..\..\Views\Device\DeviceParts\Resources.cshtml"
|
||||
if (Model.Device.DeviceAttachments != null)
|
||||
{
|
||||
foreach (var da in Model.Device.DeviceAttachments)
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <a");
|
||||
|
||||
WriteAttribute("href", Tuple.Create(" href=\"", 476), Tuple.Create("\"", 536)
|
||||
|
||||
#line 14 "..\..\Views\Device\DeviceParts\Resources.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 483), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.API.Device.AttachmentDownload(da.Id))
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 483), false)
|
||||
);
|
||||
|
||||
WriteLiteral(" data-attachmentid=\"");
|
||||
|
||||
|
||||
#line 14 "..\..\Views\Device\DeviceParts\Resources.cshtml"
|
||||
Write(da.Id);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\"");
|
||||
|
||||
WriteLiteral(" data-mimetype=\"");
|
||||
|
||||
|
||||
#line 14 "..\..\Views\Device\DeviceParts\Resources.cshtml"
|
||||
Write(da.MimeType);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\"");
|
||||
|
||||
WriteLiteral(">\r\n <span");
|
||||
|
||||
WriteLiteral(" class=\"icon\"");
|
||||
|
||||
WriteAttribute("title", Tuple.Create(" title=\"", 638), Tuple.Create("\"", 658)
|
||||
|
||||
#line 15 "..\..\Views\Device\DeviceParts\Resources.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 646), Tuple.Create<System.Object, System.Int32>(da.Filename
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 646), false)
|
||||
);
|
||||
|
||||
WriteLiteral(">\r\n <img");
|
||||
|
||||
WriteLiteral(" alt=\"Attachment Thumbnail\"");
|
||||
|
||||
WriteAttribute("src", Tuple.Create(" src=\"", 721), Tuple.Create("\"", 783)
|
||||
|
||||
#line 16 "..\..\Views\Device\DeviceParts\Resources.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 727), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.API.Device.AttachmentThumbnail(da.Id))
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 727), false)
|
||||
);
|
||||
|
||||
WriteLiteral(" /></span>\r\n <span");
|
||||
|
||||
WriteLiteral(" class=\"comments\"");
|
||||
|
||||
WriteAttribute("title", Tuple.Create(" title=\"", 842), Tuple.Create("\"", 862)
|
||||
|
||||
#line 17 "..\..\Views\Device\DeviceParts\Resources.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 850), Tuple.Create<System.Object, System.Int32>(da.Comments
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 850), false)
|
||||
);
|
||||
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
|
||||
#line 18 "..\..\Views\Device\DeviceParts\Resources.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 18 "..\..\Views\Device\DeviceParts\Resources.cshtml"
|
||||
if (!string.IsNullOrEmpty(da.DocumentTemplateId))
|
||||
{
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 19 "..\..\Views\Device\DeviceParts\Resources.cshtml"
|
||||
Write(da.DocumentTemplate.Description);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 19 "..\..\Views\Device\DeviceParts\Resources.cshtml"
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 21 "..\..\Views\Device\DeviceParts\Resources.cshtml"
|
||||
Write(da.Comments);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 21 "..\..\Views\Device\DeviceParts\Resources.cshtml"
|
||||
}
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n </span><span");
|
||||
|
||||
WriteLiteral(" class=\"author\"");
|
||||
|
||||
WriteLiteral(">");
|
||||
|
||||
|
||||
#line 22 "..\..\Views\Device\DeviceParts\Resources.cshtml"
|
||||
Write(da.TechUser.ToString());
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("</span><span");
|
||||
|
||||
WriteLiteral(" class=\"remove\"");
|
||||
|
||||
WriteLiteral("></span><span");
|
||||
|
||||
WriteLiteral(" class=\"timestamp\"");
|
||||
|
||||
WriteAttribute("title", Tuple.Create(" title=\"", 1232), Tuple.Create("\"", 1270)
|
||||
|
||||
#line 22 "..\..\Views\Device\DeviceParts\Resources.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 1240), Tuple.Create<System.Object, System.Int32>(da.Timestamp.ToFullDateTime()
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 1240), false)
|
||||
);
|
||||
|
||||
WriteLiteral(">");
|
||||
|
||||
|
||||
#line 22 "..\..\Views\Device\DeviceParts\Resources.cshtml"
|
||||
Write(da.Timestamp.ToFuzzy());
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("</span>\r\n </a> \r\n");
|
||||
|
||||
|
||||
#line 24 "..\..\Views\Device\DeviceParts\Resources.cshtml"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" </div>\r\n <div");
|
||||
|
||||
WriteLiteral(" class=\"attachmentInput clearfix\"");
|
||||
|
||||
WriteLiteral(">\r\n <span");
|
||||
|
||||
WriteLiteral(" class=\"action upload\"");
|
||||
|
||||
WriteLiteral("></span><span");
|
||||
|
||||
WriteLiteral(" class=\"action photo\"");
|
||||
|
||||
WriteLiteral("></span>\r\n </div>\r\n <script");
|
||||
|
||||
WriteLiteral(" type=\"text/javascript\"");
|
||||
|
||||
WriteLiteral(@">
|
||||
Shadowbox.init({
|
||||
skipSetup: true,
|
||||
modal: true
|
||||
});
|
||||
$(function () {
|
||||
if (!document.DiscoFunctions) {
|
||||
document.DiscoFunctions = {};
|
||||
}
|
||||
document.DiscoFunctions.addAttachment = addAttachment;
|
||||
|
||||
$Attachments = $('#Attachments');
|
||||
$attachmentOutput = $Attachments.find('.attachmentOutput');
|
||||
|
||||
$attachmentOutput.find('span.remove').click(removeAttachment);
|
||||
|
||||
$('#dialogUpload').dialog({ autoOpen: false,
|
||||
draggable: false,
|
||||
modal: true,
|
||||
resizable: false,
|
||||
width: 860,
|
||||
height: 550,
|
||||
close: function () {
|
||||
silverlightUploadAttachment.content.Navigator.Navigate('/Hidden');
|
||||
}
|
||||
});
|
||||
|
||||
$('#dialogRemoveAttachment').dialog({
|
||||
resizable: false,
|
||||
height: 140,
|
||||
modal: true,
|
||||
autoOpen: false
|
||||
});
|
||||
|
||||
var onLoadNavigation = null;
|
||||
var isLoaded = null;
|
||||
Silverlight.createObject(
|
||||
'");
|
||||
|
||||
|
||||
#line 67 "..\..\Views\Device\DeviceParts\Resources.cshtml"
|
||||
Write(Links.ClientBin.Disco_Silverlight_AttachmentUpload_xap);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(@"',
|
||||
$('#silverlightHostUploadAttachment').get(0),
|
||||
'silverlightUploadAttachment',
|
||||
{ width: '840px', height: '500px', background: 'white', version: '4.0.60310.0' },
|
||||
{ onLoad: function () {
|
||||
if (onLoadNavigation) {
|
||||
silverlightUploadAttachment.content.Navigator.Navigate(onLoadNavigation);
|
||||
isLoaded = true;
|
||||
}
|
||||
}
|
||||
},
|
||||
'UploadUrl=");
|
||||
|
||||
|
||||
#line 78 "..\..\Views\Device\DeviceParts\Resources.cshtml"
|
||||
Write(Url.Action(MVC.API.Device.AttachmentUpload(Model.Device.SerialNumber, null)));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(@"'
|
||||
);
|
||||
|
||||
$attachmentInput = $Attachments.find('.attachmentInput');
|
||||
$attachmentInput.find('.photo').click(function () {
|
||||
showDialog('/WebCam');
|
||||
});
|
||||
$attachmentInput.find('.upload').click(function () {
|
||||
showDialog('/File');
|
||||
});
|
||||
|
||||
silverlightUploadAttachment = $('#silverlightUploadAttachment').get(0);
|
||||
function showDialog(navigationPath) {
|
||||
$('#dialogUpload').dialog('open');
|
||||
if (isLoaded) {
|
||||
silverlightUploadAttachment.content.Navigator.Navigate(navigationPath);
|
||||
} else {
|
||||
onLoadNavigation = navigationPath;
|
||||
}
|
||||
};
|
||||
function addAttachment(id, quick) {
|
||||
var data = { id: id };
|
||||
$.ajax({
|
||||
url: '");
|
||||
|
||||
|
||||
#line 101 "..\..\Views\Device\DeviceParts\Resources.cshtml"
|
||||
Write(Url.Action(MVC.API.Device.Attachment()));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(@"',
|
||||
dataType: 'json',
|
||||
data: data,
|
||||
success: function (d) {
|
||||
if (d.Result == 'OK') {
|
||||
var a = d.Attachment;
|
||||
|
||||
var e = $('<a><span class=""icon""><img alt=""Attachment Thumbnail"" /></span><span class=""comments""></span><span class=""author""></span><span class=""remove""></span><span class=""timestamp""></span></a>');
|
||||
|
||||
e.attr('data-attachmentid', a.Id).attr('data-mimetype', a.MimeType).attr('href', '");
|
||||
|
||||
|
||||
#line 110 "..\..\Views\Device\DeviceParts\Resources.cshtml"
|
||||
Write(Url.Action(MVC.API.Device.AttachmentDownload()));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("/\' + a.Id);\r\n e.find(\'.icon img\').attr(\'src\', " +
|
||||
"\'");
|
||||
|
||||
|
||||
#line 111 "..\..\Views\Device\DeviceParts\Resources.cshtml"
|
||||
Write(Url.Action(MVC.API.Device.AttachmentThumbnail()));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("/\' + a.Id);\r\n e.find(\'.comments\').text(a.Comme" +
|
||||
"nts);\r\n e.find(\'.author\').text(a.Author);\r\n " +
|
||||
" e.find(\'.timestamp\').text(a.TimestampFuzzy).at" +
|
||||
"tr(\'title\', a.TimestampFull);\r\n e.find(\'.remo" +
|
||||
"ve\').click(removeAttachment);\r\n if (!quick)\r\n" +
|
||||
" e.hide();\r\n " +
|
||||
" $attachmentOutput.append(e);\r\n if (!qu" +
|
||||
"ick)\r\n e.show(\'slow\');\r\n " +
|
||||
" if (a.MimeType.toLowerCase().indexOf(\'image/\') == 0)\r\n " +
|
||||
" e.shadowbox({ gallery: \'attachments\', player: \'" +
|
||||
"img\', title: a.Comments });\r\n } else {\r\n " +
|
||||
" alert(\'Unable to add attachment: \' + d.Result);\r\n " +
|
||||
" }\r\n },\r\n " +
|
||||
" error: function (jqXHR, textStatus, errorThrown) {\r\n " +
|
||||
" alert(\'Unable to add attachment: \' + textStatus);\r\n " +
|
||||
" }\r\n });\r\n }\r\n " +
|
||||
" function removeAttachment() {\r\n $this = $(this)." +
|
||||
"closest(\'a\');\r\n\r\n var data = { id: $this.attr(\'data-attac" +
|
||||
"hmentid\') };\r\n var $dialogRemoveAttachment = $(\'#dialogRe" +
|
||||
"moveAttachment\');\r\n $dialogRemoveAttachment.dialog(\"enabl" +
|
||||
"e\");\r\n $dialogRemoveAttachment.dialog(\'option\', \'buttons\'" +
|
||||
", {\r\n \"Remove\": function () {\r\n " +
|
||||
" $dialogRemoveAttachment.dialog(\"disable\");\r\n " +
|
||||
" $dialogRemoveAttachment.dialog(\"option\", \"buttons\", null);\r\n " +
|
||||
" $.ajax({\r\n url: \'");
|
||||
|
||||
|
||||
#line 143 "..\..\Views\Device\DeviceParts\Resources.cshtml"
|
||||
Write(Url.Action(MVC.API.Device.AttachmentRemove()));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\',\r\n dataType: \'json\',\r\n " +
|
||||
" data: data,\r\n success: function" +
|
||||
" (d) {\r\n if (d == \'OK\') {\r\n " +
|
||||
" $this.hide(300).delay(300).queue(function () {\r\n " +
|
||||
" var $this = $(this);\r\n " +
|
||||
" if ($this.attr(\'data-mimetype\').toLowerCase(" +
|
||||
").indexOf(\'image/\') == 0)\r\n S" +
|
||||
"hadowbox.removeCache(this);\r\n $th" +
|
||||
"is.remove();\r\n });\r\n " +
|
||||
" } else {\r\n ale" +
|
||||
"rt(\'Unable to remove attachment: \' + d);\r\n " +
|
||||
" }\r\n $dialogRemoveAttachment.dialog(\"clo" +
|
||||
"se\");\r\n },\r\n " +
|
||||
" error: function (jqXHR, textStatus, errorThrown) {\r\n " +
|
||||
" alert(\'Unable to remove attachment: \' + textStatus);\r\n " +
|
||||
" $dialogRemoveAttachment.dialog(\"close\");\r\n " +
|
||||
" }\r\n });\r\n " +
|
||||
" },\r\n \"Cancel\": function () {\r\n " +
|
||||
" $dialogRemoveAttachment.dialog(\"close\");\r\n " +
|
||||
" }\r\n });\r\n\r\n $dialogR" +
|
||||
"emoveAttachment.dialog(\'open\');\r\n \r\n " +
|
||||
" return false;\r\n }\r\n\r\n $attachmentOutput" +
|
||||
".children(\'a\').each(function () {\r\n $this = $(this);\r\n " +
|
||||
" if ($this.attr(\'data-mimetype\').toLowerCase().indexOf(\'imag" +
|
||||
"e/\') == 0)\r\n $this.shadowbox({ gallery: \'attachments\'" +
|
||||
", player: \'img\', title: $this.find(\'.comments\').text() });\r\n " +
|
||||
"});\r\n });\r\n </script>\r\n </td>\r\n </tr>\r\n</tab" +
|
||||
"le>\r\n<div");
|
||||
|
||||
WriteLiteral(" id=\"dialogUpload\"");
|
||||
|
||||
WriteLiteral(" title=\"Upload Attachment\"");
|
||||
|
||||
WriteLiteral(">\r\n <div");
|
||||
|
||||
WriteLiteral(" id=\"silverlightHostUploadAttachment\"");
|
||||
|
||||
WriteLiteral(">\r\n </div>\r\n</div>\r\n<div");
|
||||
|
||||
WriteLiteral(" id=\"dialogRemoveAttachment\"");
|
||||
|
||||
WriteLiteral(" title=\"Remove this Attachment?\"");
|
||||
|
||||
WriteLiteral(">\r\n <p>\r\n <span");
|
||||
|
||||
WriteLiteral(" class=\"ui-icon ui-icon-alert\"");
|
||||
|
||||
WriteLiteral(" style=\"float: left; margin: 0 7px 20px 0;\"");
|
||||
|
||||
WriteLiteral("></span>\r\n Are you sure?</p>\r\n</div>");
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
#pragma warning restore 1591
|
||||
@@ -0,0 +1,9 @@
|
||||
@{
|
||||
ViewBag.Title = "Devices";
|
||||
}
|
||||
<h3>
|
||||
Search for a Device</h3>
|
||||
@Html.Partial(MVC.Shared.Views._SearchDialog, "devices")
|
||||
<div class="actionBar">
|
||||
@Html.ActionLinkButton("Add Offline Device", MVC.Device.AddOffline())
|
||||
</div>
|
||||
@@ -0,0 +1,80 @@
|
||||
#pragma warning disable 1591
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.17929
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace Disco.Web.Views.Device
|
||||
{
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Text;
|
||||
using System.Web;
|
||||
using System.Web.Helpers;
|
||||
using System.Web.Mvc;
|
||||
using System.Web.Mvc.Ajax;
|
||||
using System.Web.Mvc.Html;
|
||||
using System.Web.Routing;
|
||||
using System.Web.Security;
|
||||
using System.Web.UI;
|
||||
using System.Web.WebPages;
|
||||
using Disco.BI.Extensions;
|
||||
using Disco.Models.Repository;
|
||||
using Disco.Web;
|
||||
using Disco.Web.Extensions;
|
||||
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "1.5.0.0")]
|
||||
[System.Web.WebPages.PageVirtualPathAttribute("~/Views/Device/Index.cshtml")]
|
||||
public class Index : System.Web.Mvc.WebViewPage<dynamic>
|
||||
{
|
||||
public Index()
|
||||
{
|
||||
}
|
||||
public override void Execute()
|
||||
{
|
||||
|
||||
#line 1 "..\..\Views\Device\Index.cshtml"
|
||||
|
||||
ViewBag.Title = "Devices";
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n<h3>\r\n Search for a Device</h3>\r\n");
|
||||
|
||||
|
||||
#line 6 "..\..\Views\Device\Index.cshtml"
|
||||
Write(Html.Partial(MVC.Shared.Views._SearchDialog, "devices"));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n<div");
|
||||
|
||||
WriteLiteral(" class=\"actionBar\"");
|
||||
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 8 "..\..\Views\Device\Index.cshtml"
|
||||
Write(Html.ActionLinkButton("Add Offline Device", MVC.Device.AddOffline()));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n</div>\r\n");
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
#pragma warning restore 1591
|
||||
@@ -0,0 +1,467 @@
|
||||
@model Disco.Web.Models.Device.ShowModel
|
||||
@{
|
||||
ViewBag.Title = Html.ToBreadcrumb("Devices", MVC.Device.Index(), string.Format("{0} ({1})", Model.Device.ComputerName, Model.Device.SerialNumber));
|
||||
Html.BundleDeferred("~/ClientScripts/Modules/Silverlight");
|
||||
}
|
||||
<table class="deviceShow">
|
||||
<tr>
|
||||
<td class="details">
|
||||
<table>
|
||||
<tr>
|
||||
<th class="name">
|
||||
Computer Name:
|
||||
</th>
|
||||
<td class="value">
|
||||
@if (string.IsNullOrWhiteSpace(Model.Device.ComputerName))
|
||||
{
|
||||
<span class="smallMessage"><Unknown/Not Allocated></span>
|
||||
}
|
||||
else
|
||||
{
|
||||
@Model.Device.ComputerName
|
||||
}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="name">
|
||||
Asset Number:
|
||||
</th>
|
||||
<td class="value">
|
||||
@Html.TextBoxFor(m => m.Device.AssetNumber)
|
||||
@AjaxHelpers.AjaxSave()
|
||||
@AjaxHelpers.AjaxLoader()
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
var $ajaxSave = $('#Device_AssetNumber').next('.ajaxSave');
|
||||
$('#Device_AssetNumber').watermark('Asset Number').keydown(function (e) {
|
||||
$ajaxSave.show();
|
||||
if (e.which == 13) {
|
||||
$(this).blur();
|
||||
}
|
||||
}).change(function () {
|
||||
var $this = $(this);
|
||||
$ajaxSave.hide();
|
||||
var $ajaxLoading = $ajaxSave.next('.ajaxLoading').show();
|
||||
var data = { AssetNumber: $this.val() };
|
||||
$.getJSON('@(Url.Action(@MVC.API.Device.UpdateAssetNumber(Model.Device.SerialNumber)))', data, function (response, result) {
|
||||
if (result != 'success' || response != 'OK') {
|
||||
alert('Unable to change Asset Number:\n' + response);
|
||||
$ajaxLoading.hide();
|
||||
} else {
|
||||
$ajaxLoading.hide().next('.ajaxOk').show().delay('fast').fadeOut('slow');
|
||||
}
|
||||
});
|
||||
}).blur(function () {
|
||||
$ajaxSave.hide();
|
||||
}).focus(function () {
|
||||
$(this).select();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="name">
|
||||
Location:
|
||||
</th>
|
||||
<td class="value">
|
||||
@Html.TextBoxFor(m => m.Device.Location)
|
||||
@AjaxHelpers.AjaxSave()
|
||||
@AjaxHelpers.AjaxLoader()
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
var $ajaxSave = $('#Device_Location').next('.ajaxSave');
|
||||
$('#Device_Location').watermark('Location').keydown(function (e) {
|
||||
$ajaxSave.show();
|
||||
if (e.which == 13) {
|
||||
$(this).blur();
|
||||
}
|
||||
}).change(function () {
|
||||
var $this = $(this);
|
||||
$ajaxSave.hide();
|
||||
var $ajaxLoading = $ajaxSave.next('.ajaxLoading').show();
|
||||
var data = { Location: $this.val() };
|
||||
$.getJSON('@(Url.Action(@MVC.API.Device.UpdateLocation(Model.Device.SerialNumber)))', data, function (response, result) {
|
||||
if (result != 'success' || response != 'OK') {
|
||||
alert('Unable to change Location:\n' + response);
|
||||
$ajaxLoading.hide();
|
||||
} else {
|
||||
$ajaxLoading.hide().next('.ajaxOk').show().delay('fast').fadeOut('slow');
|
||||
}
|
||||
});
|
||||
}).blur(function () {
|
||||
$ajaxSave.hide();
|
||||
}).focus(function () {
|
||||
$(this).select();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="name">
|
||||
Batch:
|
||||
</th>
|
||||
<td class="value">
|
||||
@Html.DropDownListFor(m => m.Device.DeviceBatchId, Model.DeviceBatches)
|
||||
@AjaxHelpers.AjaxLoader() <span id="deviceBatchEdit" class="icon16" title="Edit">
|
||||
</span>
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
var $DeviceBatchId = $('#Device_DeviceBatchId');
|
||||
var $DeviceBatchDetails = $('#deviceBatchDetails');
|
||||
var $DeviceBatchEdit = $('#deviceBatchEdit');
|
||||
var jsonDate = function (json, unknownValue) {
|
||||
if (json && json.indexOf('') == 0) {
|
||||
return $.datepicker.formatDate('yy-mm-dd', new Date(parseInt(json.substr(6, json.length - 8))));
|
||||
} else
|
||||
return unknownValue;
|
||||
}
|
||||
var updateDetails = function (deviceBatchId) {
|
||||
$.getJSON('@(Url.Action(MVC.API.DeviceBatch.Index()))/' + deviceBatchId, function (response, result) {
|
||||
if (result == 'success') {
|
||||
if (response.Supplier)
|
||||
$DeviceBatchDetails.find('.supplier').text(response.Supplier);
|
||||
else
|
||||
$DeviceBatchDetails.find('.supplier').text('Unknown');
|
||||
|
||||
$DeviceBatchDetails.find('.purchaseDate').text(jsonDate(response.PurchaseDate, 'Unknown'));
|
||||
$DeviceBatchDetails.find('.warrantyValidUntil').text(jsonDate(response.WarrantyValidUntil, 'Unknown'));
|
||||
|
||||
if (response.InsuranceSupplier)
|
||||
$DeviceBatchDetails.find('.insuranceSupplier').text(response.InsuranceSupplier);
|
||||
else
|
||||
$DeviceBatchDetails.find('.insuranceSupplier').text('Unknown');
|
||||
|
||||
$DeviceBatchDetails.find('.insuredUntil').text(jsonDate(response.InsuredUntil, 'Unknown'));
|
||||
|
||||
$DeviceBatchDetails.slideDown('fast');
|
||||
$DeviceBatchEdit.fadeIn();
|
||||
} else {
|
||||
alert('Unable to load Device Batch details:\n' + response);
|
||||
}
|
||||
});
|
||||
};
|
||||
$DeviceBatchEdit.click(function () {
|
||||
window.location.href = '@(Url.Action(MVC.Config.DeviceBatch.Index(null)))/' + $DeviceBatchId.val();
|
||||
});
|
||||
$DeviceBatchId.change(function () {
|
||||
var $this = $(this);
|
||||
var $ajaxLoading = $this.next('.ajaxLoading').show();
|
||||
$DeviceBatchDetails.hide();
|
||||
$DeviceBatchEdit.hide();
|
||||
var data = { DeviceBatchId: $this.val() };
|
||||
$.getJSON('@(Url.Action(MVC.API.Device.UpdateDeviceBatchId(Model.Device.SerialNumber)))', data, function (response, result) {
|
||||
if (result != 'success' || response != 'OK') {
|
||||
alert('Unable to change Device Batch:\n' + response);
|
||||
$ajaxLoading.hide();
|
||||
} else {
|
||||
$ajaxLoading.hide().next('.ajaxOk').show().delay('fast').fadeOut('slow');
|
||||
if ($DeviceBatchId.val())
|
||||
updateDetails($DeviceBatchId.val());
|
||||
}
|
||||
});
|
||||
});
|
||||
$DeviceBatchEdit.hide();
|
||||
if ($DeviceBatchId.val())
|
||||
updateDetails($DeviceBatchId.val());
|
||||
});
|
||||
</script>
|
||||
<div id="deviceBatchDetails">
|
||||
<table class="sub">
|
||||
<tr>
|
||||
<th style="width: 50px">
|
||||
<strong>Purchased:</strong>
|
||||
</th>
|
||||
<td>
|
||||
Supplier: <span class="supplier"></span>
|
||||
<br />
|
||||
On: <span class="purchaseDate"></span>
|
||||
</td>
|
||||
<th style="width: 50px">
|
||||
<strong>Warranty:</strong>
|
||||
</th>
|
||||
<td>
|
||||
Valid Until: <span class="warrantyValidUntil"></span>
|
||||
</td>
|
||||
<th style="width: 50px">
|
||||
<strong>Insurance:</strong>
|
||||
</th>
|
||||
<td>
|
||||
Supplier: <span class="insuranceSupplier"></span>
|
||||
<br />
|
||||
Until: <span class="insuredUntil"></span>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="name">
|
||||
Profile:
|
||||
</th>
|
||||
<td class="value">
|
||||
@if (Model.Device.DecommissionedDate.HasValue)
|
||||
{
|
||||
@Model.Device.DeviceProfile.ToString()
|
||||
}
|
||||
else
|
||||
{
|
||||
@Html.DropDownListFor(m => m.Device.DeviceProfileId, Model.DeviceProfiles.ToSelectListItems(Model.Device.DeviceProfile))
|
||||
@AjaxHelpers.AjaxLoader()
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
$('#Device_DeviceProfileId').change(function () {
|
||||
var $this = $(this);
|
||||
var $ajaxLoading = $this.next('.ajaxLoading').show();
|
||||
var data = { DeviceProfileId: $this.val() };
|
||||
$.getJSON('@(Url.Action(MVC.API.Device.UpdateDeviceProfileId(Model.Device.SerialNumber)))', data, function (response, result) {
|
||||
if (result != 'success' || response != 'OK') {
|
||||
alert('Unable to change Device Profile:\n' + response);
|
||||
$ajaxLoading.hide();
|
||||
} else {
|
||||
$ajaxLoading.hide().next('.ajaxOk').show().delay('fast').fadeOut('slow');
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="name">
|
||||
Created:
|
||||
</th>
|
||||
<td class="value">
|
||||
@CommonHelpers.FriendlyDate(Model.Device.CreatedDate)
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="name">
|
||||
Enrolment:
|
||||
</th>
|
||||
<td class="value">
|
||||
First:
|
||||
@CommonHelpers.FriendlyDate(Model.Device.EnrolledDate)
|
||||
@if (Model.Device.AllowUnauthenticatedEnrol)
|
||||
{
|
||||
<a class="unlocked16" href="@Url.Action(MVC.API.Device.UpdateAllowUnauthenticatedEnrol(Model.Device.SerialNumber, "false", true))" title="Unauthenticated Enrolment is Allowed">
|
||||
</a>
|
||||
}
|
||||
else
|
||||
{
|
||||
<a class="locked16" href="@Url.Action(MVC.API.Device.UpdateAllowUnauthenticatedEnrol(Model.Device.SerialNumber, "true", true))" title="Unauthenticated Enrolment is Blocked">
|
||||
</a>
|
||||
}
|
||||
<br />
|
||||
Last:
|
||||
@CommonHelpers.FriendlyDate(Model.Device.LastEnrolDate)
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="name">
|
||||
Decommissioned:
|
||||
</th>
|
||||
<td class="value">
|
||||
@CommonHelpers.FriendlyDate(Model.Device.DecommissionedDate)
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="name">
|
||||
Last Network Logon:
|
||||
</th>
|
||||
<td class="value">
|
||||
<span id="lastNetworkLogonDate" class="nowrap">@CommonHelpers.FriendlyDate(Model.Device.LastNetworkLogonDate)</span>
|
||||
@if (!string.IsNullOrEmpty(Model.Device.ComputerName))
|
||||
{
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
var span = $('#lastNetworkLogonDate');
|
||||
$('<span>').addClass('ajaxHelperIcon ajaxLoading ajaxShowInitially').attr('title', 'Loading...').appendTo(span);
|
||||
|
||||
$.getJSON('@(Url.Action(MVC.API.Device.LastNetworkLogonDate(Model.Device.SerialNumber)))', function (response, result) {
|
||||
if (result != 'success') {
|
||||
alert('Unable to retrieve latest network logon date:\n' + response);
|
||||
$('<span>').addClass('smallMessage').text('[may not be current]').appendTo(span);
|
||||
} else {
|
||||
span.find('.ajaxLoading').hide();
|
||||
span.attr('title', response.Formatted).text(response.Friendly);
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
}
|
||||
</td>
|
||||
</tr>
|
||||
@if (!Model.Device.DecommissionedDate.HasValue)
|
||||
{
|
||||
<tr>
|
||||
<th class="name">
|
||||
Assigned User:
|
||||
</th>
|
||||
<td class="value">
|
||||
@Html.TextBoxFor(m => m.Device.AssignedUser, new { userId = Model.Device.AssignedUserId })
|
||||
@AjaxHelpers.AjaxRemove()
|
||||
@AjaxHelpers.AjaxLoader()
|
||||
<br />
|
||||
<a href="#" id="Device_AssignedUser_History_Trigger" class="smallLink">Show Assignment
|
||||
History (<span id="Device_AssignedUser_History_RecordCount"></span>)</a> <span id="Device_AssignedUser_History_None"
|
||||
class="smallMessage" style="display: none">No Assignment History Available</span>
|
||||
<div id="dialogRemoveAssignedUser" title="Remove this Device Assignment?">
|
||||
<p>
|
||||
<span class="ui-icon ui-icon-alert" style="float: left; margin: 0 7px 20px 0;"></span>
|
||||
Are you sure?</p>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
// Common Objects
|
||||
var $assignedUser = $('#Device_AssignedUser');
|
||||
var $ajaxLoading = $assignedUser.nextAll('.ajaxLoading').first();
|
||||
var $ajaxRemove = $assignedUser.nextAll('.ajaxRemove').first();
|
||||
|
||||
// Assign User
|
||||
$assignedUser
|
||||
.watermark('No Assigned User')
|
||||
.focus(function () { $assignedUser.select() })
|
||||
.autocomplete({
|
||||
source: '@(Url.Action(MVC.API.User.UpstreamUsers()))',
|
||||
minLength: 2,
|
||||
focus: function (e, ui) {
|
||||
$assignedUser.val(ui.item.DisplayName + ' (' + ui.item.Id + ')');
|
||||
return false;
|
||||
},
|
||||
select: function (e, ui) {
|
||||
updateAssignedUser(ui.item.Id);
|
||||
$assignedUser.val(ui.item.DisplayName + ' (' + ui.item.Id + ')');
|
||||
return false;
|
||||
}
|
||||
})
|
||||
.data('autocomplete')._renderItem = function (ul, item) {
|
||||
return $("<li></li>")
|
||||
.data("item.autocomplete", item)
|
||||
.append("<a><strong>" + item.DisplayName + "</strong><br>" + item.Id + " (" + item.Type + ")</a>")
|
||||
.appendTo(ul);
|
||||
};
|
||||
|
||||
var $dialogRemoveAssignedUser = $('#dialogRemoveAssignedUser');
|
||||
$dialogRemoveAssignedUser.dialog({
|
||||
resizable: false,
|
||||
height: 140,
|
||||
modal: true,
|
||||
autoOpen: false,
|
||||
buttons: {
|
||||
"Remove": function () {
|
||||
updateAssignedUser('');
|
||||
$assignedUser.val('');
|
||||
$dialogRemoveAssignedUser.dialog("close");
|
||||
},
|
||||
"Cancel": function () {
|
||||
$dialogRemoveAssignedUser.dialog("close");
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
// Un-Assign User
|
||||
if ($assignedUser.val() != '')
|
||||
$ajaxRemove.show();
|
||||
$ajaxRemove.click(function () {
|
||||
$dialogRemoveAssignedUser.dialog('open');
|
||||
return false;
|
||||
});
|
||||
|
||||
// History
|
||||
var deviceUserAssignmentCount = @(Model.Device.DeviceUserAssignments.Count);
|
||||
if (deviceUserAssignmentCount > 0) {
|
||||
$('#Device_AssignedUser_History_Trigger').click(function () {
|
||||
$(this).hide();
|
||||
$('#Device_AssignedUser_History_Host').show();
|
||||
$('#Device_AssignedUser_History').slideDown('slow');
|
||||
return false;
|
||||
});
|
||||
var recordCountText = deviceUserAssignmentCount + ' record';
|
||||
if (deviceUserAssignmentCount != 1)
|
||||
recordCountText += 's';
|
||||
$('#Device_AssignedUser_History_RecordCount').text(recordCountText)
|
||||
}
|
||||
else {
|
||||
$('#Device_AssignedUser_History_Trigger').hide();
|
||||
$('#Device_AssignedUser_History_None').show();
|
||||
};
|
||||
|
||||
function updateAssignedUser(userId) {
|
||||
$ajaxLoading.show();
|
||||
$ajaxRemove.hide();
|
||||
var data = { AssignedUserId: userId };
|
||||
$.getJSON('@(Url.Action(MVC.API.Device.UpdateAssignedUserId(Model.Device.SerialNumber)))', data, function (response, result) {
|
||||
if (result != 'success' || response != 'OK') {
|
||||
alert('Unable to change Assigned User:\n' + response);
|
||||
$ajaxLoading.hide();
|
||||
} else {
|
||||
$ajaxLoading.hide().next('.ajaxOk').show().delay('fast').fadeOut('slow');
|
||||
if (userId != '')
|
||||
$ajaxRemove.fadeIn('fast');
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
</script>
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
<tr id="Device_AssignedUser_History_Host" style="@(Model.Device.DecommissionedDate.HasValue ? "" : "display: none")">
|
||||
<td colspan="2">
|
||||
<div id="Device_AssignedUser_History" style="@(Model.Device.DecommissionedDate.HasValue ? "" : "display: none")">
|
||||
<h2>
|
||||
Assigned User History</h2>
|
||||
@Html.Partial(MVC.Device.Views._DeviceUserAssignmentHistoryTable, Model.Device)
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="name">
|
||||
Generate Documents:
|
||||
</th>
|
||||
<td class="value" colspan="3">
|
||||
@Html.DropDownList("DocumentTemplates", Model.DocumentTemplatesSelectListItems)
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
var generatePdfUrl = '@Url.Action(MVC.API.Device.GeneratePdf(Model.Device.SerialNumber, null))?DocumentTemplateId=';
|
||||
var $documentTemplates = $('#DocumentTemplates');
|
||||
$documentTemplates.change(function () {
|
||||
var v = $documentTemplates.val();
|
||||
if (v) {
|
||||
window.location.href = generatePdfUrl + v;
|
||||
$documentTemplates.val('');
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<td class="model">
|
||||
<table>
|
||||
<tr>
|
||||
<td class="subtleHighlight">
|
||||
<img alt="Model Image" src="@Url.Action(MVC.API.DeviceModel.Image(Model.Device.DeviceModelId, Model.Device.DeviceModel.ImageHash()))" />
|
||||
<h2>
|
||||
<a href="@(Url.Action(MVC.Config.DeviceModel.Index(Model.Device.DeviceModelId)))">@Model.Device.DeviceModel.ToString()</a></h2>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<h2>
|
||||
Certificates</h2>
|
||||
@Html.Partial(MVC.Device.Views._CertificateTable, Model.Certificates)
|
||||
<h2>
|
||||
Attachments</h2>
|
||||
@Html.Partial(MVC.Device.Views.DeviceParts.Resources, Model)
|
||||
<h2>
|
||||
Jobs</h2>
|
||||
@Html.Partial(MVC.Shared.Views._JobTable, Model.Jobs)
|
||||
@Html.Partial(MVC.Device.Views._DeviceActions, Model.Device)
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,43 @@
|
||||
@model IEnumerable<Disco.Models.Repository.DeviceCertificate>
|
||||
<div class="genericData certificateTable">
|
||||
@if (Model.Count() > 0)
|
||||
{
|
||||
<table class="genericData certificateTable">
|
||||
<tr>
|
||||
<th>
|
||||
Name
|
||||
</th>
|
||||
<th>
|
||||
Enabled
|
||||
</th>
|
||||
<th>
|
||||
Allocated
|
||||
</th>
|
||||
<th>
|
||||
Expires
|
||||
</th>
|
||||
</tr>
|
||||
@foreach (var item in Model)
|
||||
{
|
||||
<tr>
|
||||
<td>
|
||||
@Html.ActionLink(item.Name, MVC.API.WirelessCertificate.Download(item.Id))
|
||||
</td>
|
||||
<td>
|
||||
@item.Enabled
|
||||
</td>
|
||||
<td>
|
||||
@CommonHelpers.FriendlyDate(item.AllocatedDate)
|
||||
</td>
|
||||
<td>
|
||||
@CommonHelpers.FriendlyDate(item.ExpirationDate)
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
</table>
|
||||
}
|
||||
else
|
||||
{
|
||||
<span class="smallMessage">No Certificates Allocated</span>
|
||||
}
|
||||
</div>
|
||||
@@ -0,0 +1,180 @@
|
||||
#pragma warning disable 1591
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.17929
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace Disco.Web.Views.Device
|
||||
{
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Text;
|
||||
using System.Web;
|
||||
using System.Web.Helpers;
|
||||
using System.Web.Mvc;
|
||||
using System.Web.Mvc.Ajax;
|
||||
using System.Web.Mvc.Html;
|
||||
using System.Web.Routing;
|
||||
using System.Web.Security;
|
||||
using System.Web.UI;
|
||||
using System.Web.WebPages;
|
||||
using Disco.BI.Extensions;
|
||||
using Disco.Models.Repository;
|
||||
using Disco.Web;
|
||||
using Disco.Web.Extensions;
|
||||
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "1.5.0.0")]
|
||||
[System.Web.WebPages.PageVirtualPathAttribute("~/Views/Device/_CertificateTable.cshtml")]
|
||||
public class CertificateTable : System.Web.Mvc.WebViewPage<IEnumerable<Disco.Models.Repository.DeviceCertificate>>
|
||||
{
|
||||
public CertificateTable()
|
||||
{
|
||||
}
|
||||
public override void Execute()
|
||||
{
|
||||
WriteLiteral("<div");
|
||||
|
||||
WriteLiteral(" class=\"genericData certificateTable\"");
|
||||
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
|
||||
#line 3 "..\..\Views\Device\_CertificateTable.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 3 "..\..\Views\Device\_CertificateTable.cshtml"
|
||||
if (Model.Count() > 0)
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <table");
|
||||
|
||||
WriteLiteral(" class=\"genericData certificateTable\"");
|
||||
|
||||
WriteLiteral(@">
|
||||
<tr>
|
||||
<th>
|
||||
Name
|
||||
</th>
|
||||
<th>
|
||||
Enabled
|
||||
</th>
|
||||
<th>
|
||||
Allocated
|
||||
</th>
|
||||
<th>
|
||||
Expires
|
||||
</th>
|
||||
</tr>
|
||||
");
|
||||
|
||||
|
||||
#line 20 "..\..\Views\Device\_CertificateTable.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 20 "..\..\Views\Device\_CertificateTable.cshtml"
|
||||
foreach (var item in Model)
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <tr>\r\n <td>\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 24 "..\..\Views\Device\_CertificateTable.cshtml"
|
||||
Write(Html.ActionLink(item.Name, MVC.API.WirelessCertificate.Download(item.Id)));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n </td>\r\n <td>\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 27 "..\..\Views\Device\_CertificateTable.cshtml"
|
||||
Write(item.Enabled);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n </td>\r\n <td>\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 30 "..\..\Views\Device\_CertificateTable.cshtml"
|
||||
Write(CommonHelpers.FriendlyDate(item.AllocatedDate));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n </td>\r\n <td>\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 33 "..\..\Views\Device\_CertificateTable.cshtml"
|
||||
Write(CommonHelpers.FriendlyDate(item.ExpirationDate));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n </td>\r\n </tr>\r\n");
|
||||
|
||||
|
||||
#line 36 "..\..\Views\Device\_CertificateTable.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" </table>\r\n");
|
||||
|
||||
|
||||
#line 38 "..\..\Views\Device\_CertificateTable.cshtml"
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <span");
|
||||
|
||||
WriteLiteral(" class=\"smallMessage\"");
|
||||
|
||||
WriteLiteral(">No Certificates Allocated</span>\r\n");
|
||||
|
||||
|
||||
#line 42 "..\..\Views\Device\_CertificateTable.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("</div>\r\n");
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
#pragma warning restore 1591
|
||||
@@ -0,0 +1,124 @@
|
||||
@model Disco.Models.Repository.Device
|
||||
<div class="actionBar">
|
||||
@if (Model.CanDecommission())
|
||||
{
|
||||
@Html.ActionLinkButton("Decommission", MVC.API.Device.Decommission(Model.SerialNumber, true), "buttonDeviceDecommission")
|
||||
<div id="dialogConfirmDecommission" title="Decommission this Device?">
|
||||
<p>
|
||||
<span class="ui-icon ui-icon-alert" style="float: left; margin: 0 7px 20px 0;"></span>
|
||||
Are you sure?</p>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
var button = $('#buttonDeviceDecommission');
|
||||
var buttonDialog = $('#dialogConfirmDecommission');
|
||||
var buttonLink = button.attr('href');
|
||||
button.attr('href', '#');
|
||||
button.click(function () {
|
||||
buttonDialog.dialog('open');
|
||||
return false;
|
||||
});
|
||||
buttonDialog.dialog({
|
||||
resizable: false,
|
||||
height: 140,
|
||||
modal: true,
|
||||
autoOpen: false,
|
||||
buttons: {
|
||||
"Decommission": function () {
|
||||
var $this = $(this);
|
||||
$this.dialog("disable");
|
||||
$this.dialog("option", "buttons", null);
|
||||
window.location.href = buttonLink;
|
||||
},
|
||||
Cancel: function () {
|
||||
$(this).dialog("close");
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
}
|
||||
@if (Model.CanRecommission())
|
||||
{
|
||||
@Html.ActionLinkButton("Recommission", MVC.API.Device.Recommission(Model.SerialNumber, true), "buttonDeviceRecommission")
|
||||
<div id="dialogConfirmRecommission" title="Recommission this Device?">
|
||||
<p>
|
||||
<span class="ui-icon ui-icon-alert" style="float: left; margin: 0 7px 20px 0;"></span>
|
||||
Are you sure?</p>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
var button = $('#buttonDeviceRecommission');
|
||||
var buttonDialog = $('#dialogConfirmRecommission');
|
||||
var buttonLink = button.attr('href');
|
||||
button.attr('href', '#');
|
||||
button.click(function () {
|
||||
buttonDialog.dialog('open');
|
||||
return false;
|
||||
});
|
||||
buttonDialog.dialog({
|
||||
resizable: false,
|
||||
height: 140,
|
||||
modal: true,
|
||||
autoOpen: false,
|
||||
buttons: {
|
||||
"Recommission": function () {
|
||||
var $this = $(this);
|
||||
$this.dialog("disable");
|
||||
$this.dialog("option", "buttons", null);
|
||||
window.location.href = buttonLink;
|
||||
},
|
||||
Cancel: function () {
|
||||
$(this).dialog("close");
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
}
|
||||
@if (Model.CanDelete())
|
||||
{
|
||||
@Html.ActionLinkButton("Delete Device", MVC.API.Device.Delete(Model.SerialNumber, true), "buttonDeviceDelete")
|
||||
<div id="dialogConfirmDelete" title="Delete this Device?">
|
||||
<p>
|
||||
<span class="ui-icon ui-icon-alert" style="float: left; margin: 0 7px 20px 0;"></span>
|
||||
This item will be permanently deleted and cannot be recovered.<br />
|
||||
Jobs linked to this Device (but not to a User) will be deleted also.<br />
|
||||
Are you sure?</p>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
var button = $('#buttonDeviceDelete');
|
||||
var buttonDialog = $('#dialogConfirmDelete');
|
||||
var buttonLink = button.attr('href');
|
||||
button.attr('href', '#');
|
||||
button.click(function () {
|
||||
buttonDialog.dialog('open');
|
||||
return false;
|
||||
});
|
||||
buttonDialog.dialog({
|
||||
resizable: false,
|
||||
height: 200,
|
||||
modal: true,
|
||||
autoOpen: false,
|
||||
buttons: {
|
||||
"Delete": function () {
|
||||
var $this = $(this);
|
||||
$this.dialog("disable");
|
||||
$this.dialog("option", "buttons", null);
|
||||
window.location.href = buttonLink;
|
||||
},
|
||||
Cancel: function () {
|
||||
$(this).dialog("close");
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
}
|
||||
@if (Model.CanCreateJob())
|
||||
{
|
||||
Html.BundleDeferred("~/ClientScripts/Modules/Disco-CreateJob");
|
||||
@Html.ActionLinkButton("Create Job", MVC.Job.Create(Model.SerialNumber, Model.AssignedUserId), "buttonCreateJob")
|
||||
}
|
||||
</div>
|
||||
@@ -0,0 +1,326 @@
|
||||
#pragma warning disable 1591
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.17929
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace Disco.Web.Views.Device
|
||||
{
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Text;
|
||||
using System.Web;
|
||||
using System.Web.Helpers;
|
||||
using System.Web.Mvc;
|
||||
using System.Web.Mvc.Ajax;
|
||||
using System.Web.Mvc.Html;
|
||||
using System.Web.Routing;
|
||||
using System.Web.Security;
|
||||
using System.Web.UI;
|
||||
using System.Web.WebPages;
|
||||
using Disco.BI.Extensions;
|
||||
using Disco.Models.Repository;
|
||||
using Disco.Web;
|
||||
using Disco.Web.Extensions;
|
||||
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "1.5.0.0")]
|
||||
[System.Web.WebPages.PageVirtualPathAttribute("~/Views/Device/_DeviceActions.cshtml")]
|
||||
public class DeviceActions : System.Web.Mvc.WebViewPage<Disco.Models.Repository.Device>
|
||||
{
|
||||
public DeviceActions()
|
||||
{
|
||||
}
|
||||
public override void Execute()
|
||||
{
|
||||
WriteLiteral("<div");
|
||||
|
||||
WriteLiteral(" class=\"actionBar\"");
|
||||
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
|
||||
#line 3 "..\..\Views\Device\_DeviceActions.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 3 "..\..\Views\Device\_DeviceActions.cshtml"
|
||||
if (Model.CanDecommission())
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 5 "..\..\Views\Device\_DeviceActions.cshtml"
|
||||
Write(Html.ActionLinkButton("Decommission", MVC.API.Device.Decommission(Model.SerialNumber, true), "buttonDeviceDecommission"));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 5 "..\..\Views\Device\_DeviceActions.cshtml"
|
||||
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <div");
|
||||
|
||||
WriteLiteral(" id=\"dialogConfirmDecommission\"");
|
||||
|
||||
WriteLiteral(" title=\"Decommission this Device?\"");
|
||||
|
||||
WriteLiteral(">\r\n <p>\r\n <span");
|
||||
|
||||
WriteLiteral(" class=\"ui-icon ui-icon-alert\"");
|
||||
|
||||
WriteLiteral(" style=\"float: left; margin: 0 7px 20px 0;\"");
|
||||
|
||||
WriteLiteral("></span>\r\n Are you sure?</p>\r\n </div>\r\n");
|
||||
|
||||
WriteLiteral(" <script");
|
||||
|
||||
WriteLiteral(" type=\"text/javascript\"");
|
||||
|
||||
WriteLiteral(@">
|
||||
$(function () {
|
||||
var button = $('#buttonDeviceDecommission');
|
||||
var buttonDialog = $('#dialogConfirmDecommission');
|
||||
var buttonLink = button.attr('href');
|
||||
button.attr('href', '#');
|
||||
button.click(function () {
|
||||
buttonDialog.dialog('open');
|
||||
return false;
|
||||
});
|
||||
buttonDialog.dialog({
|
||||
resizable: false,
|
||||
height: 140,
|
||||
modal: true,
|
||||
autoOpen: false,
|
||||
buttons: {
|
||||
""Decommission"": function () {
|
||||
var $this = $(this);
|
||||
$this.dialog(""disable"");
|
||||
$this.dialog(""option"", ""buttons"", null);
|
||||
window.location.href = buttonLink;
|
||||
},
|
||||
Cancel: function () {
|
||||
$(this).dialog(""close"");
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
");
|
||||
|
||||
|
||||
#line 40 "..\..\Views\Device\_DeviceActions.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 41 "..\..\Views\Device\_DeviceActions.cshtml"
|
||||
if (Model.CanRecommission())
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 43 "..\..\Views\Device\_DeviceActions.cshtml"
|
||||
Write(Html.ActionLinkButton("Recommission", MVC.API.Device.Recommission(Model.SerialNumber, true), "buttonDeviceRecommission"));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 43 "..\..\Views\Device\_DeviceActions.cshtml"
|
||||
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <div");
|
||||
|
||||
WriteLiteral(" id=\"dialogConfirmRecommission\"");
|
||||
|
||||
WriteLiteral(" title=\"Recommission this Device?\"");
|
||||
|
||||
WriteLiteral(">\r\n <p>\r\n <span");
|
||||
|
||||
WriteLiteral(" class=\"ui-icon ui-icon-alert\"");
|
||||
|
||||
WriteLiteral(" style=\"float: left; margin: 0 7px 20px 0;\"");
|
||||
|
||||
WriteLiteral("></span>\r\n Are you sure?</p>\r\n </div>\r\n");
|
||||
|
||||
WriteLiteral(" <script");
|
||||
|
||||
WriteLiteral(" type=\"text/javascript\"");
|
||||
|
||||
WriteLiteral(@">
|
||||
$(function () {
|
||||
var button = $('#buttonDeviceRecommission');
|
||||
var buttonDialog = $('#dialogConfirmRecommission');
|
||||
var buttonLink = button.attr('href');
|
||||
button.attr('href', '#');
|
||||
button.click(function () {
|
||||
buttonDialog.dialog('open');
|
||||
return false;
|
||||
});
|
||||
buttonDialog.dialog({
|
||||
resizable: false,
|
||||
height: 140,
|
||||
modal: true,
|
||||
autoOpen: false,
|
||||
buttons: {
|
||||
""Recommission"": function () {
|
||||
var $this = $(this);
|
||||
$this.dialog(""disable"");
|
||||
$this.dialog(""option"", ""buttons"", null);
|
||||
window.location.href = buttonLink;
|
||||
},
|
||||
Cancel: function () {
|
||||
$(this).dialog(""close"");
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
");
|
||||
|
||||
|
||||
#line 78 "..\..\Views\Device\_DeviceActions.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 79 "..\..\Views\Device\_DeviceActions.cshtml"
|
||||
if (Model.CanDelete())
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 81 "..\..\Views\Device\_DeviceActions.cshtml"
|
||||
Write(Html.ActionLinkButton("Delete Device", MVC.API.Device.Delete(Model.SerialNumber, true), "buttonDeviceDelete"));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 81 "..\..\Views\Device\_DeviceActions.cshtml"
|
||||
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <div");
|
||||
|
||||
WriteLiteral(" id=\"dialogConfirmDelete\"");
|
||||
|
||||
WriteLiteral(" title=\"Delete this Device?\"");
|
||||
|
||||
WriteLiteral(">\r\n <p>\r\n <span");
|
||||
|
||||
WriteLiteral(" class=\"ui-icon ui-icon-alert\"");
|
||||
|
||||
WriteLiteral(" style=\"float: left; margin: 0 7px 20px 0;\"");
|
||||
|
||||
WriteLiteral("></span>\r\n This item will be permanently deleted and cannot be rec" +
|
||||
"overed.<br />\r\n Jobs linked to this Device (but not to a User) wi" +
|
||||
"ll be deleted also.<br />\r\n Are you sure?</p>\r\n </div>\r\n");
|
||||
|
||||
WriteLiteral(" <script");
|
||||
|
||||
WriteLiteral(" type=\"text/javascript\"");
|
||||
|
||||
WriteLiteral(@">
|
||||
$(function () {
|
||||
var button = $('#buttonDeviceDelete');
|
||||
var buttonDialog = $('#dialogConfirmDelete');
|
||||
var buttonLink = button.attr('href');
|
||||
button.attr('href', '#');
|
||||
button.click(function () {
|
||||
buttonDialog.dialog('open');
|
||||
return false;
|
||||
});
|
||||
buttonDialog.dialog({
|
||||
resizable: false,
|
||||
height: 200,
|
||||
modal: true,
|
||||
autoOpen: false,
|
||||
buttons: {
|
||||
""Delete"": function () {
|
||||
var $this = $(this);
|
||||
$this.dialog(""disable"");
|
||||
$this.dialog(""option"", ""buttons"", null);
|
||||
window.location.href = buttonLink;
|
||||
},
|
||||
Cancel: function () {
|
||||
$(this).dialog(""close"");
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
");
|
||||
|
||||
|
||||
#line 118 "..\..\Views\Device\_DeviceActions.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 119 "..\..\Views\Device\_DeviceActions.cshtml"
|
||||
if (Model.CanCreateJob())
|
||||
{
|
||||
Html.BundleDeferred("~/ClientScripts/Modules/Disco-CreateJob");
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 122 "..\..\Views\Device\_DeviceActions.cshtml"
|
||||
Write(Html.ActionLinkButton("Create Job", MVC.Job.Create(Model.SerialNumber, Model.AssignedUserId), "buttonCreateJob"));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 122 "..\..\Views\Device\_DeviceActions.cshtml"
|
||||
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("</div>");
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
#pragma warning restore 1591
|
||||
@@ -0,0 +1,89 @@
|
||||
@model IEnumerable<Disco.Models.BI.Search.DeviceSearchResultItem>
|
||||
<div class="genericData deviceTable">
|
||||
@if (Model != null && Model.Count() > 0)
|
||||
{
|
||||
<table class="genericData deviceTable">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>
|
||||
Serial#
|
||||
</th>
|
||||
<th>
|
||||
Asset#
|
||||
</th>
|
||||
<th>
|
||||
Name
|
||||
</th>
|
||||
<th>
|
||||
Model
|
||||
</th>
|
||||
<th>
|
||||
Profile
|
||||
</th>
|
||||
<th>
|
||||
Assigned User
|
||||
</th>
|
||||
<th>
|
||||
Jobs
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach (var item in Model)
|
||||
{
|
||||
<tr class="@(item.DecommissionedDate.HasValue ? "decommissioned" : string.Empty)">
|
||||
<td>
|
||||
@Html.ActionLink(item.SerialNumber, MVC.Device.Show(item.SerialNumber))
|
||||
</td>
|
||||
<td>
|
||||
@item.AssetNumber
|
||||
@if (item.DecommissionedDate.HasValue)
|
||||
{ <span class="smallMessage">(Decommissioned
|
||||
@CommonHelpers.FriendlyDate(item.DecommissionedDate.Value))</span> }
|
||||
</td>
|
||||
<td>
|
||||
@if (string.IsNullOrWhiteSpace(item.ComputerName))
|
||||
{
|
||||
<span class="smallMessage">Unknown</span>
|
||||
}
|
||||
else
|
||||
{
|
||||
@item.ComputerName
|
||||
}
|
||||
</td>
|
||||
<td>
|
||||
@if (item.DeviceModelDescription != null)
|
||||
{
|
||||
<span>@item.DeviceModelDescription</span>
|
||||
}
|
||||
else
|
||||
{
|
||||
<span class="smallMessage">Unknown</span>
|
||||
}
|
||||
</td>
|
||||
<td>
|
||||
@item.DeviceProfileDescription
|
||||
</td>
|
||||
<td>
|
||||
@if (string.IsNullOrEmpty(item.AssignedUserId))
|
||||
{
|
||||
<span class="smallMessage">N/A</span>
|
||||
}
|
||||
else
|
||||
{
|
||||
<span>@item.AssignedUserDescription</span>
|
||||
}
|
||||
</td>
|
||||
<td>
|
||||
@item.JobCount
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
}
|
||||
else
|
||||
{
|
||||
<span class="smallMessage">No Devices Found</span>
|
||||
}
|
||||
</div>
|
||||
@@ -0,0 +1,387 @@
|
||||
#pragma warning disable 1591
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.17929
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace Disco.Web.Views.Device
|
||||
{
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Text;
|
||||
using System.Web;
|
||||
using System.Web.Helpers;
|
||||
using System.Web.Mvc;
|
||||
using System.Web.Mvc.Ajax;
|
||||
using System.Web.Mvc.Html;
|
||||
using System.Web.Routing;
|
||||
using System.Web.Security;
|
||||
using System.Web.UI;
|
||||
using System.Web.WebPages;
|
||||
using Disco.BI.Extensions;
|
||||
using Disco.Models.Repository;
|
||||
using Disco.Web;
|
||||
using Disco.Web.Extensions;
|
||||
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "1.5.0.0")]
|
||||
[System.Web.WebPages.PageVirtualPathAttribute("~/Views/Device/_DeviceTable.cshtml")]
|
||||
public class DeviceTable : System.Web.Mvc.WebViewPage<IEnumerable<Disco.Models.BI.Search.DeviceSearchResultItem>>
|
||||
{
|
||||
public DeviceTable()
|
||||
{
|
||||
}
|
||||
public override void Execute()
|
||||
{
|
||||
WriteLiteral("<div");
|
||||
|
||||
WriteLiteral(" class=\"genericData deviceTable\"");
|
||||
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
|
||||
#line 3 "..\..\Views\Device\_DeviceTable.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 3 "..\..\Views\Device\_DeviceTable.cshtml"
|
||||
if (Model != null && Model.Count() > 0)
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <table");
|
||||
|
||||
WriteLiteral(" class=\"genericData deviceTable\"");
|
||||
|
||||
WriteLiteral(@">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>
|
||||
Serial#
|
||||
</th>
|
||||
<th>
|
||||
Asset#
|
||||
</th>
|
||||
<th>
|
||||
Name
|
||||
</th>
|
||||
<th>
|
||||
Model
|
||||
</th>
|
||||
<th>
|
||||
Profile
|
||||
</th>
|
||||
<th>
|
||||
Assigned User
|
||||
</th>
|
||||
<th>
|
||||
Jobs
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
");
|
||||
|
||||
|
||||
#line 32 "..\..\Views\Device\_DeviceTable.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 32 "..\..\Views\Device\_DeviceTable.cshtml"
|
||||
foreach (var item in Model)
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <tr");
|
||||
|
||||
WriteAttribute("class", Tuple.Create(" class=\"", 1005), Tuple.Create("\"", 1082)
|
||||
|
||||
#line 34 "..\..\Views\Device\_DeviceTable.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 1013), Tuple.Create<System.Object, System.Int32>(item.DecommissionedDate.HasValue ? "decommissioned" : string.Empty
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 1013), false)
|
||||
);
|
||||
|
||||
WriteLiteral(">\r\n <td>\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 36 "..\..\Views\Device\_DeviceTable.cshtml"
|
||||
Write(Html.ActionLink(item.SerialNumber, MVC.Device.Show(item.SerialNumber)));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n </td>\r\n <td>\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 39 "..\..\Views\Device\_DeviceTable.cshtml"
|
||||
Write(item.AssetNumber);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n");
|
||||
|
||||
|
||||
#line 40 "..\..\Views\Device\_DeviceTable.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 40 "..\..\Views\Device\_DeviceTable.cshtml"
|
||||
if (item.DecommissionedDate.HasValue)
|
||||
{
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <span");
|
||||
|
||||
WriteLiteral(" class=\"smallMessage\"");
|
||||
|
||||
WriteLiteral(">(Decommissioned\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 42 "..\..\Views\Device\_DeviceTable.cshtml"
|
||||
Write(CommonHelpers.FriendlyDate(item.DecommissionedDate.Value));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(")</span> ");
|
||||
|
||||
|
||||
#line 42 "..\..\Views\Device\_DeviceTable.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" </td>\r\n <td>\r\n");
|
||||
|
||||
|
||||
#line 45 "..\..\Views\Device\_DeviceTable.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 45 "..\..\Views\Device\_DeviceTable.cshtml"
|
||||
if (string.IsNullOrWhiteSpace(item.ComputerName))
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <span");
|
||||
|
||||
WriteLiteral(" class=\"smallMessage\"");
|
||||
|
||||
WriteLiteral(">Unknown</span>\r\n");
|
||||
|
||||
|
||||
#line 48 "..\..\Views\Device\_DeviceTable.cshtml"
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 51 "..\..\Views\Device\_DeviceTable.cshtml"
|
||||
Write(item.ComputerName);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 51 "..\..\Views\Device\_DeviceTable.cshtml"
|
||||
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" </td>\r\n <td>\r\n");
|
||||
|
||||
|
||||
#line 55 "..\..\Views\Device\_DeviceTable.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 55 "..\..\Views\Device\_DeviceTable.cshtml"
|
||||
if (item.DeviceModelDescription != null)
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <span>");
|
||||
|
||||
|
||||
#line 57 "..\..\Views\Device\_DeviceTable.cshtml"
|
||||
Write(item.DeviceModelDescription);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("</span>\r\n");
|
||||
|
||||
|
||||
#line 58 "..\..\Views\Device\_DeviceTable.cshtml"
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <span");
|
||||
|
||||
WriteLiteral(" class=\"smallMessage\"");
|
||||
|
||||
WriteLiteral(">Unknown</span> \r\n");
|
||||
|
||||
|
||||
#line 62 "..\..\Views\Device\_DeviceTable.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" </td>\r\n <td>\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 65 "..\..\Views\Device\_DeviceTable.cshtml"
|
||||
Write(item.DeviceProfileDescription);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n </td>\r\n <td>\r\n");
|
||||
|
||||
|
||||
#line 68 "..\..\Views\Device\_DeviceTable.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 68 "..\..\Views\Device\_DeviceTable.cshtml"
|
||||
if (string.IsNullOrEmpty(item.AssignedUserId))
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <span");
|
||||
|
||||
WriteLiteral(" class=\"smallMessage\"");
|
||||
|
||||
WriteLiteral(">N/A</span> \r\n");
|
||||
|
||||
|
||||
#line 71 "..\..\Views\Device\_DeviceTable.cshtml"
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <span>");
|
||||
|
||||
|
||||
#line 74 "..\..\Views\Device\_DeviceTable.cshtml"
|
||||
Write(item.AssignedUserDescription);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("</span>\r\n");
|
||||
|
||||
|
||||
#line 75 "..\..\Views\Device\_DeviceTable.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" </td>\r\n <td>\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 78 "..\..\Views\Device\_DeviceTable.cshtml"
|
||||
Write(item.JobCount);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n </td>\r\n </tr>\r\n");
|
||||
|
||||
|
||||
#line 81 "..\..\Views\Device\_DeviceTable.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" </tbody>\r\n </table>\r\n");
|
||||
|
||||
|
||||
#line 84 "..\..\Views\Device\_DeviceTable.cshtml"
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <span");
|
||||
|
||||
WriteLiteral(" class=\"smallMessage\"");
|
||||
|
||||
WriteLiteral(">No Devices Found</span>\r\n");
|
||||
|
||||
|
||||
#line 88 "..\..\Views\Device\_DeviceTable.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("</div>\r\n");
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
#pragma warning restore 1591
|
||||
@@ -0,0 +1,35 @@
|
||||
@model Disco.Models.Repository.Device
|
||||
@if (Model.DeviceUserAssignments.Count > 0)
|
||||
{
|
||||
<table class="genericData smallTable">
|
||||
<tr>
|
||||
<th>
|
||||
User
|
||||
</th>
|
||||
<th>
|
||||
Assigned
|
||||
</th>
|
||||
<th>
|
||||
Unassigned
|
||||
</th>
|
||||
</tr>
|
||||
@foreach (var dua in Model.DeviceUserAssignments.OrderByDescending(m => m.AssignedDate))
|
||||
{
|
||||
<tr>
|
||||
<td>
|
||||
@Html.ActionLink(dua.AssignedUser.ToString(), MVC.User.Show(dua.AssignedUserId))
|
||||
</td>
|
||||
<td>
|
||||
@CommonHelpers.FriendlyDate(dua.AssignedDate)
|
||||
</td>
|
||||
<td>
|
||||
@CommonHelpers.FriendlyDate(dua.UnassignedDate, "Current")
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
</table>
|
||||
}
|
||||
else
|
||||
{
|
||||
<span class="smallMessage">No Assignment History Available</span>
|
||||
}
|
||||
@@ -0,0 +1,142 @@
|
||||
#pragma warning disable 1591
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.17929
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace Disco.Web.Views.Device
|
||||
{
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Text;
|
||||
using System.Web;
|
||||
using System.Web.Helpers;
|
||||
using System.Web.Mvc;
|
||||
using System.Web.Mvc.Ajax;
|
||||
using System.Web.Mvc.Html;
|
||||
using System.Web.Routing;
|
||||
using System.Web.Security;
|
||||
using System.Web.UI;
|
||||
using System.Web.WebPages;
|
||||
using Disco.BI.Extensions;
|
||||
using Disco.Models.Repository;
|
||||
using Disco.Web;
|
||||
using Disco.Web.Extensions;
|
||||
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "1.5.0.0")]
|
||||
[System.Web.WebPages.PageVirtualPathAttribute("~/Views/Device/_DeviceUserAssignmentHistoryTable.cshtml")]
|
||||
public class DeviceUserAssignmentHistoryTable : System.Web.Mvc.WebViewPage<Disco.Models.Repository.Device>
|
||||
{
|
||||
public DeviceUserAssignmentHistoryTable()
|
||||
{
|
||||
}
|
||||
public override void Execute()
|
||||
{
|
||||
|
||||
#line 2 "..\..\Views\Device\_DeviceUserAssignmentHistoryTable.cshtml"
|
||||
if (Model.DeviceUserAssignments.Count > 0)
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <table");
|
||||
|
||||
WriteLiteral(" class=\"genericData smallTable\"");
|
||||
|
||||
WriteLiteral(">\r\n <tr>\r\n <th>\r\n User\r\n </th>\r\n " +
|
||||
" <th>\r\n Assigned\r\n </th>\r\n <th>\r\n " +
|
||||
" Unassigned\r\n </th>\r\n </tr>\r\n");
|
||||
|
||||
|
||||
#line 16 "..\..\Views\Device\_DeviceUserAssignmentHistoryTable.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 16 "..\..\Views\Device\_DeviceUserAssignmentHistoryTable.cshtml"
|
||||
foreach (var dua in Model.DeviceUserAssignments.OrderByDescending(m => m.AssignedDate))
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <tr>\r\n <td>\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 20 "..\..\Views\Device\_DeviceUserAssignmentHistoryTable.cshtml"
|
||||
Write(Html.ActionLink(dua.AssignedUser.ToString(), MVC.User.Show(dua.AssignedUserId)));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n </td>\r\n <td>\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 23 "..\..\Views\Device\_DeviceUserAssignmentHistoryTable.cshtml"
|
||||
Write(CommonHelpers.FriendlyDate(dua.AssignedDate));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n </td>\r\n <td>\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 26 "..\..\Views\Device\_DeviceUserAssignmentHistoryTable.cshtml"
|
||||
Write(CommonHelpers.FriendlyDate(dua.UnassignedDate, "Current"));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n </td>\r\n </tr>\r\n");
|
||||
|
||||
|
||||
#line 29 "..\..\Views\Device\_DeviceUserAssignmentHistoryTable.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" </table>\r\n");
|
||||
|
||||
|
||||
#line 31 "..\..\Views\Device\_DeviceUserAssignmentHistoryTable.cshtml"
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <span");
|
||||
|
||||
WriteLiteral(" class=\"smallMessage\"");
|
||||
|
||||
WriteLiteral(">No Assignment History Available</span>\r\n");
|
||||
|
||||
|
||||
#line 35 "..\..\Views\Device\_DeviceUserAssignmentHistoryTable.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
}
|
||||
}
|
||||
}
|
||||
#pragma warning restore 1591
|
||||
@@ -0,0 +1,3 @@
|
||||
@{
|
||||
Html.BundleDeferred("~/Style/Device");
|
||||
}
|
||||
@@ -0,0 +1,54 @@
|
||||
#pragma warning disable 1591
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.17929
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace Disco.Web.Views.Device
|
||||
{
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Text;
|
||||
using System.Web;
|
||||
using System.Web.Helpers;
|
||||
using System.Web.Mvc;
|
||||
using System.Web.Mvc.Ajax;
|
||||
using System.Web.Mvc.Html;
|
||||
using System.Web.Routing;
|
||||
using System.Web.Security;
|
||||
using System.Web.UI;
|
||||
using System.Web.WebPages;
|
||||
using Disco.BI.Extensions;
|
||||
using Disco.Models.Repository;
|
||||
using Disco.Web;
|
||||
using Disco.Web.Extensions;
|
||||
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "1.5.0.0")]
|
||||
[System.Web.WebPages.PageVirtualPathAttribute("~/Views/Device/_ViewStart.cshtml")]
|
||||
public class ViewStart : System.Web.Mvc.ViewStartPage
|
||||
{
|
||||
public ViewStart()
|
||||
{
|
||||
}
|
||||
public override void Execute()
|
||||
{
|
||||
|
||||
#line 1 "..\..\Views\Device\_ViewStart.cshtml"
|
||||
|
||||
Html.BundleDeferred("~/Style/Device");
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
}
|
||||
}
|
||||
}
|
||||
#pragma warning restore 1591
|
||||
@@ -0,0 +1,200 @@
|
||||
@model Disco.Web.Models.InitialConfig.CompleteModel
|
||||
@{
|
||||
ViewBag.Title = null;
|
||||
}
|
||||
<h1>@CommonHelpers.Breadcrumbs(Html.ToBreadcrumb("Initial Configuration", MVC.InitialConfig.Index(), "Complete"))</h1>
|
||||
<div id="initialConfig_Complete">
|
||||
<div class="form" style="width: 650px">
|
||||
<h2>Verification Results</h2>
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
<h3><span class="icon @(Model.RegistryDatabaseResult == null ? "success" : "error")"></span>Database</h3>
|
||||
<div class="testResult">
|
||||
@{
|
||||
if (Model.RegistryDatabaseResult == null)
|
||||
{
|
||||
<text>The database connection string was correctly configured and saved.</text>
|
||||
}
|
||||
else
|
||||
{
|
||||
<text>There was an error saving the database connection string configuration.</text>
|
||||
<br />
|
||||
<div class="exception">
|
||||
@{var ex = Model.RegistryDatabaseResult;
|
||||
do
|
||||
{
|
||||
<div>
|
||||
<h4>[@ex.GetType().Name]</h4>
|
||||
<div class="code">
|
||||
@ex.Message
|
||||
</div>
|
||||
</div>
|
||||
if (ex.InnerException == null) { break; }
|
||||
else { ex = ex.InnerException; }
|
||||
} while (true);
|
||||
}
|
||||
</div>
|
||||
}
|
||||
}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<h3><span class="icon @(Model.DiscoDnsTestResult.Item2 == null ? "success" : "warning")"></span>Disco DNS Entry</h3>
|
||||
<div class="testResult">
|
||||
@{
|
||||
if (Model.DiscoDnsTestResult.Item1 != null)
|
||||
{
|
||||
|
||||
<div>The following 'disco' DNS entry was found:</div>
|
||||
<div class="code">
|
||||
<strong>@Model.DiscoDnsTestResult.Item1.HostName</strong>
|
||||
@{
|
||||
if (Model.DiscoDnsTestResult.Item1.Aliases.Length > 0)
|
||||
{
|
||||
<div>
|
||||
Aliases:
|
||||
<ul>
|
||||
@foreach (var a in Model.DiscoDnsTestResult.Item1.Aliases)
|
||||
{
|
||||
<li>@a</li>
|
||||
}
|
||||
</ul>
|
||||
</div>
|
||||
}
|
||||
if (Model.DiscoDnsTestResult.Item1.AddressList.Length > 0)
|
||||
{
|
||||
<div>
|
||||
IP Addresses:
|
||||
<ul>
|
||||
@foreach (var a in Model.DiscoDnsTestResult.Item1.AddressList)
|
||||
{
|
||||
<li>@a.ToString()</li>
|
||||
}
|
||||
</ul>
|
||||
</div>
|
||||
}
|
||||
}
|
||||
</div>
|
||||
}
|
||||
else
|
||||
{
|
||||
<text>There was an error determining a DNS entry for Disco.</text>
|
||||
<br />
|
||||
<div class="exception">
|
||||
@{var ex = Model.DiscoDnsTestResult.Item2;
|
||||
do
|
||||
{
|
||||
<div>
|
||||
<h4>[@ex.GetType().Name]</h4>
|
||||
<div class="code">
|
||||
@ex.Message
|
||||
</div>
|
||||
</div>
|
||||
if (ex.InnerException == null) { break; }
|
||||
else { ex = ex.InnerException; }
|
||||
} while (true);
|
||||
}
|
||||
</div>
|
||||
}
|
||||
}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<h3><span class="icon @(Model.DiscoIctComAuWebResult == null ? "success" : "warning")"></span>Connectivity to <a href="http://discoict.com.au" target="_blank">http://discoict.com.au</a></h3>
|
||||
<div class="testResult">
|
||||
@{
|
||||
if (Model.DiscoIctComAuWebResult == null)
|
||||
{
|
||||
<text>A connection was successfully established to <a href="http://discoict.com.au" target="_blank">http://discoict.com.au</a>.</text>
|
||||
}
|
||||
else
|
||||
{
|
||||
<text>There was an error establishing a connection to <a href="http://discoict.com.au" target="_blank">http://discoict.com.au</a>. This may be caused by missing proxy settings - after starting Disco check these settings in the 'System' configuration area.</text>
|
||||
<br />
|
||||
<div class="exception">
|
||||
@{var ex = Model.DiscoIctComAuWebResult;
|
||||
do
|
||||
{
|
||||
<div>
|
||||
<h4>[@ex.GetType().Name]</h4>
|
||||
<div class="code">
|
||||
@ex.Message
|
||||
</div>
|
||||
</div>
|
||||
if (ex.InnerException == null) { break; }
|
||||
else { ex = ex.InnerException; }
|
||||
} while (true);
|
||||
}
|
||||
</div>
|
||||
}
|
||||
}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<h3><span class="icon information"></span>Unblock ICMP (Ping) for the Disco server</h3>
|
||||
<div class="testResult">
|
||||
The Disco Client Bootstrapper requires the Disco server to respond to ICMP Echo requests (Ping) to function correctly. Please insure any firewall rules are updated accordingly.
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<h3><span class="icon information"></span>Configure a regularly scheduled Backup</h3>
|
||||
<div class="testResult">
|
||||
Please ensure both the SQL Database and File Store are backed up regularly.
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="actionBar">
|
||||
@{
|
||||
if (Model.LaunchAllowed)
|
||||
{
|
||||
<a href="@(Url.Action(MVC.InitialConfig.RestartWebApp()))" class="button">Start Disco</a>
|
||||
}
|
||||
else
|
||||
{
|
||||
<a id="tryAgain" href="@(Url.Action(MVC.InitialConfig.Complete()))" class="button">Try Again</a>
|
||||
}
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
<div id="dialogWait" title="Please Wait">
|
||||
<h2><span class="ajaxLoading"></span>Re-running Verification Tests</h2>
|
||||
<div>Please wait while the verification tests are performed.</div>
|
||||
</div>
|
||||
<script>
|
||||
(function () {
|
||||
$(function () {
|
||||
$('#initialConfig_Complete').find('div.exception').each(function () {
|
||||
var $this = $(this);
|
||||
$('<a>').text('[Show Error Details]').attr('href', '#').insertBefore($this).click(function () {
|
||||
$(this).hide();
|
||||
$this.slideDown();
|
||||
return false;
|
||||
});
|
||||
$this.hide();
|
||||
});
|
||||
$('#tryAgain').click(function () {
|
||||
$('#dialogWait').dialog('open');
|
||||
});
|
||||
$('#dialogWait').dialog({
|
||||
autoOpen: false,
|
||||
draggable: false,
|
||||
modal: true,
|
||||
resizable: false,
|
||||
width: 400,
|
||||
height: 150,
|
||||
closeOnEscape: false
|
||||
}).closest('.ui-dialog').find('.ui-dialog-titlebar-close').hide();
|
||||
});
|
||||
})();
|
||||
</script>
|
||||
@@ -0,0 +1,726 @@
|
||||
#pragma warning disable 1591
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.17929
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace Disco.Web.Views.InitialConfig
|
||||
{
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Text;
|
||||
using System.Web;
|
||||
using System.Web.Helpers;
|
||||
using System.Web.Mvc;
|
||||
using System.Web.Mvc.Ajax;
|
||||
using System.Web.Mvc.Html;
|
||||
using System.Web.Routing;
|
||||
using System.Web.Security;
|
||||
using System.Web.UI;
|
||||
using System.Web.WebPages;
|
||||
using Disco.BI.Extensions;
|
||||
using Disco.Models.Repository;
|
||||
using Disco.Web;
|
||||
using Disco.Web.Extensions;
|
||||
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "1.5.0.0")]
|
||||
[System.Web.WebPages.PageVirtualPathAttribute("~/Views/InitialConfig/Complete.cshtml")]
|
||||
public class Complete : System.Web.Mvc.WebViewPage<Disco.Web.Models.InitialConfig.CompleteModel>
|
||||
{
|
||||
public Complete()
|
||||
{
|
||||
}
|
||||
public override void Execute()
|
||||
{
|
||||
|
||||
#line 2 "..\..\Views\InitialConfig\Complete.cshtml"
|
||||
|
||||
ViewBag.Title = null;
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n<h1>");
|
||||
|
||||
|
||||
#line 5 "..\..\Views\InitialConfig\Complete.cshtml"
|
||||
Write(CommonHelpers.Breadcrumbs(Html.ToBreadcrumb("Initial Configuration", MVC.InitialConfig.Index(), "Complete")));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("</h1>\r\n<div");
|
||||
|
||||
WriteLiteral(" id=\"initialConfig_Complete\"");
|
||||
|
||||
WriteLiteral(">\r\n <div");
|
||||
|
||||
WriteLiteral(" class=\"form\"");
|
||||
|
||||
WriteLiteral(" style=\"width: 650px\"");
|
||||
|
||||
WriteLiteral(">\r\n <h2>Verification Results</h2>\r\n <table>\r\n <tr>\r\n " +
|
||||
" <td>\r\n <h3><span");
|
||||
|
||||
WriteAttribute("class", Tuple.Create(" class=\"", 412), Tuple.Create("\"", 486)
|
||||
, Tuple.Create(Tuple.Create("", 420), Tuple.Create("icon", 420), true)
|
||||
|
||||
#line 12 "..\..\Views\InitialConfig\Complete.cshtml"
|
||||
, Tuple.Create(Tuple.Create(" ", 424), Tuple.Create<System.Object, System.Int32>(Model.RegistryDatabaseResult == null ? "success" : "error"
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 425), false)
|
||||
);
|
||||
|
||||
WriteLiteral("></span>Database</h3>\r\n <div");
|
||||
|
||||
WriteLiteral(" class=\"testResult\"");
|
||||
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
|
||||
#line 14 "..\..\Views\InitialConfig\Complete.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 14 "..\..\Views\InitialConfig\Complete.cshtml"
|
||||
|
||||
if (Model.RegistryDatabaseResult == null)
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" ");
|
||||
|
||||
WriteLiteral("The database connection string was correctly configured and saved.");
|
||||
|
||||
WriteLiteral("\r\n");
|
||||
|
||||
|
||||
#line 18 "..\..\Views\InitialConfig\Complete.cshtml"
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" ");
|
||||
|
||||
WriteLiteral("There was an error saving the database connection string configuration.");
|
||||
|
||||
WriteLiteral("\r\n");
|
||||
|
||||
WriteLiteral(" <br />\r\n");
|
||||
|
||||
WriteLiteral(" <div");
|
||||
|
||||
WriteLiteral(" class=\"exception\"");
|
||||
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
|
||||
#line 24 "..\..\Views\InitialConfig\Complete.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 24 "..\..\Views\InitialConfig\Complete.cshtml"
|
||||
var ex = Model.RegistryDatabaseResult;
|
||||
do
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <div>\r\n " +
|
||||
" <h4>[");
|
||||
|
||||
|
||||
#line 28 "..\..\Views\InitialConfig\Complete.cshtml"
|
||||
Write(ex.GetType().Name);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("]</h4>\r\n <div");
|
||||
|
||||
WriteLiteral(" class=\"code\"");
|
||||
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 30 "..\..\Views\InitialConfig\Complete.cshtml"
|
||||
Write(ex.Message);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n </div>\r\n " +
|
||||
" </div> \r\n");
|
||||
|
||||
|
||||
#line 33 "..\..\Views\InitialConfig\Complete.cshtml"
|
||||
if (ex.InnerException == null) { break; }
|
||||
else { ex = ex.InnerException; }
|
||||
} while (true);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n </div>\r\n");
|
||||
|
||||
|
||||
#line 38 "..\..\Views\InitialConfig\Complete.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n </div>\r\n </td>\r\n </tr>\r\n " +
|
||||
" <tr>\r\n <td>\r\n <h3><span");
|
||||
|
||||
WriteAttribute("class", Tuple.Create(" class=\"", 2040), Tuple.Create("\"", 2118)
|
||||
, Tuple.Create(Tuple.Create("", 2048), Tuple.Create("icon", 2048), true)
|
||||
|
||||
#line 45 "..\..\Views\InitialConfig\Complete.cshtml"
|
||||
, Tuple.Create(Tuple.Create(" ", 2052), Tuple.Create<System.Object, System.Int32>(Model.DiscoDnsTestResult.Item2 == null ? "success" : "warning"
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 2053), false)
|
||||
);
|
||||
|
||||
WriteLiteral("></span>Disco DNS Entry</h3>\r\n <div");
|
||||
|
||||
WriteLiteral(" class=\"testResult\"");
|
||||
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
|
||||
#line 47 "..\..\Views\InitialConfig\Complete.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 47 "..\..\Views\InitialConfig\Complete.cshtml"
|
||||
|
||||
if (Model.DiscoDnsTestResult.Item1 != null)
|
||||
{
|
||||
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <div>The following \'disco\' DNS entry was found:</div>" +
|
||||
"\r\n");
|
||||
|
||||
WriteLiteral(" <div");
|
||||
|
||||
WriteLiteral(" class=\"code\"");
|
||||
|
||||
WriteLiteral(">\r\n <strong>");
|
||||
|
||||
|
||||
#line 53 "..\..\Views\InitialConfig\Complete.cshtml"
|
||||
Write(Model.DiscoDnsTestResult.Item1.HostName);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("</strong>\r\n");
|
||||
|
||||
|
||||
#line 54 "..\..\Views\InitialConfig\Complete.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 54 "..\..\Views\InitialConfig\Complete.cshtml"
|
||||
|
||||
if (Model.DiscoDnsTestResult.Item1.Aliases.Length > 0)
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <div>\r\n " +
|
||||
" Aliases:\r\n <ul>\r\n");
|
||||
|
||||
|
||||
#line 60 "..\..\Views\InitialConfig\Complete.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 60 "..\..\Views\InitialConfig\Complete.cshtml"
|
||||
foreach (var a in Model.DiscoDnsTestResult.Item1.Aliases)
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <li>");
|
||||
|
||||
|
||||
#line 62 "..\..\Views\InitialConfig\Complete.cshtml"
|
||||
Write(a);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("</li>\r\n");
|
||||
|
||||
|
||||
#line 63 "..\..\Views\InitialConfig\Complete.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" </ul>\r\n </div>\r\n");
|
||||
|
||||
|
||||
#line 66 "..\..\Views\InitialConfig\Complete.cshtml"
|
||||
}
|
||||
if (Model.DiscoDnsTestResult.Item1.AddressList.Length > 0)
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <div>\r\n " +
|
||||
" IP Addresses:\r\n <ul>\r\n");
|
||||
|
||||
|
||||
#line 72 "..\..\Views\InitialConfig\Complete.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 72 "..\..\Views\InitialConfig\Complete.cshtml"
|
||||
foreach (var a in Model.DiscoDnsTestResult.Item1.AddressList)
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <li>");
|
||||
|
||||
|
||||
#line 74 "..\..\Views\InitialConfig\Complete.cshtml"
|
||||
Write(a.ToString());
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("</li>\r\n");
|
||||
|
||||
|
||||
#line 75 "..\..\Views\InitialConfig\Complete.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" </ul>\r\n </div>\r\n");
|
||||
|
||||
|
||||
#line 78 "..\..\Views\InitialConfig\Complete.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n </div>\r\n");
|
||||
|
||||
|
||||
#line 81 "..\..\Views\InitialConfig\Complete.cshtml"
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" ");
|
||||
|
||||
WriteLiteral("There was an error determining a DNS entry for Disco.");
|
||||
|
||||
WriteLiteral("\r\n");
|
||||
|
||||
WriteLiteral(" <br />\r\n");
|
||||
|
||||
WriteLiteral(" <div");
|
||||
|
||||
WriteLiteral(" class=\"exception\"");
|
||||
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
|
||||
#line 87 "..\..\Views\InitialConfig\Complete.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 87 "..\..\Views\InitialConfig\Complete.cshtml"
|
||||
var ex = Model.DiscoDnsTestResult.Item2;
|
||||
do
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <div>\r\n " +
|
||||
" <h4>[");
|
||||
|
||||
|
||||
#line 91 "..\..\Views\InitialConfig\Complete.cshtml"
|
||||
Write(ex.GetType().Name);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("]</h4>\r\n <div");
|
||||
|
||||
WriteLiteral(" class=\"code\"");
|
||||
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 93 "..\..\Views\InitialConfig\Complete.cshtml"
|
||||
Write(ex.Message);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n </div>\r\n " +
|
||||
" </div> \r\n");
|
||||
|
||||
|
||||
#line 96 "..\..\Views\InitialConfig\Complete.cshtml"
|
||||
if (ex.InnerException == null) { break; }
|
||||
else { ex = ex.InnerException; }
|
||||
} while (true);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n </div>\r\n");
|
||||
|
||||
|
||||
#line 101 "..\..\Views\InitialConfig\Complete.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n </div>\r\n </td>\r\n </tr>\r\n " +
|
||||
" <tr>\r\n <td>\r\n <h3><span");
|
||||
|
||||
WriteAttribute("class", Tuple.Create(" class=\"", 4945), Tuple.Create("\"", 5021)
|
||||
, Tuple.Create(Tuple.Create("", 4953), Tuple.Create("icon", 4953), true)
|
||||
|
||||
#line 108 "..\..\Views\InitialConfig\Complete.cshtml"
|
||||
, Tuple.Create(Tuple.Create(" ", 4957), Tuple.Create<System.Object, System.Int32>(Model.DiscoIctComAuWebResult == null ? "success" : "warning"
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 4958), false)
|
||||
);
|
||||
|
||||
WriteLiteral("></span>Connectivity to <a");
|
||||
|
||||
WriteLiteral(" href=\"http://discoict.com.au\"");
|
||||
|
||||
WriteLiteral(" target=\"_blank\"");
|
||||
|
||||
WriteLiteral(">http://discoict.com.au</a></h3>\r\n <div");
|
||||
|
||||
WriteLiteral(" class=\"testResult\"");
|
||||
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
|
||||
#line 110 "..\..\Views\InitialConfig\Complete.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 110 "..\..\Views\InitialConfig\Complete.cshtml"
|
||||
|
||||
if (Model.DiscoIctComAuWebResult == null)
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" ");
|
||||
|
||||
WriteLiteral("A connection was successfully established to <a");
|
||||
|
||||
WriteLiteral(" href=\"http://discoict.com.au\"");
|
||||
|
||||
WriteLiteral(" target=\"_blank\"");
|
||||
|
||||
WriteLiteral(">http://discoict.com.au</a>.");
|
||||
|
||||
WriteLiteral("\r\n");
|
||||
|
||||
|
||||
#line 114 "..\..\Views\InitialConfig\Complete.cshtml"
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" ");
|
||||
|
||||
WriteLiteral("There was an error establishing a connection to <a");
|
||||
|
||||
WriteLiteral(" href=\"http://discoict.com.au\"");
|
||||
|
||||
WriteLiteral(" target=\"_blank\"");
|
||||
|
||||
WriteLiteral(">http://discoict.com.au</a>. This may be caused by missing proxy settings - after" +
|
||||
" starting Disco check these settings in the \'System\' configuration area.");
|
||||
|
||||
WriteLiteral("\r\n");
|
||||
|
||||
WriteLiteral(" <br />\r\n");
|
||||
|
||||
WriteLiteral(" <div");
|
||||
|
||||
WriteLiteral(" class=\"exception\"");
|
||||
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
|
||||
#line 120 "..\..\Views\InitialConfig\Complete.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 120 "..\..\Views\InitialConfig\Complete.cshtml"
|
||||
var ex = Model.DiscoIctComAuWebResult;
|
||||
do
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <div>\r\n " +
|
||||
" <h4>[");
|
||||
|
||||
|
||||
#line 124 "..\..\Views\InitialConfig\Complete.cshtml"
|
||||
Write(ex.GetType().Name);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("]</h4>\r\n <div");
|
||||
|
||||
WriteLiteral(" class=\"code\"");
|
||||
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 126 "..\..\Views\InitialConfig\Complete.cshtml"
|
||||
Write(ex.Message);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n </div>\r\n " +
|
||||
" </div> \r\n");
|
||||
|
||||
|
||||
#line 129 "..\..\Views\InitialConfig\Complete.cshtml"
|
||||
if (ex.InnerException == null) { break; }
|
||||
else { ex = ex.InnerException; }
|
||||
} while (true);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n </div>\r\n");
|
||||
|
||||
|
||||
#line 134 "..\..\Views\InitialConfig\Complete.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n </div>\r\n </td>\r\n </tr>\r\n " +
|
||||
" <tr>\r\n <td>\r\n <h3><span");
|
||||
|
||||
WriteLiteral(" class=\"icon information\"");
|
||||
|
||||
WriteLiteral("></span>Unblock ICMP (Ping) for the Disco server</h3>\r\n <div");
|
||||
|
||||
WriteLiteral(" class=\"testResult\"");
|
||||
|
||||
WriteLiteral(@">
|
||||
The Disco Client Bootstrapper requires the Disco server to respond to ICMP Echo requests (Ping) to function correctly. Please insure any firewall rules are updated accordingly.
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<h3><span");
|
||||
|
||||
WriteLiteral(" class=\"icon information\"");
|
||||
|
||||
WriteLiteral("></span>Configure a regularly scheduled Backup</h3>\r\n <div");
|
||||
|
||||
WriteLiteral(" class=\"testResult\"");
|
||||
|
||||
WriteLiteral(">\r\n Please ensure both the SQL Database and File Store are" +
|
||||
" backed up regularly.\r\n </div>\r\n </td>\r\n " +
|
||||
" </tr>\r\n </table>\r\n </div>\r\n <div");
|
||||
|
||||
WriteLiteral(" class=\"actionBar\"");
|
||||
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
|
||||
#line 158 "..\..\Views\InitialConfig\Complete.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 158 "..\..\Views\InitialConfig\Complete.cshtml"
|
||||
|
||||
if (Model.LaunchAllowed)
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <a");
|
||||
|
||||
WriteAttribute("href", Tuple.Create(" href=\"", 7791), Tuple.Create("\"", 7846)
|
||||
|
||||
#line 161 "..\..\Views\InitialConfig\Complete.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 7798), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.InitialConfig.RestartWebApp())
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 7798), false)
|
||||
);
|
||||
|
||||
WriteLiteral(" class=\"button\"");
|
||||
|
||||
WriteLiteral(">Start Disco</a>\r\n");
|
||||
|
||||
|
||||
#line 162 "..\..\Views\InitialConfig\Complete.cshtml"
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <a");
|
||||
|
||||
WriteLiteral(" id=\"tryAgain\"");
|
||||
|
||||
WriteAttribute("href", Tuple.Create(" href=\"", 7956), Tuple.Create("\"", 8006)
|
||||
|
||||
#line 165 "..\..\Views\InitialConfig\Complete.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 7963), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.InitialConfig.Complete())
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 7963), false)
|
||||
);
|
||||
|
||||
WriteLiteral(" class=\"button\"");
|
||||
|
||||
WriteLiteral(">Try Again</a>\r\n");
|
||||
|
||||
|
||||
#line 166 "..\..\Views\InitialConfig\Complete.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n </div>\r\n</div>\r\n<div");
|
||||
|
||||
WriteLiteral(" id=\"dialogWait\"");
|
||||
|
||||
WriteLiteral(" title=\"Please Wait\"");
|
||||
|
||||
WriteLiteral(">\r\n <h2><span");
|
||||
|
||||
WriteLiteral(" class=\"ajaxLoading\"");
|
||||
|
||||
WriteLiteral(@"></span>Re-running Verification Tests</h2>
|
||||
<div>Please wait while the verification tests are performed.</div>
|
||||
</div>
|
||||
<script>
|
||||
(function () {
|
||||
$(function () {
|
||||
$('#initialConfig_Complete').find('div.exception').each(function () {
|
||||
var $this = $(this);
|
||||
$('<a>').text('[Show Error Details]').attr('href', '#').insertBefore($this).click(function () {
|
||||
$(this).hide();
|
||||
$this.slideDown();
|
||||
return false;
|
||||
});
|
||||
$this.hide();
|
||||
});
|
||||
$('#tryAgain').click(function () {
|
||||
$('#dialogWait').dialog('open');
|
||||
});
|
||||
$('#dialogWait').dialog({
|
||||
autoOpen: false,
|
||||
draggable: false,
|
||||
modal: true,
|
||||
resizable: false,
|
||||
width: 400,
|
||||
height: 150,
|
||||
closeOnEscape: false
|
||||
}).closest('.ui-dialog').find('.ui-dialog-titlebar-close').hide();
|
||||
});
|
||||
})();
|
||||
</script>
|
||||
");
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
#pragma warning restore 1591
|
||||
@@ -0,0 +1,119 @@
|
||||
@model Disco.Web.Models.InitialConfig.DatabaseModel
|
||||
@{
|
||||
ViewBag.Title = null;
|
||||
}
|
||||
<h1>@CommonHelpers.Breadcrumbs(Html.ToBreadcrumb("Initial Configuration", MVC.InitialConfig.Index(), "Database"))</h1>
|
||||
@using (Html.BeginForm())
|
||||
{
|
||||
@Html.ValidationSummary(true)
|
||||
|
||||
<div class="form" style="width: 650px">
|
||||
<h2>SQL Server Connection</h2>
|
||||
<table>
|
||||
<tr>
|
||||
<th style="width: 150px;">Server:
|
||||
</th>
|
||||
<td>
|
||||
@Html.EditorFor(m => m.Server) @Html.ValidationMessageFor(m => m.Server)
|
||||
<div class="smallMessage">
|
||||
If the default instance of SQL Server is not being used, include the instance name.<br />
|
||||
For example: <span class="code">"SERVER_NAME\INSTANCE_NAME"</span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Database Name:
|
||||
</th>
|
||||
<td>
|
||||
@Html.EditorFor(m => m.DatabaseName) @Html.ValidationMessageFor(m => m.DatabaseName)
|
||||
<div class="smallMessage">
|
||||
An attempt will be made to create a database with this name if it does not exist.
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Authentication Method:
|
||||
</th>
|
||||
<td>
|
||||
@Html.DropDownListFor(m => m.AuthMethod, Model.AuthMethods) @Html.ValidationMessageFor(m => m.AuthMethod)
|
||||
<div class="smallMessage">
|
||||
Integrated Authentication is recommended.<br />
|
||||
To use Integrated Authentication ensure the <span class="code">DiscoServiceAccount</span> domain user has the <span class="code">db_owner</span> role over the database, or <span class="code">sysadmin</span> role if creating a new database.
|
||||
</div>
|
||||
<div id="auth_Sql" style="margin-top: 15px; display: none;">
|
||||
<h4>SQL Authentication Credentials</h4>
|
||||
<div class="smallMessage">
|
||||
The following credentials will be stored in clear-text.
|
||||
</div>
|
||||
<table class="sub">
|
||||
<tr>
|
||||
<th>Username:</th>
|
||||
<td>@Html.EditorFor(m => m.Auth_SQL_Username) @Html.ValidationMessageFor(m => m.Auth_SQL_Username)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Password:</th>
|
||||
<td>@Html.EditorFor(m => m.Auth_SQL_Password) @Html.ValidationMessageFor(m => m.Auth_SQL_Password)</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="actionBar">
|
||||
<input id="submitForm" type="submit" class="button" value="Continue" />
|
||||
</div>
|
||||
}
|
||||
<div id="dialogWait" title="Please Wait">
|
||||
<h2><span class="ajaxLoading"></span>Building and Validating Database</h2>
|
||||
<div>Please wait while the Disco database is created and/or validated</div>
|
||||
</div>
|
||||
<script>
|
||||
(function () {
|
||||
|
||||
$(function () {
|
||||
var initialized = false;
|
||||
|
||||
$('#AuthMethod').change(function () {
|
||||
$this = $(this);
|
||||
if ($this.val() === 'SQL') {
|
||||
// Enable Validation
|
||||
$('#Auth_SQL_Username').attr('data-val', true).attr('data-val-required', 'The Username is required');
|
||||
$('#Auth_SQL_Password').attr('data-val', true).attr('data-val-required', 'The Password is required');
|
||||
|
||||
$('#auth_Sql').slideDown();
|
||||
} else {
|
||||
$('#Auth_SQL_Username').attr('data-val', false);
|
||||
$('#Auth_SQL_Password').attr('data-val', false);
|
||||
|
||||
$('#auth_Sql').slideUp();
|
||||
}
|
||||
|
||||
// Rebuild Validation
|
||||
if (initialized) {
|
||||
$.validator.unobtrusive.reparse('#auth_Sql');
|
||||
}
|
||||
}).change();
|
||||
|
||||
$('#dialogWait').dialog({
|
||||
autoOpen: false,
|
||||
draggable: false,
|
||||
modal: true,
|
||||
resizable: false,
|
||||
width: 400,
|
||||
height: 150,
|
||||
closeOnEscape: false
|
||||
}).closest('.ui-dialog').find('.ui-dialog-titlebar-close').hide();
|
||||
|
||||
$('#submitForm').closest('form').submit(function () {
|
||||
if ($(this).valid()) {
|
||||
$('#dialogWait').dialog('open');
|
||||
}
|
||||
return true;
|
||||
});
|
||||
|
||||
initialized = true;
|
||||
});
|
||||
|
||||
})();
|
||||
</script>
|
||||
@@ -0,0 +1,317 @@
|
||||
#pragma warning disable 1591
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.17929
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace Disco.Web.Views.InitialConfig
|
||||
{
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Text;
|
||||
using System.Web;
|
||||
using System.Web.Helpers;
|
||||
using System.Web.Mvc;
|
||||
using System.Web.Mvc.Ajax;
|
||||
using System.Web.Mvc.Html;
|
||||
using System.Web.Routing;
|
||||
using System.Web.Security;
|
||||
using System.Web.UI;
|
||||
using System.Web.WebPages;
|
||||
using Disco.BI.Extensions;
|
||||
using Disco.Models.Repository;
|
||||
using Disco.Web;
|
||||
using Disco.Web.Extensions;
|
||||
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "1.5.0.0")]
|
||||
[System.Web.WebPages.PageVirtualPathAttribute("~/Views/InitialConfig/Database.cshtml")]
|
||||
public class Database : System.Web.Mvc.WebViewPage<Disco.Web.Models.InitialConfig.DatabaseModel>
|
||||
{
|
||||
public Database()
|
||||
{
|
||||
}
|
||||
public override void Execute()
|
||||
{
|
||||
|
||||
#line 2 "..\..\Views\InitialConfig\Database.cshtml"
|
||||
|
||||
ViewBag.Title = null;
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n<h1>");
|
||||
|
||||
|
||||
#line 5 "..\..\Views\InitialConfig\Database.cshtml"
|
||||
Write(CommonHelpers.Breadcrumbs(Html.ToBreadcrumb("Initial Configuration", MVC.InitialConfig.Index(), "Database")));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("</h1>\r\n");
|
||||
|
||||
|
||||
#line 6 "..\..\Views\InitialConfig\Database.cshtml"
|
||||
using (Html.BeginForm())
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 8 "..\..\Views\InitialConfig\Database.cshtml"
|
||||
Write(Html.ValidationSummary(true));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 8 "..\..\Views\InitialConfig\Database.cshtml"
|
||||
|
||||
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <div");
|
||||
|
||||
WriteLiteral(" class=\"form\"");
|
||||
|
||||
WriteLiteral(" style=\"width: 650px\"");
|
||||
|
||||
WriteLiteral(">\r\n <h2>SQL Server Connection</h2>\r\n <table>\r\n <tr>\r\n " +
|
||||
" <th");
|
||||
|
||||
WriteLiteral(" style=\"width: 150px;\"");
|
||||
|
||||
WriteLiteral(">Server:\r\n </th>\r\n <td>\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 17 "..\..\Views\InitialConfig\Database.cshtml"
|
||||
Write(Html.EditorFor(m => m.Server));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 17 "..\..\Views\InitialConfig\Database.cshtml"
|
||||
Write(Html.ValidationMessageFor(m => m.Server));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n <div");
|
||||
|
||||
WriteLiteral(" class=\"smallMessage\"");
|
||||
|
||||
WriteLiteral(">\r\n If the default instance of SQL Server is not being use" +
|
||||
"d, include the instance name.<br />\r\n For example: <span");
|
||||
|
||||
WriteLiteral(" class=\"code\"");
|
||||
|
||||
WriteLiteral(">\"SERVER_NAME\\INSTANCE_NAME\"</span>\r\n </div>\r\n " +
|
||||
"</td>\r\n </tr>\r\n <tr>\r\n <th>Database Name:\r\n" +
|
||||
" </th>\r\n <td>\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 28 "..\..\Views\InitialConfig\Database.cshtml"
|
||||
Write(Html.EditorFor(m => m.DatabaseName));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 28 "..\..\Views\InitialConfig\Database.cshtml"
|
||||
Write(Html.ValidationMessageFor(m => m.DatabaseName));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n <div");
|
||||
|
||||
WriteLiteral(" class=\"smallMessage\"");
|
||||
|
||||
WriteLiteral(@">
|
||||
An attempt will be made to create a database with this name if it does not exist.
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Authentication Method:
|
||||
</th>
|
||||
<td>
|
||||
");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 38 "..\..\Views\InitialConfig\Database.cshtml"
|
||||
Write(Html.DropDownListFor(m => m.AuthMethod, Model.AuthMethods));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 38 "..\..\Views\InitialConfig\Database.cshtml"
|
||||
Write(Html.ValidationMessageFor(m => m.AuthMethod));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n <div");
|
||||
|
||||
WriteLiteral(" class=\"smallMessage\"");
|
||||
|
||||
WriteLiteral(">\r\n Integrated Authentication is recommended.<br />\r\n " +
|
||||
" To use Integrated Authentication ensure the <span");
|
||||
|
||||
WriteLiteral(" class=\"code\"");
|
||||
|
||||
WriteLiteral(">DiscoServiceAccount</span> domain user has the <span");
|
||||
|
||||
WriteLiteral(" class=\"code\"");
|
||||
|
||||
WriteLiteral(">db_owner</span> role over the database, or <span");
|
||||
|
||||
WriteLiteral(" class=\"code\"");
|
||||
|
||||
WriteLiteral(">sysadmin</span> role if creating a new database.\r\n </div>\r\n " +
|
||||
" <div");
|
||||
|
||||
WriteLiteral(" id=\"auth_Sql\"");
|
||||
|
||||
WriteLiteral(" style=\"margin-top: 15px; display: none;\"");
|
||||
|
||||
WriteLiteral(">\r\n <h4>SQL Authentication Credentials</h4>\r\n " +
|
||||
" <div");
|
||||
|
||||
WriteLiteral(" class=\"smallMessage\"");
|
||||
|
||||
WriteLiteral(">\r\n The following credentials will be stored in clear-" +
|
||||
"text.\r\n </div>\r\n <table");
|
||||
|
||||
WriteLiteral(" class=\"sub\"");
|
||||
|
||||
WriteLiteral(">\r\n <tr>\r\n <th>Username" +
|
||||
":</th>\r\n <td>");
|
||||
|
||||
|
||||
#line 51 "..\..\Views\InitialConfig\Database.cshtml"
|
||||
Write(Html.EditorFor(m => m.Auth_SQL_Username));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 51 "..\..\Views\InitialConfig\Database.cshtml"
|
||||
Write(Html.ValidationMessageFor(m => m.Auth_SQL_Username));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("</td>\r\n </tr>\r\n <tr>\r\n " +
|
||||
" <th>Password:</th>\r\n <" +
|
||||
"td>");
|
||||
|
||||
|
||||
#line 55 "..\..\Views\InitialConfig\Database.cshtml"
|
||||
Write(Html.EditorFor(m => m.Auth_SQL_Password));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 55 "..\..\Views\InitialConfig\Database.cshtml"
|
||||
Write(Html.ValidationMessageFor(m => m.Auth_SQL_Password));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("</td>\r\n </tr>\r\n </table>\r\n " +
|
||||
" </div>\r\n </td>\r\n </tr>\r\n </table" +
|
||||
">\r\n </div>\r\n");
|
||||
|
||||
WriteLiteral(" <div");
|
||||
|
||||
WriteLiteral(" class=\"actionBar\"");
|
||||
|
||||
WriteLiteral(">\r\n <input");
|
||||
|
||||
WriteLiteral(" id=\"submitForm\"");
|
||||
|
||||
WriteLiteral(" type=\"submit\"");
|
||||
|
||||
WriteLiteral(" class=\"button\"");
|
||||
|
||||
WriteLiteral(" value=\"Continue\"");
|
||||
|
||||
WriteLiteral(" />\r\n </div>\r\n");
|
||||
|
||||
|
||||
#line 66 "..\..\Views\InitialConfig\Database.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("<div");
|
||||
|
||||
WriteLiteral(" id=\"dialogWait\"");
|
||||
|
||||
WriteLiteral(" title=\"Please Wait\"");
|
||||
|
||||
WriteLiteral(">\r\n <h2><span");
|
||||
|
||||
WriteLiteral(" class=\"ajaxLoading\"");
|
||||
|
||||
WriteLiteral("></span>Building and Validating Database</h2>\r\n <div>Please wait while the Dis" +
|
||||
"co database is created and/or validated</div>\r\n</div>\r\n<script>\r\n (function (" +
|
||||
") {\r\n\r\n $(function () {\r\n var initialized = false;\r\n\r\n " +
|
||||
" $(\'#AuthMethod\').change(function () {\r\n $this = $(this);\r\n " +
|
||||
" if ($this.val() === \'SQL\') {\r\n // Enable Validat" +
|
||||
"ion\r\n $(\'#Auth_SQL_Username\').attr(\'data-val\', true).attr(\'da" +
|
||||
"ta-val-required\', \'The Username is required\');\r\n $(\'#Auth_SQL" +
|
||||
"_Password\').attr(\'data-val\', true).attr(\'data-val-required\', \'The Password is re" +
|
||||
"quired\');\r\n\r\n $(\'#auth_Sql\').slideDown();\r\n } " +
|
||||
"else {\r\n $(\'#Auth_SQL_Username\').attr(\'data-val\', false);\r\n " +
|
||||
" $(\'#Auth_SQL_Password\').attr(\'data-val\', false);\r\n\r\n " +
|
||||
" $(\'#auth_Sql\').slideUp();\r\n }\r\n\r\n // Reb" +
|
||||
"uild Validation\r\n if (initialized) {\r\n $.valid" +
|
||||
"ator.unobtrusive.reparse(\'#auth_Sql\');\r\n }\r\n }).change" +
|
||||
"();\r\n\r\n $(\'#dialogWait\').dialog({\r\n autoOpen: false,\r\n" +
|
||||
" draggable: false,\r\n modal: true,\r\n " +
|
||||
" resizable: false,\r\n width: 400,\r\n height: 150,\r\n " +
|
||||
" closeOnEscape: false\r\n }).closest(\'.ui-dialog\').find(\'" +
|
||||
".ui-dialog-titlebar-close\').hide();\r\n\r\n $(\'#submitForm\').closest(\'for" +
|
||||
"m\').submit(function () {\r\n if ($(this).valid()) {\r\n " +
|
||||
" $(\'#dialogWait\').dialog(\'open\');\r\n }\r\n retur" +
|
||||
"n true;\r\n });\r\n\r\n initialized = true;\r\n });\r\n\r\n " +
|
||||
"})();\r\n</script>\r\n");
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
#pragma warning restore 1591
|
||||
@@ -0,0 +1,249 @@
|
||||
@model Disco.Web.Models.InitialConfig.FileStoreModel
|
||||
@{
|
||||
ViewBag.Title = null;
|
||||
Html.BundleDeferred("~/Style/jQueryUI/dynatree");
|
||||
Html.BundleDeferred("~/ClientScripts/Modules/jQueryUI-DynaTree");
|
||||
}
|
||||
<h1>@CommonHelpers.Breadcrumbs(Html.ToBreadcrumb("Initial Configuration", MVC.InitialConfig.Index(), "File Store"))</h1>
|
||||
<div id="initialConfig_FileStore">
|
||||
@Html.ValidationSummary(false)
|
||||
|
||||
<div class="form" style="width: 650px">
|
||||
<h2>File Store Location</h2>
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
<div id="treeFilesystem">
|
||||
</div>
|
||||
<div id="treeFilesystemActions">
|
||||
<a id="createDirectory" href="#" class="button" disabled="disabled">Create Directory</a>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<div>
|
||||
Selected Location: <span id="locationPath" class="code"><None></span> <span id="locationPathInvalid" class="smallMessage">(Invalid DataStore Location)</span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
@using (Html.BeginForm())
|
||||
{
|
||||
@Html.HiddenFor(m => m.FileStoreLocation)
|
||||
<div class="actionBar">
|
||||
<input id="submitForm" type="submit" class="button" value="Continue" disabled="disabled" />
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
<div id="dialogWait" title="Please Wait">
|
||||
<h2><span class="ajaxLoading"></span>Building and Validating File Store</h2>
|
||||
<div>Please wait while the Disco File Store is created and/or validated</div>
|
||||
</div>
|
||||
<div id="dialogCreateDirectory" title="Create Directory">
|
||||
<h2>Create Directory</h2>
|
||||
<input type="text" id="createDirectoryName" />
|
||||
<div>Parent: <span id="createDirectoryParent" class="code"></span></div>
|
||||
</div>
|
||||
<script>
|
||||
(function () {
|
||||
var fileSystemBranchUrl = '@(Url.Action(MVC.InitialConfig.FileStoreBranch()))';
|
||||
var fileSystemInitialBranches = null;
|
||||
var fileSystemBranchSelected = null;
|
||||
var $treeFilesystem = $('#treeFilesystem');
|
||||
|
||||
var nodeDataLoaded = function (node) {
|
||||
var addedNodes = [];
|
||||
var previousUpdateMode = node.tree.enableUpdate(false);
|
||||
var descriptor = node.data.fileSystemDescriptor;
|
||||
// Sub Folders
|
||||
if (descriptor.SubDirectories) {
|
||||
var hasSubDirectories = false;
|
||||
for (var k in descriptor.SubDirectories) {
|
||||
hasSubDirectories = true;
|
||||
var d = descriptor.SubDirectories[k];
|
||||
var n = node.addChild({ key: d.Path, title: d.IsNew ? d.Name + ' [New]' : d.Name, tooltip: d.Path, unselectable: !d.Selectable, addClass: 'directory', isLazy: true, isFolder: true, fileSystemDescriptor: d });
|
||||
addedNodes.push(n);
|
||||
|
||||
if (d.SubDirectories) {
|
||||
nodeDataLoaded(n);
|
||||
}
|
||||
}
|
||||
if (!hasSubDirectories) {
|
||||
// Leaf
|
||||
node.data.isLazy = false;
|
||||
if (!fileSystemInitialBranches)
|
||||
node.render();
|
||||
}
|
||||
}
|
||||
node.setLazyNodeStatus(DTNodeStatus_Ok);
|
||||
node.tree.enableUpdate(previousUpdateMode);
|
||||
return addedNodes;
|
||||
}
|
||||
var loadNodeData = function (node) {
|
||||
var descriptor = node.data.fileSystemDescriptor;
|
||||
|
||||
if (!descriptor.SubDirectories) {
|
||||
$.ajax({
|
||||
url: fileSystemBranchUrl,
|
||||
dataType: 'json',
|
||||
data: { Path: descriptor.Path },
|
||||
success: function (data) {
|
||||
node.data.fileSystemDescriptor = data;
|
||||
return nodeDataLoaded(node);
|
||||
},
|
||||
error: function () {
|
||||
alert('Unable to access this path: ' + descriptor.Path);
|
||||
node.remove();
|
||||
}
|
||||
})
|
||||
} else {
|
||||
return nodeDataLoaded(node);
|
||||
}
|
||||
}
|
||||
var lazyLoadNode = function (node) {
|
||||
if (node.data.fileSystemDescriptor) {
|
||||
node.setLazyNodeStatus(DTNodeStatus_Loading);
|
||||
loadNodeData(node);
|
||||
} else {
|
||||
node.setLazyNodeStatus(DTNodeStatus_Ok);
|
||||
}
|
||||
}
|
||||
var activeNodeUpdated = function () {
|
||||
var activeNode = $("#treeFilesystem").dynatree("getActiveNode");
|
||||
|
||||
if (activeNode !== null) {
|
||||
fileSystemBranchSelected = activeNode.data.fileSystemDescriptor;
|
||||
} else {
|
||||
fileSystemBranchSelected = null
|
||||
}
|
||||
|
||||
if (fileSystemBranchSelected !== null) {
|
||||
$('#locationPath').text(fileSystemBranchSelected.Path);
|
||||
$('#createDirectory').attr('disabled', false);
|
||||
if (fileSystemBranchSelected.Selectable) {
|
||||
$('#submitForm').attr('disabled', false);
|
||||
$('#locationPathInvalid').hide();
|
||||
} else {
|
||||
$('#submitForm').attr('disabled', true);
|
||||
$('#locationPathInvalid').show();
|
||||
}
|
||||
} else {
|
||||
$('#createDirectory').attr('disabled', true);
|
||||
$('#submitForm').attr('disabled', true);
|
||||
$('#locationPath').text('<None>');
|
||||
$('#locationPathInvalid').show();
|
||||
}
|
||||
}
|
||||
var scrollToNode = function (node) {
|
||||
var $li = $(node.li);
|
||||
var $treeRoot = $($treeFilesystem.dynatree('getRoot').ul);
|
||||
var ih = $li.height();
|
||||
var th = $treeRoot.height();
|
||||
var ts = $treeRoot.scrollTop();
|
||||
var is = $li.position().top;
|
||||
if ((ih + is) > th) {
|
||||
if (ih > th) {
|
||||
$treeRoot.animate({ 'scrollTop': (is + ts) }, 'fast');
|
||||
} else {
|
||||
$treeRoot.animate({ 'scrollTop': (ih + is + ts - th) }, 'fast');
|
||||
}
|
||||
}
|
||||
}
|
||||
var nodeExpanded = function (flag, node) {
|
||||
if (flag)
|
||||
window.setTimeout(function () { scrollToNode(node); }, 1);
|
||||
}
|
||||
var nodeDeactivated = function () {
|
||||
activeNodeUpdated();
|
||||
}
|
||||
var nodeActivated = function (node) {
|
||||
activeNodeUpdated();
|
||||
nodeExpanded(true, node);
|
||||
}
|
||||
|
||||
$(function () {
|
||||
$('#dialogWait').dialog({
|
||||
autoOpen: false,
|
||||
draggable: false,
|
||||
modal: true,
|
||||
resizable: false,
|
||||
width: 400,
|
||||
height: 150,
|
||||
closeOnEscape: false
|
||||
}).closest('.ui-dialog').find('.ui-dialog-titlebar-close').hide();
|
||||
|
||||
$('#dialogCreateDirectory').dialog({
|
||||
autoOpen: false,
|
||||
draggable: false,
|
||||
modal: true,
|
||||
resizable: false,
|
||||
width: 400,
|
||||
height: 180,
|
||||
buttons: {
|
||||
'Cancel': function () {
|
||||
$('#dialogCreateDirectory').dialog('close');
|
||||
},
|
||||
'Create Directory': function () {
|
||||
var activeNode = $("#treeFilesystem").dynatree("getActiveNode");
|
||||
if (activeNode) {
|
||||
var name = $('#createDirectoryName').val();
|
||||
d = {
|
||||
Name: name,
|
||||
Path: fileSystemBranchSelected.Path.charAt(fileSystemBranchSelected.Path.length - 1) === '\\' ? fileSystemBranchSelected.Path + name : fileSystemBranchSelected.Path + '\\' + name,
|
||||
IsNew: true,
|
||||
Selectable: true,
|
||||
SubDirectories: {}
|
||||
}
|
||||
activeNode.addChild({ title: d.Name + ' [New]', tooltip: d.Path, unselectable: !d.Selectable, addClass: 'newDirectory', isLazy: false, isFolder: true, fileSystemDescriptor: d }).activate();
|
||||
}
|
||||
$('#dialogCreateDirectory').dialog('close');
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
$('#createDirectory').click(function () {
|
||||
if (fileSystemBranchSelected) {
|
||||
$('#dialogCreateDirectory').dialog('open');
|
||||
$('#createDirectoryName').val('').focus();
|
||||
$('#createDirectoryParent').text(fileSystemBranchSelected.Path);
|
||||
}
|
||||
return false;
|
||||
});
|
||||
|
||||
$('#submitForm').closest('form').submit(function () {
|
||||
if (fileSystemBranchSelected && fileSystemBranchSelected.Selectable) {
|
||||
if ($(this).valid()) {
|
||||
$('#dialogWait').dialog('open');
|
||||
$('#FileStoreLocation').val(fileSystemBranchSelected.Path);
|
||||
}
|
||||
return true;
|
||||
} else {
|
||||
alert('Invalid FileStore Location');
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
$treeFilesystem.dynatree({ onLazyRead: lazyLoadNode, onActivate: nodeActivated, onDeactivate: nodeDeactivated, onExpand: nodeExpanded });
|
||||
var rootNode = $treeFilesystem.dynatree('getRoot');
|
||||
|
||||
var previousUpdateMode = rootNode.tree.enableUpdate(false);
|
||||
rootNode.data.fileSystemDescriptor = fileSystemInitialBranches[0];
|
||||
loadNodeData(rootNode);
|
||||
rootNode.tree.enableUpdate(previousUpdateMode);
|
||||
|
||||
var initialValue = $('#FileStoreLocation').val();
|
||||
if (initialValue) {
|
||||
var initialNode = rootNode.tree.getNodeByKey(initialValue);
|
||||
if (initialNode)
|
||||
initialNode.activate();
|
||||
}
|
||||
|
||||
fileSystemInitialBranches = null;
|
||||
});
|
||||
|
||||
|
||||
fileSystemInitialBranches = [@(new HtmlString(Json.Encode(Model.DirectoryModel)))];
|
||||
})();
|
||||
</script>
|
||||
@@ -0,0 +1,329 @@
|
||||
#pragma warning disable 1591
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.17929
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace Disco.Web.Views.InitialConfig
|
||||
{
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Text;
|
||||
using System.Web;
|
||||
using System.Web.Helpers;
|
||||
using System.Web.Mvc;
|
||||
using System.Web.Mvc.Ajax;
|
||||
using System.Web.Mvc.Html;
|
||||
using System.Web.Routing;
|
||||
using System.Web.Security;
|
||||
using System.Web.UI;
|
||||
using System.Web.WebPages;
|
||||
using Disco.BI.Extensions;
|
||||
using Disco.Models.Repository;
|
||||
using Disco.Web;
|
||||
using Disco.Web.Extensions;
|
||||
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "1.5.0.0")]
|
||||
[System.Web.WebPages.PageVirtualPathAttribute("~/Views/InitialConfig/FileStore.cshtml")]
|
||||
public class FileStore : System.Web.Mvc.WebViewPage<Disco.Web.Models.InitialConfig.FileStoreModel>
|
||||
{
|
||||
public FileStore()
|
||||
{
|
||||
}
|
||||
public override void Execute()
|
||||
{
|
||||
|
||||
#line 2 "..\..\Views\InitialConfig\FileStore.cshtml"
|
||||
|
||||
ViewBag.Title = null;
|
||||
Html.BundleDeferred("~/Style/jQueryUI/dynatree");
|
||||
Html.BundleDeferred("~/ClientScripts/Modules/jQueryUI-DynaTree");
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n<h1>");
|
||||
|
||||
|
||||
#line 7 "..\..\Views\InitialConfig\FileStore.cshtml"
|
||||
Write(CommonHelpers.Breadcrumbs(Html.ToBreadcrumb("Initial Configuration", MVC.InitialConfig.Index(), "File Store")));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("</h1>\r\n<div");
|
||||
|
||||
WriteLiteral(" id=\"initialConfig_FileStore\"");
|
||||
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 9 "..\..\Views\InitialConfig\FileStore.cshtml"
|
||||
Write(Html.ValidationSummary(false));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n\r\n <div");
|
||||
|
||||
WriteLiteral(" class=\"form\"");
|
||||
|
||||
WriteLiteral(" style=\"width: 650px\"");
|
||||
|
||||
WriteLiteral(">\r\n <h2>File Store Location</h2>\r\n <table>\r\n <tr>\r\n " +
|
||||
" <td>\r\n <div");
|
||||
|
||||
WriteLiteral(" id=\"treeFilesystem\"");
|
||||
|
||||
WriteLiteral(">\r\n </div>\r\n <div");
|
||||
|
||||
WriteLiteral(" id=\"treeFilesystemActions\"");
|
||||
|
||||
WriteLiteral(">\r\n <a");
|
||||
|
||||
WriteLiteral(" id=\"createDirectory\"");
|
||||
|
||||
WriteLiteral(" href=\"#\"");
|
||||
|
||||
WriteLiteral(" class=\"button\"");
|
||||
|
||||
WriteLiteral(" disabled=\"disabled\"");
|
||||
|
||||
WriteLiteral(">Create Directory</a>\r\n </div>\r\n </td>\r\n " +
|
||||
" </tr>\r\n <tr>\r\n <td>\r\n <div>\r\n " +
|
||||
" Selected Location: <span");
|
||||
|
||||
WriteLiteral(" id=\"locationPath\"");
|
||||
|
||||
WriteLiteral(" class=\"code\"");
|
||||
|
||||
WriteLiteral("><None></span> <span");
|
||||
|
||||
WriteLiteral(" id=\"locationPathInvalid\"");
|
||||
|
||||
WriteLiteral(" class=\"smallMessage\"");
|
||||
|
||||
WriteLiteral(">(Invalid DataStore Location)</span>\r\n </div>\r\n " +
|
||||
" </td>\r\n </tr>\r\n </table>\r\n </div>\r\n");
|
||||
|
||||
|
||||
#line 32 "..\..\Views\InitialConfig\FileStore.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 32 "..\..\Views\InitialConfig\FileStore.cshtml"
|
||||
using (Html.BeginForm())
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 34 "..\..\Views\InitialConfig\FileStore.cshtml"
|
||||
Write(Html.HiddenFor(m => m.FileStoreLocation));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 34 "..\..\Views\InitialConfig\FileStore.cshtml"
|
||||
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <div");
|
||||
|
||||
WriteLiteral(" class=\"actionBar\"");
|
||||
|
||||
WriteLiteral(">\r\n <input");
|
||||
|
||||
WriteLiteral(" id=\"submitForm\"");
|
||||
|
||||
WriteLiteral(" type=\"submit\"");
|
||||
|
||||
WriteLiteral(" class=\"button\"");
|
||||
|
||||
WriteLiteral(" value=\"Continue\"");
|
||||
|
||||
WriteLiteral(" disabled=\"disabled\"");
|
||||
|
||||
WriteLiteral(" />\r\n </div>\r\n");
|
||||
|
||||
|
||||
#line 38 "..\..\Views\InitialConfig\FileStore.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("</div>\r\n<div");
|
||||
|
||||
WriteLiteral(" id=\"dialogWait\"");
|
||||
|
||||
WriteLiteral(" title=\"Please Wait\"");
|
||||
|
||||
WriteLiteral(">\r\n <h2><span");
|
||||
|
||||
WriteLiteral(" class=\"ajaxLoading\"");
|
||||
|
||||
WriteLiteral("></span>Building and Validating File Store</h2>\r\n <div>Please wait while the D" +
|
||||
"isco File Store is created and/or validated</div>\r\n</div>\r\n<div");
|
||||
|
||||
WriteLiteral(" id=\"dialogCreateDirectory\"");
|
||||
|
||||
WriteLiteral(" title=\"Create Directory\"");
|
||||
|
||||
WriteLiteral(">\r\n <h2>Create Directory</h2>\r\n <input");
|
||||
|
||||
WriteLiteral(" type=\"text\"");
|
||||
|
||||
WriteLiteral(" id=\"createDirectoryName\"");
|
||||
|
||||
WriteLiteral(" />\r\n <div>Parent: <span");
|
||||
|
||||
WriteLiteral(" id=\"createDirectoryParent\"");
|
||||
|
||||
WriteLiteral(" class=\"code\"");
|
||||
|
||||
WriteLiteral("></span></div>\r\n</div>\r\n<script>\r\n (function () {\r\n var fileSystemBranc" +
|
||||
"hUrl = \'");
|
||||
|
||||
|
||||
#line 51 "..\..\Views\InitialConfig\FileStore.cshtml"
|
||||
Write(Url.Action(MVC.InitialConfig.FileStoreBranch()));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\';\r\n var fileSystemInitialBranches = null;\r\n var fileSystemBranchSe" +
|
||||
"lected = null;\r\n var $treeFilesystem = $(\'#treeFilesystem\');\r\n\r\n v" +
|
||||
"ar nodeDataLoaded = function (node) {\r\n var addedNodes = [];\r\n " +
|
||||
" var previousUpdateMode = node.tree.enableUpdate(false);\r\n var de" +
|
||||
"scriptor = node.data.fileSystemDescriptor;\r\n // Sub Folders\r\n " +
|
||||
" if (descriptor.SubDirectories) {\r\n var hasSubDirectories = fa" +
|
||||
"lse;\r\n for (var k in descriptor.SubDirectories) {\r\n " +
|
||||
" hasSubDirectories = true;\r\n var d = descriptor.SubDirec" +
|
||||
"tories[k];\r\n var n = node.addChild({ key: d.Path, title: d.Is" +
|
||||
"New ? d.Name + \' [New]\' : d.Name, tooltip: d.Path, unselectable: !d.Selectable, " +
|
||||
"addClass: \'directory\', isLazy: true, isFolder: true, fileSystemDescriptor: d });" +
|
||||
"\r\n addedNodes.push(n);\r\n\r\n if (d.SubDirect" +
|
||||
"ories) {\r\n nodeDataLoaded(n);\r\n }\r\n " +
|
||||
" }\r\n if (!hasSubDirectories) {\r\n /" +
|
||||
"/ Leaf\r\n node.data.isLazy = false;\r\n if (!" +
|
||||
"fileSystemInitialBranches)\r\n node.render();\r\n " +
|
||||
" }\r\n }\r\n node.setLazyNodeStatus(DTNodeStatus_Ok);\r\n " +
|
||||
" node.tree.enableUpdate(previousUpdateMode);\r\n return addedNod" +
|
||||
"es;\r\n }\r\n var loadNodeData = function (node) {\r\n var de" +
|
||||
"scriptor = node.data.fileSystemDescriptor;\r\n\r\n if (!descriptor.SubDir" +
|
||||
"ectories) {\r\n $.ajax({\r\n url: fileSystemBranch" +
|
||||
"Url,\r\n dataType: \'json\',\r\n data: { Path: d" +
|
||||
"escriptor.Path },\r\n success: function (data) {\r\n " +
|
||||
" node.data.fileSystemDescriptor = data;\r\n retur" +
|
||||
"n nodeDataLoaded(node);\r\n },\r\n error: func" +
|
||||
"tion () {\r\n alert(\'Unable to access this path: \' + descri" +
|
||||
"ptor.Path);\r\n node.remove();\r\n }\r\n " +
|
||||
" })\r\n } else {\r\n return nodeDataLoaded(node" +
|
||||
");\r\n }\r\n }\r\n var lazyLoadNode = function (node) {\r\n " +
|
||||
" if (node.data.fileSystemDescriptor) {\r\n node.setLazyNodeS" +
|
||||
"tatus(DTNodeStatus_Loading);\r\n loadNodeData(node);\r\n }" +
|
||||
" else {\r\n node.setLazyNodeStatus(DTNodeStatus_Ok);\r\n }" +
|
||||
"\r\n }\r\n var activeNodeUpdated = function () {\r\n var acti" +
|
||||
"veNode = $(\"#treeFilesystem\").dynatree(\"getActiveNode\");\r\n\r\n if (acti" +
|
||||
"veNode !== null) {\r\n fileSystemBranchSelected = activeNode.data.f" +
|
||||
"ileSystemDescriptor;\r\n } else {\r\n fileSystemBranchSele" +
|
||||
"cted = null\r\n }\r\n\r\n if (fileSystemBranchSelected !== null)" +
|
||||
" {\r\n $(\'#locationPath\').text(fileSystemBranchSelected.Path);\r\n " +
|
||||
" $(\'#createDirectory\').attr(\'disabled\', false);\r\n if " +
|
||||
"(fileSystemBranchSelected.Selectable) {\r\n $(\'#submitForm\').at" +
|
||||
"tr(\'disabled\', false);\r\n $(\'#locationPathInvalid\').hide();\r\n " +
|
||||
" } else {\r\n $(\'#submitForm\').attr(\'disabled\', t" +
|
||||
"rue);\r\n $(\'#locationPathInvalid\').show();\r\n }\r" +
|
||||
"\n } else {\r\n $(\'#createDirectory\').attr(\'disabled\', tr" +
|
||||
"ue);\r\n $(\'#submitForm\').attr(\'disabled\', true);\r\n " +
|
||||
"$(\'#locationPath\').text(\'<None>\');\r\n $(\'#locationPathInvalid\').sh" +
|
||||
"ow();\r\n }\r\n }\r\n var scrollToNode = function (node) {\r\n " +
|
||||
" var $li = $(node.li);\r\n var $treeRoot = $($treeFilesystem." +
|
||||
"dynatree(\'getRoot\').ul);\r\n var ih = $li.height();\r\n var th" +
|
||||
" = $treeRoot.height();\r\n var ts = $treeRoot.scrollTop();\r\n " +
|
||||
" var is = $li.position().top;\r\n if ((ih + is) > th) {\r\n " +
|
||||
" if (ih > th) {\r\n $treeRoot.animate({ \'scrollTop\': (is + ts)" +
|
||||
" }, \'fast\');\r\n } else {\r\n $treeRoot.animate({ " +
|
||||
"\'scrollTop\': (ih + is + ts - th) }, \'fast\');\r\n }\r\n }\r\n" +
|
||||
" }\r\n var nodeExpanded = function (flag, node) {\r\n if (f" +
|
||||
"lag)\r\n window.setTimeout(function () { scrollToNode(node); }, 1);" +
|
||||
"\r\n }\r\n var nodeDeactivated = function () {\r\n activeNode" +
|
||||
"Updated();\r\n }\r\n var nodeActivated = function (node) {\r\n " +
|
||||
" activeNodeUpdated();\r\n nodeExpanded(true, node);\r\n }\r\n\r\n " +
|
||||
" $(function () {\r\n $(\'#dialogWait\').dialog({\r\n auto" +
|
||||
"Open: false,\r\n draggable: false,\r\n modal: true,\r\n " +
|
||||
" resizable: false,\r\n width: 400,\r\n h" +
|
||||
"eight: 150,\r\n closeOnEscape: false\r\n }).closest(\'.ui-d" +
|
||||
"ialog\').find(\'.ui-dialog-titlebar-close\').hide();\r\n\r\n $(\'#dialogCreat" +
|
||||
"eDirectory\').dialog({\r\n autoOpen: false,\r\n draggab" +
|
||||
"le: false,\r\n modal: true,\r\n resizable: false,\r\n " +
|
||||
" width: 400,\r\n height: 180,\r\n buttons:" +
|
||||
" {\r\n \'Cancel\': function () {\r\n $(\'#dia" +
|
||||
"logCreateDirectory\').dialog(\'close\');\r\n },\r\n " +
|
||||
" \'Create Directory\': function () {\r\n var activeNode = $" +
|
||||
"(\"#treeFilesystem\").dynatree(\"getActiveNode\");\r\n if (acti" +
|
||||
"veNode) {\r\n var name = $(\'#createDirectoryName\').val(" +
|
||||
");\r\n d = {\r\n Name: nam" +
|
||||
"e,\r\n Path: fileSystemBranchSelected.Path.charAt(f" +
|
||||
"ileSystemBranchSelected.Path.length - 1) === \'\\\\\' ? fileSystemBranchSelected.Pat" +
|
||||
"h + name : fileSystemBranchSelected.Path + \'\\\\\' + name,\r\n " +
|
||||
" IsNew: true,\r\n Selectable: true,\r\n " +
|
||||
" SubDirectories: {}\r\n }\r\n " +
|
||||
" activeNode.addChild({ title: d.Name + \' [New]\', tooltip" +
|
||||
": d.Path, unselectable: !d.Selectable, addClass: \'newDirectory\', isLazy: false, " +
|
||||
"isFolder: true, fileSystemDescriptor: d }).activate();\r\n " +
|
||||
"}\r\n $(\'#dialogCreateDirectory\').dialog(\'close\');\r\n " +
|
||||
" }\r\n }\r\n })\r\n\r\n $(\'#createDirec" +
|
||||
"tory\').click(function () {\r\n if (fileSystemBranchSelected) {\r\n " +
|
||||
" $(\'#dialogCreateDirectory\').dialog(\'open\');\r\n " +
|
||||
" $(\'#createDirectoryName\').val(\'\').focus();\r\n $(\'#createDire" +
|
||||
"ctoryParent\').text(fileSystemBranchSelected.Path);\r\n }\r\n " +
|
||||
" return false;\r\n });\r\n\r\n $(\'#submitForm\').closest(\'f" +
|
||||
"orm\').submit(function () {\r\n if (fileSystemBranchSelected && file" +
|
||||
"SystemBranchSelected.Selectable) {\r\n if ($(this).valid()) {\r\n" +
|
||||
" $(\'#dialogWait\').dialog(\'open\');\r\n " +
|
||||
" $(\'#FileStoreLocation\').val(fileSystemBranchSelected.Path);\r\n " +
|
||||
" }\r\n return true;\r\n } else {\r\n " +
|
||||
" alert(\'Invalid FileStore Location\');\r\n return false;\r\n " +
|
||||
" }\r\n });\r\n\r\n $treeFilesystem.dynatree({ onLa" +
|
||||
"zyRead: lazyLoadNode, onActivate: nodeActivated, onDeactivate: nodeDeactivated, " +
|
||||
"onExpand: nodeExpanded });\r\n var rootNode = $treeFilesystem.dynatree(" +
|
||||
"\'getRoot\');\r\n\r\n var previousUpdateMode = rootNode.tree.enableUpdate(f" +
|
||||
"alse);\r\n rootNode.data.fileSystemDescriptor = fileSystemInitialBranch" +
|
||||
"es[0];\r\n loadNodeData(rootNode);\r\n rootNode.tree.enableUpd" +
|
||||
"ate(previousUpdateMode);\r\n\r\n var initialValue = $(\'#FileStoreLocation" +
|
||||
"\').val();\r\n if (initialValue) {\r\n var initialNode = ro" +
|
||||
"otNode.tree.getNodeByKey(initialValue);\r\n if (initialNode)\r\n " +
|
||||
" initialNode.activate();\r\n }\r\n\r\n fileSystemI" +
|
||||
"nitialBranches = null;\r\n });\r\n\r\n\r\n fileSystemInitialBranches = [");
|
||||
|
||||
|
||||
#line 247 "..\..\Views\InitialConfig\FileStore.cshtml"
|
||||
Write(new HtmlString(Json.Encode(Model.DirectoryModel)));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("];\r\n })();\r\n</script>\r\n");
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
#pragma warning restore 1591
|
||||
@@ -0,0 +1,34 @@
|
||||
@{
|
||||
ViewBag.Title = null;
|
||||
}
|
||||
<h1>@CommonHelpers.Breadcrumbs("Initial Configuration > Starting Disco")</h1>
|
||||
<div id="dialog" title="Please Wait" style="padding-top: 30px;">
|
||||
<h2><span class="ajaxLoading" style="margin-right: 15px;"></span>Starting Disco</h2>
|
||||
<div style="padding-left: 31px;">Please wait while the Disco environment is initialized</div>
|
||||
</div>
|
||||
<script>
|
||||
(function () {
|
||||
|
||||
$(function () {
|
||||
|
||||
$('#dialog').dialog({
|
||||
autoOpen: true,
|
||||
draggable: false,
|
||||
modal: true,
|
||||
resizable: false,
|
||||
width: 400,
|
||||
height: 150,
|
||||
closeOnEscape: false
|
||||
}).closest('.ui-dialog').find('.ui-dialog-titlebar-close').hide();
|
||||
|
||||
var refresh = function () {
|
||||
window.location.href = '/';
|
||||
}
|
||||
window.setTimeout(refresh, 2000);
|
||||
|
||||
$('#layout_Page').css('minHeight', '420px');
|
||||
|
||||
});
|
||||
|
||||
})();
|
||||
</script>
|
||||
@@ -0,0 +1,111 @@
|
||||
#pragma warning disable 1591
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.17929
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace Disco.Web.Views.InitialConfig
|
||||
{
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Text;
|
||||
using System.Web;
|
||||
using System.Web.Helpers;
|
||||
using System.Web.Mvc;
|
||||
using System.Web.Mvc.Ajax;
|
||||
using System.Web.Mvc.Html;
|
||||
using System.Web.Routing;
|
||||
using System.Web.Security;
|
||||
using System.Web.UI;
|
||||
using System.Web.WebPages;
|
||||
using Disco.BI.Extensions;
|
||||
using Disco.Models.Repository;
|
||||
using Disco.Web;
|
||||
using Disco.Web.Extensions;
|
||||
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "1.5.0.0")]
|
||||
[System.Web.WebPages.PageVirtualPathAttribute("~/Views/InitialConfig/RestartWebApp.cshtml")]
|
||||
public class RestartWebApp : System.Web.Mvc.WebViewPage<dynamic>
|
||||
{
|
||||
public RestartWebApp()
|
||||
{
|
||||
}
|
||||
public override void Execute()
|
||||
{
|
||||
|
||||
#line 1 "..\..\Views\InitialConfig\RestartWebApp.cshtml"
|
||||
|
||||
ViewBag.Title = null;
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n<h1>");
|
||||
|
||||
|
||||
#line 4 "..\..\Views\InitialConfig\RestartWebApp.cshtml"
|
||||
Write(CommonHelpers.Breadcrumbs("Initial Configuration > Starting Disco"));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("</h1>\r\n<div");
|
||||
|
||||
WriteLiteral(" id=\"dialog\"");
|
||||
|
||||
WriteLiteral(" title=\"Please Wait\"");
|
||||
|
||||
WriteLiteral(" style=\"padding-top: 30px;\"");
|
||||
|
||||
WriteLiteral(">\r\n <h2><span");
|
||||
|
||||
WriteLiteral(" class=\"ajaxLoading\"");
|
||||
|
||||
WriteLiteral(" style=\"margin-right: 15px;\"");
|
||||
|
||||
WriteLiteral("></span>Starting Disco</h2>\r\n <div");
|
||||
|
||||
WriteLiteral(" style=\"padding-left: 31px;\"");
|
||||
|
||||
WriteLiteral(@">Please wait while the Disco environment is initialized</div>
|
||||
</div>
|
||||
<script>
|
||||
(function () {
|
||||
|
||||
$(function () {
|
||||
|
||||
$('#dialog').dialog({
|
||||
autoOpen: true,
|
||||
draggable: false,
|
||||
modal: true,
|
||||
resizable: false,
|
||||
width: 400,
|
||||
height: 150,
|
||||
closeOnEscape: false
|
||||
}).closest('.ui-dialog').find('.ui-dialog-titlebar-close').hide();
|
||||
|
||||
var refresh = function () {
|
||||
window.location.href = '/';
|
||||
}
|
||||
window.setTimeout(refresh, 2000);
|
||||
|
||||
$('#layout_Page').css('minHeight', '420px');
|
||||
|
||||
});
|
||||
|
||||
})();
|
||||
</script>
|
||||
");
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
#pragma warning restore 1591
|
||||
@@ -0,0 +1,34 @@
|
||||
@model Disco.Web.Models.InitialConfig.WelcomeModel
|
||||
@{
|
||||
ViewBag.Title = null;
|
||||
}
|
||||
<h1>Welcome to Disco ICT Management!</h1>
|
||||
<div id="initialConfig_Welcome">
|
||||
<p>The installation is complete, but a few things need to be configured before Disco can be started.</p>
|
||||
@using (Html.BeginForm())
|
||||
{
|
||||
<div class="form" style="width: 400px">
|
||||
<h2>Organisation Name</h2>
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
<div>
|
||||
@Html.EditorFor(m => m.OrganisationName)<br />
|
||||
@Html.ValidationMessageFor(m => m.OrganisationName)
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="actionBar">
|
||||
<input id="submitForm" type="submit" class="button" value="Continue" />
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
<script>
|
||||
(function () {
|
||||
$(function () {
|
||||
$('#OrganisationName').focus();
|
||||
});
|
||||
})();
|
||||
</script>
|
||||
@@ -0,0 +1,133 @@
|
||||
#pragma warning disable 1591
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.17929
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace Disco.Web.Views.InitialConfig
|
||||
{
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Text;
|
||||
using System.Web;
|
||||
using System.Web.Helpers;
|
||||
using System.Web.Mvc;
|
||||
using System.Web.Mvc.Ajax;
|
||||
using System.Web.Mvc.Html;
|
||||
using System.Web.Routing;
|
||||
using System.Web.Security;
|
||||
using System.Web.UI;
|
||||
using System.Web.WebPages;
|
||||
using Disco.BI.Extensions;
|
||||
using Disco.Models.Repository;
|
||||
using Disco.Web;
|
||||
using Disco.Web.Extensions;
|
||||
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "1.5.0.0")]
|
||||
[System.Web.WebPages.PageVirtualPathAttribute("~/Views/InitialConfig/Welcome.cshtml")]
|
||||
public class Welcome : System.Web.Mvc.WebViewPage<Disco.Web.Models.InitialConfig.WelcomeModel>
|
||||
{
|
||||
public Welcome()
|
||||
{
|
||||
}
|
||||
public override void Execute()
|
||||
{
|
||||
|
||||
#line 2 "..\..\Views\InitialConfig\Welcome.cshtml"
|
||||
|
||||
ViewBag.Title = null;
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n<h1>Welcome to Disco ICT Management!</h1>\r\n<div");
|
||||
|
||||
WriteLiteral(" id=\"initialConfig_Welcome\"");
|
||||
|
||||
WriteLiteral(">\r\n <p>The installation is complete, but a few things need to be configured be" +
|
||||
"fore Disco can be started.</p>\r\n");
|
||||
|
||||
|
||||
#line 8 "..\..\Views\InitialConfig\Welcome.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 8 "..\..\Views\InitialConfig\Welcome.cshtml"
|
||||
using (Html.BeginForm())
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <div");
|
||||
|
||||
WriteLiteral(" class=\"form\"");
|
||||
|
||||
WriteLiteral(" style=\"width: 400px\"");
|
||||
|
||||
WriteLiteral(">\r\n <h2>Organisation Name</h2>\r\n <table>\r\n <" +
|
||||
"tr>\r\n <td>\r\n <div>\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 16 "..\..\Views\InitialConfig\Welcome.cshtml"
|
||||
Write(Html.EditorFor(m => m.OrganisationName));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("<br />\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 17 "..\..\Views\InitialConfig\Welcome.cshtml"
|
||||
Write(Html.ValidationMessageFor(m => m.OrganisationName));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n </div>\r\n </td>\r\n </tr" +
|
||||
">\r\n </table>\r\n </div>\r\n");
|
||||
|
||||
WriteLiteral(" <div");
|
||||
|
||||
WriteLiteral(" class=\"actionBar\"");
|
||||
|
||||
WriteLiteral(">\r\n <input");
|
||||
|
||||
WriteLiteral(" id=\"submitForm\"");
|
||||
|
||||
WriteLiteral(" type=\"submit\"");
|
||||
|
||||
WriteLiteral(" class=\"button\"");
|
||||
|
||||
WriteLiteral(" value=\"Continue\"");
|
||||
|
||||
WriteLiteral(" />\r\n </div>\r\n");
|
||||
|
||||
|
||||
#line 26 "..\..\Views\InitialConfig\Welcome.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("</div>\r\n<script>\r\n (function () {\r\n $(function () {\r\n $(\'#Or" +
|
||||
"ganisationName\').focus();\r\n });\r\n })();\r\n</script>\r\n");
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
#pragma warning restore 1591
|
||||
@@ -0,0 +1,35 @@
|
||||
@{
|
||||
Html.BundleDeferred("~/Style/Site");
|
||||
Html.BundleDeferred("~/ClientScripts/Core");
|
||||
}
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
||||
<title>Disco@{if(ViewBag.Title != null){<text> - @CommonHelpers.BreadcrumbsTitle(ViewBag.Title)</text>}}</title>
|
||||
@Html.BundleRenderDeferred()
|
||||
@RenderSection("head", false)
|
||||
</head>
|
||||
<body class="layout">
|
||||
<div class="page">
|
||||
<header>
|
||||
<div class="clearfix">
|
||||
<div id="heading">
|
||||
<a href="@Url.Action(MVC.Public.Public.Index())">
|
||||
<img src="@Links.ClientSource.Style.Images.Heading_png" alt="DISCO - ICT Asset Management" /></a>
|
||||
</div>
|
||||
<div id="headerMenu">
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
@if(ViewBag.Title != null){<div id="layout_PageHeading">@CommonHelpers.Breadcrumbs(ViewBag.Title)</div>}
|
||||
<section id="layout_Page">
|
||||
@RenderBody()
|
||||
</section>
|
||||
<footer>
|
||||
Disco v@(Disco.Web.DiscoApplication.Version)
|
||||
</footer>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,218 @@
|
||||
#pragma warning disable 1591
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.17929
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace Disco.Web.Views.InitialConfig
|
||||
{
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Text;
|
||||
using System.Web;
|
||||
using System.Web.Helpers;
|
||||
using System.Web.Mvc;
|
||||
using System.Web.Mvc.Ajax;
|
||||
using System.Web.Mvc.Html;
|
||||
using System.Web.Routing;
|
||||
using System.Web.Security;
|
||||
using System.Web.UI;
|
||||
using System.Web.WebPages;
|
||||
using Disco.BI.Extensions;
|
||||
using Disco.Models.Repository;
|
||||
using Disco.Web;
|
||||
using Disco.Web.Extensions;
|
||||
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "1.5.0.0")]
|
||||
[System.Web.WebPages.PageVirtualPathAttribute("~/Views/InitialConfig/_Layout.cshtml")]
|
||||
public class Layout : System.Web.Mvc.WebViewPage<dynamic>
|
||||
{
|
||||
public Layout()
|
||||
{
|
||||
}
|
||||
public override void Execute()
|
||||
{
|
||||
|
||||
#line 1 "..\..\Views\InitialConfig\_Layout.cshtml"
|
||||
|
||||
Html.BundleDeferred("~/Style/Site");
|
||||
Html.BundleDeferred("~/ClientScripts/Core");
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n<!DOCTYPE html>\r\n<html>\r\n<head>\r\n <meta");
|
||||
|
||||
WriteLiteral(" charset=\"utf-8\"");
|
||||
|
||||
WriteLiteral(" />\r\n <meta");
|
||||
|
||||
WriteLiteral(" http-equiv=\"X-UA-Compatible\"");
|
||||
|
||||
WriteLiteral(" content=\"IE=edge\"");
|
||||
|
||||
WriteLiteral(" />\r\n <title>Disco");
|
||||
|
||||
|
||||
#line 10 "..\..\Views\InitialConfig\_Layout.cshtml"
|
||||
if(ViewBag.Title != null){
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" - ");
|
||||
|
||||
|
||||
#line 10 "..\..\Views\InitialConfig\_Layout.cshtml"
|
||||
Write(CommonHelpers.BreadcrumbsTitle(ViewBag.Title));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 10 "..\..\Views\InitialConfig\_Layout.cshtml"
|
||||
}
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("</title>\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 11 "..\..\Views\InitialConfig\_Layout.cshtml"
|
||||
Write(Html.BundleRenderDeferred());
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 12 "..\..\Views\InitialConfig\_Layout.cshtml"
|
||||
Write(RenderSection("head", false));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n</head>\r\n<body");
|
||||
|
||||
WriteLiteral(" class=\"layout\"");
|
||||
|
||||
WriteLiteral(">\r\n <div");
|
||||
|
||||
WriteLiteral(" class=\"page\"");
|
||||
|
||||
WriteLiteral(">\r\n <header>\r\n <div");
|
||||
|
||||
WriteLiteral(" class=\"clearfix\"");
|
||||
|
||||
WriteLiteral(">\r\n <div");
|
||||
|
||||
WriteLiteral(" id=\"heading\"");
|
||||
|
||||
WriteLiteral(">\r\n <a");
|
||||
|
||||
WriteAttribute("href", Tuple.Create(" href=\"", 578), Tuple.Create("\"", 623)
|
||||
|
||||
#line 19 "..\..\Views\InitialConfig\_Layout.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 585), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.Public.Public.Index())
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 585), false)
|
||||
);
|
||||
|
||||
WriteLiteral(">\r\n <img");
|
||||
|
||||
WriteAttribute("src", Tuple.Create(" src=\"", 655), Tuple.Create("\"", 705)
|
||||
|
||||
#line 20 "..\..\Views\InitialConfig\_Layout.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 661), Tuple.Create<System.Object, System.Int32>(Links.ClientSource.Style.Images.Heading_png
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 661), false)
|
||||
);
|
||||
|
||||
WriteLiteral(" alt=\"DISCO - ICT Asset Management\"");
|
||||
|
||||
WriteLiteral(" /></a>\r\n </div>\r\n <div");
|
||||
|
||||
WriteLiteral(" id=\"headerMenu\"");
|
||||
|
||||
WriteLiteral(">\r\n </div>\r\n </div>\r\n </header>\r\n");
|
||||
|
||||
|
||||
#line 26 "..\..\Views\InitialConfig\_Layout.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 26 "..\..\Views\InitialConfig\_Layout.cshtml"
|
||||
if(ViewBag.Title != null){
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("<div");
|
||||
|
||||
WriteLiteral(" id=\"layout_PageHeading\"");
|
||||
|
||||
WriteLiteral(">");
|
||||
|
||||
|
||||
#line 26 "..\..\Views\InitialConfig\_Layout.cshtml"
|
||||
Write(CommonHelpers.Breadcrumbs(ViewBag.Title));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("</div>");
|
||||
|
||||
|
||||
#line 26 "..\..\Views\InitialConfig\_Layout.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <section");
|
||||
|
||||
WriteLiteral(" id=\"layout_Page\"");
|
||||
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 28 "..\..\Views\InitialConfig\_Layout.cshtml"
|
||||
Write(RenderBody());
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n </section>\r\n <footer>\r\n Disco v");
|
||||
|
||||
|
||||
#line 31 "..\..\Views\InitialConfig\_Layout.cshtml"
|
||||
Write(Disco.Web.DiscoApplication.Version);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n </footer>\r\n </div>\r\n</body>\r\n</html>");
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
#pragma warning restore 1591
|
||||
@@ -0,0 +1,4 @@
|
||||
@{
|
||||
Layout = "~/Views/InitialConfig/_Layout.cshtml";
|
||||
Html.BundleDeferred("~/Style/InitialConfig");
|
||||
}
|
||||
@@ -0,0 +1,55 @@
|
||||
#pragma warning disable 1591
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.17929
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace Disco.Web.Views.InitialConfig
|
||||
{
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Text;
|
||||
using System.Web;
|
||||
using System.Web.Helpers;
|
||||
using System.Web.Mvc;
|
||||
using System.Web.Mvc.Ajax;
|
||||
using System.Web.Mvc.Html;
|
||||
using System.Web.Routing;
|
||||
using System.Web.Security;
|
||||
using System.Web.UI;
|
||||
using System.Web.WebPages;
|
||||
using Disco.BI.Extensions;
|
||||
using Disco.Models.Repository;
|
||||
using Disco.Web;
|
||||
using Disco.Web.Extensions;
|
||||
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "1.5.0.0")]
|
||||
[System.Web.WebPages.PageVirtualPathAttribute("~/Views/InitialConfig/_ViewStart.cshtml")]
|
||||
public class ViewStart : System.Web.Mvc.ViewStartPage
|
||||
{
|
||||
public ViewStart()
|
||||
{
|
||||
}
|
||||
public override void Execute()
|
||||
{
|
||||
|
||||
#line 1 "..\..\Views\InitialConfig\_ViewStart.cshtml"
|
||||
|
||||
Layout = "~/Views/InitialConfig/_Layout.cshtml";
|
||||
Html.BundleDeferred("~/Style/InitialConfig");
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
}
|
||||
}
|
||||
}
|
||||
#pragma warning restore 1591
|
||||
@@ -0,0 +1,58 @@
|
||||
@model Disco.Web.Models.Job.CreateModel
|
||||
@{
|
||||
ViewBag.Title = Html.ToBreadcrumb("Jobs", MVC.Job.Index(), "Create");
|
||||
}
|
||||
@using (Html.BeginForm(MVC.Job.Create(), FormMethod.Post))
|
||||
{
|
||||
@Html.ValidationSummary(false)
|
||||
@Html.HiddenFor(m => m.DeviceSerialNumber)
|
||||
@Html.HiddenFor(m => m.UserId)
|
||||
<div id="createDialog" class="form" style="width: 650px">
|
||||
<table>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
@Html.Partial(MVC.Job.Views._CreateSubject, Model)
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="trJobType">
|
||||
<th class="name">
|
||||
Type:
|
||||
</th>
|
||||
<td class="value">
|
||||
@CommonHelpers.RadioButtonList("Type", Model.JobTypes.ToSelectListItems(Model.Type), 2)
|
||||
</td>
|
||||
</tr>
|
||||
@foreach (var jt in Model.JobTypes)
|
||||
{
|
||||
<tr id="trJobSubType@(jt.Id)" class="jobSubTypes">
|
||||
<th class="name">
|
||||
@jt.Description<br />
|
||||
Sub Types
|
||||
</th>
|
||||
<td class="value">
|
||||
@CommonHelpers.CheckBoxList("SubTypes", Model.JobSubTypes.Where(jst => jst.JobTypeId == jt.Id).ToList().ToSelectListItems(Model.SubTypes), 2)
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
</table>
|
||||
<p class="actions">
|
||||
<input type="submit" class="button" value="Create" />
|
||||
</p>
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
|
||||
$trJobType = $('#trJobType');
|
||||
$jobTypes = $trJobType.find('input[type="radio"]');
|
||||
$jobTypes.change(jobTypeChange);
|
||||
jobTypeChange();
|
||||
|
||||
function jobTypeChange() {
|
||||
$('.jobSubTypes').hide();
|
||||
var jobType = $jobTypes.filter(':checked').val();
|
||||
$('#trJobSubType' + jobType).show();
|
||||
}
|
||||
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
}
|
||||
@@ -0,0 +1,301 @@
|
||||
@model Disco.Web.Models.Job.CreateModel
|
||||
@{
|
||||
Layout = "~/Views/Shared/_DialogLayout.cshtml";
|
||||
ViewBag.Title = Html.ToBreadcrumb("Jobs", MVC.Job.Index(), "Create");
|
||||
}
|
||||
<div id="createJob_Container">
|
||||
@using (Html.BeginForm(MVC.Job.Create(), FormMethod.Post))
|
||||
{
|
||||
@Html.HiddenFor(m => m.DeviceSerialNumber)
|
||||
@Html.HiddenFor(m => m.UserId)
|
||||
@Html.HiddenFor(m => m.QuickLogDestinationUrl)
|
||||
|
||||
@Html.Partial(MVC.Job.Views._CreateSubject, Model)
|
||||
@Html.ValidationSummary(true)
|
||||
|
||||
<div class="createJob_Component">
|
||||
<div id="createJob_Type">
|
||||
<h3>Type</h3>
|
||||
@Html.ValidationMessageFor(m => m.Type)
|
||||
@CommonHelpers.RadioButtonList("Type", Model.JobTypes.ToSelectListItems(Model.Type), 3)
|
||||
@Html.ValidationMessageFor(m => m.SubTypes)
|
||||
</div>
|
||||
<div id="createJob_SubTypes">
|
||||
@foreach (var jt in Model.JobTypes)
|
||||
{
|
||||
<div id="createJob_SubType_@(jt.Id)" class="createJob_SubType">
|
||||
<div class="createJob_SubTypes">
|
||||
@CommonHelpers.CheckBoxList("SubTypes", Model.JobSubTypes.Where(jst => jst.JobTypeId == jt.Id).ToList().ToSelectListItems(Model.SubTypes), 3)
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
<div id="createJob_DeviceHeldContainer" class="createJob_Component">
|
||||
@Html.ValidationMessageFor(m => m.DeviceHeld)
|
||||
@Html.HiddenFor(m => m.DeviceHeld)
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
<h3>Device Held</h3>
|
||||
</td>
|
||||
<td>
|
||||
<input id="createJob_DeviceHeld" name="_DeviceHeld" type="radio" value="true" /><label for="createJob_DeviceHeld">Held</label>
|
||||
</td>
|
||||
<td>
|
||||
<input id="createJob_DeviceNotHeld" name="_DeviceHeld" type="radio" value="false" /><label for="createJob_DeviceNotHeld">Not Held</label>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div id="createJob_CommentsContainer" class="createJob_Component">
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
<h3>Comments</h3>
|
||||
</td>
|
||||
<td>
|
||||
@Html.EditorFor(m => m.Comments)
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div id="createJob_QuickLogContainer" class="createJob_Component">
|
||||
<div id="createJob_QuickLogAutoCloseContainer">
|
||||
<h3>Quick Log</h3>
|
||||
<input id="createJob_QuickLog" name="QuickLog" type="checkbox" value="true" /><label for="createJob_QuickLog">Automatically close this job</label>
|
||||
</div>
|
||||
<div id="createJob_QuickLogTaskTimeContainer">
|
||||
<h3>Task Time</h3>
|
||||
@Html.ValidationMessageFor(m => m.QuickLogTaskTimeMinutes)
|
||||
<input type="radio" id="createJob_TaskTime10" name="QuickLogTaskTimeMinutes" value="10" /><label for="createJob_TaskTime10"> 10 Minutes</label>
|
||||
<input type="radio" id="createJob_TaskTime30" name="QuickLogTaskTimeMinutes" value="30" /><label for="createJob_TaskTime30"> 30 Minutes</label>
|
||||
<input type="radio" id="createJob_TaskTime60" name="QuickLogTaskTimeMinutes" value="60" /><label for="createJob_TaskTime60"> 1 Hour</label>
|
||||
<input type="radio" id="createJob_TaskTime120" name="QuickLogTaskTimeMinutes" value="120" /><label for="createJob_TaskTime120"> 2 Hours</label>
|
||||
<input type="radio" id="createJob_TaskTimeOther" name="QuickLogTaskTimeMinutes" value="" /><label for="createJob_TaskTimeOther"> Other</label>
|
||||
<span id="createJob_TaskTimeOtherMinutesContainer">
|
||||
<input type="number" id="createJob_TaskTimeOtherMinutes" name="QuickLogTaskTimeMinutesOther" value="" disabled="disabled" />
|
||||
Minutes
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
var discoDialogMethods;
|
||||
var init = true;
|
||||
//#region Parent Dialog
|
||||
if (window.parent && window.parent.document) {
|
||||
$('#QuickLogDestinationUrl').val(window.parent.window.location.href);
|
||||
|
||||
var parentDialog = $('#createJobDialog', window.parent.document);
|
||||
if (parentDialog.length > 0) {
|
||||
discoDialogMethods = parentDialog[0].discoDialogMethods;
|
||||
var buttons = {
|
||||
"Create Job": function () {
|
||||
createJobForm.submit()
|
||||
},
|
||||
Cancel: function () {
|
||||
discoDialogMethods.close();
|
||||
}
|
||||
}
|
||||
|
||||
discoDialogMethods.setButtons(buttons);
|
||||
}
|
||||
}
|
||||
//#endregion
|
||||
|
||||
|
||||
var createJobForm = $('form');
|
||||
var validator = createJobForm.data('validator');
|
||||
var unobtrusiveValidation = createJobForm.data('unobtrusiveValidation');
|
||||
|
||||
// Validate all Fields
|
||||
validator.settings.ignore = '';
|
||||
|
||||
//#region Job Type/SubTypes
|
||||
var $jobTypeContainer = $('#createJob_Type');
|
||||
var $typeValidationMessage = $('[data-valmsg-for="Type"]', $jobTypeContainer)
|
||||
var $subTypesValidationMessage = $('[data-valmsg-for="SubTypes"]', $jobTypeContainer)
|
||||
var $jobTypes = $jobTypeContainer.find('input[type="radio"]').change(jobTypeChange);
|
||||
$('#createJob_SubTypes').find('input[type="checkbox"]').change(jobSubTypeHighlight).each(jobSubTypeHighlight);
|
||||
jobTypeChange();
|
||||
function jobSubTypeHighlight() {
|
||||
var $this = $(this);
|
||||
if ($this.is(':checked'))
|
||||
$this.closest('li').addClass('highlight');
|
||||
else
|
||||
$this.closest('li').removeClass('highlight');
|
||||
}
|
||||
function jobTypeChange() {
|
||||
var $checkedItem = $jobTypes.filter(':checked');
|
||||
|
||||
$jobTypes.closest('li').removeClass('highlight');
|
||||
|
||||
$checkedItem.closest('li').addClass('highlight');
|
||||
|
||||
if (init) {
|
||||
var jobType = $checkedItem.val();
|
||||
$('#createJob_SubType_' + jobType).show();
|
||||
} else {
|
||||
$('#createJob_SubTypes').find('.createJob_SubType:visible').slideUp();
|
||||
var jobType = $checkedItem.val();
|
||||
$('#createJob_SubType_' + jobType).slideDown();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
var additionalValidation = function (form) {
|
||||
var isValid = true;
|
||||
|
||||
// Validate Type
|
||||
var typeValue = $jobTypes.filter(':checked').val();
|
||||
if (typeValue) {
|
||||
$typeValidationMessage.removeClass('field-validation-error').addClass('field-validation-valid');
|
||||
// Validate SubTypes
|
||||
if ($('#createJob_SubType_' + typeValue).find('input:checked').length > 0) {
|
||||
$subTypesValidationMessage.removeClass('field-validation-error').addClass('field-validation-valid');
|
||||
} else {
|
||||
$subTypesValidationMessage.text('At least one Job Sub Type is required').removeClass('field-validation-valid').addClass('field-validation-error');
|
||||
isValid = false;
|
||||
}
|
||||
} else {
|
||||
$typeValidationMessage.text('A Job Type is required').removeClass('field-validation-valid').addClass('field-validation-error');
|
||||
isValid = false;
|
||||
}
|
||||
|
||||
// Validate QuickLog Task Time
|
||||
if ($quickLog.is(':checked')) {
|
||||
var selectedTime = $quickLogTaskTimes.filter(':checked');
|
||||
if (selectedTime.length > 0) {
|
||||
if (selectedTime.val() === '') {
|
||||
// Handle 'Other'
|
||||
var otherTime = parseInt($quickLogTaskTimeOtherMinutes.val());
|
||||
if (!otherTime || otherTime <= 0) {
|
||||
$quickLogTaskTimeValidationMessage.text('A Task Time is required').removeClass('field-validation-valid').addClass('field-validation-error');
|
||||
isValid = false;
|
||||
}
|
||||
} else {
|
||||
$quickLogTaskTimeValidationMessage.removeClass('field-validation-valid').addClass('field-validation-error');
|
||||
}
|
||||
} else {
|
||||
$quickLogTaskTimeValidationMessage.text('A Task Time is required').removeClass('field-validation-valid').addClass('field-validation-error');
|
||||
isValid = false;
|
||||
}
|
||||
} else {
|
||||
$quickLogTaskTimeValidationMessage.removeClass('field-validation-valid').addClass('field-validation-error');
|
||||
}
|
||||
|
||||
return isValid;
|
||||
}
|
||||
|
||||
validator.settings.submitHandler = function (form) {
|
||||
if (additionalValidation()) {
|
||||
discoDialogMethods.setButtons({});
|
||||
form.submit();
|
||||
}
|
||||
}
|
||||
//#endregion
|
||||
|
||||
//#region DeviceHeld
|
||||
var $deviceHeld = $('#DeviceHeld');
|
||||
|
||||
if ($('#DeviceSerialNumber').val()) {
|
||||
switch ($deviceHeld.val()) {
|
||||
case 'True':
|
||||
$('#createJob_DeviceHeld').attr('checked', 'checked');
|
||||
$('#createJob_DeviceNotHeld').attr('checked', null);
|
||||
break;
|
||||
case 'False':
|
||||
$('#createJob_DeviceHeld').attr('checked', null);
|
||||
$('#createJob_DeviceNotHeld').attr('checked', 'checked');
|
||||
break;
|
||||
default:
|
||||
$('#createJob_DeviceHeld').attr('checked', null);
|
||||
$('#createJob_DeviceNotHeld').attr('checked', null);
|
||||
break;
|
||||
}
|
||||
$('#createJob_DeviceHeldContainer').find('input[type="radio"]').change(function () {
|
||||
// Update Hidden Field with Boolean Value
|
||||
// Set DeviceHeld
|
||||
var deviceHeldValue = '';
|
||||
if ($('#createJob_DeviceHeld').is(':checked'))
|
||||
deviceHeldValue = 'True';
|
||||
if ($('#createJob_DeviceNotHeld').is(':checked'))
|
||||
deviceHeldValue = 'False';
|
||||
$deviceHeld.val(deviceHeldValue).change();
|
||||
});
|
||||
} else {
|
||||
// No Device Associated
|
||||
$deviceHeld.val('False');
|
||||
$('#createJob_DeviceHeldContainer').hide();
|
||||
}
|
||||
//#endregion
|
||||
|
||||
//#region QuickLog
|
||||
var $quickLog = $('#createJob_QuickLog');
|
||||
var $quickLogContainer = $('#createJob_QuickLogContainer');
|
||||
var $quickLogTaskTimeContainer = $('#createJob_QuickLogTaskTimeContainer');
|
||||
var $quickLogTaskTimes = $quickLogTaskTimeContainer.find('input[type="radio"]');
|
||||
var $quickLogTaskTimeOtherMinutes = $('#createJob_TaskTimeOtherMinutes');
|
||||
var $quickLogTaskTimeValidationMessage = $quickLogTaskTimeContainer.find('[data-valmsg-for="QuickLogTaskTimeMinutes"]');
|
||||
|
||||
$deviceHeld.change(validateQuickLog);
|
||||
$jobTypes.change(validateQuickLog);
|
||||
validateQuickLog();
|
||||
|
||||
function validateQuickLog() {
|
||||
var quickLogAllowed = false;
|
||||
|
||||
if ($deviceHeld.val() === 'True') {
|
||||
quickLogAllowed = false;
|
||||
} else {
|
||||
var selectedType = $jobTypes.filter(':checked').val();
|
||||
switch (selectedType) {
|
||||
case 'HMisc':
|
||||
case 'SApp':
|
||||
case 'SImg':
|
||||
case 'SOS':
|
||||
case 'UMgmt':
|
||||
quickLogAllowed = true;
|
||||
break;
|
||||
default:
|
||||
quickLogAllowed = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (quickLogAllowed) {
|
||||
$quickLogContainer.slideDown();
|
||||
} else {
|
||||
if (init)
|
||||
$quickLogContainer.hide();
|
||||
else
|
||||
$quickLogContainer.slideUp();
|
||||
$quickLog.attr('checked', null).change();
|
||||
}
|
||||
}
|
||||
|
||||
$quickLog.change(function () {
|
||||
if ($(this).is(':checked')) {
|
||||
$quickLogTaskTimeContainer.slideDown();
|
||||
} else {
|
||||
$quickLogTaskTimeContainer.slideUp();
|
||||
}
|
||||
});
|
||||
|
||||
$quickLogTaskTimes.change(function () {
|
||||
if ($quickLogTaskTimes.filter(':checked').val() === "") {
|
||||
$('#createJob_TaskTimeOtherMinutesContainer').show();
|
||||
$quickLogTaskTimeOtherMinutes.attr('disabled', null).focus().select();
|
||||
} else {
|
||||
$('#createJob_TaskTimeOtherMinutesContainer').hide();
|
||||
$quickLogTaskTimeOtherMinutes.attr('disabled', 'disabled');
|
||||
}
|
||||
});
|
||||
//#endregion
|
||||
|
||||
init = false;
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
@@ -0,0 +1,598 @@
|
||||
#pragma warning disable 1591
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.17929
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace Disco.Web.Views.Job
|
||||
{
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Text;
|
||||
using System.Web;
|
||||
using System.Web.Helpers;
|
||||
using System.Web.Mvc;
|
||||
using System.Web.Mvc.Ajax;
|
||||
using System.Web.Mvc.Html;
|
||||
using System.Web.Routing;
|
||||
using System.Web.Security;
|
||||
using System.Web.UI;
|
||||
using System.Web.WebPages;
|
||||
using Disco.BI.Extensions;
|
||||
using Disco.Models.Repository;
|
||||
using Disco.Web;
|
||||
using Disco.Web.Extensions;
|
||||
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "1.5.0.0")]
|
||||
[System.Web.WebPages.PageVirtualPathAttribute("~/Views/Job/Create.cshtml")]
|
||||
public class Create : System.Web.Mvc.WebViewPage<Disco.Web.Models.Job.CreateModel>
|
||||
{
|
||||
public Create()
|
||||
{
|
||||
}
|
||||
public override void Execute()
|
||||
{
|
||||
|
||||
#line 2 "..\..\Views\Job\Create.cshtml"
|
||||
|
||||
Layout = "~/Views/Shared/_DialogLayout.cshtml";
|
||||
ViewBag.Title = Html.ToBreadcrumb("Jobs", MVC.Job.Index(), "Create");
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n<div");
|
||||
|
||||
WriteLiteral(" id=\"createJob_Container\"");
|
||||
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
|
||||
#line 7 "..\..\Views\Job\Create.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 7 "..\..\Views\Job\Create.cshtml"
|
||||
using (Html.BeginForm(MVC.Job.Create(), FormMethod.Post))
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 9 "..\..\Views\Job\Create.cshtml"
|
||||
Write(Html.HiddenFor(m => m.DeviceSerialNumber));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 9 "..\..\Views\Job\Create.cshtml"
|
||||
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 10 "..\..\Views\Job\Create.cshtml"
|
||||
Write(Html.HiddenFor(m => m.UserId));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 10 "..\..\Views\Job\Create.cshtml"
|
||||
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 11 "..\..\Views\Job\Create.cshtml"
|
||||
Write(Html.HiddenFor(m => m.QuickLogDestinationUrl));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 11 "..\..\Views\Job\Create.cshtml"
|
||||
|
||||
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 13 "..\..\Views\Job\Create.cshtml"
|
||||
Write(Html.Partial(MVC.Job.Views._CreateSubject, Model));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 13 "..\..\Views\Job\Create.cshtml"
|
||||
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 14 "..\..\Views\Job\Create.cshtml"
|
||||
Write(Html.ValidationSummary(true));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 14 "..\..\Views\Job\Create.cshtml"
|
||||
|
||||
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <div");
|
||||
|
||||
WriteLiteral(" class=\"createJob_Component\"");
|
||||
|
||||
WriteLiteral(">\r\n <div");
|
||||
|
||||
WriteLiteral(" id=\"createJob_Type\"");
|
||||
|
||||
WriteLiteral(">\r\n <h3>Type</h3>\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 19 "..\..\Views\Job\Create.cshtml"
|
||||
Write(Html.ValidationMessageFor(m => m.Type));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 20 "..\..\Views\Job\Create.cshtml"
|
||||
Write(CommonHelpers.RadioButtonList("Type", Model.JobTypes.ToSelectListItems(Model.Type), 3));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 21 "..\..\Views\Job\Create.cshtml"
|
||||
Write(Html.ValidationMessageFor(m => m.SubTypes));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n </div>\r\n <div");
|
||||
|
||||
WriteLiteral(" id=\"createJob_SubTypes\"");
|
||||
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
|
||||
#line 24 "..\..\Views\Job\Create.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 24 "..\..\Views\Job\Create.cshtml"
|
||||
foreach (var jt in Model.JobTypes)
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <div");
|
||||
|
||||
WriteAttribute("id", Tuple.Create(" id=\"", 1037), Tuple.Create("\"", 1068)
|
||||
, Tuple.Create(Tuple.Create("", 1042), Tuple.Create("createJob_SubType_", 1042), true)
|
||||
|
||||
#line 26 "..\..\Views\Job\Create.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 1060), Tuple.Create<System.Object, System.Int32>(jt.Id
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 1060), false)
|
||||
);
|
||||
|
||||
WriteLiteral(" class=\"createJob_SubType\"");
|
||||
|
||||
WriteLiteral(">\r\n <div");
|
||||
|
||||
WriteLiteral(" class=\"createJob_SubTypes\"");
|
||||
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 28 "..\..\Views\Job\Create.cshtml"
|
||||
Write(CommonHelpers.CheckBoxList("SubTypes", Model.JobSubTypes.Where(jst => jst.JobTypeId == jt.Id).ToList().ToSelectListItems(Model.SubTypes), 3));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n </div>\r\n </div> \r\n");
|
||||
|
||||
|
||||
#line 31 "..\..\Views\Job\Create.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" </div>\r\n </div>\r\n");
|
||||
|
||||
WriteLiteral(" <div");
|
||||
|
||||
WriteLiteral(" id=\"createJob_DeviceHeldContainer\"");
|
||||
|
||||
WriteLiteral(" class=\"createJob_Component\"");
|
||||
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 35 "..\..\Views\Job\Create.cshtml"
|
||||
Write(Html.ValidationMessageFor(m => m.DeviceHeld));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 36 "..\..\Views\Job\Create.cshtml"
|
||||
Write(Html.HiddenFor(m => m.DeviceHeld));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n <table>\r\n <tr>\r\n <td>\r\n " +
|
||||
" <h3>Device Held</h3>\r\n </td>\r\n " +
|
||||
" <td>\r\n <input");
|
||||
|
||||
WriteLiteral(" id=\"createJob_DeviceHeld\"");
|
||||
|
||||
WriteLiteral(" name=\"_DeviceHeld\"");
|
||||
|
||||
WriteLiteral(" type=\"radio\"");
|
||||
|
||||
WriteLiteral(" value=\"true\"");
|
||||
|
||||
WriteLiteral(" /><label");
|
||||
|
||||
WriteLiteral(" for=\"createJob_DeviceHeld\"");
|
||||
|
||||
WriteLiteral(">Held</label>\r\n </td>\r\n <td>\r\n " +
|
||||
" <input");
|
||||
|
||||
WriteLiteral(" id=\"createJob_DeviceNotHeld\"");
|
||||
|
||||
WriteLiteral(" name=\"_DeviceHeld\"");
|
||||
|
||||
WriteLiteral(" type=\"radio\"");
|
||||
|
||||
WriteLiteral(" value=\"false\"");
|
||||
|
||||
WriteLiteral(" /><label");
|
||||
|
||||
WriteLiteral(" for=\"createJob_DeviceNotHeld\"");
|
||||
|
||||
WriteLiteral(">Not Held</label>\r\n </td>\r\n </tr>\r\n " +
|
||||
"</table>\r\n </div>\r\n");
|
||||
|
||||
WriteLiteral(" <div");
|
||||
|
||||
WriteLiteral(" id=\"createJob_CommentsContainer\"");
|
||||
|
||||
WriteLiteral(" class=\"createJob_Component\"");
|
||||
|
||||
WriteLiteral(">\r\n <table>\r\n <tr>\r\n <td>\r\n " +
|
||||
" <h3>Comments</h3>\r\n </td>\r\n " +
|
||||
" <td>\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 58 "..\..\Views\Job\Create.cshtml"
|
||||
Write(Html.EditorFor(m => m.Comments));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n </td>\r\n </tr>\r\n </table>\r\n " +
|
||||
" </div>\r\n");
|
||||
|
||||
WriteLiteral(" <div");
|
||||
|
||||
WriteLiteral(" id=\"createJob_QuickLogContainer\"");
|
||||
|
||||
WriteLiteral(" class=\"createJob_Component\"");
|
||||
|
||||
WriteLiteral(">\r\n <div");
|
||||
|
||||
WriteLiteral(" id=\"createJob_QuickLogAutoCloseContainer\"");
|
||||
|
||||
WriteLiteral(">\r\n <h3>Quick Log</h3>\r\n <input");
|
||||
|
||||
WriteLiteral(" id=\"createJob_QuickLog\"");
|
||||
|
||||
WriteLiteral(" name=\"QuickLog\"");
|
||||
|
||||
WriteLiteral(" type=\"checkbox\"");
|
||||
|
||||
WriteLiteral(" value=\"true\"");
|
||||
|
||||
WriteLiteral(" /><label");
|
||||
|
||||
WriteLiteral(" for=\"createJob_QuickLog\"");
|
||||
|
||||
WriteLiteral(">Automatically close this job</label>\r\n </div>\r\n <div");
|
||||
|
||||
WriteLiteral(" id=\"createJob_QuickLogTaskTimeContainer\"");
|
||||
|
||||
WriteLiteral(">\r\n <h3>Task Time</h3>\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 70 "..\..\Views\Job\Create.cshtml"
|
||||
Write(Html.ValidationMessageFor(m => m.QuickLogTaskTimeMinutes));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n <input");
|
||||
|
||||
WriteLiteral(" type=\"radio\"");
|
||||
|
||||
WriteLiteral(" id=\"createJob_TaskTime10\"");
|
||||
|
||||
WriteLiteral(" name=\"QuickLogTaskTimeMinutes\"");
|
||||
|
||||
WriteLiteral(" value=\"10\"");
|
||||
|
||||
WriteLiteral(" /><label");
|
||||
|
||||
WriteLiteral(" for=\"createJob_TaskTime10\"");
|
||||
|
||||
WriteLiteral("> 10 Minutes</label>\r\n <input");
|
||||
|
||||
WriteLiteral(" type=\"radio\"");
|
||||
|
||||
WriteLiteral(" id=\"createJob_TaskTime30\"");
|
||||
|
||||
WriteLiteral(" name=\"QuickLogTaskTimeMinutes\"");
|
||||
|
||||
WriteLiteral(" value=\"30\"");
|
||||
|
||||
WriteLiteral(" /><label");
|
||||
|
||||
WriteLiteral(" for=\"createJob_TaskTime30\"");
|
||||
|
||||
WriteLiteral("> 30 Minutes</label>\r\n <input");
|
||||
|
||||
WriteLiteral(" type=\"radio\"");
|
||||
|
||||
WriteLiteral(" id=\"createJob_TaskTime60\"");
|
||||
|
||||
WriteLiteral(" name=\"QuickLogTaskTimeMinutes\"");
|
||||
|
||||
WriteLiteral(" value=\"60\"");
|
||||
|
||||
WriteLiteral(" /><label");
|
||||
|
||||
WriteLiteral(" for=\"createJob_TaskTime60\"");
|
||||
|
||||
WriteLiteral("> 1 Hour</label>\r\n <input");
|
||||
|
||||
WriteLiteral(" type=\"radio\"");
|
||||
|
||||
WriteLiteral(" id=\"createJob_TaskTime120\"");
|
||||
|
||||
WriteLiteral(" name=\"QuickLogTaskTimeMinutes\"");
|
||||
|
||||
WriteLiteral(" value=\"120\"");
|
||||
|
||||
WriteLiteral(" /><label");
|
||||
|
||||
WriteLiteral(" for=\"createJob_TaskTime120\"");
|
||||
|
||||
WriteLiteral("> 2 Hours</label>\r\n <input");
|
||||
|
||||
WriteLiteral(" type=\"radio\"");
|
||||
|
||||
WriteLiteral(" id=\"createJob_TaskTimeOther\"");
|
||||
|
||||
WriteLiteral(" name=\"QuickLogTaskTimeMinutes\"");
|
||||
|
||||
WriteLiteral(" value=\"\"");
|
||||
|
||||
WriteLiteral(" /><label");
|
||||
|
||||
WriteLiteral(" for=\"createJob_TaskTimeOther\"");
|
||||
|
||||
WriteLiteral("> Other</label>\r\n <span");
|
||||
|
||||
WriteLiteral(" id=\"createJob_TaskTimeOtherMinutesContainer\"");
|
||||
|
||||
WriteLiteral(">\r\n <input");
|
||||
|
||||
WriteLiteral(" type=\"number\"");
|
||||
|
||||
WriteLiteral(" id=\"createJob_TaskTimeOtherMinutes\"");
|
||||
|
||||
WriteLiteral(" name=\"QuickLogTaskTimeMinutesOther\"");
|
||||
|
||||
WriteLiteral(" value=\"\"");
|
||||
|
||||
WriteLiteral(" disabled=\"disabled\"");
|
||||
|
||||
WriteLiteral(" />\r\n Minutes\r\n </span>\r\n </div>\r\n " +
|
||||
" </div>\r\n");
|
||||
|
||||
|
||||
#line 82 "..\..\Views\Job\Create.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <script");
|
||||
|
||||
WriteLiteral(" type=\"text/javascript\"");
|
||||
|
||||
WriteLiteral(">\r\n $(function () {\r\n var discoDialogMethods;\r\n var " +
|
||||
"init = true;\r\n //#region Parent Dialog\r\n if (window.parent" +
|
||||
" && window.parent.document) {\r\n $(\'#QuickLogDestinationUrl\').val(" +
|
||||
"window.parent.window.location.href);\r\n\r\n var parentDialog = $(\'#c" +
|
||||
"reateJobDialog\', window.parent.document);\r\n if (parentDialog.leng" +
|
||||
"th > 0) {\r\n discoDialogMethods = parentDialog[0].discoDialogM" +
|
||||
"ethods;\r\n var buttons = {\r\n \"Create Jo" +
|
||||
"b\": function () {\r\n createJobForm.submit()\r\n " +
|
||||
" },\r\n Cancel: function () {\r\n " +
|
||||
" discoDialogMethods.close();\r\n }\r\n " +
|
||||
" }\r\n\r\n discoDialogMethods.setButtons(buttons);\r\n " +
|
||||
" }\r\n }\r\n //#endregion\r\n\r\n\r\n var crea" +
|
||||
"teJobForm = $(\'form\');\r\n var validator = createJobForm.data(\'validato" +
|
||||
"r\');\r\n var unobtrusiveValidation = createJobForm.data(\'unobtrusiveVal" +
|
||||
"idation\');\r\n\r\n // Validate all Fields\r\n validator.settings" +
|
||||
".ignore = \'\';\r\n\r\n //#region Job Type/SubTypes\r\n var $jobTy" +
|
||||
"peContainer = $(\'#createJob_Type\');\r\n var $typeValidationMessage = $(" +
|
||||
"\'[data-valmsg-for=\"Type\"]\', $jobTypeContainer)\r\n var $subTypesValidat" +
|
||||
"ionMessage = $(\'[data-valmsg-for=\"SubTypes\"]\', $jobTypeContainer)\r\n v" +
|
||||
"ar $jobTypes = $jobTypeContainer.find(\'input[type=\"radio\"]\').change(jobTypeChang" +
|
||||
"e);\r\n $(\'#createJob_SubTypes\').find(\'input[type=\"checkbox\"]\').change(" +
|
||||
"jobSubTypeHighlight).each(jobSubTypeHighlight);\r\n jobTypeChange();\r\n " +
|
||||
" function jobSubTypeHighlight() {\r\n var $this = $(this)" +
|
||||
";\r\n if ($this.is(\':checked\'))\r\n $this.closest(" +
|
||||
"\'li\').addClass(\'highlight\');\r\n else\r\n $this.cl" +
|
||||
"osest(\'li\').removeClass(\'highlight\');\r\n }\r\n function jobTy" +
|
||||
"peChange() {\r\n var $checkedItem = $jobTypes.filter(\':checked\');\r\n" +
|
||||
"\r\n $jobTypes.closest(\'li\').removeClass(\'highlight\');\r\n\r\n " +
|
||||
" $checkedItem.closest(\'li\').addClass(\'highlight\');\r\n\r\n if (" +
|
||||
"init) {\r\n var jobType = $checkedItem.val();\r\n " +
|
||||
" $(\'#createJob_SubType_\' + jobType).show();\r\n } else {\r\n " +
|
||||
" $(\'#createJob_SubTypes\').find(\'.createJob_SubType:visible\').slideU" +
|
||||
"p();\r\n var jobType = $checkedItem.val();\r\n " +
|
||||
" $(\'#createJob_SubType_\' + jobType).slideDown();\r\n }\r\n " +
|
||||
" }\r\n\r\n\r\n var additionalValidation = function (form) {\r\n " +
|
||||
" var isValid = true;\r\n\r\n // Validate Type\r\n var t" +
|
||||
"ypeValue = $jobTypes.filter(\':checked\').val();\r\n if (typeValue) {" +
|
||||
"\r\n $typeValidationMessage.removeClass(\'field-validation-error" +
|
||||
"\').addClass(\'field-validation-valid\');\r\n // Validate SubTypes" +
|
||||
"\r\n if ($(\'#createJob_SubType_\' + typeValue).find(\'input:check" +
|
||||
"ed\').length > 0) {\r\n $subTypesValidationMessage.removeCla" +
|
||||
"ss(\'field-validation-error\').addClass(\'field-validation-valid\');\r\n " +
|
||||
" } else {\r\n $subTypesValidationMessage.text(\'At leas" +
|
||||
"t one Job Sub Type is required\').removeClass(\'field-validation-valid\').addClass(" +
|
||||
"\'field-validation-error\');\r\n isValid = false;\r\n " +
|
||||
" }\r\n } else {\r\n $typeValidationMessag" +
|
||||
"e.text(\'A Job Type is required\').removeClass(\'field-validation-valid\').addClass(" +
|
||||
"\'field-validation-error\');\r\n isValid = false;\r\n " +
|
||||
" }\r\n\r\n // Validate QuickLog Task Time\r\n if ($quic" +
|
||||
"kLog.is(\':checked\')) {\r\n var selectedTime = $quickLogTaskTime" +
|
||||
"s.filter(\':checked\');\r\n if (selectedTime.length > 0) {\r\n " +
|
||||
" if (selectedTime.val() === \'\') {\r\n " +
|
||||
" // Handle \'Other\'\r\n var otherTime = parseInt($quickL" +
|
||||
"ogTaskTimeOtherMinutes.val());\r\n if (!otherTime || ot" +
|
||||
"herTime <= 0) {\r\n $quickLogTaskTimeValidationMess" +
|
||||
"age.text(\'A Task Time is required\').removeClass(\'field-validation-valid\').addCla" +
|
||||
"ss(\'field-validation-error\');\r\n isValid = false;\r" +
|
||||
"\n }\r\n } else {\r\n " +
|
||||
" $quickLogTaskTimeValidationMessage.removeClass(\'field-validation-v" +
|
||||
"alid\').addClass(\'field-validation-error\');\r\n }\r\n " +
|
||||
" } else {\r\n $quickLogTaskTimeValidationMessage." +
|
||||
"text(\'A Task Time is required\').removeClass(\'field-validation-valid\').addClass(\'" +
|
||||
"field-validation-error\');\r\n isValid = false;\r\n " +
|
||||
" }\r\n } else {\r\n $quickLogTaskTimeValid" +
|
||||
"ationMessage.removeClass(\'field-validation-valid\').addClass(\'field-validation-er" +
|
||||
"ror\');\r\n }\r\n\r\n return isValid;\r\n }\r\n\r\n " +
|
||||
" validator.settings.submitHandler = function (form) {\r\n " +
|
||||
" if (additionalValidation()) {\r\n discoDialogMethods.setButton" +
|
||||
"s({});\r\n form.submit();\r\n }\r\n }\r\n " +
|
||||
" //#endregion\r\n\r\n //#region DeviceHeld\r\n var $dev" +
|
||||
"iceHeld = $(\'#DeviceHeld\');\r\n\r\n if ($(\'#DeviceSerialNumber\').val()) {" +
|
||||
"\r\n switch ($deviceHeld.val()) {\r\n case \'True\':" +
|
||||
"\r\n $(\'#createJob_DeviceHeld\').attr(\'checked\', \'checked\');" +
|
||||
"\r\n $(\'#createJob_DeviceNotHeld\').attr(\'checked\', null);\r\n" +
|
||||
" break;\r\n case \'False\':\r\n " +
|
||||
" $(\'#createJob_DeviceHeld\').attr(\'checked\', null);\r\n " +
|
||||
" $(\'#createJob_DeviceNotHeld\').attr(\'checked\', \'checked\');\r\n " +
|
||||
" break;\r\n default:\r\n $(\'#creat" +
|
||||
"eJob_DeviceHeld\').attr(\'checked\', null);\r\n $(\'#createJob_" +
|
||||
"DeviceNotHeld\').attr(\'checked\', null);\r\n break;\r\n " +
|
||||
" }\r\n $(\'#createJob_DeviceHeldContainer\').find(\'input[type=" +
|
||||
"\"radio\"]\').change(function () {\r\n // Update Hidden Field with" +
|
||||
" Boolean Value\r\n // Set DeviceHeld\r\n var d" +
|
||||
"eviceHeldValue = \'\';\r\n if ($(\'#createJob_DeviceHeld\').is(\':ch" +
|
||||
"ecked\'))\r\n deviceHeldValue = \'True\';\r\n " +
|
||||
" if ($(\'#createJob_DeviceNotHeld\').is(\':checked\'))\r\n devi" +
|
||||
"ceHeldValue = \'False\';\r\n $deviceHeld.val(deviceHeldValue).cha" +
|
||||
"nge();\r\n });\r\n } else {\r\n // No Device " +
|
||||
"Associated\r\n $deviceHeld.val(\'False\');\r\n $(\'#creat" +
|
||||
"eJob_DeviceHeldContainer\').hide();\r\n }\r\n //#endregion\r\n\r\n " +
|
||||
" //#region QuickLog\r\n var $quickLog = $(\'#createJob_QuickLo" +
|
||||
"g\');\r\n var $quickLogContainer = $(\'#createJob_QuickLogContainer\');\r\n " +
|
||||
" var $quickLogTaskTimeContainer = $(\'#createJob_QuickLogTaskTimeContai" +
|
||||
"ner\');\r\n var $quickLogTaskTimes = $quickLogTaskTimeContainer.find(\'in" +
|
||||
"put[type=\"radio\"]\');\r\n var $quickLogTaskTimeOtherMinutes = $(\'#create" +
|
||||
"Job_TaskTimeOtherMinutes\');\r\n var $quickLogTaskTimeValidationMessage " +
|
||||
"= $quickLogTaskTimeContainer.find(\'[data-valmsg-for=\"QuickLogTaskTimeMinutes\"]\')" +
|
||||
";\r\n\r\n $deviceHeld.change(validateQuickLog);\r\n $jobTypes.ch" +
|
||||
"ange(validateQuickLog);\r\n validateQuickLog();\r\n\r\n function" +
|
||||
" validateQuickLog() {\r\n var quickLogAllowed = false;\r\n\r\n " +
|
||||
" if ($deviceHeld.val() === \'True\') {\r\n quickLogAllowed " +
|
||||
"= false;\r\n } else {\r\n var selectedType = $jobT" +
|
||||
"ypes.filter(\':checked\').val();\r\n switch (selectedType) {\r\n " +
|
||||
" case \'HMisc\':\r\n case \'SApp\':\r\n " +
|
||||
" case \'SImg\':\r\n case \'SOS\':\r\n " +
|
||||
" case \'UMgmt\':\r\n quickLogAllowed = true;\r" +
|
||||
"\n break;\r\n default:\r\n " +
|
||||
" quickLogAllowed = false;\r\n break;\r" +
|
||||
"\n }\r\n }\r\n\r\n if (quickLogAllowed" +
|
||||
") {\r\n $quickLogContainer.slideDown();\r\n } else" +
|
||||
" {\r\n if (init)\r\n $quickLogContainer.hi" +
|
||||
"de();\r\n else\r\n $quickLogContainer.slid" +
|
||||
"eUp();\r\n $quickLog.attr(\'checked\', null).change();\r\n " +
|
||||
" }\r\n }\r\n\r\n $quickLog.change(function () {\r\n " +
|
||||
" if ($(this).is(\':checked\')) {\r\n $quickLogTaskTimeConta" +
|
||||
"iner.slideDown();\r\n } else {\r\n $quickLogTaskTi" +
|
||||
"meContainer.slideUp();\r\n }\r\n });\r\n\r\n $quick" +
|
||||
"LogTaskTimes.change(function () {\r\n if ($quickLogTaskTimes.filter" +
|
||||
"(\':checked\').val() === \"\") {\r\n $(\'#createJob_TaskTimeOtherMin" +
|
||||
"utesContainer\').show();\r\n $quickLogTaskTimeOtherMinutes.attr(" +
|
||||
"\'disabled\', null).focus().select();\r\n } else {\r\n " +
|
||||
" $(\'#createJob_TaskTimeOtherMinutesContainer\').hide();\r\n $q" +
|
||||
"uickLogTaskTimeOtherMinutes.attr(\'disabled\', \'disabled\');\r\n }\r\n " +
|
||||
" });\r\n //#endregion\r\n\r\n init = false;\r\n })" +
|
||||
";\r\n </script>\r\n</div>\r\n");
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
#pragma warning restore 1591
|
||||
@@ -0,0 +1,21 @@
|
||||
@model Disco.Web.Models.Job.CreateRedirectModel
|
||||
@{
|
||||
Layout = null;
|
||||
ViewBag.Title = Html.ToBreadcrumb("Jobs", MVC.Job.Index(), "Create - Redirecting...");
|
||||
}
|
||||
<a id="redirectLink" href="@Model.RedirectLink">Redirecting...</a>
|
||||
<script>
|
||||
var redirectLink = document.getElementById('redirectLink').getAttribute('href');
|
||||
|
||||
//#region Parent Dialog
|
||||
if (window.parent) {
|
||||
window.parent.window.location.href = redirectLink;
|
||||
|
||||
var parentDialog = window.parent.document.getElementById('createJobDialog');
|
||||
if (parentDialog) {
|
||||
var discoDialogMethods = parentDialog.discoDialogMethods;
|
||||
discoDialogMethods.close();
|
||||
}
|
||||
}
|
||||
//#endregion
|
||||
</script>
|
||||
@@ -0,0 +1,87 @@
|
||||
#pragma warning disable 1591
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.17929
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace Disco.Web.Views.Job
|
||||
{
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Text;
|
||||
using System.Web;
|
||||
using System.Web.Helpers;
|
||||
using System.Web.Mvc;
|
||||
using System.Web.Mvc.Ajax;
|
||||
using System.Web.Mvc.Html;
|
||||
using System.Web.Routing;
|
||||
using System.Web.Security;
|
||||
using System.Web.UI;
|
||||
using System.Web.WebPages;
|
||||
using Disco.BI.Extensions;
|
||||
using Disco.Models.Repository;
|
||||
using Disco.Web;
|
||||
using Disco.Web.Extensions;
|
||||
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "1.5.0.0")]
|
||||
[System.Web.WebPages.PageVirtualPathAttribute("~/Views/Job/Create_Redirect.cshtml")]
|
||||
public class Create_Redirect : System.Web.Mvc.WebViewPage<Disco.Web.Models.Job.CreateRedirectModel>
|
||||
{
|
||||
public Create_Redirect()
|
||||
{
|
||||
}
|
||||
public override void Execute()
|
||||
{
|
||||
|
||||
#line 2 "..\..\Views\Job\Create_Redirect.cshtml"
|
||||
|
||||
Layout = null;
|
||||
ViewBag.Title = Html.ToBreadcrumb("Jobs", MVC.Job.Index(), "Create - Redirecting...");
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n<a");
|
||||
|
||||
WriteLiteral(" id=\"redirectLink\"");
|
||||
|
||||
WriteAttribute("href", Tuple.Create(" href=\"", 188), Tuple.Create("\"", 214)
|
||||
|
||||
#line 6 "..\..\Views\Job\Create_Redirect.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 195), Tuple.Create<System.Object, System.Int32>(Model.RedirectLink
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 195), false)
|
||||
);
|
||||
|
||||
WriteLiteral(@">Redirecting...</a>
|
||||
<script>
|
||||
var redirectLink = document.getElementById('redirectLink').getAttribute('href');
|
||||
|
||||
//#region Parent Dialog
|
||||
if (window.parent) {
|
||||
window.parent.window.location.href = redirectLink;
|
||||
|
||||
var parentDialog = window.parent.document.getElementById('createJobDialog');
|
||||
if (parentDialog) {
|
||||
var discoDialogMethods = parentDialog.discoDialogMethods;
|
||||
discoDialogMethods.close();
|
||||
}
|
||||
}
|
||||
//#endregion
|
||||
</script>
|
||||
");
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
#pragma warning restore 1591
|
||||
@@ -0,0 +1,131 @@
|
||||
@model Disco.Web.Models.Job.IndexModel
|
||||
@{
|
||||
ViewBag.Title = "Jobs";
|
||||
Html.BundleDeferred("~/ClientScripts/Modules/Highcharts");
|
||||
}
|
||||
<div class="clearfix columnHost">
|
||||
<div class="column50">
|
||||
<h2>Search Jobs</h2>
|
||||
@Html.Partial(MVC.Shared.Views._SearchDialog, "jobs")
|
||||
</div>
|
||||
<div class="column50">
|
||||
<h2>Daily Opened & Closed Jobs</h2>
|
||||
<div id="chartHostJobDailyOpenedClosed" style="height: 175px;">
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
(function () {
|
||||
|
||||
var chartData;
|
||||
|
||||
function buildChart() {
|
||||
$(function () {
|
||||
|
||||
var data = chartData;
|
||||
|
||||
var dataTotalOpenJobs = [];
|
||||
var dataOpenedJobs = [];
|
||||
var dataClosedJobs = [];
|
||||
for (var i = 0; i < data.length; i++) {
|
||||
var dataItem = data[i];
|
||||
var dataItemDate = new Date(parseInt(dataItem.Timestamp.substr(6, dataItem.Timestamp.length - 8))).getTime(); // $.datepicker.parseDate('yy-mm-dd', dataItem.Timestamp.substr(0, 10)).getTime();
|
||||
dataTotalOpenJobs.push([dataItemDate, dataItem.TotalJobs]);
|
||||
dataOpenedJobs.push([dataItemDate, dataItem.OpenedJobs]);
|
||||
dataClosedJobs.push([dataItemDate, dataItem.ClosedJobs]);
|
||||
}
|
||||
Highcharts.setOptions({
|
||||
global: {
|
||||
useUTC: false
|
||||
}
|
||||
});
|
||||
new Highcharts.Chart({
|
||||
chart: {
|
||||
renderTo: 'chartHostJobDailyOpenedClosed',
|
||||
height: 175,
|
||||
animation: false
|
||||
},
|
||||
colors: ['#BBBBBB', '#005fab', '#DB761D'],
|
||||
title: {
|
||||
text: null
|
||||
},
|
||||
plotOptions: {
|
||||
series: {
|
||||
marker: {
|
||||
radius: 3
|
||||
},
|
||||
animation: false
|
||||
}
|
||||
},
|
||||
legend: {
|
||||
align: 'left',
|
||||
verticalAlign: 'top',
|
||||
y: 0,
|
||||
floating: true,
|
||||
borderWidth: 0
|
||||
},
|
||||
xAxis: {
|
||||
type: 'datetime',
|
||||
tickInterval: 7 * 24 * 3600 * 1000, // week
|
||||
tickWidth: 1,
|
||||
gridLineWidth: 1,
|
||||
dateTimeLabelFormats: {
|
||||
week: '%e %b'
|
||||
}
|
||||
},
|
||||
yAxis: [{
|
||||
title: {
|
||||
text: null
|
||||
},
|
||||
labels: {
|
||||
enabled: false
|
||||
},
|
||||
min: 0
|
||||
}, {
|
||||
title: {
|
||||
text: null
|
||||
},
|
||||
labels: {
|
||||
enabled: false
|
||||
},
|
||||
min: 0
|
||||
}],
|
||||
series: [{
|
||||
name: 'Total Open Jobs',
|
||||
data: dataTotalOpenJobs,
|
||||
yAxis: 1
|
||||
}, {
|
||||
name: 'Closed Jobs',
|
||||
data: dataClosedJobs
|
||||
}, {
|
||||
name: 'Opened Jobs',
|
||||
data: dataOpenedJobs
|
||||
}],
|
||||
credits: {
|
||||
enabled: false
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
$.getJSON('@(Url.Action(MVC.API.Job.StatisticsDailyOpenedClosed()))', function (data) {
|
||||
chartData = data;
|
||||
buildChart();
|
||||
});
|
||||
}());
|
||||
|
||||
</script>
|
||||
</div>
|
||||
</div>
|
||||
<h2>Open Jobs Awaiting Technician Action (@Model.OpenJobs.Items.Count)</h2>
|
||||
@Html.Partial(MVC.Shared.Views._JobTable, Model.OpenJobs, new ViewDataDictionary())
|
||||
<h2>Long Running Jobs (@Model.LongRunningJobs.Items.Count)</h2>
|
||||
@Html.Partial(MVC.Shared.Views._JobTable, Model.LongRunningJobs, new ViewDataDictionary())
|
||||
@*<h2>
|
||||
Jobs with Devices Ready for Return (@Model.ReadyForReturnJobs.Items.Count)</h2>
|
||||
@Html.Partial(MVC.Shared.Views._JobTable, Model.ReadyForReturnJobs, new ViewDataDictionary())
|
||||
<h2>
|
||||
Jobs Waiting for User Action (@Model.WaitingForUserActionJobs.Items.Count)</h2>
|
||||
@Html.Partial(MVC.Shared.Views._JobTable, Model.WaitingForUserActionJobs, new ViewDataDictionary())
|
||||
<h2>
|
||||
Recently Closed Jobs (@Model.RecentlyClosedJobs.Items.Count)</h2>
|
||||
@Html.Partial(MVC.Shared.Views._JobTable, Model.RecentlyClosedJobs, new ViewDataDictionary())*@
|
||||
@@ -0,0 +1,191 @@
|
||||
#pragma warning disable 1591
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.17929
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace Disco.Web.Views.Job
|
||||
{
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Text;
|
||||
using System.Web;
|
||||
using System.Web.Helpers;
|
||||
using System.Web.Mvc;
|
||||
using System.Web.Mvc.Ajax;
|
||||
using System.Web.Mvc.Html;
|
||||
using System.Web.Routing;
|
||||
using System.Web.Security;
|
||||
using System.Web.UI;
|
||||
using System.Web.WebPages;
|
||||
using Disco.BI.Extensions;
|
||||
using Disco.Models.Repository;
|
||||
using Disco.Web;
|
||||
using Disco.Web.Extensions;
|
||||
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "1.5.0.0")]
|
||||
[System.Web.WebPages.PageVirtualPathAttribute("~/Views/Job/Index.cshtml")]
|
||||
public class Index : System.Web.Mvc.WebViewPage<Disco.Web.Models.Job.IndexModel>
|
||||
{
|
||||
public Index()
|
||||
{
|
||||
}
|
||||
public override void Execute()
|
||||
{
|
||||
|
||||
#line 2 "..\..\Views\Job\Index.cshtml"
|
||||
|
||||
ViewBag.Title = "Jobs";
|
||||
Html.BundleDeferred("~/ClientScripts/Modules/Highcharts");
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n<div");
|
||||
|
||||
WriteLiteral(" class=\"clearfix columnHost\"");
|
||||
|
||||
WriteLiteral(">\r\n <div");
|
||||
|
||||
WriteLiteral(" class=\"column50\"");
|
||||
|
||||
WriteLiteral(">\r\n <h2>Search Jobs</h2>\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 9 "..\..\Views\Job\Index.cshtml"
|
||||
Write(Html.Partial(MVC.Shared.Views._SearchDialog, "jobs"));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n </div>\r\n <div");
|
||||
|
||||
WriteLiteral(" class=\"column50\"");
|
||||
|
||||
WriteLiteral(">\r\n <h2>Daily Opened & Closed Jobs</h2>\r\n <div");
|
||||
|
||||
WriteLiteral(" id=\"chartHostJobDailyOpenedClosed\"");
|
||||
|
||||
WriteLiteral(" style=\"height: 175px;\"");
|
||||
|
||||
WriteLiteral(">\r\n </div>\r\n <script");
|
||||
|
||||
WriteLiteral(" type=\"text/javascript\"");
|
||||
|
||||
WriteLiteral(">\r\n (function () {\r\n\r\n var chartData;\r\n\r\n " +
|
||||
" function buildChart() {\r\n $(function () {\r\n\r\n " +
|
||||
" var data = chartData;\r\n\r\n var dataTotalOpenJobs" +
|
||||
" = [];\r\n var dataOpenedJobs = [];\r\n " +
|
||||
" var dataClosedJobs = [];\r\n for (var i = 0; i < data.len" +
|
||||
"gth; i++) {\r\n var dataItem = data[i];\r\n " +
|
||||
" var dataItemDate = new Date(parseInt(dataItem.Timestamp.substr(6, " +
|
||||
"dataItem.Timestamp.length - 8))).getTime(); // $.datepicker.parseDate(\'yy-mm-dd\'" +
|
||||
", dataItem.Timestamp.substr(0, 10)).getTime();\r\n data" +
|
||||
"TotalOpenJobs.push([dataItemDate, dataItem.TotalJobs]);\r\n " +
|
||||
" dataOpenedJobs.push([dataItemDate, dataItem.OpenedJobs]);\r\n " +
|
||||
" dataClosedJobs.push([dataItemDate, dataItem.ClosedJobs]);\r\n " +
|
||||
" }\r\n Highcharts.setOptions({\r\n " +
|
||||
" global: {\r\n useUTC: false\r\n " +
|
||||
" }\r\n });\r\n new" +
|
||||
" Highcharts.Chart({\r\n chart: {\r\n " +
|
||||
" renderTo: \'chartHostJobDailyOpenedClosed\',\r\n " +
|
||||
" height: 175,\r\n animation: false\r\n " +
|
||||
" },\r\n colors: [\'#BBBBBB\', \'#005fab\'" +
|
||||
", \'#DB761D\'],\r\n title: {\r\n " +
|
||||
" text: null\r\n },\r\n plo" +
|
||||
"tOptions: {\r\n series: {\r\n " +
|
||||
" marker: {\r\n radius: 3\r\n " +
|
||||
" },\r\n animation:" +
|
||||
" false\r\n }\r\n },\r\n " +
|
||||
" legend: {\r\n align: \'left\'," +
|
||||
"\r\n verticalAlign: \'top\',\r\n " +
|
||||
" y: 0,\r\n floating: true,\r\n " +
|
||||
" borderWidth: 0\r\n },\r\n " +
|
||||
" xAxis: {\r\n type: \'datetime\',\r\n " +
|
||||
" tickInterval: 7 * 24 * 3600 * 1000, // week\r\n " +
|
||||
" tickWidth: 1,\r\n gridLineWi" +
|
||||
"dth: 1,\r\n dateTimeLabelFormats: {\r\n " +
|
||||
" week: \'%e %b\'\r\n }\r\n " +
|
||||
" },\r\n yAxis: [{\r\n " +
|
||||
" title: {\r\n text: null\r\n " +
|
||||
" },\r\n labels: {\r\n " +
|
||||
" enabled: false\r\n },\r\n" +
|
||||
" min: 0\r\n }, {\r\n " +
|
||||
" title: {\r\n text: nu" +
|
||||
"ll\r\n },\r\n labels: " +
|
||||
"{\r\n enabled: false\r\n " +
|
||||
" },\r\n min: 0\r\n }" +
|
||||
"],\r\n series: [{\r\n name" +
|
||||
": \'Total Open Jobs\',\r\n data: dataTotalOpenJobs,\r\n" +
|
||||
" yAxis: 1\r\n }, {\r\n " +
|
||||
" name: \'Closed Jobs\',\r\n " +
|
||||
" data: dataClosedJobs\r\n }, {\r\n " +
|
||||
" name: \'Opened Jobs\',\r\n data: dataOpened" +
|
||||
"Jobs\r\n }],\r\n credits: {\r\n " +
|
||||
" enabled: false\r\n }\r\n " +
|
||||
" });\r\n });\r\n }\r\n\r\n\r\n " +
|
||||
" $.getJSON(\'");
|
||||
|
||||
|
||||
#line 110 "..\..\Views\Job\Index.cshtml"
|
||||
Write(Url.Action(MVC.API.Job.StatisticsDailyOpenedClosed()));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\', function (data) {\r\n chartData = data;\r\n " +
|
||||
"buildChart();\r\n });\r\n }());\r\n\r\n </script>\r\n " +
|
||||
"</div>\r\n</div>\r\n<h2>Open Jobs Awaiting Technician Action (");
|
||||
|
||||
|
||||
#line 119 "..\..\Views\Job\Index.cshtml"
|
||||
Write(Model.OpenJobs.Items.Count);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(")</h2>\r\n");
|
||||
|
||||
|
||||
#line 120 "..\..\Views\Job\Index.cshtml"
|
||||
Write(Html.Partial(MVC.Shared.Views._JobTable, Model.OpenJobs, new ViewDataDictionary()));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n<h2>Long Running Jobs (");
|
||||
|
||||
|
||||
#line 121 "..\..\Views\Job\Index.cshtml"
|
||||
Write(Model.LongRunningJobs.Items.Count);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(")</h2>\r\n");
|
||||
|
||||
|
||||
#line 122 "..\..\Views\Job\Index.cshtml"
|
||||
Write(Html.Partial(MVC.Shared.Views._JobTable, Model.LongRunningJobs, new ViewDataDictionary()));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n");
|
||||
|
||||
WriteLiteral("\r\n");
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
#pragma warning restore 1591
|
||||
@@ -0,0 +1,184 @@
|
||||
@model Disco.Web.Models.Job.ShowModel
|
||||
@{
|
||||
Html.BundleDeferred("~/ClientScripts/Modules/jQuery-NumberFormatter");
|
||||
}
|
||||
<table id="jobComponents">
|
||||
<tr>
|
||||
<th>
|
||||
Description
|
||||
</th>
|
||||
<th>
|
||||
Cost
|
||||
</th>
|
||||
<th class="actions">
|
||||
|
||||
</th>
|
||||
</tr>
|
||||
@foreach (var jc in Model.Job.JobComponents)
|
||||
{
|
||||
<tr data-jobcomponentid="@jc.Id">
|
||||
<td>
|
||||
<input type="text" class="description" value="@jc.Description" />
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" class="cost" value="@jc.Cost.ToString("C")" />
|
||||
</td>
|
||||
<td>
|
||||
<span class="remove"></span>
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
<tr>
|
||||
<td>
|
||||
<a href="#" id="jobComponentsAdd">Add Component</a>
|
||||
</td>
|
||||
<td colspan="2" class="totalCost">
|
||||
Total: <span id="jobComponentsTotalCost"></span>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<div id="dialogRemoveComponent" title="Remove this Component?">
|
||||
<p>
|
||||
<span class="ui-icon ui-icon-alert" style="float: left; margin: 0 7px 20px 0;"></span>
|
||||
Are you sure?</p>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
var $jobComponents = $('#jobComponents');
|
||||
|
||||
$jobComponents.find('input').live('change', updateComponent).focus(function () { $(this).select() }).filter('.cost');
|
||||
$jobComponents.find('span.remove').live('click', removeComponent);
|
||||
|
||||
$('#jobComponentsAdd').click(function () {
|
||||
var jc = $('<tr><td><input type="text" class="description" /></td><td><input type="text" class="cost" /></td><td><span class="remove"></span></td></tr>');
|
||||
jc.find('input').focus(function () { $(this).select() })
|
||||
jc.insertBefore($jobComponents.find('tr').last());
|
||||
jc.find('input.description').focus();
|
||||
return false;
|
||||
});
|
||||
|
||||
$('#dialogRemoveComponent').dialog({
|
||||
resizable: false,
|
||||
height: 140,
|
||||
modal: true,
|
||||
autoOpen: false
|
||||
});
|
||||
|
||||
function removeComponent() {
|
||||
var componentRow = $(this).closest('tr');
|
||||
var id = componentRow.attr('data-jobcomponentid');
|
||||
if (id) {
|
||||
var data = { id: id };
|
||||
|
||||
var $dialogRemoveComponent = $('#dialogRemoveComponent');
|
||||
$dialogRemoveComponent.dialog("enable");
|
||||
$dialogRemoveComponent.dialog('option', 'buttons', {
|
||||
"Remove": function () {
|
||||
$dialogRemoveComponent.dialog("disable");
|
||||
$dialogRemoveComponent.dialog("option", "buttons", null);
|
||||
$.ajax({
|
||||
url: '@Url.Action(MVC.API.Job.ComponentRemove())',
|
||||
dataType: 'json',
|
||||
data: data,
|
||||
success: function (d) {
|
||||
if (d == 'OK') {
|
||||
componentRow.remove();
|
||||
updateTotalCost();
|
||||
} else {
|
||||
alert('Unable to remove component: ' + d);
|
||||
}
|
||||
$dialogRemoveComponent.dialog("close");
|
||||
},
|
||||
error: function (jqXHR, textStatus, errorThrown) {
|
||||
alert('Unable to remove component: ' + textStatus);
|
||||
$dialogRemoveComponent.dialog("close");
|
||||
}
|
||||
});
|
||||
},
|
||||
Cancel: function () {
|
||||
$dialogRemoveComponent.dialog("close");
|
||||
}
|
||||
});
|
||||
|
||||
$dialogRemoveComponent.dialog('open');
|
||||
|
||||
} else {
|
||||
// New - Remove
|
||||
componentRow.remove();
|
||||
updateTotalCost();
|
||||
}
|
||||
}
|
||||
function updateTotalCost() {
|
||||
var totalCost = 0;
|
||||
|
||||
$jobComponents.find('input.cost').each(function () {
|
||||
var v = $(this).val();
|
||||
v = $.parseNumber(v, { format: '#,##0.00', locale: 'au' });
|
||||
if (!isNaN(v))
|
||||
totalCost += v;
|
||||
});
|
||||
var totalCostFormatted = $.formatNumber(totalCost, { format: '#,##0.00', locale: 'au' });
|
||||
$('#jobComponentsTotalCost').text('$' + totalCostFormatted);
|
||||
}
|
||||
function updateComponent() {
|
||||
var componentRow = $(this).closest('tr');
|
||||
|
||||
componentRow.find('input').attr('disabled', true).addClass('updating');
|
||||
|
||||
var id = componentRow.attr('data-jobcomponentid');
|
||||
if (id) {
|
||||
// Update
|
||||
var data = {
|
||||
id: id,
|
||||
Description: componentRow.find('input.description').val(),
|
||||
Cost: componentRow.find('input.cost').val()
|
||||
};
|
||||
$.ajax({
|
||||
url: '@Url.Action(MVC.API.Job.ComponentUpdate())',
|
||||
dataType: 'json',
|
||||
data: data,
|
||||
success: function (d) {
|
||||
componentRow.find('input').attr('disabled', false).removeClass('updating');
|
||||
if (d.Result == 'OK') {
|
||||
componentRow.find('input.description').val(d.Component.Description);
|
||||
componentRow.find('input.cost').val(d.Component.Cost);
|
||||
} else {
|
||||
alert('Unable to update component: ' + d.Result);
|
||||
}
|
||||
},
|
||||
error: function (jqXHR, textStatus, errorThrown) {
|
||||
alert('Unable to update component: ' + textStatus);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
// Add
|
||||
var data = {
|
||||
id: id,
|
||||
Description: componentRow.find('input.description').val(),
|
||||
Cost: componentRow.find('input.cost').val()
|
||||
};
|
||||
$.ajax({
|
||||
url: '@Url.Action(MVC.API.Job.ComponentAdd(Model.Job.Id, null, null))',
|
||||
dataType: 'json',
|
||||
data: data,
|
||||
success: function (d) {
|
||||
componentRow.find('input').attr('disabled', false).removeClass('updating');
|
||||
if (d.Result == 'OK') {
|
||||
componentRow.attr('data-jobcomponentid', d.Component.Id);
|
||||
componentRow.find('input.description').val(d.Component.Description);
|
||||
componentRow.find('input.cost').val(d.Component.Cost);
|
||||
} else {
|
||||
alert('Unable to add component: ' + d.Result);
|
||||
}
|
||||
},
|
||||
error: function (jqXHR, textStatus, errorThrown) {
|
||||
alert('Unable to add component: ' + textStatus);
|
||||
}
|
||||
});
|
||||
}
|
||||
updateTotalCost();
|
||||
}
|
||||
updateTotalCost();
|
||||
|
||||
});
|
||||
</script>
|
||||
@@ -0,0 +1,294 @@
|
||||
#pragma warning disable 1591
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.17929
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace Disco.Web.Views.Job.JobParts
|
||||
{
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Text;
|
||||
using System.Web;
|
||||
using System.Web.Helpers;
|
||||
using System.Web.Mvc;
|
||||
using System.Web.Mvc.Ajax;
|
||||
using System.Web.Mvc.Html;
|
||||
using System.Web.Routing;
|
||||
using System.Web.Security;
|
||||
using System.Web.UI;
|
||||
using System.Web.WebPages;
|
||||
using Disco.BI.Extensions;
|
||||
using Disco.Models.Repository;
|
||||
using Disco.Web;
|
||||
using Disco.Web.Extensions;
|
||||
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "1.5.0.0")]
|
||||
[System.Web.WebPages.PageVirtualPathAttribute("~/Views/Job/JobParts/Components.cshtml")]
|
||||
public class Components : System.Web.Mvc.WebViewPage<Disco.Web.Models.Job.ShowModel>
|
||||
{
|
||||
public Components()
|
||||
{
|
||||
}
|
||||
public override void Execute()
|
||||
{
|
||||
|
||||
#line 2 "..\..\Views\Job\JobParts\Components.cshtml"
|
||||
|
||||
Html.BundleDeferred("~/ClientScripts/Modules/jQuery-NumberFormatter");
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n<table");
|
||||
|
||||
WriteLiteral(" id=\"jobComponents\"");
|
||||
|
||||
WriteLiteral(">\r\n <tr>\r\n <th>\r\n Description\r\n </th>\r\n <th>\r\n" +
|
||||
" Cost\r\n </th>\r\n <th");
|
||||
|
||||
WriteLiteral(" class=\"actions\"");
|
||||
|
||||
WriteLiteral(">\r\n \r\n </th>\r\n </tr>\r\n");
|
||||
|
||||
|
||||
#line 17 "..\..\Views\Job\JobParts\Components.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 17 "..\..\Views\Job\JobParts\Components.cshtml"
|
||||
foreach (var jc in Model.Job.JobComponents)
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <tr");
|
||||
|
||||
WriteLiteral(" data-jobcomponentid=\"");
|
||||
|
||||
|
||||
#line 19 "..\..\Views\Job\JobParts\Components.cshtml"
|
||||
Write(jc.Id);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\"");
|
||||
|
||||
WriteLiteral(">\r\n <td>\r\n <input");
|
||||
|
||||
WriteLiteral(" type=\"text\"");
|
||||
|
||||
WriteLiteral(" class=\"description\"");
|
||||
|
||||
WriteAttribute("value", Tuple.Create(" value=\"", 513), Tuple.Create("\"", 536)
|
||||
|
||||
#line 21 "..\..\Views\Job\JobParts\Components.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 521), Tuple.Create<System.Object, System.Int32>(jc.Description
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 521), false)
|
||||
);
|
||||
|
||||
WriteLiteral(" />\r\n </td>\r\n <td>\r\n <input");
|
||||
|
||||
WriteLiteral(" type=\"text\"");
|
||||
|
||||
WriteLiteral(" class=\"cost\"");
|
||||
|
||||
WriteAttribute("value", Tuple.Create(" value=\"", 626), Tuple.Create("\"", 656)
|
||||
|
||||
#line 24 "..\..\Views\Job\JobParts\Components.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 634), Tuple.Create<System.Object, System.Int32>(jc.Cost.ToString("C")
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 634), false)
|
||||
);
|
||||
|
||||
WriteLiteral(" />\r\n </td>\r\n <td>\r\n <span");
|
||||
|
||||
WriteLiteral(" class=\"remove\"");
|
||||
|
||||
WriteLiteral("></span>\r\n </td>\r\n </tr>\r\n");
|
||||
|
||||
|
||||
#line 30 "..\..\Views\Job\JobParts\Components.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <tr>\r\n <td>\r\n <a");
|
||||
|
||||
WriteLiteral(" href=\"#\"");
|
||||
|
||||
WriteLiteral(" id=\"jobComponentsAdd\"");
|
||||
|
||||
WriteLiteral(">Add Component</a>\r\n </td>\r\n <td");
|
||||
|
||||
WriteLiteral(" colspan=\"2\"");
|
||||
|
||||
WriteLiteral(" class=\"totalCost\"");
|
||||
|
||||
WriteLiteral(">\r\n Total: <span");
|
||||
|
||||
WriteLiteral(" id=\"jobComponentsTotalCost\"");
|
||||
|
||||
WriteLiteral("></span>\r\n </td>\r\n </tr>\r\n</table>\r\n<div");
|
||||
|
||||
WriteLiteral(" id=\"dialogRemoveComponent\"");
|
||||
|
||||
WriteLiteral(" title=\"Remove this Component?\"");
|
||||
|
||||
WriteLiteral(">\r\n <p>\r\n <span");
|
||||
|
||||
WriteLiteral(" class=\"ui-icon ui-icon-alert\"");
|
||||
|
||||
WriteLiteral(" style=\"float: left; margin: 0 7px 20px 0;\"");
|
||||
|
||||
WriteLiteral("></span>\r\n Are you sure?</p>\r\n</div>\r\n<script");
|
||||
|
||||
WriteLiteral(" type=\"text/javascript\"");
|
||||
|
||||
WriteLiteral(">\r\n $(function () {\r\n var $jobComponents = $(\'#jobComponents\');\r\n\r\n " +
|
||||
" $jobComponents.find(\'input\').live(\'change\', updateComponent).focus(function " +
|
||||
"() { $(this).select() }).filter(\'.cost\');\r\n $jobComponents.find(\'span.rem" +
|
||||
"ove\').live(\'click\', removeComponent);\r\n\r\n $(\'#jobComponentsAdd\').click(fu" +
|
||||
"nction () {\r\n var jc = $(\'<tr><td><input type=\"text\" class=\"descripti" +
|
||||
"on\" /></td><td><input type=\"text\" class=\"cost\" /></td><td><span class=\"remove\"><" +
|
||||
"/span></td></tr>\');\r\n jc.find(\'input\').focus(function () { $(this).se" +
|
||||
"lect() })\r\n jc.insertBefore($jobComponents.find(\'tr\').last());\r\n " +
|
||||
" jc.find(\'input.description\').focus();\r\n return false;\r\n " +
|
||||
" });\r\n\r\n $(\'#dialogRemoveComponent\').dialog({\r\n resizable: fal" +
|
||||
"se,\r\n height: 140,\r\n modal: true,\r\n autoOpen: f" +
|
||||
"alse\r\n });\r\n\r\n function removeComponent() {\r\n var compo" +
|
||||
"nentRow = $(this).closest(\'tr\');\r\n var id = componentRow.attr(\'data-j" +
|
||||
"obcomponentid\');\r\n if (id) {\r\n var data = { id: id };\r" +
|
||||
"\n\r\n var $dialogRemoveComponent = $(\'#dialogRemoveComponent\');\r\n " +
|
||||
" $dialogRemoveComponent.dialog(\"enable\");\r\n $dialogR" +
|
||||
"emoveComponent.dialog(\'option\', \'buttons\', {\r\n \"Remove\": func" +
|
||||
"tion () {\r\n $dialogRemoveComponent.dialog(\"disable\");\r\n " +
|
||||
" $dialogRemoveComponent.dialog(\"option\", \"buttons\", null);\r" +
|
||||
"\n $.ajax({\r\n url: \'");
|
||||
|
||||
|
||||
#line 80 "..\..\Views\Job\JobParts\Components.cshtml"
|
||||
Write(Url.Action(MVC.API.Job.ComponentRemove()));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\',\r\n dataType: \'json\',\r\n da" +
|
||||
"ta: data,\r\n success: function (d) {\r\n " +
|
||||
" if (d == \'OK\') {\r\n componentR" +
|
||||
"ow.remove();\r\n updateTotalCost();\r\n " +
|
||||
" } else {\r\n alert(\'Unabl" +
|
||||
"e to remove component: \' + d);\r\n }\r\n " +
|
||||
" $dialogRemoveComponent.dialog(\"close\");\r\n " +
|
||||
" },\r\n error: function (jqXHR, textStatus, erro" +
|
||||
"rThrown) {\r\n alert(\'Unable to remove component: \'" +
|
||||
" + textStatus);\r\n $dialogRemoveComponent.dialog(\"" +
|
||||
"close\");\r\n }\r\n });\r\n " +
|
||||
" },\r\n Cancel: function () {\r\n " +
|
||||
" $dialogRemoveComponent.dialog(\"close\");\r\n }\r\n " +
|
||||
" });\r\n\r\n $dialogRemoveComponent.dialog(\'open\');\r\n\r\n } " +
|
||||
"else {\r\n // New - Remove\r\n componentRow.remove();\r" +
|
||||
"\n updateTotalCost();\r\n }\r\n }\r\n function " +
|
||||
"updateTotalCost() {\r\n var totalCost = 0;\r\n\r\n $jobComponent" +
|
||||
"s.find(\'input.cost\').each(function () {\r\n var v = $(this).val();\r" +
|
||||
"\n v = $.parseNumber(v, { format: \'#,##0.00\', locale: \'au\' });\r\n " +
|
||||
" if (!isNaN(v))\r\n totalCost += v;\r\n }" +
|
||||
");\r\n var totalCostFormatted = $.formatNumber(totalCost, { format: \'#," +
|
||||
"##0.00\', locale: \'au\' });\r\n $(\'#jobComponentsTotalCost\').text(\'$\' + t" +
|
||||
"otalCostFormatted);\r\n }\r\n function updateComponent() {\r\n " +
|
||||
" var componentRow = $(this).closest(\'tr\');\r\n\r\n componentRow.find(\'in" +
|
||||
"put\').attr(\'disabled\', true).addClass(\'updating\');\r\n\r\n var id = compo" +
|
||||
"nentRow.attr(\'data-jobcomponentid\');\r\n if (id) {\r\n // " +
|
||||
"Update\r\n var data = {\r\n id: id,\r\n " +
|
||||
" Description: componentRow.find(\'input.description\').val(),\r\n " +
|
||||
" Cost: componentRow.find(\'input.cost\').val()\r\n };\r\n " +
|
||||
" $.ajax({\r\n url: \'");
|
||||
|
||||
|
||||
#line 137 "..\..\Views\Job\JobParts\Components.cshtml"
|
||||
Write(Url.Action(MVC.API.Job.ComponentUpdate()));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(@"',
|
||||
dataType: 'json',
|
||||
data: data,
|
||||
success: function (d) {
|
||||
componentRow.find('input').attr('disabled', false).removeClass('updating');
|
||||
if (d.Result == 'OK') {
|
||||
componentRow.find('input.description').val(d.Component.Description);
|
||||
componentRow.find('input.cost').val(d.Component.Cost);
|
||||
} else {
|
||||
alert('Unable to update component: ' + d.Result);
|
||||
}
|
||||
},
|
||||
error: function (jqXHR, textStatus, errorThrown) {
|
||||
alert('Unable to update component: ' + textStatus);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
// Add
|
||||
var data = {
|
||||
id: id,
|
||||
Description: componentRow.find('input.description').val(),
|
||||
Cost: componentRow.find('input.cost').val()
|
||||
};
|
||||
$.ajax({
|
||||
url: '");
|
||||
|
||||
|
||||
#line 161 "..\..\Views\Job\JobParts\Components.cshtml"
|
||||
Write(Url.Action(MVC.API.Job.ComponentAdd(Model.Job.Id, null, null)));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(@"',
|
||||
dataType: 'json',
|
||||
data: data,
|
||||
success: function (d) {
|
||||
componentRow.find('input').attr('disabled', false).removeClass('updating');
|
||||
if (d.Result == 'OK') {
|
||||
componentRow.attr('data-jobcomponentid', d.Component.Id);
|
||||
componentRow.find('input.description').val(d.Component.Description);
|
||||
componentRow.find('input.cost').val(d.Component.Cost);
|
||||
} else {
|
||||
alert('Unable to add component: ' + d.Result);
|
||||
}
|
||||
},
|
||||
error: function (jqXHR, textStatus, errorThrown) {
|
||||
alert('Unable to add component: ' + textStatus);
|
||||
}
|
||||
});
|
||||
}
|
||||
updateTotalCost();
|
||||
}
|
||||
updateTotalCost();
|
||||
|
||||
});
|
||||
</script>
|
||||
");
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
#pragma warning restore 1591
|
||||
@@ -0,0 +1,90 @@
|
||||
@model Disco.Web.Models.Job.ShowModel
|
||||
@{
|
||||
var validFlags = Model.Job.ValidFlagsGrouped();
|
||||
}
|
||||
<div id="jobDetailTab-Flags" class="jobPart">
|
||||
<table id="jobFlags">
|
||||
@foreach (var flagGroup in validFlags)
|
||||
{
|
||||
<tr>
|
||||
<th>
|
||||
<span class="flagGroupName">@flagGroup.Key</span><br />
|
||||
@AjaxHelpers.AjaxLoader()
|
||||
</th>
|
||||
<td>
|
||||
@foreach (var flagItem in flagGroup.Value)
|
||||
{
|
||||
<div>
|
||||
<input type="checkbox" value="@flagItem.Item1" id="jobFlag_@(flagItem.Item1)" @(flagItem.Item3 ? new HtmlString("checked=\"checked\"") : new HtmlString(string.Empty)) /><label id="jobFlagLabel_@(flagItem.Item1)" for="jobFlag_@(flagItem.Item1)">@flagItem.Item2</label></div>
|
||||
}
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
</table>
|
||||
<div id="dialogFlagsAction" title="Add Flag">
|
||||
@using (Html.BeginForm(MVC.API.Job.UpdateFlag(Model.Job.Id, null, null, true)))
|
||||
{
|
||||
<input id="dialogFlagsActionFlag" type="hidden" name="Flag" value="0" />
|
||||
<h3>
|
||||
Reason:</h3>
|
||||
<p>
|
||||
<textarea name="Reason" class="block"></textarea>
|
||||
</p>
|
||||
}
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
$('#jobDetailTabItems').append('<li><a href="#jobDetailTab-Flags">Flags</a></li>');
|
||||
$(function () {
|
||||
var $flagCheckboxes = $('#jobFlags').find('input[type="checkbox"]');
|
||||
var $dialogFlagsAction = $('#dialogFlagsAction');
|
||||
var $flagCheckbox;
|
||||
|
||||
var updateFlags = function () {
|
||||
$flagCheckbox = $(this);
|
||||
var flagValue = $flagCheckbox.val();
|
||||
|
||||
if ($flagCheckbox.is(':checked')) {
|
||||
// Add
|
||||
$('#dialogFlagsActionFlag').val(flagValue);
|
||||
var title = 'Add Flag: ' + $flagCheckbox.closest('tr').find('th .flagGroupName').text() + ': ' + $('#jobFlagLabel_' + flagValue).text();
|
||||
$dialogFlagsAction.dialog('option', 'title', title);
|
||||
$dialogFlagsAction.dialog('open');
|
||||
} else {
|
||||
// Remove
|
||||
var $ajaxLoading = $flagCheckbox.closest('tr').find('span.ajaxLoading');
|
||||
$ajaxLoading.show();
|
||||
$.getJSON('@(Url.Action(MVC.API.Job.UpdateFlag(Model.Job.Id, null, null, false)))', { Flag: '-' + flagValue }, function (response, result) {
|
||||
if (result != 'success' || response != 'OK') {
|
||||
alert('Unable to change Flag:\n' + response);
|
||||
$ajaxLoading.hide();
|
||||
} else {
|
||||
$ajaxLoading.hide().next('.ajaxOk').show().delay('fast').fadeOut('slow');
|
||||
}
|
||||
})
|
||||
}
|
||||
};
|
||||
$dialogFlagsAction.dialog({
|
||||
resizable: false,
|
||||
height: 240,
|
||||
modal: true,
|
||||
autoOpen: false,
|
||||
buttons: {
|
||||
"Add": function () {
|
||||
var $this = $(this);
|
||||
$this.dialog("disable");
|
||||
$this.dialog("option", "buttons", null);
|
||||
$this.find('form').first().submit();
|
||||
},
|
||||
Cancel: function () {
|
||||
$(this).dialog("close");
|
||||
}
|
||||
},
|
||||
close: function () {
|
||||
$flagCheckbox.attr('checked', false);
|
||||
}
|
||||
});
|
||||
|
||||
$flagCheckboxes.click(updateFlags);
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
@@ -0,0 +1,327 @@
|
||||
#pragma warning disable 1591
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.17929
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace Disco.Web.Views.Job.JobParts
|
||||
{
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Text;
|
||||
using System.Web;
|
||||
using System.Web.Helpers;
|
||||
using System.Web.Mvc;
|
||||
using System.Web.Mvc.Ajax;
|
||||
using System.Web.Mvc.Html;
|
||||
using System.Web.Routing;
|
||||
using System.Web.Security;
|
||||
using System.Web.UI;
|
||||
using System.Web.WebPages;
|
||||
using Disco.BI.Extensions;
|
||||
using Disco.Models.Repository;
|
||||
using Disco.Web;
|
||||
using Disco.Web.Extensions;
|
||||
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "1.5.0.0")]
|
||||
[System.Web.WebPages.PageVirtualPathAttribute("~/Views/Job/JobParts/Flags.cshtml")]
|
||||
public class Flags : System.Web.Mvc.WebViewPage<Disco.Web.Models.Job.ShowModel>
|
||||
{
|
||||
public Flags()
|
||||
{
|
||||
}
|
||||
public override void Execute()
|
||||
{
|
||||
|
||||
#line 2 "..\..\Views\Job\JobParts\Flags.cshtml"
|
||||
|
||||
var validFlags = Model.Job.ValidFlagsGrouped();
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n<div");
|
||||
|
||||
WriteLiteral(" id=\"jobDetailTab-Flags\"");
|
||||
|
||||
WriteLiteral(" class=\"jobPart\"");
|
||||
|
||||
WriteLiteral(">\r\n <table");
|
||||
|
||||
WriteLiteral(" id=\"jobFlags\"");
|
||||
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
|
||||
#line 7 "..\..\Views\Job\JobParts\Flags.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 7 "..\..\Views\Job\JobParts\Flags.cshtml"
|
||||
foreach (var flagGroup in validFlags)
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <tr>\r\n <th>\r\n <span");
|
||||
|
||||
WriteLiteral(" class=\"flagGroupName\"");
|
||||
|
||||
WriteLiteral(">");
|
||||
|
||||
|
||||
#line 11 "..\..\Views\Job\JobParts\Flags.cshtml"
|
||||
Write(flagGroup.Key);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("</span><br />\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 12 "..\..\Views\Job\JobParts\Flags.cshtml"
|
||||
Write(AjaxHelpers.AjaxLoader());
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n </th>\r\n <td>\r\n");
|
||||
|
||||
|
||||
#line 15 "..\..\Views\Job\JobParts\Flags.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 15 "..\..\Views\Job\JobParts\Flags.cshtml"
|
||||
foreach (var flagItem in flagGroup.Value)
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <div>\r\n <input");
|
||||
|
||||
WriteLiteral(" type=\"checkbox\"");
|
||||
|
||||
WriteAttribute("value", Tuple.Create(" value=\"", 609), Tuple.Create("\"", 632)
|
||||
|
||||
#line 18 "..\..\Views\Job\JobParts\Flags.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 617), Tuple.Create<System.Object, System.Int32>(flagItem.Item1
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 617), false)
|
||||
);
|
||||
|
||||
WriteAttribute("id", Tuple.Create(" id=\"", 633), Tuple.Create("\"", 663)
|
||||
, Tuple.Create(Tuple.Create("", 638), Tuple.Create("jobFlag_", 638), true)
|
||||
|
||||
#line 18 "..\..\Views\Job\JobParts\Flags.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 646), Tuple.Create<System.Object, System.Int32>(flagItem.Item1
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 646), false)
|
||||
);
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 18 "..\..\Views\Job\JobParts\Flags.cshtml"
|
||||
Write(flagItem.Item3 ? new HtmlString("checked=\"checked\"") : new HtmlString(string.Empty));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" /><label");
|
||||
|
||||
WriteAttribute("id", Tuple.Create(" id=\"", 762), Tuple.Create("\"", 797)
|
||||
, Tuple.Create(Tuple.Create("", 767), Tuple.Create("jobFlagLabel_", 767), true)
|
||||
|
||||
#line 18 "..\..\Views\Job\JobParts\Flags.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 780), Tuple.Create<System.Object, System.Int32>(flagItem.Item1
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 780), false)
|
||||
);
|
||||
|
||||
WriteAttribute("for", Tuple.Create(" for=\"", 798), Tuple.Create("\"", 829)
|
||||
, Tuple.Create(Tuple.Create("", 804), Tuple.Create("jobFlag_", 804), true)
|
||||
|
||||
#line 18 "..\..\Views\Job\JobParts\Flags.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 812), Tuple.Create<System.Object, System.Int32>(flagItem.Item1
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 812), false)
|
||||
);
|
||||
|
||||
WriteLiteral(">");
|
||||
|
||||
|
||||
#line 18 "..\..\Views\Job\JobParts\Flags.cshtml"
|
||||
Write(flagItem.Item2);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("</label></div>\r\n");
|
||||
|
||||
|
||||
#line 19 "..\..\Views\Job\JobParts\Flags.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" </td>\r\n </tr>\r\n");
|
||||
|
||||
|
||||
#line 22 "..\..\Views\Job\JobParts\Flags.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" </table>\r\n <div");
|
||||
|
||||
WriteLiteral(" id=\"dialogFlagsAction\"");
|
||||
|
||||
WriteLiteral(" title=\"Add Flag\"");
|
||||
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
|
||||
#line 25 "..\..\Views\Job\JobParts\Flags.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 25 "..\..\Views\Job\JobParts\Flags.cshtml"
|
||||
using (Html.BeginForm(MVC.API.Job.UpdateFlag(Model.Job.Id, null, null, true)))
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <input");
|
||||
|
||||
WriteLiteral(" id=\"dialogFlagsActionFlag\"");
|
||||
|
||||
WriteLiteral(" type=\"hidden\"");
|
||||
|
||||
WriteLiteral(" name=\"Flag\"");
|
||||
|
||||
WriteLiteral(" value=\"0\"");
|
||||
|
||||
WriteLiteral(" />\r\n");
|
||||
|
||||
WriteLiteral(" <h3>\r\n Reason:</h3>\r\n");
|
||||
|
||||
WriteLiteral(" <p>\r\n <textarea");
|
||||
|
||||
WriteLiteral(" name=\"Reason\"");
|
||||
|
||||
WriteLiteral(" class=\"block\"");
|
||||
|
||||
WriteLiteral("></textarea>\r\n </p>\r\n");
|
||||
|
||||
|
||||
#line 33 "..\..\Views\Job\JobParts\Flags.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" </div>\r\n <script");
|
||||
|
||||
WriteLiteral(" type=\"text/javascript\"");
|
||||
|
||||
WriteLiteral(@">
|
||||
$('#jobDetailTabItems').append('<li><a href=""#jobDetailTab-Flags"">Flags</a></li>');
|
||||
$(function () {
|
||||
var $flagCheckboxes = $('#jobFlags').find('input[type=""checkbox""]');
|
||||
var $dialogFlagsAction = $('#dialogFlagsAction');
|
||||
var $flagCheckbox;
|
||||
|
||||
var updateFlags = function () {
|
||||
$flagCheckbox = $(this);
|
||||
var flagValue = $flagCheckbox.val();
|
||||
|
||||
if ($flagCheckbox.is(':checked')) {
|
||||
// Add
|
||||
$('#dialogFlagsActionFlag').val(flagValue);
|
||||
var title = 'Add Flag: ' + $flagCheckbox.closest('tr').find('th .flagGroupName').text() + ': ' + $('#jobFlagLabel_' + flagValue).text();
|
||||
$dialogFlagsAction.dialog('option', 'title', title);
|
||||
$dialogFlagsAction.dialog('open');
|
||||
} else {
|
||||
// Remove
|
||||
var $ajaxLoading = $flagCheckbox.closest('tr').find('span.ajaxLoading');
|
||||
$ajaxLoading.show();
|
||||
$.getJSON('");
|
||||
|
||||
|
||||
#line 56 "..\..\Views\Job\JobParts\Flags.cshtml"
|
||||
Write(Url.Action(MVC.API.Job.UpdateFlag(Model.Job.Id, null, null, false)));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(@"', { Flag: '-' + flagValue }, function (response, result) {
|
||||
if (result != 'success' || response != 'OK') {
|
||||
alert('Unable to change Flag:\n' + response);
|
||||
$ajaxLoading.hide();
|
||||
} else {
|
||||
$ajaxLoading.hide().next('.ajaxOk').show().delay('fast').fadeOut('slow');
|
||||
}
|
||||
})
|
||||
}
|
||||
};
|
||||
$dialogFlagsAction.dialog({
|
||||
resizable: false,
|
||||
height: 240,
|
||||
modal: true,
|
||||
autoOpen: false,
|
||||
buttons: {
|
||||
""Add"": function () {
|
||||
var $this = $(this);
|
||||
$this.dialog(""disable"");
|
||||
$this.dialog(""option"", ""buttons"", null);
|
||||
$this.find('form').first().submit();
|
||||
},
|
||||
Cancel: function () {
|
||||
$(this).dialog(""close"");
|
||||
}
|
||||
},
|
||||
close: function () {
|
||||
$flagCheckbox.attr('checked', false);
|
||||
}
|
||||
});
|
||||
|
||||
$flagCheckboxes.click(updateFlags);
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
");
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
#pragma warning restore 1591
|
||||
@@ -0,0 +1,380 @@
|
||||
@model Disco.Web.Models.Job.ShowModel
|
||||
<table id="jobNonWarrantyInsurance">
|
||||
@if (Model.Job.JobMetaNonWarranty.IsInsuranceClaim)
|
||||
{
|
||||
<tr>
|
||||
<th style="width: 230px;">
|
||||
Date of Loss or Damage
|
||||
</th>
|
||||
<td>
|
||||
@Html.EditorFor(m => m.Job.JobMetaInsurance.LossOrDamageDate)
|
||||
@AjaxHelpers.AjaxLoader()
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
var dateField = $('#Job_JobMetaInsurance_LossOrDamageDate');
|
||||
document.DiscoFunctions.DateChangeHelper(
|
||||
dateField,
|
||||
'Unknown',
|
||||
'@(Url.Action(MVC.API.Job.UpdateInsuranceLossOrDamageDate(Model.Job.Id, null)))',
|
||||
'LossOrDamageDate',
|
||||
null
|
||||
);
|
||||
});
|
||||
</script>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>
|
||||
Event Location
|
||||
</th>
|
||||
<td>
|
||||
@Html.EditorFor(m => m.Job.JobMetaInsurance.EventLocation)
|
||||
@AjaxHelpers.AjaxSave()
|
||||
@AjaxHelpers.AjaxLoader()
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
document.DiscoFunctions.PropertyChangeHelper(
|
||||
$('#Job_JobMetaInsurance_EventLocation'),
|
||||
'Unknown',
|
||||
'@Url.Action(MVC.API.Job.UpdateInsuranceEventLocation(Model.Job.Id, null))',
|
||||
'EventLocation'
|
||||
);
|
||||
});
|
||||
</script>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>
|
||||
Description
|
||||
</th>
|
||||
<td>
|
||||
@Html.EditorFor(m => m.Job.JobMetaInsurance.Description)
|
||||
@AjaxHelpers.AjaxSave()
|
||||
@AjaxHelpers.AjaxLoader()
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
document.DiscoFunctions.PropertyChangeHelper(
|
||||
$('#Job_JobMetaInsurance_Description'),
|
||||
'None',
|
||||
'@Url.Action(MVC.API.Job.UpdateInsuranceDescription(Model.Job.Id, null))',
|
||||
'Description'
|
||||
);
|
||||
});
|
||||
</script>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th style="width: 200px;">
|
||||
|
||||
</th>
|
||||
<td>
|
||||
@Html.EditorFor(m => m.Job.JobMetaInsurance.ThirdPartyCaused)@Html.LabelFor(m => m.Job.JobMetaInsurance.ThirdPartyCaused)
|
||||
@AjaxHelpers.AjaxSave()
|
||||
@AjaxHelpers.AjaxLoader()
|
||||
<div id="Job_JobMetaInsurance_ThirdPartyCaused_Details" style="padding-left: 25px;">
|
||||
<div>
|
||||
<h5>
|
||||
Third Party Name</h5>
|
||||
@Html.EditorFor(m => m.Job.JobMetaInsurance.ThirdPartyCausedName)
|
||||
@AjaxHelpers.AjaxSave()
|
||||
@AjaxHelpers.AjaxLoader()
|
||||
</div>
|
||||
<div>
|
||||
<h5>
|
||||
Why Third Parties Fault</h5>
|
||||
@Html.EditorFor(m => m.Job.JobMetaInsurance.ThirdPartyCausedWhy)
|
||||
@AjaxHelpers.AjaxSave()
|
||||
@AjaxHelpers.AjaxLoader()
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
var thirdPartyField = $('#Job_JobMetaInsurance_ThirdPartyCaused');
|
||||
var thirdPartyDetails = $('#Job_JobMetaInsurance_ThirdPartyCaused_Details');
|
||||
var thirdPartyDetails_Changed = function (e, dontAnimate) {
|
||||
if (thirdPartyField.is(':checked')) {
|
||||
if (dontAnimate) {
|
||||
thirdPartyDetails.show();
|
||||
} else {
|
||||
thirdPartyDetails.slideDown();
|
||||
}
|
||||
} else {
|
||||
if (dontAnimate) {
|
||||
thirdPartyDetails.hide();
|
||||
} else {
|
||||
thirdPartyDetails.slideUp();
|
||||
}
|
||||
}
|
||||
};
|
||||
thirdPartyDetails_Changed(null, true);
|
||||
thirdPartyField.change(thirdPartyDetails_Changed);
|
||||
|
||||
document.DiscoFunctions.PropertyChangeHelper(
|
||||
thirdPartyField,
|
||||
null,
|
||||
'@Url.Action(MVC.API.Job.UpdateInsuranceThirdPartyCaused(Model.Job.Id, null))',
|
||||
'ThirdPartyCaused'
|
||||
);
|
||||
document.DiscoFunctions.PropertyChangeHelper(
|
||||
$('#Job_JobMetaInsurance_ThirdPartyCausedName'),
|
||||
'None',
|
||||
'@Url.Action(MVC.API.Job.UpdateInsuranceThirdPartyCausedName(Model.Job.Id, null))',
|
||||
'ThirdPartyCausedName'
|
||||
);
|
||||
document.DiscoFunctions.PropertyChangeHelper(
|
||||
$('#Job_JobMetaInsurance_ThirdPartyCausedWhy'),
|
||||
'Unknown',
|
||||
'@Url.Action(MVC.API.Job.UpdateInsuranceThirdPartyCausedWhy(Model.Job.Id, null))',
|
||||
'ThirdPartyCausedWhy'
|
||||
);
|
||||
});
|
||||
</script>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>
|
||||
Witnessed by (Name/Address)
|
||||
</th>
|
||||
<td>
|
||||
@Html.EditorFor(m => m.Job.JobMetaInsurance.WitnessesNamesAddresses)
|
||||
@AjaxHelpers.AjaxSave()
|
||||
@AjaxHelpers.AjaxLoader()
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
document.DiscoFunctions.PropertyChangeHelper(
|
||||
$('#Job_JobMetaInsurance_WitnessesNamesAddresses'),
|
||||
'None',
|
||||
'@Url.Action(MVC.API.Job.UpdateInsuranceWitnessesNamesAddresses(Model.Job.Id, null))',
|
||||
'WitnessesNamesAddresses'
|
||||
);
|
||||
});
|
||||
</script>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>
|
||||
Burglary/Theft - Method of Entry
|
||||
</th>
|
||||
<td>
|
||||
@Html.EditorFor(m => m.Job.JobMetaInsurance.BurglaryTheftMethodOfEntry)
|
||||
@AjaxHelpers.AjaxSave()
|
||||
@AjaxHelpers.AjaxLoader()
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
document.DiscoFunctions.PropertyChangeHelper(
|
||||
$('#Job_JobMetaInsurance_BurglaryTheftMethodOfEntry'),
|
||||
'None',
|
||||
'@Url.Action(MVC.API.Job.UpdateInsuranceBurglaryTheftMethodOfEntry(Model.Job.Id, null))',
|
||||
'BurglaryTheftMethodOfEntry'
|
||||
);
|
||||
});
|
||||
</script>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th style="width: 200px;">
|
||||
Property Last Seen
|
||||
</th>
|
||||
<td>
|
||||
@Html.EditorFor(m => m.Job.JobMetaInsurance.PropertyLastSeenDate)
|
||||
@AjaxHelpers.AjaxLoader()
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
var dateField = $('#Job_JobMetaInsurance_PropertyLastSeenDate');
|
||||
document.DiscoFunctions.DateChangeHelper(
|
||||
dateField,
|
||||
'Unknown/NA',
|
||||
'@(Url.Action(MVC.API.Job.UpdateInsurancePropertyLastSeenDate(Model.Job.Id, null)))',
|
||||
'PropertyLastSeenDate',
|
||||
null
|
||||
);
|
||||
});
|
||||
</script>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th style="width: 200px;">
|
||||
|
||||
</th>
|
||||
<td>
|
||||
@Html.EditorFor(m => m.Job.JobMetaInsurance.PoliceNotified)@Html.LabelFor(m => m.Job.JobMetaInsurance.PoliceNotified)
|
||||
@AjaxHelpers.AjaxSave()
|
||||
@AjaxHelpers.AjaxLoader()
|
||||
<div id="Job_JobMetaInsurance_PoliceNotified_Details" style="padding-left: 25px;">
|
||||
<div>
|
||||
<h5>
|
||||
Station</h5>
|
||||
@Html.EditorFor(m => m.Job.JobMetaInsurance.PoliceNotifiedStation)
|
||||
@AjaxHelpers.AjaxSave()
|
||||
@AjaxHelpers.AjaxLoader()
|
||||
</div>
|
||||
<div>
|
||||
<h5>
|
||||
Date</h5>
|
||||
@Html.EditorFor(m => m.Job.JobMetaInsurance.PoliceNotifiedDate)
|
||||
@AjaxHelpers.AjaxLoader()
|
||||
</div>
|
||||
<div>
|
||||
<h5>
|
||||
Crime Report #</h5>
|
||||
@Html.EditorFor(m => m.Job.JobMetaInsurance.PoliceNotifiedCrimeReportNo)
|
||||
@AjaxHelpers.AjaxSave()
|
||||
@AjaxHelpers.AjaxLoader()
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
var policeNotifiedField = $('#Job_JobMetaInsurance_PoliceNotified');
|
||||
var policeNotifiedDetails = $('#Job_JobMetaInsurance_PoliceNotified_Details');
|
||||
var policeNotifiedDetails_Changed = function (e, dontAnimate) {
|
||||
if (policeNotifiedField.is(':checked')) {
|
||||
if (dontAnimate) {
|
||||
policeNotifiedDetails.show();
|
||||
} else {
|
||||
policeNotifiedDetails.slideDown();
|
||||
}
|
||||
} else {
|
||||
if (dontAnimate) {
|
||||
policeNotifiedDetails.hide();
|
||||
} else {
|
||||
policeNotifiedDetails.slideUp();
|
||||
}
|
||||
}
|
||||
};
|
||||
policeNotifiedDetails_Changed(null, true);
|
||||
policeNotifiedField.change(policeNotifiedDetails_Changed);
|
||||
|
||||
document.DiscoFunctions.PropertyChangeHelper(
|
||||
policeNotifiedField,
|
||||
null,
|
||||
'@Url.Action(MVC.API.Job.UpdateInsurancePoliceNotified(Model.Job.Id, null))',
|
||||
'PoliceNotified'
|
||||
);
|
||||
document.DiscoFunctions.PropertyChangeHelper(
|
||||
$('#Job_JobMetaInsurance_PoliceNotifiedStation'),
|
||||
'Unknown',
|
||||
'@Url.Action(MVC.API.Job.UpdateInsurancePoliceNotifiedStation(Model.Job.Id, null))',
|
||||
'PoliceNotifiedStation'
|
||||
);
|
||||
var dateField = $('#Job_JobMetaInsurance_PoliceNotifiedDate');
|
||||
document.DiscoFunctions.DateChangeHelper(
|
||||
dateField,
|
||||
'Unknown',
|
||||
'@(Url.Action(MVC.API.Job.UpdateInsurancePoliceNotifiedDate(Model.Job.Id, null)))',
|
||||
'PoliceNotifiedDate',
|
||||
null,
|
||||
true
|
||||
);
|
||||
document.DiscoFunctions.PropertyChangeHelper(
|
||||
$('#Job_JobMetaInsurance_PoliceNotifiedCrimeReportNo'),
|
||||
'Unknown',
|
||||
'@Url.Action(MVC.API.Job.UpdateInsurancePoliceNotifiedCrimeReportNo(Model.Job.Id, null))',
|
||||
'PoliceNotifiedCrimeReportNo'
|
||||
);
|
||||
});
|
||||
</script>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>
|
||||
Action to Recover/Reduce Loss
|
||||
</th>
|
||||
<td>
|
||||
@Html.EditorFor(m => m.Job.JobMetaInsurance.RecoverReduceAction)
|
||||
@AjaxHelpers.AjaxSave()
|
||||
@AjaxHelpers.AjaxLoader()
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
document.DiscoFunctions.PropertyChangeHelper(
|
||||
$('#Job_JobMetaInsurance_RecoverReduceAction'),
|
||||
'None',
|
||||
'@Url.Action(MVC.API.Job.UpdateInsuranceRecoverReduceAction(Model.Job.Id, null))',
|
||||
'RecoverReduceAction'
|
||||
);
|
||||
});
|
||||
</script>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>
|
||||
Other Interested Parties
|
||||
</th>
|
||||
<td>
|
||||
@Html.EditorFor(m => m.Job.JobMetaInsurance.OtherInterestedParties)
|
||||
@AjaxHelpers.AjaxSave()
|
||||
@AjaxHelpers.AjaxLoader()
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
document.DiscoFunctions.PropertyChangeHelper(
|
||||
$('#Job_JobMetaInsurance_OtherInterestedParties'),
|
||||
'None',
|
||||
'@Url.Action(MVC.API.Job.UpdateInsuranceOtherInterestedParties(Model.Job.Id, null))',
|
||||
'OtherInterestedParties'
|
||||
);
|
||||
});
|
||||
</script>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th style="width: 200px;">
|
||||
Date of Purchase
|
||||
</th>
|
||||
<td>
|
||||
@Html.EditorFor(m => m.Job.JobMetaInsurance.DateOfPurchase)
|
||||
@AjaxHelpers.AjaxLoader()
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
var dateField = $('#Job_JobMetaInsurance_DateOfPurchase');
|
||||
document.DiscoFunctions.DateChangeHelper(
|
||||
dateField,
|
||||
'Unknown',
|
||||
'@(Url.Action(MVC.API.Job.UpdateInsuranceDateOfPurchase(Model.Job.Id, null)))',
|
||||
'DateOfPurchase',
|
||||
null,
|
||||
true
|
||||
);
|
||||
});
|
||||
</script>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>
|
||||
Claim Form Sent Date
|
||||
</th>
|
||||
<td>
|
||||
@Html.EditorFor(m => m.Job.JobMetaInsurance.ClaimFormSentDate)
|
||||
<span id="Job_JobMetaInsurance_ClaimFormSentUserId">@(string.IsNullOrEmpty(Model.Job.JobMetaInsurance.ClaimFormSentUserId) ? string.Empty : string.Format("by {0}", Model.Job.JobMetaInsurance.ClaimFormSentUser.ToString()))</span>
|
||||
@AjaxHelpers.AjaxLoader()
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
document.DiscoFunctions.DateChangeUserHelper(
|
||||
$('#Job_JobMetaInsurance_ClaimFormSentDate'),
|
||||
$('#Job_JobMetaInsurance_ClaimFormSentUserId'),
|
||||
'Unknown',
|
||||
'@(Url.Action(MVC.API.Job.UpdateInsuranceClaimFormSentDate(Model.Job.Id, null)))',
|
||||
'ClaimFormSentDate',
|
||||
@(Model.Job.OpenedDate.ToJavascriptDate())
|
||||
);
|
||||
});
|
||||
</script>
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
<tr>
|
||||
<th>
|
||||
Insurance Claim
|
||||
</th>
|
||||
<td>
|
||||
<div style="padding: 8px; text-align: center">
|
||||
@if (Model.Job.JobMetaNonWarranty.IsInsuranceClaim)
|
||||
{
|
||||
@Html.ActionLinkButton("Remove Insurance Claim", MVC.API.Job.UpdateNonWarrantyIsInsuranceClaim(Model.Job.Id, false, true))
|
||||
}
|
||||
else
|
||||
{
|
||||
@Html.ActionLinkButton("Add Insurance Claim", MVC.API.Job.UpdateNonWarrantyIsInsuranceClaim(Model.Job.Id, true, true))
|
||||
}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,19 @@
|
||||
@model Disco.Web.Models.Job.ShowModel
|
||||
@using Disco.Models.Repository;
|
||||
@{
|
||||
Html.BundleDeferred("~/ClientScripts/Modules/Disco-PropertyChangeHelpers");
|
||||
}
|
||||
@switch (Model.Job.JobTypeId)
|
||||
{
|
||||
case JobType.JobTypeIds.HWar:
|
||||
@Html.Partial(MVC.Job.Views.JobParts.Warranty);
|
||||
break;
|
||||
case JobType.JobTypeIds.HNWar:
|
||||
@Html.Partial(MVC.Job.Views.JobParts.NonWarranty);
|
||||
break;
|
||||
case JobType.JobTypeIds.UMgmt:
|
||||
@Html.Partial(MVC.Job.Views.JobParts.Flags);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@@ -0,0 +1,119 @@
|
||||
#pragma warning disable 1591
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.17929
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace Disco.Web.Views.Job.JobParts
|
||||
{
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Text;
|
||||
using System.Web;
|
||||
using System.Web.Helpers;
|
||||
using System.Web.Mvc;
|
||||
using System.Web.Mvc.Ajax;
|
||||
using System.Web.Mvc.Html;
|
||||
using System.Web.Routing;
|
||||
using System.Web.Security;
|
||||
using System.Web.UI;
|
||||
using System.Web.WebPages;
|
||||
using Disco.BI.Extensions;
|
||||
|
||||
#line 2 "..\..\Views\Job\JobParts\JobMetaAdditions.cshtml"
|
||||
using Disco.Models.Repository;
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
using Disco.Web;
|
||||
using Disco.Web.Extensions;
|
||||
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "1.5.0.0")]
|
||||
[System.Web.WebPages.PageVirtualPathAttribute("~/Views/Job/JobParts/JobMetaAdditions.cshtml")]
|
||||
public class JobMetaAdditions : System.Web.Mvc.WebViewPage<Disco.Web.Models.Job.ShowModel>
|
||||
{
|
||||
public JobMetaAdditions()
|
||||
{
|
||||
}
|
||||
public override void Execute()
|
||||
{
|
||||
|
||||
#line 3 "..\..\Views\Job\JobParts\JobMetaAdditions.cshtml"
|
||||
|
||||
Html.BundleDeferred("~/ClientScripts/Modules/Disco-PropertyChangeHelpers");
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n");
|
||||
|
||||
|
||||
#line 6 "..\..\Views\Job\JobParts\JobMetaAdditions.cshtml"
|
||||
switch (Model.Job.JobTypeId)
|
||||
{
|
||||
case JobType.JobTypeIds.HWar:
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 9 "..\..\Views\Job\JobParts\JobMetaAdditions.cshtml"
|
||||
Write(Html.Partial(MVC.Job.Views.JobParts.Warranty));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 9 "..\..\Views\Job\JobParts\JobMetaAdditions.cshtml"
|
||||
;
|
||||
break;
|
||||
case JobType.JobTypeIds.HNWar:
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 12 "..\..\Views\Job\JobParts\JobMetaAdditions.cshtml"
|
||||
Write(Html.Partial(MVC.Job.Views.JobParts.NonWarranty));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 12 "..\..\Views\Job\JobParts\JobMetaAdditions.cshtml"
|
||||
;
|
||||
break;
|
||||
case JobType.JobTypeIds.UMgmt:
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 15 "..\..\Views\Job\JobParts\JobMetaAdditions.cshtml"
|
||||
Write(Html.Partial(MVC.Job.Views.JobParts.Flags));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 15 "..\..\Views\Job\JobParts\JobMetaAdditions.cshtml"
|
||||
;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
}
|
||||
}
|
||||
}
|
||||
#pragma warning restore 1591
|
||||
@@ -0,0 +1,16 @@
|
||||
@model Disco.Web.Models.Job.ShowModel
|
||||
<div id="jobDetailTab-Components" class="jobPart">
|
||||
@Html.Partial(MVC.Job.Views.JobParts.Components)
|
||||
</div>
|
||||
<div id="jobDetailTab-NonWarrantyFinance" class="jobPart">
|
||||
@Html.Partial(MVC.Job.Views.JobParts.NonWarrantyFinance)
|
||||
</div>
|
||||
<div id="jobDetailTab-NonWarrantyRepairs" class="jobPart">
|
||||
@Html.Partial(MVC.Job.Views.JobParts.Repairs)
|
||||
</div>
|
||||
<div id="jobDetailTab-NonWarrantyInsurance" class="jobPart">
|
||||
@Html.Partial(MVC.Job.Views.JobParts.Insurance)
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
$('#jobDetailTabItems').append('<li><a href="#jobDetailTab-Components">Components</a></li><li><a href="#jobDetailTab-NonWarrantyFinance">Finance</a></li><li><a href="#jobDetailTab-NonWarrantyRepairs">Repairs</a></li><li><a href="#jobDetailTab-NonWarrantyInsurance">Insurance</a></li>');
|
||||
</script>
|
||||
@@ -0,0 +1,123 @@
|
||||
#pragma warning disable 1591
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.17929
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace Disco.Web.Views.Job.JobParts
|
||||
{
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Text;
|
||||
using System.Web;
|
||||
using System.Web.Helpers;
|
||||
using System.Web.Mvc;
|
||||
using System.Web.Mvc.Ajax;
|
||||
using System.Web.Mvc.Html;
|
||||
using System.Web.Routing;
|
||||
using System.Web.Security;
|
||||
using System.Web.UI;
|
||||
using System.Web.WebPages;
|
||||
using Disco.BI.Extensions;
|
||||
using Disco.Models.Repository;
|
||||
using Disco.Web;
|
||||
using Disco.Web.Extensions;
|
||||
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "1.5.0.0")]
|
||||
[System.Web.WebPages.PageVirtualPathAttribute("~/Views/Job/JobParts/NonWarranty.cshtml")]
|
||||
public class NonWarranty : System.Web.Mvc.WebViewPage<Disco.Web.Models.Job.ShowModel>
|
||||
{
|
||||
public NonWarranty()
|
||||
{
|
||||
}
|
||||
public override void Execute()
|
||||
{
|
||||
WriteLiteral("<div");
|
||||
|
||||
WriteLiteral(" id=\"jobDetailTab-Components\"");
|
||||
|
||||
WriteLiteral(" class=\"jobPart\"");
|
||||
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 3 "..\..\Views\Job\JobParts\NonWarranty.cshtml"
|
||||
Write(Html.Partial(MVC.Job.Views.JobParts.Components));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n</div>\r\n<div");
|
||||
|
||||
WriteLiteral(" id=\"jobDetailTab-NonWarrantyFinance\"");
|
||||
|
||||
WriteLiteral(" class=\"jobPart\"");
|
||||
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 6 "..\..\Views\Job\JobParts\NonWarranty.cshtml"
|
||||
Write(Html.Partial(MVC.Job.Views.JobParts.NonWarrantyFinance));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n</div>\r\n<div");
|
||||
|
||||
WriteLiteral(" id=\"jobDetailTab-NonWarrantyRepairs\"");
|
||||
|
||||
WriteLiteral(" class=\"jobPart\"");
|
||||
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 9 "..\..\Views\Job\JobParts\NonWarranty.cshtml"
|
||||
Write(Html.Partial(MVC.Job.Views.JobParts.Repairs));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n</div>\r\n<div");
|
||||
|
||||
WriteLiteral(" id=\"jobDetailTab-NonWarrantyInsurance\"");
|
||||
|
||||
WriteLiteral(" class=\"jobPart\"");
|
||||
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 12 "..\..\Views\Job\JobParts\NonWarranty.cshtml"
|
||||
Write(Html.Partial(MVC.Job.Views.JobParts.Insurance));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n</div>\r\n<script");
|
||||
|
||||
WriteLiteral(" type=\"text/javascript\"");
|
||||
|
||||
WriteLiteral(@">
|
||||
$('#jobDetailTabItems').append('<li><a href=""#jobDetailTab-Components"">Components</a></li><li><a href=""#jobDetailTab-NonWarrantyFinance"">Finance</a></li><li><a href=""#jobDetailTab-NonWarrantyRepairs"">Repairs</a></li><li><a href=""#jobDetailTab-NonWarrantyInsurance"">Insurance</a></li>');
|
||||
</script>
|
||||
");
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
#pragma warning restore 1591
|
||||
@@ -0,0 +1,184 @@
|
||||
@model Disco.Web.Models.Job.ShowModel
|
||||
<table id="jobNonWarrantyFinance">
|
||||
<tr>
|
||||
<th style="width: 200px;">
|
||||
Accounting Charge Required
|
||||
</th>
|
||||
<td>
|
||||
@Html.EditorFor(m => m.Job.JobMetaNonWarranty.AccountingChargeRequiredDate)
|
||||
<span id="Job_JobMetaNonWarranty_AccountingChargeRequiredUser">@(string.IsNullOrEmpty(Model.Job.JobMetaNonWarranty.AccountingChargeRequiredUserId) ? string.Empty : string.Format("by {0}", Model.Job.JobMetaNonWarranty.AccountingChargeRequiredUser.ToString()))</span>
|
||||
@AjaxHelpers.AjaxLoader()
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
document.DiscoFunctions.DateChangeUserHelper(
|
||||
$('#Job_JobMetaNonWarranty_AccountingChargeRequiredDate'),
|
||||
$('#Job_JobMetaNonWarranty_AccountingChargeRequiredUser'),
|
||||
'Not Required',
|
||||
'@(Url.Action(MVC.API.Job.UpdateNonWarrantyAccountingChargeRequired(Model.Job.Id, null)))',
|
||||
'AccountingChargeRequiredDate',
|
||||
@(Model.Job.OpenedDate.ToJavascriptDate())
|
||||
);
|
||||
});
|
||||
</script>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th style="width: 200px;">
|
||||
Accounting Charge Added
|
||||
</th>
|
||||
<td>
|
||||
@Html.EditorFor(m => m.Job.JobMetaNonWarranty.AccountingChargeAddedDate)
|
||||
<span id="Job_JobMetaNonWarranty_AccountingChargeAddedUser">@(string.IsNullOrEmpty(Model.Job.JobMetaNonWarranty.AccountingChargeAddedUserId) ? string.Empty : string.Format("by {0}", Model.Job.JobMetaNonWarranty.AccountingChargeAddedUser.ToString()))</span>
|
||||
@AjaxHelpers.AjaxLoader()
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
document.DiscoFunctions.DateChangeUserHelper(
|
||||
$('#Job_JobMetaNonWarranty_AccountingChargeAddedDate'),
|
||||
$('#Job_JobMetaNonWarranty_AccountingChargeAddedUser'),
|
||||
'Not Added',
|
||||
'@(Url.Action(MVC.API.Job.UpdateNonWarrantyAccountingChargeAdded(Model.Job.Id, null)))',
|
||||
'AccountingChargeAddedDate',
|
||||
@(Model.Job.OpenedDate.ToJavascriptDate())
|
||||
);
|
||||
});
|
||||
</script>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th style="width: 200px;">
|
||||
Accounting Charge Paid
|
||||
</th>
|
||||
<td>
|
||||
@Html.EditorFor(m => m.Job.JobMetaNonWarranty.AccountingChargePaidDate)
|
||||
<span id="Job_JobMetaNonWarranty_AccountingChargePaidUser">@(string.IsNullOrEmpty(Model.Job.JobMetaNonWarranty.AccountingChargePaidUserId) ? string.Empty : string.Format("by {0}", Model.Job.JobMetaNonWarranty.AccountingChargePaidUser.ToString()))</span>
|
||||
@AjaxHelpers.AjaxLoader()
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
document.DiscoFunctions.DateChangeUserHelper(
|
||||
$('#Job_JobMetaNonWarranty_AccountingChargePaidDate'),
|
||||
$('#Job_JobMetaNonWarranty_AccountingChargePaidUser'),
|
||||
'Not Paid',
|
||||
'@(Url.Action(MVC.API.Job.UpdateNonWarrantyAccountingChargePaid(Model.Job.Id, null)))',
|
||||
'AccountingChargePaidDate',
|
||||
@(Model.Job.OpenedDate.ToJavascriptDate())
|
||||
);
|
||||
});
|
||||
</script>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th style="width: 200px;">
|
||||
Purchase Order Raised
|
||||
</th>
|
||||
<td>
|
||||
@Html.EditorFor(m => m.Job.JobMetaNonWarranty.PurchaseOrderRaisedDate)
|
||||
<span id="Job_JobMetaNonWarranty_PurchaseOrderRaisedUser">@(string.IsNullOrEmpty(Model.Job.JobMetaNonWarranty.PurchaseOrderRaisedUserId) ? string.Empty : string.Format("by {0}", Model.Job.JobMetaNonWarranty.PurchaseOrderRaisedUser.ToString()))</span>
|
||||
@AjaxHelpers.AjaxLoader()
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
document.DiscoFunctions.DateChangeUserHelper(
|
||||
$('#Job_JobMetaNonWarranty_PurchaseOrderRaisedDate'),
|
||||
$('#Job_JobMetaNonWarranty_PurchaseOrderRaisedUser'),
|
||||
'Not Raised',
|
||||
'@(Url.Action(MVC.API.Job.UpdateNonWarrantyPurchaseOrderRaised(Model.Job.Id, null)))',
|
||||
'PurchaseOrderRaisedDate',
|
||||
@(Model.Job.OpenedDate.ToJavascriptDate())
|
||||
);
|
||||
});
|
||||
</script>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>
|
||||
Purchase Order Reference
|
||||
</th>
|
||||
<td>
|
||||
@Html.TextBoxFor(m => m.Job.JobMetaNonWarranty.PurchaseOrderReference)
|
||||
@AjaxHelpers.AjaxSave()
|
||||
@AjaxHelpers.AjaxLoader()
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
var $purchaseOrderReference = $('#Job_JobMetaNonWarranty_PurchaseOrderReference');
|
||||
var $ajaxSave = $purchaseOrderReference.next('.ajaxSave');
|
||||
$purchaseOrderReference
|
||||
.watermark('No Reference')
|
||||
.focus(function () { $purchaseOrderReference.select() })
|
||||
.keydown(function (e) {
|
||||
$ajaxSave.show();
|
||||
if (e.which == 13) {
|
||||
$(this).blur();
|
||||
}
|
||||
}).blur(function () {
|
||||
$ajaxSave.hide();
|
||||
})
|
||||
.change(function () {
|
||||
$ajaxSave.hide();
|
||||
$ajaxLoading = $ajaxSave.next('.ajaxLoading').show();
|
||||
var data = { PurchaseOrderReference: $purchaseOrderReference.val() };
|
||||
$.ajax({
|
||||
url: '@Url.Action(MVC.API.Job.UpdateNonWarrantyPurchaseOrderReference(Model.Job.Id, null))',
|
||||
dataType: 'json',
|
||||
data: data,
|
||||
success: function (d) {
|
||||
if (d == 'OK') {
|
||||
$ajaxLoading.hide().next('.ajaxOk').show().delay('fast').fadeOut('slow');
|
||||
} else {
|
||||
$ajaxLoading.hide();
|
||||
alert('Unable to update purchase order reference: ' + d);
|
||||
}
|
||||
},
|
||||
error: function (jqXHR, textStatus, errorThrown) {
|
||||
alert('Unable to update purchase order reference: ' + textStatus);
|
||||
$ajaxLoading.hide();
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th style="width: 200px;">
|
||||
Purchase Order Sent
|
||||
</th>
|
||||
<td>
|
||||
@Html.EditorFor(m => m.Job.JobMetaNonWarranty.PurchaseOrderSentDate)
|
||||
<span id="Job_JobMetaNonWarranty_PurchaseOrderSentUser">@(string.IsNullOrEmpty(Model.Job.JobMetaNonWarranty.PurchaseOrderSentUserId) ? string.Empty : string.Format("by {0}", Model.Job.JobMetaNonWarranty.PurchaseOrderSentUser.ToString()))</span>
|
||||
@AjaxHelpers.AjaxLoader()
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
document.DiscoFunctions.DateChangeUserHelper(
|
||||
$('#Job_JobMetaNonWarranty_PurchaseOrderSentDate'),
|
||||
$('#Job_JobMetaNonWarranty_PurchaseOrderSentUser'),
|
||||
'Not Sent',
|
||||
'@(Url.Action(MVC.API.Job.UpdateNonWarrantyPurchaseOrderSent(Model.Job.Id, null)))',
|
||||
'PurchaseOrderSentDate',
|
||||
@(Model.Job.OpenedDate.ToJavascriptDate())
|
||||
);
|
||||
});
|
||||
</script>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th style="width: 200px;">
|
||||
Invoice Received
|
||||
</th>
|
||||
<td>
|
||||
@Html.EditorFor(m => m.Job.JobMetaNonWarranty.InvoiceReceivedDate)
|
||||
<span id="Job_JobMetaNonWarranty_InvoiceReceivedUser">@(string.IsNullOrEmpty(Model.Job.JobMetaNonWarranty.InvoiceReceivedUserId) ? string.Empty : string.Format("by {0}", Model.Job.JobMetaNonWarranty.InvoiceReceivedUser.ToString()))</span>
|
||||
@AjaxHelpers.AjaxLoader()
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
document.DiscoFunctions.DateChangeUserHelper(
|
||||
$('#Job_JobMetaNonWarranty_InvoiceReceivedDate'),
|
||||
$('#Job_JobMetaNonWarranty_InvoiceReceivedUser'),
|
||||
'Not Received',
|
||||
'@(Url.Action(MVC.API.Job.UpdateNonWarrantyInvoiceReceived(Model.Job.Id, null)))',
|
||||
'InvoiceReceivedDate',
|
||||
@(Model.Job.OpenedDate.ToJavascriptDate())
|
||||
);
|
||||
});
|
||||
</script>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@@ -0,0 +1,561 @@
|
||||
#pragma warning disable 1591
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.17929
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace Disco.Web.Views.Job.JobParts
|
||||
{
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Text;
|
||||
using System.Web;
|
||||
using System.Web.Helpers;
|
||||
using System.Web.Mvc;
|
||||
using System.Web.Mvc.Ajax;
|
||||
using System.Web.Mvc.Html;
|
||||
using System.Web.Routing;
|
||||
using System.Web.Security;
|
||||
using System.Web.UI;
|
||||
using System.Web.WebPages;
|
||||
using Disco.BI.Extensions;
|
||||
using Disco.Models.Repository;
|
||||
using Disco.Web;
|
||||
using Disco.Web.Extensions;
|
||||
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "1.5.0.0")]
|
||||
[System.Web.WebPages.PageVirtualPathAttribute("~/Views/Job/JobParts/NonWarrantyFinance.cshtml")]
|
||||
public class NonWarrantyFinance : System.Web.Mvc.WebViewPage<Disco.Web.Models.Job.ShowModel>
|
||||
{
|
||||
public NonWarrantyFinance()
|
||||
{
|
||||
}
|
||||
public override void Execute()
|
||||
{
|
||||
WriteLiteral("<table");
|
||||
|
||||
WriteLiteral(" id=\"jobNonWarrantyFinance\"");
|
||||
|
||||
WriteLiteral(">\r\n <tr>\r\n <th");
|
||||
|
||||
WriteLiteral(" style=\"width: 200px;\"");
|
||||
|
||||
WriteLiteral(">\r\n Accounting Charge Required\r\n </th>\r\n <td>\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 8 "..\..\Views\Job\JobParts\NonWarrantyFinance.cshtml"
|
||||
Write(Html.EditorFor(m => m.Job.JobMetaNonWarranty.AccountingChargeRequiredDate));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n <span");
|
||||
|
||||
WriteLiteral(" id=\"Job_JobMetaNonWarranty_AccountingChargeRequiredUser\"");
|
||||
|
||||
WriteLiteral(">");
|
||||
|
||||
|
||||
#line 9 "..\..\Views\Job\JobParts\NonWarrantyFinance.cshtml"
|
||||
Write(string.IsNullOrEmpty(Model.Job.JobMetaNonWarranty.AccountingChargeRequiredUserId) ? string.Empty : string.Format("by {0}", Model.Job.JobMetaNonWarranty.AccountingChargeRequiredUser.ToString()));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("</span>\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 10 "..\..\Views\Job\JobParts\NonWarrantyFinance.cshtml"
|
||||
Write(AjaxHelpers.AjaxLoader());
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n <script");
|
||||
|
||||
WriteLiteral(" type=\"text/javascript\"");
|
||||
|
||||
WriteLiteral(@">
|
||||
$(function () {
|
||||
document.DiscoFunctions.DateChangeUserHelper(
|
||||
$('#Job_JobMetaNonWarranty_AccountingChargeRequiredDate'),
|
||||
$('#Job_JobMetaNonWarranty_AccountingChargeRequiredUser'),
|
||||
'Not Required',
|
||||
'");
|
||||
|
||||
|
||||
#line 17 "..\..\Views\Job\JobParts\NonWarrantyFinance.cshtml"
|
||||
Write(Url.Action(MVC.API.Job.UpdateNonWarrantyAccountingChargeRequired(Model.Job.Id, null)));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\',\r\n \'AccountingChargeRequiredDate\',\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 19 "..\..\Views\Job\JobParts\NonWarrantyFinance.cshtml"
|
||||
Write(Model.Job.OpenedDate.ToJavascriptDate());
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n );\r\n });\r\n </script>\r\n " +
|
||||
" </td>\r\n </tr>\r\n <tr>\r\n <th");
|
||||
|
||||
WriteLiteral(" style=\"width: 200px;\"");
|
||||
|
||||
WriteLiteral(">\r\n Accounting Charge Added\r\n </th>\r\n <td>\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 30 "..\..\Views\Job\JobParts\NonWarrantyFinance.cshtml"
|
||||
Write(Html.EditorFor(m => m.Job.JobMetaNonWarranty.AccountingChargeAddedDate));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n <span");
|
||||
|
||||
WriteLiteral(" id=\"Job_JobMetaNonWarranty_AccountingChargeAddedUser\"");
|
||||
|
||||
WriteLiteral(">");
|
||||
|
||||
|
||||
#line 31 "..\..\Views\Job\JobParts\NonWarrantyFinance.cshtml"
|
||||
Write(string.IsNullOrEmpty(Model.Job.JobMetaNonWarranty.AccountingChargeAddedUserId) ? string.Empty : string.Format("by {0}", Model.Job.JobMetaNonWarranty.AccountingChargeAddedUser.ToString()));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("</span>\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 32 "..\..\Views\Job\JobParts\NonWarrantyFinance.cshtml"
|
||||
Write(AjaxHelpers.AjaxLoader());
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n <script");
|
||||
|
||||
WriteLiteral(" type=\"text/javascript\"");
|
||||
|
||||
WriteLiteral(@">
|
||||
$(function () {
|
||||
document.DiscoFunctions.DateChangeUserHelper(
|
||||
$('#Job_JobMetaNonWarranty_AccountingChargeAddedDate'),
|
||||
$('#Job_JobMetaNonWarranty_AccountingChargeAddedUser'),
|
||||
'Not Added',
|
||||
'");
|
||||
|
||||
|
||||
#line 39 "..\..\Views\Job\JobParts\NonWarrantyFinance.cshtml"
|
||||
Write(Url.Action(MVC.API.Job.UpdateNonWarrantyAccountingChargeAdded(Model.Job.Id, null)));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\',\r\n \'AccountingChargeAddedDate\',\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 41 "..\..\Views\Job\JobParts\NonWarrantyFinance.cshtml"
|
||||
Write(Model.Job.OpenedDate.ToJavascriptDate());
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n );\r\n });\r\n </script>\r\n " +
|
||||
" </td>\r\n </tr>\r\n <tr>\r\n <th");
|
||||
|
||||
WriteLiteral(" style=\"width: 200px;\"");
|
||||
|
||||
WriteLiteral(">\r\n Accounting Charge Paid\r\n </th>\r\n <td>\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 52 "..\..\Views\Job\JobParts\NonWarrantyFinance.cshtml"
|
||||
Write(Html.EditorFor(m => m.Job.JobMetaNonWarranty.AccountingChargePaidDate));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n <span");
|
||||
|
||||
WriteLiteral(" id=\"Job_JobMetaNonWarranty_AccountingChargePaidUser\"");
|
||||
|
||||
WriteLiteral(">");
|
||||
|
||||
|
||||
#line 53 "..\..\Views\Job\JobParts\NonWarrantyFinance.cshtml"
|
||||
Write(string.IsNullOrEmpty(Model.Job.JobMetaNonWarranty.AccountingChargePaidUserId) ? string.Empty : string.Format("by {0}", Model.Job.JobMetaNonWarranty.AccountingChargePaidUser.ToString()));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("</span>\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 54 "..\..\Views\Job\JobParts\NonWarrantyFinance.cshtml"
|
||||
Write(AjaxHelpers.AjaxLoader());
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n <script");
|
||||
|
||||
WriteLiteral(" type=\"text/javascript\"");
|
||||
|
||||
WriteLiteral(@">
|
||||
$(function () {
|
||||
document.DiscoFunctions.DateChangeUserHelper(
|
||||
$('#Job_JobMetaNonWarranty_AccountingChargePaidDate'),
|
||||
$('#Job_JobMetaNonWarranty_AccountingChargePaidUser'),
|
||||
'Not Paid',
|
||||
'");
|
||||
|
||||
|
||||
#line 61 "..\..\Views\Job\JobParts\NonWarrantyFinance.cshtml"
|
||||
Write(Url.Action(MVC.API.Job.UpdateNonWarrantyAccountingChargePaid(Model.Job.Id, null)));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\',\r\n \'AccountingChargePaidDate\',\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 63 "..\..\Views\Job\JobParts\NonWarrantyFinance.cshtml"
|
||||
Write(Model.Job.OpenedDate.ToJavascriptDate());
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n );\r\n });\r\n </script>\r\n " +
|
||||
" </td>\r\n </tr>\r\n <tr>\r\n <th");
|
||||
|
||||
WriteLiteral(" style=\"width: 200px;\"");
|
||||
|
||||
WriteLiteral(">\r\n Purchase Order Raised\r\n </th>\r\n <td>\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 74 "..\..\Views\Job\JobParts\NonWarrantyFinance.cshtml"
|
||||
Write(Html.EditorFor(m => m.Job.JobMetaNonWarranty.PurchaseOrderRaisedDate));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n <span");
|
||||
|
||||
WriteLiteral(" id=\"Job_JobMetaNonWarranty_PurchaseOrderRaisedUser\"");
|
||||
|
||||
WriteLiteral(">");
|
||||
|
||||
|
||||
#line 75 "..\..\Views\Job\JobParts\NonWarrantyFinance.cshtml"
|
||||
Write(string.IsNullOrEmpty(Model.Job.JobMetaNonWarranty.PurchaseOrderRaisedUserId) ? string.Empty : string.Format("by {0}", Model.Job.JobMetaNonWarranty.PurchaseOrderRaisedUser.ToString()));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("</span>\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 76 "..\..\Views\Job\JobParts\NonWarrantyFinance.cshtml"
|
||||
Write(AjaxHelpers.AjaxLoader());
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n <script");
|
||||
|
||||
WriteLiteral(" type=\"text/javascript\"");
|
||||
|
||||
WriteLiteral(@">
|
||||
$(function () {
|
||||
document.DiscoFunctions.DateChangeUserHelper(
|
||||
$('#Job_JobMetaNonWarranty_PurchaseOrderRaisedDate'),
|
||||
$('#Job_JobMetaNonWarranty_PurchaseOrderRaisedUser'),
|
||||
'Not Raised',
|
||||
'");
|
||||
|
||||
|
||||
#line 83 "..\..\Views\Job\JobParts\NonWarrantyFinance.cshtml"
|
||||
Write(Url.Action(MVC.API.Job.UpdateNonWarrantyPurchaseOrderRaised(Model.Job.Id, null)));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\',\r\n \'PurchaseOrderRaisedDate\',\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 85 "..\..\Views\Job\JobParts\NonWarrantyFinance.cshtml"
|
||||
Write(Model.Job.OpenedDate.ToJavascriptDate());
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n );\r\n });\r\n </script>\r\n " +
|
||||
" </td>\r\n </tr>\r\n <tr>\r\n <th>\r\n Purchase Order Reference\r" +
|
||||
"\n </th>\r\n <td>\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 96 "..\..\Views\Job\JobParts\NonWarrantyFinance.cshtml"
|
||||
Write(Html.TextBoxFor(m => m.Job.JobMetaNonWarranty.PurchaseOrderReference));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 97 "..\..\Views\Job\JobParts\NonWarrantyFinance.cshtml"
|
||||
Write(AjaxHelpers.AjaxSave());
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 98 "..\..\Views\Job\JobParts\NonWarrantyFinance.cshtml"
|
||||
Write(AjaxHelpers.AjaxLoader());
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n <script");
|
||||
|
||||
WriteLiteral(" type=\"text/javascript\"");
|
||||
|
||||
WriteLiteral(@">
|
||||
$(function () {
|
||||
var $purchaseOrderReference = $('#Job_JobMetaNonWarranty_PurchaseOrderReference');
|
||||
var $ajaxSave = $purchaseOrderReference.next('.ajaxSave');
|
||||
$purchaseOrderReference
|
||||
.watermark('No Reference')
|
||||
.focus(function () { $purchaseOrderReference.select() })
|
||||
.keydown(function (e) {
|
||||
$ajaxSave.show();
|
||||
if (e.which == 13) {
|
||||
$(this).blur();
|
||||
}
|
||||
}).blur(function () {
|
||||
$ajaxSave.hide();
|
||||
})
|
||||
.change(function () {
|
||||
$ajaxSave.hide();
|
||||
$ajaxLoading = $ajaxSave.next('.ajaxLoading').show();
|
||||
var data = { PurchaseOrderReference: $purchaseOrderReference.val() };
|
||||
$.ajax({
|
||||
url: '");
|
||||
|
||||
|
||||
#line 119 "..\..\Views\Job\JobParts\NonWarrantyFinance.cshtml"
|
||||
Write(Url.Action(MVC.API.Job.UpdateNonWarrantyPurchaseOrderReference(Model.Job.Id, null)));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(@"',
|
||||
dataType: 'json',
|
||||
data: data,
|
||||
success: function (d) {
|
||||
if (d == 'OK') {
|
||||
$ajaxLoading.hide().next('.ajaxOk').show().delay('fast').fadeOut('slow');
|
||||
} else {
|
||||
$ajaxLoading.hide();
|
||||
alert('Unable to update purchase order reference: ' + d);
|
||||
}
|
||||
},
|
||||
error: function (jqXHR, textStatus, errorThrown) {
|
||||
alert('Unable to update purchase order reference: ' + textStatus);
|
||||
$ajaxLoading.hide();
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th");
|
||||
|
||||
WriteLiteral(" style=\"width: 200px;\"");
|
||||
|
||||
WriteLiteral(">\r\n Purchase Order Sent\r\n </th>\r\n <td>\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 145 "..\..\Views\Job\JobParts\NonWarrantyFinance.cshtml"
|
||||
Write(Html.EditorFor(m => m.Job.JobMetaNonWarranty.PurchaseOrderSentDate));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n <span");
|
||||
|
||||
WriteLiteral(" id=\"Job_JobMetaNonWarranty_PurchaseOrderSentUser\"");
|
||||
|
||||
WriteLiteral(">");
|
||||
|
||||
|
||||
#line 146 "..\..\Views\Job\JobParts\NonWarrantyFinance.cshtml"
|
||||
Write(string.IsNullOrEmpty(Model.Job.JobMetaNonWarranty.PurchaseOrderSentUserId) ? string.Empty : string.Format("by {0}", Model.Job.JobMetaNonWarranty.PurchaseOrderSentUser.ToString()));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("</span>\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 147 "..\..\Views\Job\JobParts\NonWarrantyFinance.cshtml"
|
||||
Write(AjaxHelpers.AjaxLoader());
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n <script");
|
||||
|
||||
WriteLiteral(" type=\"text/javascript\"");
|
||||
|
||||
WriteLiteral(@">
|
||||
$(function () {
|
||||
document.DiscoFunctions.DateChangeUserHelper(
|
||||
$('#Job_JobMetaNonWarranty_PurchaseOrderSentDate'),
|
||||
$('#Job_JobMetaNonWarranty_PurchaseOrderSentUser'),
|
||||
'Not Sent',
|
||||
'");
|
||||
|
||||
|
||||
#line 154 "..\..\Views\Job\JobParts\NonWarrantyFinance.cshtml"
|
||||
Write(Url.Action(MVC.API.Job.UpdateNonWarrantyPurchaseOrderSent(Model.Job.Id, null)));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\',\r\n \'PurchaseOrderSentDate\',\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 156 "..\..\Views\Job\JobParts\NonWarrantyFinance.cshtml"
|
||||
Write(Model.Job.OpenedDate.ToJavascriptDate());
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n );\r\n });\r\n </script>\r\n " +
|
||||
" </td>\r\n </tr>\r\n <tr>\r\n <th");
|
||||
|
||||
WriteLiteral(" style=\"width: 200px;\"");
|
||||
|
||||
WriteLiteral(">\r\n Invoice Received\r\n </th>\r\n <td>\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 167 "..\..\Views\Job\JobParts\NonWarrantyFinance.cshtml"
|
||||
Write(Html.EditorFor(m => m.Job.JobMetaNonWarranty.InvoiceReceivedDate));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n <span");
|
||||
|
||||
WriteLiteral(" id=\"Job_JobMetaNonWarranty_InvoiceReceivedUser\"");
|
||||
|
||||
WriteLiteral(">");
|
||||
|
||||
|
||||
#line 168 "..\..\Views\Job\JobParts\NonWarrantyFinance.cshtml"
|
||||
Write(string.IsNullOrEmpty(Model.Job.JobMetaNonWarranty.InvoiceReceivedUserId) ? string.Empty : string.Format("by {0}", Model.Job.JobMetaNonWarranty.InvoiceReceivedUser.ToString()));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("</span>\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 169 "..\..\Views\Job\JobParts\NonWarrantyFinance.cshtml"
|
||||
Write(AjaxHelpers.AjaxLoader());
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n <script");
|
||||
|
||||
WriteLiteral(" type=\"text/javascript\"");
|
||||
|
||||
WriteLiteral(@">
|
||||
$(function () {
|
||||
document.DiscoFunctions.DateChangeUserHelper(
|
||||
$('#Job_JobMetaNonWarranty_InvoiceReceivedDate'),
|
||||
$('#Job_JobMetaNonWarranty_InvoiceReceivedUser'),
|
||||
'Not Received',
|
||||
'");
|
||||
|
||||
|
||||
#line 176 "..\..\Views\Job\JobParts\NonWarrantyFinance.cshtml"
|
||||
Write(Url.Action(MVC.API.Job.UpdateNonWarrantyInvoiceReceived(Model.Job.Id, null)));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\',\r\n \'InvoiceReceivedDate\',\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 178 "..\..\Views\Job\JobParts\NonWarrantyFinance.cshtml"
|
||||
Write(Model.Job.OpenedDate.ToJavascriptDate());
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n );\r\n });\r\n </script>\r\n " +
|
||||
" </td>\r\n </tr>\r\n</table>\r\n");
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
#pragma warning restore 1591
|
||||
@@ -0,0 +1,85 @@
|
||||
@model Disco.Web.Models.Job.ShowModel
|
||||
<table id="jobNonWarrantyRepairs">
|
||||
<tr>
|
||||
<th style="width: 200px;">
|
||||
Repairer Name
|
||||
</th>
|
||||
<td>
|
||||
@Html.EditorFor(m => m.Job.JobMetaNonWarranty.RepairerName)
|
||||
@AjaxHelpers.AjaxSave()
|
||||
@AjaxHelpers.AjaxLoader()
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
document.DiscoFunctions.PropertyChangeHelper(
|
||||
$('#Job_JobMetaNonWarranty_RepairerName'),
|
||||
'Unknown',
|
||||
'@Url.Action(MVC.API.Job.UpdateNonWarrantyRepairerName(Model.Job.Id, null))',
|
||||
'RepairerName'
|
||||
);
|
||||
});
|
||||
</script>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th style="width: 200px;">
|
||||
Repair Logged
|
||||
</th>
|
||||
<td>
|
||||
@Html.EditorFor(m => m.Job.JobMetaNonWarranty.RepairerLoggedDate)
|
||||
@AjaxHelpers.AjaxLoader()
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
var dateField = $('#Job_JobMetaNonWarranty_RepairerLoggedDate');
|
||||
document.DiscoFunctions.DateChangeHelper(
|
||||
dateField,
|
||||
'Unknown',
|
||||
'@(Url.Action(MVC.API.Job.UpdateNonWarrantyRepairerLoggedDate(Model.Job.Id, null)))',
|
||||
'RepairerLoggedDate',
|
||||
null
|
||||
);
|
||||
});
|
||||
</script>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th style="width: 200px;">
|
||||
Repair Reference
|
||||
</th>
|
||||
<td>
|
||||
@Html.EditorFor(m => m.Job.JobMetaNonWarranty.RepairerReference)
|
||||
@AjaxHelpers.AjaxSave()
|
||||
@AjaxHelpers.AjaxLoader()
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
document.DiscoFunctions.PropertyChangeHelper(
|
||||
$('#Job_JobMetaNonWarranty_RepairerReference'),
|
||||
'Unknown',
|
||||
'@Url.Action(MVC.API.Job.UpdateNonWarrantyRepairerReference(Model.Job.Id, null))',
|
||||
'RepairerReference'
|
||||
);
|
||||
});
|
||||
</script>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th style="width: 200px;">
|
||||
Repair Completed
|
||||
</th>
|
||||
<td>
|
||||
@Html.EditorFor(m => m.Job.JobMetaNonWarranty.RepairerCompletedDate)
|
||||
@AjaxHelpers.AjaxLoader()
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
var dateField = $('#Job_JobMetaNonWarranty_RepairerCompletedDate');
|
||||
document.DiscoFunctions.DateChangeHelper(
|
||||
dateField,
|
||||
'Unknown',
|
||||
'@(Url.Action(MVC.API.Job.UpdateNonWarrantyRepairerCompletedDate(Model.Job.Id, null)))',
|
||||
'RepairerCompletedDate',
|
||||
null
|
||||
);
|
||||
});
|
||||
</script>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@@ -0,0 +1,256 @@
|
||||
#pragma warning disable 1591
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.17929
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace Disco.Web.Views.Job.JobParts
|
||||
{
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Text;
|
||||
using System.Web;
|
||||
using System.Web.Helpers;
|
||||
using System.Web.Mvc;
|
||||
using System.Web.Mvc.Ajax;
|
||||
using System.Web.Mvc.Html;
|
||||
using System.Web.Routing;
|
||||
using System.Web.Security;
|
||||
using System.Web.UI;
|
||||
using System.Web.WebPages;
|
||||
using Disco.BI.Extensions;
|
||||
using Disco.Models.Repository;
|
||||
using Disco.Web;
|
||||
using Disco.Web.Extensions;
|
||||
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "1.5.0.0")]
|
||||
[System.Web.WebPages.PageVirtualPathAttribute("~/Views/Job/JobParts/Repairs.cshtml")]
|
||||
public class Repairs : System.Web.Mvc.WebViewPage<Disco.Web.Models.Job.ShowModel>
|
||||
{
|
||||
public Repairs()
|
||||
{
|
||||
}
|
||||
public override void Execute()
|
||||
{
|
||||
WriteLiteral("<table");
|
||||
|
||||
WriteLiteral(" id=\"jobNonWarrantyRepairs\"");
|
||||
|
||||
WriteLiteral(">\r\n <tr>\r\n <th");
|
||||
|
||||
WriteLiteral(" style=\"width: 200px;\"");
|
||||
|
||||
WriteLiteral(">\r\n Repairer Name\r\n </th>\r\n <td>\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 8 "..\..\Views\Job\JobParts\Repairs.cshtml"
|
||||
Write(Html.EditorFor(m => m.Job.JobMetaNonWarranty.RepairerName));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 9 "..\..\Views\Job\JobParts\Repairs.cshtml"
|
||||
Write(AjaxHelpers.AjaxSave());
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 10 "..\..\Views\Job\JobParts\Repairs.cshtml"
|
||||
Write(AjaxHelpers.AjaxLoader());
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n <script");
|
||||
|
||||
WriteLiteral(" type=\"text/javascript\"");
|
||||
|
||||
WriteLiteral(">\r\n $(function () {\r\n document.DiscoFunctions.P" +
|
||||
"ropertyChangeHelper(\r\n $(\'#Job_JobMetaNonWarranty_Rep" +
|
||||
"airerName\'),\r\n \'Unknown\',\r\n " +
|
||||
" \'");
|
||||
|
||||
|
||||
#line 16 "..\..\Views\Job\JobParts\Repairs.cshtml"
|
||||
Write(Url.Action(MVC.API.Job.UpdateNonWarrantyRepairerName(Model.Job.Id, null)));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\',\r\n \'RepairerName\'\r\n );\r\n " +
|
||||
" });\r\n </script>\r\n </td>\r\n </tr>\r\n <tr>\r\n " +
|
||||
" <th");
|
||||
|
||||
WriteLiteral(" style=\"width: 200px;\"");
|
||||
|
||||
WriteLiteral(">\r\n Repair Logged\r\n </th>\r\n <td>\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 28 "..\..\Views\Job\JobParts\Repairs.cshtml"
|
||||
Write(Html.EditorFor(m => m.Job.JobMetaNonWarranty.RepairerLoggedDate));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 29 "..\..\Views\Job\JobParts\Repairs.cshtml"
|
||||
Write(AjaxHelpers.AjaxLoader());
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n <script");
|
||||
|
||||
WriteLiteral(" type=\"text/javascript\"");
|
||||
|
||||
WriteLiteral(@">
|
||||
$(function () {
|
||||
var dateField = $('#Job_JobMetaNonWarranty_RepairerLoggedDate');
|
||||
document.DiscoFunctions.DateChangeHelper(
|
||||
dateField,
|
||||
'Unknown',
|
||||
'");
|
||||
|
||||
|
||||
#line 36 "..\..\Views\Job\JobParts\Repairs.cshtml"
|
||||
Write(Url.Action(MVC.API.Job.UpdateNonWarrantyRepairerLoggedDate(Model.Job.Id, null)));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\',\r\n \'RepairerLoggedDate\',\r\n null\r\n" +
|
||||
" );\r\n });\r\n </script>\r\n " +
|
||||
"</td>\r\n </tr>\r\n <tr>\r\n <th");
|
||||
|
||||
WriteLiteral(" style=\"width: 200px;\"");
|
||||
|
||||
WriteLiteral(">\r\n Repair Reference\r\n </th>\r\n <td>\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 49 "..\..\Views\Job\JobParts\Repairs.cshtml"
|
||||
Write(Html.EditorFor(m => m.Job.JobMetaNonWarranty.RepairerReference));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 50 "..\..\Views\Job\JobParts\Repairs.cshtml"
|
||||
Write(AjaxHelpers.AjaxSave());
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 51 "..\..\Views\Job\JobParts\Repairs.cshtml"
|
||||
Write(AjaxHelpers.AjaxLoader());
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n <script");
|
||||
|
||||
WriteLiteral(" type=\"text/javascript\"");
|
||||
|
||||
WriteLiteral(">\r\n $(function () {\r\n document.DiscoFunctions.P" +
|
||||
"ropertyChangeHelper(\r\n $(\'#Job_JobMetaNonWarranty_Rep" +
|
||||
"airerReference\'),\r\n \'Unknown\',\r\n " +
|
||||
" \'");
|
||||
|
||||
|
||||
#line 57 "..\..\Views\Job\JobParts\Repairs.cshtml"
|
||||
Write(Url.Action(MVC.API.Job.UpdateNonWarrantyRepairerReference(Model.Job.Id, null)));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\',\r\n \'RepairerReference\'\r\n );\r\n" +
|
||||
" });\r\n </script>\r\n </td>\r\n </tr>\r\n <tr>\r\n" +
|
||||
" <th");
|
||||
|
||||
WriteLiteral(" style=\"width: 200px;\"");
|
||||
|
||||
WriteLiteral(">\r\n Repair Completed\r\n </th>\r\n <td>\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 69 "..\..\Views\Job\JobParts\Repairs.cshtml"
|
||||
Write(Html.EditorFor(m => m.Job.JobMetaNonWarranty.RepairerCompletedDate));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 70 "..\..\Views\Job\JobParts\Repairs.cshtml"
|
||||
Write(AjaxHelpers.AjaxLoader());
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n <script");
|
||||
|
||||
WriteLiteral(" type=\"text/javascript\"");
|
||||
|
||||
WriteLiteral(@">
|
||||
$(function () {
|
||||
var dateField = $('#Job_JobMetaNonWarranty_RepairerCompletedDate');
|
||||
document.DiscoFunctions.DateChangeHelper(
|
||||
dateField,
|
||||
'Unknown',
|
||||
'");
|
||||
|
||||
|
||||
#line 77 "..\..\Views\Job\JobParts\Repairs.cshtml"
|
||||
Write(Url.Action(MVC.API.Job.UpdateNonWarrantyRepairerCompletedDate(Model.Job.Id, null)));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\',\r\n \'RepairerCompletedDate\',\r\n nul" +
|
||||
"l\r\n );\r\n });\r\n </script>\r\n " +
|
||||
" </td>\r\n </tr>\r\n</table>\r\n");
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
#pragma warning restore 1591
|
||||
@@ -0,0 +1,332 @@
|
||||
@model Disco.Web.Models.Job.ShowModel
|
||||
@{
|
||||
Html.BundleDeferred("~/Style/Shadowbox");
|
||||
Html.BundleDeferred("~/ClientScripts/Modules/Shadowbox");
|
||||
}
|
||||
<table id="jobShowResources">
|
||||
<tr>
|
||||
<td id="Comments">
|
||||
<div class="commentOutput">
|
||||
@foreach (var jl in Model.Job.JobLogs.OrderBy(m => m.Timestamp))
|
||||
{
|
||||
<div data-logid="@jl.Id">
|
||||
<span class="author">@jl.TechUser.ToString()</span><span class="remove"></span><span class="timestamp" title="@jl.Timestamp.ToFullDateTime()">@jl.Timestamp.ToFuzzy()</span>
|
||||
<span class="comment">@jl.Comments.ToMultilineJobRefString()</span>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
<div class="commentInput clearfix">
|
||||
<textarea class="commentInput" accesskey="l"></textarea>
|
||||
<span class="action post commentInputPost"></span>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
$Comments = $('#Comments');
|
||||
$CommentOutput = $Comments.find('.commentOutput');
|
||||
$CommentOutputContainer = $Comments.find('.commentOutputContainer');
|
||||
$CommentInput = $Comments.find('textarea.commentInput');
|
||||
|
||||
window.setTimeout(function () {
|
||||
$CommentOutput[0].scrollTop = $CommentOutput[0].scrollHeight; // Scroll to Bottom
|
||||
}, 0);
|
||||
$('#jobDetailTabs').on('tabsactivate', function (event, ui) {
|
||||
if (ui.newPanel && ui.newPanel.is('#jobDetailTab-Resources')) {
|
||||
$CommentOutput[0].scrollTop = $CommentOutput[0].scrollHeight; // Scroll to Bottom
|
||||
}
|
||||
});
|
||||
|
||||
$Comments.find('.commentInputPost').click(postComment);
|
||||
$CommentInput.keypress(function (e) {
|
||||
if (e.which == 13 && !e.shiftKey) {
|
||||
postComment();
|
||||
return false;
|
||||
}
|
||||
});
|
||||
$CommentOutput.find('span.remove').click(removePost);
|
||||
|
||||
$dialogRemoveLog = $('#dialogRemoveLog');
|
||||
$dialogRemoveLog.dialog({
|
||||
resizable: false,
|
||||
height: 140,
|
||||
modal: true,
|
||||
autoOpen: false
|
||||
});
|
||||
|
||||
function postComment() {
|
||||
var comment = $CommentInput.val();
|
||||
if (comment != '') {
|
||||
var data = { comment: comment }
|
||||
$.ajax({
|
||||
url: '@Url.Action(MVC.API.Job.CommentPost(Model.Job.Id, null))',
|
||||
dataType: 'json',
|
||||
data: data,
|
||||
success: function (d) {
|
||||
if (d.Result == 'OK') {
|
||||
addComment(d.Comment, false);
|
||||
$CommentInput.val('').attr('disabled', false).focus();
|
||||
} else {
|
||||
alert('Unable to post comment: ' + d.Result);
|
||||
$CommentInput.attr('disabled', false);
|
||||
}
|
||||
},
|
||||
error: function (jqXHR, textStatus, errorThrown) {
|
||||
alert('Unable to post comment: ' + textStatus);
|
||||
$CommentInput.attr('disabled', false);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
function removePost() {
|
||||
$this = $(this);
|
||||
var data = { id: $this.closest('div').attr('data-logid') };
|
||||
|
||||
$dialogRemoveLog.dialog("enable");
|
||||
$dialogRemoveLog.dialog('option', 'buttons', {
|
||||
"Remove": function () {
|
||||
$dialogRemoveLog.dialog("disable");
|
||||
$dialogRemoveLog.dialog("option", "buttons", null);
|
||||
$.ajax({
|
||||
url: '@Url.Action(MVC.API.Job.CommentRemove())',
|
||||
dataType: 'json',
|
||||
data: data,
|
||||
success: function (d) {
|
||||
if (d == 'OK') {
|
||||
$this.closest('div').slideUp(300).delay(300).queue(function () {
|
||||
$(this).remove();
|
||||
});
|
||||
} else {
|
||||
alert('Unable to remove comment: ' + d);
|
||||
}
|
||||
$dialogRemoveLog.dialog("close");
|
||||
},
|
||||
error: function (jqXHR, textStatus, errorThrown) {
|
||||
alert('Unable to remove comment: ' + textStatus);
|
||||
$dialogRemoveLog.dialog("close");
|
||||
}
|
||||
});
|
||||
},
|
||||
"Cancel": function () {
|
||||
$dialogRemoveLog.dialog("close");
|
||||
}
|
||||
});
|
||||
|
||||
$dialogRemoveLog.dialog('open');
|
||||
|
||||
return false;
|
||||
}
|
||||
function addComment(c, quick) {
|
||||
var e = $('<div><span class="author" /><span class="remove" /><span class="timestamp" /><span class="comment" /></div>');
|
||||
e.attr('data-logid', c.Id);
|
||||
e.find('.author').text(c.Author);
|
||||
e.find('.timestamp').text(c.TimestampFuzzy).attr('title', c.TimestampFull);
|
||||
e.find('.remove').click(removePost);
|
||||
var eComment = e.find('.comment').text(c.Comments);
|
||||
var commentHtml = eComment.text().replace(/\r\n|\r|\n/g, '<br />');
|
||||
commentHtml = commentHtml.replace(/\#(\d+)/g, '<a href="@Url.Action(MVC.Job.Show(null))?id=$1">#$1</a>');
|
||||
eComment.html(commentHtml);
|
||||
|
||||
$CommentOutput.append(e);
|
||||
|
||||
if (!quick) {
|
||||
e.animate({ backgroundColor: '#ffff99' }, 500, function () {
|
||||
e.animate({ backgroundColor: '#f4f4f4' }, 500);
|
||||
});
|
||||
$CommentOutput.animate({ scrollTop: $CommentOutput[0].scrollHeight }, 250)
|
||||
}
|
||||
}
|
||||
});
|
||||
</script>
|
||||
</td>
|
||||
<td id="Attachments">
|
||||
<div class="attachmentOutput">
|
||||
@foreach (var ja in Model.Job.JobAttachments)
|
||||
{
|
||||
<a href="@Url.Action(MVC.API.Job.AttachmentDownload(ja.Id))" data-attachmentid="@ja.Id" data-mimetype="@ja.MimeType">
|
||||
<span class="icon" title="@ja.Filename">
|
||||
<img alt="Attachment Thumbnail" src="@(Url.Action(MVC.API.Job.AttachmentThumbnail(ja.Id)))" /></span>
|
||||
<span class="comments" title="@ja.Comments">
|
||||
@{if (!string.IsNullOrEmpty(ja.DocumentTemplateId))
|
||||
{ @ja.DocumentTemplate.Description}
|
||||
else
|
||||
{ @ja.Comments }}
|
||||
</span><span class="author">@ja.TechUser.ToString()</span><span class="remove"></span><span class="timestamp" title="@ja.Timestamp.ToFullDateTime()">@ja.Timestamp.ToFuzzy()</span>
|
||||
</a>
|
||||
}
|
||||
</div>
|
||||
<div class="attachmentInput clearfix">
|
||||
<span class="action upload"></span><span class="action photo"></span>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
Shadowbox.init({
|
||||
skipSetup: true,
|
||||
modal: true
|
||||
});
|
||||
$(function () {
|
||||
if (!document.DiscoFunctions) {
|
||||
document.DiscoFunctions = {};
|
||||
}
|
||||
document.DiscoFunctions.addAttachment = addAttachment;
|
||||
|
||||
$Attachments = $('#Attachments');
|
||||
$attachmentOutput = $Attachments.find('.attachmentOutput');
|
||||
|
||||
$attachmentOutput.find('span.remove').click(removeAttachment);
|
||||
|
||||
$('#dialogUpload').dialog({
|
||||
autoOpen: false,
|
||||
draggable: false,
|
||||
modal: true,
|
||||
resizable: false,
|
||||
width: 860,
|
||||
height: 550,
|
||||
close: function () {
|
||||
silverlightUploadAttachment.content.Navigator.Navigate('/Hidden');
|
||||
}
|
||||
});
|
||||
|
||||
$('#dialogRemoveAttachment').dialog({
|
||||
resizable: false,
|
||||
height: 140,
|
||||
modal: true,
|
||||
autoOpen: false
|
||||
});
|
||||
|
||||
var onLoadNavigation = null;
|
||||
var isLoaded = null;
|
||||
Silverlight.createObject(
|
||||
'@(Links.ClientBin.Disco_Silverlight_AttachmentUpload_xap)',
|
||||
$('#silverlightHostUploadAttachment').get(0),
|
||||
'silverlightUploadAttachment',
|
||||
{ width: '840px', height: '500px', background: 'white', version: '4.0.60310.0' },
|
||||
{
|
||||
onLoad: function () {
|
||||
if (onLoadNavigation) {
|
||||
silverlightUploadAttachment.content.Navigator.Navigate(onLoadNavigation);
|
||||
isLoaded = true;
|
||||
}
|
||||
}
|
||||
},
|
||||
'UploadUrl=@(Url.Action(MVC.API.Job.AttachmentUpload(Model.Job.Id, null)))'
|
||||
);
|
||||
|
||||
$attachmentInput = $Attachments.find('.attachmentInput');
|
||||
$attachmentInput.find('.photo').click(function () {
|
||||
showDialog('/WebCam');
|
||||
});
|
||||
$attachmentInput.find('.upload').click(function () {
|
||||
showDialog('/File');
|
||||
});
|
||||
|
||||
silverlightUploadAttachment = $('#silverlightUploadAttachment').get(0);
|
||||
function showDialog(navigationPath) {
|
||||
$('#dialogUpload').dialog('open');
|
||||
if (isLoaded) {
|
||||
silverlightUploadAttachment.content.Navigator.Navigate(navigationPath);
|
||||
} else {
|
||||
onLoadNavigation = navigationPath;
|
||||
}
|
||||
};
|
||||
function addAttachment(id, quick) {
|
||||
var data = { id: id };
|
||||
$.ajax({
|
||||
url: '@Url.Action(MVC.API.Job.Attachment())',
|
||||
dataType: 'json',
|
||||
data: data,
|
||||
success: function (d) {
|
||||
if (d.Result == 'OK') {
|
||||
var a = d.Attachment;
|
||||
|
||||
var e = $('<a><span class="icon"><img alt="Attachment Thumbnail" /></span><span class="comments"></span><span class="author"></span><span class="remove"></span><span class="timestamp"></span></a>');
|
||||
|
||||
e.attr('data-attachmentid', a.Id).attr('data-mimetype', a.MimeType).attr('href', '@(Url.Action(MVC.API.Job.AttachmentDownload()))/' + a.Id);
|
||||
e.find('.icon img').attr('src', '@(Url.Action(MVC.API.Job.AttachmentThumbnail()))/' + a.Id);
|
||||
e.find('.comments').text(a.Comments);
|
||||
e.find('.author').text(a.Author);
|
||||
e.find('.timestamp').text(a.TimestampFuzzy).attr('title', a.TimestampFull);
|
||||
e.find('.remove').click(removeAttachment);
|
||||
if (!quick)
|
||||
e.hide();
|
||||
$attachmentOutput.append(e);
|
||||
if (!quick)
|
||||
e.show('slow');
|
||||
if (a.MimeType.toLowerCase().indexOf('image/') == 0)
|
||||
e.shadowbox({ gallery: 'attachments', player: 'img', title: a.Comments });
|
||||
} else {
|
||||
alert('Unable to add attachment: ' + d.Result);
|
||||
}
|
||||
},
|
||||
error: function (jqXHR, textStatus, errorThrown) {
|
||||
alert('Unable to add attachment: ' + textStatus);
|
||||
}
|
||||
});
|
||||
}
|
||||
function removeAttachment() {
|
||||
$this = $(this).closest('a');
|
||||
|
||||
var data = { id: $this.attr('data-attachmentid') };
|
||||
|
||||
var $dialogRemoveAttachment = $('#dialogRemoveAttachment');
|
||||
$dialogRemoveAttachment.dialog("enable");
|
||||
$dialogRemoveAttachment.dialog('option', 'buttons', {
|
||||
"Remove": function () {
|
||||
$dialogRemoveAttachment.dialog("disable");
|
||||
$dialogRemoveAttachment.dialog("option", "buttons", null);
|
||||
$.ajax({
|
||||
url: '@Url.Action(MVC.API.Job.AttachmentRemove())',
|
||||
dataType: 'json',
|
||||
data: data,
|
||||
success: function (d) {
|
||||
if (d == 'OK') {
|
||||
$this.hide(300).delay(300).queue(function () {
|
||||
var $this = $(this);
|
||||
if ($this.attr('data-mimetype').toLowerCase().indexOf('image/') == 0)
|
||||
Shadowbox.removeCache(this);
|
||||
$this.remove();
|
||||
});
|
||||
} else {
|
||||
alert('Unable to remove attachment: ' + d);
|
||||
}
|
||||
$dialogRemoveAttachment.dialog("close");
|
||||
},
|
||||
error: function (jqXHR, textStatus, errorThrown) {
|
||||
alert('Unable to remove attachment: ' + textStatus);
|
||||
$dialogRemoveAttachment.dialog("close");
|
||||
}
|
||||
});
|
||||
},
|
||||
"Cancel": function () {
|
||||
$dialogRemoveAttachment.dialog("close");
|
||||
}
|
||||
});
|
||||
|
||||
$dialogRemoveAttachment.dialog('open');
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
$attachmentOutput.children('a').each(function () {
|
||||
$this = $(this);
|
||||
if ($this.attr('data-mimetype').toLowerCase().indexOf('image/') == 0)
|
||||
$this.shadowbox({ gallery: 'attachments', player: 'img', title: $this.find('.comments').text() });
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<div id="dialogUpload" title="Upload Attachment">
|
||||
<div id="silverlightHostUploadAttachment">
|
||||
</div>
|
||||
</div>
|
||||
<div id="dialogRemoveLog" title="Remove this Comment?">
|
||||
<p>
|
||||
<span class="ui-icon ui-icon-alert" style="float: left; margin: 0 7px 20px 0;"></span>
|
||||
Are you sure?
|
||||
</p>
|
||||
</div>
|
||||
<div id="dialogRemoveAttachment" title="Remove this Attachment?">
|
||||
<p>
|
||||
<span class="ui-icon ui-icon-alert" style="float: left; margin: 0 7px 20px 0;"></span>
|
||||
Are you sure?
|
||||
</p>
|
||||
</div>
|
||||
@@ -0,0 +1,718 @@
|
||||
#pragma warning disable 1591
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.17929
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace Disco.Web.Views.Job.JobParts
|
||||
{
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Text;
|
||||
using System.Web;
|
||||
using System.Web.Helpers;
|
||||
using System.Web.Mvc;
|
||||
using System.Web.Mvc.Ajax;
|
||||
using System.Web.Mvc.Html;
|
||||
using System.Web.Routing;
|
||||
using System.Web.Security;
|
||||
using System.Web.UI;
|
||||
using System.Web.WebPages;
|
||||
using Disco.BI.Extensions;
|
||||
using Disco.Models.Repository;
|
||||
using Disco.Web;
|
||||
using Disco.Web.Extensions;
|
||||
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "1.5.0.0")]
|
||||
[System.Web.WebPages.PageVirtualPathAttribute("~/Views/Job/JobParts/Resources.cshtml")]
|
||||
public class Resources : System.Web.Mvc.WebViewPage<Disco.Web.Models.Job.ShowModel>
|
||||
{
|
||||
public Resources()
|
||||
{
|
||||
}
|
||||
public override void Execute()
|
||||
{
|
||||
|
||||
#line 2 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||
|
||||
Html.BundleDeferred("~/Style/Shadowbox");
|
||||
Html.BundleDeferred("~/ClientScripts/Modules/Shadowbox");
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n<table");
|
||||
|
||||
WriteLiteral(" id=\"jobShowResources\"");
|
||||
|
||||
WriteLiteral(">\r\n <tr>\r\n <td");
|
||||
|
||||
WriteLiteral(" id=\"Comments\"");
|
||||
|
||||
WriteLiteral(">\r\n <div");
|
||||
|
||||
WriteLiteral(" class=\"commentOutput\"");
|
||||
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
|
||||
#line 10 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 10 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||
foreach (var jl in Model.Job.JobLogs.OrderBy(m => m.Timestamp))
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <div");
|
||||
|
||||
WriteLiteral(" data-logid=\"");
|
||||
|
||||
|
||||
#line 12 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||
Write(jl.Id);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\"");
|
||||
|
||||
WriteLiteral(">\r\n <span");
|
||||
|
||||
WriteLiteral(" class=\"author\"");
|
||||
|
||||
WriteLiteral(">");
|
||||
|
||||
|
||||
#line 13 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||
Write(jl.TechUser.ToString());
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("</span><span");
|
||||
|
||||
WriteLiteral(" class=\"remove\"");
|
||||
|
||||
WriteLiteral("></span><span");
|
||||
|
||||
WriteLiteral(" class=\"timestamp\"");
|
||||
|
||||
WriteAttribute("title", Tuple.Create(" title=\"", 540), Tuple.Create("\"", 578)
|
||||
|
||||
#line 13 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 548), Tuple.Create<System.Object, System.Int32>(jl.Timestamp.ToFullDateTime()
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 548), false)
|
||||
);
|
||||
|
||||
WriteLiteral(">");
|
||||
|
||||
|
||||
#line 13 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||
Write(jl.Timestamp.ToFuzzy());
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("</span>\r\n <span");
|
||||
|
||||
WriteLiteral(" class=\"comment\"");
|
||||
|
||||
WriteLiteral(">");
|
||||
|
||||
|
||||
#line 14 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||
Write(jl.Comments.ToMultilineJobRefString());
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("</span>\r\n </div>\r\n");
|
||||
|
||||
|
||||
#line 16 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" </div>\r\n <div");
|
||||
|
||||
WriteLiteral(" class=\"commentInput clearfix\"");
|
||||
|
||||
WriteLiteral(">\r\n <textarea");
|
||||
|
||||
WriteLiteral(" class=\"commentInput\"");
|
||||
|
||||
WriteLiteral(" accesskey=\"l\"");
|
||||
|
||||
WriteLiteral("></textarea>\r\n <span");
|
||||
|
||||
WriteLiteral(" class=\"action post commentInputPost\"");
|
||||
|
||||
WriteLiteral("></span>\r\n </div>\r\n <script");
|
||||
|
||||
WriteLiteral(" type=\"text/javascript\"");
|
||||
|
||||
WriteLiteral(">\r\n $(function () {\r\n $Comments = $(\'#Comments\'" +
|
||||
");\r\n $CommentOutput = $Comments.find(\'.commentOutput\');\r\n " +
|
||||
" $CommentOutputContainer = $Comments.find(\'.commentOutputContaine" +
|
||||
"r\');\r\n $CommentInput = $Comments.find(\'textarea.commentInput\'" +
|
||||
");\r\n\r\n window.setTimeout(function () {\r\n " +
|
||||
" $CommentOutput[0].scrollTop = $CommentOutput[0].scrollHeight; // Scroll to Bo" +
|
||||
"ttom\r\n }, 0);\r\n $(\'#jobDetailTabs\').on(\'ta" +
|
||||
"bsactivate\', function (event, ui) {\r\n if (ui.newPanel && " +
|
||||
"ui.newPanel.is(\'#jobDetailTab-Resources\')) {\r\n $Comme" +
|
||||
"ntOutput[0].scrollTop = $CommentOutput[0].scrollHeight; // Scroll to Bottom\r\n " +
|
||||
" }\r\n });\r\n\r\n $Comments" +
|
||||
".find(\'.commentInputPost\').click(postComment);\r\n $CommentInpu" +
|
||||
"t.keypress(function (e) {\r\n if (e.which == 13 && !e.shift" +
|
||||
"Key) {\r\n postComment();\r\n " +
|
||||
"return false;\r\n }\r\n });\r\n " +
|
||||
" $CommentOutput.find(\'span.remove\').click(removePost);\r\n\r\n " +
|
||||
" $dialogRemoveLog = $(\'#dialogRemoveLog\');\r\n $dialogRemove" +
|
||||
"Log.dialog({\r\n resizable: false,\r\n " +
|
||||
" height: 140,\r\n modal: true,\r\n aut" +
|
||||
"oOpen: false\r\n });\r\n\r\n function postCommen" +
|
||||
"t() {\r\n var comment = $CommentInput.val();\r\n " +
|
||||
" if (comment != \'\') {\r\n var data = { commen" +
|
||||
"t: comment }\r\n $.ajax({\r\n " +
|
||||
" url: \'");
|
||||
|
||||
|
||||
#line 60 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||
Write(Url.Action(MVC.API.Job.CommentPost(Model.Job.Id, null)));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\',\r\n dataType: \'json\',\r\n " +
|
||||
" data: data,\r\n success: function (d) {\r\n " +
|
||||
" if (d.Result == \'OK\') {\r\n " +
|
||||
" addComment(d.Comment, false);\r\n " +
|
||||
" $CommentInput.val(\'\').attr(\'disabled\', false).focus();\r\n " +
|
||||
" } else {\r\n alert(\'Una" +
|
||||
"ble to post comment: \' + d.Result);\r\n $Co" +
|
||||
"mmentInput.attr(\'disabled\', false);\r\n }\r\n " +
|
||||
" },\r\n error: function " +
|
||||
"(jqXHR, textStatus, errorThrown) {\r\n alert(\'U" +
|
||||
"nable to post comment: \' + textStatus);\r\n $Co" +
|
||||
"mmentInput.attr(\'disabled\', false);\r\n }\r\n " +
|
||||
" });\r\n }\r\n }\r\n " +
|
||||
" function removePost() {\r\n $this = $(this);" +
|
||||
"\r\n var data = { id: $this.closest(\'div\').attr(\'data-logid" +
|
||||
"\') };\r\n\r\n $dialogRemoveLog.dialog(\"enable\");\r\n " +
|
||||
" $dialogRemoveLog.dialog(\'option\', \'buttons\', {\r\n " +
|
||||
" \"Remove\": function () {\r\n $dialogRemoveL" +
|
||||
"og.dialog(\"disable\");\r\n $dialogRemoveLog.dialog(\"" +
|
||||
"option\", \"buttons\", null);\r\n $.ajax({\r\n " +
|
||||
" url: \'");
|
||||
|
||||
|
||||
#line 89 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||
Write(Url.Action(MVC.API.Job.CommentRemove()));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\',\r\n dataType: \'json\',\r\n " +
|
||||
" data: data,\r\n success: function" +
|
||||
" (d) {\r\n if (d == \'OK\') {\r\n " +
|
||||
" $this.closest(\'div\').slideUp(300).delay(300).queue" +
|
||||
"(function () {\r\n $(this).remove()" +
|
||||
";\r\n });\r\n " +
|
||||
" } else {\r\n alert(\'Unable " +
|
||||
"to remove comment: \' + d);\r\n }\r\n " +
|
||||
" $dialogRemoveLog.dialog(\"close\");\r\n " +
|
||||
" },\r\n error: function (j" +
|
||||
"qXHR, textStatus, errorThrown) {\r\n alert(" +
|
||||
"\'Unable to remove comment: \' + textStatus);\r\n " +
|
||||
" $dialogRemoveLog.dialog(\"close\");\r\n }\r\n " +
|
||||
" });\r\n },\r\n " +
|
||||
" \"Cancel\": function () {\r\n $dialog" +
|
||||
"RemoveLog.dialog(\"close\");\r\n }\r\n " +
|
||||
" });\r\n\r\n $dialogRemoveLog.dialog(\'open\');\r\n\r\n " +
|
||||
" return false;\r\n }\r\n function" +
|
||||
" addComment(c, quick) {\r\n var e = $(\'<div><span class=\"au" +
|
||||
"thor\" /><span class=\"remove\" /><span class=\"timestamp\" /><span class=\"comment\" /" +
|
||||
"></div>\');\r\n e.attr(\'data-logid\', c.Id);\r\n " +
|
||||
" e.find(\'.author\').text(c.Author);\r\n e.find(\'.tim" +
|
||||
"estamp\').text(c.TimestampFuzzy).attr(\'title\', c.TimestampFull);\r\n " +
|
||||
" e.find(\'.remove\').click(removePost);\r\n var eComm" +
|
||||
"ent = e.find(\'.comment\').text(c.Comments);\r\n var commentH" +
|
||||
"tml = eComment.text().replace(/\\r\\n|\\r|\\n/g, \'<br />\');\r\n " +
|
||||
" commentHtml = commentHtml.replace(/\\#(\\d+)/g, \'<a href=\"");
|
||||
|
||||
|
||||
#line 125 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||
Write(Url.Action(MVC.Job.Show(null)));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(@"?id=$1"">#$1</a>');
|
||||
eComment.html(commentHtml);
|
||||
|
||||
$CommentOutput.append(e);
|
||||
|
||||
if (!quick) {
|
||||
e.animate({ backgroundColor: '#ffff99' }, 500, function () {
|
||||
e.animate({ backgroundColor: '#f4f4f4' }, 500);
|
||||
});
|
||||
$CommentOutput.animate({ scrollTop: $CommentOutput[0].scrollHeight }, 250)
|
||||
}
|
||||
}
|
||||
});
|
||||
</script>
|
||||
</td>
|
||||
<td");
|
||||
|
||||
WriteLiteral(" id=\"Attachments\"");
|
||||
|
||||
WriteLiteral(">\r\n <div");
|
||||
|
||||
WriteLiteral(" class=\"attachmentOutput\"");
|
||||
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
|
||||
#line 142 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 142 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||
foreach (var ja in Model.Job.JobAttachments)
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <a");
|
||||
|
||||
WriteAttribute("href", Tuple.Create(" href=\"", 7537), Tuple.Create("\"", 7594)
|
||||
|
||||
#line 144 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 7544), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.API.Job.AttachmentDownload(ja.Id))
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 7544), false)
|
||||
);
|
||||
|
||||
WriteLiteral(" data-attachmentid=\"");
|
||||
|
||||
|
||||
#line 144 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||
Write(ja.Id);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\"");
|
||||
|
||||
WriteLiteral(" data-mimetype=\"");
|
||||
|
||||
|
||||
#line 144 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||
Write(ja.MimeType);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\"");
|
||||
|
||||
WriteLiteral(">\r\n <span");
|
||||
|
||||
WriteLiteral(" class=\"icon\"");
|
||||
|
||||
WriteAttribute("title", Tuple.Create(" title=\"", 7696), Tuple.Create("\"", 7716)
|
||||
|
||||
#line 145 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 7704), Tuple.Create<System.Object, System.Int32>(ja.Filename
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 7704), false)
|
||||
);
|
||||
|
||||
WriteLiteral(">\r\n <img");
|
||||
|
||||
WriteLiteral(" alt=\"Attachment Thumbnail\"");
|
||||
|
||||
WriteAttribute("src", Tuple.Create(" src=\"", 7779), Tuple.Create("\"", 7838)
|
||||
|
||||
#line 146 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 7785), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.API.Job.AttachmentThumbnail(ja.Id))
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 7785), false)
|
||||
);
|
||||
|
||||
WriteLiteral(" /></span>\r\n <span");
|
||||
|
||||
WriteLiteral(" class=\"comments\"");
|
||||
|
||||
WriteAttribute("title", Tuple.Create(" title=\"", 7897), Tuple.Create("\"", 7917)
|
||||
|
||||
#line 147 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 7905), Tuple.Create<System.Object, System.Int32>(ja.Comments
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 7905), false)
|
||||
);
|
||||
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
|
||||
#line 148 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 148 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||
if (!string.IsNullOrEmpty(ja.DocumentTemplateId))
|
||||
{
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 149 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||
Write(ja.DocumentTemplate.Description);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 149 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 151 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||
Write(ja.Comments);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 151 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||
}
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n </span><span");
|
||||
|
||||
WriteLiteral(" class=\"author\"");
|
||||
|
||||
WriteLiteral(">");
|
||||
|
||||
|
||||
#line 152 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||
Write(ja.TechUser.ToString());
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("</span><span");
|
||||
|
||||
WriteLiteral(" class=\"remove\"");
|
||||
|
||||
WriteLiteral("></span><span");
|
||||
|
||||
WriteLiteral(" class=\"timestamp\"");
|
||||
|
||||
WriteAttribute("title", Tuple.Create(" title=\"", 8287), Tuple.Create("\"", 8325)
|
||||
|
||||
#line 152 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 8295), Tuple.Create<System.Object, System.Int32>(ja.Timestamp.ToFullDateTime()
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 8295), false)
|
||||
);
|
||||
|
||||
WriteLiteral(">");
|
||||
|
||||
|
||||
#line 152 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||
Write(ja.Timestamp.ToFuzzy());
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("</span>\r\n </a> \r\n");
|
||||
|
||||
|
||||
#line 154 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" </div>\r\n <div");
|
||||
|
||||
WriteLiteral(" class=\"attachmentInput clearfix\"");
|
||||
|
||||
WriteLiteral(">\r\n <span");
|
||||
|
||||
WriteLiteral(" class=\"action upload\"");
|
||||
|
||||
WriteLiteral("></span><span");
|
||||
|
||||
WriteLiteral(" class=\"action photo\"");
|
||||
|
||||
WriteLiteral("></span>\r\n </div>\r\n <script");
|
||||
|
||||
WriteLiteral(" type=\"text/javascript\"");
|
||||
|
||||
WriteLiteral(@">
|
||||
Shadowbox.init({
|
||||
skipSetup: true,
|
||||
modal: true
|
||||
});
|
||||
$(function () {
|
||||
if (!document.DiscoFunctions) {
|
||||
document.DiscoFunctions = {};
|
||||
}
|
||||
document.DiscoFunctions.addAttachment = addAttachment;
|
||||
|
||||
$Attachments = $('#Attachments');
|
||||
$attachmentOutput = $Attachments.find('.attachmentOutput');
|
||||
|
||||
$attachmentOutput.find('span.remove').click(removeAttachment);
|
||||
|
||||
$('#dialogUpload').dialog({
|
||||
autoOpen: false,
|
||||
draggable: false,
|
||||
modal: true,
|
||||
resizable: false,
|
||||
width: 860,
|
||||
height: 550,
|
||||
close: function () {
|
||||
silverlightUploadAttachment.content.Navigator.Navigate('/Hidden');
|
||||
}
|
||||
});
|
||||
|
||||
$('#dialogRemoveAttachment').dialog({
|
||||
resizable: false,
|
||||
height: 140,
|
||||
modal: true,
|
||||
autoOpen: false
|
||||
});
|
||||
|
||||
var onLoadNavigation = null;
|
||||
var isLoaded = null;
|
||||
Silverlight.createObject(
|
||||
'");
|
||||
|
||||
|
||||
#line 197 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||
Write(Links.ClientBin.Disco_Silverlight_AttachmentUpload_xap);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(@"',
|
||||
$('#silverlightHostUploadAttachment').get(0),
|
||||
'silverlightUploadAttachment',
|
||||
{ width: '840px', height: '500px', background: 'white', version: '4.0.60310.0' },
|
||||
{
|
||||
onLoad: function () {
|
||||
if (onLoadNavigation) {
|
||||
silverlightUploadAttachment.content.Navigator.Navigate(onLoadNavigation);
|
||||
isLoaded = true;
|
||||
}
|
||||
}
|
||||
},
|
||||
'UploadUrl=");
|
||||
|
||||
|
||||
#line 209 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||
Write(Url.Action(MVC.API.Job.AttachmentUpload(Model.Job.Id, null)));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(@"'
|
||||
);
|
||||
|
||||
$attachmentInput = $Attachments.find('.attachmentInput');
|
||||
$attachmentInput.find('.photo').click(function () {
|
||||
showDialog('/WebCam');
|
||||
});
|
||||
$attachmentInput.find('.upload').click(function () {
|
||||
showDialog('/File');
|
||||
});
|
||||
|
||||
silverlightUploadAttachment = $('#silverlightUploadAttachment').get(0);
|
||||
function showDialog(navigationPath) {
|
||||
$('#dialogUpload').dialog('open');
|
||||
if (isLoaded) {
|
||||
silverlightUploadAttachment.content.Navigator.Navigate(navigationPath);
|
||||
} else {
|
||||
onLoadNavigation = navigationPath;
|
||||
}
|
||||
};
|
||||
function addAttachment(id, quick) {
|
||||
var data = { id: id };
|
||||
$.ajax({
|
||||
url: '");
|
||||
|
||||
|
||||
#line 232 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||
Write(Url.Action(MVC.API.Job.Attachment()));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(@"',
|
||||
dataType: 'json',
|
||||
data: data,
|
||||
success: function (d) {
|
||||
if (d.Result == 'OK') {
|
||||
var a = d.Attachment;
|
||||
|
||||
var e = $('<a><span class=""icon""><img alt=""Attachment Thumbnail"" /></span><span class=""comments""></span><span class=""author""></span><span class=""remove""></span><span class=""timestamp""></span></a>');
|
||||
|
||||
e.attr('data-attachmentid', a.Id).attr('data-mimetype', a.MimeType).attr('href', '");
|
||||
|
||||
|
||||
#line 241 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||
Write(Url.Action(MVC.API.Job.AttachmentDownload()));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("/\' + a.Id);\r\n e.find(\'.icon img\').attr(\'src\', " +
|
||||
"\'");
|
||||
|
||||
|
||||
#line 242 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||
Write(Url.Action(MVC.API.Job.AttachmentThumbnail()));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("/\' + a.Id);\r\n e.find(\'.comments\').text(a.Comme" +
|
||||
"nts);\r\n e.find(\'.author\').text(a.Author);\r\n " +
|
||||
" e.find(\'.timestamp\').text(a.TimestampFuzzy).at" +
|
||||
"tr(\'title\', a.TimestampFull);\r\n e.find(\'.remo" +
|
||||
"ve\').click(removeAttachment);\r\n if (!quick)\r\n" +
|
||||
" e.hide();\r\n " +
|
||||
" $attachmentOutput.append(e);\r\n if (!qu" +
|
||||
"ick)\r\n e.show(\'slow\');\r\n " +
|
||||
" if (a.MimeType.toLowerCase().indexOf(\'image/\') == 0)\r\n " +
|
||||
" e.shadowbox({ gallery: \'attachments\', player: \'" +
|
||||
"img\', title: a.Comments });\r\n } else {\r\n " +
|
||||
" alert(\'Unable to add attachment: \' + d.Result);\r\n " +
|
||||
" }\r\n },\r\n " +
|
||||
" error: function (jqXHR, textStatus, errorThrown) {\r\n " +
|
||||
" alert(\'Unable to add attachment: \' + textStatus);\r\n " +
|
||||
" }\r\n });\r\n }\r\n " +
|
||||
" function removeAttachment() {\r\n $this = $(this)." +
|
||||
"closest(\'a\');\r\n\r\n var data = { id: $this.attr(\'data-attac" +
|
||||
"hmentid\') };\r\n\r\n var $dialogRemoveAttachment = $(\'#dialog" +
|
||||
"RemoveAttachment\');\r\n $dialogRemoveAttachment.dialog(\"ena" +
|
||||
"ble\");\r\n $dialogRemoveAttachment.dialog(\'option\', \'button" +
|
||||
"s\', {\r\n \"Remove\": function () {\r\n " +
|
||||
" $dialogRemoveAttachment.dialog(\"disable\");\r\n " +
|
||||
" $dialogRemoveAttachment.dialog(\"option\", \"buttons\", null);\r\n " +
|
||||
" $.ajax({\r\n url: \'");
|
||||
|
||||
|
||||
#line 275 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||
Write(Url.Action(MVC.API.Job.AttachmentRemove()));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\',\r\n dataType: \'json\',\r\n " +
|
||||
" data: data,\r\n success: function" +
|
||||
" (d) {\r\n if (d == \'OK\') {\r\n " +
|
||||
" $this.hide(300).delay(300).queue(function () {\r\n " +
|
||||
" var $this = $(this);\r\n " +
|
||||
" if ($this.attr(\'data-mimetype\').toLowerCase(" +
|
||||
").indexOf(\'image/\') == 0)\r\n S" +
|
||||
"hadowbox.removeCache(this);\r\n $th" +
|
||||
"is.remove();\r\n });\r\n " +
|
||||
" } else {\r\n ale" +
|
||||
"rt(\'Unable to remove attachment: \' + d);\r\n " +
|
||||
" }\r\n $dialogRemoveAttachment.dialog(\"clo" +
|
||||
"se\");\r\n },\r\n " +
|
||||
" error: function (jqXHR, textStatus, errorThrown) {\r\n " +
|
||||
" alert(\'Unable to remove attachment: \' + textStatus);\r\n " +
|
||||
" $dialogRemoveAttachment.dialog(\"close\");\r\n " +
|
||||
" }\r\n });\r\n " +
|
||||
" },\r\n \"Cancel\": function () {\r\n " +
|
||||
" $dialogRemoveAttachment.dialog(\"close\");\r\n " +
|
||||
" }\r\n });\r\n\r\n $dialogR" +
|
||||
"emoveAttachment.dialog(\'open\');\r\n\r\n return false;\r\n " +
|
||||
" }\r\n\r\n $attachmentOutput.children(\'a\').each(func" +
|
||||
"tion () {\r\n $this = $(this);\r\n if " +
|
||||
"($this.attr(\'data-mimetype\').toLowerCase().indexOf(\'image/\') == 0)\r\n " +
|
||||
" $this.shadowbox({ gallery: \'attachments\', player: \'img\', title: " +
|
||||
"$this.find(\'.comments\').text() });\r\n });\r\n });" +
|
||||
"\r\n </script>\r\n </td>\r\n </tr>\r\n</table>\r\n<div");
|
||||
|
||||
WriteLiteral(" id=\"dialogUpload\"");
|
||||
|
||||
WriteLiteral(" title=\"Upload Attachment\"");
|
||||
|
||||
WriteLiteral(">\r\n <div");
|
||||
|
||||
WriteLiteral(" id=\"silverlightHostUploadAttachment\"");
|
||||
|
||||
WriteLiteral(">\r\n </div>\r\n</div>\r\n<div");
|
||||
|
||||
WriteLiteral(" id=\"dialogRemoveLog\"");
|
||||
|
||||
WriteLiteral(" title=\"Remove this Comment?\"");
|
||||
|
||||
WriteLiteral(">\r\n <p>\r\n <span");
|
||||
|
||||
WriteLiteral(" class=\"ui-icon ui-icon-alert\"");
|
||||
|
||||
WriteLiteral(" style=\"float: left; margin: 0 7px 20px 0;\"");
|
||||
|
||||
WriteLiteral("></span>\r\n Are you sure?\r\n </p>\r\n</div>\r\n<div");
|
||||
|
||||
WriteLiteral(" id=\"dialogRemoveAttachment\"");
|
||||
|
||||
WriteLiteral(" title=\"Remove this Attachment?\"");
|
||||
|
||||
WriteLiteral(">\r\n <p>\r\n <span");
|
||||
|
||||
WriteLiteral(" class=\"ui-icon ui-icon-alert\"");
|
||||
|
||||
WriteLiteral(" style=\"float: left; margin: 0 7px 20px 0;\"");
|
||||
|
||||
WriteLiteral("></span>\r\n Are you sure?\r\n </p>\r\n</div>\r\n");
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
#pragma warning restore 1591
|
||||
@@ -0,0 +1,127 @@
|
||||
@model Disco.Web.Models.Job.ShowModel
|
||||
<div id="jobDetailTab-Warranty" class="jobPart">
|
||||
<table id="jobNonWarrantyFinance">
|
||||
<tr>
|
||||
<th style="width: 200px;">
|
||||
Warranty Provider
|
||||
</th>
|
||||
<td>
|
||||
@Html.EditorFor(m => m.Job.JobMetaWarranty.ExternalName)
|
||||
@AjaxHelpers.AjaxSave()
|
||||
@AjaxHelpers.AjaxLoader()
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
document.DiscoFunctions.PropertyChangeHelper(
|
||||
$('#Job_JobMetaWarranty_ExternalName'),
|
||||
'Unknown',
|
||||
'@Url.Action(MVC.API.Job.UpdateWarrantyExternalName(Model.Job.Id, null))',
|
||||
'ExternalName'
|
||||
);
|
||||
});
|
||||
</script>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th style="width: 200px;">
|
||||
Warranty Logged
|
||||
</th>
|
||||
<td>
|
||||
@Html.EditorFor(m => m.Job.JobMetaWarranty.ExternalLoggedDate)
|
||||
@AjaxHelpers.AjaxLoader()
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
var dateField = $('#Job_JobMetaWarranty_ExternalLoggedDate');
|
||||
document.DiscoFunctions.DateChangeHelper(
|
||||
dateField,
|
||||
'Unknown',
|
||||
'@(Url.Action(MVC.API.Job.UpdateWarrantyExternalLoggedDate(Model.Job.Id, null)))',
|
||||
'ExternalLoggedDate',
|
||||
null
|
||||
);
|
||||
});
|
||||
</script>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th style="width: 200px;">
|
||||
Warranty Reference
|
||||
</th>
|
||||
<td>
|
||||
@Html.EditorFor(m => m.Job.JobMetaWarranty.ExternalReference)
|
||||
@AjaxHelpers.AjaxSave()
|
||||
@AjaxHelpers.AjaxLoader()
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
document.DiscoFunctions.PropertyChangeHelper(
|
||||
$('#Job_JobMetaWarranty_ExternalReference'),
|
||||
'Unknown',
|
||||
'@Url.Action(MVC.API.Job.UpdateWarrantyExternalReference(Model.Job.Id, null))',
|
||||
'ExternalReference'
|
||||
);
|
||||
});
|
||||
</script>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th style="width: 200px;">
|
||||
Warranty Completed
|
||||
</th>
|
||||
<td>
|
||||
@Html.EditorFor(m => m.Job.JobMetaWarranty.ExternalCompletedDate)
|
||||
@AjaxHelpers.AjaxLoader()
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
var dateField = $('#Job_JobMetaWarranty_ExternalCompletedDate');
|
||||
document.DiscoFunctions.DateChangeHelper(
|
||||
dateField,
|
||||
'Unknown',
|
||||
'@(Url.Action(MVC.API.Job.UpdateWarrantyExternalCompletedDate(Model.Job.Id, null)))',
|
||||
'ExternalCompletedDate',
|
||||
null
|
||||
);
|
||||
});
|
||||
</script>
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="jobWarrantyProviderDetailContainer" style="display: none">
|
||||
<th style="width: 200px;">
|
||||
Provider Details
|
||||
</th>
|
||||
<td>
|
||||
<div id="jobWarrantyProviderDetailLoading">
|
||||
<span class="ajaxHelperIcon ajaxLoading" title="Loading..."></span> Loading...
|
||||
</div>
|
||||
<div id="jobWarrantyProviderDetailHost" class="clearfix" style="display: none">
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
$('#jobDetailTabItems').append('<li><a href="#jobDetailTab-Warranty">Warranty</a></li>');
|
||||
$(function () {
|
||||
var warrantyProviderDetailLoaded = false;
|
||||
|
||||
$('#jobDetailTabs').bind('tabsshow', function (e, ui) {
|
||||
if ($(ui.panel).is('#jobDetailTab-Warranty')) {
|
||||
if (!warrantyProviderDetailLoaded) {
|
||||
var warrantyExternalName = $('#Job_JobMetaWarranty_ExternalName').val();
|
||||
if (warrantyExternalName) {
|
||||
$('#jobWarrantyProviderDetailContainer').show();
|
||||
$('#jobWarrantyProviderDetailLoading span').show();
|
||||
$('#jobWarrantyProviderDetailHost').load(
|
||||
'@(Url.Action(MVC.Job.WarrantyProviderJobDetails()))',
|
||||
{ id: '@(Model.Job.Id)' },
|
||||
function () {
|
||||
$('#jobWarrantyProviderDetailLoading').hide();
|
||||
$(this).slideDown();
|
||||
}
|
||||
);
|
||||
|
||||
warrantyProviderDetailLoaded = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@@ -0,0 +1,341 @@
|
||||
#pragma warning disable 1591
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.17929
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace Disco.Web.Views.Job.JobParts
|
||||
{
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Text;
|
||||
using System.Web;
|
||||
using System.Web.Helpers;
|
||||
using System.Web.Mvc;
|
||||
using System.Web.Mvc.Ajax;
|
||||
using System.Web.Mvc.Html;
|
||||
using System.Web.Routing;
|
||||
using System.Web.Security;
|
||||
using System.Web.UI;
|
||||
using System.Web.WebPages;
|
||||
using Disco.BI.Extensions;
|
||||
using Disco.Models.Repository;
|
||||
using Disco.Web;
|
||||
using Disco.Web.Extensions;
|
||||
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "1.5.0.0")]
|
||||
[System.Web.WebPages.PageVirtualPathAttribute("~/Views/Job/JobParts/Warranty.cshtml")]
|
||||
public class Warranty : System.Web.Mvc.WebViewPage<Disco.Web.Models.Job.ShowModel>
|
||||
{
|
||||
public Warranty()
|
||||
{
|
||||
}
|
||||
public override void Execute()
|
||||
{
|
||||
WriteLiteral("<div");
|
||||
|
||||
WriteLiteral(" id=\"jobDetailTab-Warranty\"");
|
||||
|
||||
WriteLiteral(" class=\"jobPart\"");
|
||||
|
||||
WriteLiteral(">\r\n <table");
|
||||
|
||||
WriteLiteral(" id=\"jobNonWarrantyFinance\"");
|
||||
|
||||
WriteLiteral(">\r\n <tr>\r\n <th");
|
||||
|
||||
WriteLiteral(" style=\"width: 200px;\"");
|
||||
|
||||
WriteLiteral(">\r\n Warranty Provider\r\n </th>\r\n <td>\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 9 "..\..\Views\Job\JobParts\Warranty.cshtml"
|
||||
Write(Html.EditorFor(m => m.Job.JobMetaWarranty.ExternalName));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 10 "..\..\Views\Job\JobParts\Warranty.cshtml"
|
||||
Write(AjaxHelpers.AjaxSave());
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 11 "..\..\Views\Job\JobParts\Warranty.cshtml"
|
||||
Write(AjaxHelpers.AjaxLoader());
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n <script");
|
||||
|
||||
WriteLiteral(" type=\"text/javascript\"");
|
||||
|
||||
WriteLiteral(">\r\n $(function () {\r\n document.DiscoFun" +
|
||||
"ctions.PropertyChangeHelper(\r\n $(\'#Job_JobMetaWarrant" +
|
||||
"y_ExternalName\'),\r\n \'Unknown\',\r\n " +
|
||||
" \'");
|
||||
|
||||
|
||||
#line 17 "..\..\Views\Job\JobParts\Warranty.cshtml"
|
||||
Write(Url.Action(MVC.API.Job.UpdateWarrantyExternalName(Model.Job.Id, null)));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\',\r\n \'ExternalName\'\r\n );\r\n " +
|
||||
" });\r\n </script>\r\n </td>\r\n </tr>\r" +
|
||||
"\n <tr>\r\n <th");
|
||||
|
||||
WriteLiteral(" style=\"width: 200px;\"");
|
||||
|
||||
WriteLiteral(">\r\n Warranty Logged\r\n </th>\r\n <td>\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 29 "..\..\Views\Job\JobParts\Warranty.cshtml"
|
||||
Write(Html.EditorFor(m => m.Job.JobMetaWarranty.ExternalLoggedDate));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 30 "..\..\Views\Job\JobParts\Warranty.cshtml"
|
||||
Write(AjaxHelpers.AjaxLoader());
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n <script");
|
||||
|
||||
WriteLiteral(" type=\"text/javascript\"");
|
||||
|
||||
WriteLiteral(@">
|
||||
$(function () {
|
||||
var dateField = $('#Job_JobMetaWarranty_ExternalLoggedDate');
|
||||
document.DiscoFunctions.DateChangeHelper(
|
||||
dateField,
|
||||
'Unknown',
|
||||
'");
|
||||
|
||||
|
||||
#line 37 "..\..\Views\Job\JobParts\Warranty.cshtml"
|
||||
Write(Url.Action(MVC.API.Job.UpdateWarrantyExternalLoggedDate(Model.Job.Id, null)));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\',\r\n \'ExternalLoggedDate\',\r\n null\r\n" +
|
||||
" );\r\n });\r\n </script>\r\n" +
|
||||
" </td>\r\n </tr>\r\n <tr>\r\n <th");
|
||||
|
||||
WriteLiteral(" style=\"width: 200px;\"");
|
||||
|
||||
WriteLiteral(">\r\n Warranty Reference\r\n </th>\r\n <td>\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 50 "..\..\Views\Job\JobParts\Warranty.cshtml"
|
||||
Write(Html.EditorFor(m => m.Job.JobMetaWarranty.ExternalReference));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 51 "..\..\Views\Job\JobParts\Warranty.cshtml"
|
||||
Write(AjaxHelpers.AjaxSave());
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 52 "..\..\Views\Job\JobParts\Warranty.cshtml"
|
||||
Write(AjaxHelpers.AjaxLoader());
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n <script");
|
||||
|
||||
WriteLiteral(" type=\"text/javascript\"");
|
||||
|
||||
WriteLiteral(">\r\n $(function () {\r\n document.DiscoFun" +
|
||||
"ctions.PropertyChangeHelper(\r\n $(\'#Job_JobMetaWarrant" +
|
||||
"y_ExternalReference\'),\r\n \'Unknown\',\r\n " +
|
||||
" \'");
|
||||
|
||||
|
||||
#line 58 "..\..\Views\Job\JobParts\Warranty.cshtml"
|
||||
Write(Url.Action(MVC.API.Job.UpdateWarrantyExternalReference(Model.Job.Id, null)));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\',\r\n \'ExternalReference\'\r\n );\r\n" +
|
||||
" });\r\n </script>\r\n </td>\r\n <" +
|
||||
"/tr>\r\n <tr>\r\n <th");
|
||||
|
||||
WriteLiteral(" style=\"width: 200px;\"");
|
||||
|
||||
WriteLiteral(">\r\n Warranty Completed\r\n </th>\r\n <td>\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 70 "..\..\Views\Job\JobParts\Warranty.cshtml"
|
||||
Write(Html.EditorFor(m => m.Job.JobMetaWarranty.ExternalCompletedDate));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 71 "..\..\Views\Job\JobParts\Warranty.cshtml"
|
||||
Write(AjaxHelpers.AjaxLoader());
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n <script");
|
||||
|
||||
WriteLiteral(" type=\"text/javascript\"");
|
||||
|
||||
WriteLiteral(@">
|
||||
$(function () {
|
||||
var dateField = $('#Job_JobMetaWarranty_ExternalCompletedDate');
|
||||
document.DiscoFunctions.DateChangeHelper(
|
||||
dateField,
|
||||
'Unknown',
|
||||
'");
|
||||
|
||||
|
||||
#line 78 "..\..\Views\Job\JobParts\Warranty.cshtml"
|
||||
Write(Url.Action(MVC.API.Job.UpdateWarrantyExternalCompletedDate(Model.Job.Id, null)));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\',\r\n \'ExternalCompletedDate\',\r\n nul" +
|
||||
"l\r\n );\r\n });\r\n </script" +
|
||||
">\r\n </td>\r\n </tr>\r\n <tr");
|
||||
|
||||
WriteLiteral(" id=\"jobWarrantyProviderDetailContainer\"");
|
||||
|
||||
WriteLiteral(" style=\"display: none\"");
|
||||
|
||||
WriteLiteral(">\r\n <th");
|
||||
|
||||
WriteLiteral(" style=\"width: 200px;\"");
|
||||
|
||||
WriteLiteral(">\r\n Provider Details\r\n </th>\r\n <td>\r\n " +
|
||||
" <div");
|
||||
|
||||
WriteLiteral(" id=\"jobWarrantyProviderDetailLoading\"");
|
||||
|
||||
WriteLiteral(">\r\n <span");
|
||||
|
||||
WriteLiteral(" class=\"ajaxHelperIcon ajaxLoading\"");
|
||||
|
||||
WriteLiteral(" title=\"Loading...\"");
|
||||
|
||||
WriteLiteral("></span> Loading...\r\n </div>\r\n <div");
|
||||
|
||||
WriteLiteral(" id=\"jobWarrantyProviderDetailHost\"");
|
||||
|
||||
WriteLiteral(" class=\"clearfix\"");
|
||||
|
||||
WriteLiteral(" style=\"display: none\"");
|
||||
|
||||
WriteLiteral(">\r\n </div>\r\n </td>\r\n </tr>\r\n </table>\r\n</div>" +
|
||||
"\r\n<script");
|
||||
|
||||
WriteLiteral(" type=\"text/javascript\"");
|
||||
|
||||
WriteLiteral(@">
|
||||
$('#jobDetailTabItems').append('<li><a href=""#jobDetailTab-Warranty"">Warranty</a></li>');
|
||||
$(function () {
|
||||
var warrantyProviderDetailLoaded = false;
|
||||
|
||||
$('#jobDetailTabs').bind('tabsshow', function (e, ui) {
|
||||
if ($(ui.panel).is('#jobDetailTab-Warranty')) {
|
||||
if (!warrantyProviderDetailLoaded) {
|
||||
var warrantyExternalName = $('#Job_JobMetaWarranty_ExternalName').val();
|
||||
if (warrantyExternalName) {
|
||||
$('#jobWarrantyProviderDetailContainer').show();
|
||||
$('#jobWarrantyProviderDetailLoading span').show();
|
||||
$('#jobWarrantyProviderDetailHost').load(
|
||||
'");
|
||||
|
||||
|
||||
#line 113 "..\..\Views\Job\JobParts\Warranty.cshtml"
|
||||
Write(Url.Action(MVC.Job.WarrantyProviderJobDetails()));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\',\r\n { id: \'");
|
||||
|
||||
|
||||
#line 114 "..\..\Views\Job\JobParts\Warranty.cshtml"
|
||||
Write(Model.Job.Id);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(@"' },
|
||||
function () {
|
||||
$('#jobWarrantyProviderDetailLoading').hide();
|
||||
$(this).slideDown();
|
||||
}
|
||||
);
|
||||
|
||||
warrantyProviderDetailLoaded = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
");
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
#pragma warning restore 1591
|
||||
@@ -0,0 +1,715 @@
|
||||
@model Disco.Web.Models.Job.ShowModel
|
||||
|
||||
<table id="Job_Show_Subjects">
|
||||
<tr>
|
||||
<td id="Job_Show_Job">
|
||||
<div>
|
||||
<div id="Job_Show_Job_Dates">
|
||||
<table class="none">
|
||||
<tr>
|
||||
<td>Opened:
|
||||
</td>
|
||||
<td><span id="Job_Show_Job_Dates_Opened">@CommonHelpers.FriendlyDateAndTitleUser(Model.Job.OpenedDate, Model.Job.OpenedTechUser)</span></td>
|
||||
</tr>
|
||||
@if (!Model.Job.ClosedDate.HasValue || Model.Job.ExpectedClosedDate.HasValue)
|
||||
{
|
||||
<tr>
|
||||
<td>
|
||||
<span title="Expected to Close">Expected:</span>
|
||||
</td>
|
||||
<td>@Html.TextBoxFor(m => m.Job.ExpectedClosedDate, new { @class = "small discreet" }) @AjaxHelpers.AjaxSave() @AjaxHelpers.AjaxLoader()
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
var $ajaxSave = $('#Job_ExpectedClosedDate').next('.ajaxSave');
|
||||
var dateFieldChangeToken = null;
|
||||
var dateFieldValue = $('#Job_ExpectedClosedDate').val();
|
||||
$('#Job_ExpectedClosedDate')
|
||||
.watermark('Unknown')
|
||||
.datetimepicker({
|
||||
ampm: true,
|
||||
stepMinute: 1,
|
||||
hour: 9,
|
||||
minDate: @(Model.Job.OpenedDate.ToJavascriptDate()),
|
||||
changeYear: true,
|
||||
changeMonth: true,
|
||||
dateFormat: 'yy/mm/dd'
|
||||
}).change(function () {
|
||||
var $this = $(this);
|
||||
var dateText = $this.val();
|
||||
if (dateFieldValue.toLowerCase() != dateText.toLowerCase()) {
|
||||
dateFieldValue = dateText;
|
||||
if (dateFieldChangeToken)
|
||||
window.clearTimeout(dateFieldChangeToken);
|
||||
dateFieldChangeToken = window.setTimeout(function () {
|
||||
$ajaxSave.hide();
|
||||
var $ajaxLoading = $ajaxSave.next('.ajaxLoading').show();
|
||||
var data = { ExpectedClosedDate: dateText };
|
||||
$.getJSON('@(Url.Action(MVC.API.Job.UpdateExpectedClosedDate(Model.Job.Id, null)))', data, function (response, result) {
|
||||
if (result != 'success' || response != 'OK') {
|
||||
alert('Unable to change Expected Closed Date:\n' + response);
|
||||
$ajaxLoading.hide();
|
||||
} else {
|
||||
$ajaxLoading.hide().next('.ajaxOk').show().delay('fast').fadeOut('slow');
|
||||
}
|
||||
})
|
||||
dateFieldChangeToken = null;
|
||||
}, 750);
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
@if (Model.Job.ClosedDate.HasValue)
|
||||
{
|
||||
<tr>
|
||||
<td>Closed:
|
||||
</td>
|
||||
<td><span id="Job_Show_Job_Dates_Closed">@CommonHelpers.FriendlyDateAndTitleUser(Model.Job.ClosedDate, Model.Job.ClosedTechUser)</span></td>
|
||||
</tr>
|
||||
}
|
||||
</table>
|
||||
</div>
|
||||
<div id="Job_Show_Job_Type" class="status">
|
||||
<h2 title="@Model.Job.JobType.Id">@Model.Job.JobType.Description</h2>
|
||||
<table class="none">
|
||||
<tr>
|
||||
@{
|
||||
var jobSubTypeFirst = (int)Math.Ceiling((double)(Model.Job.JobSubTypes.Count + 1) / 2);
|
||||
}
|
||||
<td>
|
||||
<ul id="Job_Show_Job_SubTypes_1">
|
||||
@foreach (var jobSubType in Model.Job.JobSubTypes.Take(jobSubTypeFirst))
|
||||
{
|
||||
<li title="@jobSubType.Id">@jobSubType.Description</li>
|
||||
}
|
||||
</ul>
|
||||
</td>
|
||||
<td>
|
||||
<ul id="Job_Show_Job_SubTypes_2">
|
||||
@foreach (var jobSubType in Model.Job.JobSubTypes.Skip(jobSubTypeFirst))
|
||||
{
|
||||
<li title="@jobSubType.Id">@jobSubType.Description</li>
|
||||
}
|
||||
</ul>
|
||||
@if (!Model.Job.ClosedDate.HasValue)
|
||||
{
|
||||
<a href="#" id="Job_Show_Job_SubTypes_Update">Update Sub Types</a>
|
||||
}
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<div id="Job_Show_Job_SubTypes_Update_Dialog" title="Update Job Types">
|
||||
<div>
|
||||
<h2>
|
||||
@Model.Job.JobType.Description</h2>
|
||||
@using (Html.BeginForm(MVC.API.Job.UpdateSubTypes(Model.Job.Id, redirect: true), FormMethod.Post, new { id = "formUpdateJobTypes" }))
|
||||
{
|
||||
@CommonHelpers.CheckBoxList("SubTypes", Model.UpdatableJobSubTypes.ToSelectListItems(Model.Job.JobSubTypes.ToList()), 3)
|
||||
<hr />
|
||||
<div>
|
||||
<input type="checkbox" value="true" id="UpdateJobTypesAddComponents" name="AddComponents"
|
||||
checked="checked" /><label for="UpdateJobTypesAddComponents">Add Components for newly added Sub Types</label>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
$(function(){
|
||||
var $Job_Show_Job_SubTypes_Update_Dialog = null;
|
||||
|
||||
$('#Job_Show_Job_SubTypes_Update').click(function () {
|
||||
if (!$Job_Show_Job_SubTypes_Update_Dialog) {
|
||||
$Job_Show_Job_SubTypes_Update_Dialog = $('#Job_Show_Job_SubTypes_Update_Dialog');
|
||||
$Job_Show_Job_SubTypes_Update_Dialog.dialog({
|
||||
resizable: false,
|
||||
modal: true,
|
||||
autoOpen: false,
|
||||
width: 700,
|
||||
buttons: {
|
||||
"Save": function () {
|
||||
$('#formUpdateJobTypes').submit();
|
||||
$Job_Show_Job_SubTypes_Update_Dialog.dialog("disable");
|
||||
},
|
||||
Cancel: function () {
|
||||
$(this).dialog("close");
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
$Job_Show_Job_SubTypes_Update_Dialog.dialog('open');
|
||||
return false;
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
<div id="Job_Show_GenerateDocument_Container" class="status">
|
||||
@Html.DropDownList("Job_Show_GenerateDocument", Model.DocumentTemplatesSelectListItems) <span id="Job_Show_GenerateDocument_Status">@AjaxHelpers.AjaxLoader() Generating...</span>
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
var generatePdfUrl = '@Url.Action(MVC.API.Job.GeneratePdf(Model.Job.Id.ToString(), null))?DocumentTemplateId=';
|
||||
var $documentTemplates = $('#Job_Show_GenerateDocument');
|
||||
var $Job_Show_GenerateDocument_Status = $('#Job_Show_GenerateDocument_Status');
|
||||
$Job_Show_GenerateDocument_Status.find('.ajaxLoading').css('display', 'inline-block');
|
||||
$documentTemplates.change(function () {
|
||||
var v = $documentTemplates.val();
|
||||
if (v) {
|
||||
if ($.browser.msie || $.browser.mozilla){
|
||||
// Popup & Status for MSIE & Firefox
|
||||
var w = window.open(generatePdfUrl + v, null, 'height=100,width=150,menubar=no,resizable=yes,scrollbars=no,status=no,toolbar=no');
|
||||
|
||||
var statusShown = false;
|
||||
var c = function(timeout){window.setTimeout(function(){
|
||||
if (w.closed === undefined || w.closed === true){
|
||||
if (statusShown)
|
||||
$Job_Show_GenerateDocument_Status.fadeOut(750);
|
||||
}else{
|
||||
if (!statusShown)
|
||||
{
|
||||
$Job_Show_GenerateDocument_Status.show()
|
||||
statusShown = true;
|
||||
}
|
||||
c(500);
|
||||
}
|
||||
}, timeout)}
|
||||
c(200);
|
||||
}else{
|
||||
// Redirect other Browsers with different download mechanisms
|
||||
window.location.href = generatePdfUrl + v;
|
||||
}
|
||||
$documentTemplates.val('').blur();
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
@if (Model.Job.Device != null)
|
||||
{
|
||||
<td id="Job_Show_Device">
|
||||
<div>
|
||||
<h2 id="Job_Show_Device_SerialNumber" title="Serial Number">@Html.ActionLink(Model.Job.DeviceSerialNumber, MVC.Device.Show(Model.Job.DeviceSerialNumber))</h2>
|
||||
<div class="clearfix">
|
||||
<div id="Job_Show_Device_Details">
|
||||
<img id="Job_Show_Device_Model_Image" alt="Model Image" src="@Url.Action(MVC.API.DeviceModel.Image(Model.Job.Device.DeviceModelId, Model.Job.Device.DeviceModel.ImageHash()))" />
|
||||
<div id="Job_Show_Device_ComputerName" title="Computer Name">@Model.Job.Device.ComputerName</div>
|
||||
<div id="Job_Show_Device_Model" title="Model">@Html.ActionLink(Model.Job.Device.DeviceModel.ToString(), MVC.Config.DeviceModel.Index(Model.Job.Device.DeviceModelId))</div>
|
||||
@if (Model.Job.Device.DeviceBatch != null)
|
||||
{
|
||||
<div id="Job_Show_Device_Batch" title="Batch">@Html.ActionLink(Model.Job.Device.DeviceBatch.Name, MVC.Config.DeviceBatch.Index(Model.Job.Device.DeviceBatchId))</div>
|
||||
}
|
||||
</div>
|
||||
@if (Model.Job.JobTypeId == JobType.JobTypeIds.HWar)
|
||||
{
|
||||
<div id="Job_Show_Device_Details_HWar">
|
||||
<div>DEVICE WARRANTY</div>
|
||||
<div>Until: <span id="Job_Show_Device_Details_HWar_ValidUntil">@Model.Job.Device.DeviceBatch.WarrantyValidUntil.ToFuzzy("Unknown")</span></div>
|
||||
@if (!string.IsNullOrWhiteSpace(Model.Job.Device.DeviceBatch.WarrantyDetails))
|
||||
{
|
||||
<a id="Job_Show_Device_Details_HWar_Details_Button" href="#">Show Details</a>
|
||||
<div id="Job_Show_Device_Details_HWar_Details_Dialog" class="dialog" title="Warranty Details for @(Model.Job.Device.DeviceBatch.Name)">
|
||||
<div>@(new HtmlString(Model.Job.Device.DeviceBatch.WarrantyDetails))</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
var d;
|
||||
$('#Job_Show_Device_Details_HWar_Details_Button').click(function () {
|
||||
if (!d)
|
||||
d = $('#Job_Show_Device_Details_HWar_Details_Dialog').dialog({
|
||||
width: 570,
|
||||
modal: true
|
||||
});
|
||||
else
|
||||
d.dialog('open');
|
||||
return false;
|
||||
});
|
||||
});
|
||||
</script>
|
||||
}
|
||||
</div>
|
||||
}
|
||||
@if (Model.Job.JobTypeId == JobType.JobTypeIds.HNWar)
|
||||
{
|
||||
<div id="Job_Show_Device_Details_HNWar">
|
||||
<div>INSURANCE</div>
|
||||
<div id="Job_Show_Device_Details_HNWar_InsuranceSupplier">@Model.Job.Device.DeviceBatch.InsuranceSupplier</div>
|
||||
<div>Until: <span id="Job_Show_Device_Details_HNWar_ValidUntil">@Model.Job.Device.DeviceBatch.InsuredUntil.ToFuzzy("Unknown")</span></div>
|
||||
@if (!string.IsNullOrWhiteSpace(Model.Job.Device.DeviceBatch.InsuranceDetails))
|
||||
{
|
||||
<a id="Job_Show_Device_Details_HNWar_Details_Button" href="#">Show Details</a>
|
||||
<div id="Job_Show_Device_Details_HNWar_Details_Dialog" class="dialog" title="Insurance Details for @(Model.Job.Device.DeviceBatch.Name)">
|
||||
<div>@(new HtmlString(Model.Job.Device.DeviceBatch.InsuranceDetails))</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
var d;
|
||||
$('#Job_Show_Device_Details_HNWar_Details_Button').click(function () {
|
||||
if (!d)
|
||||
d = $('#Job_Show_Device_Details_HNWar_Details_Dialog').dialog({
|
||||
width: 570,
|
||||
modal: true
|
||||
});
|
||||
else
|
||||
d.dialog('open');
|
||||
return false;
|
||||
});
|
||||
});
|
||||
</script>
|
||||
}
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
@if (Model.Job.DeviceHeld.HasValue)
|
||||
{
|
||||
<div id="Job_Show_Device_DeviceHeld" class="status">
|
||||
<table class="none">
|
||||
<tr>
|
||||
<td>Location:</td>
|
||||
<td>@Html.TextBoxFor(m => m.Job.DeviceHeldLocation, new { @class = "small discreet" }) @AjaxHelpers.AjaxSave() @AjaxHelpers.AjaxLoader()</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Held Since:</td>
|
||||
<td><span id="Job_Show_Device_DeviceHeld_DeviceHeld">@CommonHelpers.FriendlyDateAndTitleUser(Model.Job.DeviceHeld, Model.Job.DeviceHeldTechUser)</span></td>
|
||||
</tr>
|
||||
@if (Model.Job.DeviceReadyForReturn.HasValue)
|
||||
{
|
||||
<tr>
|
||||
<td>Ready:</td>
|
||||
<td><span id="Job_Show_Device_DeviceHeld_DeviceReadyForReturn">@CommonHelpers.FriendlyDateAndTitleUser(Model.Job.DeviceReadyForReturn, Model.Job.DeviceReadyForReturnTechUser)</span></td>
|
||||
</tr>
|
||||
}
|
||||
@if (Model.Job.DeviceReturnedDate.HasValue)
|
||||
{
|
||||
<tr>
|
||||
<td>Returned:</td>
|
||||
<td><span id="Job_Show_Device_DeviceHeld_DeviceReturnedDate">@CommonHelpers.FriendlyDateAndTitleUser(Model.Job.DeviceReturnedDate, Model.Job.DeviceReturnedTechUser)</span></td>
|
||||
</tr>
|
||||
}
|
||||
</table>
|
||||
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
var $deviceHeldLocation = $('#Job_DeviceHeldLocation');
|
||||
var $ajaxSave = $deviceHeldLocation.next('.ajaxSave');
|
||||
|
||||
$deviceHeldLocation
|
||||
.watermark('Unknown')
|
||||
.focus(function () { $deviceHeldLocation.select() })
|
||||
.keydown(function (e) {
|
||||
$ajaxSave.show();
|
||||
if (e.which == 13) {
|
||||
$(this).blur();
|
||||
}
|
||||
}).blur(function () {
|
||||
$ajaxSave.hide();
|
||||
})
|
||||
.change(function () {
|
||||
$ajaxSave.hide();
|
||||
$ajaxLoading = $ajaxSave.next('.ajaxLoading').show();
|
||||
var data = { DeviceHeldLocation: $deviceHeldLocation.val() };
|
||||
$.ajax({
|
||||
url: '@Url.Action(MVC.API.Job.UpdateDeviceHeldLocation(Model.Job.Id, null))',
|
||||
dataType: 'json',
|
||||
data: data,
|
||||
success: function (d) {
|
||||
if (d == 'OK') {
|
||||
$ajaxLoading.hide().next('.ajaxOk').show().delay('fast').fadeOut('slow');
|
||||
} else {
|
||||
$ajaxLoading.hide();
|
||||
alert('Unable to update device held location: ' + d);
|
||||
}
|
||||
},
|
||||
error: function (jqXHR, textStatus, errorThrown) {
|
||||
alert('Unable to update device held location: ' + textStatus);
|
||||
$ajaxLoading.hide();
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
</td>
|
||||
}
|
||||
@if (Model.Job.User != null)
|
||||
{
|
||||
<td id="Job_Show_User">
|
||||
<div>
|
||||
<h2 id="Job_Show_User_DisplayName" title="Display Name">@Html.ActionLink(Model.Job.User.DisplayName, MVC.User.Show(Model.Job.UserId))</h2>
|
||||
<div id="Job_Show_User_Id" title="Id">@Model.Job.UserId <span id="Job_Show_User_Type" title="Type">[@(Model.Job.User.Type)]</span></div>
|
||||
@if (!string.IsNullOrWhiteSpace(Model.Job.User.PhoneNumber))
|
||||
{<div id="Job_Show_User_PhoneNumber" title="Phone Number">Phone: @Model.Job.User.PhoneNumber</div>}
|
||||
@if (!string.IsNullOrWhiteSpace(Model.Job.User.EmailAddress))
|
||||
{<div id="Job_Show_User_EmailAddress" title="Email Address">Email: <a href="mailto:@(Model.Job.User.EmailAddress)">@Model.Job.User.EmailAddress</a></div>}
|
||||
@if (Model.Job.WaitingForUserAction.HasValue)
|
||||
{
|
||||
<div id="Job_Show_User_WaitingForUserAction" class="status">
|
||||
<h4>Awaiting Action</h4>
|
||||
Since: @Model.Job.WaitingForUserAction.ToFuzzy()
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
</td>
|
||||
}
|
||||
</tr>
|
||||
<tr id="Job_Show_Subjects_Actions">
|
||||
<td id="Job_Show_Job_Actions">
|
||||
@if (Model.Job.CanClose())
|
||||
{
|
||||
@Html.ActionLinkSmallButton("Close Job", MVC.API.Job.Close(Model.Job.Id, true), "Job_Show_Job_Actions_Close_Button")
|
||||
<div id="Job_Show_Job_Actions_Close_Dialog" class="dialog" title="Close this Job?">
|
||||
<p>
|
||||
<span class="ui-icon ui-icon-alert" style="float: left; margin: 0 7px 20px 0;"></span>
|
||||
Are you sure?
|
||||
</p>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
var button = $('#Job_Show_Job_Actions_Close_Button');
|
||||
var buttonDialog = null;
|
||||
var buttonLink = button.attr('href');
|
||||
button.attr('href', '#').click(function () {
|
||||
if (!buttonDialog){
|
||||
buttonDialog = $('#Job_Show_Job_Actions_Close_Dialog');
|
||||
buttonDialog.dialog({
|
||||
resizable: false,
|
||||
modal: true,
|
||||
autoOpen: false,
|
||||
buttons: {
|
||||
"Close Job": function () {
|
||||
var $this = $(this);
|
||||
$this.dialog("disable");
|
||||
$this.dialog("option", "buttons", null);
|
||||
window.location.href = buttonLink;
|
||||
},
|
||||
Cancel: function () {
|
||||
$(this).dialog("close");
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
buttonDialog.dialog('open');
|
||||
return false;
|
||||
});
|
||||
});
|
||||
</script>
|
||||
}
|
||||
@if (Model.Job.CanReopen())
|
||||
{
|
||||
@Html.ActionLinkSmallButton("Reopen Job", MVC.API.Job.Reopen(Model.Job.Id, true), "Job_Show_Job_Actions_Reopen_Button")
|
||||
<div id="Job_Show_Job_Actions_Reopen_Dialog" class="dialog" title="Reopen this Job?">
|
||||
<p>
|
||||
<span class="ui-icon ui-icon-alert" style="float: left; margin: 0 7px 20px 0;"></span>
|
||||
Are you sure?
|
||||
</p>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
var button = $('#Job_Show_Job_Actions_Reopen_Button');
|
||||
var buttonDialog = null;
|
||||
var buttonLink = button.attr('href');
|
||||
button.attr('href', '#');
|
||||
button.click(function () {
|
||||
if (!buttonDialog){
|
||||
buttonDialog = $('#Job_Show_Job_Actions_Reopen_Dialog');
|
||||
buttonDialog.dialog({
|
||||
resizable: false,
|
||||
modal: true,
|
||||
autoOpen: false,
|
||||
buttons: {
|
||||
"Reopen": function () {
|
||||
var $this = $(this);
|
||||
$this.dialog("disable");
|
||||
$this.dialog("option", "buttons", null);
|
||||
window.location.href = buttonLink;
|
||||
},
|
||||
Cancel: function () {
|
||||
$(this).dialog("close");
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
buttonDialog.dialog('open');
|
||||
return false;
|
||||
});
|
||||
});
|
||||
</script>
|
||||
}
|
||||
@if (Model.Job.CanDelete())
|
||||
{
|
||||
@Html.ActionLinkSmallButton("Delete Job", MVC.API.Job.Delete(Model.Job.Id, true), "Job_Show_Job_Actions_Delete_Button")
|
||||
<div id="Job_Show_Job_Actions_Delete_Dialog" class="dialog" title="Delete this Job?">
|
||||
<p>
|
||||
<span class="ui-icon ui-icon-alert" style="float: left; margin: 0 7px 20px 0;"></span>
|
||||
This item will be permanently deleted and cannot be recovered. Are you sure?
|
||||
</p>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
var button = $('#Job_Show_Job_Actions_Delete_Button');
|
||||
var buttonDialog = null;
|
||||
var buttonLink = button.attr('href');
|
||||
button.attr('href', '#');
|
||||
button.click(function () {
|
||||
if (!buttonDialog){
|
||||
buttonDialog = $('#Job_Show_Job_Actions_Delete_Dialog');
|
||||
buttonDialog.dialog({
|
||||
resizable: false,
|
||||
modal: true,
|
||||
autoOpen: false,
|
||||
buttons: {
|
||||
"Delete": function () {
|
||||
var $this = $(this);
|
||||
$this.dialog("disable");
|
||||
$this.dialog("option", "buttons", null);
|
||||
window.location.href = buttonLink;
|
||||
},
|
||||
Cancel: function () {
|
||||
$(this).dialog("close");
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
buttonDialog.dialog('open');
|
||||
return false;
|
||||
});
|
||||
});
|
||||
</script>
|
||||
}
|
||||
@if (Model.Job.CanLogWarranty())
|
||||
{
|
||||
@Html.ActionLinkSmallButton("Log Warranty", MVC.Job.LogWarranty(Model.Job.Id, null, null), "Job_Show_Job_Actions_LogWarranty_Button")
|
||||
}
|
||||
@if (Model.Job.CanWarrantyCompleted())
|
||||
{
|
||||
@Html.ActionLinkSmallButton("Warranty Complete", MVC.API.Job.UpdateWarrantyExternalCompletedDate(Model.Job.Id, "Now", true), "Job_Show_Job_Actions_WarrantyComplete_Button", "alert")
|
||||
}
|
||||
@if (Model.Job.CanInsuranceClaimFormSent())
|
||||
{
|
||||
@Html.ActionLinkSmallButton("Insurance Claim Form Sent", MVC.API.Job.UpdateInsuranceClaimFormSentDate(Model.Job.Id, "Now", true), "Job_Show_Job_Actions_InsuranceClaimFormSent_Button", "alert")
|
||||
}
|
||||
@if (Model.Job.CanLogRepair())
|
||||
{
|
||||
@Html.ActionLinkSmallButton("Repairs Logged", MVC.API.Job.LogRepair(Model.Job.Id, null, null, true), "Job_Show_Job_Actions_LogRepair_Button")
|
||||
<div id="Job_Show_Job_Actions_LogRepair_Dialog" class="dialog" title="Repairs Logged">
|
||||
@using (Html.BeginForm(MVC.API.Job.LogRepair(Model.Job.Id, null, null, true)))
|
||||
{
|
||||
<h3>Repairer Name:</h3>
|
||||
<p>
|
||||
<input type="text" id="Job_Show_Job_Actions_LogRepair_Dialog_RepairerName" name="RepairerName" />
|
||||
</p>
|
||||
<h3>Repairer Reference:</h3>
|
||||
<p>
|
||||
<input type="text" id="Job_Show_Job_Actions_LogRepair_Dialog_RepairerReference" name="RepairerReference" />
|
||||
</p>
|
||||
}
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
var button = $('#Job_Show_Job_Actions_LogRepair_Button');
|
||||
var buttonDialog = null;
|
||||
button.attr('href', '#');
|
||||
button.click(function () {
|
||||
if (!buttonDialog){
|
||||
buttonDialog = $('#Job_Show_Job_Actions_LogRepair_Dialog');
|
||||
buttonDialog.dialog({
|
||||
resizable: false,
|
||||
height: 240,
|
||||
modal: true,
|
||||
autoOpen: false,
|
||||
buttons: {
|
||||
"Log Repairs": function () {
|
||||
var $this = $(this);
|
||||
$this.dialog("disable");
|
||||
$this.dialog("option", "buttons", null);
|
||||
$this.find('form').submit();
|
||||
},
|
||||
Cancel: function () {
|
||||
$(this).dialog("close");
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
buttonDialog.dialog('open');
|
||||
|
||||
$('#Job_Show_Job_Actions_LogRepair_Dialog_RepairerName').val($('#Job_JobMetaNonWarranty_RepairerName').val()).focus();
|
||||
$('#Job_Show_Job_Actions_LogRepair_Dialog_RepairerReference').val($('#Job_JobMetaNonWarranty_RepairerReference').val());
|
||||
|
||||
return false;
|
||||
});
|
||||
});
|
||||
</script>
|
||||
}
|
||||
@if (Model.Job.CanRepairComplete())
|
||||
{
|
||||
@Html.ActionLinkSmallButton("Repairs Complete", MVC.API.Job.UpdateNonWarrantyRepairerCompletedDate(Model.Job.Id, "Now", true), "Job_Show_Job_Actions_RepairComplete_Button", "alert")
|
||||
}
|
||||
@if (Model.Job.CanConvertHWarToHNWar())
|
||||
{
|
||||
@Html.ActionLinkSmallButton("Convert to Non-Warranty", MVC.API.Job.ConvertHWarToHNWar(Model.Job.Id, true), "Job_Show_Job_Actions_ConvertToHNWar_Button")
|
||||
<div id="Job_Show_Job_Actions_ConvertToHNWar_Dialog" class="dialog" title="Convert this Job?">
|
||||
<p>
|
||||
<span class="ui-icon ui-icon-alert" style="float: left; margin: 0 7px 20px 0;"></span>
|
||||
This process is not reversible.<br />
|
||||
Are you sure?
|
||||
</p>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
var button = $('#Job_Show_Job_Actions_ConvertToHNWar_Button');
|
||||
var buttonDialog = null;
|
||||
var buttonLink = button.attr('href');
|
||||
button.attr('href', '#');
|
||||
button.click(function () {
|
||||
if (!buttonDialog){
|
||||
buttonDialog = $('#Job_Show_Job_Actions_ConvertToHNWar_Dialog');
|
||||
buttonDialog.dialog({
|
||||
resizable: false,
|
||||
modal: true,
|
||||
autoOpen: false,
|
||||
buttons: {
|
||||
"Convert": function () {
|
||||
var $this = $(this);
|
||||
$this.dialog("disable");
|
||||
$this.dialog("option", "buttons", null);
|
||||
window.location.href = buttonLink;
|
||||
},
|
||||
Cancel: function () {
|
||||
$(this).dialog("close");
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
buttonDialog.dialog('open');
|
||||
return false;
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
||||
}
|
||||
</td>
|
||||
@if (Model.Job.Device != null)
|
||||
{
|
||||
<td id="Job_Show_Device_Actions">
|
||||
@if (Model.Job.CanDeviceHeld())
|
||||
{
|
||||
@Html.ActionLinkSmallButton("Held", MVC.API.Job.DeviceHeld(Model.Job.Id, true), "Job_Show_Device_Actions_Held_Button")
|
||||
}
|
||||
@if (Model.Job.CanDeviceReadyForReturn())
|
||||
{
|
||||
@Html.ActionLinkSmallButton("Ready For Return", MVC.API.Job.DeviceReadyForReturn(Model.Job.Id, true), "Job_Show_Device_Actions_DeviceReadyForReturn_Button", "alert")
|
||||
}
|
||||
@if (Model.Job.CanDeviceReturned())
|
||||
{
|
||||
@Html.ActionLinkSmallButton("Returned", MVC.API.Job.DeviceReturned(Model.Job.Id, true), "Job_Show_Device_Actions_DeviceReturned_Button", Model.Job.CanDeviceReadyForReturn() ? null : "alert")
|
||||
}
|
||||
</td>
|
||||
}
|
||||
@if (Model.Job.User != null)
|
||||
{
|
||||
<td id="Job_Show_User_Actions">
|
||||
|
||||
|
||||
@if (Model.Job.CanWaitingForUserAction())
|
||||
{
|
||||
<a id="Job_Show_User_Actions_WaitingForUserAction_Button" href="#" class="button small">Awaiting Action</a>
|
||||
<div id="Job_Show_User_Actions_WaitingForUserAction_Dialog" class="dialog" title="Waiting for User Action">
|
||||
@using (Html.BeginForm(MVC.API.Job.WaitingForUserAction(Model.Job.Id, null, true)))
|
||||
{
|
||||
<h3>Reason:</h3>
|
||||
<p>
|
||||
<textarea name="Reason" class="block"></textarea>
|
||||
</p>
|
||||
}
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
var button = $('#Job_Show_User_Actions_WaitingForUserAction_Button');
|
||||
var buttonDialog = null;
|
||||
|
||||
button.click(function () {
|
||||
if (!buttonDialog) {
|
||||
buttonDialog = $('#Job_Show_User_Actions_WaitingForUserAction_Dialog');
|
||||
buttonDialog.dialog({
|
||||
resizable: false,
|
||||
modal: true,
|
||||
autoOpen: false,
|
||||
buttons: {
|
||||
"Waiting for User Action": function () {
|
||||
var $this = $(this);
|
||||
$this.dialog("disable");
|
||||
$this.dialog("option", "buttons", null);
|
||||
$this.find('form').submit();
|
||||
},
|
||||
Cancel: function () {
|
||||
$(this).dialog("close");
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
buttonDialog.dialog('open');
|
||||
return false;
|
||||
});
|
||||
});
|
||||
</script>
|
||||
}
|
||||
@if (Model.Job.CanNotWaitingForUserAction())
|
||||
{
|
||||
<a id="Job_Show_User_Actions_NotWaitingForUserAction_Button" href="#" class="button alert small">Action Resolved</a>
|
||||
<div id="Job_Show_User_Actions_NotWaitingForUserAction_Dialog" class="dialog" title="Not Waiting for User Action">
|
||||
@using (Html.BeginForm(MVC.API.Job.NotWaitingForUserAction(Model.Job.Id, null, true)))
|
||||
{
|
||||
<h3>Resolution:</h3>
|
||||
<p>
|
||||
<textarea name="Resolution" class="block"></textarea>
|
||||
</p>
|
||||
}
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
var button = $('#Job_Show_User_Actions_NotWaitingForUserAction_Button');
|
||||
var buttonDialog = null;
|
||||
|
||||
button.click(function () {
|
||||
if (!buttonDialog) {
|
||||
buttonDialog = $('#Job_Show_User_Actions_NotWaitingForUserAction_Dialog');
|
||||
buttonDialog.dialog({
|
||||
resizable: false,
|
||||
height: 240,
|
||||
modal: true,
|
||||
autoOpen: false,
|
||||
buttons: {
|
||||
"Not Waiting for User Action": function () {
|
||||
var $this = $(this);
|
||||
$this.dialog("disable");
|
||||
$this.dialog("option", "buttons", null);
|
||||
$this.find('form').submit();
|
||||
},
|
||||
Cancel: function () {
|
||||
$(this).dialog("close");
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
buttonDialog.dialog('open');
|
||||
return false;
|
||||
});
|
||||
});
|
||||
</script>
|
||||
}
|
||||
|
||||
</td>
|
||||
}
|
||||
</tr>
|
||||
</table>
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,5 @@
|
||||
@model Disco.Web.Models.Job.ListModel
|
||||
@{
|
||||
ViewBag.Title = Html.ToBreadcrumb("Jobs", MVC.Job.Index(), Model.PageTitle);
|
||||
}
|
||||
@Html.Partial(MVC.Shared.Views._JobTable, Model.JobTable, new ViewDataDictionary())
|
||||
@@ -0,0 +1,63 @@
|
||||
#pragma warning disable 1591
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.17929
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace Disco.Web.Views.Job
|
||||
{
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Text;
|
||||
using System.Web;
|
||||
using System.Web.Helpers;
|
||||
using System.Web.Mvc;
|
||||
using System.Web.Mvc.Ajax;
|
||||
using System.Web.Mvc.Html;
|
||||
using System.Web.Routing;
|
||||
using System.Web.Security;
|
||||
using System.Web.UI;
|
||||
using System.Web.WebPages;
|
||||
using Disco.BI.Extensions;
|
||||
using Disco.Models.Repository;
|
||||
using Disco.Web;
|
||||
using Disco.Web.Extensions;
|
||||
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "1.5.0.0")]
|
||||
[System.Web.WebPages.PageVirtualPathAttribute("~/Views/Job/List.cshtml")]
|
||||
public class List : System.Web.Mvc.WebViewPage<Disco.Web.Models.Job.ListModel>
|
||||
{
|
||||
public List()
|
||||
{
|
||||
}
|
||||
public override void Execute()
|
||||
{
|
||||
|
||||
#line 2 "..\..\Views\Job\List.cshtml"
|
||||
|
||||
ViewBag.Title = Html.ToBreadcrumb("Jobs", MVC.Job.Index(), Model.PageTitle);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n");
|
||||
|
||||
|
||||
#line 5 "..\..\Views\Job\List.cshtml"
|
||||
Write(Html.Partial(MVC.Shared.Views._JobTable, Model.JobTable, new ViewDataDictionary()));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
}
|
||||
}
|
||||
}
|
||||
#pragma warning restore 1591
|
||||
@@ -0,0 +1,136 @@
|
||||
@model Disco.Web.Models.Job.LogWarrantyModel
|
||||
@{
|
||||
ViewBag.Title = Html.ToBreadcrumb("Jobs", MVC.Job.Index(), string.Format("Job: {0}", Model.Job.Id), MVC.Job.Show(Model.Job.Id), "Log Warranty");
|
||||
}
|
||||
@using (Html.BeginForm(MVC.Job.LogWarranty(), FormMethod.Post))
|
||||
{
|
||||
@Html.ValidationSummary(true)
|
||||
@Html.HiddenFor(m => m.JobId)
|
||||
@Html.ValidationMessageFor(m => m.JobId)
|
||||
<input type="hidden" name="WarrantyAction" value="Disclose" />
|
||||
<div id="warrantyJobForm" class="form" style="width: 650px">
|
||||
<table>
|
||||
<tr>
|
||||
<th>
|
||||
Internal Job Id:
|
||||
</th>
|
||||
<td>
|
||||
@Model.JobId
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>
|
||||
Device Serial Number:
|
||||
</th>
|
||||
<td>
|
||||
@Model.Job.Device.SerialNumber
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>
|
||||
Device Model:
|
||||
</th>
|
||||
<td>
|
||||
@Model.Job.Device.DeviceModel.Manufacturer @Model.Job.Device.DeviceModel.Model
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>
|
||||
Technician:
|
||||
</th>
|
||||
<td>
|
||||
@Model.TechUser.DisplayName
|
||||
<div class="smallMessage">
|
||||
Email Address: @Model.TechUser.EmailAddress<br />
|
||||
Phone Number: @Model.TechUser.PhoneNumber
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th style="width: 150px">
|
||||
Repair Address:
|
||||
</th>
|
||||
<td>
|
||||
@Html.DropDownListFor(model => model.OrganisationAddressId, Model.OrganisationAddresses.ToSelectListItems(Model.OrganisationAddressId, true))<br />
|
||||
@Html.ValidationMessageFor(m => m.OrganisationAddressId)
|
||||
<div id="organisationAddressDetailsLoading" style="display: none">
|
||||
<img src="@(Links.ClientSource.Style.Images.Status.loading_gif)" alt="Loading" />
|
||||
<span class="smallMessage">Loading Details...</span>
|
||||
</div>
|
||||
<div id="organisationAddressDetails">
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>
|
||||
Warranty Provider:
|
||||
</th>
|
||||
<td>
|
||||
@Html.DropDownListFor(model => model.WarrantyProviderId, Model.WarrantyProviders.ToSelectListItems(Model.WarrantyProviderId, true))<br />
|
||||
@Html.ValidationMessageFor(m => m.WarrantyProviderId)
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div id="warrantyJobFaultDescription" class="form" style="width: 650px; margin-top: 15px;">
|
||||
<h2>
|
||||
Fault Description</h2>
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
@Html.EditorFor(model => model.FaultDescription)<br />
|
||||
@Html.ValidationMessageFor(m => m.FaultDescription)
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
if (Model.WarrantyProvider != null && Model.WarrantyProviderSubmitJobViewType != null)
|
||||
{
|
||||
<div id="warrantyJobProviderProperties">
|
||||
@Html.PartialCompiled(Model.WarrantyProviderSubmitJobViewType, Model.WarrantyProviderSubmitJobModel)
|
||||
</div>
|
||||
}
|
||||
<div class="actionBar">
|
||||
<input type="submit" class="button" value="Preview Warranty Claim" />
|
||||
</div>
|
||||
}
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
|
||||
var $organisationAddressDetails = $('#organisationAddressDetails');
|
||||
var $organisationAddressDetailsLoading = $('#organisationAddressDetailsLoading');
|
||||
var $OrganisationAddressId = $('#OrganisationAddressId');
|
||||
|
||||
var $ProviderId = $('#WarrantyProviderId');
|
||||
|
||||
var updateOrganisationAddressDetails = function () {
|
||||
$organisationAddressDetails.slideUp();
|
||||
var orgAddressId = $OrganisationAddressId.val();
|
||||
if (orgAddressId) {
|
||||
$organisationAddressDetailsLoading.slideDown();
|
||||
$.getJSON('@(Url.Action(MVC.API.Job.OrganisationAddress()))', { id: orgAddressId }, function (data) {
|
||||
$organisationAddressDetails.empty().append(
|
||||
$('<span>').text(data.Address),
|
||||
'<br />',
|
||||
$('<span>').text(data.Suburb + ', ' + data.Postcode),
|
||||
'<br />',
|
||||
$('<span>').text(data.State + ', ' + data.Country)
|
||||
);
|
||||
$organisationAddressDetailsLoading.slideUp();
|
||||
$organisationAddressDetails.slideDown();
|
||||
});
|
||||
}
|
||||
}
|
||||
var updateProviderDetails = function () {
|
||||
var providerId = $ProviderId.val();
|
||||
var orgAddressId = $OrganisationAddressId.val();
|
||||
|
||||
if (providerId) {
|
||||
window.location.href = '@(Url.Action(MVC.Job.LogWarranty(Model.JobId, null, null)))?WarrantyProviderId=' + providerId + '&OrganisationAddressId=' + orgAddressId;
|
||||
}
|
||||
}
|
||||
$OrganisationAddressId.change(updateOrganisationAddressDetails).change(updateProviderDetails);
|
||||
$ProviderId.change(updateProviderDetails);
|
||||
updateOrganisationAddressDetails();
|
||||
});
|
||||
</script>
|
||||
@@ -0,0 +1,438 @@
|
||||
#pragma warning disable 1591
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.17929
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace Disco.Web.Views.Job
|
||||
{
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Text;
|
||||
using System.Web;
|
||||
using System.Web.Helpers;
|
||||
using System.Web.Mvc;
|
||||
using System.Web.Mvc.Ajax;
|
||||
using System.Web.Mvc.Html;
|
||||
using System.Web.Routing;
|
||||
using System.Web.Security;
|
||||
using System.Web.UI;
|
||||
using System.Web.WebPages;
|
||||
using Disco.BI.Extensions;
|
||||
using Disco.Models.Repository;
|
||||
using Disco.Web;
|
||||
using Disco.Web.Extensions;
|
||||
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "1.5.0.0")]
|
||||
[System.Web.WebPages.PageVirtualPathAttribute("~/Views/Job/LogWarranty.cshtml")]
|
||||
public class LogWarranty : System.Web.Mvc.WebViewPage<Disco.Web.Models.Job.LogWarrantyModel>
|
||||
{
|
||||
public LogWarranty()
|
||||
{
|
||||
}
|
||||
public override void Execute()
|
||||
{
|
||||
|
||||
#line 2 "..\..\Views\Job\LogWarranty.cshtml"
|
||||
|
||||
ViewBag.Title = Html.ToBreadcrumb("Jobs", MVC.Job.Index(), string.Format("Job: {0}", Model.Job.Id), MVC.Job.Show(Model.Job.Id), "Log Warranty");
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n");
|
||||
|
||||
|
||||
#line 5 "..\..\Views\Job\LogWarranty.cshtml"
|
||||
using (Html.BeginForm(MVC.Job.LogWarranty(), FormMethod.Post))
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 7 "..\..\Views\Job\LogWarranty.cshtml"
|
||||
Write(Html.ValidationSummary(true));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 7 "..\..\Views\Job\LogWarranty.cshtml"
|
||||
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 8 "..\..\Views\Job\LogWarranty.cshtml"
|
||||
Write(Html.HiddenFor(m => m.JobId));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 8 "..\..\Views\Job\LogWarranty.cshtml"
|
||||
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 9 "..\..\Views\Job\LogWarranty.cshtml"
|
||||
Write(Html.ValidationMessageFor(m => m.JobId));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 9 "..\..\Views\Job\LogWarranty.cshtml"
|
||||
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <input");
|
||||
|
||||
WriteLiteral(" type=\"hidden\"");
|
||||
|
||||
WriteLiteral(" name=\"WarrantyAction\"");
|
||||
|
||||
WriteLiteral(" value=\"Disclose\"");
|
||||
|
||||
WriteLiteral(" />\r\n");
|
||||
|
||||
WriteLiteral(" <div");
|
||||
|
||||
WriteLiteral(" id=\"warrantyJobForm\"");
|
||||
|
||||
WriteLiteral(" class=\"form\"");
|
||||
|
||||
WriteLiteral(" style=\"width: 650px\"");
|
||||
|
||||
WriteLiteral(">\r\n <table>\r\n <tr>\r\n <th>\r\n I" +
|
||||
"nternal Job Id:\r\n </th>\r\n <td>\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 18 "..\..\Views\Job\LogWarranty.cshtml"
|
||||
Write(Model.JobId);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n </td>\r\n </tr>\r\n <tr>\r\n <th" +
|
||||
">\r\n Device Serial Number:\r\n </th>\r\n " +
|
||||
" <td>\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 26 "..\..\Views\Job\LogWarranty.cshtml"
|
||||
Write(Model.Job.Device.SerialNumber);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n </td>\r\n </tr>\r\n <tr>\r\n <th" +
|
||||
">\r\n Device Model:\r\n </th>\r\n <td" +
|
||||
">\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 34 "..\..\Views\Job\LogWarranty.cshtml"
|
||||
Write(Model.Job.Device.DeviceModel.Manufacturer);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 34 "..\..\Views\Job\LogWarranty.cshtml"
|
||||
Write(Model.Job.Device.DeviceModel.Model);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n </td>\r\n </tr>\r\n <tr>\r\n <th" +
|
||||
">\r\n Technician:\r\n </th>\r\n <td>\r" +
|
||||
"\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 42 "..\..\Views\Job\LogWarranty.cshtml"
|
||||
Write(Model.TechUser.DisplayName);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n <div");
|
||||
|
||||
WriteLiteral(" class=\"smallMessage\"");
|
||||
|
||||
WriteLiteral(">\r\n Email Address: ");
|
||||
|
||||
|
||||
#line 44 "..\..\Views\Job\LogWarranty.cshtml"
|
||||
Write(Model.TechUser.EmailAddress);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("<br />\r\n Phone Number: ");
|
||||
|
||||
|
||||
#line 45 "..\..\Views\Job\LogWarranty.cshtml"
|
||||
Write(Model.TechUser.PhoneNumber);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n </div>\r\n </td>\r\n </tr>\r\n " +
|
||||
" <tr>\r\n <th");
|
||||
|
||||
WriteLiteral(" style=\"width: 150px\"");
|
||||
|
||||
WriteLiteral(">\r\n Repair Address:\r\n </th>\r\n <t" +
|
||||
"d>\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 54 "..\..\Views\Job\LogWarranty.cshtml"
|
||||
Write(Html.DropDownListFor(model => model.OrganisationAddressId, Model.OrganisationAddresses.ToSelectListItems(Model.OrganisationAddressId, true)));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("<br />\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 55 "..\..\Views\Job\LogWarranty.cshtml"
|
||||
Write(Html.ValidationMessageFor(m => m.OrganisationAddressId));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n <div");
|
||||
|
||||
WriteLiteral(" id=\"organisationAddressDetailsLoading\"");
|
||||
|
||||
WriteLiteral(" style=\"display: none\"");
|
||||
|
||||
WriteLiteral(">\r\n <img");
|
||||
|
||||
WriteAttribute("src", Tuple.Create(" src=\"", 2154), Tuple.Create("\"", 2213)
|
||||
|
||||
#line 57 "..\..\Views\Job\LogWarranty.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 2160), Tuple.Create<System.Object, System.Int32>(Links.ClientSource.Style.Images.Status.loading_gif
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 2160), false)
|
||||
);
|
||||
|
||||
WriteLiteral(" alt=\"Loading\"");
|
||||
|
||||
WriteLiteral(" />\r\n <span");
|
||||
|
||||
WriteLiteral(" class=\"smallMessage\"");
|
||||
|
||||
WriteLiteral(">Loading Details...</span>\r\n </div>\r\n <div");
|
||||
|
||||
WriteLiteral(" id=\"organisationAddressDetails\"");
|
||||
|
||||
WriteLiteral(">\r\n </div>\r\n </td>\r\n </tr>\r\n " +
|
||||
" <tr>\r\n <th>\r\n Warranty Provider:\r\n " +
|
||||
" </th>\r\n <td>\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 69 "..\..\Views\Job\LogWarranty.cshtml"
|
||||
Write(Html.DropDownListFor(model => model.WarrantyProviderId, Model.WarrantyProviders.ToSelectListItems(Model.WarrantyProviderId, true)));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("<br />\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 70 "..\..\Views\Job\LogWarranty.cshtml"
|
||||
Write(Html.ValidationMessageFor(m => m.WarrantyProviderId));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n </td>\r\n </tr>\r\n </table>\r\n </div>\r\n");
|
||||
|
||||
WriteLiteral(" <div");
|
||||
|
||||
WriteLiteral(" id=\"warrantyJobFaultDescription\"");
|
||||
|
||||
WriteLiteral(" class=\"form\"");
|
||||
|
||||
WriteLiteral(" style=\"width: 650px; margin-top: 15px;\"");
|
||||
|
||||
WriteLiteral(">\r\n <h2>\r\n Fault Description</h2>\r\n <table>\r\n " +
|
||||
" <tr>\r\n <td>\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 81 "..\..\Views\Job\LogWarranty.cshtml"
|
||||
Write(Html.EditorFor(model => model.FaultDescription));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("<br />\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 82 "..\..\Views\Job\LogWarranty.cshtml"
|
||||
Write(Html.ValidationMessageFor(m => m.FaultDescription));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n </td>\r\n </tr>\r\n </table>\r\n </div>\r\n");
|
||||
|
||||
|
||||
#line 87 "..\..\Views\Job\LogWarranty.cshtml"
|
||||
if (Model.WarrantyProvider != null && Model.WarrantyProviderSubmitJobViewType != null)
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <div");
|
||||
|
||||
WriteLiteral(" id=\"warrantyJobProviderProperties\"");
|
||||
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 90 "..\..\Views\Job\LogWarranty.cshtml"
|
||||
Write(Html.PartialCompiled(Model.WarrantyProviderSubmitJobViewType, Model.WarrantyProviderSubmitJobModel));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n </div>\r\n");
|
||||
|
||||
|
||||
#line 92 "..\..\Views\Job\LogWarranty.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <div");
|
||||
|
||||
WriteLiteral(" class=\"actionBar\"");
|
||||
|
||||
WriteLiteral(">\r\n <input");
|
||||
|
||||
WriteLiteral(" type=\"submit\"");
|
||||
|
||||
WriteLiteral(" class=\"button\"");
|
||||
|
||||
WriteLiteral(" value=\"Preview Warranty Claim\"");
|
||||
|
||||
WriteLiteral(" />\r\n </div>\r\n");
|
||||
|
||||
|
||||
#line 96 "..\..\Views\Job\LogWarranty.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("<script");
|
||||
|
||||
WriteLiteral(" type=\"text/javascript\"");
|
||||
|
||||
WriteLiteral(@">
|
||||
$(function () {
|
||||
|
||||
var $organisationAddressDetails = $('#organisationAddressDetails');
|
||||
var $organisationAddressDetailsLoading = $('#organisationAddressDetailsLoading');
|
||||
var $OrganisationAddressId = $('#OrganisationAddressId');
|
||||
|
||||
var $ProviderId = $('#WarrantyProviderId');
|
||||
|
||||
var updateOrganisationAddressDetails = function () {
|
||||
$organisationAddressDetails.slideUp();
|
||||
var orgAddressId = $OrganisationAddressId.val();
|
||||
if (orgAddressId) {
|
||||
$organisationAddressDetailsLoading.slideDown();
|
||||
$.getJSON('");
|
||||
|
||||
|
||||
#line 111 "..\..\Views\Job\LogWarranty.cshtml"
|
||||
Write(Url.Action(MVC.API.Job.OrganisationAddress()));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(@"', { id: orgAddressId }, function (data) {
|
||||
$organisationAddressDetails.empty().append(
|
||||
$('<span>').text(data.Address),
|
||||
'<br />',
|
||||
$('<span>').text(data.Suburb + ', ' + data.Postcode),
|
||||
'<br />',
|
||||
$('<span>').text(data.State + ', ' + data.Country)
|
||||
);
|
||||
$organisationAddressDetailsLoading.slideUp();
|
||||
$organisationAddressDetails.slideDown();
|
||||
});
|
||||
}
|
||||
}
|
||||
var updateProviderDetails = function () {
|
||||
var providerId = $ProviderId.val();
|
||||
var orgAddressId = $OrganisationAddressId.val();
|
||||
|
||||
if (providerId) {
|
||||
window.location.href = '");
|
||||
|
||||
|
||||
#line 129 "..\..\Views\Job\LogWarranty.cshtml"
|
||||
Write(Url.Action(MVC.Job.LogWarranty(Model.JobId, null, null)));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(@"?WarrantyProviderId=' + providerId + '&OrganisationAddressId=' + orgAddressId;
|
||||
}
|
||||
}
|
||||
$OrganisationAddressId.change(updateOrganisationAddressDetails).change(updateProviderDetails);
|
||||
$ProviderId.change(updateProviderDetails);
|
||||
updateOrganisationAddressDetails();
|
||||
});
|
||||
</script>
|
||||
");
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
#pragma warning restore 1591
|
||||
@@ -0,0 +1,108 @@
|
||||
@model Disco.Web.Models.Job.LogWarrantyModel
|
||||
@{
|
||||
ViewBag.Title = Html.ToBreadcrumb("Jobs", MVC.Job.Index(), string.Format("Job: {0}", Model.Job.Id), MVC.Job.Show(Model.Job.Id), "Log Warranty");
|
||||
}
|
||||
@using (Html.BeginForm(MVC.Job.LogWarranty(), FormMethod.Post))
|
||||
{
|
||||
@Html.ValidationSummary(true)
|
||||
@Html.HiddenFor(m => m.JobId)
|
||||
@Html.HiddenFor(m => m.OrganisationAddressId)
|
||||
@Html.HiddenFor(m => m.WarrantyProviderId)
|
||||
@Html.HiddenFor(m => m.FaultDescription)
|
||||
@Html.HiddenFor(m => m.WarrantyProviderPropertiesJson)
|
||||
<input type="hidden" name="WarrantyAction" value="Submit" />
|
||||
<div id="warrantyJobForm" class="form" style="width: 650px">
|
||||
<table>
|
||||
<tr>
|
||||
<th>
|
||||
Internal Job Id:
|
||||
</th>
|
||||
<td>
|
||||
@Model.JobId
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>
|
||||
Device Serial Number:
|
||||
</th>
|
||||
<td>
|
||||
@Model.Job.Device.SerialNumber
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>
|
||||
Device Model:
|
||||
</th>
|
||||
<td>
|
||||
@Model.Job.Device.DeviceModel.Manufacturer @Model.Job.Device.DeviceModel.Model
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>
|
||||
Technician:
|
||||
</th>
|
||||
<td>
|
||||
@Model.TechUser.DisplayName
|
||||
<div class="smallMessage">
|
||||
Email Address: @Model.TechUser.EmailAddress<br />
|
||||
Phone Number: @Model.TechUser.PhoneNumber
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th style="width: 150px">
|
||||
Repair Address:
|
||||
</th>
|
||||
<td>
|
||||
<div id="organisationAddressDetails">
|
||||
@Model.OrganisationAddress.Name
|
||||
<div class="smallMessage">
|
||||
<span>@Model.OrganisationAddress.Address</span><br />
|
||||
<span>@Model.OrganisationAddress.Suburb, @Model.OrganisationAddress.Postcode</span><br />
|
||||
<span>@Model.OrganisationAddress.State, @Model.OrganisationAddress.Country</span>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>
|
||||
Warranty Provider:
|
||||
</th>
|
||||
<td>
|
||||
@Model.WarrantyProvider.Name (@Model.WarrantyProvider.Id) @Model.WarrantyProvider.PluginManifest.Version.ToString(3)
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>
|
||||
Fault Description:
|
||||
</th>
|
||||
<td>
|
||||
@Model.FaultDescription.ToMultilineString()
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>
|
||||
Disclosed Information
|
||||
</th>
|
||||
<td>
|
||||
<div id="warrantyDisclosedInformation">
|
||||
<table>
|
||||
@foreach (var dp in Model.DiscloseProperties)
|
||||
{
|
||||
<tr>
|
||||
<th>@dp.Key:
|
||||
</th>
|
||||
<td>@dp.Value
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
</table>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="actionBar">
|
||||
<input type="submit" class="button" value="Submit Warranty Claim" />
|
||||
</div>
|
||||
}
|
||||
@@ -0,0 +1,436 @@
|
||||
#pragma warning disable 1591
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.17929
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace Disco.Web.Views.Job
|
||||
{
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Text;
|
||||
using System.Web;
|
||||
using System.Web.Helpers;
|
||||
using System.Web.Mvc;
|
||||
using System.Web.Mvc.Ajax;
|
||||
using System.Web.Mvc.Html;
|
||||
using System.Web.Routing;
|
||||
using System.Web.Security;
|
||||
using System.Web.UI;
|
||||
using System.Web.WebPages;
|
||||
using Disco.BI.Extensions;
|
||||
using Disco.Models.Repository;
|
||||
using Disco.Web;
|
||||
using Disco.Web.Extensions;
|
||||
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "1.5.0.0")]
|
||||
[System.Web.WebPages.PageVirtualPathAttribute("~/Views/Job/LogWarrantyDisclose.cshtml")]
|
||||
public class LogWarrantyDisclose : System.Web.Mvc.WebViewPage<Disco.Web.Models.Job.LogWarrantyModel>
|
||||
{
|
||||
public LogWarrantyDisclose()
|
||||
{
|
||||
}
|
||||
public override void Execute()
|
||||
{
|
||||
|
||||
#line 2 "..\..\Views\Job\LogWarrantyDisclose.cshtml"
|
||||
|
||||
ViewBag.Title = Html.ToBreadcrumb("Jobs", MVC.Job.Index(), string.Format("Job: {0}", Model.Job.Id), MVC.Job.Show(Model.Job.Id), "Log Warranty");
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n");
|
||||
|
||||
|
||||
#line 5 "..\..\Views\Job\LogWarrantyDisclose.cshtml"
|
||||
using (Html.BeginForm(MVC.Job.LogWarranty(), FormMethod.Post))
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 7 "..\..\Views\Job\LogWarrantyDisclose.cshtml"
|
||||
Write(Html.ValidationSummary(true));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 7 "..\..\Views\Job\LogWarrantyDisclose.cshtml"
|
||||
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 8 "..\..\Views\Job\LogWarrantyDisclose.cshtml"
|
||||
Write(Html.HiddenFor(m => m.JobId));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 8 "..\..\Views\Job\LogWarrantyDisclose.cshtml"
|
||||
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 9 "..\..\Views\Job\LogWarrantyDisclose.cshtml"
|
||||
Write(Html.HiddenFor(m => m.OrganisationAddressId));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 9 "..\..\Views\Job\LogWarrantyDisclose.cshtml"
|
||||
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 10 "..\..\Views\Job\LogWarrantyDisclose.cshtml"
|
||||
Write(Html.HiddenFor(m => m.WarrantyProviderId));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 10 "..\..\Views\Job\LogWarrantyDisclose.cshtml"
|
||||
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 11 "..\..\Views\Job\LogWarrantyDisclose.cshtml"
|
||||
Write(Html.HiddenFor(m => m.FaultDescription));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 11 "..\..\Views\Job\LogWarrantyDisclose.cshtml"
|
||||
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 12 "..\..\Views\Job\LogWarrantyDisclose.cshtml"
|
||||
Write(Html.HiddenFor(m => m.WarrantyProviderPropertiesJson));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 12 "..\..\Views\Job\LogWarrantyDisclose.cshtml"
|
||||
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <input");
|
||||
|
||||
WriteLiteral(" type=\"hidden\"");
|
||||
|
||||
WriteLiteral(" name=\"WarrantyAction\"");
|
||||
|
||||
WriteLiteral(" value=\"Submit\"");
|
||||
|
||||
WriteLiteral(" />\r\n");
|
||||
|
||||
WriteLiteral(" <div");
|
||||
|
||||
WriteLiteral(" id=\"warrantyJobForm\"");
|
||||
|
||||
WriteLiteral(" class=\"form\"");
|
||||
|
||||
WriteLiteral(" style=\"width: 650px\"");
|
||||
|
||||
WriteLiteral(">\r\n <table>\r\n <tr>\r\n <th>\r\n I" +
|
||||
"nternal Job Id:\r\n </th>\r\n <td>\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 21 "..\..\Views\Job\LogWarrantyDisclose.cshtml"
|
||||
Write(Model.JobId);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n </td>\r\n </tr>\r\n <tr>\r\n <th" +
|
||||
">\r\n Device Serial Number:\r\n </th>\r\n " +
|
||||
" <td>\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 29 "..\..\Views\Job\LogWarrantyDisclose.cshtml"
|
||||
Write(Model.Job.Device.SerialNumber);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n </td>\r\n </tr>\r\n <tr>\r\n <th" +
|
||||
">\r\n Device Model:\r\n </th>\r\n <td" +
|
||||
">\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 37 "..\..\Views\Job\LogWarrantyDisclose.cshtml"
|
||||
Write(Model.Job.Device.DeviceModel.Manufacturer);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 37 "..\..\Views\Job\LogWarrantyDisclose.cshtml"
|
||||
Write(Model.Job.Device.DeviceModel.Model);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n </td>\r\n </tr>\r\n <tr>\r\n <th" +
|
||||
">\r\n Technician:\r\n </th>\r\n <td>\r" +
|
||||
"\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 45 "..\..\Views\Job\LogWarrantyDisclose.cshtml"
|
||||
Write(Model.TechUser.DisplayName);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n <div");
|
||||
|
||||
WriteLiteral(" class=\"smallMessage\"");
|
||||
|
||||
WriteLiteral(">\r\n Email Address: ");
|
||||
|
||||
|
||||
#line 47 "..\..\Views\Job\LogWarrantyDisclose.cshtml"
|
||||
Write(Model.TechUser.EmailAddress);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("<br />\r\n Phone Number: ");
|
||||
|
||||
|
||||
#line 48 "..\..\Views\Job\LogWarrantyDisclose.cshtml"
|
||||
Write(Model.TechUser.PhoneNumber);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n </div>\r\n </td>\r\n </tr>\r\n " +
|
||||
" <tr>\r\n <th");
|
||||
|
||||
WriteLiteral(" style=\"width: 150px\"");
|
||||
|
||||
WriteLiteral(">\r\n Repair Address:\r\n </th>\r\n <t" +
|
||||
"d>\r\n <div");
|
||||
|
||||
WriteLiteral(" id=\"organisationAddressDetails\"");
|
||||
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 58 "..\..\Views\Job\LogWarrantyDisclose.cshtml"
|
||||
Write(Model.OrganisationAddress.Name);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n <div");
|
||||
|
||||
WriteLiteral(" class=\"smallMessage\"");
|
||||
|
||||
WriteLiteral(">\r\n <span>");
|
||||
|
||||
|
||||
#line 60 "..\..\Views\Job\LogWarrantyDisclose.cshtml"
|
||||
Write(Model.OrganisationAddress.Address);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("</span><br />\r\n <span>");
|
||||
|
||||
|
||||
#line 61 "..\..\Views\Job\LogWarrantyDisclose.cshtml"
|
||||
Write(Model.OrganisationAddress.Suburb);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(", ");
|
||||
|
||||
|
||||
#line 61 "..\..\Views\Job\LogWarrantyDisclose.cshtml"
|
||||
Write(Model.OrganisationAddress.Postcode);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("</span><br />\r\n <span>");
|
||||
|
||||
|
||||
#line 62 "..\..\Views\Job\LogWarrantyDisclose.cshtml"
|
||||
Write(Model.OrganisationAddress.State);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(", ");
|
||||
|
||||
|
||||
#line 62 "..\..\Views\Job\LogWarrantyDisclose.cshtml"
|
||||
Write(Model.OrganisationAddress.Country);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("</span>\r\n </div>\r\n </div>\r\n " +
|
||||
" </td>\r\n </tr>\r\n <tr>\r\n <th>\r\n " +
|
||||
" Warranty Provider:\r\n </th>\r\n <td>\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 72 "..\..\Views\Job\LogWarrantyDisclose.cshtml"
|
||||
Write(Model.WarrantyProvider.Name);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" (");
|
||||
|
||||
|
||||
#line 72 "..\..\Views\Job\LogWarrantyDisclose.cshtml"
|
||||
Write(Model.WarrantyProvider.Id);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(") ");
|
||||
|
||||
|
||||
#line 72 "..\..\Views\Job\LogWarrantyDisclose.cshtml"
|
||||
Write(Model.WarrantyProvider.PluginManifest.Version.ToString(3));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n </td>\r\n </tr>\r\n <tr>\r\n <th" +
|
||||
">\r\n Fault Description:\r\n </th>\r\n " +
|
||||
" <td>\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 80 "..\..\Views\Job\LogWarrantyDisclose.cshtml"
|
||||
Write(Model.FaultDescription.ToMultilineString());
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n </td>\r\n </tr>\r\n <tr>\r\n <th" +
|
||||
">\r\n Disclosed Information\r\n </th>\r\n " +
|
||||
" <td>\r\n <div");
|
||||
|
||||
WriteLiteral(" id=\"warrantyDisclosedInformation\"");
|
||||
|
||||
WriteLiteral(">\r\n <table>\r\n");
|
||||
|
||||
|
||||
#line 90 "..\..\Views\Job\LogWarrantyDisclose.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 90 "..\..\Views\Job\LogWarrantyDisclose.cshtml"
|
||||
foreach (var dp in Model.DiscloseProperties)
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <tr>\r\n <th>");
|
||||
|
||||
|
||||
#line 93 "..\..\Views\Job\LogWarrantyDisclose.cshtml"
|
||||
Write(dp.Key);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(":\r\n </th>\r\n " +
|
||||
" <td>");
|
||||
|
||||
|
||||
#line 95 "..\..\Views\Job\LogWarrantyDisclose.cshtml"
|
||||
Write(dp.Value);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n </td>\r\n </tr" +
|
||||
"> \r\n");
|
||||
|
||||
|
||||
#line 98 "..\..\Views\Job\LogWarrantyDisclose.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" </table>\r\n </div>\r\n </t" +
|
||||
"d>\r\n </tr>\r\n </table>\r\n </div>\r\n");
|
||||
|
||||
WriteLiteral(" <div");
|
||||
|
||||
WriteLiteral(" class=\"actionBar\"");
|
||||
|
||||
WriteLiteral(">\r\n <input");
|
||||
|
||||
WriteLiteral(" type=\"submit\"");
|
||||
|
||||
WriteLiteral(" class=\"button\"");
|
||||
|
||||
WriteLiteral(" value=\"Submit Warranty Claim\"");
|
||||
|
||||
WriteLiteral(" />\r\n </div>\r\n");
|
||||
|
||||
|
||||
#line 108 "..\..\Views\Job\LogWarrantyDisclose.cshtml"
|
||||
}
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
}
|
||||
}
|
||||
}
|
||||
#pragma warning restore 1591
|
||||
@@ -0,0 +1,124 @@
|
||||
@model Disco.Web.Models.Job.LogWarrantyModel
|
||||
@{
|
||||
ViewBag.Title = Html.ToBreadcrumb("Jobs", MVC.Job.Index(), string.Format("Job: {0}", Model.Job.Id), MVC.Job.Show(Model.Job.Id), "Log Warranty Error");
|
||||
}
|
||||
<div class="form" style="width: 650px">
|
||||
<h2>
|
||||
Submission Error</h2>
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
<div>
|
||||
<strong>@Model.Error.Message</strong>
|
||||
</div>
|
||||
<a href="#" id="warrantyJobErrorShow" class="smallMessage">(show more)</a>
|
||||
<div id="warrantyJobErrorMore" style="display: none">
|
||||
<br />
|
||||
<strong>Error Type: </strong>@Model.Error.GetType().Name
|
||||
<br />
|
||||
<strong>Stack Trace:</strong>
|
||||
<div class="code">
|
||||
@Model.Error.StackTrace.ToMultilineString()
|
||||
</div>
|
||||
@if (Model.Error.InnerException != null)
|
||||
{
|
||||
<hr />
|
||||
<div>
|
||||
<strong>Inner Exception:</strong> @Model.Error.InnerException.Message<br />
|
||||
<strong>Error Type:</strong> @Model.Error.GetType().Name<br />
|
||||
<strong>Stack Trace:</strong>
|
||||
<div class="code">
|
||||
@Model.Error.InnerException.StackTrace
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
$('#warrantyJobErrorShow').click(function () {
|
||||
$(this).hide();
|
||||
$('#warrantyJobErrorMore').slideDown();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div id="warrantyJobForm" class="form" style="width: 650px; margin-top: 15px;">
|
||||
<h2>
|
||||
Warranty Submission Details</h2>
|
||||
<table>
|
||||
<tr>
|
||||
<th>
|
||||
Internal Job Id:
|
||||
</th>
|
||||
<td>
|
||||
@Model.JobId
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>
|
||||
Device Serial Number:
|
||||
</th>
|
||||
<td>
|
||||
@Model.Job.Device.SerialNumber
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>
|
||||
Device Model:
|
||||
</th>
|
||||
<td>
|
||||
@Model.Job.Device.DeviceModel.Manufacturer @Model.Job.Device.DeviceModel.Model
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>
|
||||
Technician:
|
||||
</th>
|
||||
<td>
|
||||
@Model.TechUser.DisplayName
|
||||
<div class="smallMessage">
|
||||
Email Address: @Model.TechUser.EmailAddress<br />
|
||||
Phone Number: @Model.TechUser.PhoneNumber
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th style="width: 150px">
|
||||
Repair Address:
|
||||
</th>
|
||||
<td>
|
||||
<div id="organisationAddressDetails">
|
||||
@Model.OrganisationAddress.Name
|
||||
<div class="smallMessage">
|
||||
<span>@Model.OrganisationAddress.Address</span><br />
|
||||
<span>@Model.OrganisationAddress.Suburb, @Model.OrganisationAddress.Postcode</span><br />
|
||||
<span>@Model.OrganisationAddress.State, @Model.OrganisationAddress.Country</span>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>
|
||||
Warranty Provider:
|
||||
</th>
|
||||
<td>
|
||||
@Model.WarrantyProvider.Name (@Model.WarrantyProvider.Id) @Model.WarrantyProvider.PluginManifest.Version.ToString(3)
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>
|
||||
Fault Description:
|
||||
</th>
|
||||
<td>
|
||||
@Model.FaultDescription.ToMultilineString()
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="actionBar">
|
||||
@Html.ActionLinkButton("Try Again", MVC.Job.LogWarranty(Model.JobId, null, null))
|
||||
@Html.ActionLinkButton("Return to Job", MVC.Job.Show(Model.JobId))
|
||||
</div>
|
||||
@@ -0,0 +1,416 @@
|
||||
#pragma warning disable 1591
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.17929
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace Disco.Web.Views.Job
|
||||
{
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Text;
|
||||
using System.Web;
|
||||
using System.Web.Helpers;
|
||||
using System.Web.Mvc;
|
||||
using System.Web.Mvc.Ajax;
|
||||
using System.Web.Mvc.Html;
|
||||
using System.Web.Routing;
|
||||
using System.Web.Security;
|
||||
using System.Web.UI;
|
||||
using System.Web.WebPages;
|
||||
using Disco.BI.Extensions;
|
||||
using Disco.Models.Repository;
|
||||
using Disco.Web;
|
||||
using Disco.Web.Extensions;
|
||||
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "1.5.0.0")]
|
||||
[System.Web.WebPages.PageVirtualPathAttribute("~/Views/Job/LogWarrantyError.cshtml")]
|
||||
public class LogWarrantyError : System.Web.Mvc.WebViewPage<Disco.Web.Models.Job.LogWarrantyModel>
|
||||
{
|
||||
public LogWarrantyError()
|
||||
{
|
||||
}
|
||||
public override void Execute()
|
||||
{
|
||||
|
||||
#line 2 "..\..\Views\Job\LogWarrantyError.cshtml"
|
||||
|
||||
ViewBag.Title = Html.ToBreadcrumb("Jobs", MVC.Job.Index(), string.Format("Job: {0}", Model.Job.Id), MVC.Job.Show(Model.Job.Id), "Log Warranty Error");
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n<div");
|
||||
|
||||
WriteLiteral(" class=\"form\"");
|
||||
|
||||
WriteLiteral(" style=\"width: 650px\"");
|
||||
|
||||
WriteLiteral(">\r\n <h2>\r\n Submission Error</h2>\r\n <table>\r\n <tr>\r\n " +
|
||||
" <td>\r\n <div>\r\n <strong>");
|
||||
|
||||
|
||||
#line 12 "..\..\Views\Job\LogWarrantyError.cshtml"
|
||||
Write(Model.Error.Message);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("</strong>\r\n </div>\r\n <a");
|
||||
|
||||
WriteLiteral(" href=\"#\"");
|
||||
|
||||
WriteLiteral(" id=\"warrantyJobErrorShow\"");
|
||||
|
||||
WriteLiteral(" class=\"smallMessage\"");
|
||||
|
||||
WriteLiteral(">(show more)</a>\r\n <div");
|
||||
|
||||
WriteLiteral(" id=\"warrantyJobErrorMore\"");
|
||||
|
||||
WriteLiteral(" style=\"display: none\"");
|
||||
|
||||
WriteLiteral(">\r\n <br />\r\n <strong>Error Type: </strong>");
|
||||
|
||||
|
||||
#line 17 "..\..\Views\Job\LogWarrantyError.cshtml"
|
||||
Write(Model.Error.GetType().Name);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n <br />\r\n <strong>Stack Trace:</strong>\r\n" +
|
||||
" <div");
|
||||
|
||||
WriteLiteral(" class=\"code\"");
|
||||
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 21 "..\..\Views\Job\LogWarrantyError.cshtml"
|
||||
Write(Model.Error.StackTrace.ToMultilineString());
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n </div>\r\n");
|
||||
|
||||
|
||||
#line 23 "..\..\Views\Job\LogWarrantyError.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 23 "..\..\Views\Job\LogWarrantyError.cshtml"
|
||||
if (Model.Error.InnerException != null)
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <hr />\r\n");
|
||||
|
||||
WriteLiteral(" <div>\r\n <strong>Inner Exceptio" +
|
||||
"n:</strong> ");
|
||||
|
||||
|
||||
#line 27 "..\..\Views\Job\LogWarrantyError.cshtml"
|
||||
Write(Model.Error.InnerException.Message);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("<br />\r\n <strong>Error Type:</strong> ");
|
||||
|
||||
|
||||
#line 28 "..\..\Views\Job\LogWarrantyError.cshtml"
|
||||
Write(Model.Error.GetType().Name);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("<br />\r\n <strong>Stack Trace:</strong>\r\n " +
|
||||
" <div");
|
||||
|
||||
WriteLiteral(" class=\"code\"");
|
||||
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 31 "..\..\Views\Job\LogWarrantyError.cshtml"
|
||||
Write(Model.Error.InnerException.StackTrace);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n </div>\r\n </div>\r\n");
|
||||
|
||||
|
||||
#line 34 "..\..\Views\Job\LogWarrantyError.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" </div>\r\n <script");
|
||||
|
||||
WriteLiteral(" type=\"text/javascript\"");
|
||||
|
||||
WriteLiteral(@">
|
||||
$(function () {
|
||||
$('#warrantyJobErrorShow').click(function () {
|
||||
$(this).hide();
|
||||
$('#warrantyJobErrorMore').slideDown();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div");
|
||||
|
||||
WriteLiteral(" id=\"warrantyJobForm\"");
|
||||
|
||||
WriteLiteral(" class=\"form\"");
|
||||
|
||||
WriteLiteral(" style=\"width: 650px; margin-top: 15px;\"");
|
||||
|
||||
WriteLiteral(">\r\n <h2>\r\n Warranty Submission Details</h2>\r\n <table>\r\n <tr>\r" +
|
||||
"\n <th>\r\n Internal Job Id:\r\n </th>\r\n " +
|
||||
" <td>\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 57 "..\..\Views\Job\LogWarrantyError.cshtml"
|
||||
Write(Model.JobId);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n </td>\r\n </tr>\r\n <tr>\r\n <th>\r\n " +
|
||||
" Device Serial Number:\r\n </th>\r\n <td>\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 65 "..\..\Views\Job\LogWarrantyError.cshtml"
|
||||
Write(Model.Job.Device.SerialNumber);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n </td>\r\n </tr>\r\n <tr>\r\n <th>\r\n " +
|
||||
" Device Model:\r\n </th>\r\n <td>\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 73 "..\..\Views\Job\LogWarrantyError.cshtml"
|
||||
Write(Model.Job.Device.DeviceModel.Manufacturer);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 73 "..\..\Views\Job\LogWarrantyError.cshtml"
|
||||
Write(Model.Job.Device.DeviceModel.Model);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n </td>\r\n </tr>\r\n <tr>\r\n <th>\r\n " +
|
||||
" Technician:\r\n </th>\r\n <td>\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 81 "..\..\Views\Job\LogWarrantyError.cshtml"
|
||||
Write(Model.TechUser.DisplayName);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n <div");
|
||||
|
||||
WriteLiteral(" class=\"smallMessage\"");
|
||||
|
||||
WriteLiteral(">\r\n Email Address: ");
|
||||
|
||||
|
||||
#line 83 "..\..\Views\Job\LogWarrantyError.cshtml"
|
||||
Write(Model.TechUser.EmailAddress);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("<br />\r\n Phone Number: ");
|
||||
|
||||
|
||||
#line 84 "..\..\Views\Job\LogWarrantyError.cshtml"
|
||||
Write(Model.TechUser.PhoneNumber);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n </div>\r\n </td>\r\n </tr>\r\n <tr>\r\n " +
|
||||
" <th");
|
||||
|
||||
WriteLiteral(" style=\"width: 150px\"");
|
||||
|
||||
WriteLiteral(">\r\n Repair Address:\r\n </th>\r\n <td>\r\n " +
|
||||
" <div");
|
||||
|
||||
WriteLiteral(" id=\"organisationAddressDetails\"");
|
||||
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 94 "..\..\Views\Job\LogWarrantyError.cshtml"
|
||||
Write(Model.OrganisationAddress.Name);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n <div");
|
||||
|
||||
WriteLiteral(" class=\"smallMessage\"");
|
||||
|
||||
WriteLiteral(">\r\n <span>");
|
||||
|
||||
|
||||
#line 96 "..\..\Views\Job\LogWarrantyError.cshtml"
|
||||
Write(Model.OrganisationAddress.Address);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("</span><br />\r\n <span>");
|
||||
|
||||
|
||||
#line 97 "..\..\Views\Job\LogWarrantyError.cshtml"
|
||||
Write(Model.OrganisationAddress.Suburb);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(", ");
|
||||
|
||||
|
||||
#line 97 "..\..\Views\Job\LogWarrantyError.cshtml"
|
||||
Write(Model.OrganisationAddress.Postcode);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("</span><br />\r\n <span>");
|
||||
|
||||
|
||||
#line 98 "..\..\Views\Job\LogWarrantyError.cshtml"
|
||||
Write(Model.OrganisationAddress.State);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(", ");
|
||||
|
||||
|
||||
#line 98 "..\..\Views\Job\LogWarrantyError.cshtml"
|
||||
Write(Model.OrganisationAddress.Country);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("</span>\r\n </div>\r\n </div>\r\n </td>\r\n " +
|
||||
" </tr>\r\n <tr>\r\n <th>\r\n Warranty Provider:" +
|
||||
"\r\n </th>\r\n <td>\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 108 "..\..\Views\Job\LogWarrantyError.cshtml"
|
||||
Write(Model.WarrantyProvider.Name);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" (");
|
||||
|
||||
|
||||
#line 108 "..\..\Views\Job\LogWarrantyError.cshtml"
|
||||
Write(Model.WarrantyProvider.Id);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(") ");
|
||||
|
||||
|
||||
#line 108 "..\..\Views\Job\LogWarrantyError.cshtml"
|
||||
Write(Model.WarrantyProvider.PluginManifest.Version.ToString(3));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n </td>\r\n </tr>\r\n <tr>\r\n <th>\r\n " +
|
||||
" Fault Description:\r\n </th>\r\n <td>\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 116 "..\..\Views\Job\LogWarrantyError.cshtml"
|
||||
Write(Model.FaultDescription.ToMultilineString());
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n </td>\r\n </tr>\r\n </table>\r\n</div>\r\n<div");
|
||||
|
||||
WriteLiteral(" class=\"actionBar\"");
|
||||
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 122 "..\..\Views\Job\LogWarrantyError.cshtml"
|
||||
Write(Html.ActionLinkButton("Try Again", MVC.Job.LogWarranty(Model.JobId, null, null)));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 123 "..\..\Views\Job\LogWarrantyError.cshtml"
|
||||
Write(Html.ActionLinkButton("Return to Job", MVC.Job.Show(Model.JobId)));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n</div>\r\n");
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
#pragma warning restore 1591
|
||||
@@ -0,0 +1,56 @@
|
||||
@model Disco.Web.Models.Job.ShowModel
|
||||
@{
|
||||
ViewBag.Title = Html.ToBreadcrumb("Jobs", MVC.Job.Index(), string.Format("Job: {0}", Model.Job.Id.ToString()));
|
||||
Html.BundleDeferred("~/ClientScripts/Modules/Silverlight");
|
||||
Html.BundleDeferred("~/ClientScripts/Modules/jQueryUI-TimePicker");
|
||||
}
|
||||
<div id="Job_Show">
|
||||
<div id="Job_Show_Status">
|
||||
@{ var jobStatusInfo = Model.Job.Status();}
|
||||
<span class="icon JobStatus@(jobStatusInfo.Item1)"></span>@jobStatusInfo.Item2
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
$('#Job_Show_Status').appendTo('#layout_PageHeading')
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
@Html.Partial(MVC.Job.Views.JobParts._Subject, Model)
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
var $tabs = $('#jobDetailTabs');
|
||||
$tabs.tabs({
|
||||
activate: function (event, ui) {
|
||||
window.setTimeout(function () {
|
||||
var $window = $(window);
|
||||
var tabHeight = $tabs.height();
|
||||
var tabOffset = $tabs.offset();
|
||||
var windowScrollTop = $window.scrollTop();
|
||||
var windowHeight = $window.height();
|
||||
|
||||
var tabTopNotShown = windowScrollTop - tabOffset.top;
|
||||
if (tabTopNotShown > 0) {
|
||||
$('html').animate({ scrollTop: tabOffset.top }, 125);
|
||||
} else {
|
||||
var tabBottomNotShown = ((windowScrollTop + windowHeight) - (tabHeight + tabOffset.top)) * -1;
|
||||
if (tabBottomNotShown > 0) {
|
||||
if (tabHeight > windowHeight)
|
||||
$('html').animate({ scrollTop: tabOffset.top }, 125);
|
||||
else
|
||||
$('html').animate({ scrollTop: windowScrollTop + tabBottomNotShown }, 125);
|
||||
}
|
||||
}
|
||||
}, 1);
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<div id="jobDetailTabs">
|
||||
<ul id="jobDetailTabItems">
|
||||
<li><a href="#jobDetailTab-Resources">Log and Attachments</a></li>
|
||||
</ul>
|
||||
<div id="jobDetailTab-Resources" class="jobPart">
|
||||
@Html.Partial(MVC.Job.Views.JobParts.Resources, Model)
|
||||
</div>
|
||||
@Html.Partial(MVC.Job.Views.JobParts.JobMetaAdditions, Model)
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,192 @@
|
||||
#pragma warning disable 1591
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.17929
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace Disco.Web.Views.Job
|
||||
{
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Text;
|
||||
using System.Web;
|
||||
using System.Web.Helpers;
|
||||
using System.Web.Mvc;
|
||||
using System.Web.Mvc.Ajax;
|
||||
using System.Web.Mvc.Html;
|
||||
using System.Web.Routing;
|
||||
using System.Web.Security;
|
||||
using System.Web.UI;
|
||||
using System.Web.WebPages;
|
||||
using Disco.BI.Extensions;
|
||||
using Disco.Models.Repository;
|
||||
using Disco.Web;
|
||||
using Disco.Web.Extensions;
|
||||
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "1.5.0.0")]
|
||||
[System.Web.WebPages.PageVirtualPathAttribute("~/Views/Job/Show.cshtml")]
|
||||
public class Show : System.Web.Mvc.WebViewPage<Disco.Web.Models.Job.ShowModel>
|
||||
{
|
||||
public Show()
|
||||
{
|
||||
}
|
||||
public override void Execute()
|
||||
{
|
||||
|
||||
#line 2 "..\..\Views\Job\Show.cshtml"
|
||||
|
||||
ViewBag.Title = Html.ToBreadcrumb("Jobs", MVC.Job.Index(), string.Format("Job: {0}", Model.Job.Id.ToString()));
|
||||
Html.BundleDeferred("~/ClientScripts/Modules/Silverlight");
|
||||
Html.BundleDeferred("~/ClientScripts/Modules/jQueryUI-TimePicker");
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n<div");
|
||||
|
||||
WriteLiteral(" id=\"Job_Show\"");
|
||||
|
||||
WriteLiteral(">\r\n <div");
|
||||
|
||||
WriteLiteral(" id=\"Job_Show_Status\"");
|
||||
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
|
||||
#line 9 "..\..\Views\Job\Show.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 9 "..\..\Views\Job\Show.cshtml"
|
||||
var jobStatusInfo = Model.Job.Status();
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n <span");
|
||||
|
||||
WriteAttribute("class", Tuple.Create(" class=\"", 420), Tuple.Create("\"", 464)
|
||||
, Tuple.Create(Tuple.Create("", 428), Tuple.Create("icon", 428), true)
|
||||
, Tuple.Create(Tuple.Create(" ", 432), Tuple.Create("JobStatus", 433), true)
|
||||
|
||||
#line 10 "..\..\Views\Job\Show.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 442), Tuple.Create<System.Object, System.Int32>(jobStatusInfo.Item1
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 442), false)
|
||||
);
|
||||
|
||||
WriteLiteral("></span>");
|
||||
|
||||
|
||||
#line 10 "..\..\Views\Job\Show.cshtml"
|
||||
Write(jobStatusInfo.Item2);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n <script");
|
||||
|
||||
WriteLiteral(" type=\"text/javascript\"");
|
||||
|
||||
WriteLiteral(">\r\n $(function () {\r\n $(\'#Job_Show_Status\').appendTo(\'#" +
|
||||
"layout_PageHeading\')\r\n });\r\n </script>\r\n </div>\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 17 "..\..\Views\Job\Show.cshtml"
|
||||
Write(Html.Partial(MVC.Job.Views.JobParts._Subject, Model));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n <script");
|
||||
|
||||
WriteLiteral(" type=\"text/javascript\"");
|
||||
|
||||
WriteLiteral(@">
|
||||
$(function () {
|
||||
var $tabs = $('#jobDetailTabs');
|
||||
$tabs.tabs({
|
||||
activate: function (event, ui) {
|
||||
window.setTimeout(function () {
|
||||
var $window = $(window);
|
||||
var tabHeight = $tabs.height();
|
||||
var tabOffset = $tabs.offset();
|
||||
var windowScrollTop = $window.scrollTop();
|
||||
var windowHeight = $window.height();
|
||||
|
||||
var tabTopNotShown = windowScrollTop - tabOffset.top;
|
||||
if (tabTopNotShown > 0) {
|
||||
$('html').animate({ scrollTop: tabOffset.top }, 125);
|
||||
} else {
|
||||
var tabBottomNotShown = ((windowScrollTop + windowHeight) - (tabHeight + tabOffset.top)) * -1;
|
||||
if (tabBottomNotShown > 0) {
|
||||
if (tabHeight > windowHeight)
|
||||
$('html').animate({ scrollTop: tabOffset.top }, 125);
|
||||
else
|
||||
$('html').animate({ scrollTop: windowScrollTop + tabBottomNotShown }, 125);
|
||||
}
|
||||
}
|
||||
}, 1);
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<div");
|
||||
|
||||
WriteLiteral(" id=\"jobDetailTabs\"");
|
||||
|
||||
WriteLiteral(">\r\n <ul");
|
||||
|
||||
WriteLiteral(" id=\"jobDetailTabItems\"");
|
||||
|
||||
WriteLiteral(">\r\n <li><a");
|
||||
|
||||
WriteLiteral(" href=\"#jobDetailTab-Resources\"");
|
||||
|
||||
WriteLiteral(">Log and Attachments</a></li>\r\n </ul>\r\n <div");
|
||||
|
||||
WriteLiteral(" id=\"jobDetailTab-Resources\"");
|
||||
|
||||
WriteLiteral(" class=\"jobPart\"");
|
||||
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 52 "..\..\Views\Job\Show.cshtml"
|
||||
Write(Html.Partial(MVC.Job.Views.JobParts.Resources, Model));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n </div>\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 54 "..\..\Views\Job\Show.cshtml"
|
||||
Write(Html.Partial(MVC.Job.Views.JobParts.JobMetaAdditions, Model));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n </div>\r\n</div>\r\n");
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
#pragma warning restore 1591
|
||||
@@ -0,0 +1,53 @@
|
||||
@model Disco.Web.Models.Job.WarrantyProviderJobDetailsModel
|
||||
@{ Layout = null;
|
||||
|
||||
if (Model.JobDetailsException != null)
|
||||
{
|
||||
<h3>
|
||||
Error:</h3>
|
||||
<div>
|
||||
<strong>@Model.JobDetailsException.Message</strong>
|
||||
</div>
|
||||
<a href="#" id="warrantyJobDetailsErrorShow" class="smallMessage">(show more)</a>
|
||||
<div id="warrantyJobDetailsErrorMore" style="display: none">
|
||||
<br />
|
||||
<strong>Error Type: </strong>@Model.JobDetailsException.GetType().Name
|
||||
<br />
|
||||
<strong>Stack Trace:</strong>
|
||||
<div class="code">
|
||||
@Model.JobDetailsException.StackTrace.ToMultilineString()
|
||||
</div>
|
||||
@if (Model.JobDetailsException.InnerException != null)
|
||||
{
|
||||
<hr />
|
||||
<div>
|
||||
<strong>Inner Exception:</strong> @Model.JobDetailsException.InnerException.Message<br />
|
||||
<strong>Error Type:</strong> @Model.JobDetailsException.GetType().Name<br />
|
||||
<strong>Stack Trace:</strong>
|
||||
<div class="code">
|
||||
@Model.JobDetailsException.InnerException.StackTrace
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
$('#warrantyJobDetailsErrorShow').click(function () {
|
||||
$(this).hide();
|
||||
$('#warrantyJobDetailsErrorMore').slideDown();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
}
|
||||
else
|
||||
{
|
||||
if (Model.JobDetailsSupported)
|
||||
{
|
||||
@Html.PartialCompiled(Model.ViewType, Model.ViewModel)
|
||||
}
|
||||
else
|
||||
{
|
||||
<span class="smallMessage">@Model.JobDetailsNotSupportedMessage</span>
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,237 @@
|
||||
#pragma warning disable 1591
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.17929
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace Disco.Web.Views.Job
|
||||
{
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Text;
|
||||
using System.Web;
|
||||
using System.Web.Helpers;
|
||||
using System.Web.Mvc;
|
||||
using System.Web.Mvc.Ajax;
|
||||
using System.Web.Mvc.Html;
|
||||
using System.Web.Routing;
|
||||
using System.Web.Security;
|
||||
using System.Web.UI;
|
||||
using System.Web.WebPages;
|
||||
using Disco.BI.Extensions;
|
||||
using Disco.Models.Repository;
|
||||
using Disco.Web;
|
||||
using Disco.Web.Extensions;
|
||||
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "1.5.0.0")]
|
||||
[System.Web.WebPages.PageVirtualPathAttribute("~/Views/Job/WarrantyProviderJobDetails.cshtml")]
|
||||
public class WarrantyProviderJobDetails : System.Web.Mvc.WebViewPage<Disco.Web.Models.Job.WarrantyProviderJobDetailsModel>
|
||||
{
|
||||
public WarrantyProviderJobDetails()
|
||||
{
|
||||
}
|
||||
public override void Execute()
|
||||
{
|
||||
|
||||
#line 2 "..\..\Views\Job\WarrantyProviderJobDetails.cshtml"
|
||||
Layout = null;
|
||||
|
||||
if (Model.JobDetailsException != null)
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <h3>\r\n Error:</h3>\r\n");
|
||||
|
||||
WriteLiteral(" <div>\r\n <strong>");
|
||||
|
||||
|
||||
#line 9 "..\..\Views\Job\WarrantyProviderJobDetails.cshtml"
|
||||
Write(Model.JobDetailsException.Message);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("</strong>\r\n </div>\r\n");
|
||||
|
||||
WriteLiteral(" <a");
|
||||
|
||||
WriteLiteral(" href=\"#\"");
|
||||
|
||||
WriteLiteral(" id=\"warrantyJobDetailsErrorShow\"");
|
||||
|
||||
WriteLiteral(" class=\"smallMessage\"");
|
||||
|
||||
WriteLiteral(">(show more)</a>\r\n");
|
||||
|
||||
WriteLiteral(" <div");
|
||||
|
||||
WriteLiteral(" id=\"warrantyJobDetailsErrorMore\"");
|
||||
|
||||
WriteLiteral(" style=\"display: none\"");
|
||||
|
||||
WriteLiteral(">\r\n <br />\r\n <strong>Error Type: </strong>");
|
||||
|
||||
|
||||
#line 14 "..\..\Views\Job\WarrantyProviderJobDetails.cshtml"
|
||||
Write(Model.JobDetailsException.GetType().Name);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n <br />\r\n <strong>Stack Trace:</strong>\r\n <div");
|
||||
|
||||
WriteLiteral(" class=\"code\"");
|
||||
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 18 "..\..\Views\Job\WarrantyProviderJobDetails.cshtml"
|
||||
Write(Model.JobDetailsException.StackTrace.ToMultilineString());
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n </div>\r\n");
|
||||
|
||||
|
||||
#line 20 "..\..\Views\Job\WarrantyProviderJobDetails.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 20 "..\..\Views\Job\WarrantyProviderJobDetails.cshtml"
|
||||
if (Model.JobDetailsException.InnerException != null)
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <hr />\r\n");
|
||||
|
||||
WriteLiteral(" <div>\r\n <strong>Inner Exception:</strong> ");
|
||||
|
||||
|
||||
#line 24 "..\..\Views\Job\WarrantyProviderJobDetails.cshtml"
|
||||
Write(Model.JobDetailsException.InnerException.Message);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("<br />\r\n <strong>Error Type:</strong> ");
|
||||
|
||||
|
||||
#line 25 "..\..\Views\Job\WarrantyProviderJobDetails.cshtml"
|
||||
Write(Model.JobDetailsException.GetType().Name);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("<br />\r\n <strong>Stack Trace:</strong>\r\n <div");
|
||||
|
||||
WriteLiteral(" class=\"code\"");
|
||||
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 28 "..\..\Views\Job\WarrantyProviderJobDetails.cshtml"
|
||||
Write(Model.JobDetailsException.InnerException.StackTrace);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n </div>\r\n </div>\r\n");
|
||||
|
||||
|
||||
#line 31 "..\..\Views\Job\WarrantyProviderJobDetails.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <script");
|
||||
|
||||
WriteLiteral(" type=\"text/javascript\"");
|
||||
|
||||
WriteLiteral(@">
|
||||
$(function () {
|
||||
$('#warrantyJobDetailsErrorShow').click(function () {
|
||||
$(this).hide();
|
||||
$('#warrantyJobDetailsErrorMore').slideDown();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
");
|
||||
|
||||
|
||||
#line 41 "..\..\Views\Job\WarrantyProviderJobDetails.cshtml"
|
||||
}
|
||||
else
|
||||
{
|
||||
if (Model.JobDetailsSupported)
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 46 "..\..\Views\Job\WarrantyProviderJobDetails.cshtml"
|
||||
Write(Html.PartialCompiled(Model.ViewType, Model.ViewModel));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 46 "..\..\Views\Job\WarrantyProviderJobDetails.cshtml"
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <span");
|
||||
|
||||
WriteLiteral(" class=\"smallMessage\"");
|
||||
|
||||
WriteLiteral(">");
|
||||
|
||||
|
||||
#line 50 "..\..\Views\Job\WarrantyProviderJobDetails.cshtml"
|
||||
Write(Model.JobDetailsNotSupportedMessage);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("</span>\r\n");
|
||||
|
||||
|
||||
#line 51 "..\..\Views\Job\WarrantyProviderJobDetails.cshtml"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n");
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
#pragma warning restore 1591
|
||||
@@ -0,0 +1,34 @@
|
||||
@model Disco.Web.Models.Job.CreateModel
|
||||
<table class="subtleHighlight">
|
||||
<tr>
|
||||
<td style="width: 50%">
|
||||
<h2>
|
||||
Device</h2>
|
||||
@if (Model.Device == null)
|
||||
{
|
||||
<span class="smallMessage">No Device referenced to this Job</span>
|
||||
}
|
||||
else
|
||||
{
|
||||
<span><strong>Serial Number:</strong> @Html.ActionLink(Model.Device.SerialNumber, MVC.Device.Show(Model.Device.SerialNumber))</span><br />
|
||||
<span><strong>Name:</strong> @Model.Device.ComputerName</span><br />
|
||||
<span><strong>Model:</strong> @Model.Device.DeviceModel.ToString()</span><br />
|
||||
<img alt="Model Image" src="@Url.Action(MVC.API.DeviceModel.Image(Model.Device.DeviceModelId, Model.Device.DeviceModel.ImageHash()))" />
|
||||
}
|
||||
</td>
|
||||
<td style="width: 50%">
|
||||
<h2>
|
||||
User</h2>
|
||||
@if (Model.User == null)
|
||||
{
|
||||
<span class="smallMessage">No User referenced to this Job</span>
|
||||
}
|
||||
else
|
||||
{
|
||||
<span><strong>Id:</strong> @Html.ActionLink(Model.User.Id, MVC.User.Show(Model.User.Id))</span><br />
|
||||
<span><strong>Name:</strong> @Model.User.DisplayName</span><br />
|
||||
<span><strong>Type:</strong> @Model.User.Type</span>
|
||||
}
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@@ -0,0 +1,229 @@
|
||||
#pragma warning disable 1591
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.17929
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace Disco.Web.Views.Job
|
||||
{
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Text;
|
||||
using System.Web;
|
||||
using System.Web.Helpers;
|
||||
using System.Web.Mvc;
|
||||
using System.Web.Mvc.Ajax;
|
||||
using System.Web.Mvc.Html;
|
||||
using System.Web.Optimization;
|
||||
using System.Web.Routing;
|
||||
using System.Web.Security;
|
||||
using System.Web.UI;
|
||||
using System.Web.WebPages;
|
||||
using Disco.BI.Extensions;
|
||||
using Disco.Models.Repository;
|
||||
using Disco.Web;
|
||||
using Disco.Web.Extensions;
|
||||
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "1.5.0.0")]
|
||||
[System.Web.WebPages.PageVirtualPathAttribute("~/Views/Job/_CreateSubject-Old.cshtml")]
|
||||
public class CreateSubject_Old : System.Web.Mvc.WebViewPage<Disco.Web.Models.Job.CreateModel>
|
||||
{
|
||||
public CreateSubject_Old()
|
||||
{
|
||||
}
|
||||
public override void Execute()
|
||||
{
|
||||
WriteLiteral("<table");
|
||||
|
||||
WriteLiteral(" class=\"subtleHighlight\"");
|
||||
|
||||
WriteLiteral(">\r\n <tr>\r\n <td");
|
||||
|
||||
WriteLiteral(" style=\"width: 50%\"");
|
||||
|
||||
WriteLiteral(">\r\n <h2>\r\n Device</h2>\r\n");
|
||||
|
||||
|
||||
#line 7 "..\..\Views\Job\_CreateSubject-Old.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 7 "..\..\Views\Job\_CreateSubject-Old.cshtml"
|
||||
if (Model.Device == null)
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <span");
|
||||
|
||||
WriteLiteral(" class=\"smallMessage\"");
|
||||
|
||||
WriteLiteral(">No Device referenced to this Job</span>\r\n");
|
||||
|
||||
|
||||
#line 10 "..\..\Views\Job\_CreateSubject-Old.cshtml"
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <span><strong>Serial Number:</strong> ");
|
||||
|
||||
|
||||
#line 13 "..\..\Views\Job\_CreateSubject-Old.cshtml"
|
||||
Write(Html.ActionLink(Model.Device.SerialNumber, MVC.Device.Show(Model.Device.SerialNumber)));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("</span>");
|
||||
|
||||
WriteLiteral("<br />\r\n");
|
||||
|
||||
WriteLiteral(" <span><strong>Name:</strong> ");
|
||||
|
||||
|
||||
#line 14 "..\..\Views\Job\_CreateSubject-Old.cshtml"
|
||||
Write(Model.Device.ComputerName);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("</span>");
|
||||
|
||||
WriteLiteral("<br />\r\n");
|
||||
|
||||
WriteLiteral(" <span><strong>Model:</strong> ");
|
||||
|
||||
|
||||
#line 15 "..\..\Views\Job\_CreateSubject-Old.cshtml"
|
||||
Write(Model.Device.DeviceModel.ToString());
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("</span>");
|
||||
|
||||
WriteLiteral("<br />\r\n");
|
||||
|
||||
WriteLiteral(" <img");
|
||||
|
||||
WriteLiteral(" alt=\"Model Image\"");
|
||||
|
||||
WriteAttribute("src", Tuple.Create(" src=\"", 730), Tuple.Create("\"", 840)
|
||||
|
||||
#line 16 "..\..\Views\Job\_CreateSubject-Old.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 736), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.API.DeviceModel.Image(Model.Device.DeviceModelId, Model.Device.DeviceModel.ImageHash()))
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 736), false)
|
||||
);
|
||||
|
||||
WriteLiteral(" />\r\n");
|
||||
|
||||
|
||||
#line 17 "..\..\Views\Job\_CreateSubject-Old.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" </td>\r\n <td");
|
||||
|
||||
WriteLiteral(" style=\"width: 50%\"");
|
||||
|
||||
WriteLiteral(">\r\n <h2>\r\n User</h2>\r\n");
|
||||
|
||||
|
||||
#line 22 "..\..\Views\Job\_CreateSubject-Old.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 22 "..\..\Views\Job\_CreateSubject-Old.cshtml"
|
||||
if (Model.User == null)
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <span");
|
||||
|
||||
WriteLiteral(" class=\"smallMessage\"");
|
||||
|
||||
WriteLiteral(">No User referenced to this Job</span>\r\n");
|
||||
|
||||
|
||||
#line 25 "..\..\Views\Job\_CreateSubject-Old.cshtml"
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <span><strong>Id:</strong> ");
|
||||
|
||||
|
||||
#line 28 "..\..\Views\Job\_CreateSubject-Old.cshtml"
|
||||
Write(Html.ActionLink(Model.User.Id, MVC.User.Show(Model.User.Id)));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("</span>");
|
||||
|
||||
WriteLiteral("<br />\r\n");
|
||||
|
||||
WriteLiteral(" <span><strong>Name:</strong> ");
|
||||
|
||||
|
||||
#line 29 "..\..\Views\Job\_CreateSubject-Old.cshtml"
|
||||
Write(Model.User.DisplayName);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("</span>");
|
||||
|
||||
WriteLiteral("<br />\r\n");
|
||||
|
||||
WriteLiteral(" <span><strong>Type:</strong> ");
|
||||
|
||||
|
||||
#line 30 "..\..\Views\Job\_CreateSubject-Old.cshtml"
|
||||
Write(Model.User.Type);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("</span>\r\n");
|
||||
|
||||
|
||||
#line 31 "..\..\Views\Job\_CreateSubject-Old.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" </td>\r\n </tr>\r\n</table>");
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
#pragma warning restore 1591
|
||||
@@ -0,0 +1,41 @@
|
||||
@model Disco.Web.Models.Job.CreateModel
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
<h2>Device</h2>
|
||||
</td>
|
||||
@if (Model.Device != null)
|
||||
{
|
||||
<td style="width: 64px">
|
||||
<img class="modelImage" alt="Model Image" src="@Url.Action(MVC.API.DeviceModel.Image(Model.Device.DeviceModelId, Model.Device.DeviceModel.ImageHash()))" />
|
||||
</td>
|
||||
}
|
||||
<td style="width: 50%">
|
||||
@if (Model.Device == null)
|
||||
{
|
||||
<span class="smallMessage">No Device referenced to this Job</span>
|
||||
}
|
||||
else
|
||||
{
|
||||
<span><strong>Serial Number:</strong> @Model.Device.SerialNumber</span><br />
|
||||
<span><strong>Name:</strong> @Model.Device.ComputerName</span><br />
|
||||
<span><strong>Model:</strong> @Model.Device.DeviceModel.ToString()</span><br />
|
||||
}
|
||||
</td>
|
||||
<td>
|
||||
<h2>User</h2>
|
||||
</td>
|
||||
<td style="width: 50%">
|
||||
@if (Model.User == null)
|
||||
{
|
||||
<span class="smallMessage">No User referenced to this Job</span>
|
||||
}
|
||||
else
|
||||
{
|
||||
<span><strong>Id:</strong> @Model.User.Id</span><br />
|
||||
<span><strong>Name:</strong> @Model.User.DisplayName</span><br />
|
||||
<span><strong>Type:</strong> @Model.User.Type</span>
|
||||
}
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@@ -0,0 +1,254 @@
|
||||
#pragma warning disable 1591
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.17929
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace Disco.Web.Views.Job
|
||||
{
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Text;
|
||||
using System.Web;
|
||||
using System.Web.Helpers;
|
||||
using System.Web.Mvc;
|
||||
using System.Web.Mvc.Ajax;
|
||||
using System.Web.Mvc.Html;
|
||||
using System.Web.Routing;
|
||||
using System.Web.Security;
|
||||
using System.Web.UI;
|
||||
using System.Web.WebPages;
|
||||
using Disco.BI.Extensions;
|
||||
using Disco.Models.Repository;
|
||||
using Disco.Web;
|
||||
using Disco.Web.Extensions;
|
||||
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "1.5.0.0")]
|
||||
[System.Web.WebPages.PageVirtualPathAttribute("~/Views/Job/_CreateSubject.cshtml")]
|
||||
public class CreateSubject : System.Web.Mvc.WebViewPage<Disco.Web.Models.Job.CreateModel>
|
||||
{
|
||||
public CreateSubject()
|
||||
{
|
||||
}
|
||||
public override void Execute()
|
||||
{
|
||||
WriteLiteral("<table>\r\n <tr>\r\n <td>\r\n <h2>Device</h2>\r\n </td>\r\n");
|
||||
|
||||
|
||||
#line 7 "..\..\Views\Job\_CreateSubject.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 7 "..\..\Views\Job\_CreateSubject.cshtml"
|
||||
if (Model.Device != null)
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <td");
|
||||
|
||||
WriteLiteral(" style=\"width: 64px\"");
|
||||
|
||||
WriteLiteral(">\r\n <img");
|
||||
|
||||
WriteLiteral(" class=\"modelImage\"");
|
||||
|
||||
WriteLiteral(" alt=\"Model Image\"");
|
||||
|
||||
WriteAttribute("src", Tuple.Create(" src=\"", 260), Tuple.Create("\"", 370)
|
||||
|
||||
#line 10 "..\..\Views\Job\_CreateSubject.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 266), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.API.DeviceModel.Image(Model.Device.DeviceModelId, Model.Device.DeviceModel.ImageHash()))
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 266), false)
|
||||
);
|
||||
|
||||
WriteLiteral(" />\r\n </td>\r\n");
|
||||
|
||||
|
||||
#line 12 "..\..\Views\Job\_CreateSubject.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <td");
|
||||
|
||||
WriteLiteral(" style=\"width: 50%\"");
|
||||
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
|
||||
#line 14 "..\..\Views\Job\_CreateSubject.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 14 "..\..\Views\Job\_CreateSubject.cshtml"
|
||||
if (Model.Device == null)
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <span");
|
||||
|
||||
WriteLiteral(" class=\"smallMessage\"");
|
||||
|
||||
WriteLiteral(">No Device referenced to this Job</span>\r\n");
|
||||
|
||||
|
||||
#line 17 "..\..\Views\Job\_CreateSubject.cshtml"
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <span><strong>Serial Number:</strong> ");
|
||||
|
||||
|
||||
#line 20 "..\..\Views\Job\_CreateSubject.cshtml"
|
||||
Write(Model.Device.SerialNumber);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("</span>");
|
||||
|
||||
WriteLiteral("<br />\r\n");
|
||||
|
||||
WriteLiteral(" <span><strong>Name:</strong> ");
|
||||
|
||||
|
||||
#line 21 "..\..\Views\Job\_CreateSubject.cshtml"
|
||||
Write(Model.Device.ComputerName);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("</span>");
|
||||
|
||||
WriteLiteral("<br />\r\n");
|
||||
|
||||
WriteLiteral(" <span><strong>Model:</strong> ");
|
||||
|
||||
|
||||
#line 22 "..\..\Views\Job\_CreateSubject.cshtml"
|
||||
Write(Model.Device.DeviceModel.ToString());
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("</span>");
|
||||
|
||||
WriteLiteral("<br />\r\n");
|
||||
|
||||
|
||||
#line 23 "..\..\Views\Job\_CreateSubject.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" </td>\r\n <td>\r\n <h2>User</h2>\r\n </td>\r\n <t" +
|
||||
"d");
|
||||
|
||||
WriteLiteral(" style=\"width: 50%\"");
|
||||
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
|
||||
#line 29 "..\..\Views\Job\_CreateSubject.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 29 "..\..\Views\Job\_CreateSubject.cshtml"
|
||||
if (Model.User == null)
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <span");
|
||||
|
||||
WriteLiteral(" class=\"smallMessage\"");
|
||||
|
||||
WriteLiteral(">No User referenced to this Job</span>\r\n");
|
||||
|
||||
|
||||
#line 32 "..\..\Views\Job\_CreateSubject.cshtml"
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <span><strong>Id:</strong> ");
|
||||
|
||||
|
||||
#line 35 "..\..\Views\Job\_CreateSubject.cshtml"
|
||||
Write(Model.User.Id);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("</span>");
|
||||
|
||||
WriteLiteral("<br />\r\n");
|
||||
|
||||
WriteLiteral(" <span><strong>Name:</strong> ");
|
||||
|
||||
|
||||
#line 36 "..\..\Views\Job\_CreateSubject.cshtml"
|
||||
Write(Model.User.DisplayName);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("</span>");
|
||||
|
||||
WriteLiteral("<br />\r\n");
|
||||
|
||||
WriteLiteral(" <span><strong>Type:</strong> ");
|
||||
|
||||
|
||||
#line 37 "..\..\Views\Job\_CreateSubject.cshtml"
|
||||
Write(Model.User.Type);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("</span>\r\n");
|
||||
|
||||
|
||||
#line 38 "..\..\Views\Job\_CreateSubject.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" </td>\r\n </tr>\r\n</table>\r\n");
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
#pragma warning restore 1591
|
||||
@@ -0,0 +1,3 @@
|
||||
@{
|
||||
Html.BundleDeferred("~/Style/Job");
|
||||
}
|
||||
@@ -0,0 +1,54 @@
|
||||
#pragma warning disable 1591
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.17929
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace Disco.Web.Views.Job
|
||||
{
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Text;
|
||||
using System.Web;
|
||||
using System.Web.Helpers;
|
||||
using System.Web.Mvc;
|
||||
using System.Web.Mvc.Ajax;
|
||||
using System.Web.Mvc.Html;
|
||||
using System.Web.Routing;
|
||||
using System.Web.Security;
|
||||
using System.Web.UI;
|
||||
using System.Web.WebPages;
|
||||
using Disco.BI.Extensions;
|
||||
using Disco.Models.Repository;
|
||||
using Disco.Web;
|
||||
using Disco.Web.Extensions;
|
||||
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "1.5.0.0")]
|
||||
[System.Web.WebPages.PageVirtualPathAttribute("~/Views/Job/_ViewStart.cshtml")]
|
||||
public class ViewStart : System.Web.Mvc.ViewStartPage
|
||||
{
|
||||
public ViewStart()
|
||||
{
|
||||
}
|
||||
public override void Execute()
|
||||
{
|
||||
|
||||
#line 1 "..\..\Views\Job\_ViewStart.cshtml"
|
||||
|
||||
Html.BundleDeferred("~/Style/Job");
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
}
|
||||
}
|
||||
}
|
||||
#pragma warning restore 1591
|
||||
@@ -0,0 +1,37 @@
|
||||
@model Disco.Web.Models.Search.QueryModel
|
||||
@{
|
||||
ViewBag.Title = "Search Results";
|
||||
}
|
||||
<h2>
|
||||
Query: '<span style="font-weight: bold;">@(Model.FriendlyTerm != null ? Model.FriendlyTerm : Model.Term)</span>'</h2>
|
||||
@if (Model.Success)
|
||||
{
|
||||
if (Model.Jobs != null)
|
||||
{
|
||||
<h2>
|
||||
Jobs</h2>
|
||||
<div>
|
||||
@Html.Partial(MVC.Shared.Views._JobTable, @Model.Jobs)
|
||||
</div>
|
||||
}
|
||||
if (Model.Devices != null)
|
||||
{
|
||||
<h2>
|
||||
Devices</h2>
|
||||
<div>
|
||||
@Html.Partial(MVC.Device.Views._DeviceTable, @Model.Devices)
|
||||
</div>
|
||||
}
|
||||
if (Model.Users != null)
|
||||
{
|
||||
<h2>
|
||||
Users</h2>
|
||||
<div>
|
||||
@Html.Partial(MVC.User.Views._UserTable, @Model.Users)
|
||||
</div>
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
<h2>@Model.ErrorMessage</h2>
|
||||
}
|
||||
@@ -0,0 +1,169 @@
|
||||
#pragma warning disable 1591
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.17929
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace Disco.Web.Views.Search
|
||||
{
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Text;
|
||||
using System.Web;
|
||||
using System.Web.Helpers;
|
||||
using System.Web.Mvc;
|
||||
using System.Web.Mvc.Ajax;
|
||||
using System.Web.Mvc.Html;
|
||||
using System.Web.Routing;
|
||||
using System.Web.Security;
|
||||
using System.Web.UI;
|
||||
using System.Web.WebPages;
|
||||
using Disco.BI.Extensions;
|
||||
using Disco.Models.Repository;
|
||||
using Disco.Web;
|
||||
using Disco.Web.Extensions;
|
||||
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "1.5.0.0")]
|
||||
[System.Web.WebPages.PageVirtualPathAttribute("~/Views/Search/Query.cshtml")]
|
||||
public class Query : System.Web.Mvc.WebViewPage<Disco.Web.Models.Search.QueryModel>
|
||||
{
|
||||
public Query()
|
||||
{
|
||||
}
|
||||
public override void Execute()
|
||||
{
|
||||
|
||||
#line 2 "..\..\Views\Search\Query.cshtml"
|
||||
|
||||
ViewBag.Title = "Search Results";
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n<h2>\r\n Query: \'<span");
|
||||
|
||||
WriteLiteral(" style=\"font-weight: bold;\"");
|
||||
|
||||
WriteLiteral(">");
|
||||
|
||||
|
||||
#line 6 "..\..\Views\Search\Query.cshtml"
|
||||
Write(Model.FriendlyTerm != null ? Model.FriendlyTerm : Model.Term);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("</span>\'</h2>\r\n");
|
||||
|
||||
|
||||
#line 7 "..\..\Views\Search\Query.cshtml"
|
||||
if (Model.Success)
|
||||
{
|
||||
if (Model.Jobs != null)
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <h2>\r\n Jobs</h2>\r\n");
|
||||
|
||||
WriteLiteral(" <div>\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 14 "..\..\Views\Search\Query.cshtml"
|
||||
Write(Html.Partial(MVC.Shared.Views._JobTable, @Model.Jobs));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n </div>\r\n");
|
||||
|
||||
|
||||
#line 16 "..\..\Views\Search\Query.cshtml"
|
||||
}
|
||||
if (Model.Devices != null)
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <h2>\r\n Devices</h2>\r\n");
|
||||
|
||||
WriteLiteral(" <div>\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 22 "..\..\Views\Search\Query.cshtml"
|
||||
Write(Html.Partial(MVC.Device.Views._DeviceTable, @Model.Devices));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n </div>\r\n");
|
||||
|
||||
|
||||
#line 24 "..\..\Views\Search\Query.cshtml"
|
||||
}
|
||||
if (Model.Users != null)
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <h2>\r\n Users</h2>\r\n");
|
||||
|
||||
WriteLiteral(" <div>\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 30 "..\..\Views\Search\Query.cshtml"
|
||||
Write(Html.Partial(MVC.User.Views._UserTable, @Model.Users));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n </div>\r\n");
|
||||
|
||||
|
||||
#line 32 "..\..\Views\Search\Query.cshtml"
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <h2>");
|
||||
|
||||
|
||||
#line 36 "..\..\Views\Search\Query.cshtml"
|
||||
Write(Model.ErrorMessage);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("</h2>\r\n");
|
||||
|
||||
|
||||
#line 37 "..\..\Views\Search\Query.cshtml"
|
||||
}
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
}
|
||||
}
|
||||
}
|
||||
#pragma warning restore 1591
|
||||
@@ -0,0 +1,10 @@
|
||||
@model System.Web.Mvc.HandleErrorInfo
|
||||
|
||||
@{
|
||||
ViewBag.Title = "Error";
|
||||
}
|
||||
|
||||
<hgroup class="title">
|
||||
<h1 class="error">Error.</h1>
|
||||
<h2 class="error">An error occurred while processing your request.</h2>
|
||||
</hgroup>
|
||||
@@ -0,0 +1,68 @@
|
||||
#pragma warning disable 1591
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.17929
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace Disco.Web.Views.Shared
|
||||
{
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Text;
|
||||
using System.Web;
|
||||
using System.Web.Helpers;
|
||||
using System.Web.Mvc;
|
||||
using System.Web.Mvc.Ajax;
|
||||
using System.Web.Mvc.Html;
|
||||
using System.Web.Routing;
|
||||
using System.Web.Security;
|
||||
using System.Web.UI;
|
||||
using System.Web.WebPages;
|
||||
using Disco.BI.Extensions;
|
||||
using Disco.Models.Repository;
|
||||
using Disco.Web;
|
||||
using Disco.Web.Extensions;
|
||||
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "1.5.0.0")]
|
||||
[System.Web.WebPages.PageVirtualPathAttribute("~/Views/Shared/Error.cshtml")]
|
||||
public class Error : System.Web.Mvc.WebViewPage<System.Web.Mvc.HandleErrorInfo>
|
||||
{
|
||||
public Error()
|
||||
{
|
||||
}
|
||||
public override void Execute()
|
||||
{
|
||||
|
||||
#line 3 "..\..\Views\Shared\Error.cshtml"
|
||||
|
||||
ViewBag.Title = "Error";
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n\r\n<hgroup");
|
||||
|
||||
WriteLiteral(" class=\"title\"");
|
||||
|
||||
WriteLiteral(">\r\n <h1");
|
||||
|
||||
WriteLiteral(" class=\"error\"");
|
||||
|
||||
WriteLiteral(">Error.</h1>\r\n <h2");
|
||||
|
||||
WriteLiteral(" class=\"error\"");
|
||||
|
||||
WriteLiteral(">An error occurred while processing your request.</h2>\r\n</hgroup>\r\n");
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
#pragma warning restore 1591
|
||||
@@ -0,0 +1,22 @@
|
||||
@{
|
||||
Html.BundleDeferred("~/Style/Dialog");
|
||||
Html.BundleDeferred("~/Style/Site");
|
||||
Html.BundleDeferred("~/ClientScripts/Core");
|
||||
}
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Disco - @CommonHelpers.BreadcrumbsTitle(ViewBag.Title)</title>
|
||||
<link rel="shortcut icon" href="/favicon.ico" />
|
||||
<meta name="application-name" content="Disco" />
|
||||
<meta name="msapplication-starturl" content="/" />
|
||||
<meta name="msapplication-tooltip" content="Open Disco" />
|
||||
@Html.BundleRenderDeferred()
|
||||
@RenderSection("head", false)
|
||||
</head>
|
||||
<body class="layoutDialog">
|
||||
<section id="layout_Page">
|
||||
@RenderBody()
|
||||
</section>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,132 @@
|
||||
#pragma warning disable 1591
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.17929
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace Disco.Web.Views.Shared
|
||||
{
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Text;
|
||||
using System.Web;
|
||||
using System.Web.Helpers;
|
||||
using System.Web.Mvc;
|
||||
using System.Web.Mvc.Ajax;
|
||||
using System.Web.Mvc.Html;
|
||||
using System.Web.Routing;
|
||||
using System.Web.Security;
|
||||
using System.Web.UI;
|
||||
using System.Web.WebPages;
|
||||
using Disco.BI.Extensions;
|
||||
using Disco.Models.Repository;
|
||||
using Disco.Web;
|
||||
using Disco.Web.Extensions;
|
||||
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "1.5.0.0")]
|
||||
[System.Web.WebPages.PageVirtualPathAttribute("~/Views/Shared/_DialogLayout.cshtml")]
|
||||
public class DialogLayout : System.Web.Mvc.WebViewPage<dynamic>
|
||||
{
|
||||
public DialogLayout()
|
||||
{
|
||||
}
|
||||
public override void Execute()
|
||||
{
|
||||
|
||||
#line 1 "..\..\Views\Shared\_DialogLayout.cshtml"
|
||||
|
||||
Html.BundleDeferred("~/Style/Dialog");
|
||||
Html.BundleDeferred("~/Style/Site");
|
||||
Html.BundleDeferred("~/ClientScripts/Core");
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n<!doctype html>\r\n<html>\r\n<head>\r\n <title>Disco - ");
|
||||
|
||||
|
||||
#line 9 "..\..\Views\Shared\_DialogLayout.cshtml"
|
||||
Write(CommonHelpers.BreadcrumbsTitle(ViewBag.Title));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("</title>\r\n <link");
|
||||
|
||||
WriteLiteral(" rel=\"shortcut icon\"");
|
||||
|
||||
WriteLiteral(" href=\"/favicon.ico\"");
|
||||
|
||||
WriteLiteral(" />\r\n <meta");
|
||||
|
||||
WriteLiteral(" name=\"application-name\"");
|
||||
|
||||
WriteLiteral(" content=\"Disco\"");
|
||||
|
||||
WriteLiteral(" />\r\n <meta");
|
||||
|
||||
WriteLiteral(" name=\"msapplication-starturl\"");
|
||||
|
||||
WriteLiteral(" content=\"/\"");
|
||||
|
||||
WriteLiteral(" />\r\n <meta");
|
||||
|
||||
WriteLiteral(" name=\"msapplication-tooltip\"");
|
||||
|
||||
WriteLiteral(" content=\"Open Disco\"");
|
||||
|
||||
WriteLiteral(" />\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 14 "..\..\Views\Shared\_DialogLayout.cshtml"
|
||||
Write(Html.BundleRenderDeferred());
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 15 "..\..\Views\Shared\_DialogLayout.cshtml"
|
||||
Write(RenderSection("head", false));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n</head>\r\n<body");
|
||||
|
||||
WriteLiteral(" class=\"layoutDialog\"");
|
||||
|
||||
WriteLiteral(">\r\n <section");
|
||||
|
||||
WriteLiteral(" id=\"layout_Page\"");
|
||||
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 19 "..\..\Views\Shared\_DialogLayout.cshtml"
|
||||
Write(RenderBody());
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n </section>\r\n</body>\r\n</html>");
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
#pragma warning restore 1591
|
||||
@@ -0,0 +1,21 @@
|
||||
@{
|
||||
Html.BundleDeferred("~/Style/Site");
|
||||
Html.BundleDeferred("~/ClientScripts/Core");
|
||||
}
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Disco - @CommonHelpers.BreadcrumbsTitle(ViewBag.Title)</title>
|
||||
<link rel="shortcut icon" href="/favicon.ico" />
|
||||
<meta name="application-name" content="Disco" />
|
||||
<meta name="msapplication-starturl" content="/" />
|
||||
<meta name="msapplication-tooltip" content="Open Disco" />
|
||||
@Html.BundleRenderDeferred()
|
||||
@RenderSection("head", false)
|
||||
</head>
|
||||
<body class="layoutEmpty">
|
||||
<section id="layout_Page">
|
||||
@RenderBody()
|
||||
</section>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,131 @@
|
||||
#pragma warning disable 1591
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.17929
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace Disco.Web.Views.Shared
|
||||
{
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Text;
|
||||
using System.Web;
|
||||
using System.Web.Helpers;
|
||||
using System.Web.Mvc;
|
||||
using System.Web.Mvc.Ajax;
|
||||
using System.Web.Mvc.Html;
|
||||
using System.Web.Routing;
|
||||
using System.Web.Security;
|
||||
using System.Web.UI;
|
||||
using System.Web.WebPages;
|
||||
using Disco.BI.Extensions;
|
||||
using Disco.Models.Repository;
|
||||
using Disco.Web;
|
||||
using Disco.Web.Extensions;
|
||||
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "1.5.0.0")]
|
||||
[System.Web.WebPages.PageVirtualPathAttribute("~/Views/Shared/_EmptyLayout.cshtml")]
|
||||
public class EmptyLayout : System.Web.Mvc.WebViewPage<dynamic>
|
||||
{
|
||||
public EmptyLayout()
|
||||
{
|
||||
}
|
||||
public override void Execute()
|
||||
{
|
||||
|
||||
#line 1 "..\..\Views\Shared\_EmptyLayout.cshtml"
|
||||
|
||||
Html.BundleDeferred("~/Style/Site");
|
||||
Html.BundleDeferred("~/ClientScripts/Core");
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n<!doctype html>\r\n<html>\r\n<head>\r\n <title>Disco - ");
|
||||
|
||||
|
||||
#line 8 "..\..\Views\Shared\_EmptyLayout.cshtml"
|
||||
Write(CommonHelpers.BreadcrumbsTitle(ViewBag.Title));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("</title>\r\n <link");
|
||||
|
||||
WriteLiteral(" rel=\"shortcut icon\"");
|
||||
|
||||
WriteLiteral(" href=\"/favicon.ico\"");
|
||||
|
||||
WriteLiteral(" />\r\n <meta");
|
||||
|
||||
WriteLiteral(" name=\"application-name\"");
|
||||
|
||||
WriteLiteral(" content=\"Disco\"");
|
||||
|
||||
WriteLiteral(" />\r\n <meta");
|
||||
|
||||
WriteLiteral(" name=\"msapplication-starturl\"");
|
||||
|
||||
WriteLiteral(" content=\"/\"");
|
||||
|
||||
WriteLiteral(" />\r\n <meta");
|
||||
|
||||
WriteLiteral(" name=\"msapplication-tooltip\"");
|
||||
|
||||
WriteLiteral(" content=\"Open Disco\"");
|
||||
|
||||
WriteLiteral(" />\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 13 "..\..\Views\Shared\_EmptyLayout.cshtml"
|
||||
Write(Html.BundleRenderDeferred());
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 14 "..\..\Views\Shared\_EmptyLayout.cshtml"
|
||||
Write(RenderSection("head", false));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n</head>\r\n<body");
|
||||
|
||||
WriteLiteral(" class=\"layoutEmpty\"");
|
||||
|
||||
WriteLiteral(">\r\n <section");
|
||||
|
||||
WriteLiteral(" id=\"layout_Page\"");
|
||||
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 18 "..\..\Views\Shared\_EmptyLayout.cshtml"
|
||||
Write(RenderBody());
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n </section>\r\n</body>\r\n</html>\r\n");
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
#pragma warning restore 1591
|
||||
@@ -0,0 +1,27 @@
|
||||
@model Disco.Models.BI.Job.JobTableModel
|
||||
@if (DiscoApplication.MultiSiteMode)
|
||||
{
|
||||
if (Model == null || Model.Items == null || Model.Items.Count == 0)
|
||||
{
|
||||
<span class="smallMessage">No Jobs Found</span>
|
||||
}
|
||||
else
|
||||
{
|
||||
var modelItems = Model.Items;
|
||||
var modelItemsGrouped = modelItems.OrderBy(i => i.DeviceAddress).GroupBy(i => i.DeviceAddress);
|
||||
foreach (var modelItemsGroup in modelItemsGrouped)
|
||||
{
|
||||
Model.Items = modelItemsGroup.ToList();
|
||||
if (modelItemsGroup.Key != null)
|
||||
{
|
||||
<h3>
|
||||
@modelItemsGroup.Key</h3>
|
||||
}
|
||||
@Html.Partial(MVC.Shared.Views._JobTableRender, Model, new ViewDataDictionary())
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@Html.Partial(MVC.Shared.Views._JobTableRender, Model, new ViewDataDictionary())
|
||||
}
|
||||
@@ -0,0 +1,131 @@
|
||||
#pragma warning disable 1591
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.17929
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace Disco.Web.Views.Shared
|
||||
{
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Text;
|
||||
using System.Web;
|
||||
using System.Web.Helpers;
|
||||
using System.Web.Mvc;
|
||||
using System.Web.Mvc.Ajax;
|
||||
using System.Web.Mvc.Html;
|
||||
using System.Web.Routing;
|
||||
using System.Web.Security;
|
||||
using System.Web.UI;
|
||||
using System.Web.WebPages;
|
||||
using Disco.BI.Extensions;
|
||||
using Disco.Models.Repository;
|
||||
using Disco.Web;
|
||||
using Disco.Web.Extensions;
|
||||
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "1.5.0.0")]
|
||||
[System.Web.WebPages.PageVirtualPathAttribute("~/Views/Shared/_JobTable.cshtml")]
|
||||
public class JobTable : System.Web.Mvc.WebViewPage<Disco.Models.BI.Job.JobTableModel>
|
||||
{
|
||||
public JobTable()
|
||||
{
|
||||
}
|
||||
public override void Execute()
|
||||
{
|
||||
|
||||
#line 2 "..\..\Views\Shared\_JobTable.cshtml"
|
||||
if (DiscoApplication.MultiSiteMode)
|
||||
{
|
||||
if (Model == null || Model.Items == null || Model.Items.Count == 0)
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <span");
|
||||
|
||||
WriteLiteral(" class=\"smallMessage\"");
|
||||
|
||||
WriteLiteral(">No Jobs Found</span>\r\n");
|
||||
|
||||
|
||||
#line 7 "..\..\Views\Shared\_JobTable.cshtml"
|
||||
}
|
||||
else
|
||||
{
|
||||
var modelItems = Model.Items;
|
||||
var modelItemsGrouped = modelItems.OrderBy(i => i.DeviceAddress).GroupBy(i => i.DeviceAddress);
|
||||
foreach (var modelItemsGroup in modelItemsGrouped)
|
||||
{
|
||||
Model.Items = modelItemsGroup.ToList();
|
||||
if (modelItemsGroup.Key != null)
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <h3>\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 18 "..\..\Views\Shared\_JobTable.cshtml"
|
||||
Write(modelItemsGroup.Key);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("</h3>\r\n");
|
||||
|
||||
|
||||
#line 19 "..\..\Views\Shared\_JobTable.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 20 "..\..\Views\Shared\_JobTable.cshtml"
|
||||
Write(Html.Partial(MVC.Shared.Views._JobTableRender, Model, new ViewDataDictionary()));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 20 "..\..\Views\Shared\_JobTable.cshtml"
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 26 "..\..\Views\Shared\_JobTable.cshtml"
|
||||
Write(Html.Partial(MVC.Shared.Views._JobTableRender, Model, new ViewDataDictionary()));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 26 "..\..\Views\Shared\_JobTable.cshtml"
|
||||
|
||||
}
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
}
|
||||
}
|
||||
}
|
||||
#pragma warning restore 1591
|
||||
@@ -0,0 +1,108 @@
|
||||
@model Disco.Models.BI.Job.JobTableModel
|
||||
@{
|
||||
Html.BundleDeferred("~/ClientScripts/Modules/Disco-DataTableHelpers");
|
||||
}
|
||||
<div class="jobTable">
|
||||
@if (Model != null && Model.Items.Count() > 0)
|
||||
{
|
||||
<table class="jobTable@(Model.IsSmallTable ? " smallTable" : string.Empty)@(Model.HideClosedJobs ? " hideStatusClosed" : string.Empty)">
|
||||
<thead>
|
||||
<tr>
|
||||
@if (Model.ShowId)
|
||||
{ <th class="id">
|
||||
Ref
|
||||
</th> }
|
||||
@if (Model.ShowStatus)
|
||||
{ <th class="status">
|
||||
Status
|
||||
</th> }
|
||||
@if (Model.ShowDates)
|
||||
{ <th class="dates">
|
||||
Dates
|
||||
</th> }
|
||||
@if (Model.ShowType)
|
||||
{ <th class="type">
|
||||
Type
|
||||
</th> }
|
||||
@if (Model.ShowDevice)
|
||||
{<th class="device">
|
||||
Device
|
||||
</th> }
|
||||
@if (Model.ShowUser)
|
||||
{ <th class="user">
|
||||
User
|
||||
</th> }
|
||||
@if (Model.ShowTechnician)
|
||||
{ <th class="technician">
|
||||
Technician
|
||||
</th> }
|
||||
@if (Model.ShowLocation)
|
||||
{ <th class="location">
|
||||
Location
|
||||
</th> }
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach (var item in Model.Items)
|
||||
{
|
||||
<tr data-id="@(item.Id)" data-status="@(Model.ShowStatus ? item.StatusId : null)">
|
||||
@if (Model.ShowId)
|
||||
{ <td class="id">
|
||||
@Html.ActionLink(item.Id.ToString(), MVC.Job.Show(item.Id))
|
||||
</td> }
|
||||
@if (Model.ShowStatus)
|
||||
{ <td class="status">
|
||||
<span class="icon JobStatus@(item.StatusId)"></span>
|
||||
@item.StatusDescription
|
||||
</td> }
|
||||
@if (Model.ShowDates)
|
||||
{ <td class="dates">
|
||||
@CommonHelpers.FriendlyDate(item.OpenedDate)
|
||||
- @CommonHelpers.FriendlyDate(item.ClosedDate)
|
||||
</td>}
|
||||
@if (Model.ShowType)
|
||||
{ <td class="type">
|
||||
<span title="@item.TypeDescription">@item.TypeId</span>
|
||||
</td>}
|
||||
@if (Model.ShowDevice)
|
||||
{ <td class="device">
|
||||
@if (item.DeviceSerialNumber != null)
|
||||
{
|
||||
@Html.ActionLink(item.DeviceSerialNumber, MVC.Device.Show(item.DeviceSerialNumber), new { Title = item.DeviceModelDescription })
|
||||
}
|
||||
else
|
||||
{
|
||||
<span class="smallMessage">N/A</span>
|
||||
}
|
||||
</td> }
|
||||
@if (Model.ShowUser)
|
||||
{<td class="user">
|
||||
@if (item.UserId != null)
|
||||
{
|
||||
@Html.ActionLink(string.Format("{0} ({1})", item.UserDisplayName, item.UserId), MVC.User.Show(item.UserId))
|
||||
}
|
||||
else
|
||||
{
|
||||
<span class="smallMessage">N/A</span>
|
||||
}
|
||||
</td>}
|
||||
@if (Model.ShowTechnician)
|
||||
{ <td class="technician">
|
||||
<span title="@item.OpenedTechUserDisplayName">@item.OpenedTechUserId
|
||||
</span>
|
||||
</td>}
|
||||
@if (Model.ShowLocation)
|
||||
{ <td class="technician">
|
||||
<span>@(item.Location ?? "Unknown")
|
||||
</span>
|
||||
</td>}
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
}
|
||||
else
|
||||
{
|
||||
<span class="smallMessage">No Jobs Found</span>
|
||||
}
|
||||
</div>
|
||||
@@ -0,0 +1,732 @@
|
||||
#pragma warning disable 1591
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.17929
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace Disco.Web.Views.Shared
|
||||
{
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Text;
|
||||
using System.Web;
|
||||
using System.Web.Helpers;
|
||||
using System.Web.Mvc;
|
||||
using System.Web.Mvc.Ajax;
|
||||
using System.Web.Mvc.Html;
|
||||
using System.Web.Routing;
|
||||
using System.Web.Security;
|
||||
using System.Web.UI;
|
||||
using System.Web.WebPages;
|
||||
using Disco.BI.Extensions;
|
||||
using Disco.Models.Repository;
|
||||
using Disco.Web;
|
||||
using Disco.Web.Extensions;
|
||||
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "1.5.0.0")]
|
||||
[System.Web.WebPages.PageVirtualPathAttribute("~/Views/Shared/_JobTableRender.cshtml")]
|
||||
public class JobTableRender : System.Web.Mvc.WebViewPage<Disco.Models.BI.Job.JobTableModel>
|
||||
{
|
||||
public JobTableRender()
|
||||
{
|
||||
}
|
||||
public override void Execute()
|
||||
{
|
||||
|
||||
#line 2 "..\..\Views\Shared\_JobTableRender.cshtml"
|
||||
|
||||
Html.BundleDeferred("~/ClientScripts/Modules/Disco-DataTableHelpers");
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n<div");
|
||||
|
||||
WriteLiteral(" class=\"jobTable\"");
|
||||
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
|
||||
#line 6 "..\..\Views\Shared\_JobTableRender.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 6 "..\..\Views\Shared\_JobTableRender.cshtml"
|
||||
if (Model != null && Model.Items.Count() > 0)
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <table");
|
||||
|
||||
WriteAttribute("class", Tuple.Create(" class=\"", 223), Tuple.Create("\"", 351)
|
||||
, Tuple.Create(Tuple.Create("", 231), Tuple.Create("jobTable", 231), true)
|
||||
|
||||
#line 8 "..\..\Views\Shared\_JobTableRender.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 239), Tuple.Create<System.Object, System.Int32>(Model.IsSmallTable ? " smallTable" : string.Empty
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 239), false)
|
||||
|
||||
#line 8 "..\..\Views\Shared\_JobTableRender.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 291), Tuple.Create<System.Object, System.Int32>(Model.HideClosedJobs ? " hideStatusClosed" : string.Empty
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 291), false)
|
||||
);
|
||||
|
||||
WriteLiteral(">\r\n <thead>\r\n <tr>\r\n");
|
||||
|
||||
|
||||
#line 11 "..\..\Views\Shared\_JobTableRender.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 11 "..\..\Views\Shared\_JobTableRender.cshtml"
|
||||
if (Model.ShowId)
|
||||
{
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <th");
|
||||
|
||||
WriteLiteral(" class=\"id\"");
|
||||
|
||||
WriteLiteral(">\r\n Ref\r\n </th> ");
|
||||
|
||||
|
||||
#line 14 "..\..\Views\Shared\_JobTableRender.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 15 "..\..\Views\Shared\_JobTableRender.cshtml"
|
||||
if (Model.ShowStatus)
|
||||
{
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <th");
|
||||
|
||||
WriteLiteral(" class=\"status\"");
|
||||
|
||||
WriteLiteral(">\r\n Status\r\n </th> ");
|
||||
|
||||
|
||||
#line 18 "..\..\Views\Shared\_JobTableRender.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 19 "..\..\Views\Shared\_JobTableRender.cshtml"
|
||||
if (Model.ShowDates)
|
||||
{
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <th");
|
||||
|
||||
WriteLiteral(" class=\"dates\"");
|
||||
|
||||
WriteLiteral(">\r\n Dates\r\n </th> ");
|
||||
|
||||
|
||||
#line 22 "..\..\Views\Shared\_JobTableRender.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 23 "..\..\Views\Shared\_JobTableRender.cshtml"
|
||||
if (Model.ShowType)
|
||||
{
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <th");
|
||||
|
||||
WriteLiteral(" class=\"type\"");
|
||||
|
||||
WriteLiteral(">\r\n Type\r\n </th> ");
|
||||
|
||||
|
||||
#line 26 "..\..\Views\Shared\_JobTableRender.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 27 "..\..\Views\Shared\_JobTableRender.cshtml"
|
||||
if (Model.ShowDevice)
|
||||
{
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("<th");
|
||||
|
||||
WriteLiteral(" class=\"device\"");
|
||||
|
||||
WriteLiteral(">\r\n Device\r\n </th> ");
|
||||
|
||||
|
||||
#line 30 "..\..\Views\Shared\_JobTableRender.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 31 "..\..\Views\Shared\_JobTableRender.cshtml"
|
||||
if (Model.ShowUser)
|
||||
{
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <th");
|
||||
|
||||
WriteLiteral(" class=\"user\"");
|
||||
|
||||
WriteLiteral(">\r\n User\r\n </th> ");
|
||||
|
||||
|
||||
#line 34 "..\..\Views\Shared\_JobTableRender.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 35 "..\..\Views\Shared\_JobTableRender.cshtml"
|
||||
if (Model.ShowTechnician)
|
||||
{
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <th");
|
||||
|
||||
WriteLiteral(" class=\"technician\"");
|
||||
|
||||
WriteLiteral(">\r\n Technician\r\n </th> ");
|
||||
|
||||
|
||||
#line 38 "..\..\Views\Shared\_JobTableRender.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 39 "..\..\Views\Shared\_JobTableRender.cshtml"
|
||||
if (Model.ShowLocation)
|
||||
{
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <th");
|
||||
|
||||
WriteLiteral(" class=\"location\"");
|
||||
|
||||
WriteLiteral(">\r\n Location\r\n </th> ");
|
||||
|
||||
|
||||
#line 42 "..\..\Views\Shared\_JobTableRender.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" </tr>\r\n </thead>\r\n <tbody>\r\n");
|
||||
|
||||
|
||||
#line 46 "..\..\Views\Shared\_JobTableRender.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 46 "..\..\Views\Shared\_JobTableRender.cshtml"
|
||||
foreach (var item in Model.Items)
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <tr");
|
||||
|
||||
WriteLiteral(" data-id=\"");
|
||||
|
||||
|
||||
#line 48 "..\..\Views\Shared\_JobTableRender.cshtml"
|
||||
Write(item.Id);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\"");
|
||||
|
||||
WriteLiteral(" data-status=\"");
|
||||
|
||||
|
||||
#line 48 "..\..\Views\Shared\_JobTableRender.cshtml"
|
||||
Write(Model.ShowStatus ? item.StatusId : null);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\"");
|
||||
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
|
||||
#line 49 "..\..\Views\Shared\_JobTableRender.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 49 "..\..\Views\Shared\_JobTableRender.cshtml"
|
||||
if (Model.ShowId)
|
||||
{
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <td");
|
||||
|
||||
WriteLiteral(" class=\"id\"");
|
||||
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 51 "..\..\Views\Shared\_JobTableRender.cshtml"
|
||||
Write(Html.ActionLink(item.Id.ToString(), MVC.Job.Show(item.Id)));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n </td> ");
|
||||
|
||||
|
||||
#line 52 "..\..\Views\Shared\_JobTableRender.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 53 "..\..\Views\Shared\_JobTableRender.cshtml"
|
||||
if (Model.ShowStatus)
|
||||
{
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <td");
|
||||
|
||||
WriteLiteral(" class=\"status\"");
|
||||
|
||||
WriteLiteral(">\r\n <span");
|
||||
|
||||
WriteAttribute("class", Tuple.Create(" class=\"", 2151), Tuple.Create("\"", 2189)
|
||||
, Tuple.Create(Tuple.Create("", 2159), Tuple.Create("icon", 2159), true)
|
||||
, Tuple.Create(Tuple.Create(" ", 2163), Tuple.Create("JobStatus", 2164), true)
|
||||
|
||||
#line 55 "..\..\Views\Shared\_JobTableRender.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 2173), Tuple.Create<System.Object, System.Int32>(item.StatusId
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 2173), false)
|
||||
);
|
||||
|
||||
WriteLiteral("></span>\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 56 "..\..\Views\Shared\_JobTableRender.cshtml"
|
||||
Write(item.StatusDescription);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n </td> ");
|
||||
|
||||
|
||||
#line 57 "..\..\Views\Shared\_JobTableRender.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 58 "..\..\Views\Shared\_JobTableRender.cshtml"
|
||||
if (Model.ShowDates)
|
||||
{
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <td");
|
||||
|
||||
WriteLiteral(" class=\"dates\"");
|
||||
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 60 "..\..\Views\Shared\_JobTableRender.cshtml"
|
||||
Write(CommonHelpers.FriendlyDate(item.OpenedDate));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n - ");
|
||||
|
||||
|
||||
#line 61 "..\..\Views\Shared\_JobTableRender.cshtml"
|
||||
Write(CommonHelpers.FriendlyDate(item.ClosedDate));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n </td>");
|
||||
|
||||
|
||||
#line 62 "..\..\Views\Shared\_JobTableRender.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 63 "..\..\Views\Shared\_JobTableRender.cshtml"
|
||||
if (Model.ShowType)
|
||||
{
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <td");
|
||||
|
||||
WriteLiteral(" class=\"type\"");
|
||||
|
||||
WriteLiteral(">\r\n <span");
|
||||
|
||||
WriteAttribute("title", Tuple.Create(" title=\"", 2685), Tuple.Create("\"", 2714)
|
||||
|
||||
#line 65 "..\..\Views\Shared\_JobTableRender.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 2693), Tuple.Create<System.Object, System.Int32>(item.TypeDescription
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 2693), false)
|
||||
);
|
||||
|
||||
WriteLiteral(">");
|
||||
|
||||
|
||||
#line 65 "..\..\Views\Shared\_JobTableRender.cshtml"
|
||||
Write(item.TypeId);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("</span>\r\n </td>");
|
||||
|
||||
|
||||
#line 66 "..\..\Views\Shared\_JobTableRender.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 67 "..\..\Views\Shared\_JobTableRender.cshtml"
|
||||
if (Model.ShowDevice)
|
||||
{
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <td");
|
||||
|
||||
WriteLiteral(" class=\"device\"");
|
||||
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
|
||||
#line 69 "..\..\Views\Shared\_JobTableRender.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 69 "..\..\Views\Shared\_JobTableRender.cshtml"
|
||||
if (item.DeviceSerialNumber != null)
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 71 "..\..\Views\Shared\_JobTableRender.cshtml"
|
||||
Write(Html.ActionLink(item.DeviceSerialNumber, MVC.Device.Show(item.DeviceSerialNumber), new { Title = item.DeviceModelDescription }));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 71 "..\..\Views\Shared\_JobTableRender.cshtml"
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <span");
|
||||
|
||||
WriteLiteral(" class=\"smallMessage\"");
|
||||
|
||||
WriteLiteral(">N/A</span>\r\n");
|
||||
|
||||
|
||||
#line 76 "..\..\Views\Shared\_JobTableRender.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" </td> ");
|
||||
|
||||
|
||||
#line 77 "..\..\Views\Shared\_JobTableRender.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 78 "..\..\Views\Shared\_JobTableRender.cshtml"
|
||||
if (Model.ShowUser)
|
||||
{
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("<td");
|
||||
|
||||
WriteLiteral(" class=\"user\"");
|
||||
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
|
||||
#line 80 "..\..\Views\Shared\_JobTableRender.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 80 "..\..\Views\Shared\_JobTableRender.cshtml"
|
||||
if (item.UserId != null)
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 82 "..\..\Views\Shared\_JobTableRender.cshtml"
|
||||
Write(Html.ActionLink(string.Format("{0} ({1})", item.UserDisplayName, item.UserId), MVC.User.Show(item.UserId)));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 82 "..\..\Views\Shared\_JobTableRender.cshtml"
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <span");
|
||||
|
||||
WriteLiteral(" class=\"smallMessage\"");
|
||||
|
||||
WriteLiteral(">N/A</span>\r\n");
|
||||
|
||||
|
||||
#line 87 "..\..\Views\Shared\_JobTableRender.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" </td>");
|
||||
|
||||
|
||||
#line 88 "..\..\Views\Shared\_JobTableRender.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 89 "..\..\Views\Shared\_JobTableRender.cshtml"
|
||||
if (Model.ShowTechnician)
|
||||
{
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <td");
|
||||
|
||||
WriteLiteral(" class=\"technician\"");
|
||||
|
||||
WriteLiteral(">\r\n <span");
|
||||
|
||||
WriteAttribute("title", Tuple.Create(" title=\"", 4040), Tuple.Create("\"", 4079)
|
||||
|
||||
#line 91 "..\..\Views\Shared\_JobTableRender.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 4048), Tuple.Create<System.Object, System.Int32>(item.OpenedTechUserDisplayName
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 4048), false)
|
||||
);
|
||||
|
||||
WriteLiteral(">");
|
||||
|
||||
|
||||
#line 91 "..\..\Views\Shared\_JobTableRender.cshtml"
|
||||
Write(item.OpenedTechUserId);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n </span>\r\n </td>");
|
||||
|
||||
|
||||
#line 93 "..\..\Views\Shared\_JobTableRender.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 94 "..\..\Views\Shared\_JobTableRender.cshtml"
|
||||
if (Model.ShowLocation)
|
||||
{
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <td");
|
||||
|
||||
WriteLiteral(" class=\"technician\"");
|
||||
|
||||
WriteLiteral(">\r\n <span>");
|
||||
|
||||
|
||||
#line 96 "..\..\Views\Shared\_JobTableRender.cshtml"
|
||||
Write(item.Location ?? "Unknown");
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n </span>\r\n </td>");
|
||||
|
||||
|
||||
#line 98 "..\..\Views\Shared\_JobTableRender.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" </tr>\r\n");
|
||||
|
||||
|
||||
#line 100 "..\..\Views\Shared\_JobTableRender.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" </tbody>\r\n </table>\r\n");
|
||||
|
||||
|
||||
#line 103 "..\..\Views\Shared\_JobTableRender.cshtml"
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <span");
|
||||
|
||||
WriteLiteral(" class=\"smallMessage\"");
|
||||
|
||||
WriteLiteral(">No Jobs Found</span>\r\n");
|
||||
|
||||
|
||||
#line 107 "..\..\Views\Shared\_JobTableRender.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("</div>\r\n");
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
#pragma warning restore 1591
|
||||
@@ -0,0 +1,108 @@
|
||||
@{
|
||||
Html.BundleDeferred("~/Style/Site");
|
||||
Html.BundleDeferred("~/ClientScripts/Core");
|
||||
}
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Disco - @CommonHelpers.BreadcrumbsTitle(ViewBag.Title)</title>
|
||||
<link rel="shortcut icon" href="/favicon.ico" />
|
||||
<meta name="application-name" content="Disco" />
|
||||
<meta name="msapplication-starturl" content="/" />
|
||||
<meta name="msapplication-tooltip" content="Open Disco" />
|
||||
@Html.BundleRenderDeferred()
|
||||
@RenderSection("head", false)
|
||||
</head>
|
||||
<body class="layout">
|
||||
<div class="page">
|
||||
<header>
|
||||
<div class="clearfix">
|
||||
<div id="heading">
|
||||
<a href="@Url.Action(MVC.Job.Index())">
|
||||
<img src="@Links.ClientSource.Style.Images.Heading_png" alt="DISCO - ICT Asset Management" /></a>
|
||||
</div>
|
||||
<div id="headerMenu">
|
||||
<span>Welcome @Html.ActionLink(DiscoApplication.CurrentUser.ToString(), MVC.User.Show(DiscoApplication.CurrentUser.Id))</span>
|
||||
@using (Html.BeginForm(MVC.Search.Query(), FormMethod.Get))
|
||||
{
|
||||
|
||||
@Html.TextBox("term", null, new { accesskey = "s" })
|
||||
<script type="text/javascript">
|
||||
//<!--
|
||||
$(function () {
|
||||
$('#term').watermark('Search').keypress(function (e) {
|
||||
if (e.keyCode == 13) {
|
||||
$(this).closest('form').submit();
|
||||
}
|
||||
}).focus(function () {
|
||||
$(this).select();
|
||||
});
|
||||
});
|
||||
//-->
|
||||
</script>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
<nav>
|
||||
<ul id="menu">
|
||||
<li>@Html.ActionLink("Jobs", MVC.Job.Index(), accesskey: "1")
|
||||
<ul>
|
||||
<li>@Html.ActionLink("Devices Ready for Return", MVC.Job.DevicesReadyForReturn())</li>
|
||||
<li>@Html.ActionLink("Device Held Locations", MVC.Job.Locations())</li>
|
||||
<li>@Html.ActionLink("Awaiting User Action", MVC.Job.AwaitingUserAction())</li>
|
||||
<li>@Html.ActionLink("Awaiting Finance", MVC.Job.AwaitingFinance())
|
||||
<ul>
|
||||
<li>@Html.ActionLink("Accounting Charge", MVC.Job.AwaitingFinanceCharge())</li>
|
||||
<li>@Html.ActionLink("Accounting Payment", MVC.Job.AwaitingFinancePayment())</li>
|
||||
<li>@Html.ActionLink("Agreement Breach", MVC.Job.AwaitingFinanceAgreementBreach())</li>
|
||||
<li>@Html.ActionLink("Insurance Processing", MVC.Job.AwaitingFinanceInsuranceProcessing())</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>@Html.ActionLink("Awaiting Device Repair", MVC.Job.DevicesAwaitingRepair())</li>
|
||||
<li>@Html.ActionLink("All Open", MVC.Job.AllOpen())</li>
|
||||
<li>@Html.ActionLink("Recently Closed", MVC.Job.RecentlyClosed())</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="sep"></li>
|
||||
<li>@Html.ActionLink("Devices", MVC.Device.Index(), accesskey: "2")</li>
|
||||
<li class="sep"></li>
|
||||
<li>@Html.ActionLink("Users", MVC.User.Index(), accesskey: "3")</li>
|
||||
<li class="moveRight">@Html.ActionLink("Public Reports", MVC.Public.Public.Index())</li>
|
||||
<li class="sep"></li>
|
||||
<li>@Html.ActionLink("Configuration", MVC.Config.Config.Index(), accesskey: "0")</li>
|
||||
</ul>
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
var $menu = $('#menu');
|
||||
$menu.find('li').each(function () {
|
||||
var $menuItem = $(this);
|
||||
var $subMenu = $menuItem.children('ul').first();
|
||||
var subMenuHideToken = null;
|
||||
if ($subMenu.length > 0) {
|
||||
$menuItem.mouseover(function () {
|
||||
if (subMenuHideToken)
|
||||
window.clearTimeout(subMenuHideToken);
|
||||
if (!$subMenu.is(':visible'))
|
||||
$subMenu.show();
|
||||
}).mouseout(function () {
|
||||
subMenuHideToken = window.setTimeout(function () {
|
||||
$subMenu.hide();
|
||||
}, 250);
|
||||
}).addClass('hasSubmenu');
|
||||
};
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</nav>
|
||||
</header>
|
||||
<div id="layout_PageHeading">@CommonHelpers.Breadcrumbs(ViewBag.Title)</div>
|
||||
<section id="layout_Page">
|
||||
@RenderBody()
|
||||
</section>
|
||||
<footer>
|
||||
Disco v@(Disco.Web.DiscoApplication.Version) @@ @(Disco.Web.DiscoApplication.OrganisationName) | <a
|
||||
href="http://discoict.com.au/" target="_blank">discoict.com.au</a> | @Html.ActionLink("Credits", MVC.Public.Public.Credits()) | @Html.ActionLink("Licence", MVC.Public.Public.Licence())
|
||||
</footer>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,486 @@
|
||||
#pragma warning disable 1591
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.17929
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace Disco.Web.Views.Shared
|
||||
{
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Text;
|
||||
using System.Web;
|
||||
using System.Web.Helpers;
|
||||
using System.Web.Mvc;
|
||||
using System.Web.Mvc.Ajax;
|
||||
using System.Web.Mvc.Html;
|
||||
using System.Web.Routing;
|
||||
using System.Web.Security;
|
||||
using System.Web.UI;
|
||||
using System.Web.WebPages;
|
||||
using Disco.BI.Extensions;
|
||||
using Disco.Models.Repository;
|
||||
using Disco.Web;
|
||||
using Disco.Web.Extensions;
|
||||
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "1.5.0.0")]
|
||||
[System.Web.WebPages.PageVirtualPathAttribute("~/Views/Shared/_Layout.cshtml")]
|
||||
public class Layout : System.Web.Mvc.WebViewPage<dynamic>
|
||||
{
|
||||
public Layout()
|
||||
{
|
||||
}
|
||||
public override void Execute()
|
||||
{
|
||||
|
||||
#line 1 "..\..\Views\Shared\_Layout.cshtml"
|
||||
|
||||
Html.BundleDeferred("~/Style/Site");
|
||||
Html.BundleDeferred("~/ClientScripts/Core");
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n<!doctype html>\r\n<html>\r\n<head>\r\n <title>Disco - ");
|
||||
|
||||
|
||||
#line 8 "..\..\Views\Shared\_Layout.cshtml"
|
||||
Write(CommonHelpers.BreadcrumbsTitle(ViewBag.Title));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("</title>\r\n <link");
|
||||
|
||||
WriteLiteral(" rel=\"shortcut icon\"");
|
||||
|
||||
WriteLiteral(" href=\"/favicon.ico\"");
|
||||
|
||||
WriteLiteral(" />\r\n <meta");
|
||||
|
||||
WriteLiteral(" name=\"application-name\"");
|
||||
|
||||
WriteLiteral(" content=\"Disco\"");
|
||||
|
||||
WriteLiteral(" />\r\n <meta");
|
||||
|
||||
WriteLiteral(" name=\"msapplication-starturl\"");
|
||||
|
||||
WriteLiteral(" content=\"/\"");
|
||||
|
||||
WriteLiteral(" />\r\n <meta");
|
||||
|
||||
WriteLiteral(" name=\"msapplication-tooltip\"");
|
||||
|
||||
WriteLiteral(" content=\"Open Disco\"");
|
||||
|
||||
WriteLiteral(" />\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 13 "..\..\Views\Shared\_Layout.cshtml"
|
||||
Write(Html.BundleRenderDeferred());
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 14 "..\..\Views\Shared\_Layout.cshtml"
|
||||
Write(RenderSection("head", false));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n</head>\r\n<body");
|
||||
|
||||
WriteLiteral(" class=\"layout\"");
|
||||
|
||||
WriteLiteral(">\r\n <div");
|
||||
|
||||
WriteLiteral(" class=\"page\"");
|
||||
|
||||
WriteLiteral(">\r\n <header>\r\n <div");
|
||||
|
||||
WriteLiteral(" class=\"clearfix\"");
|
||||
|
||||
WriteLiteral(">\r\n <div");
|
||||
|
||||
WriteLiteral(" id=\"heading\"");
|
||||
|
||||
WriteLiteral(">\r\n <a");
|
||||
|
||||
WriteAttribute("href", Tuple.Create(" href=\"", 672), Tuple.Create("\"", 707)
|
||||
|
||||
#line 21 "..\..\Views\Shared\_Layout.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 679), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.Job.Index())
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 679), false)
|
||||
);
|
||||
|
||||
WriteLiteral(">\r\n <img");
|
||||
|
||||
WriteAttribute("src", Tuple.Create(" src=\"", 739), Tuple.Create("\"", 789)
|
||||
|
||||
#line 22 "..\..\Views\Shared\_Layout.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 745), Tuple.Create<System.Object, System.Int32>(Links.ClientSource.Style.Images.Heading_png
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 745), false)
|
||||
);
|
||||
|
||||
WriteLiteral(" alt=\"DISCO - ICT Asset Management\"");
|
||||
|
||||
WriteLiteral(" /></a>\r\n </div>\r\n <div");
|
||||
|
||||
WriteLiteral(" id=\"headerMenu\"");
|
||||
|
||||
WriteLiteral(">\r\n <span>Welcome ");
|
||||
|
||||
|
||||
#line 25 "..\..\Views\Shared\_Layout.cshtml"
|
||||
Write(Html.ActionLink(DiscoApplication.CurrentUser.ToString(), MVC.User.Show(DiscoApplication.CurrentUser.Id)));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("</span>\r\n");
|
||||
|
||||
|
||||
#line 26 "..\..\Views\Shared\_Layout.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 26 "..\..\Views\Shared\_Layout.cshtml"
|
||||
using (Html.BeginForm(MVC.Search.Query(), FormMethod.Get))
|
||||
{
|
||||
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 29 "..\..\Views\Shared\_Layout.cshtml"
|
||||
Write(Html.TextBox("term", null, new { accesskey = "s" }));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 29 "..\..\Views\Shared\_Layout.cshtml"
|
||||
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <script");
|
||||
|
||||
WriteLiteral(" type=\"text/javascript\"");
|
||||
|
||||
WriteLiteral(@">
|
||||
//<!--
|
||||
$(function () {
|
||||
$('#term').watermark('Search').keypress(function (e) {
|
||||
if (e.keyCode == 13) {
|
||||
$(this).closest('form').submit();
|
||||
}
|
||||
}).focus(function () {
|
||||
$(this).select();
|
||||
});
|
||||
});
|
||||
//-->
|
||||
</script>
|
||||
");
|
||||
|
||||
|
||||
#line 43 "..\..\Views\Shared\_Layout.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" </div>\r\n </div>\r\n <nav>\r\n <u" +
|
||||
"l");
|
||||
|
||||
WriteLiteral(" id=\"menu\"");
|
||||
|
||||
WriteLiteral(">\r\n <li>");
|
||||
|
||||
|
||||
#line 48 "..\..\Views\Shared\_Layout.cshtml"
|
||||
Write(Html.ActionLink("Jobs", MVC.Job.Index(), accesskey: "1"));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n <ul>\r\n <li>");
|
||||
|
||||
|
||||
#line 50 "..\..\Views\Shared\_Layout.cshtml"
|
||||
Write(Html.ActionLink("Devices Ready for Return", MVC.Job.DevicesReadyForReturn()));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("</li>\r\n <li>");
|
||||
|
||||
|
||||
#line 51 "..\..\Views\Shared\_Layout.cshtml"
|
||||
Write(Html.ActionLink("Device Held Locations", MVC.Job.Locations()));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("</li>\r\n <li>");
|
||||
|
||||
|
||||
#line 52 "..\..\Views\Shared\_Layout.cshtml"
|
||||
Write(Html.ActionLink("Awaiting User Action", MVC.Job.AwaitingUserAction()));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("</li>\r\n <li>");
|
||||
|
||||
|
||||
#line 53 "..\..\Views\Shared\_Layout.cshtml"
|
||||
Write(Html.ActionLink("Awaiting Finance", MVC.Job.AwaitingFinance()));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n <ul>\r\n <li>");
|
||||
|
||||
|
||||
#line 55 "..\..\Views\Shared\_Layout.cshtml"
|
||||
Write(Html.ActionLink("Accounting Charge", MVC.Job.AwaitingFinanceCharge()));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("</li>\r\n <li>");
|
||||
|
||||
|
||||
#line 56 "..\..\Views\Shared\_Layout.cshtml"
|
||||
Write(Html.ActionLink("Accounting Payment", MVC.Job.AwaitingFinancePayment()));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("</li>\r\n <li>");
|
||||
|
||||
|
||||
#line 57 "..\..\Views\Shared\_Layout.cshtml"
|
||||
Write(Html.ActionLink("Agreement Breach", MVC.Job.AwaitingFinanceAgreementBreach()));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("</li>\r\n <li>");
|
||||
|
||||
|
||||
#line 58 "..\..\Views\Shared\_Layout.cshtml"
|
||||
Write(Html.ActionLink("Insurance Processing", MVC.Job.AwaitingFinanceInsuranceProcessing()));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("</li>\r\n </ul>\r\n </li>\r\n" +
|
||||
" <li>");
|
||||
|
||||
|
||||
#line 61 "..\..\Views\Shared\_Layout.cshtml"
|
||||
Write(Html.ActionLink("Awaiting Device Repair", MVC.Job.DevicesAwaitingRepair()));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("</li>\r\n <li>");
|
||||
|
||||
|
||||
#line 62 "..\..\Views\Shared\_Layout.cshtml"
|
||||
Write(Html.ActionLink("All Open", MVC.Job.AllOpen()));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("</li>\r\n <li>");
|
||||
|
||||
|
||||
#line 63 "..\..\Views\Shared\_Layout.cshtml"
|
||||
Write(Html.ActionLink("Recently Closed", MVC.Job.RecentlyClosed()));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("</li>\r\n </ul>\r\n </li>\r\n " +
|
||||
" <li");
|
||||
|
||||
WriteLiteral(" class=\"sep\"");
|
||||
|
||||
WriteLiteral("></li>\r\n <li>");
|
||||
|
||||
|
||||
#line 67 "..\..\Views\Shared\_Layout.cshtml"
|
||||
Write(Html.ActionLink("Devices", MVC.Device.Index(), accesskey: "2"));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("</li>\r\n <li");
|
||||
|
||||
WriteLiteral(" class=\"sep\"");
|
||||
|
||||
WriteLiteral("></li>\r\n <li>");
|
||||
|
||||
|
||||
#line 69 "..\..\Views\Shared\_Layout.cshtml"
|
||||
Write(Html.ActionLink("Users", MVC.User.Index(), accesskey: "3"));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("</li>\r\n <li");
|
||||
|
||||
WriteLiteral(" class=\"moveRight\"");
|
||||
|
||||
WriteLiteral(">");
|
||||
|
||||
|
||||
#line 70 "..\..\Views\Shared\_Layout.cshtml"
|
||||
Write(Html.ActionLink("Public Reports", MVC.Public.Public.Index()));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("</li>\r\n <li");
|
||||
|
||||
WriteLiteral(" class=\"sep\"");
|
||||
|
||||
WriteLiteral("></li>\r\n <li>");
|
||||
|
||||
|
||||
#line 72 "..\..\Views\Shared\_Layout.cshtml"
|
||||
Write(Html.ActionLink("Configuration", MVC.Config.Config.Index(), accesskey: "0"));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("</li>\r\n </ul>\r\n <script");
|
||||
|
||||
WriteLiteral(" type=\"text/javascript\"");
|
||||
|
||||
WriteLiteral(@">
|
||||
$(function () {
|
||||
var $menu = $('#menu');
|
||||
$menu.find('li').each(function () {
|
||||
var $menuItem = $(this);
|
||||
var $subMenu = $menuItem.children('ul').first();
|
||||
var subMenuHideToken = null;
|
||||
if ($subMenu.length > 0) {
|
||||
$menuItem.mouseover(function () {
|
||||
if (subMenuHideToken)
|
||||
window.clearTimeout(subMenuHideToken);
|
||||
if (!$subMenu.is(':visible'))
|
||||
$subMenu.show();
|
||||
}).mouseout(function () {
|
||||
subMenuHideToken = window.setTimeout(function () {
|
||||
$subMenu.hide();
|
||||
}, 250);
|
||||
}).addClass('hasSubmenu');
|
||||
};
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</nav>
|
||||
</header>
|
||||
<div");
|
||||
|
||||
WriteLiteral(" id=\"layout_PageHeading\"");
|
||||
|
||||
WriteLiteral(">");
|
||||
|
||||
|
||||
#line 98 "..\..\Views\Shared\_Layout.cshtml"
|
||||
Write(CommonHelpers.Breadcrumbs(ViewBag.Title));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("</div>\r\n <section");
|
||||
|
||||
WriteLiteral(" id=\"layout_Page\"");
|
||||
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 100 "..\..\Views\Shared\_Layout.cshtml"
|
||||
Write(RenderBody());
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n </section>\r\n <footer>\r\n Disco v");
|
||||
|
||||
|
||||
#line 103 "..\..\Views\Shared\_Layout.cshtml"
|
||||
Write(Disco.Web.DiscoApplication.Version);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" ");
|
||||
|
||||
WriteLiteral("@ ");
|
||||
|
||||
|
||||
#line 103 "..\..\Views\Shared\_Layout.cshtml"
|
||||
Write(Disco.Web.DiscoApplication.OrganisationName);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" | <a\r\n href=\"http://discoict.com.au/\" target=\"_blank\">discoict.co" +
|
||||
"m.au</a> | ");
|
||||
|
||||
|
||||
#line 104 "..\..\Views\Shared\_Layout.cshtml"
|
||||
Write(Html.ActionLink("Credits", MVC.Public.Public.Credits()));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" | ");
|
||||
|
||||
|
||||
#line 104 "..\..\Views\Shared\_Layout.cshtml"
|
||||
Write(Html.ActionLink("Licence", MVC.Public.Public.Licence()));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n </footer>\r\n </div>\r\n</body>\r\n</html>\r\n");
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
#pragma warning restore 1591
|
||||
@@ -0,0 +1,35 @@
|
||||
@model string
|
||||
@using (Html.BeginForm(MVC.Search.Query(), FormMethod.Get))
|
||||
{
|
||||
@Html.ValidationSummary(true)
|
||||
<div id="searchDialog" class="form" style="width: 450px">
|
||||
<table>
|
||||
<tr>
|
||||
<th>
|
||||
Query:
|
||||
</th>
|
||||
<td>
|
||||
@Html.TextBox("term")
|
||||
@if (Model != null)
|
||||
{
|
||||
@Html.Hidden("limit", Model)
|
||||
if (Model == "jobs")
|
||||
{
|
||||
<br />
|
||||
<input type="checkbox" name="searchDetails" id="searchDetails" value="true" /><label
|
||||
for="searchDetails">Search Details</label>
|
||||
}
|
||||
}
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<p class="actions">
|
||||
<input type="submit" class="button" value="Search" />
|
||||
</p>
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
$('#searchDialog').find('#term').watermark('Search').focus();
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
}
|
||||
@@ -0,0 +1,169 @@
|
||||
#pragma warning disable 1591
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.17929
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace Disco.Web.Views.Shared
|
||||
{
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Text;
|
||||
using System.Web;
|
||||
using System.Web.Helpers;
|
||||
using System.Web.Mvc;
|
||||
using System.Web.Mvc.Ajax;
|
||||
using System.Web.Mvc.Html;
|
||||
using System.Web.Routing;
|
||||
using System.Web.Security;
|
||||
using System.Web.UI;
|
||||
using System.Web.WebPages;
|
||||
using Disco.BI.Extensions;
|
||||
using Disco.Models.Repository;
|
||||
using Disco.Web;
|
||||
using Disco.Web.Extensions;
|
||||
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "1.5.0.0")]
|
||||
[System.Web.WebPages.PageVirtualPathAttribute("~/Views/Shared/_SearchDialog.cshtml")]
|
||||
public class SearchDialog : System.Web.Mvc.WebViewPage<string>
|
||||
{
|
||||
public SearchDialog()
|
||||
{
|
||||
}
|
||||
public override void Execute()
|
||||
{
|
||||
|
||||
#line 2 "..\..\Views\Shared\_SearchDialog.cshtml"
|
||||
using (Html.BeginForm(MVC.Search.Query(), FormMethod.Get))
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 4 "..\..\Views\Shared\_SearchDialog.cshtml"
|
||||
Write(Html.ValidationSummary(true));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 4 "..\..\Views\Shared\_SearchDialog.cshtml"
|
||||
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <div");
|
||||
|
||||
WriteLiteral(" id=\"searchDialog\"");
|
||||
|
||||
WriteLiteral(" class=\"form\"");
|
||||
|
||||
WriteLiteral(" style=\"width: 450px\"");
|
||||
|
||||
WriteLiteral(">\r\n <table>\r\n <tr>\r\n <th>\r\n Q" +
|
||||
"uery:\r\n </th>\r\n <td>\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 12 "..\..\Views\Shared\_SearchDialog.cshtml"
|
||||
Write(Html.TextBox("term"));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n");
|
||||
|
||||
|
||||
#line 13 "..\..\Views\Shared\_SearchDialog.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 13 "..\..\Views\Shared\_SearchDialog.cshtml"
|
||||
if (Model != null)
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 15 "..\..\Views\Shared\_SearchDialog.cshtml"
|
||||
Write(Html.Hidden("limit", Model));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 15 "..\..\Views\Shared\_SearchDialog.cshtml"
|
||||
|
||||
if (Model == "jobs")
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <br />\r\n");
|
||||
|
||||
WriteLiteral(" <input");
|
||||
|
||||
WriteLiteral(" type=\"checkbox\"");
|
||||
|
||||
WriteLiteral(" name=\"searchDetails\"");
|
||||
|
||||
WriteLiteral(" id=\"searchDetails\"");
|
||||
|
||||
WriteLiteral(" value=\"true\"");
|
||||
|
||||
WriteLiteral(" />");
|
||||
|
||||
WriteLiteral("<label\r\n for=\"searchDetails\">Search Details</label>\r\n");
|
||||
|
||||
|
||||
#line 21 "..\..\Views\Shared\_SearchDialog.cshtml"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" </td>\r\n </tr>\r\n </table>\r\n <p");
|
||||
|
||||
WriteLiteral(" class=\"actions\"");
|
||||
|
||||
WriteLiteral(">\r\n <input");
|
||||
|
||||
WriteLiteral(" type=\"submit\"");
|
||||
|
||||
WriteLiteral(" class=\"button\"");
|
||||
|
||||
WriteLiteral(" value=\"Search\"");
|
||||
|
||||
WriteLiteral(" />\r\n </p>\r\n <script");
|
||||
|
||||
WriteLiteral(" type=\"text/javascript\"");
|
||||
|
||||
WriteLiteral(">\r\n $(function () {\r\n $(\'#searchDialog\').find(\'#term\')." +
|
||||
"watermark(\'Search\').focus();\r\n });\r\n </script>\r\n </div>\r\n");
|
||||
|
||||
|
||||
#line 35 "..\..\Views\Shared\_SearchDialog.cshtml"
|
||||
}
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
}
|
||||
}
|
||||
}
|
||||
#pragma warning restore 1591
|
||||
@@ -0,0 +1,6 @@
|
||||
@{
|
||||
ViewBag.Title = "Users";
|
||||
}
|
||||
<h3>
|
||||
Search for a User</h3>
|
||||
@Html.Partial(MVC.Shared.Views._SearchDialog, "users")
|
||||
@@ -0,0 +1,65 @@
|
||||
#pragma warning disable 1591
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.17929
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace Disco.Web.Views.User
|
||||
{
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Text;
|
||||
using System.Web;
|
||||
using System.Web.Helpers;
|
||||
using System.Web.Mvc;
|
||||
using System.Web.Mvc.Ajax;
|
||||
using System.Web.Mvc.Html;
|
||||
using System.Web.Routing;
|
||||
using System.Web.Security;
|
||||
using System.Web.UI;
|
||||
using System.Web.WebPages;
|
||||
using Disco.BI.Extensions;
|
||||
using Disco.Models.Repository;
|
||||
using Disco.Web;
|
||||
using Disco.Web.Extensions;
|
||||
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "1.5.0.0")]
|
||||
[System.Web.WebPages.PageVirtualPathAttribute("~/Views/User/Index.cshtml")]
|
||||
public class Index : System.Web.Mvc.WebViewPage<dynamic>
|
||||
{
|
||||
public Index()
|
||||
{
|
||||
}
|
||||
public override void Execute()
|
||||
{
|
||||
|
||||
#line 1 "..\..\Views\User\Index.cshtml"
|
||||
|
||||
ViewBag.Title = "Users";
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n<h3>\r\n Search for a User</h3>\r\n");
|
||||
|
||||
|
||||
#line 6 "..\..\Views\User\Index.cshtml"
|
||||
Write(Html.Partial(MVC.Shared.Views._SearchDialog, "users"));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n");
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
#pragma warning restore 1591
|
||||
@@ -0,0 +1,85 @@
|
||||
@model Disco.Web.Models.User.ShowModel
|
||||
@{
|
||||
ViewBag.Title = Html.ToBreadcrumb("Users", MVC.User.Index(), string.Format("{0} ({1})", Model.User.DisplayName, Model.User.Id));
|
||||
Html.BundleDeferred("~/ClientScripts/Modules/Silverlight");
|
||||
Html.BundleDeferred("~/ClientScripts/Modules/Disco-CreateJob");
|
||||
}
|
||||
<table class="userShow">
|
||||
<tr>
|
||||
<th class="name">Id:
|
||||
</th>
|
||||
<td class="value">
|
||||
@Model.User.Id
|
||||
</td>
|
||||
<th class="name">Given Name:
|
||||
</th>
|
||||
<td class="value">
|
||||
@Model.User.GivenName
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="name">Type:
|
||||
</th>
|
||||
<td class="value">
|
||||
@Model.User.Type
|
||||
</td>
|
||||
<th class="name">Surname:
|
||||
</th>
|
||||
<td class="value">
|
||||
@Model.User.Surname
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="name">Display Name:
|
||||
</th>
|
||||
<td class="value" colspan="3">
|
||||
@Model.User.DisplayName
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="name">Email Address:
|
||||
</th>
|
||||
<td class="value">
|
||||
@Model.User.EmailAddress
|
||||
</td>
|
||||
<th class="name">Phone Number:
|
||||
</th>
|
||||
<td class="value">
|
||||
@Model.User.PhoneNumber
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="name">Assigned Devices:
|
||||
</th>
|
||||
<td class="value" colspan="3">
|
||||
@Html.Partial(MVC.User.Views._UserDeviceAssignmentHistoryTable, Model.User)
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="name">Generate Documents:
|
||||
</th>
|
||||
<td class="value" colspan="3">
|
||||
@Html.DropDownList("DocumentTemplates", Model.DocumentTemplatesSelectListItems)
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
var generatePdfUrl = '@Url.Action(MVC.API.User.GeneratePdf(Model.User.Id, null))?DocumentTemplateId=';
|
||||
var $documentTemplates = $('#DocumentTemplates');
|
||||
$documentTemplates.change(function () {
|
||||
var v = $documentTemplates.val();
|
||||
if (v) {
|
||||
window.location.href = generatePdfUrl + v;
|
||||
$documentTemplates.val('');
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<h2>Jobs</h2>
|
||||
@Html.Partial(MVC.Shared.Views._JobTable, Model.Jobs)
|
||||
<h2>Attachments</h2>
|
||||
@Html.Partial(MVC.User.Views.UserParts.Resources, Model)
|
||||
<div class="actionBar">
|
||||
@Html.ActionLinkButton("Create Job", MVC.Job.Create(Model.PrimaryDeviceSerialNumber, Model.User.Id), "buttonCreateJob")
|
||||
</div>
|
||||
@@ -0,0 +1,300 @@
|
||||
#pragma warning disable 1591
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.17929
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace Disco.Web.Views.User
|
||||
{
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Text;
|
||||
using System.Web;
|
||||
using System.Web.Helpers;
|
||||
using System.Web.Mvc;
|
||||
using System.Web.Mvc.Ajax;
|
||||
using System.Web.Mvc.Html;
|
||||
using System.Web.Routing;
|
||||
using System.Web.Security;
|
||||
using System.Web.UI;
|
||||
using System.Web.WebPages;
|
||||
using Disco.BI.Extensions;
|
||||
using Disco.Models.Repository;
|
||||
using Disco.Web;
|
||||
using Disco.Web.Extensions;
|
||||
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "1.5.0.0")]
|
||||
[System.Web.WebPages.PageVirtualPathAttribute("~/Views/User/Show.cshtml")]
|
||||
public class Show : System.Web.Mvc.WebViewPage<Disco.Web.Models.User.ShowModel>
|
||||
{
|
||||
public Show()
|
||||
{
|
||||
}
|
||||
public override void Execute()
|
||||
{
|
||||
|
||||
#line 2 "..\..\Views\User\Show.cshtml"
|
||||
|
||||
ViewBag.Title = Html.ToBreadcrumb("Users", MVC.User.Index(), string.Format("{0} ({1})", Model.User.DisplayName, Model.User.Id));
|
||||
Html.BundleDeferred("~/ClientScripts/Modules/Silverlight");
|
||||
Html.BundleDeferred("~/ClientScripts/Modules/Disco-CreateJob");
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n<table");
|
||||
|
||||
WriteLiteral(" class=\"userShow\"");
|
||||
|
||||
WriteLiteral(">\r\n <tr>\r\n <th");
|
||||
|
||||
WriteLiteral(" class=\"name\"");
|
||||
|
||||
WriteLiteral(">Id:\r\n </th>\r\n <td");
|
||||
|
||||
WriteLiteral(" class=\"value\"");
|
||||
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 12 "..\..\Views\User\Show.cshtml"
|
||||
Write(Model.User.Id);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n </td>\r\n <th");
|
||||
|
||||
WriteLiteral(" class=\"name\"");
|
||||
|
||||
WriteLiteral(">Given Name:\r\n </th>\r\n <td");
|
||||
|
||||
WriteLiteral(" class=\"value\"");
|
||||
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 17 "..\..\Views\User\Show.cshtml"
|
||||
Write(Model.User.GivenName);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n </td>\r\n </tr>\r\n <tr>\r\n <th");
|
||||
|
||||
WriteLiteral(" class=\"name\"");
|
||||
|
||||
WriteLiteral(">Type:\r\n </th>\r\n <td");
|
||||
|
||||
WriteLiteral(" class=\"value\"");
|
||||
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 24 "..\..\Views\User\Show.cshtml"
|
||||
Write(Model.User.Type);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n </td>\r\n <th");
|
||||
|
||||
WriteLiteral(" class=\"name\"");
|
||||
|
||||
WriteLiteral(">Surname:\r\n </th>\r\n <td");
|
||||
|
||||
WriteLiteral(" class=\"value\"");
|
||||
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 29 "..\..\Views\User\Show.cshtml"
|
||||
Write(Model.User.Surname);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n </td>\r\n </tr>\r\n <tr>\r\n <th");
|
||||
|
||||
WriteLiteral(" class=\"name\"");
|
||||
|
||||
WriteLiteral(">Display Name:\r\n </th>\r\n <td");
|
||||
|
||||
WriteLiteral(" class=\"value\"");
|
||||
|
||||
WriteLiteral(" colspan=\"3\"");
|
||||
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 36 "..\..\Views\User\Show.cshtml"
|
||||
Write(Model.User.DisplayName);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n </td>\r\n </tr>\r\n <tr>\r\n <th");
|
||||
|
||||
WriteLiteral(" class=\"name\"");
|
||||
|
||||
WriteLiteral(">Email Address:\r\n </th>\r\n <td");
|
||||
|
||||
WriteLiteral(" class=\"value\"");
|
||||
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 43 "..\..\Views\User\Show.cshtml"
|
||||
Write(Model.User.EmailAddress);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n </td>\r\n <th");
|
||||
|
||||
WriteLiteral(" class=\"name\"");
|
||||
|
||||
WriteLiteral(">Phone Number:\r\n </th>\r\n <td");
|
||||
|
||||
WriteLiteral(" class=\"value\"");
|
||||
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 48 "..\..\Views\User\Show.cshtml"
|
||||
Write(Model.User.PhoneNumber);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n </td>\r\n </tr>\r\n <tr>\r\n <th");
|
||||
|
||||
WriteLiteral(" class=\"name\"");
|
||||
|
||||
WriteLiteral(">Assigned Devices:\r\n </th>\r\n <td");
|
||||
|
||||
WriteLiteral(" class=\"value\"");
|
||||
|
||||
WriteLiteral(" colspan=\"3\"");
|
||||
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 55 "..\..\Views\User\Show.cshtml"
|
||||
Write(Html.Partial(MVC.User.Views._UserDeviceAssignmentHistoryTable, Model.User));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n </td>\r\n </tr>\r\n <tr>\r\n <th");
|
||||
|
||||
WriteLiteral(" class=\"name\"");
|
||||
|
||||
WriteLiteral(">Generate Documents:\r\n </th>\r\n <td");
|
||||
|
||||
WriteLiteral(" class=\"value\"");
|
||||
|
||||
WriteLiteral(" colspan=\"3\"");
|
||||
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 62 "..\..\Views\User\Show.cshtml"
|
||||
Write(Html.DropDownList("DocumentTemplates", Model.DocumentTemplatesSelectListItems));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n <script");
|
||||
|
||||
WriteLiteral(" type=\"text/javascript\"");
|
||||
|
||||
WriteLiteral(">\r\n $(function () {\r\n var generatePdfUrl = \'");
|
||||
|
||||
|
||||
#line 65 "..\..\Views\User\Show.cshtml"
|
||||
Write(Url.Action(MVC.API.User.GeneratePdf(Model.User.Id, null)));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(@"?DocumentTemplateId=';
|
||||
var $documentTemplates = $('#DocumentTemplates');
|
||||
$documentTemplates.change(function () {
|
||||
var v = $documentTemplates.val();
|
||||
if (v) {
|
||||
window.location.href = generatePdfUrl + v;
|
||||
$documentTemplates.val('');
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<h2>Jobs</h2>
|
||||
");
|
||||
|
||||
|
||||
#line 80 "..\..\Views\User\Show.cshtml"
|
||||
Write(Html.Partial(MVC.Shared.Views._JobTable, Model.Jobs));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n<h2>Attachments</h2>\r\n");
|
||||
|
||||
|
||||
#line 82 "..\..\Views\User\Show.cshtml"
|
||||
Write(Html.Partial(MVC.User.Views.UserParts.Resources, Model));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n<div");
|
||||
|
||||
WriteLiteral(" class=\"actionBar\"");
|
||||
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 84 "..\..\Views\User\Show.cshtml"
|
||||
Write(Html.ActionLinkButton("Create Job", MVC.Job.Create(Model.PrimaryDeviceSerialNumber, Model.User.Id), "buttonCreateJob"));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n</div>\r\n");
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
#pragma warning restore 1591
|
||||
@@ -0,0 +1,193 @@
|
||||
@model Disco.Web.Models.User.ShowModel
|
||||
@{
|
||||
Html.BundleDeferred("~/Style/Shadowbox");
|
||||
Html.BundleDeferred("~/ClientScripts/Modules/Shadowbox");
|
||||
}
|
||||
<table id="userShowResources">
|
||||
<tr>
|
||||
<td id="Attachments">
|
||||
<div class="attachmentOutput">
|
||||
@if (Model.User.UserAttachments != null)
|
||||
{
|
||||
foreach (var ua in Model.User.UserAttachments)
|
||||
{
|
||||
<a href="@Url.Action(MVC.API.User.AttachmentDownload(ua.Id))" data-attachmentid="@ua.Id" data-mimetype="@ua.MimeType">
|
||||
<span class="icon" title="@ua.Filename">
|
||||
<img alt="Attachment Thumbnail" src="@(Url.Action(MVC.API.User.AttachmentThumbnail(ua.Id)))" /></span>
|
||||
<span class="comments" title="@ua.Comments">
|
||||
@{if (!string.IsNullOrEmpty(ua.DocumentTemplateId))
|
||||
{ @ua.DocumentTemplate.Description}
|
||||
else
|
||||
{ @ua.Comments }}
|
||||
</span><span class="author">@ua.TechUser.ToString()</span><span class="remove"></span>
|
||||
<span class="timestamp" title="@ua.Timestamp.ToFullDateTime()">@ua.Timestamp.ToFuzzy()</span>
|
||||
</a>
|
||||
}
|
||||
}
|
||||
</div>
|
||||
<div class="attachmentInput clearfix">
|
||||
<span class="action upload"></span><span class="action photo"></span>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
Shadowbox.init({
|
||||
skipSetup: true,
|
||||
modal: true
|
||||
});
|
||||
$(function () {
|
||||
if (!document.DiscoFunctions) {
|
||||
document.DiscoFunctions = {};
|
||||
}
|
||||
document.DiscoFunctions.addAttachment = addAttachment;
|
||||
|
||||
$Attachments = $('#Attachments');
|
||||
$attachmentOutput = $Attachments.find('.attachmentOutput');
|
||||
|
||||
$attachmentOutput.find('span.remove').click(removeAttachment);
|
||||
|
||||
$('#dialogUpload').dialog({ autoOpen: false,
|
||||
draggable: false,
|
||||
modal: true,
|
||||
resizable: false,
|
||||
width: 860,
|
||||
height: 550,
|
||||
close: function () {
|
||||
silverlightUploadAttachment.content.Navigator.Navigate('/Hidden');
|
||||
}
|
||||
});
|
||||
|
||||
$('#dialogRemoveAttachment').dialog({
|
||||
resizable: false,
|
||||
height: 140,
|
||||
modal: true,
|
||||
autoOpen: false
|
||||
});
|
||||
|
||||
var onLoadNavigation = null;
|
||||
var isLoaded = null;
|
||||
Silverlight.createObject(
|
||||
'@(Links.ClientBin.Disco_Silverlight_AttachmentUpload_xap)',
|
||||
$('#silverlightHostUploadAttachment').get(0),
|
||||
'silverlightUploadAttachment',
|
||||
{ width: '840px', height: '500px', background: 'white', version: '4.0.60310.0' },
|
||||
{ onLoad: function () {
|
||||
if (onLoadNavigation) {
|
||||
silverlightUploadAttachment.content.Navigator.Navigate(onLoadNavigation);
|
||||
isLoaded = true;
|
||||
}
|
||||
}
|
||||
},
|
||||
'UploadUrl=@(Url.Action(MVC.API.User.AttachmentUpload(Model.User.Id, null)))'
|
||||
);
|
||||
|
||||
$attachmentInput = $Attachments.find('.attachmentInput');
|
||||
$attachmentInput.find('.photo').click(function () {
|
||||
showDialog('/WebCam');
|
||||
});
|
||||
$attachmentInput.find('.upload').click(function () {
|
||||
showDialog('/File');
|
||||
});
|
||||
|
||||
silverlightUploadAttachment = $('#silverlightUploadAttachment').get(0);
|
||||
function showDialog(navigationPath) {
|
||||
$('#dialogUpload').dialog('open');
|
||||
if (isLoaded) {
|
||||
silverlightUploadAttachment.content.Navigator.Navigate(navigationPath);
|
||||
} else {
|
||||
onLoadNavigation = navigationPath;
|
||||
}
|
||||
};
|
||||
function addAttachment(id, quick) {
|
||||
var data = { id: id };
|
||||
$.ajax({
|
||||
url: '@Url.Action(MVC.API.User.Attachment())',
|
||||
dataType: 'json',
|
||||
data: data,
|
||||
success: function (d) {
|
||||
if (d.Result == 'OK') {
|
||||
var a = d.Attachment;
|
||||
|
||||
var e = $('<a><span class="icon"><img alt="Attachment Thumbnail" /></span><span class="comments"></span><span class="author"></span><span class="remove"></span><span class="timestamp"></span></a>');
|
||||
|
||||
e.attr('data-attachmentid', a.Id).attr('data-mimetype', a.MimeType).attr('href', '@(Url.Action(MVC.API.User.AttachmentDownload()))/' + a.Id);
|
||||
e.find('.icon img').attr('src', '@(Url.Action(MVC.API.User.AttachmentThumbnail()))/' + a.Id);
|
||||
e.find('.comments').text(a.Comments);
|
||||
e.find('.author').text(a.Author);
|
||||
e.find('.timestamp').text(a.TimestampFuzzy).attr('title', a.TimestampFull);
|
||||
e.find('.remove').click(removeAttachment);
|
||||
if (!quick)
|
||||
e.hide();
|
||||
$attachmentOutput.append(e);
|
||||
if (!quick)
|
||||
e.show('slow');
|
||||
if (a.MimeType.toLowerCase().indexOf('image/') == 0)
|
||||
e.shadowbox({ gallery: 'attachments', player: 'img', title: a.Comments });
|
||||
} else {
|
||||
alert('Unable to add attachment: ' + d.Result);
|
||||
}
|
||||
},
|
||||
error: function (jqXHR, textStatus, errorThrown) {
|
||||
alert('Unable to add attachment: ' + textStatus);
|
||||
}
|
||||
});
|
||||
}
|
||||
function removeAttachment() {
|
||||
$this = $(this).closest('a');
|
||||
|
||||
var data = { id: $this.attr('data-attachmentid') };
|
||||
var $dialogRemoveAttachment = $('#dialogRemoveAttachment');
|
||||
$dialogRemoveAttachment.dialog("enable");
|
||||
$dialogRemoveAttachment.dialog('option', 'buttons', {
|
||||
"Remove": function () {
|
||||
$dialogRemoveAttachment.dialog("disable");
|
||||
$dialogRemoveAttachment.dialog("option", "buttons", null);
|
||||
$.ajax({
|
||||
url: '@Url.Action(MVC.API.User.AttachmentRemove())',
|
||||
dataType: 'json',
|
||||
data: data,
|
||||
success: function (d) {
|
||||
if (d == 'OK') {
|
||||
$this.hide(300).delay(300).queue(function () {
|
||||
var $this = $(this);
|
||||
if ($this.attr('data-mimetype').toLowerCase().indexOf('image/') == 0)
|
||||
Shadowbox.removeCache(this);
|
||||
$this.remove();
|
||||
});
|
||||
} else {
|
||||
alert('Unable to remove attachment: ' + d);
|
||||
}
|
||||
$dialogRemoveAttachment.dialog("close");
|
||||
},
|
||||
error: function (jqXHR, textStatus, errorThrown) {
|
||||
alert('Unable to remove attachment: ' + textStatus);
|
||||
$dialogRemoveAttachment.dialog("close");
|
||||
}
|
||||
});
|
||||
},
|
||||
Cancel: function () {
|
||||
$dialogRemoveAttachment.dialog("close");
|
||||
}
|
||||
});
|
||||
|
||||
$dialogRemoveAttachment.dialog('open');
|
||||
|
||||
return false;
|
||||
}
|
||||
$attachmentOutput.children('a').each(function () {
|
||||
$this = $(this);
|
||||
if ($this.attr('data-mimetype').toLowerCase().indexOf('image/') == 0)
|
||||
$this.shadowbox({ gallery: 'attachments', player: 'img', title: $this.find('.comments').text() });
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<div id="dialogUpload" title="Upload Attachment">
|
||||
<div id="silverlightHostUploadAttachment">
|
||||
</div>
|
||||
</div>
|
||||
<div id="dialogRemoveAttachment" title="Remove this Attachment?">
|
||||
<p>
|
||||
<span class="ui-icon ui-icon-alert" style="float: left; margin: 0 7px 20px 0;"></span>
|
||||
Are you sure?</p>
|
||||
</div>
|
||||
@@ -0,0 +1,479 @@
|
||||
#pragma warning disable 1591
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.17929
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace Disco.Web.Views.User.UserParts
|
||||
{
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Text;
|
||||
using System.Web;
|
||||
using System.Web.Helpers;
|
||||
using System.Web.Mvc;
|
||||
using System.Web.Mvc.Ajax;
|
||||
using System.Web.Mvc.Html;
|
||||
using System.Web.Routing;
|
||||
using System.Web.Security;
|
||||
using System.Web.UI;
|
||||
using System.Web.WebPages;
|
||||
using Disco.BI.Extensions;
|
||||
using Disco.Models.Repository;
|
||||
using Disco.Web;
|
||||
using Disco.Web.Extensions;
|
||||
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "1.5.0.0")]
|
||||
[System.Web.WebPages.PageVirtualPathAttribute("~/Views/User/UserParts/Resources.cshtml")]
|
||||
public class Resources : System.Web.Mvc.WebViewPage<Disco.Web.Models.User.ShowModel>
|
||||
{
|
||||
public Resources()
|
||||
{
|
||||
}
|
||||
public override void Execute()
|
||||
{
|
||||
|
||||
#line 2 "..\..\Views\User\UserParts\Resources.cshtml"
|
||||
|
||||
Html.BundleDeferred("~/Style/Shadowbox");
|
||||
Html.BundleDeferred("~/ClientScripts/Modules/Shadowbox");
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n<table");
|
||||
|
||||
WriteLiteral(" id=\"userShowResources\"");
|
||||
|
||||
WriteLiteral(">\r\n <tr>\r\n <td");
|
||||
|
||||
WriteLiteral(" id=\"Attachments\"");
|
||||
|
||||
WriteLiteral(">\r\n <div");
|
||||
|
||||
WriteLiteral(" class=\"attachmentOutput\"");
|
||||
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
|
||||
#line 10 "..\..\Views\User\UserParts\Resources.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 10 "..\..\Views\User\UserParts\Resources.cshtml"
|
||||
if (Model.User.UserAttachments != null)
|
||||
{
|
||||
foreach (var ua in Model.User.UserAttachments)
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <a");
|
||||
|
||||
WriteAttribute("href", Tuple.Create(" href=\"", 464), Tuple.Create("\"", 522)
|
||||
|
||||
#line 14 "..\..\Views\User\UserParts\Resources.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 471), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.API.User.AttachmentDownload(ua.Id))
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 471), false)
|
||||
);
|
||||
|
||||
WriteLiteral(" data-attachmentid=\"");
|
||||
|
||||
|
||||
#line 14 "..\..\Views\User\UserParts\Resources.cshtml"
|
||||
Write(ua.Id);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\"");
|
||||
|
||||
WriteLiteral(" data-mimetype=\"");
|
||||
|
||||
|
||||
#line 14 "..\..\Views\User\UserParts\Resources.cshtml"
|
||||
Write(ua.MimeType);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\"");
|
||||
|
||||
WriteLiteral(">\r\n <span");
|
||||
|
||||
WriteLiteral(" class=\"icon\"");
|
||||
|
||||
WriteAttribute("title", Tuple.Create(" title=\"", 624), Tuple.Create("\"", 644)
|
||||
|
||||
#line 15 "..\..\Views\User\UserParts\Resources.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 632), Tuple.Create<System.Object, System.Int32>(ua.Filename
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 632), false)
|
||||
);
|
||||
|
||||
WriteLiteral(">\r\n <img");
|
||||
|
||||
WriteLiteral(" alt=\"Attachment Thumbnail\"");
|
||||
|
||||
WriteAttribute("src", Tuple.Create(" src=\"", 707), Tuple.Create("\"", 767)
|
||||
|
||||
#line 16 "..\..\Views\User\UserParts\Resources.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 713), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.API.User.AttachmentThumbnail(ua.Id))
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 713), false)
|
||||
);
|
||||
|
||||
WriteLiteral(" /></span>\r\n <span");
|
||||
|
||||
WriteLiteral(" class=\"comments\"");
|
||||
|
||||
WriteAttribute("title", Tuple.Create(" title=\"", 826), Tuple.Create("\"", 846)
|
||||
|
||||
#line 17 "..\..\Views\User\UserParts\Resources.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 834), Tuple.Create<System.Object, System.Int32>(ua.Comments
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 834), false)
|
||||
);
|
||||
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
|
||||
#line 18 "..\..\Views\User\UserParts\Resources.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 18 "..\..\Views\User\UserParts\Resources.cshtml"
|
||||
if (!string.IsNullOrEmpty(ua.DocumentTemplateId))
|
||||
{
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 19 "..\..\Views\User\UserParts\Resources.cshtml"
|
||||
Write(ua.DocumentTemplate.Description);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 19 "..\..\Views\User\UserParts\Resources.cshtml"
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 21 "..\..\Views\User\UserParts\Resources.cshtml"
|
||||
Write(ua.Comments);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 21 "..\..\Views\User\UserParts\Resources.cshtml"
|
||||
}
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n </span><span");
|
||||
|
||||
WriteLiteral(" class=\"author\"");
|
||||
|
||||
WriteLiteral(">");
|
||||
|
||||
|
||||
#line 22 "..\..\Views\User\UserParts\Resources.cshtml"
|
||||
Write(ua.TechUser.ToString());
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("</span><span");
|
||||
|
||||
WriteLiteral(" class=\"remove\"");
|
||||
|
||||
WriteLiteral("></span>\r\n <span");
|
||||
|
||||
WriteLiteral(" class=\"timestamp\"");
|
||||
|
||||
WriteAttribute("title", Tuple.Create(" title=\"", 1242), Tuple.Create("\"", 1280)
|
||||
|
||||
#line 23 "..\..\Views\User\UserParts\Resources.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 1250), Tuple.Create<System.Object, System.Int32>(ua.Timestamp.ToFullDateTime()
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 1250), false)
|
||||
);
|
||||
|
||||
WriteLiteral(">");
|
||||
|
||||
|
||||
#line 23 "..\..\Views\User\UserParts\Resources.cshtml"
|
||||
Write(ua.Timestamp.ToFuzzy());
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("</span>\r\n </a> \r\n");
|
||||
|
||||
|
||||
#line 25 "..\..\Views\User\UserParts\Resources.cshtml"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" </div>\r\n <div");
|
||||
|
||||
WriteLiteral(" class=\"attachmentInput clearfix\"");
|
||||
|
||||
WriteLiteral(">\r\n <span");
|
||||
|
||||
WriteLiteral(" class=\"action upload\"");
|
||||
|
||||
WriteLiteral("></span><span");
|
||||
|
||||
WriteLiteral(" class=\"action photo\"");
|
||||
|
||||
WriteLiteral("></span>\r\n </div>\r\n <script");
|
||||
|
||||
WriteLiteral(" type=\"text/javascript\"");
|
||||
|
||||
WriteLiteral(@">
|
||||
Shadowbox.init({
|
||||
skipSetup: true,
|
||||
modal: true
|
||||
});
|
||||
$(function () {
|
||||
if (!document.DiscoFunctions) {
|
||||
document.DiscoFunctions = {};
|
||||
}
|
||||
document.DiscoFunctions.addAttachment = addAttachment;
|
||||
|
||||
$Attachments = $('#Attachments');
|
||||
$attachmentOutput = $Attachments.find('.attachmentOutput');
|
||||
|
||||
$attachmentOutput.find('span.remove').click(removeAttachment);
|
||||
|
||||
$('#dialogUpload').dialog({ autoOpen: false,
|
||||
draggable: false,
|
||||
modal: true,
|
||||
resizable: false,
|
||||
width: 860,
|
||||
height: 550,
|
||||
close: function () {
|
||||
silverlightUploadAttachment.content.Navigator.Navigate('/Hidden');
|
||||
}
|
||||
});
|
||||
|
||||
$('#dialogRemoveAttachment').dialog({
|
||||
resizable: false,
|
||||
height: 140,
|
||||
modal: true,
|
||||
autoOpen: false
|
||||
});
|
||||
|
||||
var onLoadNavigation = null;
|
||||
var isLoaded = null;
|
||||
Silverlight.createObject(
|
||||
'");
|
||||
|
||||
|
||||
#line 68 "..\..\Views\User\UserParts\Resources.cshtml"
|
||||
Write(Links.ClientBin.Disco_Silverlight_AttachmentUpload_xap);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(@"',
|
||||
$('#silverlightHostUploadAttachment').get(0),
|
||||
'silverlightUploadAttachment',
|
||||
{ width: '840px', height: '500px', background: 'white', version: '4.0.60310.0' },
|
||||
{ onLoad: function () {
|
||||
if (onLoadNavigation) {
|
||||
silverlightUploadAttachment.content.Navigator.Navigate(onLoadNavigation);
|
||||
isLoaded = true;
|
||||
}
|
||||
}
|
||||
},
|
||||
'UploadUrl=");
|
||||
|
||||
|
||||
#line 79 "..\..\Views\User\UserParts\Resources.cshtml"
|
||||
Write(Url.Action(MVC.API.User.AttachmentUpload(Model.User.Id, null)));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(@"'
|
||||
);
|
||||
|
||||
$attachmentInput = $Attachments.find('.attachmentInput');
|
||||
$attachmentInput.find('.photo').click(function () {
|
||||
showDialog('/WebCam');
|
||||
});
|
||||
$attachmentInput.find('.upload').click(function () {
|
||||
showDialog('/File');
|
||||
});
|
||||
|
||||
silverlightUploadAttachment = $('#silverlightUploadAttachment').get(0);
|
||||
function showDialog(navigationPath) {
|
||||
$('#dialogUpload').dialog('open');
|
||||
if (isLoaded) {
|
||||
silverlightUploadAttachment.content.Navigator.Navigate(navigationPath);
|
||||
} else {
|
||||
onLoadNavigation = navigationPath;
|
||||
}
|
||||
};
|
||||
function addAttachment(id, quick) {
|
||||
var data = { id: id };
|
||||
$.ajax({
|
||||
url: '");
|
||||
|
||||
|
||||
#line 102 "..\..\Views\User\UserParts\Resources.cshtml"
|
||||
Write(Url.Action(MVC.API.User.Attachment()));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(@"',
|
||||
dataType: 'json',
|
||||
data: data,
|
||||
success: function (d) {
|
||||
if (d.Result == 'OK') {
|
||||
var a = d.Attachment;
|
||||
|
||||
var e = $('<a><span class=""icon""><img alt=""Attachment Thumbnail"" /></span><span class=""comments""></span><span class=""author""></span><span class=""remove""></span><span class=""timestamp""></span></a>');
|
||||
|
||||
e.attr('data-attachmentid', a.Id).attr('data-mimetype', a.MimeType).attr('href', '");
|
||||
|
||||
|
||||
#line 111 "..\..\Views\User\UserParts\Resources.cshtml"
|
||||
Write(Url.Action(MVC.API.User.AttachmentDownload()));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("/\' + a.Id);\r\n e.find(\'.icon img\').attr(\'src\', " +
|
||||
"\'");
|
||||
|
||||
|
||||
#line 112 "..\..\Views\User\UserParts\Resources.cshtml"
|
||||
Write(Url.Action(MVC.API.User.AttachmentThumbnail()));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("/\' + a.Id);\r\n e.find(\'.comments\').text(a.Comme" +
|
||||
"nts);\r\n e.find(\'.author\').text(a.Author);\r\n " +
|
||||
" e.find(\'.timestamp\').text(a.TimestampFuzzy).at" +
|
||||
"tr(\'title\', a.TimestampFull);\r\n e.find(\'.remo" +
|
||||
"ve\').click(removeAttachment);\r\n if (!quick)\r\n" +
|
||||
" e.hide();\r\n " +
|
||||
" $attachmentOutput.append(e);\r\n if (!qu" +
|
||||
"ick)\r\n e.show(\'slow\');\r\n " +
|
||||
" if (a.MimeType.toLowerCase().indexOf(\'image/\') == 0)\r\n " +
|
||||
" e.shadowbox({ gallery: \'attachments\', player: \'" +
|
||||
"img\', title: a.Comments });\r\n } else {\r\n " +
|
||||
" alert(\'Unable to add attachment: \' + d.Result);\r\n " +
|
||||
" }\r\n },\r\n " +
|
||||
" error: function (jqXHR, textStatus, errorThrown) {\r\n " +
|
||||
" alert(\'Unable to add attachment: \' + textStatus);\r\n " +
|
||||
" }\r\n });\r\n }\r\n " +
|
||||
" function removeAttachment() {\r\n $this = $(this)." +
|
||||
"closest(\'a\');\r\n\r\n var data = { id: $this.attr(\'data-attac" +
|
||||
"hmentid\') };\r\n var $dialogRemoveAttachment = $(\'#dialogRe" +
|
||||
"moveAttachment\');\r\n $dialogRemoveAttachment.dialog(\"enabl" +
|
||||
"e\");\r\n $dialogRemoveAttachment.dialog(\'option\', \'buttons\'" +
|
||||
", {\r\n \"Remove\": function () {\r\n " +
|
||||
" $dialogRemoveAttachment.dialog(\"disable\");\r\n " +
|
||||
" $dialogRemoveAttachment.dialog(\"option\", \"buttons\", null);\r\n " +
|
||||
" $.ajax({\r\n url: \'");
|
||||
|
||||
|
||||
#line 144 "..\..\Views\User\UserParts\Resources.cshtml"
|
||||
Write(Url.Action(MVC.API.User.AttachmentRemove()));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\',\r\n dataType: \'json\',\r\n " +
|
||||
" data: data,\r\n success: function" +
|
||||
" (d) {\r\n if (d == \'OK\') {\r\n " +
|
||||
" $this.hide(300).delay(300).queue(function () {\r\n " +
|
||||
" var $this = $(this);\r\n " +
|
||||
" if ($this.attr(\'data-mimetype\').toLowerCase(" +
|
||||
").indexOf(\'image/\') == 0)\r\n S" +
|
||||
"hadowbox.removeCache(this);\r\n $th" +
|
||||
"is.remove();\r\n });\r\n " +
|
||||
" } else {\r\n ale" +
|
||||
"rt(\'Unable to remove attachment: \' + d);\r\n " +
|
||||
" }\r\n $dialogRemoveAttachment.dialog(\"clo" +
|
||||
"se\");\r\n },\r\n " +
|
||||
" error: function (jqXHR, textStatus, errorThrown) {\r\n " +
|
||||
" alert(\'Unable to remove attachment: \' + textStatus);\r\n " +
|
||||
" $dialogRemoveAttachment.dialog(\"close\");\r\n " +
|
||||
" }\r\n });\r\n " +
|
||||
" },\r\n Cancel: function () {\r\n " +
|
||||
" $dialogRemoveAttachment.dialog(\"close\");\r\n " +
|
||||
" }\r\n });\r\n\r\n $dialogRem" +
|
||||
"oveAttachment.dialog(\'open\');\r\n\r\n return false;\r\n " +
|
||||
" }\r\n $attachmentOutput.children(\'a\').each(function" +
|
||||
" () {\r\n $this = $(this);\r\n if ($th" +
|
||||
"is.attr(\'data-mimetype\').toLowerCase().indexOf(\'image/\') == 0)\r\n " +
|
||||
" $this.shadowbox({ gallery: \'attachments\', player: \'img\', title: $thi" +
|
||||
"s.find(\'.comments\').text() });\r\n });\r\n });\r\n " +
|
||||
" </script>\r\n </td>\r\n </tr>\r\n</table>\r\n<div");
|
||||
|
||||
WriteLiteral(" id=\"dialogUpload\"");
|
||||
|
||||
WriteLiteral(" title=\"Upload Attachment\"");
|
||||
|
||||
WriteLiteral(">\r\n <div");
|
||||
|
||||
WriteLiteral(" id=\"silverlightHostUploadAttachment\"");
|
||||
|
||||
WriteLiteral(">\r\n </div>\r\n</div>\r\n<div");
|
||||
|
||||
WriteLiteral(" id=\"dialogRemoveAttachment\"");
|
||||
|
||||
WriteLiteral(" title=\"Remove this Attachment?\"");
|
||||
|
||||
WriteLiteral(">\r\n <p>\r\n <span");
|
||||
|
||||
WriteLiteral(" class=\"ui-icon ui-icon-alert\"");
|
||||
|
||||
WriteLiteral(" style=\"float: left; margin: 0 7px 20px 0;\"");
|
||||
|
||||
WriteLiteral("></span>\r\n Are you sure?</p>\r\n</div>\r\n");
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
#pragma warning restore 1591
|
||||
@@ -0,0 +1,80 @@
|
||||
@model Disco.Models.Repository.User
|
||||
@{
|
||||
var userId = Model.Id;
|
||||
}
|
||||
@if (Model.DeviceUserAssignments.Count > 0)
|
||||
{
|
||||
<table class="genericData smallTable" id="User_AssignedDevice_History_@(userId)">
|
||||
<tr>
|
||||
<th>
|
||||
Device Serial #
|
||||
</th>
|
||||
<th>
|
||||
Device Asset #
|
||||
</th>
|
||||
<th>
|
||||
Device Model
|
||||
</th>
|
||||
<th>
|
||||
Assigned
|
||||
</th>
|
||||
<th>
|
||||
Unassigned
|
||||
</th>
|
||||
</tr>
|
||||
@foreach (var dua in Model.DeviceUserAssignments.OrderByDescending(m => m.AssignedDate))
|
||||
{
|
||||
<tr class="assignmentActive@((!dua.UnassignedDate.HasValue).ToString())">
|
||||
<td>
|
||||
@Html.ActionLink(dua.Device.SerialNumber, MVC.Device.Show(dua.DeviceSerialNumber))
|
||||
</td>
|
||||
<td>
|
||||
@dua.Device.AssetNumber
|
||||
</td>
|
||||
<td>
|
||||
@dua.Device.DeviceModel.ToString()
|
||||
</td>
|
||||
<td>
|
||||
@CommonHelpers.FriendlyDate(dua.AssignedDate)
|
||||
</td>
|
||||
<td>
|
||||
@CommonHelpers.FriendlyDate(dua.UnassignedDate, "Current")
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
@if (Model.DeviceUserAssignments.Count(m => !m.UnassignedDate.HasValue) == 0)
|
||||
{
|
||||
<tr class="noActiveAssignments">
|
||||
<td colspan="5">
|
||||
<span class="smallMessage">No Active Assignments</span>
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
</table>
|
||||
<a href="#" id="User_AssignedDevice_History_Trigger_@(userId)" class="smallLink">Show
|
||||
All Assignment History (<span id="User_AssignedDevice_History_RecordCount_@(userId)"></span>)</a>
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
var $table = $('#User_AssignedDevice_History_@(userId)');
|
||||
var $inactiveRecords = $table.find('tr.assignmentActiveFalse').hide();
|
||||
if ($inactiveRecords.length != 0) {
|
||||
var recordCountText = $inactiveRecords.length + ' record';
|
||||
if ($inactiveRecords.length != 1)
|
||||
recordCountText += 's';
|
||||
$('#User_AssignedDevice_History_RecordCount_@(userId)').text(recordCountText);
|
||||
$('#User_AssignedDevice_History_Trigger_@(userId)').click(function () {
|
||||
$(this).hide();
|
||||
$table.find('tr.noActiveAssignments').hide();
|
||||
$inactiveRecords.show();
|
||||
return false;
|
||||
});
|
||||
} else {
|
||||
$('#User_AssignedDevice_History_Trigger_@(userId)').hide();
|
||||
}
|
||||
});
|
||||
</script>
|
||||
}
|
||||
else
|
||||
{
|
||||
<span class="smallMessage">No Assignment History Available</span>
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user