security: use more antiforgery tokens
This commit is contained in:
@@ -6,16 +6,20 @@
|
||||
<div id="DeviceDetailTab-Certificates" class="DevicePart">
|
||||
<div class="genericData certificateTable">
|
||||
@if (Model.Certificates.Count() > 0)
|
||||
{
|
||||
{
|
||||
<table class="genericData certificateTable">
|
||||
<tr>
|
||||
<th>Name
|
||||
<th>
|
||||
Name
|
||||
</th>
|
||||
<th>Enabled
|
||||
<th>
|
||||
Enabled
|
||||
</th>
|
||||
<th>Allocated
|
||||
<th>
|
||||
Allocated
|
||||
</th>
|
||||
<th>Expires
|
||||
<th>
|
||||
Expires
|
||||
</th>
|
||||
</tr>
|
||||
@foreach (var item in Model.Certificates)
|
||||
@@ -24,7 +28,7 @@
|
||||
<td>
|
||||
@if (hasDownloadCert)
|
||||
{
|
||||
@Html.ActionLink(item.Name, MVC.API.DeviceCertificate.Download(item.Id))
|
||||
<a href="#" class="certificateDownload" data-id="@item.Id">@item.Name</a>
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -43,9 +47,28 @@
|
||||
</tr>
|
||||
}
|
||||
</table>
|
||||
if (hasDownloadCert)
|
||||
{
|
||||
using (Html.BeginForm(MVC.API.DeviceCertificate.Download()))
|
||||
{
|
||||
@Html.AntiForgeryToken()
|
||||
<input type="hidden" name="id" />
|
||||
}
|
||||
<script>
|
||||
$(function () {
|
||||
$('#DeviceDetailTab-Certificates').on('click', '.certificateDownload', function (e) {
|
||||
e.preventDefault();
|
||||
const form = $('#DeviceDetailTab-Certificates').find('form');
|
||||
form.find('input[name="id"]').val($(this).attr('data-id'));
|
||||
form.trigger('submit');
|
||||
return false;
|
||||
})
|
||||
})
|
||||
</script>
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
{
|
||||
<span class="smallMessage">No Certificates Allocated</span>
|
||||
}
|
||||
</div>
|
||||
|
||||
@@ -73,7 +73,7 @@ WriteLiteral(">\r\n");
|
||||
|
||||
#line 8 "..\..\Views\Device\DeviceParts\_Certificates.cshtml"
|
||||
if (Model.Certificates.Count() > 0)
|
||||
{
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
@@ -84,25 +84,29 @@ WriteLiteral(" class=\"genericData certificateTable\"");
|
||||
|
||||
WriteLiteral(@">
|
||||
<tr>
|
||||
<th>Name
|
||||
<th>
|
||||
Name
|
||||
</th>
|
||||
<th>Enabled
|
||||
<th>
|
||||
Enabled
|
||||
</th>
|
||||
<th>Allocated
|
||||
<th>
|
||||
Allocated
|
||||
</th>
|
||||
<th>Expires
|
||||
<th>
|
||||
Expires
|
||||
</th>
|
||||
</tr>
|
||||
");
|
||||
|
||||
|
||||
#line 21 "..\..\Views\Device\DeviceParts\_Certificates.cshtml"
|
||||
#line 25 "..\..\Views\Device\DeviceParts\_Certificates.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 21 "..\..\Views\Device\DeviceParts\_Certificates.cshtml"
|
||||
#line 25 "..\..\Views\Device\DeviceParts\_Certificates.cshtml"
|
||||
foreach (var item in Model.Certificates)
|
||||
{
|
||||
|
||||
@@ -112,29 +116,49 @@ WriteLiteral(@">
|
||||
WriteLiteral(" <tr>\r\n <td>\r\n");
|
||||
|
||||
|
||||
#line 25 "..\..\Views\Device\DeviceParts\_Certificates.cshtml"
|
||||
#line 29 "..\..\Views\Device\DeviceParts\_Certificates.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 25 "..\..\Views\Device\DeviceParts\_Certificates.cshtml"
|
||||
#line 29 "..\..\Views\Device\DeviceParts\_Certificates.cshtml"
|
||||
if (hasDownloadCert)
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 27 "..\..\Views\Device\DeviceParts\_Certificates.cshtml"
|
||||
Write(Html.ActionLink(item.Name, MVC.API.DeviceCertificate.Download(item.Id)));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <a");
|
||||
|
||||
WriteLiteral(" href=\"#\"");
|
||||
|
||||
WriteLiteral(" class=\"certificateDownload\"");
|
||||
|
||||
WriteLiteral(" data-id=\"");
|
||||
|
||||
|
||||
#line 27 "..\..\Views\Device\DeviceParts\_Certificates.cshtml"
|
||||
|
||||
#line 31 "..\..\Views\Device\DeviceParts\_Certificates.cshtml"
|
||||
Write(item.Id);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\"");
|
||||
|
||||
WriteLiteral(">");
|
||||
|
||||
|
||||
#line 31 "..\..\Views\Device\DeviceParts\_Certificates.cshtml"
|
||||
Write(item.Name);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("</a>\r\n");
|
||||
|
||||
|
||||
#line 32 "..\..\Views\Device\DeviceParts\_Certificates.cshtml"
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -143,14 +167,14 @@ WriteLiteral(" <tr>\r\n <td>\r\n");
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 31 "..\..\Views\Device\DeviceParts\_Certificates.cshtml"
|
||||
#line 35 "..\..\Views\Device\DeviceParts\_Certificates.cshtml"
|
||||
Write(item.Name);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 31 "..\..\Views\Device\DeviceParts\_Certificates.cshtml"
|
||||
#line 35 "..\..\Views\Device\DeviceParts\_Certificates.cshtml"
|
||||
|
||||
}
|
||||
|
||||
@@ -162,7 +186,7 @@ WriteLiteral(" </td>\r\n <td>\r\n"
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 35 "..\..\Views\Device\DeviceParts\_Certificates.cshtml"
|
||||
#line 39 "..\..\Views\Device\DeviceParts\_Certificates.cshtml"
|
||||
Write(item.Enabled);
|
||||
|
||||
|
||||
@@ -173,7 +197,7 @@ WriteLiteral("\r\n </td>\r\n <td>\
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 38 "..\..\Views\Device\DeviceParts\_Certificates.cshtml"
|
||||
#line 42 "..\..\Views\Device\DeviceParts\_Certificates.cshtml"
|
||||
Write(CommonHelpers.FriendlyDate(item.AllocatedDate));
|
||||
|
||||
|
||||
@@ -184,7 +208,7 @@ WriteLiteral("\r\n </td>\r\n <td>\
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 41 "..\..\Views\Device\DeviceParts\_Certificates.cshtml"
|
||||
#line 45 "..\..\Views\Device\DeviceParts\_Certificates.cshtml"
|
||||
Write(CommonHelpers.FriendlyDate(item.ExpirationDate));
|
||||
|
||||
|
||||
@@ -193,7 +217,7 @@ WriteLiteral(" ");
|
||||
WriteLiteral("\r\n </td>\r\n </tr>\r\n");
|
||||
|
||||
|
||||
#line 44 "..\..\Views\Device\DeviceParts\_Certificates.cshtml"
|
||||
#line 48 "..\..\Views\Device\DeviceParts\_Certificates.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -202,10 +226,63 @@ WriteLiteral("\r\n </td>\r\n </tr>\r\n
|
||||
WriteLiteral(" </table>\r\n");
|
||||
|
||||
|
||||
#line 46 "..\..\Views\Device\DeviceParts\_Certificates.cshtml"
|
||||
#line 50 "..\..\Views\Device\DeviceParts\_Certificates.cshtml"
|
||||
if (hasDownloadCert)
|
||||
{
|
||||
using (Html.BeginForm(MVC.API.DeviceCertificate.Download()))
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 54 "..\..\Views\Device\DeviceParts\_Certificates.cshtml"
|
||||
Write(Html.AntiForgeryToken());
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 54 "..\..\Views\Device\DeviceParts\_Certificates.cshtml"
|
||||
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <input");
|
||||
|
||||
WriteLiteral(" type=\"hidden\"");
|
||||
|
||||
WriteLiteral(" name=\"id\"");
|
||||
|
||||
WriteLiteral(" />\r\n");
|
||||
|
||||
|
||||
#line 56 "..\..\Views\Device\DeviceParts\_Certificates.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(@" <script>
|
||||
$(function () {
|
||||
$('#DeviceDetailTab-Certificates').on('click', '.certificateDownload', function (e) {
|
||||
e.preventDefault();
|
||||
const form = $('#DeviceDetailTab-Certificates').find('form');
|
||||
form.find('input[name=""id""]').val($(this).attr('data-id'));
|
||||
form.trigger('submit');
|
||||
return false;
|
||||
})
|
||||
})
|
||||
</script>
|
||||
");
|
||||
|
||||
|
||||
#line 68 "..\..\Views\Device\DeviceParts\_Certificates.cshtml"
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
@@ -217,7 +294,7 @@ WriteLiteral(" class=\"smallMessage\"");
|
||||
WriteLiteral(">No Certificates Allocated</span>\r\n");
|
||||
|
||||
|
||||
#line 50 "..\..\Views\Device\DeviceParts\_Certificates.cshtml"
|
||||
#line 73 "..\..\Views\Device\DeviceParts\_Certificates.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -227,7 +304,7 @@ WriteLiteral(" </div>\r\n <script>\r\n $(\'#DeviceDetailTabItems\')
|
||||
"\"#DeviceDetailTab-Certificates\">Certificates [");
|
||||
|
||||
|
||||
#line 53 "..\..\Views\Device\DeviceParts\_Certificates.cshtml"
|
||||
#line 76 "..\..\Views\Device\DeviceParts\_Certificates.cshtml"
|
||||
Write(Model.Certificates.Count);
|
||||
|
||||
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
var canRemoveOwnComments = Authorization.Has(Claims.Device.Actions.RemoveOwnComments);
|
||||
}
|
||||
<div id="Comments" class="@(canAddComments ? "canAddComments" : "cannotAddComments") @(canRemoveAnyComments ? "canRemoveAnyComments" : "cannotRemoveAnyComments") @(canRemoveOwnComments ? "canRemoveOwnComments" : "cannotRemoveOwnComments")" data-id="@Model.Device.SerialNumber" data-userid="@CurrentUser.UserId" data-addurl="@Url.Action(MVC.API.Device.CommentAdd(Model.Device.SerialNumber))" data-removeurl="@Url.Action(MVC.API.Device.CommentRemove())" data-geturl="@Url.Action(MVC.API.Device.Comment())">
|
||||
@Html.AntiForgeryToken()
|
||||
@if (canAddComments)
|
||||
{
|
||||
<div class="commentInput">
|
||||
@@ -48,7 +47,7 @@
|
||||
}
|
||||
async function onCommentAddedAsync(id) {
|
||||
const formData = new FormData();
|
||||
formData.append('__RequestVerificationToken', $comments.find('input[name="__RequestVerificationToken"]').val());
|
||||
formData.append('__RequestVerificationToken', document.body.dataset.antiforgery);
|
||||
formData.append('id', id);
|
||||
|
||||
const response = await fetch($comments.attr('data-geturl'), {
|
||||
@@ -136,7 +135,7 @@
|
||||
$commentInput.prop('disabled', true);
|
||||
|
||||
const formData = new FormData();
|
||||
formData.append('__RequestVerificationToken', $comments.find('input[name="__RequestVerificationToken"]').val());
|
||||
formData.append('__RequestVerificationToken', document.body.dataset.antiforgery);
|
||||
formData.append('comment', comment);
|
||||
|
||||
const response = await fetch($comments.attr('data-addurl'), {
|
||||
@@ -194,7 +193,7 @@
|
||||
}
|
||||
async function removeCommentAsync(commentId) {
|
||||
const formData = new FormData();
|
||||
formData.append('__RequestVerificationToken', $comments.find('input[name="__RequestVerificationToken"]').val());
|
||||
formData.append('__RequestVerificationToken', document.body.dataset.antiforgery);
|
||||
formData.append('id', commentId);
|
||||
|
||||
const response = await fetch($comments.attr('data-removeurl'), {
|
||||
|
||||
@@ -139,25 +139,14 @@ WriteLiteral("\"");
|
||||
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 9 "..\..\Views\Device\DeviceParts\_Comments.cshtml"
|
||||
Write(Html.AntiForgeryToken());
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n");
|
||||
|
||||
|
||||
#line 10 "..\..\Views\Device\DeviceParts\_Comments.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 10 "..\..\Views\Device\DeviceParts\_Comments.cshtml"
|
||||
#line 9 "..\..\Views\Device\DeviceParts\_Comments.cshtml"
|
||||
if (canAddComments)
|
||||
{
|
||||
|
||||
@@ -189,7 +178,7 @@ WriteLiteral(" class=\"fa fa-comment\"");
|
||||
WriteLiteral("></i></button>\r\n </div>\r\n");
|
||||
|
||||
|
||||
#line 16 "..\..\Views\Device\DeviceParts\_Comments.cshtml"
|
||||
#line 15 "..\..\Views\Device\DeviceParts\_Comments.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -202,13 +191,13 @@ WriteLiteral(" class=\"commentOutput\"");
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
|
||||
#line 18 "..\..\Views\Device\DeviceParts\_Comments.cshtml"
|
||||
#line 17 "..\..\Views\Device\DeviceParts\_Comments.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 18 "..\..\Views\Device\DeviceParts\_Comments.cshtml"
|
||||
#line 17 "..\..\Views\Device\DeviceParts\_Comments.cshtml"
|
||||
foreach (var c in Model.Device.DeviceComments.OrderBy(m => m.Timestamp))
|
||||
{
|
||||
|
||||
@@ -222,7 +211,7 @@ WriteLiteral(" class=\"comment\"");
|
||||
WriteLiteral(" data-commentid=\"");
|
||||
|
||||
|
||||
#line 20 "..\..\Views\Device\DeviceParts\_Comments.cshtml"
|
||||
#line 19 "..\..\Views\Device\DeviceParts\_Comments.cshtml"
|
||||
Write(c.Id);
|
||||
|
||||
|
||||
@@ -237,7 +226,7 @@ WriteLiteral(" class=\"author\"");
|
||||
WriteLiteral(">");
|
||||
|
||||
|
||||
#line 21 "..\..\Views\Device\DeviceParts\_Comments.cshtml"
|
||||
#line 20 "..\..\Views\Device\DeviceParts\_Comments.cshtml"
|
||||
Write(c.TechUser.ToStringFriendly());
|
||||
|
||||
|
||||
@@ -246,7 +235,7 @@ WriteLiteral(">");
|
||||
WriteLiteral("</span>");
|
||||
|
||||
|
||||
#line 21 "..\..\Views\Device\DeviceParts\_Comments.cshtml"
|
||||
#line 20 "..\..\Views\Device\DeviceParts\_Comments.cshtml"
|
||||
if (canRemoveAnyComments || (canRemoveOwnComments && c.TechUserId.Equals(CurrentUser.UserId, StringComparison.OrdinalIgnoreCase)))
|
||||
{
|
||||
|
||||
@@ -259,7 +248,7 @@ WriteLiteral(" class=\"remove fa fa-times-circle\"");
|
||||
WriteLiteral("></span>");
|
||||
|
||||
|
||||
#line 22 "..\..\Views\Device\DeviceParts\_Comments.cshtml"
|
||||
#line 21 "..\..\Views\Device\DeviceParts\_Comments.cshtml"
|
||||
}
|
||||
|
||||
#line default
|
||||
@@ -271,7 +260,7 @@ WriteLiteral(" class=\"timestamp\"");
|
||||
WriteLiteral(" data-livestamp=\"");
|
||||
|
||||
|
||||
#line 22 "..\..\Views\Device\DeviceParts\_Comments.cshtml"
|
||||
#line 21 "..\..\Views\Device\DeviceParts\_Comments.cshtml"
|
||||
Write(c.Timestamp.ToUnixEpoc());
|
||||
|
||||
|
||||
@@ -279,20 +268,20 @@ WriteLiteral(" data-livestamp=\"");
|
||||
#line hidden
|
||||
WriteLiteral("\"");
|
||||
|
||||
WriteAttribute("title", Tuple.Create(" title=\"", 1737), Tuple.Create("\"", 1774)
|
||||
WriteAttribute("title", Tuple.Create(" title=\"", 1707), Tuple.Create("\"", 1744)
|
||||
|
||||
#line 22 "..\..\Views\Device\DeviceParts\_Comments.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 1745), Tuple.Create<System.Object, System.Int32>(c.Timestamp.ToFullDateTime()
|
||||
#line 21 "..\..\Views\Device\DeviceParts\_Comments.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 1715), Tuple.Create<System.Object, System.Int32>(c.Timestamp.ToFullDateTime()
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 1745), false)
|
||||
, 1715), false)
|
||||
);
|
||||
|
||||
WriteLiteral(">");
|
||||
|
||||
|
||||
#line 22 "..\..\Views\Device\DeviceParts\_Comments.cshtml"
|
||||
#line 21 "..\..\Views\Device\DeviceParts\_Comments.cshtml"
|
||||
Write(c.Timestamp.ToFullDateTime());
|
||||
|
||||
|
||||
@@ -305,7 +294,7 @@ WriteLiteral(" class=\"comment\"");
|
||||
WriteLiteral(">");
|
||||
|
||||
|
||||
#line 23 "..\..\Views\Device\DeviceParts\_Comments.cshtml"
|
||||
#line 22 "..\..\Views\Device\DeviceParts\_Comments.cshtml"
|
||||
Write(c.Comments.ToHtmlComment());
|
||||
|
||||
|
||||
@@ -314,7 +303,7 @@ WriteLiteral(">");
|
||||
WriteLiteral("</div>\r\n </div>\r\n");
|
||||
|
||||
|
||||
#line 25 "..\..\Views\Device\DeviceParts\_Comments.cshtml"
|
||||
#line 24 "..\..\Views\Device\DeviceParts\_Comments.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -331,40 +320,40 @@ WriteLiteral(" </div>\r\n</div>\r\n<script>\r\n if (!document.DiscoFunctio
|
||||
"croll to Bottom\r\n }\r\n });\r\n\r\n function onCommentAdded(i" +
|
||||
"d) {\r\n onCommentAddedAsync(id);\r\n }\r\n async function on" +
|
||||
"CommentAddedAsync(id) {\r\n const formData = new FormData();\r\n " +
|
||||
" formData.append(\'__RequestVerificationToken\', $comments.find(\'input[name=\"__R" +
|
||||
"equestVerificationToken\"]\').val());\r\n formData.append(\'id\', id);\r\n\r\n " +
|
||||
" const response = await fetch($comments.attr(\'data-geturl\'), {\r\n " +
|
||||
" method: \'POST\',\r\n body: formData\r\n });\r\n\r\n " +
|
||||
" if (!response.ok) {\r\n alert(\'Unable to load live commen" +
|
||||
"t \' + id + \': \' + response.statusText);\r\n } else {\r\n c" +
|
||||
"onst comment = await response.json();\r\n\r\n if ($comments.hasClass(" +
|
||||
"\'canRemoveAnyComments\'))\r\n renderComment(comment, false, true" +
|
||||
");\r\n else if ($comments.hasClass(\'canRemoveOwnComments\'))\r\n " +
|
||||
" renderComment(comment, false, (comment.AuthorId === $comments.attr" +
|
||||
"(\'data-userid\')));\r\n else\r\n renderComment(comm" +
|
||||
"ent, false, false);\r\n }\r\n }\r\n function onCommentRemoved" +
|
||||
"(id) {\r\n $commentOutput.children(\'div[data-commentid=\"\' + id + \'\"]\')." +
|
||||
"slideUp(300).delay(300).queue(function () {\r\n const $this = $(thi" +
|
||||
"s);\r\n $this.find(\'.timestamp\').livestamp(\'destroy\');\r\n " +
|
||||
" $this.remove();\r\n });\r\n }\r\n function renderComment" +
|
||||
"(c, quick, canRemove) {\r\n let t = \'<div><span class=\"author\" />\';\r\n " +
|
||||
" if (canRemove)\r\n t += \'<span class=\"remove fa fa-times-" +
|
||||
"circle\" />\';\r\n t += \'<span class=\"timestamp\" /><div class=\"comment\" /" +
|
||||
"></div>\';\r\n\r\n const e = $(t);\r\n e.attr(\'data-commentid\', c" +
|
||||
".Id);\r\n e.find(\'.author\').text(c.Author);\r\n e.find(\'.times" +
|
||||
"tamp\').text(c.TimestampFull).attr(\'title\', c.TimestampFull).livestamp(c.Timestam" +
|
||||
"pUnixEpoc);\r\n e.find(\'.comment\').html(c.HtmlComments);\r\n\r\n " +
|
||||
" $commentOutput.append(e);\r\n\r\n if (!quick) {\r\n e.anima" +
|
||||
"te({ backgroundColor: \'#ffff99\' }, 500, function () {\r\n e.ani" +
|
||||
"mate({ backgroundColor: \'#fafafa\' }, 500, function () {\r\n " +
|
||||
" e.css(\'background-color\', \'\');\r\n });\r\n });\r\n " +
|
||||
" $commentOutput.animate({ scrollTop: $commentOutput[0].scrollHeigh" +
|
||||
"t }, 250)\r\n }\r\n }\r\n\r\n document.DiscoFunctions.onComment" +
|
||||
"Added = onCommentAdded;\r\n document.DiscoFunctions.onCommentRemoved = onCo" +
|
||||
"mmentRemoved;\r\n });\r\n</script>\r\n");
|
||||
" formData.append(\'__RequestVerificationToken\', document.body.dataset.antiforge" +
|
||||
"ry);\r\n formData.append(\'id\', id);\r\n\r\n const response = awa" +
|
||||
"it fetch($comments.attr(\'data-geturl\'), {\r\n method: \'POST\',\r\n " +
|
||||
" body: formData\r\n });\r\n\r\n if (!response.ok) {\r\n" +
|
||||
" alert(\'Unable to load live comment \' + id + \': \' + response.stat" +
|
||||
"usText);\r\n } else {\r\n const comment = await response.j" +
|
||||
"son();\r\n\r\n if ($comments.hasClass(\'canRemoveAnyComments\'))\r\n " +
|
||||
" renderComment(comment, false, true);\r\n else if ($c" +
|
||||
"omments.hasClass(\'canRemoveOwnComments\'))\r\n renderComment(com" +
|
||||
"ment, false, (comment.AuthorId === $comments.attr(\'data-userid\')));\r\n " +
|
||||
" else\r\n renderComment(comment, false, false);\r\n " +
|
||||
" }\r\n }\r\n function onCommentRemoved(id) {\r\n $commentOut" +
|
||||
"put.children(\'div[data-commentid=\"\' + id + \'\"]\').slideUp(300).delay(300).queue(f" +
|
||||
"unction () {\r\n const $this = $(this);\r\n $this.find" +
|
||||
"(\'.timestamp\').livestamp(\'destroy\');\r\n $this.remove();\r\n " +
|
||||
" });\r\n }\r\n function renderComment(c, quick, canRemove) {\r\n " +
|
||||
" let t = \'<div><span class=\"author\" />\';\r\n if (canRemove)\r\n " +
|
||||
" t += \'<span class=\"remove fa fa-times-circle\" />\';\r\n t += " +
|
||||
"\'<span class=\"timestamp\" /><div class=\"comment\" /></div>\';\r\n\r\n const " +
|
||||
"e = $(t);\r\n e.attr(\'data-commentid\', c.Id);\r\n e.find(\'.aut" +
|
||||
"hor\').text(c.Author);\r\n e.find(\'.timestamp\').text(c.TimestampFull).at" +
|
||||
"tr(\'title\', c.TimestampFull).livestamp(c.TimestampUnixEpoc);\r\n e.find" +
|
||||
"(\'.comment\').html(c.HtmlComments);\r\n\r\n $commentOutput.append(e);\r\n\r\n " +
|
||||
" if (!quick) {\r\n e.animate({ backgroundColor: \'#ffff99\'" +
|
||||
" }, 500, function () {\r\n e.animate({ backgroundColor: \'#fafaf" +
|
||||
"a\' }, 500, function () {\r\n e.css(\'background-color\', \'\');" +
|
||||
"\r\n });\r\n });\r\n $commentOutput.a" +
|
||||
"nimate({ scrollTop: $commentOutput[0].scrollHeight }, 250)\r\n }\r\n " +
|
||||
" }\r\n\r\n document.DiscoFunctions.onCommentAdded = onCommentAdded;\r\n " +
|
||||
" document.DiscoFunctions.onCommentRemoved = onCommentRemoved;\r\n });\r\n</scrip" +
|
||||
"t>\r\n");
|
||||
|
||||
|
||||
#line 107 "..\..\Views\Device\DeviceParts\_Comments.cshtml"
|
||||
#line 106 "..\..\Views\Device\DeviceParts\_Comments.cshtml"
|
||||
if (canAddComments)
|
||||
{
|
||||
|
||||
@@ -385,25 +374,25 @@ WriteLiteral(" <script>\r\n $(function () {\r\n const $comm
|
||||
" alert(\'Enter a comment to post\');\r\n $commentInput.focus(" +
|
||||
");\r\n return;\r\n }\r\n\r\n $commentIn" +
|
||||
"put.prop(\'disabled\', true);\r\n\r\n const formData = new FormData();\r" +
|
||||
"\n formData.append(\'__RequestVerificationToken\', $comments.find(\'i" +
|
||||
"nput[name=\"__RequestVerificationToken\"]\').val());\r\n formData.appe" +
|
||||
"nd(\'comment\', comment);\r\n\r\n const response = await fetch($comment" +
|
||||
"s.attr(\'data-addurl\'), {\r\n method: \'POST\',\r\n " +
|
||||
" body: formData\r\n });\r\n\r\n if (response.ok) {\r\n " +
|
||||
" $commentInput.val(\'\').prop(\'disabled\', false).focus();\r\n " +
|
||||
" } else {\r\n alert(\'Unable to add comment: \' + respon" +
|
||||
"se.statusText);\r\n $commentInput.prop(\'disabled\', false).focus" +
|
||||
"();\r\n }\r\n }\r\n });\r\n </script>\r\n");
|
||||
"\n formData.append(\'__RequestVerificationToken\', document.body.dat" +
|
||||
"aset.antiforgery);\r\n formData.append(\'comment\', comment);\r\n\r\n " +
|
||||
" const response = await fetch($comments.attr(\'data-addurl\'), {\r\n " +
|
||||
" method: \'POST\',\r\n body: formData\r\n " +
|
||||
" });\r\n\r\n if (response.ok) {\r\n $commentInput" +
|
||||
".val(\'\').prop(\'disabled\', false).focus();\r\n } else {\r\n " +
|
||||
" alert(\'Unable to add comment: \' + response.statusText);\r\n " +
|
||||
" $commentInput.prop(\'disabled\', false).focus();\r\n }\r\n " +
|
||||
" }\r\n });\r\n </script>\r\n");
|
||||
|
||||
|
||||
#line 156 "..\..\Views\Device\DeviceParts\_Comments.cshtml"
|
||||
#line 155 "..\..\Views\Device\DeviceParts\_Comments.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 157 "..\..\Views\Device\DeviceParts\_Comments.cshtml"
|
||||
#line 156 "..\..\Views\Device\DeviceParts\_Comments.cshtml"
|
||||
if (canRemoveAnyComments || canRemoveOwnComments)
|
||||
{
|
||||
|
||||
@@ -430,17 +419,16 @@ WriteLiteral(" <script>\r\n $(function () {\r\n const $comm
|
||||
" $dialogRemove.dialog(\"close\");\r\n }\r\n }).dialo" +
|
||||
"g(\'open\');\r\n }\r\n async function removeCommentAsync(comment" +
|
||||
"Id) {\r\n const formData = new FormData();\r\n formDat" +
|
||||
"a.append(\'__RequestVerificationToken\', $comments.find(\'input[name=\"__RequestVeri" +
|
||||
"ficationToken\"]\').val());\r\n formData.append(\'id\', commentId);\r\n\r\n" +
|
||||
" const response = await fetch($comments.attr(\'data-removeurl\'), {" +
|
||||
"\r\n method: \'POST\',\r\n body: formData\r\n " +
|
||||
" });\r\n\r\n if (!response.ok) {\r\n alert" +
|
||||
"(\'Unable to remove comment: \' + response.statusText);\r\n }\r\n " +
|
||||
" $dialogRemove.dialog(\"close\");\r\n }\r\n });\r\n </scri" +
|
||||
"pt>\r\n");
|
||||
"a.append(\'__RequestVerificationToken\', document.body.dataset.antiforgery);\r\n " +
|
||||
" formData.append(\'id\', commentId);\r\n\r\n const response " +
|
||||
"= await fetch($comments.attr(\'data-removeurl\'), {\r\n method: \'" +
|
||||
"POST\',\r\n body: formData\r\n });\r\n\r\n " +
|
||||
" if (!response.ok) {\r\n alert(\'Unable to remove comment: \' +" +
|
||||
" response.statusText);\r\n }\r\n $dialogRemove.dialog(" +
|
||||
"\"close\");\r\n }\r\n });\r\n </script>\r\n");
|
||||
|
||||
|
||||
#line 212 "..\..\Views\Device\DeviceParts\_Comments.cshtml"
|
||||
#line 211 "..\..\Views\Device\DeviceParts\_Comments.cshtml"
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -18,8 +18,7 @@
|
||||
<table id="deviceShowResources">
|
||||
<tr>
|
||||
<td id="AttachmentsContainer">
|
||||
<div id="Attachments" class="@(canAddAttachments ? "canAddAttachments" : "cannotAddAttachments") @(canRemoveAnyAttachments ? "canRemoveAnyAttachments" : "cannotRemoveAnyAttachments") @(canRemoveOwnAttachments ? "canRemoveOwnAttachments" : "cannotRemoveOwnAttachments")" data-userid="@CurrentUser.UserId" data-uploadurl="@(Url.Action(MVC.API.Device.AttachmentUpload(Model.Device.SerialNumber, null)))" data-onlineuploadurl="@(Url.Action(MVC.API.Device.AttachmentOnlineUploadSession(Model.Device.SerialNumber)))" data-qrcodeurl="@Url.Content("~/ClientSource/Scripts/Modules/qrcode.min.js")">
|
||||
@Html.AntiForgeryToken()
|
||||
<div id="Attachments" class="@(canAddAttachments ? "canAddAttachments" : "cannotAddAttachments") @(canRemoveAnyAttachments ? "canRemoveAnyAttachments" : "cannotRemoveAnyAttachments") @(canRemoveOwnAttachments ? "canRemoveOwnAttachments" : "cannotRemoveOwnAttachments")" data-userid="@CurrentUser.UserId" data-uploadurl="@(Url.Action(MVC.API.Device.AttachmentUpload(Model.Device.SerialNumber, null)))" data-onlineuploadurl="@(Url.Action(MVC.API.Device.AttachmentOnlineUploadSession(Model.Device.SerialNumber)))" data-qrcodeurl="@Url.Content("~/ClientSource/Scripts/Modules/qrcode.min.js")" data-removeurl="@Url.Action(MVC.API.Device.AttachmentRemove())">
|
||||
<div class="Disco-AttachmentUpload-DropTarget">
|
||||
<h2>Drop Attachments Here</h2>
|
||||
</div>
|
||||
@@ -236,8 +235,6 @@
|
||||
function removeAttachment() {
|
||||
$this = $(this).closest('a');
|
||||
|
||||
var data = { id: $this.attr('data-attachmentid') };
|
||||
|
||||
if (!$dialogRemoveAttachment) {
|
||||
$dialogRemoveAttachment = $('#dialogRemoveAttachment').dialog({
|
||||
resizable: false,
|
||||
@@ -247,35 +244,36 @@
|
||||
});
|
||||
}
|
||||
|
||||
$dialogRemoveAttachment.dialog("enable");
|
||||
async function removeAttachmentAsync(id) {
|
||||
const body = new FormData();
|
||||
body.append('__RequestVerificationToken', document.body.dataset.antiforgery);
|
||||
body.append('id', id);
|
||||
|
||||
try {
|
||||
const response = await fetch($Attachments.attr('data-removeurl'), {
|
||||
body: body,
|
||||
method: 'POST'
|
||||
});
|
||||
if (!response.ok) {
|
||||
alert('Unable to remove attachment: ' + response.statusText);
|
||||
}
|
||||
$dialogRemoveAttachment.dialog("close");
|
||||
} catch (e) {
|
||||
alert('Unable to remove attachment: ' + e);
|
||||
$dialogRemoveAttachment.dialog("close");
|
||||
}
|
||||
}
|
||||
|
||||
const attachmentId = $this.attr('data-attachmentid');
|
||||
$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') {
|
||||
// Do nothing, await SignalR notification
|
||||
} else {
|
||||
alert('Unable to remove attachment: ' + d);
|
||||
}
|
||||
$dialogRemoveAttachment.dialog("close");
|
||||
},
|
||||
error: function (jqXHR, textStatus, errorThrown) {
|
||||
alert('Unable to remove attachment: ' + textStatus);
|
||||
$dialogRemoveAttachment.dialog("close");
|
||||
}
|
||||
});
|
||||
removeAttachmentAsync(attachmentId);
|
||||
},
|
||||
Cancel: function () {
|
||||
$dialogRemoveAttachment.dialog("close");
|
||||
}
|
||||
});
|
||||
|
||||
$dialogRemoveAttachment.dialog('open');
|
||||
}).dialog('open');
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -149,18 +149,18 @@ WriteLiteral(" data-qrcodeurl=\"");
|
||||
#line hidden
|
||||
WriteLiteral("\"");
|
||||
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
WriteLiteral(" data-removeurl=\"");
|
||||
|
||||
|
||||
#line 22 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
Write(Html.AntiForgeryToken());
|
||||
#line 21 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
Write(Url.Action(MVC.API.Device.AttachmentRemove()));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n <div");
|
||||
WriteLiteral("\"");
|
||||
|
||||
WriteLiteral(">\r\n <div");
|
||||
|
||||
WriteLiteral(" class=\"Disco-AttachmentUpload-DropTarget\"");
|
||||
|
||||
@@ -172,13 +172,13 @@ WriteLiteral(" class=\"attachmentOutput\"");
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
|
||||
#line 27 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
#line 26 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 27 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
#line 26 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
if (Model.Device.DeviceAttachments != null)
|
||||
{
|
||||
foreach (var da in Model.Device.DeviceAttachments.OrderByDescending(a => a.Id))
|
||||
@@ -189,20 +189,20 @@ WriteLiteral(">\r\n");
|
||||
#line hidden
|
||||
WriteLiteral(" <a");
|
||||
|
||||
WriteAttribute("href", Tuple.Create(" href=\"", 1912), Tuple.Create("\"", 1972)
|
||||
WriteAttribute("href", Tuple.Create(" href=\"", 1930), Tuple.Create("\"", 1990)
|
||||
|
||||
#line 31 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 1919), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.API.Device.AttachmentDownload(da.Id))
|
||||
#line 30 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 1937), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.API.Device.AttachmentDownload(da.Id))
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 1919), false)
|
||||
, 1937), false)
|
||||
);
|
||||
|
||||
WriteLiteral(" data-attachmentid=\"");
|
||||
|
||||
|
||||
#line 31 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
#line 30 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
Write(da.Id);
|
||||
|
||||
|
||||
@@ -213,7 +213,7 @@ WriteLiteral("\"");
|
||||
WriteLiteral(" data-mimetype=\"");
|
||||
|
||||
|
||||
#line 31 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
#line 30 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
Write(da.MimeType);
|
||||
|
||||
|
||||
@@ -225,28 +225,28 @@ WriteLiteral(">\r\n <span");
|
||||
|
||||
WriteLiteral(" class=\"icon\"");
|
||||
|
||||
WriteAttribute("title", Tuple.Create(" title=\"", 2086), Tuple.Create("\"", 2106)
|
||||
WriteAttribute("title", Tuple.Create(" title=\"", 2104), Tuple.Create("\"", 2124)
|
||||
|
||||
#line 32 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 2094), Tuple.Create<System.Object, System.Int32>(da.Filename
|
||||
#line 31 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 2112), Tuple.Create<System.Object, System.Int32>(da.Filename
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 2094), false)
|
||||
, 2112), false)
|
||||
);
|
||||
|
||||
WriteLiteral(">\r\n <img");
|
||||
|
||||
WriteLiteral(" alt=\"Attachment Thumbnail\"");
|
||||
|
||||
WriteAttribute("src", Tuple.Create(" src=\"", 2181), Tuple.Create("\"", 2243)
|
||||
WriteAttribute("src", Tuple.Create(" src=\"", 2199), Tuple.Create("\"", 2261)
|
||||
|
||||
#line 33 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 2187), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.API.Device.AttachmentThumbnail(da.Id))
|
||||
#line 32 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 2205), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.API.Device.AttachmentThumbnail(da.Id))
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 2187), false)
|
||||
, 2205), false)
|
||||
);
|
||||
|
||||
WriteLiteral(" />\r\n </span>\r\n " +
|
||||
@@ -254,40 +254,40 @@ WriteLiteral(" />\r\n </span>\r\n
|
||||
|
||||
WriteLiteral(" class=\"comments\"");
|
||||
|
||||
WriteAttribute("title", Tuple.Create(" title=\"", 2352), Tuple.Create("\"", 2389)
|
||||
WriteAttribute("title", Tuple.Create(" title=\"", 2370), Tuple.Create("\"", 2407)
|
||||
|
||||
#line 35 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 2360), Tuple.Create<System.Object, System.Int32>(da.Comments ?? da.Filename
|
||||
#line 34 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 2378), Tuple.Create<System.Object, System.Int32>(da.Comments ?? da.Filename
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 2360), false)
|
||||
, 2378), false)
|
||||
);
|
||||
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
|
||||
#line 36 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
#line 35 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 36 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
#line 35 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
if (!string.IsNullOrEmpty(da.DocumentTemplateId))
|
||||
{
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 37 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
#line 36 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
Write(da.DocumentTemplate.Description);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 37 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
#line 36 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -295,14 +295,14 @@ WriteLiteral(">\r\n");
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 39 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
#line 38 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
Write(da.Comments ?? da.Filename);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 39 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
#line 38 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
}
|
||||
|
||||
#line default
|
||||
@@ -314,7 +314,7 @@ WriteLiteral(" class=\"author\"");
|
||||
WriteLiteral(">");
|
||||
|
||||
|
||||
#line 40 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
#line 39 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
Write(da.TechUser.ToString());
|
||||
|
||||
|
||||
@@ -323,7 +323,7 @@ WriteLiteral(">");
|
||||
WriteLiteral("</span>");
|
||||
|
||||
|
||||
#line 40 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
#line 39 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
if (canRemoveAnyAttachments || (canRemoveOwnAttachments && da.TechUserId.Equals(CurrentUser.UserId, StringComparison.OrdinalIgnoreCase)))
|
||||
{
|
||||
|
||||
@@ -336,7 +336,7 @@ WriteLiteral(" class=\"remove fa fa-times-circle\"");
|
||||
WriteLiteral("></span>");
|
||||
|
||||
|
||||
#line 41 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
#line 40 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
}
|
||||
|
||||
#line default
|
||||
@@ -345,20 +345,20 @@ WriteLiteral("<span");
|
||||
|
||||
WriteLiteral(" class=\"timestamp\"");
|
||||
|
||||
WriteAttribute("title", Tuple.Create(" title=\"", 3044), Tuple.Create("\"", 3082)
|
||||
WriteAttribute("title", Tuple.Create(" title=\"", 3062), Tuple.Create("\"", 3100)
|
||||
|
||||
#line 41 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 3052), Tuple.Create<System.Object, System.Int32>(da.Timestamp.ToFullDateTime()
|
||||
#line 40 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 3070), Tuple.Create<System.Object, System.Int32>(da.Timestamp.ToFullDateTime()
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 3052), false)
|
||||
, 3070), false)
|
||||
);
|
||||
|
||||
WriteLiteral(" data-livestamp=\"");
|
||||
|
||||
|
||||
#line 41 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
#line 40 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
Write(da.Timestamp.ToUnixEpoc());
|
||||
|
||||
|
||||
@@ -369,7 +369,7 @@ WriteLiteral("\"");
|
||||
WriteLiteral(">");
|
||||
|
||||
|
||||
#line 41 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
#line 40 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
Write(da.Timestamp.ToFullDateTime());
|
||||
|
||||
|
||||
@@ -378,7 +378,7 @@ WriteLiteral(">");
|
||||
WriteLiteral("</span>\r\n </a>\r\n");
|
||||
|
||||
|
||||
#line 43 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
#line 42 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -388,13 +388,13 @@ WriteLiteral("</span>\r\n </a>\r\n");
|
||||
WriteLiteral(" </div>\r\n");
|
||||
|
||||
|
||||
#line 46 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
#line 45 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 46 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
#line 45 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
if (canAddAttachments)
|
||||
{
|
||||
|
||||
@@ -432,7 +432,7 @@ WriteLiteral(" title=\"Upload with Online Services\"");
|
||||
WriteLiteral("></span>\r\n </div>\r\n");
|
||||
|
||||
|
||||
#line 52 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
#line 51 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -459,7 +459,7 @@ WriteLiteral(@">
|
||||
url: '");
|
||||
|
||||
|
||||
#line 67 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
#line 66 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
Write(Url.Action(MVC.API.Device.Attachment()));
|
||||
|
||||
|
||||
@@ -492,7 +492,7 @@ WriteLiteral("\',\r\n dataType: \'json\',\r\n
|
||||
"tachmentid\', a.Id).attr(\'data-mimetype\', a.MimeType).attr(\'href\', \'");
|
||||
|
||||
|
||||
#line 98 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
#line 97 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
Write(Url.Action(MVC.API.Device.AttachmentDownload()));
|
||||
|
||||
|
||||
@@ -524,7 +524,7 @@ WriteLiteral(@"/' + a.Id);
|
||||
img.attr('src', '");
|
||||
|
||||
|
||||
#line 121 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
#line 120 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
Write(Url.Action(MVC.API.Device.AttachmentThumbnail()));
|
||||
|
||||
|
||||
@@ -577,13 +577,13 @@ WriteLiteral("/\' + a.Id + \'?v=\' + retryCount);\r\n
|
||||
".onAttachmentRemoved = onAttachmentRemoved;\r\n\r\n");
|
||||
|
||||
|
||||
#line 183 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
#line 182 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 183 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
#line 182 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
if (canAddAttachments)
|
||||
{
|
||||
|
||||
@@ -630,7 +630,7 @@ WriteLiteral("\r\n //#region Add Attachments\r\n
|
||||
" //#endregion\r\n ");
|
||||
|
||||
|
||||
#line 230 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
#line 229 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -639,68 +639,50 @@ WriteLiteral("\r\n //#region Add Attachments\r\n
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 231 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
#line 230 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
if (canRemoveAnyAttachments || canRemoveOwnAttachments)
|
||||
{
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(@"
|
||||
//#region Remove Attachments
|
||||
$attachmentOutput.find('span.remove').click(removeAttachment);
|
||||
|
||||
function removeAttachment() {
|
||||
$this = $(this).closest('a');
|
||||
|
||||
var data = { id: $this.attr('data-attachmentid') };
|
||||
|
||||
if (!$dialogRemoveAttachment) {
|
||||
$dialogRemoveAttachment = $('#dialogRemoveAttachment').dialog({
|
||||
resizable: false,
|
||||
height: 140,
|
||||
modal: true,
|
||||
autoOpen: false
|
||||
});
|
||||
}
|
||||
|
||||
$dialogRemoveAttachment.dialog(""enable"");
|
||||
$dialogRemoveAttachment.dialog('option', 'buttons', {
|
||||
""Remove"": function () {
|
||||
$dialogRemoveAttachment.dialog(""disable"");
|
||||
$dialogRemoveAttachment.dialog(""option"", ""buttons"", null);
|
||||
$.ajax({
|
||||
url: '");
|
||||
WriteLiteral("\r\n //#region Remove Attachments\r\n " +
|
||||
" $attachmentOutput.find(\'span.remove\').click(removeAttachment);\r\n\r\n " +
|
||||
" function removeAttachment() {\r\n " +
|
||||
" $this = $(this).closest(\'a\');\r\n\r\n if (!$dialo" +
|
||||
"gRemoveAttachment) {\r\n $dialogRemoveAttachmen" +
|
||||
"t = $(\'#dialogRemoveAttachment\').dialog({\r\n " +
|
||||
" resizable: false,\r\n height: 140,\r\n " +
|
||||
" modal: true,\r\n " +
|
||||
" autoOpen: false\r\n });\r\n " +
|
||||
" }\r\n\r\n async function removeAt" +
|
||||
"tachmentAsync(id) {\r\n const body = new FormDa" +
|
||||
"ta();\r\n body.append(\'__RequestVerificationTok" +
|
||||
"en\', document.body.dataset.antiforgery);\r\n bo" +
|
||||
"dy.append(\'id\', id);\r\n\r\n try {\r\n " +
|
||||
" const response = await fetch($Attachments.attr(\'data-" +
|
||||
"removeurl\'), {\r\n body: body,\r\n " +
|
||||
" method: \'POST\'\r\n " +
|
||||
" });\r\n if (!response.ok) {\r\n " +
|
||||
" alert(\'Unable to remove attachment: \'" +
|
||||
" + response.statusText);\r\n }\r\n " +
|
||||
" $dialogRemoveAttachment.dialog(\"close\");\r\n " +
|
||||
" } catch (e) {\r\n " +
|
||||
" alert(\'Unable to remove attachment: \' + e);\r\n " +
|
||||
" $dialogRemoveAttachment.dialog(\"close\");\r\n " +
|
||||
" }\r\n }\r\n\r\n con" +
|
||||
"st attachmentId = $this.attr(\'data-attachmentid\');\r\n " +
|
||||
" $dialogRemoveAttachment.dialog(\'option\', \'buttons\', {\r\n " +
|
||||
" \"Remove\": function () {\r\n " +
|
||||
"$dialogRemoveAttachment.dialog(\"option\", \"buttons\", null);\r\n " +
|
||||
" removeAttachmentAsync(attachmentId);\r\n " +
|
||||
" },\r\n Cancel: function () {\r\n " +
|
||||
" $dialogRemoveAttachment.dialog(\"close\");\r\n " +
|
||||
" }\r\n }).dialog(" +
|
||||
"\'open\');\r\n\r\n return false;\r\n " +
|
||||
" }\r\n //#endregion\r\n ");
|
||||
|
||||
|
||||
#line 256 "..\..\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 // Do noth" +
|
||||
"ing, await SignalR notification\r\n " +
|
||||
" } else {\r\n alert(\'Unable to " +
|
||||
"remove attachment: \' + d);\r\n }\r\n " +
|
||||
" $dialogRemoveAttachment.dialog(\"c" +
|
||||
"lose\");\r\n },\r\n " +
|
||||
" error: function (jqXHR, textStatus, errorThrown) {\r\n " +
|
||||
" alert(\'Unable to remove attachment: \' +" +
|
||||
" textStatus);\r\n $dialogRemoveAtta" +
|
||||
"chment.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 " +
|
||||
" $dialogRemoveAttachment.dialog(\'open\');\r\n\r\n " +
|
||||
" return false;\r\n }\r\n //#" +
|
||||
"endregion\r\n ");
|
||||
|
||||
|
||||
#line 283 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
#line 281 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -737,7 +719,7 @@ WriteLiteral("></i> Are you sure?\r\n </p>\r\n </div>\r\n <scr
|
||||
"etailTab-ResourcesLink\">Attachments [");
|
||||
|
||||
|
||||
#line 304 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
#line 302 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
Write(Model.Device.DeviceAttachments == null ? 0 : Model.Device.DeviceAttachments.Count);
|
||||
|
||||
|
||||
|
||||
@@ -148,34 +148,43 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
<span id="Device_Show_Details_Status_LastSeen" class="@lastSeenClass">@CommonHelpers.FriendlyDate(Model.Device.LastNetworkLogonDate)</span>
|
||||
<span id="Device_Show_Details_Status_LastSeen" class="@lastSeenClass" data-updateurl="@(Url.Action(MVC.API.Device.LastNetworkLogonDate(Model.Device.SerialNumber)))">@CommonHelpers.FriendlyDate(Model.Device.LastNetworkLogonDate)</span>
|
||||
</td>
|
||||
@if (!string.IsNullOrEmpty(Model.Device.ComputerName))
|
||||
{
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
var updated = false;
|
||||
var span = $('#Device_Show_Details_Status_LastSeen');
|
||||
var spanProgress = null;
|
||||
const span = $('#Device_Show_Details_Status_LastSeen');
|
||||
let updated = false;
|
||||
let spanProgress = null;
|
||||
|
||||
$.getJSON('@(Url.Action(MVC.API.Device.LastNetworkLogonDate(Model.Device.SerialNumber)))', function (response, result) {
|
||||
async function updateLastNetworkLogonDate() {
|
||||
const body = new FormData();
|
||||
body.append('__RequestVerificationToken', document.body.dataset.antiforgery);
|
||||
|
||||
const response = await fetch(span.attr('data-updateurl'), {
|
||||
method: 'POST',
|
||||
body: body
|
||||
});
|
||||
updated = true;
|
||||
if (spanProgress)
|
||||
spanProgress.remove();
|
||||
|
||||
if (result != 'success') {
|
||||
alert('Unable to retrieve latest network logon date:\n' + response);
|
||||
if (!response.ok) {
|
||||
alert('Unable to retrieve latest network logon date:\n' + response.statusText);
|
||||
$('<span>').addClass('smallMessage').text('[may not be current]').appendTo(span);
|
||||
} else {
|
||||
const result = await response.json();
|
||||
var spanClasses = '',
|
||||
diff = moment().valueOf() - response.UnixEpoc;
|
||||
diff = moment().valueOf() - result.UnixEpoc;
|
||||
if (diff > 2592000000) // 30 Days
|
||||
spanClasses = 'error';
|
||||
else if (diff > 604800000) // 7 Days
|
||||
spanClasses = 'alert';
|
||||
span.removeClass('alert error').addClass(spanClasses).attr('title', response.Formatted).text(response.Formatted).livestamp(response.UnixEpoc);
|
||||
span.removeClass('alert error').addClass(spanClasses).attr('title', result.Formatted).text(result.Formatted).livestamp(result.UnixEpoc);
|
||||
}
|
||||
});
|
||||
}
|
||||
updateLastNetworkLogonDate();
|
||||
|
||||
window.setTimeout(function () {
|
||||
if (!updated) {
|
||||
spanProgress = $('<i>').addClass('ajaxLoading showInitially').attr('title', 'Loading...').appendTo(span);
|
||||
@@ -223,11 +232,11 @@
|
||||
{
|
||||
if (!string.IsNullOrWhiteSpace(assignedUser.PhoneNumber))
|
||||
{
|
||||
<div id="Device_Show_User_PhoneNumber" title="Phone Number"><a href="tel:@assignedUser.PhoneNumber" data-clipboard>@assignedUser.PhoneNumber</a></div>
|
||||
<div id="Device_Show_User_PhoneNumber" title="Phone Number"><a href="tel:@assignedUser.PhoneNumber" data-clipboard>@assignedUser.PhoneNumber</a></div>
|
||||
}
|
||||
if (!string.IsNullOrWhiteSpace(assignedUser.EmailAddress))
|
||||
{
|
||||
<div id="Device_Show_User_EmailAddress" title="Email Address"><a href="mailto:@(Model.Device.AssignedUser.EmailAddress)" data-clipboard="@assignedUser.DisplayName <@assignedUser.EmailAddress>">@assignedUser.EmailAddress</a></div>
|
||||
<div id="Device_Show_User_EmailAddress" title="Email Address"><a href="mailto:@(Model.Device.AssignedUser.EmailAddress)" data-clipboard="@assignedUser.DisplayName <@assignedUser.EmailAddress>">@assignedUser.EmailAddress</a></div>
|
||||
}
|
||||
}
|
||||
@if (Authorization.Has(Claims.User.ShowFlagAssignments))
|
||||
@@ -550,26 +559,29 @@
|
||||
}
|
||||
@if (Model.Device.CanUpdateDeviceBatch())
|
||||
{
|
||||
@Html.ActionLinkSmallButton("Update Batch", MVC.API.Device.UpdateDeviceBatchId(Model.Device.SerialNumber, null, true), "Device_Show_Policies_Batch_Actions_Update_Button")
|
||||
|
||||
<button id="Device_Show_Policies_Batch_Actions_Update_Button" class="button small">Update Batch</button>
|
||||
<div id="Device_Show_Policies_Batch_Actions_Update_Dialog" class="dialog" title="Assign to Device Batch">
|
||||
<div>
|
||||
<ul class="none">
|
||||
@foreach (var db in Model.DeviceBatches.OrderBy(i => i.Name))
|
||||
{
|
||||
var isDecommissioned = Model.DecommissionedDeviceBatchIds.Contains(db.Id);
|
||||
<li class="@(isDecommissioned ? "hidden" : null)">
|
||||
<label title="Purchased: @(db.PurchaseDate.ToLongDateString())">
|
||||
<input type="radio" data-devicebatchid="@db.Id" name="DeviceBatch" />
|
||||
@db.Name
|
||||
</label>
|
||||
</li>
|
||||
if (isDecommissioned)
|
||||
@using (Html.BeginForm(MVC.API.Device.UpdateDeviceBatchId(Model.Device.SerialNumber, null, true)))
|
||||
{
|
||||
@Html.AntiForgeryToken()
|
||||
<ul class="none">
|
||||
@foreach (var db in Model.DeviceBatches.OrderBy(i => i.Name))
|
||||
{
|
||||
<li class="hidden decommissioned-padding"></li>
|
||||
var isDecommissioned = Model.DecommissionedDeviceBatchIds.Contains(db.Id);
|
||||
<li class="@(isDecommissioned ? "hidden" : null)">
|
||||
<label title="Purchased: @(db.PurchaseDate.ToLongDateString())">
|
||||
<input type="radio" data-devicebatchid="@db.Id" name="DeviceBatchId" value="@db.Id" />
|
||||
@db.Name
|
||||
</label>
|
||||
</li>
|
||||
if (isDecommissioned)
|
||||
{
|
||||
<li class="hidden decommissioned-padding"></li>
|
||||
}
|
||||
}
|
||||
}
|
||||
</ul>
|
||||
</ul>
|
||||
}
|
||||
@if (Model.DecommissionedDeviceBatchIds.Count > 0)
|
||||
{
|
||||
<a class="button small show-decommissioned" href="#">Show Decommissioned</a>
|
||||
@@ -598,10 +610,9 @@
|
||||
var deviceBatchId = dialogInputs.filter(':checked').attr('data-devicebatchid');
|
||||
|
||||
if (deviceBatchId) {
|
||||
var $this = $(this);
|
||||
$this.dialog("disable");
|
||||
$this.dialog("option", "buttons", null);
|
||||
window.location.href = button.attr('href') + '&DeviceBatchId=' + deviceBatchId;
|
||||
$(this)
|
||||
.dialog("option", "buttons", null)
|
||||
.find('form').trigger('submit');
|
||||
} else {
|
||||
alert('A device batch must be selected');
|
||||
}
|
||||
@@ -677,6 +688,7 @@
|
||||
<br />
|
||||
@using (Html.BeginForm(MVC.API.Device.UpdateAssignedUserId(Model.Device.SerialNumber, redirect: true)))
|
||||
{
|
||||
@Html.AntiForgeryToken()
|
||||
<input id="Device_Show_User_Actions_Assign_UserId" name="AssignedUserId" type="text" />
|
||||
}
|
||||
</div>
|
||||
@@ -863,8 +875,12 @@
|
||||
}
|
||||
@if (Model.Device.CanUpdateTrustEnrol())
|
||||
{
|
||||
@Html.ActionLinkSmallButton("Trust Enrol", MVC.API.Device.UpdateAllowUnauthenticatedEnrol(Model.Device.SerialNumber, true.ToString(), true), "Device_Show_Device_Actions_TrustEnrol_Button")
|
||||
<button id="Device_Show_Device_Actions_TrustEnrol_Button" type="button" class="button small">Trust Enrol</button>
|
||||
<div id="Device_Show_Device_Actions_TrustEnrol_Dialog" class="dialog" title="Trust this Device?">
|
||||
@using (Html.BeginForm(MVC.API.Device.UpdateAllowUnauthenticatedEnrol(Model.Device.SerialNumber, true.ToString(), true)))
|
||||
{
|
||||
@Html.AntiForgeryToken()
|
||||
}
|
||||
<p>
|
||||
Devices flagged as 'trusted' are allowed a single-use device enrolment without providing authentication (for example: Active Directory Computer Account).
|
||||
</p>
|
||||
@@ -882,12 +898,9 @@
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
var button = $('#Device_Show_Device_Actions_TrustEnrol_Button');
|
||||
var buttonDialog;
|
||||
button.click(function () {
|
||||
let buttonDialog;
|
||||
$('#Device_Show_Device_Actions_TrustEnrol_Button').click(function () {
|
||||
if (!buttonDialog) {
|
||||
var buttonLink = button.attr('href');
|
||||
button.attr('href', '#');
|
||||
buttonDialog = $('#Device_Show_Device_Actions_TrustEnrol_Dialog').dialog({
|
||||
resizable: false,
|
||||
width: 400,
|
||||
@@ -895,10 +908,9 @@
|
||||
autoOpen: false,
|
||||
buttons: {
|
||||
"Trust": function () {
|
||||
var $this = $(this);
|
||||
$this.dialog("disable");
|
||||
$this.dialog("option", "buttons", null);
|
||||
window.location.href = buttonLink;
|
||||
$(this)
|
||||
.dialog("option", "buttons", null)
|
||||
.find('form').trigger('submit');
|
||||
},
|
||||
Cancel: function () {
|
||||
$(this).dialog("close");
|
||||
@@ -906,18 +918,19 @@
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
buttonDialog.dialog('open');
|
||||
|
||||
return false;
|
||||
});
|
||||
});
|
||||
</script>
|
||||
}
|
||||
@if (Model.Device.CanUpdateUntrustEnrol())
|
||||
{
|
||||
@Html.ActionLinkSmallButton("Untrust Enrol", MVC.API.Device.UpdateAllowUnauthenticatedEnrol(Model.Device.SerialNumber, false.ToString(), true), "Device_Show_Device_Actions_UntrustEnrol_Button")
|
||||
<div id="Device_Show_Device_Actions_UntrustEnrol_Dialog" title="Untrust this Device?">
|
||||
<button id="Device_Show_Device_Actions_UntrustEnrol_Button" type="button" class="button small">Untrust Enrol</button>
|
||||
<div id="Device_Show_Device_Actions_UntrustEnrol_Dialog" class="dialog" title="Untrust this Device?">
|
||||
@using (Html.BeginForm(MVC.API.Device.UpdateAllowUnauthenticatedEnrol(Model.Device.SerialNumber, false.ToString(), true)))
|
||||
{
|
||||
@Html.AntiForgeryToken()
|
||||
}
|
||||
<div class="info-box">
|
||||
<p class="fa-p" style="margin-bottom: 1em;">
|
||||
<i class="fa fa-info-circle"></i>This action will require the device to enrol with authentication (for example: domain joined).
|
||||
@@ -929,137 +942,130 @@
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
var button = $('#Device_Show_Device_Actions_UntrustEnrol_Button');
|
||||
var buttonDialog = $('#Device_Show_Device_Actions_UntrustEnrol_Dialog');
|
||||
var buttonLink = button.attr('href');
|
||||
button.attr('href', '#');
|
||||
button.click(function () {
|
||||
buttonDialog.dialog('open');
|
||||
return false;
|
||||
});
|
||||
buttonDialog.dialog({
|
||||
resizable: false,
|
||||
width: 400,
|
||||
modal: true,
|
||||
autoOpen: false,
|
||||
buttons: {
|
||||
"Untrust": function () {
|
||||
var $this = $(this);
|
||||
$this.dialog("disable");
|
||||
$this.dialog("option", "buttons", null);
|
||||
window.location.href = buttonLink;
|
||||
},
|
||||
Cancel: function () {
|
||||
$(this).dialog("close");
|
||||
}
|
||||
let buttonDialog = null;
|
||||
$('#Device_Show_Device_Actions_UntrustEnrol_Button').on('click', function () {
|
||||
if (!buttonDialog) {
|
||||
buttonDialog = $('#Device_Show_Device_Actions_UntrustEnrol_Dialog').dialog({
|
||||
resizable: false,
|
||||
width: 400,
|
||||
modal: true,
|
||||
autoOpen: false,
|
||||
buttons: {
|
||||
"Untrust": function () {
|
||||
$(this)
|
||||
.dialog("option", "buttons", null)
|
||||
.find('form').trigger('submit');
|
||||
},
|
||||
Cancel: function () {
|
||||
$(this).dialog("close");
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
buttonDialog.dialog('open');
|
||||
});
|
||||
});
|
||||
</script>
|
||||
}
|
||||
@if (Model.Device.CanDecommission())
|
||||
{
|
||||
@Html.ActionLinkSmallButton("Decommission", MVC.API.Device.Decommission(), "Device_Show_Device_Actions_Decommission_Button")
|
||||
<button id="Device_Show_Device_Actions_Decommission_Button" type="button" class="button small">Decommission</button>
|
||||
<div id="Device_Show_Device_Actions_Decommission_Dialog" class="dialog" title="Device Decommissioning">
|
||||
<div class="clearfix" style="margin-bottom: 10px;">
|
||||
<i class="fa fa-question-circle fa-lg information"></i> Why is this device to be decommissioned?
|
||||
</div>
|
||||
<div>
|
||||
<ul class="none">
|
||||
@foreach (DecommissionReasons decommissionReason in Enum.GetValues(typeof(DecommissionReasons)).Cast<DecommissionReasons>().OrderBy(r => r.ToString()))
|
||||
{
|
||||
<li>
|
||||
<input type="radio" id="Device_Show_Device_Actions_Decommission_Reason_@((int)decommissionReason)"
|
||||
name="Device_Show_Device_Actions_Decommission_Reason" value="@((int)decommissionReason)" @((decommissionReason == DecommissionReasons.EndOfLife) ? "checked=\"checked\"" : string.Empty) />
|
||||
<label for="Device_Show_Device_Actions_Decommission_Reason_@((int)decommissionReason)">@(decommissionReason.ReasonMessage())</label>
|
||||
</li>
|
||||
}
|
||||
</ul>
|
||||
</div>
|
||||
@using (Html.BeginForm(MVC.API.Device.Decommission(Model.Device.SerialNumber, null, true)))
|
||||
{
|
||||
@Html.AntiForgeryToken()
|
||||
<div class="clearfix" style="margin-bottom: 10px;">
|
||||
<i class="fa fa-question-circle fa-lg information"></i> Why is this device to be decommissioned?
|
||||
</div>
|
||||
<div>
|
||||
<ul class="none">
|
||||
@foreach (DecommissionReasons decommissionReason in Enum.GetValues(typeof(DecommissionReasons)).Cast<DecommissionReasons>().OrderBy(r => r.ToString()))
|
||||
{
|
||||
<li>
|
||||
<input type="radio" id="Device_Show_Device_Actions_Decommission_Reason_@((int)decommissionReason)"
|
||||
name="Reason" value="@((int)decommissionReason)" @((decommissionReason == DecommissionReasons.EndOfLife) ? "checked=\"checked\"" : string.Empty) />
|
||||
<label for="Device_Show_Device_Actions_Decommission_Reason_@((int)decommissionReason)">@(decommissionReason.ReasonMessage())</label>
|
||||
</li>
|
||||
}
|
||||
</ul>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
var button = $('#Device_Show_Device_Actions_Decommission_Button');
|
||||
var buttonDialog = null;
|
||||
var deviceSerialNumber = '@(Model.Device.SerialNumber)';
|
||||
|
||||
button.click(function () {
|
||||
|
||||
$('#Device_Show_Device_Actions_Decommission_Button').on('click', function () {
|
||||
if (!buttonDialog) {
|
||||
buttonDialog = $('#Device_Show_Device_Actions_Decommission_Dialog')
|
||||
.dialog({
|
||||
resizable: false,
|
||||
modal: true,
|
||||
autoOpen: false,
|
||||
buttons: {
|
||||
"Decommission": function () {
|
||||
|
||||
var reasonId = buttonDialog.find('input:checked').val();
|
||||
|
||||
var $this = $(this);
|
||||
$this.dialog("disable");
|
||||
$this.dialog("option", "buttons", null);
|
||||
|
||||
var url = button.attr('href') + '/' + deviceSerialNumber + '?Reason=' + reasonId + '&redirect=True';
|
||||
|
||||
window.location.href = url;
|
||||
},
|
||||
Cancel: function () {
|
||||
$(this).dialog("close");
|
||||
}
|
||||
}
|
||||
});
|
||||
.dialog({
|
||||
resizable: false,
|
||||
modal: true,
|
||||
autoOpen: false,
|
||||
buttons: {
|
||||
"Decommission": function () {
|
||||
$(this)
|
||||
.dialog("option", "buttons", null)
|
||||
.find('form').trigger('submit');
|
||||
},
|
||||
Cancel: function () {
|
||||
$(this).dialog("close");
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
buttonDialog.dialog('open');
|
||||
return false;
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
||||
}
|
||||
@if (Model.Device.CanRecommission())
|
||||
{
|
||||
@Html.ActionLinkSmallButton("Recommission", MVC.API.Device.Recommission(Model.Device.SerialNumber, true), "Device_Show_Device_Actions_Recommission_Button")
|
||||
<div id="Device_Show_Device_Actions_Recommission_Dialog" title="Recommission this Device?">
|
||||
<button id="Device_Show_Device_Actions_Recommission_Button" type="button" class="button small">Recommission</button>
|
||||
<div id="Device_Show_Device_Actions_Recommission_Dialog" class="dialog" title="Recommission this Device?">
|
||||
@using (Html.BeginForm(MVC.API.Device.Recommission(Model.Device.SerialNumber, true)))
|
||||
{
|
||||
@Html.AntiForgeryToken()
|
||||
}
|
||||
<p>
|
||||
<i class="fa fa-exclamation-triangle fa-lg"></i> Are you sure?
|
||||
</p>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
var button = $('#Device_Show_Device_Actions_Recommission_Button');
|
||||
var buttonDialog = $('#Device_Show_Device_Actions_Recommission_Dialog');
|
||||
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");
|
||||
}
|
||||
let buttonDialog = null;
|
||||
$('#Device_Show_Device_Actions_Recommission_Button').on('click', function () {
|
||||
if (!buttonDialog) {
|
||||
buttonDialog = $('#Device_Show_Device_Actions_Recommission_Dialog').dialog({
|
||||
resizable: false,
|
||||
height: 140,
|
||||
modal: true,
|
||||
autoOpen: false,
|
||||
buttons: {
|
||||
"Recommission": function () {
|
||||
$(this)
|
||||
.dialog("option", "buttons", null)
|
||||
.find('form').trigger('submit');
|
||||
},
|
||||
Cancel: function () {
|
||||
$(this).dialog("close");
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
buttonDialog.dialog('open');
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
||||
}
|
||||
@if (Model.Device.CanDelete())
|
||||
{
|
||||
@Html.ActionLinkSmallButton("Delete Device", MVC.API.Device.Delete(Model.Device.SerialNumber, true), "Device_Show_Device_Actions_Delete_Button")
|
||||
<div id="Device_Show_Device_Actions_Delete_Dialog" title="Delete this Device?">
|
||||
<button id="Device_Show_Device_Actions_Delete_Button" type="button" class="button small">Delete Device</button>
|
||||
<div id="Device_Show_Device_Actions_Delete_Dialog" class="dialog" title="Delete this Device?">
|
||||
@using (Html.BeginForm(MVC.API.Device.Delete(Model.Device.SerialNumber, true)))
|
||||
{
|
||||
@Html.AntiForgeryToken()
|
||||
}
|
||||
<p>
|
||||
<i class="fa fa-exclamation-triangle fa-lg"></i>
|
||||
This item will be permanently deleted and cannot be recovered.<br />
|
||||
@@ -1069,30 +1075,27 @@
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
var button = $('#Device_Show_Device_Actions_Delete_Button');
|
||||
var buttonDialog = $('#Device_Show_Device_Actions_Delete_Dialog');
|
||||
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");
|
||||
}
|
||||
let buttonDialog = null;
|
||||
$('#Device_Show_Device_Actions_Delete_Button').on('click', function () {
|
||||
if (!buttonDialog) {
|
||||
buttonDialog = $('#Device_Show_Device_Actions_Delete_Dialog').dialog({
|
||||
resizable: false,
|
||||
height: 200,
|
||||
modal: true,
|
||||
autoOpen: false,
|
||||
buttons: {
|
||||
"Delete": function () {
|
||||
$(this)
|
||||
.dialog("option", "buttons", null)
|
||||
.find('form').trigger('submit');
|
||||
},
|
||||
Cancel: function () {
|
||||
$(this).dialog("close");
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
buttonDialog.dialog('open');
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -8,6 +8,7 @@
|
||||
<div id="Devices_Import">
|
||||
@using (Html.BeginForm(MVC.API.Device.ImportBegin(), FormMethod.Post, new { enctype = "multipart/form-data" }))
|
||||
{
|
||||
@Html.AntiForgeryToken()
|
||||
<div id="importDialog" class="form" style="width: 450px">
|
||||
<h2>Import Devices</h2>
|
||||
<table>
|
||||
@@ -101,7 +102,7 @@
|
||||
}
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
@@ -186,9 +187,9 @@
|
||||
modal: true,
|
||||
autoOpen: false
|
||||
},
|
||||
$DeviceModelsDialog = null,
|
||||
$DeviceProfilesDialog = null,
|
||||
$DeviceBatchesDialog = null;
|
||||
$DeviceModelsDialog = null,
|
||||
$DeviceProfilesDialog = null,
|
||||
$DeviceBatchesDialog = null;
|
||||
|
||||
$('#Devices_Import_Documentation_DeviceModels_Button').click(function (e) {
|
||||
e.preventDefault();
|
||||
@@ -235,4 +236,4 @@
|
||||
});
|
||||
});
|
||||
</script>
|
||||
}
|
||||
}
|
||||
|
||||
@@ -75,6 +75,20 @@ WriteLiteral(">\r\n");
|
||||
#line 9 "..\..\Views\Device\Import.cshtml"
|
||||
using (Html.BeginForm(MVC.API.Device.ImportBegin(), FormMethod.Post, new { enctype = "multipart/form-data" }))
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 11 "..\..\Views\Device\Import.cshtml"
|
||||
Write(Html.AntiForgeryToken());
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 11 "..\..\Views\Device\Import.cshtml"
|
||||
|
||||
|
||||
|
||||
#line default
|
||||
@@ -93,7 +107,7 @@ WriteLiteral(">\r\n <h2>Import Devices</h2>\r\n <table>\r\
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 16 "..\..\Views\Device\Import.cshtml"
|
||||
#line 17 "..\..\Views\Device\Import.cshtml"
|
||||
Write(Html.LabelFor(m => m.ImportFile));
|
||||
|
||||
|
||||
@@ -119,7 +133,7 @@ WriteLiteral(" /><br />\r\n");
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 20 "..\..\Views\Device\Import.cshtml"
|
||||
#line 21 "..\..\Views\Device\Import.cshtml"
|
||||
Write(Html.ValidationMessageFor(m => m.ImportFile));
|
||||
|
||||
|
||||
@@ -130,7 +144,7 @@ WriteLiteral("\r\n <div>\r\n");
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 22 "..\..\Views\Device\Import.cshtml"
|
||||
#line 23 "..\..\Views\Device\Import.cshtml"
|
||||
Write(Html.CheckBoxFor(m => m.HasHeader));
|
||||
|
||||
|
||||
@@ -141,7 +155,7 @@ WriteLiteral("\r\n");
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 23 "..\..\Views\Device\Import.cshtml"
|
||||
#line 24 "..\..\Views\Device\Import.cshtml"
|
||||
Write(Html.LabelFor(m => m.HasHeader));
|
||||
|
||||
|
||||
@@ -202,7 +216,7 @@ WriteLiteral(@" <script>
|
||||
");
|
||||
|
||||
|
||||
#line 56 "..\..\Views\Device\Import.cshtml"
|
||||
#line 57 "..\..\Views\Device\Import.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -250,13 +264,13 @@ WriteLiteral(">Field Name</th>\r\n <th>Description</th>\r\n
|
||||
"\r\n </thead>\r\n <tbody>\r\n");
|
||||
|
||||
|
||||
#line 80 "..\..\Views\Device\Import.cshtml"
|
||||
#line 81 "..\..\Views\Device\Import.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 80 "..\..\Views\Device\Import.cshtml"
|
||||
#line 81 "..\..\Views\Device\Import.cshtml"
|
||||
foreach (var field in Model.HeaderTypes)
|
||||
{
|
||||
|
||||
@@ -266,7 +280,7 @@ WriteLiteral(">Field Name</th>\r\n <th>Description</th>\r\n
|
||||
WriteLiteral(" <tr>\r\n <th>");
|
||||
|
||||
|
||||
#line 83 "..\..\Views\Device\Import.cshtml"
|
||||
#line 84 "..\..\Views\Device\Import.cshtml"
|
||||
Write(field.Item2);
|
||||
|
||||
|
||||
@@ -277,7 +291,7 @@ WriteLiteral("</th>\r\n <td>\r\n");
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 85 "..\..\Views\Device\Import.cshtml"
|
||||
#line 86 "..\..\Views\Device\Import.cshtml"
|
||||
Write(field.Item3);
|
||||
|
||||
|
||||
@@ -286,13 +300,13 @@ WriteLiteral(" ");
|
||||
WriteLiteral("\r\n");
|
||||
|
||||
|
||||
#line 86 "..\..\Views\Device\Import.cshtml"
|
||||
#line 87 "..\..\Views\Device\Import.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 86 "..\..\Views\Device\Import.cshtml"
|
||||
#line 87 "..\..\Views\Device\Import.cshtml"
|
||||
if (field.Item1 == DeviceImportFieldTypes.DeviceSerialNumber.ToString())
|
||||
{
|
||||
|
||||
@@ -302,7 +316,7 @@ WriteLiteral("\r\n");
|
||||
WriteLiteral(" <strong>Required</strong>\r\n");
|
||||
|
||||
|
||||
#line 89 "..\..\Views\Device\Import.cshtml"
|
||||
#line 90 "..\..\Views\Device\Import.cshtml"
|
||||
}
|
||||
else if (field.Item1 == DeviceImportFieldTypes.ModelId.ToString())
|
||||
{
|
||||
@@ -319,7 +333,7 @@ WriteLiteral(" id=\"Devices_Import_Documentation_DeviceModels_Button\"");
|
||||
WriteLiteral(">Show IDs</a>)</span>\r\n");
|
||||
|
||||
|
||||
#line 93 "..\..\Views\Device\Import.cshtml"
|
||||
#line 94 "..\..\Views\Device\Import.cshtml"
|
||||
}
|
||||
else if (field.Item1 == DeviceImportFieldTypes.ProfileId.ToString())
|
||||
{
|
||||
@@ -336,7 +350,7 @@ WriteLiteral(" id=\"Devices_Import_Documentation_DeviceProfiles_Button\"");
|
||||
WriteLiteral(">Show IDs</a>)</span>\r\n");
|
||||
|
||||
|
||||
#line 97 "..\..\Views\Device\Import.cshtml"
|
||||
#line 98 "..\..\Views\Device\Import.cshtml"
|
||||
}
|
||||
else if (field.Item1 == DeviceImportFieldTypes.BatchId.ToString())
|
||||
{
|
||||
@@ -353,16 +367,16 @@ WriteLiteral(" id=\"Devices_Import_Documentation_DeviceBatches_Button\"");
|
||||
WriteLiteral(">Show IDs</a>)</span>\r\n");
|
||||
|
||||
|
||||
#line 101 "..\..\Views\Device\Import.cshtml"
|
||||
#line 102 "..\..\Views\Device\Import.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n </td>\r\n </tr> \r\n");
|
||||
WriteLiteral("\r\n </td>\r\n </tr>\r\n");
|
||||
|
||||
|
||||
#line 105 "..\..\Views\Device\Import.cshtml"
|
||||
#line 106 "..\..\Views\Device\Import.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -393,13 +407,13 @@ WriteLiteral(@">
|
||||
");
|
||||
|
||||
|
||||
#line 121 "..\..\Views\Device\Import.cshtml"
|
||||
#line 122 "..\..\Views\Device\Import.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 121 "..\..\Views\Device\Import.cshtml"
|
||||
#line 122 "..\..\Views\Device\Import.cshtml"
|
||||
foreach (var dm in Model.DeviceModels)
|
||||
{
|
||||
|
||||
@@ -409,7 +423,7 @@ WriteLiteral(@">
|
||||
WriteLiteral(" <tr>\r\n <td>");
|
||||
|
||||
|
||||
#line 124 "..\..\Views\Device\Import.cshtml"
|
||||
#line 125 "..\..\Views\Device\Import.cshtml"
|
||||
Write(Html.ActionLink(dm.Id.ToString(), MVC.Config.DeviceModel.Index(dm.Id)));
|
||||
|
||||
|
||||
@@ -418,7 +432,7 @@ WriteLiteral(" <tr>\r\n <td>")
|
||||
WriteLiteral("</td>\r\n <td>");
|
||||
|
||||
|
||||
#line 125 "..\..\Views\Device\Import.cshtml"
|
||||
#line 126 "..\..\Views\Device\Import.cshtml"
|
||||
Write(dm.ToString());
|
||||
|
||||
|
||||
@@ -427,7 +441,7 @@ WriteLiteral("</td>\r\n <td>");
|
||||
WriteLiteral("</td>\r\n <td>");
|
||||
|
||||
|
||||
#line 126 "..\..\Views\Device\Import.cshtml"
|
||||
#line 127 "..\..\Views\Device\Import.cshtml"
|
||||
Write(dm.Manufacturer);
|
||||
|
||||
|
||||
@@ -436,7 +450,7 @@ WriteLiteral("</td>\r\n <td>");
|
||||
WriteLiteral("</td>\r\n <td>");
|
||||
|
||||
|
||||
#line 127 "..\..\Views\Device\Import.cshtml"
|
||||
#line 128 "..\..\Views\Device\Import.cshtml"
|
||||
Write(dm.Model);
|
||||
|
||||
|
||||
@@ -445,7 +459,7 @@ WriteLiteral("</td>\r\n <td>");
|
||||
WriteLiteral("</td>\r\n </tr>\r\n");
|
||||
|
||||
|
||||
#line 129 "..\..\Views\Device\Import.cshtml"
|
||||
#line 130 "..\..\Views\Device\Import.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -476,13 +490,13 @@ WriteLiteral(@">
|
||||
");
|
||||
|
||||
|
||||
#line 145 "..\..\Views\Device\Import.cshtml"
|
||||
#line 146 "..\..\Views\Device\Import.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 145 "..\..\Views\Device\Import.cshtml"
|
||||
#line 146 "..\..\Views\Device\Import.cshtml"
|
||||
foreach (var dp in Model.DeviceProfiles)
|
||||
{
|
||||
|
||||
@@ -492,7 +506,7 @@ WriteLiteral(@">
|
||||
WriteLiteral(" <tr>\r\n <td>");
|
||||
|
||||
|
||||
#line 148 "..\..\Views\Device\Import.cshtml"
|
||||
#line 149 "..\..\Views\Device\Import.cshtml"
|
||||
Write(Html.ActionLink(dp.Id.ToString(), MVC.Config.DeviceProfile.Index(dp.Id)));
|
||||
|
||||
|
||||
@@ -501,7 +515,7 @@ WriteLiteral(" <tr>\r\n <td>")
|
||||
WriteLiteral("</td>\r\n <td>");
|
||||
|
||||
|
||||
#line 149 "..\..\Views\Device\Import.cshtml"
|
||||
#line 150 "..\..\Views\Device\Import.cshtml"
|
||||
Write(dp.Name);
|
||||
|
||||
|
||||
@@ -510,7 +524,7 @@ WriteLiteral("</td>\r\n <td>");
|
||||
WriteLiteral("</td>\r\n <td>");
|
||||
|
||||
|
||||
#line 150 "..\..\Views\Device\Import.cshtml"
|
||||
#line 151 "..\..\Views\Device\Import.cshtml"
|
||||
Write(dp.ShortName);
|
||||
|
||||
|
||||
@@ -519,7 +533,7 @@ WriteLiteral("</td>\r\n <td>");
|
||||
WriteLiteral("</td>\r\n <td>");
|
||||
|
||||
|
||||
#line 151 "..\..\Views\Device\Import.cshtml"
|
||||
#line 152 "..\..\Views\Device\Import.cshtml"
|
||||
Write(dp.Description);
|
||||
|
||||
|
||||
@@ -528,7 +542,7 @@ WriteLiteral("</td>\r\n <td>");
|
||||
WriteLiteral("</td>\r\n </tr>\r\n");
|
||||
|
||||
|
||||
#line 153 "..\..\Views\Device\Import.cshtml"
|
||||
#line 154 "..\..\Views\Device\Import.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -558,13 +572,13 @@ WriteLiteral(@">
|
||||
");
|
||||
|
||||
|
||||
#line 168 "..\..\Views\Device\Import.cshtml"
|
||||
#line 169 "..\..\Views\Device\Import.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 168 "..\..\Views\Device\Import.cshtml"
|
||||
#line 169 "..\..\Views\Device\Import.cshtml"
|
||||
foreach (var db in Model.DeviceBatches)
|
||||
{
|
||||
|
||||
@@ -574,7 +588,7 @@ WriteLiteral(@">
|
||||
WriteLiteral(" <tr>\r\n <td>");
|
||||
|
||||
|
||||
#line 171 "..\..\Views\Device\Import.cshtml"
|
||||
#line 172 "..\..\Views\Device\Import.cshtml"
|
||||
Write(Html.ActionLink(db.Id.ToString(), MVC.Config.DeviceBatch.Index(db.Id)));
|
||||
|
||||
|
||||
@@ -583,7 +597,7 @@ WriteLiteral(" <tr>\r\n <td>")
|
||||
WriteLiteral("</td>\r\n <td>");
|
||||
|
||||
|
||||
#line 172 "..\..\Views\Device\Import.cshtml"
|
||||
#line 173 "..\..\Views\Device\Import.cshtml"
|
||||
Write(db.Name);
|
||||
|
||||
|
||||
@@ -592,7 +606,7 @@ WriteLiteral("</td>\r\n <td>");
|
||||
WriteLiteral("</td>\r\n <td>");
|
||||
|
||||
|
||||
#line 173 "..\..\Views\Device\Import.cshtml"
|
||||
#line 174 "..\..\Views\Device\Import.cshtml"
|
||||
Write(CommonHelpers.FriendlyDate(db.PurchaseDate));
|
||||
|
||||
|
||||
@@ -601,7 +615,7 @@ WriteLiteral("</td>\r\n <td>");
|
||||
WriteLiteral("</td>\r\n </tr>\r\n");
|
||||
|
||||
|
||||
#line 175 "..\..\Views\Device\Import.cshtml"
|
||||
#line 176 "..\..\Views\Device\Import.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -611,27 +625,27 @@ WriteLiteral(" </tbody>\r\n </table>\r\n </div>
|
||||
">\r\n $(function () {\r\n var dialogOptions = {\r\n " +
|
||||
" width: 700,\r\n height: 600,\r\n re" +
|
||||
"sizable: false,\r\n modal: true,\r\n autoOpen:" +
|
||||
" false\r\n },\r\n $DeviceModelsDialog = null,\r\n " +
|
||||
" $DeviceProfilesDialog = null,\r\n $DeviceBatchesDialog = n" +
|
||||
"ull;\r\n\r\n $(\'#Devices_Import_Documentation_DeviceModels_Button\').c" +
|
||||
" false\r\n },\r\n $DeviceModelsDialog = null,\r\n " +
|
||||
" $DeviceProfilesDialog = null,\r\n $DeviceBatch" +
|
||||
"esDialog = null;\r\n\r\n $(\'#Devices_Import_Documentation_DeviceModel" +
|
||||
"s_Button\').click(function (e) {\r\n e.preventDefault();\r\n " +
|
||||
" if (!$DeviceModelsDialog)\r\n $DeviceModelsDi" +
|
||||
"alog = $(\'#Devices_Import_Documentation_DeviceModels_Dialog\').dialog(dialogOptio" +
|
||||
"ns);\r\n $DeviceModelsDialog.dialog(\'open\');\r\n }" +
|
||||
");\r\n\r\n $(\'#Devices_Import_Documentation_DeviceProfiles_Button\').c" +
|
||||
"lick(function (e) {\r\n e.preventDefault();\r\n " +
|
||||
" if (!$DeviceModelsDialog)\r\n $DeviceModelsDialog = $(\'#D" +
|
||||
"evices_Import_Documentation_DeviceModels_Dialog\').dialog(dialogOptions);\r\n " +
|
||||
" $DeviceModelsDialog.dialog(\'open\');\r\n });\r\n\r\n " +
|
||||
" $(\'#Devices_Import_Documentation_DeviceProfiles_Button\').click(functio" +
|
||||
"n (e) {\r\n e.preventDefault();\r\n if (!$Devi" +
|
||||
"ceProfilesDialog)\r\n $DeviceProfilesDialog = $(\'#Devices_I" +
|
||||
"mport_Documentation_DeviceProfiles_Dialog\').dialog(dialogOptions);\r\n " +
|
||||
" $DeviceProfilesDialog.dialog(\'open\');\r\n });\r\n " +
|
||||
" $(\'#Devices_Import_Documentation_DeviceBatches_Button\').click(function (e) {" +
|
||||
"\r\n e.preventDefault();\r\n if (!$DeviceBatch" +
|
||||
"esDialog)\r\n $DeviceBatchesDialog = $(\'#Devices_Import_Doc" +
|
||||
"umentation_DeviceBatches_Dialog\').dialog(dialogOptions);\r\n $D" +
|
||||
"eviceBatchesDialog.dialog(\'open\');\r\n });\r\n });\r\n " +
|
||||
" </script>\r\n </div>\r\n</div>\r\n");
|
||||
" if (!$DeviceProfilesDialog)\r\n $DeviceProfilesDialog = $" +
|
||||
"(\'#Devices_Import_Documentation_DeviceProfiles_Dialog\').dialog(dialogOptions);\r\n" +
|
||||
" $DeviceProfilesDialog.dialog(\'open\');\r\n });\r\n" +
|
||||
" $(\'#Devices_Import_Documentation_DeviceBatches_Button\').click(fu" +
|
||||
"nction (e) {\r\n e.preventDefault();\r\n if (!" +
|
||||
"$DeviceBatchesDialog)\r\n $DeviceBatchesDialog = $(\'#Device" +
|
||||
"s_Import_Documentation_DeviceBatches_Dialog\').dialog(dialogOptions);\r\n " +
|
||||
" $DeviceBatchesDialog.dialog(\'open\');\r\n });\r\n " +
|
||||
" });\r\n </script>\r\n </div>\r\n</div>\r\n");
|
||||
|
||||
|
||||
#line 216 "..\..\Views\Device\Import.cshtml"
|
||||
#line 217 "..\..\Views\Device\Import.cshtml"
|
||||
if (Model.CompletedImportSessionContext != null)
|
||||
{
|
||||
|
||||
@@ -653,7 +667,7 @@ WriteLiteral(" class=\"fa fa-lg fa-check\"");
|
||||
WriteLiteral("></i>Successfully imported/updated ");
|
||||
|
||||
|
||||
#line 219 "..\..\Views\Device\Import.cshtml"
|
||||
#line 220 "..\..\Views\Device\Import.cshtml"
|
||||
Write(Model.CompletedImportSessionContext.AffectedRecords);
|
||||
|
||||
|
||||
@@ -662,7 +676,7 @@ WriteLiteral("></i>Successfully imported/updated ");
|
||||
WriteLiteral(" device");
|
||||
|
||||
|
||||
#line 219 "..\..\Views\Device\Import.cshtml"
|
||||
#line 220 "..\..\Views\Device\Import.cshtml"
|
||||
Write(Model.CompletedImportSessionContext.AffectedRecords != 1 ? "s" : null);
|
||||
|
||||
|
||||
@@ -671,7 +685,7 @@ WriteLiteral(" device");
|
||||
WriteLiteral(".</h3>\r\n <div><code>");
|
||||
|
||||
|
||||
#line 220 "..\..\Views\Device\Import.cshtml"
|
||||
#line 221 "..\..\Views\Device\Import.cshtml"
|
||||
Write(Model.CompletedImportSessionContext.Filename);
|
||||
|
||||
|
||||
@@ -698,8 +712,9 @@ WriteLiteral(@" <script>
|
||||
");
|
||||
|
||||
|
||||
#line 238 "..\..\Views\Device\Import.cshtml"
|
||||
#line 239 "..\..\Views\Device\Import.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
@@ -63,6 +63,7 @@
|
||||
<div class="actionBar">
|
||||
@using (Html.BeginForm(MVC.API.Device.ImportParse(Model.Context.SessionId, null)))
|
||||
{
|
||||
@Html.AntiForgeryToken()
|
||||
<a id="Devices_Import_Headers_Submit" href="#" class="button">Parse Device Import</a>
|
||||
}
|
||||
</div>
|
||||
|
||||
@@ -403,6 +403,20 @@ WriteLiteral(">\r\n");
|
||||
#line 64 "..\..\Views\Device\ImportHeaders.cshtml"
|
||||
using (Html.BeginForm(MVC.API.Device.ImportParse(Model.Context.SessionId, null)))
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 66 "..\..\Views\Device\ImportHeaders.cshtml"
|
||||
Write(Html.AntiForgeryToken());
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 66 "..\..\Views\Device\ImportHeaders.cshtml"
|
||||
|
||||
|
||||
|
||||
#line default
|
||||
@@ -418,7 +432,7 @@ WriteLiteral(" class=\"button\"");
|
||||
WriteLiteral(">Parse Device Import</a>\r\n");
|
||||
|
||||
|
||||
#line 67 "..\..\Views\Device\ImportHeaders.cshtml"
|
||||
#line 68 "..\..\Views\Device\ImportHeaders.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -442,13 +456,13 @@ WriteLiteral("></i>Parsing device import...</h4>\r\n</div>\r\n<script>\r\n $(
|
||||
" var headerTypes = {\r\n");
|
||||
|
||||
|
||||
#line 76 "..\..\Views\Device\ImportHeaders.cshtml"
|
||||
#line 77 "..\..\Views\Device\ImportHeaders.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 76 "..\..\Views\Device\ImportHeaders.cshtml"
|
||||
#line 77 "..\..\Views\Device\ImportHeaders.cshtml"
|
||||
foreach (var h in Model.HeaderTypes)
|
||||
{
|
||||
|
||||
@@ -460,7 +474,7 @@ WriteLiteral(" ");
|
||||
WriteLiteral("\'");
|
||||
|
||||
|
||||
#line 78 "..\..\Views\Device\ImportHeaders.cshtml"
|
||||
#line 79 "..\..\Views\Device\ImportHeaders.cshtml"
|
||||
Write(h.Item1);
|
||||
|
||||
|
||||
@@ -469,7 +483,7 @@ WriteLiteral("\'");
|
||||
WriteLiteral("\': \'");
|
||||
|
||||
|
||||
#line 78 "..\..\Views\Device\ImportHeaders.cshtml"
|
||||
#line 79 "..\..\Views\Device\ImportHeaders.cshtml"
|
||||
Write(h.Item2);
|
||||
|
||||
|
||||
@@ -480,7 +494,7 @@ WriteLiteral("\',");
|
||||
WriteLiteral("\r\n");
|
||||
|
||||
|
||||
#line 79 "..\..\Views\Device\ImportHeaders.cshtml"
|
||||
#line 80 "..\..\Views\Device\ImportHeaders.cshtml"
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -27,112 +27,116 @@
|
||||
<li class="actionDetached">
|
||||
<input id="Devices_Import_Review_Navigation_Error" type="checkbox" checked /><label for="Devices_Import_Review_Navigation_Error">Show Errors (@(Model.StatisticErrorRecords))</label>
|
||||
</li>
|
||||
}@if (Model.StatisticNewRecords > 0)
|
||||
}@if (Model.StatisticNewRecords > 0)
|
||||
{
|
||||
<li class="actionAdded">
|
||||
<input id="Devices_Import_Review_Navigation_New" type="checkbox" checked /><label for="Devices_Import_Review_Navigation_New">Show New Devices (@(Model.StatisticNewRecords))</label>
|
||||
</li>
|
||||
}@if (Model.StatisticModifiedRecords > 0)
|
||||
{
|
||||
<li class="actionModified">
|
||||
<input id="Devices_Import_Review_Navigation_Modified" type="checkbox" checked /><label for="Devices_Import_Review_Navigation_Modified">Show Modified Devices (@(Model.StatisticModifiedRecords))</label>
|
||||
</li>
|
||||
}@if (Model.StatisticUnmodifiedRecords > 0)
|
||||
{
|
||||
<li class="actionUnchanged">
|
||||
<input id="Devices_Import_Review_Navigation_Unchanged" type="checkbox" checked /><label for="Devices_Import_Review_Navigation_Unchanged">Show Unchanged Devices (@(Model.StatisticUnmodifiedRecords))</label>
|
||||
</li>
|
||||
}
|
||||
</ul>
|
||||
<script>
|
||||
$(function () {
|
||||
$navigationContainer = $('#Devices_Import_Review_Navigation');
|
||||
$tableBody = $('#Devices_Import_Review_TableContainer').find('tbody');
|
||||
|
||||
$navigationContainer.on('change', 'input', function () {
|
||||
$tableBody.find('tr').show();
|
||||
|
||||
$navigationContainer.find('input').each(function () {
|
||||
var $this = $(this);
|
||||
var action = $this.closest('li').attr('class');
|
||||
var records = $tableBody.find('tr.' + action);
|
||||
if ($this.is(':checked')) {
|
||||
records.show();
|
||||
} else {
|
||||
records.hide();
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
<div id="Devices_Import_Review_TableContainer">
|
||||
<table class="tableData">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Action</th>
|
||||
<th>Row</th>
|
||||
@foreach (var header in Model.Context.Columns.Where(c => c.Type != DeviceImportFieldTypes.IgnoreColumn))
|
||||
{
|
||||
<th>@(Model.HeaderTypes.FirstOrDefault(h => h.Item1 == header.Type).Item2)</th>
|
||||
}
|
||||
</tr>
|
||||
<tr>
|
||||
<th> </th>
|
||||
<th> </th>
|
||||
@foreach (var header in Model.Context.Columns.Where(c => c.Type != DeviceImportFieldTypes.IgnoreColumn))
|
||||
{
|
||||
<th>@header.Name</th>
|
||||
}
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach (var recordEntry in Model.Context.Records.Select((r, i) => Tuple.Create(r, i)))
|
||||
}@if (Model.StatisticModifiedRecords > 0)
|
||||
{
|
||||
var record = recordEntry.Item1;
|
||||
<tr class="action@(record.RecordAction)">
|
||||
<td class="action"><i class="fa fa-fw"></i></td>
|
||||
<td>@(recordEntry.Item2 + 1)</td>
|
||||
@foreach (var field in record.Fields)
|
||||
<li class="actionModified">
|
||||
<input id="Devices_Import_Review_Navigation_Modified" type="checkbox" checked /><label for="Devices_Import_Review_Navigation_Modified">Show Modified Devices (@(Model.StatisticModifiedRecords))</label>
|
||||
</li>
|
||||
}@if (Model.StatisticUnmodifiedRecords > 0)
|
||||
{
|
||||
<li class="actionUnchanged">
|
||||
<input id="Devices_Import_Review_Navigation_Unchanged" type="checkbox" checked /><label for="Devices_Import_Review_Navigation_Unchanged">Show Unchanged Devices (@(Model.StatisticUnmodifiedRecords))</label>
|
||||
</li>
|
||||
}
|
||||
</ul>
|
||||
<script>
|
||||
$(function () {
|
||||
$navigationContainer = $('#Devices_Import_Review_Navigation');
|
||||
$tableBody = $('#Devices_Import_Review_TableContainer').find('tbody');
|
||||
|
||||
$navigationContainer.on('change', 'input', function () {
|
||||
$tableBody.find('tr').show();
|
||||
|
||||
$navigationContainer.find('input').each(function () {
|
||||
var $this = $(this);
|
||||
var action = $this.closest('li').attr('class');
|
||||
var records = $tableBody.find('tr.' + action);
|
||||
if ($this.is(':checked')) {
|
||||
records.show();
|
||||
} else {
|
||||
records.hide();
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
<div id="Devices_Import_Review_TableContainer">
|
||||
<table class="tableData">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Action</th>
|
||||
<th>Row</th>
|
||||
@foreach (var header in Model.Context.Columns.Where(c => c.Type != DeviceImportFieldTypes.IgnoreColumn))
|
||||
{
|
||||
var friendlyValue = field.FriendlyValue;
|
||||
<td class="header@(field.FieldType) action@(field.FieldAction.HasValue ? field.FieldAction.ToString() : "Error")" data-previousvalue="@(field.FieldAction.HasValue && field.FieldAction.Value == System.Data.EntityState.Modified ? field.FriendlyPreviousValue : null)">
|
||||
@if (!field.FieldAction.HasValue)
|
||||
{
|
||||
<span class="errorMessage"><strong>Error:</strong> @field.ErrorMessage</span>
|
||||
<i class="fa fa-exclamation-triangle fa-fw"></i>
|
||||
}
|
||||
@if (string.IsNullOrEmpty(friendlyValue))
|
||||
{<span class="smallMessage"><None></span>}
|
||||
else if (field.FieldType == DeviceImportFieldTypes.DeviceSerialNumber && field.FieldAction.HasValue && field.FieldAction.Value != EntityState.Added)
|
||||
{
|
||||
@Html.ActionLink(friendlyValue, MVC.Device.Show((string)field.RawParsedValue), new { target = "_blank" })}
|
||||
else if (field.FieldType == DeviceImportFieldTypes.AssignedUserId && field.FieldAction.HasValue && field.FieldAction.Value != EntityState.Unchanged)
|
||||
{
|
||||
@Html.ActionLink(friendlyValue, MVC.User.Show((string)field.RawParsedValue), new { target = "_blank" })}
|
||||
else
|
||||
{@friendlyValue}
|
||||
</td>
|
||||
<th>@(Model.HeaderTypes.FirstOrDefault(h => h.Item1 == header.Type).Item2)</th>
|
||||
}
|
||||
</tr>
|
||||
<tr>
|
||||
<th> </th>
|
||||
<th> </th>
|
||||
@foreach (var header in Model.Context.Columns.Where(c => c.Type != DeviceImportFieldTypes.IgnoreColumn))
|
||||
{
|
||||
<th>@header.Name</th>
|
||||
}
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach (var recordEntry in Model.Context.Records.Select((r, i) => Tuple.Create(r, i)))
|
||||
{
|
||||
var record = recordEntry.Item1;
|
||||
<tr class="action@(record.RecordAction)">
|
||||
<td class="action"><i class="fa fa-fw"></i></td>
|
||||
<td>@(recordEntry.Item2 + 1)</td>
|
||||
@foreach (var field in record.Fields)
|
||||
{
|
||||
var friendlyValue = field.FriendlyValue;
|
||||
<td class="header@(field.FieldType) action@(field.FieldAction.HasValue ? field.FieldAction.ToString() : "Error")" data-previousvalue="@(field.FieldAction.HasValue && field.FieldAction.Value == System.Data.EntityState.Modified ? field.FriendlyPreviousValue : null)">
|
||||
@if (!field.FieldAction.HasValue)
|
||||
{
|
||||
<span class="errorMessage"><strong>Error:</strong> @field.ErrorMessage</span>
|
||||
<i class="fa fa-exclamation-triangle fa-fw"></i>
|
||||
}
|
||||
@if (string.IsNullOrEmpty(friendlyValue))
|
||||
{<span class="smallMessage"><None></span>}
|
||||
else if (field.FieldType == DeviceImportFieldTypes.DeviceSerialNumber && field.FieldAction.HasValue && field.FieldAction.Value != EntityState.Added)
|
||||
{
|
||||
@Html.ActionLink(friendlyValue, MVC.Device.Show((string)field.RawParsedValue), new { target = "_blank" })}
|
||||
else if (field.FieldType == DeviceImportFieldTypes.AssignedUserId && field.FieldAction.HasValue && field.FieldAction.Value != EntityState.Unchanged)
|
||||
{
|
||||
@Html.ActionLink(friendlyValue, MVC.User.Show((string)field.RawParsedValue), new { target = "_blank" })}
|
||||
else
|
||||
{@friendlyValue}
|
||||
</td>
|
||||
}
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="actionBar">
|
||||
@if (Model.Context.AllowBacktracking)
|
||||
{
|
||||
<a id="Devices_Import_Review_ChangeHeaders" href="@Url.Action(MVC.Device.ImportHeaders(Model.Context.SessionId))" class="button"><i class="fa fa-caret-left"></i>Change Import Columns</a>
|
||||
}
|
||||
@if (Model.StatisticImportRecords == 0)
|
||||
{
|
||||
<button id="Devices_Import_Review_Apply" class="button disabled" disabled><i class="fa fa-wrench"></i>Apply Device Import</button>
|
||||
}
|
||||
else
|
||||
{
|
||||
using (Html.BeginForm(MVC.API.Device.ImportApply(Model.Context.SessionId)))
|
||||
{
|
||||
@Html.AntiForgeryToken();
|
||||
<button id="Devices_Import_Review_Apply" type="submit" class="button"><i class="fa fa-wrench"></i>Apply Device Import</button>
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="actionBar">
|
||||
@if (Model.Context.AllowBacktracking)
|
||||
{
|
||||
<a id="Devices_Import_Review_ChangeHeaders" href="@Url.Action(MVC.Device.ImportHeaders(Model.Context.SessionId))" class="button"><i class="fa fa-caret-left"></i>Change Import Columns</a>
|
||||
}
|
||||
@if (Model.StatisticImportRecords == 0)
|
||||
{
|
||||
<a id="Devices_Import_Review_Apply" href="#" class="button disabled" disabled><i class="fa fa-wrench"></i>Apply Device Import</a>
|
||||
}
|
||||
else
|
||||
{
|
||||
<a id="Devices_Import_Review_Apply" href="@Url.Action(MVC.API.Device.ImportApply(Model.Context.SessionId))" class="button"><i class="fa fa-wrench"></i>Apply Device Import</a>
|
||||
}
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
$(function () {
|
||||
|
||||
@@ -216,13 +216,13 @@ WriteLiteral(")</label>\r\n </li>\r\n");
|
||||
|
||||
|
||||
#line 30 "..\..\Views\Device\ImportReview.cshtml"
|
||||
}
|
||||
}
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 30 "..\..\Views\Device\ImportReview.cshtml"
|
||||
if (Model.StatisticNewRecords > 0)
|
||||
if (Model.StatisticNewRecords > 0)
|
||||
{
|
||||
|
||||
|
||||
@@ -255,23 +255,23 @@ WriteLiteral(")</label>\r\n </li>\r\n");
|
||||
|
||||
|
||||
#line 35 "..\..\Views\Device\ImportReview.cshtml"
|
||||
}
|
||||
}
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 35 "..\..\Views\Device\ImportReview.cshtml"
|
||||
if (Model.StatisticModifiedRecords > 0)
|
||||
{
|
||||
if (Model.StatisticModifiedRecords > 0)
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <li");
|
||||
WriteLiteral(" <li");
|
||||
|
||||
WriteLiteral(" class=\"actionModified\"");
|
||||
|
||||
WriteLiteral(">\r\n <input");
|
||||
WriteLiteral(">\r\n <input");
|
||||
|
||||
WriteLiteral(" id=\"Devices_Import_Review_Navigation_Modified\"");
|
||||
|
||||
@@ -285,32 +285,32 @@ WriteLiteral(">Show Modified Devices (");
|
||||
|
||||
|
||||
#line 38 "..\..\Views\Device\ImportReview.cshtml"
|
||||
Write(Model.StatisticModifiedRecords);
|
||||
Write(Model.StatisticModifiedRecords);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(")</label>\r\n </li>\r\n");
|
||||
WriteLiteral(")</label>\r\n </li>\r\n");
|
||||
|
||||
|
||||
#line 40 "..\..\Views\Device\ImportReview.cshtml"
|
||||
}
|
||||
}
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 40 "..\..\Views\Device\ImportReview.cshtml"
|
||||
if (Model.StatisticUnmodifiedRecords > 0)
|
||||
{
|
||||
if (Model.StatisticUnmodifiedRecords > 0)
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <li");
|
||||
WriteLiteral(" <li");
|
||||
|
||||
WriteLiteral(" class=\"actionUnchanged\"");
|
||||
|
||||
WriteLiteral(">\r\n <input");
|
||||
WriteLiteral(">\r\n <input");
|
||||
|
||||
WriteLiteral(" id=\"Devices_Import_Review_Navigation_Unchanged\"");
|
||||
|
||||
@@ -324,73 +324,73 @@ WriteLiteral(">Show Unchanged Devices (");
|
||||
|
||||
|
||||
#line 43 "..\..\Views\Device\ImportReview.cshtml"
|
||||
Write(Model.StatisticUnmodifiedRecords);
|
||||
Write(Model.StatisticUnmodifiedRecords);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(")</label>\r\n </li>\r\n");
|
||||
WriteLiteral(")</label>\r\n </li>\r\n");
|
||||
|
||||
|
||||
#line 45 "..\..\Views\Device\ImportReview.cshtml"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(@"</ul>
|
||||
<script>
|
||||
$(function () {
|
||||
$navigationContainer = $('#Devices_Import_Review_Navigation');
|
||||
$tableBody = $('#Devices_Import_Review_TableContainer').find('tbody');
|
||||
WriteLiteral(@" </ul>
|
||||
<script>
|
||||
$(function () {
|
||||
$navigationContainer = $('#Devices_Import_Review_Navigation');
|
||||
$tableBody = $('#Devices_Import_Review_TableContainer').find('tbody');
|
||||
|
||||
$navigationContainer.on('change', 'input', function () {
|
||||
$tableBody.find('tr').show();
|
||||
$navigationContainer.on('change', 'input', function () {
|
||||
$tableBody.find('tr').show();
|
||||
|
||||
$navigationContainer.find('input').each(function () {
|
||||
var $this = $(this);
|
||||
var action = $this.closest('li').attr('class');
|
||||
var records = $tableBody.find('tr.' + action);
|
||||
if ($this.is(':checked')) {
|
||||
records.show();
|
||||
} else {
|
||||
records.hide();
|
||||
}
|
||||
$navigationContainer.find('input').each(function () {
|
||||
var $this = $(this);
|
||||
var action = $this.closest('li').attr('class');
|
||||
var records = $tableBody.find('tr.' + action);
|
||||
if ($this.is(':checked')) {
|
||||
records.show();
|
||||
} else {
|
||||
records.hide();
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
<div");
|
||||
</script>
|
||||
</div>
|
||||
<div");
|
||||
|
||||
WriteLiteral(" id=\"Devices_Import_Review_TableContainer\"");
|
||||
|
||||
WriteLiteral(">\r\n <table");
|
||||
WriteLiteral(">\r\n <table");
|
||||
|
||||
WriteLiteral(" class=\"tableData\"");
|
||||
|
||||
WriteLiteral(">\r\n <thead>\r\n <tr>\r\n <th>Action</th>\r\n " +
|
||||
" <th>Row</th>\r\n");
|
||||
WriteLiteral(">\r\n <thead>\r\n <tr>\r\n <th>Action</th>" +
|
||||
"\r\n <th>Row</th>\r\n");
|
||||
|
||||
|
||||
#line 75 "..\..\Views\Device\ImportReview.cshtml"
|
||||
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 75 "..\..\Views\Device\ImportReview.cshtml"
|
||||
foreach (var header in Model.Context.Columns.Where(c => c.Type != DeviceImportFieldTypes.IgnoreColumn))
|
||||
{
|
||||
foreach (var header in Model.Context.Columns.Where(c => c.Type != DeviceImportFieldTypes.IgnoreColumn))
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <th>");
|
||||
WriteLiteral(" <th>");
|
||||
|
||||
|
||||
#line 77 "..\..\Views\Device\ImportReview.cshtml"
|
||||
Write(Model.HeaderTypes.FirstOrDefault(h => h.Item1 == header.Type).Item2);
|
||||
Write(Model.HeaderTypes.FirstOrDefault(h => h.Item1 == header.Type).Item2);
|
||||
|
||||
|
||||
#line default
|
||||
@@ -399,33 +399,33 @@ WriteLiteral("</th>\r\n");
|
||||
|
||||
|
||||
#line 78 "..\..\Views\Device\ImportReview.cshtml"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" </tr>\r\n <tr>\r\n <th> </th>\r\n " +
|
||||
" <th> </th>\r\n");
|
||||
WriteLiteral(" </tr>\r\n <tr>\r\n <th> </th>\r" +
|
||||
"\n <th> </th>\r\n");
|
||||
|
||||
|
||||
#line 83 "..\..\Views\Device\ImportReview.cshtml"
|
||||
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 83 "..\..\Views\Device\ImportReview.cshtml"
|
||||
foreach (var header in Model.Context.Columns.Where(c => c.Type != DeviceImportFieldTypes.IgnoreColumn))
|
||||
{
|
||||
foreach (var header in Model.Context.Columns.Where(c => c.Type != DeviceImportFieldTypes.IgnoreColumn))
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <th>");
|
||||
WriteLiteral(" <th>");
|
||||
|
||||
|
||||
#line 85 "..\..\Views\Device\ImportReview.cshtml"
|
||||
Write(header.Name);
|
||||
Write(header.Name);
|
||||
|
||||
|
||||
#line default
|
||||
@@ -434,42 +434,42 @@ WriteLiteral("</th>\r\n");
|
||||
|
||||
|
||||
#line 86 "..\..\Views\Device\ImportReview.cshtml"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" </tr>\r\n </thead>\r\n <tbody>\r\n");
|
||||
WriteLiteral(" </tr>\r\n </thead>\r\n <tbody>\r\n");
|
||||
|
||||
|
||||
#line 90 "..\..\Views\Device\ImportReview.cshtml"
|
||||
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 90 "..\..\Views\Device\ImportReview.cshtml"
|
||||
foreach (var recordEntry in Model.Context.Records.Select((r, i) => Tuple.Create(r, i)))
|
||||
{
|
||||
var record = recordEntry.Item1;
|
||||
foreach (var recordEntry in Model.Context.Records.Select((r, i) => Tuple.Create(r, i)))
|
||||
{
|
||||
var record = recordEntry.Item1;
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <tr");
|
||||
WriteLiteral(" <tr");
|
||||
|
||||
WriteAttribute("class", Tuple.Create(" class=\"", 4017), Tuple.Create("\"", 4053)
|
||||
, Tuple.Create(Tuple.Create("", 4025), Tuple.Create("action", 4025), true)
|
||||
WriteAttribute("class", Tuple.Create(" class=\"", 4425), Tuple.Create("\"", 4461)
|
||||
, Tuple.Create(Tuple.Create("", 4433), Tuple.Create("action", 4433), true)
|
||||
|
||||
#line 93 "..\..\Views\Device\ImportReview.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 4031), Tuple.Create<System.Object, System.Int32>(record.RecordAction
|
||||
, Tuple.Create(Tuple.Create("", 4439), Tuple.Create<System.Object, System.Int32>(record.RecordAction
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 4031), false)
|
||||
, 4439), false)
|
||||
);
|
||||
|
||||
WriteLiteral(">\r\n <td");
|
||||
WriteLiteral(">\r\n <td");
|
||||
|
||||
WriteLiteral(" class=\"action\"");
|
||||
|
||||
@@ -477,11 +477,11 @@ WriteLiteral("><i");
|
||||
|
||||
WriteLiteral(" class=\"fa fa-fw\"");
|
||||
|
||||
WriteLiteral("></i></td>\r\n <td>");
|
||||
WriteLiteral("></i></td>\r\n <td>");
|
||||
|
||||
|
||||
#line 95 "..\..\Views\Device\ImportReview.cshtml"
|
||||
Write(recordEntry.Item2 + 1);
|
||||
Write(recordEntry.Item2 + 1);
|
||||
|
||||
|
||||
#line default
|
||||
@@ -490,45 +490,45 @@ WriteLiteral("</td>\r\n");
|
||||
|
||||
|
||||
#line 96 "..\..\Views\Device\ImportReview.cshtml"
|
||||
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 96 "..\..\Views\Device\ImportReview.cshtml"
|
||||
foreach (var field in record.Fields)
|
||||
{
|
||||
var friendlyValue = field.FriendlyValue;
|
||||
foreach (var field in record.Fields)
|
||||
{
|
||||
var friendlyValue = field.FriendlyValue;
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <td");
|
||||
WriteLiteral(" <td");
|
||||
|
||||
WriteAttribute("class", Tuple.Create(" class=\"", 4357), Tuple.Create("\"", 4466)
|
||||
, Tuple.Create(Tuple.Create("", 4365), Tuple.Create("header", 4365), true)
|
||||
WriteAttribute("class", Tuple.Create(" class=\"", 4789), Tuple.Create("\"", 4898)
|
||||
, Tuple.Create(Tuple.Create("", 4797), Tuple.Create("header", 4797), true)
|
||||
|
||||
#line 99 "..\..\Views\Device\ImportReview.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 4371), Tuple.Create<System.Object, System.Int32>(field.FieldType
|
||||
, Tuple.Create(Tuple.Create("", 4803), Tuple.Create<System.Object, System.Int32>(field.FieldType
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 4371), false)
|
||||
, Tuple.Create(Tuple.Create(" ", 4389), Tuple.Create("action", 4390), true)
|
||||
, 4803), false)
|
||||
, Tuple.Create(Tuple.Create(" ", 4821), Tuple.Create("action", 4822), true)
|
||||
|
||||
#line 99 "..\..\Views\Device\ImportReview.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 4396), Tuple.Create<System.Object, System.Int32>(field.FieldAction.HasValue ? field.FieldAction.ToString() : "Error"
|
||||
, Tuple.Create(Tuple.Create("", 4828), Tuple.Create<System.Object, System.Int32>(field.FieldAction.HasValue ? field.FieldAction.ToString() : "Error"
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 4396), false)
|
||||
, 4828), false)
|
||||
);
|
||||
|
||||
WriteLiteral(" data-previousvalue=\"");
|
||||
|
||||
|
||||
#line 99 "..\..\Views\Device\ImportReview.cshtml"
|
||||
Write(field.FieldAction.HasValue && field.FieldAction.Value == System.Data.EntityState.Modified ? field.FriendlyPreviousValue : null);
|
||||
Write(field.FieldAction.HasValue && field.FieldAction.Value == System.Data.EntityState.Modified ? field.FriendlyPreviousValue : null);
|
||||
|
||||
|
||||
#line default
|
||||
@@ -539,19 +539,19 @@ WriteLiteral(">\r\n");
|
||||
|
||||
|
||||
#line 100 "..\..\Views\Device\ImportReview.cshtml"
|
||||
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 100 "..\..\Views\Device\ImportReview.cshtml"
|
||||
if (!field.FieldAction.HasValue)
|
||||
{
|
||||
if (!field.FieldAction.HasValue)
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <span");
|
||||
WriteLiteral(" <span");
|
||||
|
||||
WriteLiteral(" class=\"errorMessage\"");
|
||||
|
||||
@@ -559,14 +559,14 @@ WriteLiteral("><strong>Error:</strong> ");
|
||||
|
||||
|
||||
#line 102 "..\..\Views\Device\ImportReview.cshtml"
|
||||
Write(field.ErrorMessage);
|
||||
Write(field.ErrorMessage);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("</span>\r\n");
|
||||
|
||||
WriteLiteral(" <i");
|
||||
WriteLiteral(" <i");
|
||||
|
||||
WriteLiteral(" class=\"fa fa-exclamation-triangle fa-fw\"");
|
||||
|
||||
@@ -574,17 +574,17 @@ WriteLiteral("></i>\r\n");
|
||||
|
||||
|
||||
#line 104 "..\..\Views\Device\ImportReview.cshtml"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" ");
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 105 "..\..\Views\Device\ImportReview.cshtml"
|
||||
if (string.IsNullOrEmpty(friendlyValue))
|
||||
{
|
||||
if (string.IsNullOrEmpty(friendlyValue))
|
||||
{
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
@@ -596,77 +596,77 @@ WriteLiteral("><None></span>");
|
||||
|
||||
|
||||
#line 106 "..\..\Views\Device\ImportReview.cshtml"
|
||||
}
|
||||
else if (field.FieldType == DeviceImportFieldTypes.DeviceSerialNumber && field.FieldAction.HasValue && field.FieldAction.Value != EntityState.Added)
|
||||
{
|
||||
|
||||
}
|
||||
else if (field.FieldType == DeviceImportFieldTypes.DeviceSerialNumber && field.FieldAction.HasValue && field.FieldAction.Value != EntityState.Added)
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 109 "..\..\Views\Device\ImportReview.cshtml"
|
||||
Write(Html.ActionLink(friendlyValue, MVC.Device.Show((string)field.RawParsedValue), new { target = "_blank" }));
|
||||
Write(Html.ActionLink(friendlyValue, MVC.Device.Show((string)field.RawParsedValue), new { target = "_blank" }));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 109 "..\..\Views\Device\ImportReview.cshtml"
|
||||
}
|
||||
else if (field.FieldType == DeviceImportFieldTypes.AssignedUserId && field.FieldAction.HasValue && field.FieldAction.Value != EntityState.Unchanged)
|
||||
{
|
||||
|
||||
}
|
||||
else if (field.FieldType == DeviceImportFieldTypes.AssignedUserId && field.FieldAction.HasValue && field.FieldAction.Value != EntityState.Unchanged)
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 112 "..\..\Views\Device\ImportReview.cshtml"
|
||||
Write(Html.ActionLink(friendlyValue, MVC.User.Show((string)field.RawParsedValue), new { target = "_blank" }));
|
||||
Write(Html.ActionLink(friendlyValue, MVC.User.Show((string)field.RawParsedValue), new { target = "_blank" }));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 112 "..\..\Views\Device\ImportReview.cshtml"
|
||||
}
|
||||
else
|
||||
{
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 114 "..\..\Views\Device\ImportReview.cshtml"
|
||||
Write(friendlyValue);
|
||||
Write(friendlyValue);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 114 "..\..\Views\Device\ImportReview.cshtml"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" </td>\r\n");
|
||||
WriteLiteral(" </td>\r\n");
|
||||
|
||||
|
||||
#line 116 "..\..\Views\Device\ImportReview.cshtml"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" </tr>\r\n");
|
||||
WriteLiteral(" </tr>\r\n");
|
||||
|
||||
|
||||
#line 118 "..\..\Views\Device\ImportReview.cshtml"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" </tbody>\r\n </table>\r\n</div>\r\n<div");
|
||||
WriteLiteral(" </tbody>\r\n </table>\r\n </div>\r\n <div");
|
||||
|
||||
WriteLiteral(" class=\"actionBar\"");
|
||||
|
||||
@@ -674,30 +674,30 @@ WriteLiteral(">\r\n");
|
||||
|
||||
|
||||
#line 123 "..\..\Views\Device\ImportReview.cshtml"
|
||||
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 123 "..\..\Views\Device\ImportReview.cshtml"
|
||||
if (Model.Context.AllowBacktracking)
|
||||
{
|
||||
if (Model.Context.AllowBacktracking)
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <a");
|
||||
WriteLiteral(" <a");
|
||||
|
||||
WriteLiteral(" id=\"Devices_Import_Review_ChangeHeaders\"");
|
||||
|
||||
WriteAttribute("href", Tuple.Create(" href=\"", 6122), Tuple.Create("\"", 6191)
|
||||
WriteAttribute("href", Tuple.Create(" href=\"", 6658), Tuple.Create("\"", 6727)
|
||||
|
||||
#line 125 "..\..\Views\Device\ImportReview.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 6129), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.Device.ImportHeaders(Model.Context.SessionId))
|
||||
, Tuple.Create(Tuple.Create("", 6665), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.Device.ImportHeaders(Model.Context.SessionId))
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 6129), false)
|
||||
, 6665), false)
|
||||
);
|
||||
|
||||
WriteLiteral(" class=\"button\"");
|
||||
@@ -710,57 +710,63 @@ WriteLiteral("></i>Change Import Columns</a>\r\n");
|
||||
|
||||
|
||||
#line 126 "..\..\Views\Device\ImportReview.cshtml"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" ");
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 127 "..\..\Views\Device\ImportReview.cshtml"
|
||||
if (Model.StatisticImportRecords == 0)
|
||||
{
|
||||
if (Model.StatisticImportRecords == 0)
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <a");
|
||||
WriteLiteral(" <button");
|
||||
|
||||
WriteLiteral(" id=\"Devices_Import_Review_Apply\"");
|
||||
|
||||
WriteLiteral(" href=\"#\"");
|
||||
|
||||
WriteLiteral(" class=\"button disabled\"");
|
||||
|
||||
WriteLiteral(" disabled><i");
|
||||
|
||||
WriteLiteral(" class=\"fa fa-wrench\"");
|
||||
|
||||
WriteLiteral("></i>Apply Device Import</a>\r\n");
|
||||
WriteLiteral("></i>Apply Device Import</button>\r\n");
|
||||
|
||||
|
||||
#line 130 "..\..\Views\Device\ImportReview.cshtml"
|
||||
}
|
||||
else
|
||||
{
|
||||
}
|
||||
else
|
||||
{
|
||||
using (Html.BeginForm(MVC.API.Device.ImportApply(Model.Context.SessionId)))
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 135 "..\..\Views\Device\ImportReview.cshtml"
|
||||
Write(Html.AntiForgeryToken());
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <a");
|
||||
|
||||
#line 135 "..\..\Views\Device\ImportReview.cshtml"
|
||||
;
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <button");
|
||||
|
||||
WriteLiteral(" id=\"Devices_Import_Review_Apply\"");
|
||||
|
||||
WriteAttribute("href", Tuple.Create(" href=\"", 6532), Tuple.Create("\"", 6603)
|
||||
|
||||
#line 133 "..\..\Views\Device\ImportReview.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 6539), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.API.Device.ImportApply(Model.Context.SessionId))
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 6539), false)
|
||||
);
|
||||
WriteLiteral(" type=\"submit\"");
|
||||
|
||||
WriteLiteral(" class=\"button\"");
|
||||
|
||||
@@ -768,42 +774,43 @@ WriteLiteral("><i");
|
||||
|
||||
WriteLiteral(" class=\"fa fa-wrench\"");
|
||||
|
||||
WriteLiteral("></i>Apply Device Import</a>\r\n");
|
||||
WriteLiteral("></i>Apply Device Import</button>\r\n");
|
||||
|
||||
|
||||
#line 134 "..\..\Views\Device\ImportReview.cshtml"
|
||||
}
|
||||
#line 137 "..\..\Views\Device\ImportReview.cshtml"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("</div>\r\n</div>\r\n<script>\r\n $(function () {\r\n $Devices_Import_Review_Tab" +
|
||||
"leContainer = $(\'#Devices_Import_Review_TableContainer\');\r\n\r\n $Devices_Im" +
|
||||
"port_Review_TableContainer.find(\'tbody\').tooltip({\r\n items: \'td.actio" +
|
||||
"n, td.actionError, td.actionModified\',\r\n content: function () {\r\n " +
|
||||
" var $this = $(this);\r\n\r\n if ($this.hasClass(\'action\')" +
|
||||
") {\r\n var record = $(this).closest(\'tr\');\r\n\r\n " +
|
||||
" if (record.hasClass(\'actionDetached\')) {\r\n return \'<s" +
|
||||
"trong>Error Parsing Record</strong><div>Review the record fields for details abo" +
|
||||
"ut any errors.</div><div class=\"smallMessage\">This record will be skipped.</div>" +
|
||||
"\';\r\n } else if (record.hasClass(\'actionUnchanged\')) {\r\n " +
|
||||
" return \'<strong>No Changes</strong><div>No changes were found " +
|
||||
"while parsing this record.</div><div class=\"smallMessage\">This record will be sk" +
|
||||
"ipped.</div>\';\r\n } else if (record.hasClass(\'actionModified\')" +
|
||||
") {\r\n return \'<strong>Pending Changes</strong><div>This r" +
|
||||
"ecord contains changes which will be applied.</div>\';\r\n } els" +
|
||||
"e if (record.hasClass(\'actionAdded\')) {\r\n return \'<strong" +
|
||||
">New Record</strong><div>This record will be imported.</div>\';\r\n " +
|
||||
" }\r\n } else if ($this.hasClass(\'actionError\')) {\r\n " +
|
||||
" return $(this).find(\'span.errorMessage\').html();\r\n } else" +
|
||||
" if ($this.hasClass(\'actionModified\')) {\r\n var v = $(this).at" +
|
||||
"tr(\'data-previousvalue\');\r\n if (v) {\r\n " +
|
||||
" return \'<strong>Previous Value:</strong><br />\' + v;\r\n } els" +
|
||||
"e {\r\n return \'<strong>Previous Value:</strong><br /><em>&" +
|
||||
"lt;None></em>\';\r\n }\r\n }\r\n },\r\n " +
|
||||
" position: {\r\n my: \"left top\",\r\n at: \"lef" +
|
||||
"t bottom\",\r\n collision: \"flipfit flip\"\r\n }\r\n })" +
|
||||
";\r\n\r\n });\r\n</script>\r\n");
|
||||
WriteLiteral(" </div>\r\n</div>\r\n<script>\r\n $(function () {\r\n $Devices_Import_Review" +
|
||||
"_TableContainer = $(\'#Devices_Import_Review_TableContainer\');\r\n\r\n $Device" +
|
||||
"s_Import_Review_TableContainer.find(\'tbody\').tooltip({\r\n items: \'td.a" +
|
||||
"ction, td.actionError, td.actionModified\',\r\n content: function () {\r\n" +
|
||||
" var $this = $(this);\r\n\r\n if ($this.hasClass(\'acti" +
|
||||
"on\')) {\r\n var record = $(this).closest(\'tr\');\r\n\r\n " +
|
||||
" if (record.hasClass(\'actionDetached\')) {\r\n return" +
|
||||
" \'<strong>Error Parsing Record</strong><div>Review the record fields for details" +
|
||||
" about any errors.</div><div class=\"smallMessage\">This record will be skipped.</" +
|
||||
"div>\';\r\n } else if (record.hasClass(\'actionUnchanged\')) {\r\n " +
|
||||
" return \'<strong>No Changes</strong><div>No changes were fo" +
|
||||
"und while parsing this record.</div><div class=\"smallMessage\">This record will b" +
|
||||
"e skipped.</div>\';\r\n } else if (record.hasClass(\'actionModifi" +
|
||||
"ed\')) {\r\n return \'<strong>Pending Changes</strong><div>Th" +
|
||||
"is record contains changes which will be applied.</div>\';\r\n }" +
|
||||
" else if (record.hasClass(\'actionAdded\')) {\r\n return \'<st" +
|
||||
"rong>New Record</strong><div>This record will be imported.</div>\';\r\n " +
|
||||
" }\r\n } else if ($this.hasClass(\'actionError\')) {\r\n " +
|
||||
" return $(this).find(\'span.errorMessage\').html();\r\n } " +
|
||||
"else if ($this.hasClass(\'actionModified\')) {\r\n var v = $(this" +
|
||||
").attr(\'data-previousvalue\');\r\n if (v) {\r\n " +
|
||||
" return \'<strong>Previous Value:</strong><br />\' + v;\r\n }" +
|
||||
" else {\r\n return \'<strong>Previous Value:</strong><br /><" +
|
||||
"em><None></em>\';\r\n }\r\n }\r\n }," +
|
||||
"\r\n position: {\r\n my: \"left top\",\r\n at: " +
|
||||
"\"left bottom\",\r\n collision: \"flipfit flip\"\r\n }\r\n " +
|
||||
" });\r\n\r\n });\r\n</script>\r\n");
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
ViewBag.Title = Html.ToBreadcrumb("Jobs", MVC.Job.Index(), "Create");
|
||||
}
|
||||
<div id="createJob_Container">
|
||||
@using (Html.BeginForm(MVC.Job.Create(), FormMethod.Post))
|
||||
@using (Html.BeginForm(MVC.Job.Create()))
|
||||
{
|
||||
@Html.AntiForgeryToken()
|
||||
@Html.HiddenFor(m => m.DeviceSerialNumber)
|
||||
|
||||
@@ -68,7 +68,7 @@ WriteLiteral(">\r\n");
|
||||
#line hidden
|
||||
|
||||
#line 9 "..\..\Views\Job\Create.cshtml"
|
||||
using (Html.BeginForm(MVC.Job.Create(), FormMethod.Post))
|
||||
using (Html.BeginForm(MVC.Job.Create()))
|
||||
{
|
||||
|
||||
|
||||
@@ -225,15 +225,15 @@ WriteLiteral(">\r\n");
|
||||
#line hidden
|
||||
WriteLiteral(" <div");
|
||||
|
||||
WriteAttribute("id", Tuple.Create(" id=\"", 1133), Tuple.Create("\"", 1164)
|
||||
, Tuple.Create(Tuple.Create("", 1138), Tuple.Create("createJob_SubType_", 1138), true)
|
||||
WriteAttribute("id", Tuple.Create(" id=\"", 1116), Tuple.Create("\"", 1147)
|
||||
, Tuple.Create(Tuple.Create("", 1121), Tuple.Create("createJob_SubType_", 1121), true)
|
||||
|
||||
#line 29 "..\..\Views\Job\Create.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 1156), Tuple.Create<System.Object, System.Int32>(jt.Id
|
||||
, Tuple.Create(Tuple.Create("", 1139), Tuple.Create<System.Object, System.Int32>(jt.Id
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 1156), false)
|
||||
, 1139), false)
|
||||
);
|
||||
|
||||
WriteLiteral(" class=\"createJob_SubType\"");
|
||||
|
||||
@@ -10,15 +10,18 @@
|
||||
Html.BundleDeferred("~/ClientScripts/Modules/jQuery-NumberFormatter");
|
||||
}
|
||||
}
|
||||
<table id="jobComponents">
|
||||
<table id="jobComponents" data-addurl="@Url.Action(MVC.API.Job.ComponentAdd(Model.Job.Id, null, null))" data-removeurl="@Url.Action(MVC.API.Job.ComponentRemove())" data-updateurl="@Url.Action(MVC.API.Job.ComponentUpdate())">
|
||||
<tr>
|
||||
<th>Description
|
||||
<th>
|
||||
Description
|
||||
</th>
|
||||
<th>Cost
|
||||
<th>
|
||||
Cost
|
||||
</th>
|
||||
@if (hasEdit)
|
||||
{
|
||||
<th class="actions">
|
||||
<th class="actions">
|
||||
|
||||
</th>
|
||||
}
|
||||
</tr>
|
||||
@@ -26,31 +29,31 @@
|
||||
{
|
||||
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 fa fa-times-circle"></span>
|
||||
</td>
|
||||
</tr>
|
||||
<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 fa fa-times-circle"></span>
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
foreach (var jc in Model.Job.JobComponents)
|
||||
{
|
||||
<tr data-jobcomponentid="@jc.Id">
|
||||
<td>
|
||||
<span class="description">@jc.Description</span>
|
||||
</td>
|
||||
<td>
|
||||
<span class="cost">@jc.Cost.ToString("C")</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr data-jobcomponentid="@jc.Id">
|
||||
<td>
|
||||
<span class="description">@jc.Description</span>
|
||||
</td>
|
||||
<td>
|
||||
<span class="cost">@jc.Cost.ToString("C")</span>
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
}
|
||||
|
||||
@@ -62,12 +65,13 @@
|
||||
}
|
||||
|
||||
</td>
|
||||
<td colspan="@(hasEdit ? 2 : 1)" class="totalCost">Total: <span id="jobComponentsTotalCost">
|
||||
@if (!hasEdit)
|
||||
{
|
||||
@Model.Job.JobComponentsTotalCost().ToString("C")
|
||||
}
|
||||
</span>
|
||||
<td colspan="@(hasEdit ? 2 : 1)" class="totalCost">
|
||||
Total: <span id="jobComponentsTotalCost">
|
||||
@if (!hasEdit)
|
||||
{
|
||||
@Model.Job.JobComponentsTotalCost().ToString("C")
|
||||
}
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@@ -80,7 +84,7 @@
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
var $jobComponents = $('#jobComponents');
|
||||
const $jobComponents = $('#jobComponents');
|
||||
|
||||
$jobComponents.on('change', 'input', updateComponent);
|
||||
$jobComponents.on('focus', 'input', function () { $(this).select() });
|
||||
@@ -89,7 +93,7 @@
|
||||
$jobComponents.on('click', 'span.remove', 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 fa fa-times-circle"></span></td></tr>');
|
||||
const jc = $('<tr><td><input type="text" class="description" /></td><td><input type="text" class="cost" /></td><td><span class="remove fa fa-times-circle"></span></td></tr>');
|
||||
jc.find('input').focus(function () { $(this).select() })
|
||||
jc.insertBefore($jobComponents.find('tr').last());
|
||||
jc.find('input.description').focus();
|
||||
@@ -104,35 +108,36 @@
|
||||
});
|
||||
|
||||
function removeComponent() {
|
||||
var componentRow = $(this).closest('tr');
|
||||
var id = componentRow.attr('data-jobcomponentid');
|
||||
const componentRow = $(this).closest('tr');
|
||||
const 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");
|
||||
|
||||
async function removeComponentAsync(id) {
|
||||
|
||||
const body = new FormData();
|
||||
body.append('__RequestVerificationToken', document.body.dataset.antiforgery);
|
||||
body.append('id', id);
|
||||
|
||||
const response = await fetch($jobComponents.attr('data-removeurl'), {
|
||||
method: 'POST',
|
||||
body: body
|
||||
});
|
||||
|
||||
if (response.ok) {
|
||||
componentRow.remove();
|
||||
updateTotalCost();
|
||||
} else {
|
||||
alert('Unable to remove component: ' + response.statusText);
|
||||
}
|
||||
});
|
||||
$dialogRemoveComponent.dialog("close");
|
||||
}
|
||||
removeComponentAsync(id);
|
||||
},
|
||||
Cancel: function () {
|
||||
$dialogRemoveComponent.dialog("close");
|
||||
@@ -167,55 +172,58 @@
|
||||
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);
|
||||
async function updateComponentAsync(id, description, cost) {
|
||||
const body = new FormData();
|
||||
body.append('__RequestVerificationToken', document.body.dataset.antiforgery);
|
||||
body.append('id', id);
|
||||
body.append('description', description);
|
||||
body.append('cost', cost);
|
||||
|
||||
const response = await fetch($jobComponents.attr('data-updateurl'), {
|
||||
method: 'POST',
|
||||
body: body
|
||||
});
|
||||
|
||||
componentRow.find('input').attr('disabled', false).removeClass('updating');
|
||||
|
||||
if (response.ok) {
|
||||
const component = await response.json();
|
||||
componentRow.find('input.description').val(component.Description);
|
||||
componentRow.find('input.cost').val(component.Cost);
|
||||
} else {
|
||||
alert('Unable to update component: ' + response.statusText);
|
||||
}
|
||||
});
|
||||
updateTotalCost();
|
||||
}
|
||||
|
||||
updateComponentAsync(id, componentRow.find('input.description').val(), componentRow.find('input.cost').val());
|
||||
} 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);
|
||||
async function addComponentAsync(description, cost) {
|
||||
const body = new FormData();
|
||||
body.append('__RequestVerificationToken', document.body.dataset.antiforgery);
|
||||
body.append('description', description);
|
||||
body.append('cost', cost);
|
||||
|
||||
const response = await fetch($jobComponents.attr('data-addurl'), {
|
||||
method: 'POST',
|
||||
body: body
|
||||
});
|
||||
|
||||
componentRow.find('input').attr('disabled', false).removeClass('updating');
|
||||
|
||||
if (response.ok) {
|
||||
const component = await response.json();
|
||||
componentRow.attr('data-jobcomponentid', component.Id);
|
||||
componentRow.find('input.description').val(component.Description);
|
||||
componentRow.find('input.cost').val(component.Cost);
|
||||
} else {
|
||||
alert('Unable to add component: ' + response.statusText);
|
||||
}
|
||||
});
|
||||
updateTotalCost();
|
||||
}
|
||||
addComponentAsync(componentRow.find('input.description').val(), componentRow.find('input.cost').val())
|
||||
}
|
||||
updateTotalCost();
|
||||
}
|
||||
updateTotalCost();
|
||||
|
||||
|
||||
@@ -63,17 +63,50 @@ WriteLiteral("\r\n<table");
|
||||
|
||||
WriteLiteral(" id=\"jobComponents\"");
|
||||
|
||||
WriteLiteral(">\r\n <tr>\r\n <th>Description\r\n </th>\r\n <th>Cost\r\n </" +
|
||||
"th>\r\n");
|
||||
WriteLiteral(" data-addurl=\"");
|
||||
|
||||
|
||||
#line 19 "..\..\Views\Job\JobParts\Components.cshtml"
|
||||
#line 13 "..\..\Views\Job\JobParts\Components.cshtml"
|
||||
Write(Url.Action(MVC.API.Job.ComponentAdd(Model.Job.Id, null, null)));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\"");
|
||||
|
||||
WriteLiteral(" data-removeurl=\"");
|
||||
|
||||
|
||||
#line 13 "..\..\Views\Job\JobParts\Components.cshtml"
|
||||
Write(Url.Action(MVC.API.Job.ComponentRemove()));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\"");
|
||||
|
||||
WriteLiteral(" data-updateurl=\"");
|
||||
|
||||
|
||||
#line 13 "..\..\Views\Job\JobParts\Components.cshtml"
|
||||
Write(Url.Action(MVC.API.Job.ComponentUpdate()));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\"");
|
||||
|
||||
WriteLiteral(">\r\n <tr>\r\n <th>\r\n Description\r\n </th>\r\n <th>\r\n" +
|
||||
" Cost\r\n </th>\r\n");
|
||||
|
||||
|
||||
#line 21 "..\..\Views\Job\JobParts\Components.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 19 "..\..\Views\Job\JobParts\Components.cshtml"
|
||||
#line 21 "..\..\Views\Job\JobParts\Components.cshtml"
|
||||
if (hasEdit)
|
||||
{
|
||||
|
||||
@@ -84,10 +117,10 @@ WriteLiteral(" <th");
|
||||
|
||||
WriteLiteral(" class=\"actions\"");
|
||||
|
||||
WriteLiteral("> \r\n </th>\r\n");
|
||||
WriteLiteral(">\r\n \r\n </th>\r\n");
|
||||
|
||||
|
||||
#line 23 "..\..\Views\Job\JobParts\Components.cshtml"
|
||||
#line 26 "..\..\Views\Job\JobParts\Components.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -96,13 +129,13 @@ WriteLiteral("> \r\n </th>\r\n");
|
||||
WriteLiteral(" </tr>\r\n");
|
||||
|
||||
|
||||
#line 25 "..\..\Views\Job\JobParts\Components.cshtml"
|
||||
#line 28 "..\..\Views\Job\JobParts\Components.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 25 "..\..\Views\Job\JobParts\Components.cshtml"
|
||||
#line 28 "..\..\Views\Job\JobParts\Components.cshtml"
|
||||
if (hasEdit)
|
||||
{
|
||||
foreach (var jc in Model.Job.JobComponents)
|
||||
@@ -111,59 +144,59 @@ WriteLiteral(" </tr>\r\n");
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <tr");
|
||||
WriteLiteral(" <tr");
|
||||
|
||||
WriteLiteral(" data-jobcomponentid=\"");
|
||||
|
||||
|
||||
#line 29 "..\..\Views\Job\JobParts\Components.cshtml"
|
||||
Write(jc.Id);
|
||||
#line 32 "..\..\Views\Job\JobParts\Components.cshtml"
|
||||
Write(jc.Id);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\"");
|
||||
|
||||
WriteLiteral(">\r\n <td>\r\n <input");
|
||||
WriteLiteral(">\r\n <td>\r\n <input");
|
||||
|
||||
WriteLiteral(" type=\"text\"");
|
||||
|
||||
WriteLiteral(" class=\"description\"");
|
||||
|
||||
WriteAttribute("value", Tuple.Create(" value=\"", 853), Tuple.Create("\"", 876)
|
||||
WriteAttribute("value", Tuple.Create(" value=\"", 1109), Tuple.Create("\"", 1132)
|
||||
|
||||
#line 31 "..\..\Views\Job\JobParts\Components.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 861), Tuple.Create<System.Object, System.Int32>(jc.Description
|
||||
#line 34 "..\..\Views\Job\JobParts\Components.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 1117), Tuple.Create<System.Object, System.Int32>(jc.Description
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 861), false)
|
||||
, 1117), false)
|
||||
);
|
||||
|
||||
WriteLiteral(" />\r\n </td>\r\n <td>\r\n <input");
|
||||
WriteLiteral(" />\r\n </td>\r\n <td>\r\n <input");
|
||||
|
||||
WriteLiteral(" type=\"text\"");
|
||||
|
||||
WriteLiteral(" class=\"cost\"");
|
||||
|
||||
WriteAttribute("value", Tuple.Create(" value=\"", 966), Tuple.Create("\"", 996)
|
||||
WriteAttribute("value", Tuple.Create(" value=\"", 1234), Tuple.Create("\"", 1264)
|
||||
|
||||
#line 34 "..\..\Views\Job\JobParts\Components.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 974), Tuple.Create<System.Object, System.Int32>(jc.Cost.ToString("C")
|
||||
#line 37 "..\..\Views\Job\JobParts\Components.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 1242), Tuple.Create<System.Object, System.Int32>(jc.Cost.ToString("C")
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 974), false)
|
||||
, 1242), false)
|
||||
);
|
||||
|
||||
WriteLiteral(" />\r\n </td>\r\n <td>\r\n <span");
|
||||
WriteLiteral(" />\r\n </td>\r\n <td>\r\n <span");
|
||||
|
||||
WriteLiteral(" class=\"remove fa fa-times-circle\"");
|
||||
|
||||
WriteLiteral("></span>\r\n </td>\r\n </tr>\r\n");
|
||||
WriteLiteral("></span>\r\n </td>\r\n </tr>\r\n");
|
||||
|
||||
|
||||
#line 40 "..\..\Views\Job\JobParts\Components.cshtml"
|
||||
#line 43 "..\..\Views\Job\JobParts\Components.cshtml"
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -174,49 +207,49 @@ WriteLiteral("></span>\r\n </td>\r\n </tr>\r\n");
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <tr");
|
||||
WriteLiteral(" <tr");
|
||||
|
||||
WriteLiteral(" data-jobcomponentid=\"");
|
||||
|
||||
|
||||
#line 46 "..\..\Views\Job\JobParts\Components.cshtml"
|
||||
Write(jc.Id);
|
||||
#line 49 "..\..\Views\Job\JobParts\Components.cshtml"
|
||||
Write(jc.Id);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\"");
|
||||
|
||||
WriteLiteral(">\r\n <td>\r\n <span");
|
||||
WriteLiteral(">\r\n <td>\r\n <span");
|
||||
|
||||
WriteLiteral(" class=\"description\"");
|
||||
|
||||
WriteLiteral(">");
|
||||
|
||||
|
||||
#line 48 "..\..\Views\Job\JobParts\Components.cshtml"
|
||||
Write(jc.Description);
|
||||
#line 51 "..\..\Views\Job\JobParts\Components.cshtml"
|
||||
Write(jc.Description);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("</span>\r\n </td>\r\n <td>\r\n <span");
|
||||
WriteLiteral("</span>\r\n </td>\r\n <td>\r\n <span");
|
||||
|
||||
WriteLiteral(" class=\"cost\"");
|
||||
|
||||
WriteLiteral(">");
|
||||
|
||||
|
||||
#line 51 "..\..\Views\Job\JobParts\Components.cshtml"
|
||||
Write(jc.Cost.ToString("C"));
|
||||
#line 54 "..\..\Views\Job\JobParts\Components.cshtml"
|
||||
Write(jc.Cost.ToString("C"));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("</span>\r\n </td>\r\n </tr>\r\n");
|
||||
WriteLiteral("</span>\r\n </td>\r\n </tr>\r\n");
|
||||
|
||||
|
||||
#line 54 "..\..\Views\Job\JobParts\Components.cshtml"
|
||||
#line 57 "..\..\Views\Job\JobParts\Components.cshtml"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -226,13 +259,13 @@ WriteLiteral("</span>\r\n </td>\r\n </tr>\r\n");
|
||||
WriteLiteral("\r\n <tr>\r\n <td>\r\n");
|
||||
|
||||
|
||||
#line 59 "..\..\Views\Job\JobParts\Components.cshtml"
|
||||
#line 62 "..\..\Views\Job\JobParts\Components.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 59 "..\..\Views\Job\JobParts\Components.cshtml"
|
||||
#line 62 "..\..\Views\Job\JobParts\Components.cshtml"
|
||||
if (hasEdit && hasAdd)
|
||||
{
|
||||
|
||||
@@ -248,7 +281,7 @@ WriteLiteral(" id=\"jobComponentsAdd\"");
|
||||
WriteLiteral(">Add Component</a>\r\n");
|
||||
|
||||
|
||||
#line 62 "..\..\Views\Job\JobParts\Components.cshtml"
|
||||
#line 65 "..\..\Views\Job\JobParts\Components.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -256,57 +289,57 @@ WriteLiteral(">Add Component</a>\r\n");
|
||||
#line hidden
|
||||
WriteLiteral(" \r\n </td>\r\n <td");
|
||||
|
||||
WriteAttribute("colspan", Tuple.Create(" colspan=\"", 1727), Tuple.Create("\"", 1755)
|
||||
WriteAttribute("colspan", Tuple.Create(" colspan=\"", 2047), Tuple.Create("\"", 2075)
|
||||
|
||||
#line 65 "..\..\Views\Job\JobParts\Components.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 1737), Tuple.Create<System.Object, System.Int32>(hasEdit ? 2 : 1
|
||||
#line 68 "..\..\Views\Job\JobParts\Components.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 2057), Tuple.Create<System.Object, System.Int32>(hasEdit ? 2 : 1
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 1737), false)
|
||||
, 2057), false)
|
||||
);
|
||||
|
||||
WriteLiteral(" class=\"totalCost\"");
|
||||
|
||||
WriteLiteral(">Total: <span");
|
||||
WriteLiteral(">\r\n Total: <span");
|
||||
|
||||
WriteLiteral(" id=\"jobComponentsTotalCost\"");
|
||||
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
|
||||
#line 66 "..\..\Views\Job\JobParts\Components.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 66 "..\..\Views\Job\JobParts\Components.cshtml"
|
||||
if (!hasEdit)
|
||||
{
|
||||
#line 70 "..\..\Views\Job\JobParts\Components.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 68 "..\..\Views\Job\JobParts\Components.cshtml"
|
||||
Write(Model.Job.JobComponentsTotalCost().ToString("C"));
|
||||
#line 70 "..\..\Views\Job\JobParts\Components.cshtml"
|
||||
if (!hasEdit)
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 72 "..\..\Views\Job\JobParts\Components.cshtml"
|
||||
Write(Model.Job.JobComponentsTotalCost().ToString("C"));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 68 "..\..\Views\Job\JobParts\Components.cshtml"
|
||||
|
||||
}
|
||||
#line 72 "..\..\Views\Job\JobParts\Components.cshtml"
|
||||
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" </span>\r\n </td>\r\n </tr>\r\n</table>\r\n");
|
||||
WriteLiteral(" </span>\r\n </td>\r\n </tr>\r\n</table>\r\n");
|
||||
|
||||
|
||||
#line 74 "..\..\Views\Job\JobParts\Components.cshtml"
|
||||
#line 78 "..\..\Views\Job\JobParts\Components.cshtml"
|
||||
if (hasEdit)
|
||||
{
|
||||
|
||||
@@ -329,138 +362,96 @@ WriteLiteral(" <script");
|
||||
|
||||
WriteLiteral(" type=\"text/javascript\"");
|
||||
|
||||
WriteLiteral(">\r\n $(function () {\r\n var $jobComponents = $(\'#jobComponents\');" +
|
||||
"\r\n\r\n $jobComponents.on(\'change\', \'input\', updateComponent);\r\n " +
|
||||
" $jobComponents.on(\'focus\', \'input\', function () { $(this).select() });\r\n\r\n\r\n" +
|
||||
" $jobComponents.on(\'click\', \'span.remove\', removeComponent);\r\n\r\n " +
|
||||
" $(\'#jobComponentsAdd\').click(function () {\r\n var jc = $(\'<" +
|
||||
"tr><td><input type=\"text\" class=\"description\" /></td><td><input type=\"text\" clas" +
|
||||
"s=\"cost\" /></td><td><span class=\"remove fa fa-times-circle\"></span></td></tr>\');" +
|
||||
"\r\n jc.find(\'input\').focus(function () { $(this).select() })\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 resiz" +
|
||||
"able: false,\r\n height: 140,\r\n modal: true,\r\n " +
|
||||
" autoOpen: false\r\n });\r\n\r\n function removeCompone" +
|
||||
"nt() {\r\n var componentRow = $(this).closest(\'tr\');\r\n " +
|
||||
" var id = componentRow.attr(\'data-jobcomponentid\');\r\n if (id) {" +
|
||||
"\r\n var data = { id: id };\r\n\r\n var $dialogR" +
|
||||
"emoveComponent = $(\'#dialogRemoveComponent\');\r\n $dialogRemove" +
|
||||
"Component.dialog(\"enable\");\r\n $dialogRemoveComponent.dialog(\'" +
|
||||
"option\', \'buttons\', {\r\n \"Remove\": function () {\r\n " +
|
||||
" $dialogRemoveComponent.dialog(\"disable\");\r\n " +
|
||||
" $dialogRemoveComponent.dialog(\"option\", \"buttons\", null);\r\n " +
|
||||
" $.ajax({\r\n url: \'");
|
||||
WriteLiteral(">\r\n $(function () {\r\n const $jobComponents = $(\'#jobComponents\'" +
|
||||
");\r\n\r\n $jobComponents.on(\'change\', \'input\', updateComponent);\r\n " +
|
||||
" $jobComponents.on(\'focus\', \'input\', function () { $(this).select() });\r\n\r\n" +
|
||||
"\r\n $jobComponents.on(\'click\', \'span.remove\', removeComponent);\r\n\r\n " +
|
||||
" $(\'#jobComponentsAdd\').click(function () {\r\n const jc = " +
|
||||
"$(\'<tr><td><input type=\"text\" class=\"description\" /></td><td><input type=\"text\" " +
|
||||
"class=\"cost\" /></td><td><span class=\"remove fa fa-times-circle\"></span></td></tr" +
|
||||
">\');\r\n jc.find(\'input\').focus(function () { $(this).select() })\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 r" +
|
||||
"esizable: false,\r\n height: 140,\r\n modal: true,\r\n " +
|
||||
" autoOpen: false\r\n });\r\n\r\n function removeCom" +
|
||||
"ponent() {\r\n const componentRow = $(this).closest(\'tr\');\r\n " +
|
||||
" const id = componentRow.attr(\'data-jobcomponentid\');\r\n i" +
|
||||
"f (id) {\r\n var $dialogRemoveComponent = $(\'#dialogRemoveCompo" +
|
||||
"nent\');\r\n $dialogRemoveComponent.dialog(\"enable\");\r\n " +
|
||||
" $dialogRemoveComponent.dialog(\'option\', \'buttons\', {\r\n " +
|
||||
" \"Remove\": function () {\r\n $dialogRemoveCompo" +
|
||||
"nent.dialog(\"disable\");\r\n $dialogRemoveComponent.dial" +
|
||||
"og(\"option\", \"buttons\", null);\r\n\r\n async function rem" +
|
||||
"oveComponentAsync(id) {\r\n\r\n const body = new Form" +
|
||||
"Data();\r\n body.append(\'__RequestVerificationToken" +
|
||||
"\', document.body.dataset.antiforgery);\r\n body.app" +
|
||||
"end(\'id\', id);\r\n\r\n const response = await fetch($" +
|
||||
"jobComponents.attr(\'data-removeurl\'), {\r\n met" +
|
||||
"hod: \'POST\',\r\n body: body\r\n " +
|
||||
" });\r\n\r\n if (response.ok) {\r\n " +
|
||||
" componentRow.remove();\r\n " +
|
||||
" updateTotalCost();\r\n } else {\r\n " +
|
||||
" alert(\'Unable to remove component: \' + response.statu" +
|
||||
"sText);\r\n }\r\n $dia" +
|
||||
"logRemoveComponent.dialog(\"close\");\r\n }\r\n " +
|
||||
" removeComponentAsync(id);\r\n },\r\n " +
|
||||
" Cancel: function () {\r\n $dialogRemoveC" +
|
||||
"omponent.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.r" +
|
||||
"emove();\r\n updateTotalCost();\r\n }\r\n " +
|
||||
" }\r\n function updateTotalCost() {\r\n var totalCost = 0;" +
|
||||
"\r\n\r\n $jobComponents.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 tot" +
|
||||
"alCostFormatted = $.formatNumber(totalCost, { format: \'#,##0.00\', locale: \'au\' }" +
|
||||
");\r\n $(\'#jobComponentsTotalCost\').text(\'$\' + totalCostFormatted);" +
|
||||
"\r\n }\r\n function updateComponent() {\r\n var c" +
|
||||
"omponentRow = $(this).closest(\'tr\');\r\n\r\n componentRow.find(\'input" +
|
||||
"\').attr(\'disabled\', true).addClass(\'updating\');\r\n\r\n var id = comp" +
|
||||
"onentRow.attr(\'data-jobcomponentid\');\r\n if (id) {\r\n " +
|
||||
" // Update\r\n async function updateComponentAsync(id, des" +
|
||||
"cription, cost) {\r\n const body = new FormData();\r\n " +
|
||||
" body.append(\'__RequestVerificationToken\', document.body.dataset" +
|
||||
".antiforgery);\r\n body.append(\'id\', id);\r\n " +
|
||||
" body.append(\'description\', description);\r\n body.a" +
|
||||
"ppend(\'cost\', cost);\r\n\r\n const response = await fetch($jo" +
|
||||
"bComponents.attr(\'data-updateurl\'), {\r\n method: \'POST" +
|
||||
"\',\r\n body: body\r\n });\r\n\r\n " +
|
||||
" componentRow.find(\'input\').attr(\'disabled\', false).removeClas" +
|
||||
"s(\'updating\');\r\n\r\n if (response.ok) {\r\n " +
|
||||
" const component = await response.json();\r\n " +
|
||||
"componentRow.find(\'input.description\').val(component.Description);\r\n " +
|
||||
" componentRow.find(\'input.cost\').val(component.Cost);\r\n " +
|
||||
" } else {\r\n alert(\'Unable to update comp" +
|
||||
"onent: \' + response.statusText);\r\n }\r\n " +
|
||||
" updateTotalCost();\r\n }\r\n\r\n updateComp" +
|
||||
"onentAsync(id, componentRow.find(\'input.description\').val(), componentRow.find(\'" +
|
||||
"input.cost\').val());\r\n } else {\r\n // Add\r\n " +
|
||||
" async function addComponentAsync(description, cost) {\r\n " +
|
||||
" const body = new FormData();\r\n body.append" +
|
||||
"(\'__RequestVerificationToken\', document.body.dataset.antiforgery);\r\n " +
|
||||
" body.append(\'description\', description);\r\n bo" +
|
||||
"dy.append(\'cost\', cost);\r\n\r\n const response = await fetch" +
|
||||
"($jobComponents.attr(\'data-addurl\'), {\r\n method: \'POS" +
|
||||
"T\',\r\n body: body\r\n });\r\n\r\n " +
|
||||
" componentRow.find(\'input\').attr(\'disabled\', false).removeCla" +
|
||||
"ss(\'updating\');\r\n\r\n if (response.ok) {\r\n " +
|
||||
" const component = await response.json();\r\n " +
|
||||
" componentRow.attr(\'data-jobcomponentid\', component.Id);\r\n " +
|
||||
" componentRow.find(\'input.description\').val(component.Description);\r\n " +
|
||||
" componentRow.find(\'input.cost\').val(component.Cost);\r\n " +
|
||||
" } else {\r\n alert(\'Unable to add c" +
|
||||
"omponent: \' + response.statusText);\r\n }\r\n " +
|
||||
" updateTotalCost();\r\n }\r\n addCompon" +
|
||||
"entAsync(componentRow.find(\'input.description\').val(), componentRow.find(\'input." +
|
||||
"cost\').val())\r\n }\r\n }\r\n updateTotalCost();\r" +
|
||||
"\n\r\n });\r\n </script>\r\n");
|
||||
|
||||
|
||||
#line 119 "..\..\Views\Job\JobParts\Components.cshtml"
|
||||
Write(Url.Action(MVC.API.Job.ComponentRemove()));
|
||||
|
||||
|
||||
#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 " +
|
||||
" componentRow.remove();\r\n update" +
|
||||
"TotalCost();\r\n } else {\r\n " +
|
||||
" alert(\'Unable to remove component: \' + d);\r\n " +
|
||||
" }\r\n $dialogRemoveComponen" +
|
||||
"t.dialog(\"close\");\r\n },\r\n " +
|
||||
" error: function (jqXHR, textStatus, errorThrown) {\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 $di" +
|
||||
"alogRemoveComponent.dialog(\"close\");\r\n }\r\n " +
|
||||
" });\r\n\r\n $dialogRemoveComponent.dialog(\'open\');\r\n\r\n " +
|
||||
" } else {\r\n // New - Remove\r\n com" +
|
||||
"ponentRow.remove();\r\n updateTotalCost();\r\n }\r\n" +
|
||||
" }\r\n function updateTotalCost() {\r\n var tot" +
|
||||
"alCost = 0;\r\n\r\n $jobComponents.find(\'input.cost\').each(function (" +
|
||||
") {\r\n var v = $(this).val();\r\n v = $.parse" +
|
||||
"Number(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\', loc" +
|
||||
"ale: \'au\' });\r\n $(\'#jobComponentsTotalCost\').text(\'$\' + totalCost" +
|
||||
"Formatted);\r\n }\r\n function updateComponent() {\r\n " +
|
||||
" var componentRow = $(this).closest(\'tr\');\r\n\r\n componentRow." +
|
||||
"find(\'input\').attr(\'disabled\', true).addClass(\'updating\');\r\n\r\n va" +
|
||||
"r id = componentRow.attr(\'data-jobcomponentid\');\r\n if (id) {\r\n " +
|
||||
" // Update\r\n var data = {\r\n " +
|
||||
" id: id,\r\n Description: componentRow.find(\'input.des" +
|
||||
"cription\').val(),\r\n Cost: componentRow.find(\'input.cost\')" +
|
||||
".val()\r\n };\r\n $.ajax({\r\n " +
|
||||
" url: \'");
|
||||
|
||||
|
||||
#line 176 "..\..\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 200 "..\..\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>
|
||||
");
|
||||
|
||||
|
||||
#line 224 "..\..\Views\Job\JobParts\Components.cshtml"
|
||||
#line 232 "..\..\Views\Job\JobParts\Components.cshtml"
|
||||
}
|
||||
|
||||
#line default
|
||||
|
||||
@@ -33,9 +33,10 @@
|
||||
</table>
|
||||
@if (canEdit)
|
||||
{
|
||||
<div id="dialogFlagsAction" title="Add Flag">
|
||||
<div id="dialogFlagsAction" class="dialog" title="Add Flag">
|
||||
@using (Html.BeginForm(MVC.API.Job.UpdateFlag(Model.Job.Id, null, null, true)))
|
||||
{
|
||||
@Html.AntiForgeryToken()
|
||||
<input id="dialogFlagsActionFlag" type="hidden" name="Flag" value="0" />
|
||||
<h3>Reason:</h3>
|
||||
<p>
|
||||
@@ -46,57 +47,70 @@
|
||||
<script type="text/javascript">
|
||||
$('#jobDetailTabItems').append('<li><a href="#jobDetailTab-Flags">Flags [@(validFlags.SelectMany(g => g.Value).Count(f => f.Item3))]</a></li>');
|
||||
$(function () {
|
||||
var $flagCheckboxes = $('#jobFlags').find('input[type="checkbox"]');
|
||||
var $dialogFlagsAction = $('#dialogFlagsAction');
|
||||
var $flagCheckbox;
|
||||
const $flagCheckboxes = $('#jobFlags').find('input[type="checkbox"]');
|
||||
let $dialogFlagsAction = null;
|
||||
|
||||
var updateFlags = function () {
|
||||
$flagCheckbox = $(this);
|
||||
var flagValue = $flagCheckbox.val();
|
||||
const $flagCheckbox = $(this);
|
||||
const 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();
|
||||
const title = 'Add Flag: ' + $flagCheckbox.closest('tr').find('th .flagGroupName').text() + ': ' + $('#jobFlagLabel_' + flagValue).text();
|
||||
|
||||
if (!$dialogFlagsAction) {
|
||||
$dialogFlagsAction = $('#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.prop('checked', false);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
$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.prop('checked', false);
|
||||
}
|
||||
});
|
||||
|
||||
$flagCheckboxes.click(updateFlags);
|
||||
});
|
||||
const body = new FormData();
|
||||
body.append('__RequestVerificationToken', document.body.dataset.antiforgery);
|
||||
body.append('Flag', '-' + flagValue);
|
||||
fetch('@(Url.Action(MVC.API.Job.UpdateFlag(Model.Job.Id, null, null, false)))', {
|
||||
method: 'post',
|
||||
body: body
|
||||
}).then(r => {
|
||||
if (r.ok) {
|
||||
$ajaxLoading.hide().next('.ajaxOk').show().delay('fast').fadeOut('slow');
|
||||
} else {
|
||||
alert('Unable to change Flag:\n' + r.statusText);
|
||||
$ajaxLoading.hide();
|
||||
}
|
||||
}).catch(e => {
|
||||
alert('Unable to change Flag:\n' + e);
|
||||
$ajaxLoading.hide();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
$flagCheckboxes.on('click', updateFlags);
|
||||
});
|
||||
</script>
|
||||
}
|
||||
else
|
||||
|
||||
@@ -240,6 +240,8 @@ WriteLiteral(" <div");
|
||||
|
||||
WriteLiteral(" id=\"dialogFlagsAction\"");
|
||||
|
||||
WriteLiteral(" class=\"dialog\"");
|
||||
|
||||
WriteLiteral(" title=\"Add Flag\"");
|
||||
|
||||
WriteLiteral(">\r\n");
|
||||
@@ -254,6 +256,20 @@ WriteLiteral(">\r\n");
|
||||
#line 37 "..\..\Views\Job\JobParts\Flags.cshtml"
|
||||
using (Html.BeginForm(MVC.API.Job.UpdateFlag(Model.Job.Id, null, null, true)))
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 39 "..\..\Views\Job\JobParts\Flags.cshtml"
|
||||
Write(Html.AntiForgeryToken());
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 39 "..\..\Views\Job\JobParts\Flags.cshtml"
|
||||
|
||||
|
||||
|
||||
#line default
|
||||
@@ -281,7 +297,7 @@ WriteLiteral(" class=\"block\"");
|
||||
WriteLiteral("></textarea>\r\n </p>\r\n");
|
||||
|
||||
|
||||
#line 44 "..\..\Views\Job\JobParts\Flags.cshtml"
|
||||
#line 45 "..\..\Views\Job\JobParts\Flags.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -297,79 +313,75 @@ WriteLiteral(">\r\n $(\'#jobDetailTabItems\').append(\'<li><a href=\"
|
||||
"Flags [");
|
||||
|
||||
|
||||
#line 47 "..\..\Views\Job\JobParts\Flags.cshtml"
|
||||
#line 48 "..\..\Views\Job\JobParts\Flags.cshtml"
|
||||
Write(validFlags.SelectMany(g => g.Value).Count(f => f.Item3));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(@"]</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('");
|
||||
WriteLiteral("]</a></li>\');\r\n $(function () {\r\n const $flagCheckboxes" +
|
||||
" = $(\'#jobFlags\').find(\'input[type=\"checkbox\"]\');\r\n let $dialogFl" +
|
||||
"agsAction = null;\r\n\r\n var updateFlags = function () {\r\n " +
|
||||
" const $flagCheckbox = $(this);\r\n const flagValue = " +
|
||||
"$flagCheckbox.val();\r\n\r\n if ($flagCheckbox.is(\':checked\')) {\r" +
|
||||
"\n // Add\r\n $(\'#dialogFlagsActionFl" +
|
||||
"ag\').val(flagValue);\r\n const title = \'Add Flag: \' + $flag" +
|
||||
"Checkbox.closest(\'tr\').find(\'th .flagGroupName\').text() + \': \' + $(\'#jobFlagLabe" +
|
||||
"l_\' + flagValue).text();\r\n\r\n if (!$dialogFlagsAction) {\r\n" +
|
||||
" $dialogFlagsAction = $(\'#dialogFlagsAction\').dialog(" +
|
||||
"{\r\n resizable: false,\r\n " +
|
||||
" height: 240,\r\n modal: true,\r\n " +
|
||||
" autoOpen: false,\r\n buttons: {\r\n" +
|
||||
" \"Add\": function () {\r\n " +
|
||||
" var $this = $(this);\r\n " +
|
||||
"$this.dialog(\"disable\");\r\n $this.dialog(\"" +
|
||||
"option\", \"buttons\", null);\r\n $this.find(\'" +
|
||||
"form\').first().submit();\r\n },\r\n " +
|
||||
" Cancel: function () {\r\n " +
|
||||
" $(this).dialog(\"close\");\r\n }\r\n " +
|
||||
" },\r\n close: function () {\r\n" +
|
||||
" $flagCheckbox.prop(\'checked\', false);\r\n " +
|
||||
" }\r\n });\r\n " +
|
||||
" }\r\n\r\n $dialogFlagsAction.dialog(\'option\', \'title\'," +
|
||||
" title);\r\n $dialogFlagsAction.dialog(\'open\');\r\n " +
|
||||
" } else {\r\n // Remove\r\n v" +
|
||||
"ar $ajaxLoading = $flagCheckbox.closest(\'tr\').find(\'span.ajaxLoading\');\r\n " +
|
||||
" $ajaxLoading.show();\r\n\r\n const body = ne" +
|
||||
"w FormData();\r\n body.append(\'__RequestVerificationToken\'," +
|
||||
" document.body.dataset.antiforgery);\r\n body.append(\'Flag\'" +
|
||||
", \'-\' + flagValue);\r\n fetch(\'");
|
||||
|
||||
|
||||
#line 67 "..\..\Views\Job\JobParts\Flags.cshtml"
|
||||
Write(Url.Action(MVC.API.Job.UpdateFlag(Model.Job.Id, null, null, false)));
|
||||
#line 95 "..\..\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);
|
||||
WriteLiteral(@"', {
|
||||
method: 'post',
|
||||
body: body
|
||||
}).then(r => {
|
||||
if (r.ok) {
|
||||
$ajaxLoading.hide().next('.ajaxOk').show().delay('fast').fadeOut('slow');
|
||||
} else {
|
||||
alert('Unable to change Flag:\n' + r.statusText);
|
||||
$ajaxLoading.hide();
|
||||
}
|
||||
}).catch(e => {
|
||||
alert('Unable to change Flag:\n' + e);
|
||||
$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.prop('checked', false);
|
||||
}
|
||||
});
|
||||
|
||||
$flagCheckboxes.click(updateFlags);
|
||||
});
|
||||
$flagCheckboxes.on('click', updateFlags);
|
||||
});
|
||||
</script>
|
||||
");
|
||||
|
||||
|
||||
#line 101 "..\..\Views\Job\JobParts\Flags.cshtml"
|
||||
#line 115 "..\..\Views\Job\JobParts\Flags.cshtml"
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -381,7 +393,7 @@ WriteLiteral(" <script>\r\n $(\'#jobDetailTabItems\').append(\
|
||||
"tailTab-Flags\">Flags [");
|
||||
|
||||
|
||||
#line 105 "..\..\Views\Job\JobParts\Flags.cshtml"
|
||||
#line 119 "..\..\Views\Job\JobParts\Flags.cshtml"
|
||||
Write(validFlags.SelectMany(g => g.Value).Count(f => f.Item3));
|
||||
|
||||
|
||||
@@ -390,7 +402,7 @@ WriteLiteral(" <script>\r\n $(\'#jobDetailTabItems\').append(\
|
||||
WriteLiteral("]</a></li>\');\r\n </script>\r\n");
|
||||
|
||||
|
||||
#line 107 "..\..\Views\Job\JobParts\Flags.cshtml"
|
||||
#line 121 "..\..\Views\Job\JobParts\Flags.cshtml"
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -116,6 +116,7 @@
|
||||
<div id="Job_Show_Queues_Actions_Remove_Dialog" class="dialog" title="Remove this Job from the queue?">
|
||||
@using (Html.BeginForm(MVC.API.JobQueueJob.RemoveJob()))
|
||||
{
|
||||
@Html.AntiForgeryToken()
|
||||
<input id="Job_Show_Queues_Actions_Remove_Dialog_Id" type="hidden" name="id" value="" />
|
||||
<p>
|
||||
<i class="fa fa-exclamation-triangle fa-lg"></i> Are you sure?
|
||||
@@ -133,6 +134,7 @@
|
||||
<div id="Job_Show_Queues_Actions_EditAddedComment_Dialog" class="dialog" title="Edit the Added Comment">
|
||||
@using (Html.BeginForm(MVC.API.JobQueueJob.UpdateAddedComment()))
|
||||
{
|
||||
@Html.AntiForgeryToken()
|
||||
<input id="Job_Show_Queues_Actions_EditAddedComment_Dialog_Id" type="hidden" name="id" value="" />
|
||||
<input type="hidden" name="redirect" value="true" />
|
||||
<h4>Comment:</h4>
|
||||
@@ -144,6 +146,7 @@
|
||||
<div id="Job_Show_Queues_Actions_EditRemovedComment_Dialog" class="dialog" title="Edit the Removed Comment">
|
||||
@using (Html.BeginForm(MVC.API.JobQueueJob.UpdateRemovedComment()))
|
||||
{
|
||||
@Html.AntiForgeryToken()
|
||||
<input id="Job_Show_Queues_Actions_EditRemovedComment_Dialog_Id" type="hidden" name="id" value="" />
|
||||
<input type="hidden" name="redirect" value="true" />
|
||||
<h4>Comment:</h4>
|
||||
@@ -155,6 +158,7 @@
|
||||
<div id="Job_Show_Queues_Actions_EditSla_Dialog" class="dialog" title="Edit the SLA">
|
||||
@using (Html.BeginForm(MVC.API.JobQueueJob.UpdateSlaAndPriority()))
|
||||
{
|
||||
@Html.AntiForgeryToken()
|
||||
<input id="Job_Show_Queues_Actions_EditSla_Dialog_Id" type="hidden" name="id" value="" />
|
||||
<input type="hidden" name="redirect" value="true" />
|
||||
<div class="priority">
|
||||
|
||||
@@ -762,6 +762,20 @@ WriteLiteral(">\r\n");
|
||||
#line 117 "..\..\Views\Job\JobParts\Queues.cshtml"
|
||||
using (Html.BeginForm(MVC.API.JobQueueJob.RemoveJob()))
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 119 "..\..\Views\Job\JobParts\Queues.cshtml"
|
||||
Write(Html.AntiForgeryToken());
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 119 "..\..\Views\Job\JobParts\Queues.cshtml"
|
||||
|
||||
|
||||
|
||||
#line default
|
||||
@@ -815,7 +829,7 @@ WriteLiteral(" for=\"Job_Show_Queues_Actions_Remove_Dialog_CloseJob\"");
|
||||
WriteLiteral(">Close the Job</label>\r\n </div>\r\n");
|
||||
|
||||
|
||||
#line 131 "..\..\Views\Job\JobParts\Queues.cshtml"
|
||||
#line 132 "..\..\Views\Job\JobParts\Queues.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -834,15 +848,29 @@ WriteLiteral(" title=\"Edit the Added Comment\"");
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
|
||||
#line 134 "..\..\Views\Job\JobParts\Queues.cshtml"
|
||||
#line 135 "..\..\Views\Job\JobParts\Queues.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 134 "..\..\Views\Job\JobParts\Queues.cshtml"
|
||||
#line 135 "..\..\Views\Job\JobParts\Queues.cshtml"
|
||||
using (Html.BeginForm(MVC.API.JobQueueJob.UpdateAddedComment()))
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 137 "..\..\Views\Job\JobParts\Queues.cshtml"
|
||||
Write(Html.AntiForgeryToken());
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 137 "..\..\Views\Job\JobParts\Queues.cshtml"
|
||||
|
||||
|
||||
|
||||
#line default
|
||||
@@ -882,7 +910,7 @@ WriteLiteral(" class=\"block\"");
|
||||
WriteLiteral("></textarea>\r\n </p>\r\n");
|
||||
|
||||
|
||||
#line 142 "..\..\Views\Job\JobParts\Queues.cshtml"
|
||||
#line 144 "..\..\Views\Job\JobParts\Queues.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -901,15 +929,29 @@ WriteLiteral(" title=\"Edit the Removed Comment\"");
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
|
||||
#line 145 "..\..\Views\Job\JobParts\Queues.cshtml"
|
||||
#line 147 "..\..\Views\Job\JobParts\Queues.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 145 "..\..\Views\Job\JobParts\Queues.cshtml"
|
||||
#line 147 "..\..\Views\Job\JobParts\Queues.cshtml"
|
||||
using (Html.BeginForm(MVC.API.JobQueueJob.UpdateRemovedComment()))
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 149 "..\..\Views\Job\JobParts\Queues.cshtml"
|
||||
Write(Html.AntiForgeryToken());
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 149 "..\..\Views\Job\JobParts\Queues.cshtml"
|
||||
|
||||
|
||||
|
||||
#line default
|
||||
@@ -949,7 +991,7 @@ WriteLiteral(" class=\"block\"");
|
||||
WriteLiteral("></textarea>\r\n </p>\r\n");
|
||||
|
||||
|
||||
#line 153 "..\..\Views\Job\JobParts\Queues.cshtml"
|
||||
#line 156 "..\..\Views\Job\JobParts\Queues.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -968,15 +1010,29 @@ WriteLiteral(" title=\"Edit the SLA\"");
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
|
||||
#line 156 "..\..\Views\Job\JobParts\Queues.cshtml"
|
||||
#line 159 "..\..\Views\Job\JobParts\Queues.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 156 "..\..\Views\Job\JobParts\Queues.cshtml"
|
||||
#line 159 "..\..\Views\Job\JobParts\Queues.cshtml"
|
||||
using (Html.BeginForm(MVC.API.JobQueueJob.UpdateSlaAndPriority()))
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 161 "..\..\Views\Job\JobParts\Queues.cshtml"
|
||||
Write(Html.AntiForgeryToken());
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 161 "..\..\Views\Job\JobParts\Queues.cshtml"
|
||||
|
||||
|
||||
|
||||
#line default
|
||||
@@ -1023,13 +1079,13 @@ WriteLiteral(" autofocus=\"autofocus\"");
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
|
||||
#line 165 "..\..\Views\Job\JobParts\Queues.cshtml"
|
||||
#line 169 "..\..\Views\Job\JobParts\Queues.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 165 "..\..\Views\Job\JobParts\Queues.cshtml"
|
||||
#line 169 "..\..\Views\Job\JobParts\Queues.cshtml"
|
||||
foreach (var priorityItem in Enum.GetNames(typeof(JobQueuePriority)))
|
||||
{
|
||||
|
||||
@@ -1038,20 +1094,20 @@ WriteLiteral(">\r\n");
|
||||
#line hidden
|
||||
WriteLiteral(" <option");
|
||||
|
||||
WriteAttribute("value", Tuple.Create(" value=\"", 8819), Tuple.Create("\"", 8842)
|
||||
WriteAttribute("value", Tuple.Create(" value=\"", 8971), Tuple.Create("\"", 8994)
|
||||
|
||||
#line 167 "..\..\Views\Job\JobParts\Queues.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 8827), Tuple.Create<System.Object, System.Int32>(priorityItem
|
||||
#line 171 "..\..\Views\Job\JobParts\Queues.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 8979), Tuple.Create<System.Object, System.Int32>(priorityItem
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 8827), false)
|
||||
, 8979), false)
|
||||
);
|
||||
|
||||
WriteLiteral(">");
|
||||
|
||||
|
||||
#line 167 "..\..\Views\Job\JobParts\Queues.cshtml"
|
||||
#line 171 "..\..\Views\Job\JobParts\Queues.cshtml"
|
||||
Write(priorityItem);
|
||||
|
||||
|
||||
@@ -1060,7 +1116,7 @@ WriteLiteral(">");
|
||||
WriteLiteral("</option>\r\n");
|
||||
|
||||
|
||||
#line 168 "..\..\Views\Job\JobParts\Queues.cshtml"
|
||||
#line 172 "..\..\Views\Job\JobParts\Queues.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -1086,7 +1142,7 @@ WriteLiteral(" placeholder=\"None\"");
|
||||
WriteLiteral(" />\r\n </p>\r\n </div>\r\n");
|
||||
|
||||
|
||||
#line 178 "..\..\Views\Job\JobParts\Queues.cshtml"
|
||||
#line 182 "..\..\Views\Job\JobParts\Queues.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -1109,7 +1165,7 @@ WriteLiteral(@">
|
||||
var dialogEditSla_BothUrl = '");
|
||||
|
||||
|
||||
#line 188 "..\..\Views\Job\JobParts\Queues.cshtml"
|
||||
#line 192 "..\..\Views\Job\JobParts\Queues.cshtml"
|
||||
Write(Url.Action(MVC.API.JobQueueJob.UpdateSlaAndPriority()));
|
||||
|
||||
|
||||
@@ -1118,7 +1174,7 @@ WriteLiteral(@">
|
||||
WriteLiteral("\';\r\n var dialogEditSla_SlaUrl = \'");
|
||||
|
||||
|
||||
#line 189 "..\..\Views\Job\JobParts\Queues.cshtml"
|
||||
#line 193 "..\..\Views\Job\JobParts\Queues.cshtml"
|
||||
Write(Url.Action(MVC.API.JobQueueJob.UpdateSla()));
|
||||
|
||||
|
||||
@@ -1127,7 +1183,7 @@ WriteLiteral("\';\r\n var dialogEditSla_SlaUrl = \'");
|
||||
WriteLiteral("\';\r\n var dialogEditSla_PriorityUrl = \'");
|
||||
|
||||
|
||||
#line 190 "..\..\Views\Job\JobParts\Queues.cshtml"
|
||||
#line 194 "..\..\Views\Job\JobParts\Queues.cshtml"
|
||||
Write(Url.Action(MVC.API.JobQueueJob.UpdatePriority()));
|
||||
|
||||
|
||||
@@ -1249,7 +1305,7 @@ WriteLiteral("\';\r\n\r\n jobQueues.on(\'click\', \'a.remove\', funct
|
||||
"script>\r\n");
|
||||
|
||||
|
||||
#line 392 "..\..\Views\Job\JobParts\Queues.cshtml"
|
||||
#line 396 "..\..\Views\Job\JobParts\Queues.cshtml"
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1264,7 +1320,7 @@ WriteLiteral(" class=\"none\"");
|
||||
WriteLiteral(">This job has no associated queue history</div>\r\n");
|
||||
|
||||
|
||||
#line 396 "..\..\Views\Job\JobParts\Queues.cshtml"
|
||||
#line 400 "..\..\Views\Job\JobParts\Queues.cshtml"
|
||||
}
|
||||
|
||||
#line default
|
||||
|
||||
@@ -30,7 +30,6 @@
|
||||
{
|
||||
<td id="CommentsContainer">
|
||||
<div id="Comments" class="@(canAddLogs ? "canAddLogs" : "cannotAddLogs") @(canRemoveAnyLogs ? "canRemoveAnyLogs" : "cannotRemoveAnyLogs") @(canRemoveOwnLogs ? "canRemoveOwnLogs" : "cannotRemoveOwnLogs")" data-jobid="@Model.Job.Id" data-addurl="@Url.Action(MVC.API.Job.CommentAdd(Model.Job.Id))" data-removeurl="@Url.Action(MVC.API.Job.CommentRemove())" data-geturl="@Url.Action(MVC.API.Job.Comment())" data-userid="@CurrentUser.UserId">
|
||||
@Html.AntiForgeryToken()
|
||||
<div class="commentOutput">
|
||||
@foreach (var jl in Model.Job.JobLogs.OrderBy(m => m.Timestamp))
|
||||
{
|
||||
@@ -54,8 +53,7 @@
|
||||
@if (canShowAttachments)
|
||||
{
|
||||
<td id="AttachmentsContainer">
|
||||
<div id="Attachments" class="@(canAddAttachments ? "canAddAttachments" : "cannotAddAttachments") @(canRemoveAnyAttachments ? "canRemoveAnyAttachments" : "cannotRemoveAnyAttachments") @(canRemoveOwnAttachments ? "canRemoveOwnAttachments" : "cannotRemoveOwnAttachments")" data-userid="@CurrentUser.UserId" data-uploadurl="@(Url.Action(MVC.API.Job.AttachmentUpload(Model.Job.Id, null)))" data-onlineuploadurl="@(Url.Action(MVC.API.Job.AttachmentOnlineUploadSession(Model.Job.Id)))" data-qrcodeurl="@Url.Content("~/ClientSource/Scripts/Modules/qrcode.min.js")">
|
||||
@Html.AntiForgeryToken()
|
||||
<div id="Attachments" class="@(canAddAttachments ? "canAddAttachments" : "cannotAddAttachments") @(canRemoveAnyAttachments ? "canRemoveAnyAttachments" : "cannotRemoveAnyAttachments") @(canRemoveOwnAttachments ? "canRemoveOwnAttachments" : "cannotRemoveOwnAttachments")" data-userid="@CurrentUser.UserId" data-uploadurl="@(Url.Action(MVC.API.Job.AttachmentUpload(Model.Job.Id, null)))" data-onlineuploadurl="@(Url.Action(MVC.API.Job.AttachmentOnlineUploadSession(Model.Job.Id)))" data-qrcodeurl="@Url.Content("~/ClientSource/Scripts/Modules/qrcode.min.js")" data-removeurl="@Url.Action(MVC.API.Job.AttachmentRemove())">
|
||||
<div class="Disco-AttachmentUpload-DropTarget">
|
||||
<h2>Drop Attachments Here</h2>
|
||||
</div>
|
||||
@@ -143,7 +141,7 @@
|
||||
$CommentInput.prop('disabled', true);
|
||||
|
||||
const formData = new FormData();
|
||||
formData.append('__RequestVerificationToken', $Comments.find('input[name="__RequestVerificationToken"]').val());
|
||||
formData.append('__RequestVerificationToken', document.body.dataset.antiforgery);
|
||||
formData.append('comment', comment);
|
||||
|
||||
const response = await fetch($Comments.attr('data-addurl'), {
|
||||
@@ -171,7 +169,7 @@
|
||||
|
||||
async function removeComment(commentId) {
|
||||
const formData = new FormData();
|
||||
formData.append('__RequestVerificationToken', $Comments.find('input[name="__RequestVerificationToken"]').val());
|
||||
formData.append('__RequestVerificationToken', document.body.dataset.antiforgery);
|
||||
formData.append('id', commentId);
|
||||
|
||||
const response = await fetch($Comments.attr('data-removeurl'), {
|
||||
@@ -221,7 +219,7 @@
|
||||
async function loadLiveComment(id) {
|
||||
|
||||
const formData = new FormData();
|
||||
formData.append('__RequestVerificationToken', $Comments.find('input[name="__RequestVerificationToken"]').val());
|
||||
formData.append('__RequestVerificationToken', document.body.dataset.antiforgery);
|
||||
formData.append('id', id);
|
||||
|
||||
const response = await fetch($Comments.attr('data-geturl'), {
|
||||
@@ -361,8 +359,6 @@
|
||||
function removeLocalAttachment() {
|
||||
$this = $(this).closest('a');
|
||||
|
||||
var data = { id: $this.attr('data-attachmentid') };
|
||||
|
||||
if (!$dialogRemoveAttachment) {
|
||||
$dialogRemoveAttachment = $('<div class="dialog" title="Remove this Attachment?"><p><i class="fa fa-exclamation-triangle fa-lg"></i> Are you sure?</p></div>')
|
||||
.appendTo(document.body)
|
||||
@@ -374,29 +370,33 @@
|
||||
});
|
||||
}
|
||||
|
||||
$dialogRemoveAttachment.dialog("enable").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') {
|
||||
// Should be removed via Repository Notifications
|
||||
} else {
|
||||
alert('Unable to remove attachment: ' + d);
|
||||
}
|
||||
$dialogRemoveAttachment.dialog("close");
|
||||
},
|
||||
error: function (jqXHR, textStatus, errorThrown) {
|
||||
alert('Unable to remove attachment: ' + textStatus);
|
||||
$dialogRemoveAttachment.dialog("close");
|
||||
}
|
||||
async function removeAttachmentAsync(id) {
|
||||
const body = new FormData();
|
||||
body.append('__RequestVerificationToken', document.body.dataset.antiforgery);
|
||||
body.append('id', id);
|
||||
|
||||
try {
|
||||
const response = await fetch($Attachments.attr('data-removeurl'), {
|
||||
body: body,
|
||||
method: 'POST'
|
||||
});
|
||||
if (!response.ok) {
|
||||
alert('Unable to remove attachment: ' + response.statusText);
|
||||
}
|
||||
$dialogRemoveAttachment.dialog("close");
|
||||
} catch (e) {
|
||||
alert('Unable to remove attachment: ' + e);
|
||||
$dialogRemoveAttachment.dialog("close");
|
||||
}
|
||||
}
|
||||
|
||||
const attachmentId = $this.attr('data-attachmentid');
|
||||
$dialogRemoveAttachment.dialog('option', 'buttons', {
|
||||
"Remove": function () {
|
||||
$dialogRemoveAttachment.dialog("option", "buttons", null);
|
||||
removeAttachmentAsync(attachmentId);
|
||||
},
|
||||
"Cancel": function () {
|
||||
Cancel: function () {
|
||||
$dialogRemoveAttachment.dialog("close");
|
||||
}
|
||||
}).dialog('open');
|
||||
|
||||
@@ -199,31 +199,20 @@ WriteLiteral(" data-userid=\"");
|
||||
#line hidden
|
||||
WriteLiteral("\"");
|
||||
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 33 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||
Write(Html.AntiForgeryToken());
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n <div");
|
||||
WriteLiteral(">\r\n <div");
|
||||
|
||||
WriteLiteral(" class=\"commentOutput\"");
|
||||
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
|
||||
#line 35 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||
#line 34 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 35 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||
#line 34 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||
foreach (var jl in Model.Job.JobLogs.OrderBy(m => m.Timestamp))
|
||||
{
|
||||
|
||||
@@ -235,7 +224,7 @@ WriteLiteral(" <div");
|
||||
WriteLiteral(" data-logid=\"");
|
||||
|
||||
|
||||
#line 37 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||
#line 36 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||
Write(jl.Id);
|
||||
|
||||
|
||||
@@ -250,7 +239,7 @@ WriteLiteral(" class=\"author\"");
|
||||
WriteLiteral(">");
|
||||
|
||||
|
||||
#line 38 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||
#line 37 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||
Write(jl.TechUser.ToStringFriendly());
|
||||
|
||||
|
||||
@@ -259,7 +248,7 @@ WriteLiteral(">");
|
||||
WriteLiteral("</span>");
|
||||
|
||||
|
||||
#line 38 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||
#line 37 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||
if (canRemoveAnyLogs || (canRemoveOwnLogs && jl.TechUserId.Equals(CurrentUser.UserId, StringComparison.OrdinalIgnoreCase)))
|
||||
{
|
||||
|
||||
@@ -272,7 +261,7 @@ WriteLiteral(" class=\"remove fa fa-times-circle\"");
|
||||
WriteLiteral("></span>");
|
||||
|
||||
|
||||
#line 39 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||
#line 38 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||
}
|
||||
|
||||
#line default
|
||||
@@ -284,7 +273,7 @@ WriteLiteral(" class=\"timestamp\"");
|
||||
WriteLiteral(" data-livestamp=\"");
|
||||
|
||||
|
||||
#line 39 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||
#line 38 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||
Write(jl.Timestamp.ToUnixEpoc());
|
||||
|
||||
|
||||
@@ -292,20 +281,20 @@ WriteLiteral(" data-livestamp=\"");
|
||||
#line hidden
|
||||
WriteLiteral("\"");
|
||||
|
||||
WriteAttribute("title", Tuple.Create(" title=\"", 2481), Tuple.Create("\"", 2519)
|
||||
WriteAttribute("title", Tuple.Create(" title=\"", 2435), Tuple.Create("\"", 2473)
|
||||
|
||||
#line 39 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 2489), Tuple.Create<System.Object, System.Int32>(jl.Timestamp.ToFullDateTime()
|
||||
#line 38 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 2443), Tuple.Create<System.Object, System.Int32>(jl.Timestamp.ToFullDateTime()
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 2489), false)
|
||||
, 2443), false)
|
||||
);
|
||||
|
||||
WriteLiteral(">");
|
||||
|
||||
|
||||
#line 39 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||
#line 38 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||
Write(jl.Timestamp.ToFullDateTime());
|
||||
|
||||
|
||||
@@ -318,7 +307,7 @@ WriteLiteral(" class=\"comment\"");
|
||||
WriteLiteral(">");
|
||||
|
||||
|
||||
#line 40 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||
#line 39 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||
Write(jl.Comments.ToHtmlComment());
|
||||
|
||||
|
||||
@@ -327,7 +316,7 @@ WriteLiteral(">");
|
||||
WriteLiteral("</div>\r\n </div>\r\n");
|
||||
|
||||
|
||||
#line 42 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||
#line 41 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -336,13 +325,13 @@ WriteLiteral("</div>\r\n </div>\r\n");
|
||||
WriteLiteral(" </div>\r\n");
|
||||
|
||||
|
||||
#line 44 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||
#line 43 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 44 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||
#line 43 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||
if (canAddLogs)
|
||||
{
|
||||
|
||||
@@ -370,7 +359,7 @@ WriteLiteral(" title=\"Add Comment\"");
|
||||
WriteLiteral("></span>\r\n </div>\r\n");
|
||||
|
||||
|
||||
#line 50 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||
#line 49 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -379,7 +368,7 @@ WriteLiteral("></span>\r\n </div>\r\n");
|
||||
WriteLiteral(" </div>\r\n </td>\r\n");
|
||||
|
||||
|
||||
#line 53 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||
#line 52 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -388,7 +377,7 @@ WriteLiteral(" </div>\r\n </td>\r\n");
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 54 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||
#line 53 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||
if (canShowAttachments)
|
||||
{
|
||||
|
||||
@@ -403,34 +392,34 @@ WriteLiteral(">\r\n <div");
|
||||
|
||||
WriteLiteral(" id=\"Attachments\"");
|
||||
|
||||
WriteAttribute("class", Tuple.Create(" class=\"", 3335), Tuple.Create("\"", 3582)
|
||||
WriteAttribute("class", Tuple.Create(" class=\"", 3289), Tuple.Create("\"", 3536)
|
||||
|
||||
#line 57 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 3343), Tuple.Create<System.Object, System.Int32>(canAddAttachments ? "canAddAttachments" : "cannotAddAttachments"
|
||||
#line 56 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 3297), Tuple.Create<System.Object, System.Int32>(canAddAttachments ? "canAddAttachments" : "cannotAddAttachments"
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 3343), false)
|
||||
, 3297), false)
|
||||
|
||||
#line 57 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||
, Tuple.Create(Tuple.Create(" ", 3410), Tuple.Create<System.Object, System.Int32>(canRemoveAnyAttachments ? "canRemoveAnyAttachments" : "cannotRemoveAnyAttachments"
|
||||
#line 56 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||
, Tuple.Create(Tuple.Create(" ", 3364), Tuple.Create<System.Object, System.Int32>(canRemoveAnyAttachments ? "canRemoveAnyAttachments" : "cannotRemoveAnyAttachments"
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 3411), false)
|
||||
, 3365), false)
|
||||
|
||||
#line 57 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||
, Tuple.Create(Tuple.Create(" ", 3496), Tuple.Create<System.Object, System.Int32>(canRemoveOwnAttachments ? "canRemoveOwnAttachments" : "cannotRemoveOwnAttachments"
|
||||
#line 56 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||
, Tuple.Create(Tuple.Create(" ", 3450), Tuple.Create<System.Object, System.Int32>(canRemoveOwnAttachments ? "canRemoveOwnAttachments" : "cannotRemoveOwnAttachments"
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 3497), false)
|
||||
, 3451), false)
|
||||
);
|
||||
|
||||
WriteLiteral(" data-userid=\"");
|
||||
|
||||
|
||||
#line 57 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||
#line 56 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||
Write(CurrentUser.UserId);
|
||||
|
||||
|
||||
@@ -441,7 +430,7 @@ WriteLiteral("\"");
|
||||
WriteLiteral(" data-uploadurl=\"");
|
||||
|
||||
|
||||
#line 57 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||
#line 56 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||
Write(Url.Action(MVC.API.Job.AttachmentUpload(Model.Job.Id, null)));
|
||||
|
||||
|
||||
@@ -452,7 +441,7 @@ WriteLiteral("\"");
|
||||
WriteLiteral(" data-onlineuploadurl=\"");
|
||||
|
||||
|
||||
#line 57 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||
#line 56 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||
Write(Url.Action(MVC.API.Job.AttachmentOnlineUploadSession(Model.Job.Id)));
|
||||
|
||||
|
||||
@@ -463,7 +452,7 @@ WriteLiteral("\"");
|
||||
WriteLiteral(" data-qrcodeurl=\"");
|
||||
|
||||
|
||||
#line 57 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||
#line 56 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||
Write(Url.Content("~/ClientSource/Scripts/Modules/qrcode.min.js"));
|
||||
|
||||
|
||||
@@ -471,18 +460,18 @@ WriteLiteral(" data-qrcodeurl=\"");
|
||||
#line hidden
|
||||
WriteLiteral("\"");
|
||||
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
WriteLiteral(" data-removeurl=\"");
|
||||
|
||||
|
||||
#line 58 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||
Write(Html.AntiForgeryToken());
|
||||
#line 56 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||
Write(Url.Action(MVC.API.Job.AttachmentRemove()));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n <div");
|
||||
WriteLiteral("\"");
|
||||
|
||||
WriteLiteral(">\r\n <div");
|
||||
|
||||
WriteLiteral(" class=\"Disco-AttachmentUpload-DropTarget\"");
|
||||
|
||||
@@ -494,13 +483,13 @@ WriteLiteral(" class=\"attachmentOutput\"");
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
|
||||
#line 63 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||
#line 61 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 63 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||
#line 61 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||
foreach (var ja in Model.Job.JobAttachments.OrderByDescending(a => a.Id))
|
||||
{
|
||||
|
||||
@@ -509,20 +498,20 @@ WriteLiteral(">\r\n");
|
||||
#line hidden
|
||||
WriteLiteral(" <a");
|
||||
|
||||
WriteAttribute("href", Tuple.Create(" href=\"", 4281), Tuple.Create("\"", 4338)
|
||||
WriteAttribute("href", Tuple.Create(" href=\"", 4250), Tuple.Create("\"", 4307)
|
||||
|
||||
#line 65 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 4288), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.API.Job.AttachmentDownload(ja.Id))
|
||||
#line 63 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 4257), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.API.Job.AttachmentDownload(ja.Id))
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 4288), false)
|
||||
, 4257), false)
|
||||
);
|
||||
|
||||
WriteLiteral(" data-attachmentid=\"");
|
||||
|
||||
|
||||
#line 65 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||
#line 63 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||
Write(ja.Id);
|
||||
|
||||
|
||||
@@ -533,7 +522,7 @@ WriteLiteral("\"");
|
||||
WriteLiteral(" data-mimetype=\"");
|
||||
|
||||
|
||||
#line 65 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||
#line 63 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||
Write(ja.MimeType);
|
||||
|
||||
|
||||
@@ -545,28 +534,28 @@ WriteLiteral(">\r\n <span");
|
||||
|
||||
WriteLiteral(" class=\"icon\"");
|
||||
|
||||
WriteAttribute("title", Tuple.Create(" title=\"", 4448), Tuple.Create("\"", 4468)
|
||||
WriteAttribute("title", Tuple.Create(" title=\"", 4417), Tuple.Create("\"", 4437)
|
||||
|
||||
#line 66 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 4456), Tuple.Create<System.Object, System.Int32>(ja.Filename
|
||||
#line 64 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 4425), Tuple.Create<System.Object, System.Int32>(ja.Filename
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 4456), false)
|
||||
, 4425), false)
|
||||
);
|
||||
|
||||
WriteLiteral(">\r\n <img");
|
||||
|
||||
WriteLiteral(" alt=\"Attachment Thumbnail\"");
|
||||
|
||||
WriteAttribute("src", Tuple.Create(" src=\"", 4539), Tuple.Create("\"", 4598)
|
||||
WriteAttribute("src", Tuple.Create(" src=\"", 4508), Tuple.Create("\"", 4567)
|
||||
|
||||
#line 67 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 4545), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.API.Job.AttachmentThumbnail(ja.Id))
|
||||
#line 65 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 4514), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.API.Job.AttachmentThumbnail(ja.Id))
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 4545), false)
|
||||
, 4514), false)
|
||||
);
|
||||
|
||||
WriteLiteral(" />\r\n </span>\r\n <sp" +
|
||||
@@ -574,40 +563,40 @@ WriteLiteral(" />\r\n </span>\r\n
|
||||
|
||||
WriteLiteral(" class=\"comments\"");
|
||||
|
||||
WriteAttribute("title", Tuple.Create(" title=\"", 4699), Tuple.Create("\"", 4719)
|
||||
WriteAttribute("title", Tuple.Create(" title=\"", 4668), Tuple.Create("\"", 4688)
|
||||
|
||||
#line 69 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 4707), Tuple.Create<System.Object, System.Int32>(ja.Comments
|
||||
#line 67 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 4676), Tuple.Create<System.Object, System.Int32>(ja.Comments
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 4707), false)
|
||||
, 4676), false)
|
||||
);
|
||||
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
|
||||
#line 70 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||
#line 68 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 70 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||
#line 68 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||
if (!string.IsNullOrEmpty(ja.DocumentTemplateId))
|
||||
{
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 71 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||
#line 69 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||
Write(ja.DocumentTemplate.Description);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 71 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||
#line 69 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -615,14 +604,14 @@ WriteLiteral(">\r\n");
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 73 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||
#line 71 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||
Write(ja.Comments ?? ja.Filename);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 73 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||
#line 71 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||
}
|
||||
|
||||
#line default
|
||||
@@ -634,7 +623,7 @@ WriteLiteral(" class=\"author\"");
|
||||
WriteLiteral(">");
|
||||
|
||||
|
||||
#line 74 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||
#line 72 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||
Write(ja.TechUser.ToStringFriendly());
|
||||
|
||||
|
||||
@@ -643,7 +632,7 @@ WriteLiteral(">");
|
||||
WriteLiteral("</span>");
|
||||
|
||||
|
||||
#line 74 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||
#line 72 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||
if (canRemoveAnyAttachments || (canRemoveOwnAttachments && ja.TechUserId.Equals(CurrentUser.UserId, StringComparison.OrdinalIgnoreCase)))
|
||||
{
|
||||
|
||||
@@ -656,7 +645,7 @@ WriteLiteral(" class=\"remove fa fa-times-circle\"");
|
||||
WriteLiteral("></span>");
|
||||
|
||||
|
||||
#line 75 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||
#line 73 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||
}
|
||||
|
||||
#line default
|
||||
@@ -668,7 +657,7 @@ WriteLiteral(" class=\"timestamp\"");
|
||||
WriteLiteral(" data-livestamp=\"");
|
||||
|
||||
|
||||
#line 75 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||
#line 73 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||
Write(ja.Timestamp.ToUnixEpoc());
|
||||
|
||||
|
||||
@@ -676,20 +665,20 @@ WriteLiteral(" data-livestamp=\"");
|
||||
#line hidden
|
||||
WriteLiteral("\"");
|
||||
|
||||
WriteAttribute("title", Tuple.Create(" title=\"", 5404), Tuple.Create("\"", 5442)
|
||||
WriteAttribute("title", Tuple.Create(" title=\"", 5373), Tuple.Create("\"", 5411)
|
||||
|
||||
#line 75 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 5412), Tuple.Create<System.Object, System.Int32>(ja.Timestamp.ToFullDateTime()
|
||||
#line 73 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 5381), Tuple.Create<System.Object, System.Int32>(ja.Timestamp.ToFullDateTime()
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 5412), false)
|
||||
, 5381), false)
|
||||
);
|
||||
|
||||
WriteLiteral(">");
|
||||
|
||||
|
||||
#line 75 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||
#line 73 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||
Write(ja.Timestamp.ToFullDateTime());
|
||||
|
||||
|
||||
@@ -698,7 +687,7 @@ WriteLiteral(">");
|
||||
WriteLiteral("</span>\r\n </a>\r\n");
|
||||
|
||||
|
||||
#line 77 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||
#line 75 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -707,13 +696,13 @@ WriteLiteral("</span>\r\n </a>\r\n");
|
||||
WriteLiteral(" </div>\r\n");
|
||||
|
||||
|
||||
#line 79 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||
#line 77 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 79 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||
#line 77 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||
if (canAddAttachments)
|
||||
{
|
||||
|
||||
@@ -751,7 +740,7 @@ WriteLiteral(" title=\"Upload with Online Services\"");
|
||||
WriteLiteral("></span>\r\n </div>\r\n");
|
||||
|
||||
|
||||
#line 85 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||
#line 83 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -760,7 +749,7 @@ WriteLiteral("></span>\r\n </div>\r\n");
|
||||
WriteLiteral(" </div>\r\n </td>\r\n");
|
||||
|
||||
|
||||
#line 88 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||
#line 86 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -769,7 +758,7 @@ WriteLiteral(" </div>\r\n </td>\r\n");
|
||||
WriteLiteral(" </tr>\r\n</table>\r\n");
|
||||
|
||||
|
||||
#line 91 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||
#line 89 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||
if (canShowLogs)
|
||||
{
|
||||
|
||||
@@ -801,13 +790,13 @@ WriteLiteral(@" <script>
|
||||
");
|
||||
|
||||
|
||||
#line 115 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||
#line 113 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 115 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||
#line 113 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||
if (canAddLogs)
|
||||
{
|
||||
|
||||
@@ -827,18 +816,18 @@ WriteLiteral("\r\n //#region Add Logs\r\n\r\n const $Comme
|
||||
" $CommentInput.focus();\r\n return;\r\n " +
|
||||
" }\r\n\r\n $CommentInput.prop(\'disabled\', true);\r\n\r\n " +
|
||||
" const formData = new FormData();\r\n formData.append(\'__Reque" +
|
||||
"stVerificationToken\', $Comments.find(\'input[name=\"__RequestVerificationToken\"]\')" +
|
||||
".val());\r\n formData.append(\'comment\', comment);\r\n\r\n " +
|
||||
" const response = await fetch($Comments.attr(\'data-addurl\'), {\r\n " +
|
||||
" method: \'POST\',\r\n body: formData\r\n });\r\n\r" +
|
||||
"\n if (response.ok) {\r\n $CommentInput.val(\'\').p" +
|
||||
"rop(\'disabled\', false).focus();\r\n } else {\r\n a" +
|
||||
"lert(\'Unable to add comment: \' + response.statusText);\r\n $Com" +
|
||||
"mentInput.prop(\'disabled\', false).focus();\r\n }\r\n }\r\n\r\n" +
|
||||
" //#endregion\r\n ");
|
||||
"stVerificationToken\', document.body.dataset.antiforgery);\r\n formD" +
|
||||
"ata.append(\'comment\', comment);\r\n\r\n const response = await fetch(" +
|
||||
"$Comments.attr(\'data-addurl\'), {\r\n method: \'POST\',\r\n " +
|
||||
" body: formData\r\n });\r\n\r\n if (response.o" +
|
||||
"k) {\r\n $CommentInput.val(\'\').prop(\'disabled\', false).focus();" +
|
||||
"\r\n } else {\r\n alert(\'Unable to add comment: \' " +
|
||||
"+ response.statusText);\r\n $CommentInput.prop(\'disabled\', fals" +
|
||||
"e).focus();\r\n }\r\n }\r\n\r\n //#endregion\r\n " +
|
||||
" ");
|
||||
|
||||
|
||||
#line 163 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||
#line 161 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -847,7 +836,7 @@ WriteLiteral("\r\n //#region Add Logs\r\n\r\n const $Comme
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 164 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||
#line 162 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||
if (canRemoveAnyLogs || canRemoveOwnLogs)
|
||||
{
|
||||
|
||||
@@ -862,7 +851,7 @@ WriteLiteral(@"
|
||||
|
||||
async function removeComment(commentId) {
|
||||
const formData = new FormData();
|
||||
formData.append('__RequestVerificationToken', $Comments.find('input[name=""__RequestVerificationToken""]').val());
|
||||
formData.append('__RequestVerificationToken', document.body.dataset.antiforgery);
|
||||
formData.append('id', commentId);
|
||||
|
||||
const response = await fetch($Comments.attr('data-removeurl'), {
|
||||
@@ -920,7 +909,7 @@ WriteLiteral(@"></i> Are you sure?</p></div>')
|
||||
");
|
||||
|
||||
|
||||
#line 219 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||
#line 217 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -928,50 +917,50 @@ WriteLiteral(@"></i> Are you sure?</p></div>')
|
||||
#line hidden
|
||||
WriteLiteral("\r\n async function loadLiveComment(id) {\r\n\r\n const formD" +
|
||||
"ata = new FormData();\r\n formData.append(\'__RequestVerificationTok" +
|
||||
"en\', $Comments.find(\'input[name=\"__RequestVerificationToken\"]\').val());\r\n " +
|
||||
" formData.append(\'id\', id);\r\n\r\n const response = await fe" +
|
||||
"tch($Comments.attr(\'data-geturl\'), {\r\n method: \'POST\',\r\n " +
|
||||
" body: formData\r\n });\r\n\r\n if (!respo" +
|
||||
"nse.ok) {\r\n alert(\'Unable to load live comment \' + id + \': \' " +
|
||||
"+ response.statusText);\r\n } else {\r\n const com" +
|
||||
"ment = await response.json();\r\n\r\n if ($Comments.hasClass(\'can" +
|
||||
"RemoveAnyLogs\'))\r\n addComment(comment, false, true);\r\n " +
|
||||
" else if ($Comments.hasClass(\'canRemoveOwnLogs\'))\r\n " +
|
||||
" addComment(comment, false, (comment.AuthorId === $Comments.attr(\'data" +
|
||||
"-userid\')));\r\n else\r\n addComment(comme" +
|
||||
"nt, false, false);\r\n }\r\n }\r\n function liveR" +
|
||||
"emoveComment(id) {\r\n $CommentOutput.children(\'div[data-logid=\"\' +" +
|
||||
" id + \'\"]\').slideUp(300).delay(300).queue(function () {\r\n con" +
|
||||
"st $this = $(this);\r\n $this.find(\'.timestamp\').livestamp(\'des" +
|
||||
"troy\');\r\n $this.remove();\r\n });\r\n }" +
|
||||
"\r\n function addComment(c, quick, canRemove) {\r\n let t " +
|
||||
"= \'<div><span class=\"author\" />\';\r\n if (canRemove)\r\n " +
|
||||
" t += \'<span class=\"remove fa fa-times-circle\" />\';\r\n t += " +
|
||||
"\'<span class=\"timestamp\" /><div class=\"comment\" /></div>\';\r\n\r\n co" +
|
||||
"nst e = $(t);\r\n e.attr(\'data-logid\', c.Id);\r\n e.fi" +
|
||||
"nd(\'.author\').text(c.Author);\r\n e.find(\'.timestamp\').text(c.Times" +
|
||||
"tampFull).attr(\'title\', c.TimestampFull).livestamp(c.TimestampUnixEpoc);\r\n " +
|
||||
" e.find(\'.comment\').html(c.HtmlComments);\r\n\r\n $CommentOu" +
|
||||
"tput.append(e);\r\n\r\n if (!quick) {\r\n e.animate(" +
|
||||
"{ backgroundColor: \'#ffff99\' }, 500, function () {\r\n e.an" +
|
||||
"imate({ backgroundColor: \'#fafafa\' }, 500, function () {\r\n " +
|
||||
" e.css(\'background-color\', \'\');\r\n });\r\n " +
|
||||
" });\r\n $CommentOutput.animate({ scrollTop: $CommentOutp" +
|
||||
"ut[0].scrollHeight }, 250)\r\n }\r\n }\r\n\r\n // A" +
|
||||
"dd Globally Available Functions\r\n document.DiscoFunctions.liveLoadCom" +
|
||||
"ment = function (id) {\r\n loadLiveComment(id);\r\n };\r\n " +
|
||||
" document.DiscoFunctions.liveRemoveComment = liveRemoveComment;\r\n " +
|
||||
" //#endregion\r\n });\r\n </script>\r\n");
|
||||
"en\', document.body.dataset.antiforgery);\r\n formData.append(\'id\', " +
|
||||
"id);\r\n\r\n const response = await fetch($Comments.attr(\'data-geturl" +
|
||||
"\'), {\r\n method: \'POST\',\r\n body: formData\r\n" +
|
||||
" });\r\n\r\n if (!response.ok) {\r\n " +
|
||||
"alert(\'Unable to load live comment \' + id + \': \' + response.statusText);\r\n " +
|
||||
" } else {\r\n const comment = await response.json();\r\n" +
|
||||
"\r\n if ($Comments.hasClass(\'canRemoveAnyLogs\'))\r\n " +
|
||||
" addComment(comment, false, true);\r\n else if ($Comm" +
|
||||
"ents.hasClass(\'canRemoveOwnLogs\'))\r\n addComment(comment, " +
|
||||
"false, (comment.AuthorId === $Comments.attr(\'data-userid\')));\r\n " +
|
||||
" else\r\n addComment(comment, false, false);\r\n " +
|
||||
" }\r\n }\r\n function liveRemoveComment(id) {\r\n " +
|
||||
" $CommentOutput.children(\'div[data-logid=\"\' + id + \'\"]\').slideUp(300).delay(" +
|
||||
"300).queue(function () {\r\n const $this = $(this);\r\n " +
|
||||
" $this.find(\'.timestamp\').livestamp(\'destroy\');\r\n $t" +
|
||||
"his.remove();\r\n });\r\n }\r\n function addComme" +
|
||||
"nt(c, quick, canRemove) {\r\n let t = \'<div><span class=\"author\" />" +
|
||||
"\';\r\n if (canRemove)\r\n t += \'<span class=\"remov" +
|
||||
"e fa fa-times-circle\" />\';\r\n t += \'<span class=\"timestamp\" /><div" +
|
||||
" class=\"comment\" /></div>\';\r\n\r\n const e = $(t);\r\n " +
|
||||
"e.attr(\'data-logid\', c.Id);\r\n e.find(\'.author\').text(c.Author);\r\n" +
|
||||
" e.find(\'.timestamp\').text(c.TimestampFull).attr(\'title\', c.Times" +
|
||||
"tampFull).livestamp(c.TimestampUnixEpoc);\r\n e.find(\'.comment\').ht" +
|
||||
"ml(c.HtmlComments);\r\n\r\n $CommentOutput.append(e);\r\n\r\n " +
|
||||
" if (!quick) {\r\n e.animate({ backgroundColor: \'#ffff99\' }," +
|
||||
" 500, function () {\r\n e.animate({ backgroundColor: \'#fafa" +
|
||||
"fa\' }, 500, function () {\r\n e.css(\'background-color\'," +
|
||||
" \'\');\r\n });\r\n });\r\n " +
|
||||
" $CommentOutput.animate({ scrollTop: $CommentOutput[0].scrollHeight }, 250)\r\n " +
|
||||
" }\r\n }\r\n\r\n // Add Globally Available Functions" +
|
||||
"\r\n document.DiscoFunctions.liveLoadComment = function (id) {\r\n " +
|
||||
" loadLiveComment(id);\r\n };\r\n document.DiscoFunctio" +
|
||||
"ns.liveRemoveComment = liveRemoveComment;\r\n //#endregion\r\n });" +
|
||||
"\r\n </script>\r\n");
|
||||
|
||||
|
||||
#line 284 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||
#line 282 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 285 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||
#line 283 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||
if (canShowAttachments)
|
||||
{
|
||||
|
||||
@@ -992,7 +981,7 @@ WriteLiteral(@" <script>
|
||||
var jobId = parseInt('");
|
||||
|
||||
|
||||
#line 298 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||
#line 296 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||
Write(Model.Job.Id);
|
||||
|
||||
|
||||
@@ -1003,13 +992,13 @@ WriteLiteral("\');\r\n\r\n //#region Attachments\r\n var $
|
||||
"tput\');\r\n\r\n");
|
||||
|
||||
|
||||
#line 304 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||
#line 302 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 304 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||
#line 302 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||
if (canAddAttachments)
|
||||
{
|
||||
|
||||
@@ -1048,7 +1037,7 @@ WriteLiteral("\r\n //#region Add Attachments\r\n var attac
|
||||
" ");
|
||||
|
||||
|
||||
#line 351 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||
#line 349 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -1057,13 +1046,13 @@ WriteLiteral("\r\n //#region Add Attachments\r\n var attac
|
||||
WriteLiteral("\r\n");
|
||||
|
||||
|
||||
#line 353 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||
#line 351 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 353 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||
#line 351 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||
if (canRemoveAnyAttachments || canRemoveOwnAttachments)
|
||||
{
|
||||
|
||||
@@ -1079,8 +1068,6 @@ WriteLiteral(@"
|
||||
function removeLocalAttachment() {
|
||||
$this = $(this).closest('a');
|
||||
|
||||
var data = { id: $this.attr('data-attachmentid') };
|
||||
|
||||
if (!$dialogRemoveAttachment) {
|
||||
$dialogRemoveAttachment = $('<div");
|
||||
|
||||
@@ -1092,58 +1079,30 @@ WriteLiteral("><p><i");
|
||||
|
||||
WriteLiteral(" class=\"fa fa-exclamation-triangle fa-lg\"");
|
||||
|
||||
WriteLiteral(@"></i> Are you sure?</p></div>')
|
||||
.appendTo(document.body)
|
||||
.dialog({
|
||||
resizable: false,
|
||||
height: 140,
|
||||
modal: true,
|
||||
autoOpen: false
|
||||
});
|
||||
}
|
||||
|
||||
$dialogRemoveAttachment.dialog(""enable"").dialog('option', 'buttons', {
|
||||
""Remove"": function () {
|
||||
$dialogRemoveAttachment.dialog(""disable"");
|
||||
$dialogRemoveAttachment.dialog(""option"", ""buttons"", null);
|
||||
$.ajax({
|
||||
url: '");
|
||||
|
||||
|
||||
#line 382 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||
Write(Url.Action(MVC.API.Job.AttachmentRemove()));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(@"',
|
||||
dataType: 'json',
|
||||
data: data,
|
||||
success: function (d) {
|
||||
if (d == 'OK') {
|
||||
// Should be removed via Repository Notifications
|
||||
} 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"");
|
||||
}
|
||||
}).dialog('open');
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
//#endregion
|
||||
|
||||
");
|
||||
WriteLiteral("></i> Are you sure?</p></div>\')\r\n .appendTo(document." +
|
||||
"body)\r\n .dialog({\r\n resizable:" +
|
||||
" false,\r\n height: 140,\r\n m" +
|
||||
"odal: true,\r\n autoOpen: false\r\n " +
|
||||
" });\r\n }\r\n\r\n async function removeAttachmentAsync" +
|
||||
"(id) {\r\n const body = new FormData();\r\n bo" +
|
||||
"dy.append(\'__RequestVerificationToken\', document.body.dataset.antiforgery);\r\n " +
|
||||
" body.append(\'id\', id);\r\n\r\n try {\r\n " +
|
||||
" const response = await fetch($Attachments.attr(\'data-removeurl\'), " +
|
||||
"{\r\n body: body,\r\n method: " +
|
||||
"\'POST\'\r\n });\r\n if (!response.ok) {" +
|
||||
"\r\n alert(\'Unable to remove attachment: \' + response.s" +
|
||||
"tatusText);\r\n }\r\n $dialogRemoveAtt" +
|
||||
"achment.dialog(\"close\");\r\n } catch (e) {\r\n " +
|
||||
" alert(\'Unable to remove attachment: \' + e);\r\n $dialo" +
|
||||
"gRemoveAttachment.dialog(\"close\");\r\n }\r\n }\r\n\r\n" +
|
||||
" const attachmentId = $this.attr(\'data-attachmentid\');\r\n " +
|
||||
" $dialogRemoveAttachment.dialog(\'option\', \'buttons\', {\r\n " +
|
||||
" \"Remove\": function () {\r\n $dialogRemoveAttachment.dialo" +
|
||||
"g(\"option\", \"buttons\", null);\r\n removeAttachmentAsync(att" +
|
||||
"achmentId);\r\n },\r\n Cancel: function () {\r\n" +
|
||||
" $dialogRemoveAttachment.dialog(\"close\");\r\n " +
|
||||
" }\r\n }).dialog(\'open\');\r\n\r\n return false;\r\n " +
|
||||
" }\r\n\r\n //#endregion\r\n\r\n ");
|
||||
|
||||
|
||||
#line 409 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||
|
||||
@@ -117,13 +117,14 @@
|
||||
</table>
|
||||
@if (Authorization.Has(Claims.Job.Actions.UpdateSubTypes))
|
||||
{
|
||||
<div id="Job_Show_Job_SubTypes_Update_Dialog" title="Update Job Types">
|
||||
<div id="Job_Show_Job_SubTypes_Update_Dialog" class="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" }))
|
||||
{
|
||||
@Html.AntiForgeryToken()
|
||||
@CommonHelpers.CheckBoxList("SubTypes", Model.UpdatableJobSubTypes.ToSelectListItems(Model.Job.JobSubTypes.ToList()), 3)
|
||||
<hr />
|
||||
<div>
|
||||
@@ -311,7 +312,7 @@
|
||||
<tr>
|
||||
<td>Location:</td>
|
||||
<td>
|
||||
<span id="Job_Show_Device_DeviceHeld_Location">
|
||||
<span id="Job_Show_Device_DeviceHeld_Location" data-locationsurl="@Url.Action(MVC.API.Job.DeviceHeldLocations())" data-updateurl="@Url.Action(MVC.API.Job.UpdateDeviceHeldLocation(Model.Job.Id, null))">
|
||||
@if (canEditLocation)
|
||||
{
|
||||
switch (Model.LocationMode)
|
||||
@@ -371,9 +372,10 @@
|
||||
case LocationModes.Unrestricted:
|
||||
case LocationModes.OptionalList:
|
||||
<text>
|
||||
var $deviceHeldLocation = $('#Job_DeviceHeldLocation');
|
||||
var $ajaxSave = $deviceHeldLocation.next('.ajaxSave');
|
||||
var autocompleteLoaded = false;
|
||||
const $deviceHeldLocationContainer = $('#Job_Show_Device_DeviceHeld_Location');
|
||||
const $deviceHeldLocation = $('#Job_DeviceHeldLocation');
|
||||
const $ajaxSave = $deviceHeldLocation.next('.ajaxSave');
|
||||
let autocompleteLoaded = false;
|
||||
|
||||
$deviceHeldLocation
|
||||
.watermark('Unknown')
|
||||
@@ -381,41 +383,46 @@
|
||||
$deviceHeldLocation.select();
|
||||
|
||||
// Load AutoComplete
|
||||
if (!autocompleteLoaded){
|
||||
$.ajax({
|
||||
url: '@(Url.Action(MVC.API.Job.DeviceHeldLocations()))',
|
||||
dataType: 'json',
|
||||
success: function (d) {
|
||||
if (!autocompleteLoaded) {
|
||||
|
||||
$.each(d, function(){
|
||||
this.value = this.Location;
|
||||
this.label = this.Location;
|
||||
});
|
||||
const body = new FormData();
|
||||
body.append('__RequestVerificationToken', document.body.dataset.antiforgery);
|
||||
fetch($deviceHeldLocationContainer.attr('data-locationsurl'), {
|
||||
method: 'POST',
|
||||
body: body
|
||||
}).then(r => {
|
||||
if (r.ok) {
|
||||
r.json().then(d => {
|
||||
$.each(d, function () {
|
||||
this.value = this.Location;
|
||||
this.label = this.Location;
|
||||
});
|
||||
|
||||
$deviceHeldLocation.autocomplete({
|
||||
source: d,
|
||||
minLength: 0,
|
||||
focus: function(e, ui){
|
||||
return false;
|
||||
},
|
||||
select: function (e, ui) {
|
||||
$deviceHeldLocation.val(ui.item.Location).blur().change();
|
||||
return false;
|
||||
}
|
||||
}).data('ui-autocomplete')._renderItem = function (ul, item) {
|
||||
var anchor = $('<a>').append($('<strong>').text(item.Location));
|
||||
if (item.References){
|
||||
anchor.append(document.createTextNode(' ['+item.References+']'));
|
||||
}
|
||||
var item = $("<li></li>")
|
||||
.data("item.autocomplete", item)
|
||||
.append(anchor);
|
||||
return item.appendTo(ul);
|
||||
};
|
||||
$deviceHeldLocation.autocomplete({
|
||||
source: d,
|
||||
minLength: 0,
|
||||
focus: function (e, ui) {
|
||||
return false;
|
||||
},
|
||||
select: function (e, ui) {
|
||||
$deviceHeldLocation.val(ui.item.Location).blur().change();
|
||||
return false;
|
||||
}
|
||||
}).data('ui-autocomplete')._renderItem = function (ul, item) {
|
||||
var anchor = $('<a>').append($('<strong>').text(item.Location));
|
||||
if (item.References) {
|
||||
anchor.append(document.createTextNode(' [' + item.References + ']'));
|
||||
}
|
||||
var item = $("<li></li>")
|
||||
.data("item.autocomplete", item)
|
||||
.append(anchor);
|
||||
return item.appendTo(ul);
|
||||
};
|
||||
|
||||
$deviceHeldLocation.autocomplete('search', '');
|
||||
$deviceHeldLocation.autocomplete('search', '');
|
||||
})
|
||||
}
|
||||
});
|
||||
})
|
||||
autocompleteLoaded = true;
|
||||
}else{
|
||||
$deviceHeldLocation.autocomplete('search', '');
|
||||
@@ -432,23 +439,23 @@
|
||||
.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);
|
||||
|
||||
const body = new FormData();
|
||||
body.append('__RequestVerificationToken', document.body.dataset.antiforgery);
|
||||
body.append('DeviceHeldLocation', $deviceHeldLocation.val());
|
||||
fetch($deviceHeldLocationContainer.attr('data-updateurl'), {
|
||||
method: 'POST',
|
||||
body: body
|
||||
}).then(r => {
|
||||
if (r.ok) {
|
||||
$ajaxLoading.hide().next('.ajaxOk').show().delay('fast').fadeOut('slow');
|
||||
} else {
|
||||
$ajaxLoading.hide();
|
||||
alert('Unable to update device held location: ' + r.statusText);
|
||||
}
|
||||
}).catch(e => {
|
||||
alert('Unable to update device held location: ' + e.textStatus);
|
||||
$ajaxLoading.hide();
|
||||
});
|
||||
});
|
||||
</text>
|
||||
@@ -606,6 +613,7 @@
|
||||
</div>
|
||||
@using (Html.BeginForm(MVC.API.Job.ForceClose(Model.Job.Id, null, true)))
|
||||
{
|
||||
@Html.AntiForgeryToken()
|
||||
<h3>Reason:</h3>
|
||||
<p>
|
||||
<textarea name="Reason" class="block"></textarea>
|
||||
@@ -648,18 +656,21 @@
|
||||
|
||||
@if (Model.Job.CanCloseNormally())
|
||||
{
|
||||
@Html.ActionLinkSmallButton("Close", MVC.API.Job.Close(Model.Job.Id, true), "Job_Show_Job_Actions_Close_Button")
|
||||
<button type="button" id="Job_Show_Job_Actions_Close_Button" class="button small">Close</button>
|
||||
<div id="Job_Show_Job_Actions_Close_Dialog" class="dialog" title="Close this Job?">
|
||||
@using (Html.BeginForm(MVC.API.Job.Close(Model.Job.Id, true)))
|
||||
{
|
||||
@Html.AntiForgeryToken()
|
||||
}
|
||||
<p>
|
||||
<i class="fa fa-exclamation-triangle fa-lg"></i> 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 () {
|
||||
const button = $('#Job_Show_Job_Actions_Close_Button');
|
||||
let buttonDialog = null;
|
||||
button.on('click', function () {
|
||||
if (!buttonDialog) {
|
||||
buttonDialog = $('#Job_Show_Job_Actions_Close_Dialog');
|
||||
buttonDialog.dialog({
|
||||
@@ -668,10 +679,9 @@
|
||||
autoOpen: false,
|
||||
buttons: {
|
||||
"Close Job": function () {
|
||||
var $this = $(this);
|
||||
$this.dialog("disable");
|
||||
$this.dialog("option", "buttons", null);
|
||||
window.location.href = buttonLink;
|
||||
$(this)
|
||||
.dialog("option", "buttons", null)
|
||||
.find('form').trigger('submit');
|
||||
},
|
||||
Cancel: function () {
|
||||
$(this).dialog("close");
|
||||
@@ -688,18 +698,20 @@
|
||||
}
|
||||
@if (Model.Job.CanReopen())
|
||||
{
|
||||
@Html.ActionLinkSmallButton("Reopen Job", MVC.API.Job.Reopen(Model.Job.Id, true), "Job_Show_Job_Actions_Reopen_Button")
|
||||
<button id="Job_Show_Job_Actions_Reopen_Button" type="button" class="button small">Reopen Job</button>
|
||||
<div id="Job_Show_Job_Actions_Reopen_Dialog" class="dialog" title="Reopen this Job?">
|
||||
@using (Html.BeginForm(MVC.API.Job.Reopen(Model.Job.Id, true)))
|
||||
{
|
||||
@Html.AntiForgeryToken()
|
||||
}
|
||||
<p>
|
||||
<i class="fa fa-exclamation-triangle fa-lg"></i> 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', '#');
|
||||
const button = $('#Job_Show_Job_Actions_Reopen_Button');
|
||||
let buttonDialog = null;
|
||||
button.click(function () {
|
||||
if (!buttonDialog) {
|
||||
buttonDialog = $('#Job_Show_Job_Actions_Reopen_Dialog');
|
||||
@@ -709,10 +721,9 @@
|
||||
autoOpen: false,
|
||||
buttons: {
|
||||
"Reopen": function () {
|
||||
var $this = $(this);
|
||||
$this.dialog("disable");
|
||||
$this.dialog("option", "buttons", null);
|
||||
window.location.href = buttonLink;
|
||||
$(this)
|
||||
.dialog("option", "buttons", null)
|
||||
.find('form').trigger('submit');
|
||||
},
|
||||
Cancel: function () {
|
||||
$(this).dialog("close");
|
||||
@@ -729,18 +740,20 @@
|
||||
}
|
||||
@if (Model.Job.CanDelete())
|
||||
{
|
||||
@Html.ActionLinkSmallButton("Delete", MVC.API.Job.Delete(Model.Job.Id, true), "Job_Show_Job_Actions_Delete_Button")
|
||||
<button id="Job_Show_Job_Actions_Delete_Button" type="button" class="button small">Delete</button>
|
||||
<div id="Job_Show_Job_Actions_Delete_Dialog" class="dialog" title="Delete this Job?">
|
||||
@using (Html.BeginForm(MVC.API.Job.Delete(Model.Job.Id, true)))
|
||||
{
|
||||
@Html.AntiForgeryToken()
|
||||
}
|
||||
<p>
|
||||
<i class="fa fa-exclamation-triangle fa-lg"></i> 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', '#');
|
||||
const button = $('#Job_Show_Job_Actions_Delete_Button');
|
||||
let buttonDialog = null;
|
||||
button.click(function () {
|
||||
if (!buttonDialog) {
|
||||
buttonDialog = $('#Job_Show_Job_Actions_Delete_Dialog');
|
||||
@@ -750,10 +763,9 @@
|
||||
autoOpen: false,
|
||||
buttons: {
|
||||
"Delete": function () {
|
||||
var $this = $(this);
|
||||
$this.dialog("disable");
|
||||
$this.dialog("option", "buttons", null);
|
||||
window.location.href = buttonLink;
|
||||
$(this)
|
||||
.dialog("option", "buttons", null)
|
||||
.find('form').trigger('submit');
|
||||
},
|
||||
Cancel: function () {
|
||||
$(this).dialog("close");
|
||||
@@ -780,6 +792,7 @@
|
||||
<div id="Job_Show_Job_Actions_AddQueue_Dialog" class="dialog" title="Add Job to Queue">
|
||||
@using (Html.BeginForm(MVC.API.JobQueueJob.AddJob()))
|
||||
{
|
||||
@Html.AntiForgeryToken()
|
||||
<input id="Job_Show_Job_Actions_AddQueue_Dialog_Id" type="hidden" name="id" />
|
||||
<input id="Job_Show_Job_Actions_AddQueue_Dialog_JobId" type="hidden" name="JobId" value="@Model.Job.Id" />
|
||||
<div class="queuePicker">
|
||||
@@ -853,10 +866,9 @@
|
||||
},
|
||||
"Add to Queue": function () {
|
||||
if (!!queueId.val()) {
|
||||
var $this = $(this);
|
||||
$this.dialog("disable");
|
||||
$this.dialog("option", "buttons", null);
|
||||
buttonDialog.find('form').submit();
|
||||
$(this)
|
||||
.dialog("option", "buttons", null)
|
||||
.find('form').trigger('submit');
|
||||
} else {
|
||||
alert('Select a Job Queue');
|
||||
}
|
||||
@@ -906,8 +918,12 @@
|
||||
}
|
||||
@if (Model.Job.CanConvertHWarToHNWar())
|
||||
{
|
||||
@Html.ActionLinkSmallButton("Convert to Non-Warranty", MVC.API.Job.ConvertHWarToHNWar(Model.Job.Id, true), "Job_Show_Job_Actions_ConvertToHNWar_Button")
|
||||
<button id="Job_Show_Job_Actions_ConvertToHNWar_Button" type="button" class="button small">Convert to Non-Warranty</button>
|
||||
<div id="Job_Show_Job_Actions_ConvertToHNWar_Dialog" class="dialog" title="Convert this Job?">
|
||||
@using (Html.BeginForm(MVC.API.Job.ConvertHWarToHNWar(Model.Job.Id, true)))
|
||||
{
|
||||
@Html.AntiForgeryToken()
|
||||
}
|
||||
<p>
|
||||
<i class="fa fa-exclamation-triangle fa-lg"></i> This process is not reversible.<br />
|
||||
Are you sure?
|
||||
@@ -915,10 +931,8 @@
|
||||
</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', '#');
|
||||
const button = $('#Job_Show_Job_Actions_ConvertToHNWar_Button');
|
||||
let buttonDialog = null;
|
||||
button.click(function () {
|
||||
if (!buttonDialog) {
|
||||
buttonDialog = $('#Job_Show_Job_Actions_ConvertToHNWar_Dialog');
|
||||
@@ -928,10 +942,9 @@
|
||||
autoOpen: false,
|
||||
buttons: {
|
||||
"Convert": function () {
|
||||
var $this = $(this);
|
||||
$this.dialog("disable");
|
||||
$this.dialog("option", "buttons", null);
|
||||
window.location.href = buttonLink;
|
||||
$(this)
|
||||
.dialog("option", "buttons", null)
|
||||
.find('form').trigger('submit');
|
||||
},
|
||||
Cancel: function () {
|
||||
$(this).dialog("close");
|
||||
@@ -953,15 +966,27 @@
|
||||
<td id="Job_Show_Device_Actions">
|
||||
@if (Model.Job.CanDeviceHeld())
|
||||
{
|
||||
@Html.ActionLinkSmallButton("Device Held", MVC.API.Job.DeviceHeld(Model.Job.Id, true), "Job_Show_Device_Actions_Held_Button")
|
||||
using (Html.BeginForm(MVC.API.Job.DeviceHeld(Model.Job.Id, true)))
|
||||
{
|
||||
@Html.AntiForgeryToken()
|
||||
<button id="Job_Show_Device_Actions_Held_Button" type="submit" class="button small">Device Held</button>
|
||||
}
|
||||
}
|
||||
@if (Model.Job.CanDeviceReadyForReturn())
|
||||
{
|
||||
@Html.ActionLinkSmallButton("Device Ready For Return", MVC.API.Job.DeviceReadyForReturn(Model.Job.Id, true), "Job_Show_Device_Actions_DeviceReadyForReturn_Button", "alert")
|
||||
using (Html.BeginForm(MVC.API.Job.DeviceReadyForReturn(Model.Job.Id, true)))
|
||||
{
|
||||
@Html.AntiForgeryToken()
|
||||
<button id="Job_Show_Device_Actions_DeviceReadyForReturn_Button" type="submit" class="button small alert">Device Ready For Return</button>
|
||||
}
|
||||
}
|
||||
@if (Model.Job.CanDeviceReturned())
|
||||
{
|
||||
@Html.ActionLinkSmallButton("Device Returned", MVC.API.Job.DeviceReturned(Model.Job.Id, true), "Job_Show_Device_Actions_DeviceReturned_Button", Model.Job.CanDeviceReadyForReturn() ? null : "alert")
|
||||
using (Html.BeginForm(MVC.API.Job.DeviceReturned(Model.Job.Id, true)))
|
||||
{
|
||||
@Html.AntiForgeryToken()
|
||||
<button id="Job_Show_Device_Actions_DeviceReturned_Button" type="submit" class="button small @(Model.Job.CanDeviceReadyForReturn() ? null : "alert")">Device Returned</button>
|
||||
}
|
||||
}
|
||||
</td>
|
||||
}
|
||||
@@ -976,6 +1001,7 @@
|
||||
<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)))
|
||||
{
|
||||
@Html.AntiForgeryToken()
|
||||
<h3>Reason:</h3>
|
||||
<p>
|
||||
<textarea name="Reason" class="block"></textarea>
|
||||
@@ -1020,6 +1046,7 @@
|
||||
<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)))
|
||||
{
|
||||
@Html.AntiForgeryToken()
|
||||
<h3>Resolution:</h3>
|
||||
<p>
|
||||
<textarea name="Resolution" class="block"></textarea>
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -4,7 +4,7 @@
|
||||
|
||||
ViewBag.Title = Html.ToBreadcrumb("Jobs", MVC.Job.Index(), string.Format("Job: {0}", Model.Job.Id), MVC.Job.Show(Model.Job.Id), "Lodge Insurance Claim");
|
||||
}
|
||||
@using (Html.BeginForm(MVC.Job.LogInsurance(), FormMethod.Post))
|
||||
@using (Html.BeginForm(MVC.Job.LogInsurance()))
|
||||
{
|
||||
@Html.AntiForgeryToken()
|
||||
@Html.ValidationSummary(true)
|
||||
@@ -172,7 +172,7 @@
|
||||
).append(
|
||||
$('<input>').attr({ type: 'hidden', name: 'ManualProviderReference', value: $('#ManualProviderReference').val() })
|
||||
).append(
|
||||
$('<input>').attr({ type: 'hidden', name: '__RequestVerificationToken', value: $providerId.closest('form').find('input[name="__RequestVerificationToken"]').val() })
|
||||
$('<input>').attr({ type: 'hidden', name: '__RequestVerificationToken', value: document.body.dataset.antiforgery })
|
||||
).appendTo('body').submit();
|
||||
}
|
||||
|
||||
|
||||
@@ -57,7 +57,7 @@ WriteLiteral("\r\n");
|
||||
|
||||
|
||||
#line 7 "..\..\Views\Job\LogInsurance.cshtml"
|
||||
using (Html.BeginForm(MVC.Job.LogInsurance(), FormMethod.Post))
|
||||
using (Html.BeginForm(MVC.Job.LogInsurance()))
|
||||
{
|
||||
|
||||
|
||||
@@ -125,14 +125,14 @@ WriteLiteral(" type=\"hidden\"");
|
||||
|
||||
WriteLiteral(" name=\"SubmissionAction\"");
|
||||
|
||||
WriteAttribute("value", Tuple.Create(" value=\"", 610), Tuple.Create("\"", 667)
|
||||
WriteAttribute("value", Tuple.Create(" value=\"", 593), Tuple.Create("\"", 650)
|
||||
|
||||
#line 13 "..\..\Views\Job\LogInsurance.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 618), Tuple.Create<System.Object, System.Int32>(Model.IsManualProvider ? "Manual" : "Disclose"
|
||||
, Tuple.Create(Tuple.Create("", 601), Tuple.Create<System.Object, System.Int32>(Model.IsManualProvider ? "Manual" : "Disclose"
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 618), false)
|
||||
, 601), false)
|
||||
);
|
||||
|
||||
WriteLiteral(" />\r\n");
|
||||
@@ -389,14 +389,14 @@ WriteLiteral(" class=\"fa fa-info-circle\"");
|
||||
|
||||
WriteLiteral("></i>View the <a");
|
||||
|
||||
WriteAttribute("href", Tuple.Create(" href=\"", 3387), Tuple.Create("\"", 3437)
|
||||
WriteAttribute("href", Tuple.Create(" href=\"", 3370), Tuple.Create("\"", 3420)
|
||||
|
||||
#line 79 "..\..\Views\Job\LogInsurance.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 3394), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.Config.Plugins.Install())
|
||||
, Tuple.Create(Tuple.Create("", 3377), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.Config.Plugins.Install())
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 3394), false)
|
||||
, 3377), false)
|
||||
);
|
||||
|
||||
WriteLiteral(">Plugin Catalogue</a> to discover and install provider plugins.\r\n " +
|
||||
@@ -537,14 +537,14 @@ WriteLiteral(">\r\n");
|
||||
#line hidden
|
||||
WriteLiteral(" <a");
|
||||
|
||||
WriteAttribute("href", Tuple.Create(" href=\"", 5023), Tuple.Create("\"", 5080)
|
||||
WriteAttribute("href", Tuple.Create(" href=\"", 5006), Tuple.Create("\"", 5063)
|
||||
|
||||
#line 117 "..\..\Views\Job\LogInsurance.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 5030), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.API.Job.AttachmentDownload(ja.Id))
|
||||
, Tuple.Create(Tuple.Create("", 5013), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.API.Job.AttachmentDownload(ja.Id))
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 5030), false)
|
||||
, 5013), false)
|
||||
);
|
||||
|
||||
WriteLiteral(" data-attachmentid=\"");
|
||||
@@ -577,14 +577,14 @@ WriteLiteral(" class=\"select\"");
|
||||
|
||||
WriteLiteral(" name=\"AttachmentIds\"");
|
||||
|
||||
WriteAttribute("value", Tuple.Create(" value=\"", 5230), Tuple.Create("\"", 5244)
|
||||
WriteAttribute("value", Tuple.Create(" value=\"", 5213), Tuple.Create("\"", 5227)
|
||||
|
||||
#line 118 "..\..\Views\Job\LogInsurance.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 5238), Tuple.Create<System.Object, System.Int32>(ja.Id
|
||||
, Tuple.Create(Tuple.Create("", 5221), Tuple.Create<System.Object, System.Int32>(ja.Id
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 5238), false)
|
||||
, 5221), false)
|
||||
);
|
||||
|
||||
WriteLiteral(" ");
|
||||
@@ -600,28 +600,28 @@ WriteLiteral(" />\r\n <span");
|
||||
|
||||
WriteLiteral(" class=\"icon\"");
|
||||
|
||||
WriteAttribute("title", Tuple.Create(" title=\"", 5358), Tuple.Create("\"", 5378)
|
||||
WriteAttribute("title", Tuple.Create(" title=\"", 5341), Tuple.Create("\"", 5361)
|
||||
|
||||
#line 119 "..\..\Views\Job\LogInsurance.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 5366), Tuple.Create<System.Object, System.Int32>(ja.Filename
|
||||
, Tuple.Create(Tuple.Create("", 5349), Tuple.Create<System.Object, System.Int32>(ja.Filename
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 5366), false)
|
||||
, 5349), false)
|
||||
);
|
||||
|
||||
WriteLiteral(">\r\n <img");
|
||||
|
||||
WriteLiteral(" alt=\"Attachment Thumbnail\"");
|
||||
|
||||
WriteAttribute("src", Tuple.Create(" src=\"", 5449), Tuple.Create("\"", 5508)
|
||||
WriteAttribute("src", Tuple.Create(" src=\"", 5432), Tuple.Create("\"", 5491)
|
||||
|
||||
#line 120 "..\..\Views\Job\LogInsurance.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 5455), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.API.Job.AttachmentThumbnail(ja.Id))
|
||||
, Tuple.Create(Tuple.Create("", 5438), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.API.Job.AttachmentThumbnail(ja.Id))
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 5455), false)
|
||||
, 5438), false)
|
||||
);
|
||||
|
||||
WriteLiteral(" />\r\n </span>\r\n <sp" +
|
||||
@@ -629,14 +629,14 @@ WriteLiteral(" />\r\n </span>\r\n
|
||||
|
||||
WriteLiteral(" class=\"comments\"");
|
||||
|
||||
WriteAttribute("title", Tuple.Create(" title=\"", 5609), Tuple.Create("\"", 5629)
|
||||
WriteAttribute("title", Tuple.Create(" title=\"", 5592), Tuple.Create("\"", 5612)
|
||||
|
||||
#line 122 "..\..\Views\Job\LogInsurance.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 5617), Tuple.Create<System.Object, System.Int32>(ja.Comments
|
||||
, Tuple.Create(Tuple.Create("", 5600), Tuple.Create<System.Object, System.Int32>(ja.Comments
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 5617), false)
|
||||
, 5600), false)
|
||||
);
|
||||
|
||||
WriteLiteral(">\r\n");
|
||||
@@ -710,14 +710,14 @@ WriteLiteral(" data-livestamp=\"");
|
||||
#line hidden
|
||||
WriteLiteral("\"");
|
||||
|
||||
WriteAttribute("title", Tuple.Create(" title=\"", 6063), Tuple.Create("\"", 6101)
|
||||
WriteAttribute("title", Tuple.Create(" title=\"", 6046), Tuple.Create("\"", 6084)
|
||||
|
||||
#line 127 "..\..\Views\Job\LogInsurance.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 6071), Tuple.Create<System.Object, System.Int32>(ja.Timestamp.ToFullDateTime()
|
||||
, Tuple.Create(Tuple.Create("", 6054), Tuple.Create<System.Object, System.Int32>(ja.Timestamp.ToFullDateTime()
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 6071), false)
|
||||
, 6054), false)
|
||||
);
|
||||
|
||||
WriteLiteral(">");
|
||||
@@ -858,22 +858,21 @@ WriteLiteral(">\r\n $(function () {\r\n var $providerId = $(\'#Provide
|
||||
"\n $(\'<input>\').attr({ type: \'hidden\', name: \'ManualProviderRefere" +
|
||||
"nce\', value: $(\'#ManualProviderReference\').val() })\r\n ).append(\r\n " +
|
||||
" $(\'<input>\').attr({ type: \'hidden\', name: \'__RequestVerificationToke" +
|
||||
"n\', value: $providerId.closest(\'form\').find(\'input[name=\"__RequestVerificationTo" +
|
||||
"ken\"]\').val() })\r\n ).appendTo(\'body\').submit();\r\n }\r\n\r\n " +
|
||||
" $providerId.change(updateDetails);\r\n $addressId.change(updateDetails);\r\n" +
|
||||
"\r\n var manualProvider = $(\'#ManualProviderName\');\r\n if (manualProv" +
|
||||
"ider.length > 0 && !manualProvider.val()) {\r\n manualProvider.focus();" +
|
||||
"\r\n } else {\r\n $(\'#ProviderId\').focus();\r\n }\r\n\r\n " +
|
||||
"$(\'#publishJobAttachments\').on(\'click\', \'input\', function (e) {\r\n e.p" +
|
||||
"reventDefault();\r\n setTimeout(function () {\r\n var $i =" +
|
||||
" $(e.currentTarget);\r\n $i.prop(\'checked\', !$i.prop(\'checked\'));\r\n" +
|
||||
" }, 0);\r\n return false;\r\n });\r\n $(\'#publishJ" +
|
||||
"obAttachmentsSelect\').on(\'click\', \'a\', function (e) {\r\n e.preventDefa" +
|
||||
"ult();\r\n var $i = $(e.currentTarget);\r\n var $c = $i.hasCla" +
|
||||
"ss(\'all\');\r\n setTimeout(function () {\r\n $(\'#publishJob" +
|
||||
"Attachments\').find(\'input:not(:disabled)\').prop(\'checked\', $c).trigger(\'change\')" +
|
||||
";\r\n }, 0);\r\n return false;\r\n });\r\n });\r\n</script" +
|
||||
">\r\n");
|
||||
"n\', value: document.body.dataset.antiforgery })\r\n ).appendTo(\'body\')." +
|
||||
"submit();\r\n }\r\n\r\n $providerId.change(updateDetails);\r\n $add" +
|
||||
"ressId.change(updateDetails);\r\n\r\n var manualProvider = $(\'#ManualProvider" +
|
||||
"Name\');\r\n if (manualProvider.length > 0 && !manualProvider.val()) {\r\n " +
|
||||
" manualProvider.focus();\r\n } else {\r\n $(\'#ProviderId\')." +
|
||||
"focus();\r\n }\r\n\r\n $(\'#publishJobAttachments\').on(\'click\', \'input\', " +
|
||||
"function (e) {\r\n e.preventDefault();\r\n setTimeout(function" +
|
||||
" () {\r\n var $i = $(e.currentTarget);\r\n $i.prop(\'ch" +
|
||||
"ecked\', !$i.prop(\'checked\'));\r\n }, 0);\r\n return false;\r\n " +
|
||||
" });\r\n $(\'#publishJobAttachmentsSelect\').on(\'click\', \'a\', function (" +
|
||||
"e) {\r\n e.preventDefault();\r\n var $i = $(e.currentTarget);\r" +
|
||||
"\n var $c = $i.hasClass(\'all\');\r\n setTimeout(function () {\r" +
|
||||
"\n $(\'#publishJobAttachments\').find(\'input:not(:disabled)\').prop(\'" +
|
||||
"checked\', $c).trigger(\'change\');\r\n }, 0);\r\n return false;\r" +
|
||||
"\n });\r\n });\r\n</script>\r\n");
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
ViewBag.Title = Html.ToBreadcrumb("Jobs", MVC.Job.Index(), string.Format("Job: {0}", Model.Job.Id), MVC.Job.Show(Model.Job.Id), "Lodge Insurance Claim");
|
||||
}
|
||||
@using (Html.BeginForm(MVC.Job.LogInsurance(), FormMethod.Post))
|
||||
@using (Html.BeginForm(MVC.Job.LogInsurance()))
|
||||
{
|
||||
@Html.AntiForgeryToken()
|
||||
@Html.ValidationSummary(true)
|
||||
|
||||
@@ -57,7 +57,7 @@ WriteLiteral("\r\n");
|
||||
|
||||
|
||||
#line 7 "..\..\Views\Job\LogInsuranceDisclose.cshtml"
|
||||
using (Html.BeginForm(MVC.Job.LogInsurance(), FormMethod.Post))
|
||||
using (Html.BeginForm(MVC.Job.LogInsurance()))
|
||||
{
|
||||
|
||||
|
||||
@@ -440,28 +440,28 @@ WriteLiteral(" type=\"hidden\"");
|
||||
|
||||
WriteLiteral(" name=\"AttachmentIds\"");
|
||||
|
||||
WriteAttribute("value", Tuple.Create(" value=\"", 3917), Tuple.Create("\"", 3931)
|
||||
WriteAttribute("value", Tuple.Create(" value=\"", 3900), Tuple.Create("\"", 3914)
|
||||
|
||||
#line 99 "..\..\Views\Job\LogInsuranceDisclose.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 3925), Tuple.Create<System.Object, System.Int32>(ja.Id
|
||||
, Tuple.Create(Tuple.Create("", 3908), Tuple.Create<System.Object, System.Int32>(ja.Id
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 3925), false)
|
||||
, 3908), false)
|
||||
);
|
||||
|
||||
WriteLiteral(" />\r\n");
|
||||
|
||||
WriteLiteral(" <a");
|
||||
|
||||
WriteAttribute("href", Tuple.Create(" href=\"", 3975), Tuple.Create("\"", 4032)
|
||||
WriteAttribute("href", Tuple.Create(" href=\"", 3958), Tuple.Create("\"", 4015)
|
||||
|
||||
#line 100 "..\..\Views\Job\LogInsuranceDisclose.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 3982), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.API.Job.AttachmentDownload(ja.Id))
|
||||
, Tuple.Create(Tuple.Create("", 3965), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.API.Job.AttachmentDownload(ja.Id))
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 3982), false)
|
||||
, 3965), false)
|
||||
);
|
||||
|
||||
WriteLiteral(" data-attachmentid=\"");
|
||||
@@ -490,42 +490,42 @@ WriteLiteral(">\r\n <span");
|
||||
|
||||
WriteLiteral(" class=\"icon\"");
|
||||
|
||||
WriteAttribute("title", Tuple.Create(" title=\"", 4150), Tuple.Create("\"", 4170)
|
||||
WriteAttribute("title", Tuple.Create(" title=\"", 4133), Tuple.Create("\"", 4153)
|
||||
|
||||
#line 101 "..\..\Views\Job\LogInsuranceDisclose.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 4158), Tuple.Create<System.Object, System.Int32>(ja.Filename
|
||||
, Tuple.Create(Tuple.Create("", 4141), Tuple.Create<System.Object, System.Int32>(ja.Filename
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 4158), false)
|
||||
, 4141), false)
|
||||
);
|
||||
|
||||
WriteLiteral(">\r\n <img");
|
||||
|
||||
WriteLiteral(" alt=\"Attachment Thumbnail\"");
|
||||
|
||||
WriteAttribute("src", Tuple.Create(" src=\"", 4249), Tuple.Create("\"", 4308)
|
||||
WriteAttribute("src", Tuple.Create(" src=\"", 4232), Tuple.Create("\"", 4291)
|
||||
|
||||
#line 102 "..\..\Views\Job\LogInsuranceDisclose.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 4255), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.API.Job.AttachmentThumbnail(ja.Id))
|
||||
, Tuple.Create(Tuple.Create("", 4238), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.API.Job.AttachmentThumbnail(ja.Id))
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 4255), false)
|
||||
, 4238), false)
|
||||
);
|
||||
|
||||
WriteLiteral(" /></span>\r\n <span");
|
||||
|
||||
WriteLiteral(" class=\"comments\"");
|
||||
|
||||
WriteAttribute("title", Tuple.Create(" title=\"", 4383), Tuple.Create("\"", 4403)
|
||||
WriteAttribute("title", Tuple.Create(" title=\"", 4366), Tuple.Create("\"", 4386)
|
||||
|
||||
#line 103 "..\..\Views\Job\LogInsuranceDisclose.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 4391), Tuple.Create<System.Object, System.Int32>(ja.Comments
|
||||
, Tuple.Create(Tuple.Create("", 4374), Tuple.Create<System.Object, System.Int32>(ja.Comments
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 4391), false)
|
||||
, 4374), false)
|
||||
);
|
||||
|
||||
WriteLiteral(">\r\n");
|
||||
@@ -599,14 +599,14 @@ WriteLiteral(" data-livestamp=\"");
|
||||
#line hidden
|
||||
WriteLiteral("\"");
|
||||
|
||||
WriteAttribute("title", Tuple.Create(" title=\"", 4879), Tuple.Create("\"", 4917)
|
||||
WriteAttribute("title", Tuple.Create(" title=\"", 4862), Tuple.Create("\"", 4900)
|
||||
|
||||
#line 108 "..\..\Views\Job\LogInsuranceDisclose.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 4887), Tuple.Create<System.Object, System.Int32>(ja.Timestamp.ToFullDateTime()
|
||||
, Tuple.Create(Tuple.Create("", 4870), Tuple.Create<System.Object, System.Int32>(ja.Timestamp.ToFullDateTime()
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 4887), false)
|
||||
, 4870), false)
|
||||
);
|
||||
|
||||
WriteLiteral(">");
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
ViewBag.Title = Html.ToBreadcrumb("Jobs", MVC.Job.Index(), string.Format("Job: {0}", Model.Job.Id), MVC.Job.Show(Model.Job.Id), "Lodge Repair");
|
||||
}
|
||||
@using (Html.BeginForm(MVC.Job.LogRepair(), FormMethod.Post))
|
||||
@using (Html.BeginForm(MVC.Job.LogRepair()))
|
||||
{
|
||||
@Html.AntiForgeryToken()
|
||||
@Html.ValidationSummary(true)
|
||||
@@ -191,7 +191,7 @@
|
||||
).append(
|
||||
$('<input>').attr({ type: 'hidden', name: 'ManualProviderReference', value: $('#ManualProviderReference').val() })
|
||||
).append(
|
||||
$('<input>').attr({ type: 'hidden', name: '__RequestVerificationToken', value: $providerId.closest('form').find('input[name="__RequestVerificationToken"]').val() })
|
||||
$('<input>').attr({ type: 'hidden', name: '__RequestVerificationToken', value: document.body.dataset.antiforgery })
|
||||
).appendTo('body').submit();
|
||||
}
|
||||
|
||||
|
||||
@@ -57,7 +57,7 @@ WriteLiteral("\r\n");
|
||||
|
||||
|
||||
#line 7 "..\..\Views\Job\LogRepair.cshtml"
|
||||
using (Html.BeginForm(MVC.Job.LogRepair(), FormMethod.Post))
|
||||
using (Html.BeginForm(MVC.Job.LogRepair()))
|
||||
{
|
||||
|
||||
|
||||
@@ -125,14 +125,14 @@ WriteLiteral(" type=\"hidden\"");
|
||||
|
||||
WriteLiteral(" name=\"SubmissionAction\"");
|
||||
|
||||
WriteAttribute("value", Tuple.Create(" value=\"", 521), Tuple.Create("\"", 578)
|
||||
WriteAttribute("value", Tuple.Create(" value=\"", 504), Tuple.Create("\"", 561)
|
||||
|
||||
#line 13 "..\..\Views\Job\LogRepair.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 529), Tuple.Create<System.Object, System.Int32>(Model.IsManualProvider ? "Manual" : "Disclose"
|
||||
, Tuple.Create(Tuple.Create("", 512), Tuple.Create<System.Object, System.Int32>(Model.IsManualProvider ? "Manual" : "Disclose"
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 529), false)
|
||||
, 512), false)
|
||||
);
|
||||
|
||||
WriteLiteral(" />\r\n");
|
||||
@@ -393,14 +393,14 @@ WriteLiteral(" class=\"fa fa-info-circle\"");
|
||||
|
||||
WriteLiteral("></i>View the <a");
|
||||
|
||||
WriteAttribute("href", Tuple.Create(" href=\"", 3577), Tuple.Create("\"", 3627)
|
||||
WriteAttribute("href", Tuple.Create(" href=\"", 3560), Tuple.Create("\"", 3610)
|
||||
|
||||
#line 85 "..\..\Views\Job\LogRepair.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 3584), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.Config.Plugins.Install())
|
||||
, Tuple.Create(Tuple.Create("", 3567), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.Config.Plugins.Install())
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 3584), false)
|
||||
, 3567), false)
|
||||
);
|
||||
|
||||
WriteLiteral(">Plugin Catalogue</a> to discover and install repair provider plugins.\r\n " +
|
||||
@@ -574,14 +574,14 @@ WriteLiteral(">\r\n");
|
||||
#line hidden
|
||||
WriteLiteral(" <a");
|
||||
|
||||
WriteAttribute("href", Tuple.Create(" href=\"", 5639), Tuple.Create("\"", 5696)
|
||||
WriteAttribute("href", Tuple.Create(" href=\"", 5622), Tuple.Create("\"", 5679)
|
||||
|
||||
#line 134 "..\..\Views\Job\LogRepair.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 5646), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.API.Job.AttachmentDownload(ja.Id))
|
||||
, Tuple.Create(Tuple.Create("", 5629), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.API.Job.AttachmentDownload(ja.Id))
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 5646), false)
|
||||
, 5629), false)
|
||||
);
|
||||
|
||||
WriteLiteral(" data-attachmentid=\"");
|
||||
@@ -614,14 +614,14 @@ WriteLiteral(" class=\"select\"");
|
||||
|
||||
WriteLiteral(" name=\"PublishAttachmentIds\"");
|
||||
|
||||
WriteAttribute("value", Tuple.Create(" value=\"", 5853), Tuple.Create("\"", 5867)
|
||||
WriteAttribute("value", Tuple.Create(" value=\"", 5836), Tuple.Create("\"", 5850)
|
||||
|
||||
#line 135 "..\..\Views\Job\LogRepair.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 5861), Tuple.Create<System.Object, System.Int32>(ja.Id
|
||||
, Tuple.Create(Tuple.Create("", 5844), Tuple.Create<System.Object, System.Int32>(ja.Id
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 5861), false)
|
||||
, 5844), false)
|
||||
);
|
||||
|
||||
WriteLiteral(" ");
|
||||
@@ -637,28 +637,28 @@ WriteLiteral(" />\r\n <span");
|
||||
|
||||
WriteLiteral(" class=\"icon\"");
|
||||
|
||||
WriteAttribute("title", Tuple.Create(" title=\"", 5988), Tuple.Create("\"", 6008)
|
||||
WriteAttribute("title", Tuple.Create(" title=\"", 5971), Tuple.Create("\"", 5991)
|
||||
|
||||
#line 136 "..\..\Views\Job\LogRepair.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 5996), Tuple.Create<System.Object, System.Int32>(ja.Filename
|
||||
, Tuple.Create(Tuple.Create("", 5979), Tuple.Create<System.Object, System.Int32>(ja.Filename
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 5996), false)
|
||||
, 5979), false)
|
||||
);
|
||||
|
||||
WriteLiteral(">\r\n <img");
|
||||
|
||||
WriteLiteral(" alt=\"Attachment Thumbnail\"");
|
||||
|
||||
WriteAttribute("src", Tuple.Create(" src=\"", 6079), Tuple.Create("\"", 6138)
|
||||
WriteAttribute("src", Tuple.Create(" src=\"", 6062), Tuple.Create("\"", 6121)
|
||||
|
||||
#line 137 "..\..\Views\Job\LogRepair.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 6085), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.API.Job.AttachmentThumbnail(ja.Id))
|
||||
, Tuple.Create(Tuple.Create("", 6068), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.API.Job.AttachmentThumbnail(ja.Id))
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 6085), false)
|
||||
, 6068), false)
|
||||
);
|
||||
|
||||
WriteLiteral(" />\r\n </span>\r\n <sp" +
|
||||
@@ -666,14 +666,14 @@ WriteLiteral(" />\r\n </span>\r\n
|
||||
|
||||
WriteLiteral(" class=\"comments\"");
|
||||
|
||||
WriteAttribute("title", Tuple.Create(" title=\"", 6239), Tuple.Create("\"", 6259)
|
||||
WriteAttribute("title", Tuple.Create(" title=\"", 6222), Tuple.Create("\"", 6242)
|
||||
|
||||
#line 139 "..\..\Views\Job\LogRepair.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 6247), Tuple.Create<System.Object, System.Int32>(ja.Comments
|
||||
, Tuple.Create(Tuple.Create("", 6230), Tuple.Create<System.Object, System.Int32>(ja.Comments
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 6247), false)
|
||||
, 6230), false)
|
||||
);
|
||||
|
||||
WriteLiteral(">\r\n");
|
||||
@@ -747,14 +747,14 @@ WriteLiteral(" data-livestamp=\"");
|
||||
#line hidden
|
||||
WriteLiteral("\"");
|
||||
|
||||
WriteAttribute("title", Tuple.Create(" title=\"", 6693), Tuple.Create("\"", 6731)
|
||||
WriteAttribute("title", Tuple.Create(" title=\"", 6676), Tuple.Create("\"", 6714)
|
||||
|
||||
#line 144 "..\..\Views\Job\LogRepair.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 6701), Tuple.Create<System.Object, System.Int32>(ja.Timestamp.ToFullDateTime()
|
||||
, Tuple.Create(Tuple.Create("", 6684), Tuple.Create<System.Object, System.Int32>(ja.Timestamp.ToFullDateTime()
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 6701), false)
|
||||
, 6684), false)
|
||||
);
|
||||
|
||||
WriteLiteral(">");
|
||||
@@ -897,21 +897,21 @@ WriteLiteral(">\r\n $(function () {\r\n var $providerId = $(\'#RepairP
|
||||
" $(\'<input>\').attr({ type: \'hidden\', name: \'ManualProviderReference\'," +
|
||||
" value: $(\'#ManualProviderReference\').val() })\r\n ).append(\r\n " +
|
||||
" $(\'<input>\').attr({ type: \'hidden\', name: \'__RequestVerificationToken\', v" +
|
||||
"alue: $providerId.closest(\'form\').find(\'input[name=\"__RequestVerificationToken\"]" +
|
||||
"\').val() })\r\n ).appendTo(\'body\').submit();\r\n }\r\n\r\n $pro" +
|
||||
"viderId.change(updateDetails);\r\n $addressId.change(updateDetails);\r\n\r\n " +
|
||||
" var manualProvider = $(\'#ManualProviderName\');\r\n if (manualProvider." +
|
||||
"length > 0 && !manualProvider.val()) {\r\n manualProvider.focus();\r\n " +
|
||||
" } else {\r\n $(\'#RepairDescription\').focus();\r\n }\r\n\r\n " +
|
||||
" $(\'#publishJobAttachments\').on(\'click\', \'input\', function (e) {\r\n e" +
|
||||
".preventDefault();\r\n setTimeout(function () {\r\n var $i" +
|
||||
" = $(e.currentTarget);\r\n $i.prop(\'checked\', !$i.prop(\'checked\'));" +
|
||||
"\r\n }, 0);\r\n return false;\r\n });\r\n $(\'#publis" +
|
||||
"hJobAttachmentsSelect\').on(\'click\', \'a\', function (e) {\r\n e.preventDe" +
|
||||
"fault();\r\n var $i = $(e.currentTarget);\r\n var $c = $i.hasC" +
|
||||
"lass(\'all\');\r\n setTimeout(function () {\r\n $(\'#publishJ" +
|
||||
"obAttachments\').find(\'input:not(:disabled)\').prop(\'checked\', $c);\r\n }" +
|
||||
", 0);\r\n return false;\r\n });\r\n });\r\n</script>\r\n");
|
||||
"alue: document.body.dataset.antiforgery })\r\n ).appendTo(\'body\').submi" +
|
||||
"t();\r\n }\r\n\r\n $providerId.change(updateDetails);\r\n $addressI" +
|
||||
"d.change(updateDetails);\r\n\r\n var manualProvider = $(\'#ManualProviderName\'" +
|
||||
");\r\n if (manualProvider.length > 0 && !manualProvider.val()) {\r\n " +
|
||||
" manualProvider.focus();\r\n } else {\r\n $(\'#RepairDescription\'" +
|
||||
").focus();\r\n }\r\n\r\n $(\'#publishJobAttachments\').on(\'click\', \'input\'" +
|
||||
", function (e) {\r\n e.preventDefault();\r\n setTimeout(functi" +
|
||||
"on () {\r\n var $i = $(e.currentTarget);\r\n $i.prop(\'" +
|
||||
"checked\', !$i.prop(\'checked\'));\r\n }, 0);\r\n return false;\r\n" +
|
||||
" });\r\n $(\'#publishJobAttachmentsSelect\').on(\'click\', \'a\', function" +
|
||||
" (e) {\r\n e.preventDefault();\r\n var $i = $(e.currentTarget)" +
|
||||
";\r\n var $c = $i.hasClass(\'all\');\r\n setTimeout(function () " +
|
||||
"{\r\n $(\'#publishJobAttachments\').find(\'input:not(:disabled)\').prop" +
|
||||
"(\'checked\', $c);\r\n }, 0);\r\n return false;\r\n });\r\n " +
|
||||
" });\r\n</script>\r\n");
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
ViewBag.Title = Html.ToBreadcrumb("Jobs", MVC.Job.Index(), string.Format("Job: {0}", Model.Job.Id), MVC.Job.Show(Model.Job.Id), "Lodge Repair");
|
||||
}
|
||||
@using (Html.BeginForm(MVC.Job.LogRepair(), FormMethod.Post))
|
||||
@using (Html.BeginForm(MVC.Job.LogRepair()))
|
||||
{
|
||||
@Html.AntiForgeryToken()
|
||||
@Html.ValidationSummary(true)
|
||||
|
||||
@@ -57,7 +57,7 @@ WriteLiteral("\r\n");
|
||||
|
||||
|
||||
#line 7 "..\..\Views\Job\LogRepairDisclose.cshtml"
|
||||
using (Html.BeginForm(MVC.Job.LogRepair(), FormMethod.Post))
|
||||
using (Html.BeginForm(MVC.Job.LogRepair()))
|
||||
{
|
||||
|
||||
|
||||
@@ -467,28 +467,28 @@ WriteLiteral(" type=\"hidden\"");
|
||||
|
||||
WriteLiteral(" name=\"PublishAttachmentIds\"");
|
||||
|
||||
WriteAttribute("value", Tuple.Create(" value=\"", 4143), Tuple.Create("\"", 4157)
|
||||
WriteAttribute("value", Tuple.Create(" value=\"", 4126), Tuple.Create("\"", 4140)
|
||||
|
||||
#line 107 "..\..\Views\Job\LogRepairDisclose.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 4151), Tuple.Create<System.Object, System.Int32>(ja.Id
|
||||
, Tuple.Create(Tuple.Create("", 4134), Tuple.Create<System.Object, System.Int32>(ja.Id
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 4151), false)
|
||||
, 4134), false)
|
||||
);
|
||||
|
||||
WriteLiteral(" />\r\n");
|
||||
|
||||
WriteLiteral(" <a");
|
||||
|
||||
WriteAttribute("href", Tuple.Create(" href=\"", 4201), Tuple.Create("\"", 4258)
|
||||
WriteAttribute("href", Tuple.Create(" href=\"", 4184), Tuple.Create("\"", 4241)
|
||||
|
||||
#line 108 "..\..\Views\Job\LogRepairDisclose.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 4208), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.API.Job.AttachmentDownload(ja.Id))
|
||||
, Tuple.Create(Tuple.Create("", 4191), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.API.Job.AttachmentDownload(ja.Id))
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 4208), false)
|
||||
, 4191), false)
|
||||
);
|
||||
|
||||
WriteLiteral(" data-attachmentid=\"");
|
||||
@@ -517,42 +517,42 @@ WriteLiteral(">\r\n <span");
|
||||
|
||||
WriteLiteral(" class=\"icon\"");
|
||||
|
||||
WriteAttribute("title", Tuple.Create(" title=\"", 4376), Tuple.Create("\"", 4396)
|
||||
WriteAttribute("title", Tuple.Create(" title=\"", 4359), Tuple.Create("\"", 4379)
|
||||
|
||||
#line 109 "..\..\Views\Job\LogRepairDisclose.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 4384), Tuple.Create<System.Object, System.Int32>(ja.Filename
|
||||
, Tuple.Create(Tuple.Create("", 4367), Tuple.Create<System.Object, System.Int32>(ja.Filename
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 4384), false)
|
||||
, 4367), false)
|
||||
);
|
||||
|
||||
WriteLiteral(">\r\n <img");
|
||||
|
||||
WriteLiteral(" alt=\"Attachment Thumbnail\"");
|
||||
|
||||
WriteAttribute("src", Tuple.Create(" src=\"", 4475), Tuple.Create("\"", 4534)
|
||||
WriteAttribute("src", Tuple.Create(" src=\"", 4458), Tuple.Create("\"", 4517)
|
||||
|
||||
#line 110 "..\..\Views\Job\LogRepairDisclose.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 4481), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.API.Job.AttachmentThumbnail(ja.Id))
|
||||
, Tuple.Create(Tuple.Create("", 4464), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.API.Job.AttachmentThumbnail(ja.Id))
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 4481), false)
|
||||
, 4464), false)
|
||||
);
|
||||
|
||||
WriteLiteral(" /></span>\r\n <span");
|
||||
|
||||
WriteLiteral(" class=\"comments\"");
|
||||
|
||||
WriteAttribute("title", Tuple.Create(" title=\"", 4609), Tuple.Create("\"", 4629)
|
||||
WriteAttribute("title", Tuple.Create(" title=\"", 4592), Tuple.Create("\"", 4612)
|
||||
|
||||
#line 111 "..\..\Views\Job\LogRepairDisclose.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 4617), Tuple.Create<System.Object, System.Int32>(ja.Comments
|
||||
, Tuple.Create(Tuple.Create("", 4600), Tuple.Create<System.Object, System.Int32>(ja.Comments
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 4617), false)
|
||||
, 4600), false)
|
||||
);
|
||||
|
||||
WriteLiteral(">\r\n");
|
||||
@@ -626,14 +626,14 @@ WriteLiteral(" data-livestamp=\"");
|
||||
#line hidden
|
||||
WriteLiteral("\"");
|
||||
|
||||
WriteAttribute("title", Tuple.Create(" title=\"", 5105), Tuple.Create("\"", 5143)
|
||||
WriteAttribute("title", Tuple.Create(" title=\"", 5088), Tuple.Create("\"", 5126)
|
||||
|
||||
#line 116 "..\..\Views\Job\LogRepairDisclose.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 5113), Tuple.Create<System.Object, System.Int32>(ja.Timestamp.ToFullDateTime()
|
||||
, Tuple.Create(Tuple.Create("", 5096), Tuple.Create<System.Object, System.Int32>(ja.Timestamp.ToFullDateTime()
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 5113), false)
|
||||
, 5096), false)
|
||||
);
|
||||
|
||||
WriteLiteral(">");
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
ViewBag.Title = Html.ToBreadcrumb("Jobs", MVC.Job.Index(), string.Format("Job: {0}", Model.Job.Id), MVC.Job.Show(Model.Job.Id), "Lodge Warranty");
|
||||
}
|
||||
@using (Html.BeginForm(MVC.Job.LogWarranty(), FormMethod.Post))
|
||||
@using (Html.BeginForm(MVC.Job.LogWarranty()))
|
||||
{
|
||||
@Html.AntiForgeryToken()
|
||||
@Html.ValidationSummary(true)
|
||||
@@ -191,7 +191,7 @@
|
||||
).append(
|
||||
$('<input>').attr({ type: 'hidden', name: 'ManualProviderReference', value: $('#ManualProviderReference').val() })
|
||||
).append(
|
||||
$('<input>').attr({ type: 'hidden', name: '__RequestVerificationToken', value: $providerId.closest('form').find('input[name="__RequestVerificationToken"]').val() })
|
||||
$('<input>').attr({ type: 'hidden', name: '__RequestVerificationToken', value: document.body.dataset.antiforgery })
|
||||
).appendTo('body').submit();
|
||||
}
|
||||
|
||||
|
||||
@@ -57,7 +57,7 @@ WriteLiteral("\r\n");
|
||||
|
||||
|
||||
#line 7 "..\..\Views\Job\LogWarranty.cshtml"
|
||||
using (Html.BeginForm(MVC.Job.LogWarranty(), FormMethod.Post))
|
||||
using (Html.BeginForm(MVC.Job.LogWarranty()))
|
||||
{
|
||||
|
||||
|
||||
@@ -125,14 +125,14 @@ WriteLiteral(" type=\"hidden\"");
|
||||
|
||||
WriteLiteral(" name=\"SubmissionAction\"");
|
||||
|
||||
WriteAttribute("value", Tuple.Create(" value=\"", 529), Tuple.Create("\"", 586)
|
||||
WriteAttribute("value", Tuple.Create(" value=\"", 512), Tuple.Create("\"", 569)
|
||||
|
||||
#line 13 "..\..\Views\Job\LogWarranty.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 537), Tuple.Create<System.Object, System.Int32>(Model.IsManualProvider ? "Manual" : "Disclose"
|
||||
, Tuple.Create(Tuple.Create("", 520), Tuple.Create<System.Object, System.Int32>(Model.IsManualProvider ? "Manual" : "Disclose"
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 537), false)
|
||||
, 520), false)
|
||||
);
|
||||
|
||||
WriteLiteral(" />\r\n");
|
||||
@@ -393,14 +393,14 @@ WriteLiteral(" class=\"fa fa-info-circle\"");
|
||||
|
||||
WriteLiteral("></i>View the <a");
|
||||
|
||||
WriteAttribute("href", Tuple.Create(" href=\"", 3597), Tuple.Create("\"", 3647)
|
||||
WriteAttribute("href", Tuple.Create(" href=\"", 3580), Tuple.Create("\"", 3630)
|
||||
|
||||
#line 85 "..\..\Views\Job\LogWarranty.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 3604), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.Config.Plugins.Install())
|
||||
, Tuple.Create(Tuple.Create("", 3587), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.Config.Plugins.Install())
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 3604), false)
|
||||
, 3587), false)
|
||||
);
|
||||
|
||||
WriteLiteral(">Plugin Catalogue</a> to discover and install warranty provider plugins.\r\n " +
|
||||
@@ -574,14 +574,14 @@ WriteLiteral(">\r\n");
|
||||
#line hidden
|
||||
WriteLiteral(" <a");
|
||||
|
||||
WriteAttribute("href", Tuple.Create(" href=\"", 5691), Tuple.Create("\"", 5748)
|
||||
WriteAttribute("href", Tuple.Create(" href=\"", 5674), Tuple.Create("\"", 5731)
|
||||
|
||||
#line 134 "..\..\Views\Job\LogWarranty.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 5698), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.API.Job.AttachmentDownload(ja.Id))
|
||||
, Tuple.Create(Tuple.Create("", 5681), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.API.Job.AttachmentDownload(ja.Id))
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 5698), false)
|
||||
, 5681), false)
|
||||
);
|
||||
|
||||
WriteLiteral(" data-attachmentid=\"");
|
||||
@@ -614,14 +614,14 @@ WriteLiteral(" class=\"select\"");
|
||||
|
||||
WriteLiteral(" name=\"PublishAttachmentIds\"");
|
||||
|
||||
WriteAttribute("value", Tuple.Create(" value=\"", 5909), Tuple.Create("\"", 5923)
|
||||
WriteAttribute("value", Tuple.Create(" value=\"", 5892), Tuple.Create("\"", 5906)
|
||||
|
||||
#line 135 "..\..\Views\Job\LogWarranty.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 5917), Tuple.Create<System.Object, System.Int32>(ja.Id
|
||||
, Tuple.Create(Tuple.Create("", 5900), Tuple.Create<System.Object, System.Int32>(ja.Id
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 5917), false)
|
||||
, 5900), false)
|
||||
);
|
||||
|
||||
WriteLiteral(" ");
|
||||
@@ -637,28 +637,28 @@ WriteLiteral(" />\r\n <span");
|
||||
|
||||
WriteLiteral(" class=\"icon\"");
|
||||
|
||||
WriteAttribute("title", Tuple.Create(" title=\"", 6048), Tuple.Create("\"", 6068)
|
||||
WriteAttribute("title", Tuple.Create(" title=\"", 6031), Tuple.Create("\"", 6051)
|
||||
|
||||
#line 136 "..\..\Views\Job\LogWarranty.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 6056), Tuple.Create<System.Object, System.Int32>(ja.Filename
|
||||
, Tuple.Create(Tuple.Create("", 6039), Tuple.Create<System.Object, System.Int32>(ja.Filename
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 6056), false)
|
||||
, 6039), false)
|
||||
);
|
||||
|
||||
WriteLiteral(">\r\n <img");
|
||||
|
||||
WriteLiteral(" alt=\"Attachment Thumbnail\"");
|
||||
|
||||
WriteAttribute("src", Tuple.Create(" src=\"", 6143), Tuple.Create("\"", 6202)
|
||||
WriteAttribute("src", Tuple.Create(" src=\"", 6126), Tuple.Create("\"", 6185)
|
||||
|
||||
#line 137 "..\..\Views\Job\LogWarranty.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 6149), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.API.Job.AttachmentThumbnail(ja.Id))
|
||||
, Tuple.Create(Tuple.Create("", 6132), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.API.Job.AttachmentThumbnail(ja.Id))
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 6149), false)
|
||||
, 6132), false)
|
||||
);
|
||||
|
||||
WriteLiteral(" />\r\n </span>\r\n " +
|
||||
@@ -666,14 +666,14 @@ WriteLiteral(" />\r\n </span>\r\n
|
||||
|
||||
WriteLiteral(" class=\"comments\"");
|
||||
|
||||
WriteAttribute("title", Tuple.Create(" title=\"", 6311), Tuple.Create("\"", 6331)
|
||||
WriteAttribute("title", Tuple.Create(" title=\"", 6294), Tuple.Create("\"", 6314)
|
||||
|
||||
#line 139 "..\..\Views\Job\LogWarranty.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 6319), Tuple.Create<System.Object, System.Int32>(ja.Comments
|
||||
, Tuple.Create(Tuple.Create("", 6302), Tuple.Create<System.Object, System.Int32>(ja.Comments
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 6319), false)
|
||||
, 6302), false)
|
||||
);
|
||||
|
||||
WriteLiteral(">\r\n");
|
||||
@@ -747,14 +747,14 @@ WriteLiteral(" data-livestamp=\"");
|
||||
#line hidden
|
||||
WriteLiteral("\"");
|
||||
|
||||
WriteAttribute("title", Tuple.Create(" title=\"", 6785), Tuple.Create("\"", 6823)
|
||||
WriteAttribute("title", Tuple.Create(" title=\"", 6768), Tuple.Create("\"", 6806)
|
||||
|
||||
#line 144 "..\..\Views\Job\LogWarranty.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 6793), Tuple.Create<System.Object, System.Int32>(ja.Timestamp.ToFullDateTime()
|
||||
, Tuple.Create(Tuple.Create("", 6776), Tuple.Create<System.Object, System.Int32>(ja.Timestamp.ToFullDateTime()
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 6793), false)
|
||||
, 6776), false)
|
||||
);
|
||||
|
||||
WriteLiteral(">");
|
||||
@@ -897,21 +897,21 @@ WriteLiteral(">\r\n $(function () {\r\n var $providerId = $(\'#Warrant
|
||||
" $(\'<input>\').attr({ type: \'hidden\', name: \'ManualProviderReference" +
|
||||
"\', value: $(\'#ManualProviderReference\').val() })\r\n ).append(\r\n " +
|
||||
" $(\'<input>\').attr({ type: \'hidden\', name: \'__RequestVerificationToken\'," +
|
||||
" value: $providerId.closest(\'form\').find(\'input[name=\"__RequestVerificationToken" +
|
||||
"\"]\').val() })\r\n ).appendTo(\'body\').submit();\r\n }\r\n\r\n $p" +
|
||||
"roviderId.change(updateDetails);\r\n $addressId.change(updateDetails);\r\n\r\n " +
|
||||
" var manualProvider = $(\'#ManualProviderName\');\r\n if (manualProvide" +
|
||||
"r.length > 0 && !manualProvider.val()) {\r\n manualProvider.focus();\r\n " +
|
||||
" } else {\r\n $(\'#FaultDescription\').focus();\r\n }\r\n\r\n " +
|
||||
" $(\'#publishJobAttachments\').on(\'click\', \'input\', function (e) {\r\n " +
|
||||
"e.preventDefault();\r\n setTimeout(function () {\r\n var $" +
|
||||
"i = $(e.currentTarget);\r\n $i.prop(\'checked\', !$i.prop(\'checked\'))" +
|
||||
";\r\n }, 0);\r\n return false;\r\n });\r\n $(\'#publi" +
|
||||
"shJobAttachmentsSelect\').on(\'click\', \'a\', function (e) {\r\n e.preventD" +
|
||||
"efault();\r\n var $i = $(e.currentTarget);\r\n var $c = $i.has" +
|
||||
"Class(\'all\');\r\n setTimeout(function () {\r\n $(\'#publish" +
|
||||
"JobAttachments\').find(\'input:not(:disabled)\').prop(\'checked\', $c);\r\n " +
|
||||
"}, 0);\r\n return false;\r\n });\r\n });\r\n</script>\r\n");
|
||||
" value: document.body.dataset.antiforgery })\r\n ).appendTo(\'body\').sub" +
|
||||
"mit();\r\n }\r\n\r\n $providerId.change(updateDetails);\r\n $addres" +
|
||||
"sId.change(updateDetails);\r\n\r\n var manualProvider = $(\'#ManualProviderNam" +
|
||||
"e\');\r\n if (manualProvider.length > 0 && !manualProvider.val()) {\r\n " +
|
||||
" manualProvider.focus();\r\n } else {\r\n $(\'#FaultDescription" +
|
||||
"\').focus();\r\n }\r\n\r\n $(\'#publishJobAttachments\').on(\'click\', \'input" +
|
||||
"\', function (e) {\r\n e.preventDefault();\r\n setTimeout(funct" +
|
||||
"ion () {\r\n var $i = $(e.currentTarget);\r\n $i.prop(" +
|
||||
"\'checked\', !$i.prop(\'checked\'));\r\n }, 0);\r\n return false;\r" +
|
||||
"\n });\r\n $(\'#publishJobAttachmentsSelect\').on(\'click\', \'a\', functio" +
|
||||
"n (e) {\r\n e.preventDefault();\r\n var $i = $(e.currentTarget" +
|
||||
");\r\n var $c = $i.hasClass(\'all\');\r\n setTimeout(function ()" +
|
||||
" {\r\n $(\'#publishJobAttachments\').find(\'input:not(:disabled)\').pro" +
|
||||
"p(\'checked\', $c);\r\n }, 0);\r\n return false;\r\n });\r\n " +
|
||||
" });\r\n</script>\r\n");
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
ViewBag.Title = Html.ToBreadcrumb("Jobs", MVC.Job.Index(), string.Format("Job: {0}", Model.Job.Id), MVC.Job.Show(Model.Job.Id), "Lodge Warranty");
|
||||
}
|
||||
@using (Html.BeginForm(MVC.Job.LogWarranty(), FormMethod.Post))
|
||||
@using (Html.BeginForm(MVC.Job.LogWarranty()))
|
||||
{
|
||||
@Html.AntiForgeryToken()
|
||||
@Html.ValidationSummary(true)
|
||||
|
||||
@@ -57,7 +57,7 @@ WriteLiteral("\r\n");
|
||||
|
||||
|
||||
#line 7 "..\..\Views\Job\LogWarrantyDisclose.cshtml"
|
||||
using (Html.BeginForm(MVC.Job.LogWarranty(), FormMethod.Post))
|
||||
using (Html.BeginForm(MVC.Job.LogWarranty()))
|
||||
{
|
||||
|
||||
|
||||
@@ -474,28 +474,28 @@ WriteLiteral(" type=\"hidden\"");
|
||||
|
||||
WriteLiteral(" name=\"PublishAttachmentIds\"");
|
||||
|
||||
WriteAttribute("value", Tuple.Create(" value=\"", 4393), Tuple.Create("\"", 4407)
|
||||
WriteAttribute("value", Tuple.Create(" value=\"", 4376), Tuple.Create("\"", 4390)
|
||||
|
||||
#line 118 "..\..\Views\Job\LogWarrantyDisclose.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 4401), Tuple.Create<System.Object, System.Int32>(ja.Id
|
||||
, Tuple.Create(Tuple.Create("", 4384), Tuple.Create<System.Object, System.Int32>(ja.Id
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 4401), false)
|
||||
, 4384), false)
|
||||
);
|
||||
|
||||
WriteLiteral(" />\r\n");
|
||||
|
||||
WriteLiteral(" <a");
|
||||
|
||||
WriteAttribute("href", Tuple.Create(" href=\"", 4451), Tuple.Create("\"", 4508)
|
||||
WriteAttribute("href", Tuple.Create(" href=\"", 4434), Tuple.Create("\"", 4491)
|
||||
|
||||
#line 119 "..\..\Views\Job\LogWarrantyDisclose.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 4458), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.API.Job.AttachmentDownload(ja.Id))
|
||||
, Tuple.Create(Tuple.Create("", 4441), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.API.Job.AttachmentDownload(ja.Id))
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 4458), false)
|
||||
, 4441), false)
|
||||
);
|
||||
|
||||
WriteLiteral(" data-attachmentid=\"");
|
||||
@@ -524,28 +524,28 @@ WriteLiteral(">\r\n <span");
|
||||
|
||||
WriteLiteral(" class=\"icon\"");
|
||||
|
||||
WriteAttribute("title", Tuple.Create(" title=\"", 4626), Tuple.Create("\"", 4646)
|
||||
WriteAttribute("title", Tuple.Create(" title=\"", 4609), Tuple.Create("\"", 4629)
|
||||
|
||||
#line 120 "..\..\Views\Job\LogWarrantyDisclose.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 4634), Tuple.Create<System.Object, System.Int32>(ja.Filename
|
||||
, Tuple.Create(Tuple.Create("", 4617), Tuple.Create<System.Object, System.Int32>(ja.Filename
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 4634), false)
|
||||
, 4617), false)
|
||||
);
|
||||
|
||||
WriteLiteral(">\r\n <img");
|
||||
|
||||
WriteLiteral(" alt=\"Attachment Thumbnail\"");
|
||||
|
||||
WriteAttribute("src", Tuple.Create(" src=\"", 4725), Tuple.Create("\"", 4784)
|
||||
WriteAttribute("src", Tuple.Create(" src=\"", 4708), Tuple.Create("\"", 4767)
|
||||
|
||||
#line 121 "..\..\Views\Job\LogWarrantyDisclose.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 4731), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.API.Job.AttachmentThumbnail(ja.Id))
|
||||
, Tuple.Create(Tuple.Create("", 4714), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.API.Job.AttachmentThumbnail(ja.Id))
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 4731), false)
|
||||
, 4714), false)
|
||||
);
|
||||
|
||||
WriteLiteral(" />\r\n </span>\r\n " +
|
||||
@@ -553,14 +553,14 @@ WriteLiteral(" />\r\n </span>\r\n
|
||||
|
||||
WriteLiteral(" class=\"comments\"");
|
||||
|
||||
WriteAttribute("title", Tuple.Create(" title=\"", 4901), Tuple.Create("\"", 4921)
|
||||
WriteAttribute("title", Tuple.Create(" title=\"", 4884), Tuple.Create("\"", 4904)
|
||||
|
||||
#line 123 "..\..\Views\Job\LogWarrantyDisclose.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 4909), Tuple.Create<System.Object, System.Int32>(ja.Comments
|
||||
, Tuple.Create(Tuple.Create("", 4892), Tuple.Create<System.Object, System.Int32>(ja.Comments
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 4909), false)
|
||||
, 4892), false)
|
||||
);
|
||||
|
||||
WriteLiteral(">\r\n");
|
||||
@@ -634,14 +634,14 @@ WriteLiteral(" data-livestamp=\"");
|
||||
#line hidden
|
||||
WriteLiteral("\"");
|
||||
|
||||
WriteAttribute("title", Tuple.Create(" title=\"", 5395), Tuple.Create("\"", 5433)
|
||||
WriteAttribute("title", Tuple.Create(" title=\"", 5378), Tuple.Create("\"", 5416)
|
||||
|
||||
#line 128 "..\..\Views\Job\LogWarrantyDisclose.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 5403), Tuple.Create<System.Object, System.Int32>(ja.Timestamp.ToFullDateTime()
|
||||
, Tuple.Create(Tuple.Create("", 5386), Tuple.Create<System.Object, System.Int32>(ja.Timestamp.ToFullDateTime()
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 5403), false)
|
||||
, 5386), false)
|
||||
);
|
||||
|
||||
WriteLiteral(">");
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
selectListItems.Add(new SelectListItem() { Selected = true, Value = string.Empty, Text = "Generate Document" });
|
||||
selectListItems.AddRange(Model.Templates.ToSelectListItems());
|
||||
selectListItems.AddRange(Model.TemplatePackages.ToSelectListItems());
|
||||
<div id="Document_Generation_Container" data-targetid="@HttpUtility.UrlEncode(Model.Target.AttachmentReferenceId)" data-targettype="@Model.Target.HasAttachmentType" data-generatepdfurl="@Url.Action(MVC.API.DocumentTemplate.Generate())/" data-generatepackageurl="@Url.Action(MVC.API.DocumentTemplatePackage.Generate())/" data-handlerspresent="@(Model.HandlersPresent ? "true" : "false")" data-handlersurl="@Url.Action(MVC.API.DocumentTemplate.DocumentHandlers())">
|
||||
<div id="Document_Generation_Container" data-targetid="@Model.Target.AttachmentReferenceId" data-targettype="@Model.Target.HasAttachmentType" data-generatepdfurl="@Url.Action(MVC.API.DocumentTemplate.Generate())" data-generatepackageurl="@Url.Action(MVC.API.DocumentTemplatePackage.Generate())" data-handlerspresent="@(Model.HandlersPresent ? "true" : "false")" data-handlersurl="@Url.Action(MVC.API.DocumentTemplate.DocumentHandlers())">
|
||||
@Html.DropDownList("Document_Generate", selectListItems)
|
||||
@if (Model.HandlersPresent)
|
||||
{
|
||||
@@ -20,7 +20,7 @@
|
||||
</div>
|
||||
<div class="details">
|
||||
<div id="Document_Generation_Dialog_Download_Container">
|
||||
<a id="Document_Generation_Dialog_Download" href="#" class="button">Download Document</a>
|
||||
<button id="Document_Generation_Dialog_Download" type="button" class="button">Download Document</button>
|
||||
</div>
|
||||
<div id="Document_Generation_Dialog_HandlerUI">
|
||||
</div>
|
||||
|
||||
@@ -63,7 +63,7 @@ WriteLiteral(" data-targetid=\"");
|
||||
|
||||
|
||||
#line 8 "..\..\Views\Shared\_GenerateDocumentControl.cshtml"
|
||||
Write(HttpUtility.UrlEncode(Model.Target.AttachmentReferenceId));
|
||||
Write(Model.Target.AttachmentReferenceId);
|
||||
|
||||
|
||||
#line default
|
||||
@@ -74,7 +74,7 @@ WriteLiteral(" data-targettype=\"");
|
||||
|
||||
|
||||
#line 8 "..\..\Views\Shared\_GenerateDocumentControl.cshtml"
|
||||
Write(Model.Target.HasAttachmentType);
|
||||
Write(Model.Target.HasAttachmentType);
|
||||
|
||||
|
||||
#line default
|
||||
@@ -85,29 +85,29 @@ WriteLiteral(" data-generatepdfurl=\"");
|
||||
|
||||
|
||||
#line 8 "..\..\Views\Shared\_GenerateDocumentControl.cshtml"
|
||||
Write(Url.Action(MVC.API.DocumentTemplate.Generate()));
|
||||
Write(Url.Action(MVC.API.DocumentTemplate.Generate()));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("/\"");
|
||||
WriteLiteral("\"");
|
||||
|
||||
WriteLiteral(" data-generatepackageurl=\"");
|
||||
|
||||
|
||||
#line 8 "..\..\Views\Shared\_GenerateDocumentControl.cshtml"
|
||||
Write(Url.Action(MVC.API.DocumentTemplatePackage.Generate()));
|
||||
Write(Url.Action(MVC.API.DocumentTemplatePackage.Generate()));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("/\"");
|
||||
WriteLiteral("\"");
|
||||
|
||||
WriteLiteral(" data-handlerspresent=\"");
|
||||
|
||||
|
||||
#line 8 "..\..\Views\Shared\_GenerateDocumentControl.cshtml"
|
||||
Write(Model.HandlersPresent ? "true" : "false");
|
||||
Write(Model.HandlersPresent ? "true" : "false");
|
||||
|
||||
|
||||
#line default
|
||||
@@ -118,7 +118,7 @@ WriteLiteral(" data-handlersurl=\"");
|
||||
|
||||
|
||||
#line 8 "..\..\Views\Shared\_GenerateDocumentControl.cshtml"
|
||||
Write(Url.Action(MVC.API.DocumentTemplate.DocumentHandlers()));
|
||||
Write(Url.Action(MVC.API.DocumentTemplate.DocumentHandlers()));
|
||||
|
||||
|
||||
#line default
|
||||
@@ -192,15 +192,16 @@ WriteLiteral(">\r\n <div");
|
||||
|
||||
WriteLiteral(" id=\"Document_Generation_Dialog_Download_Container\"");
|
||||
|
||||
WriteLiteral(">\r\n <a");
|
||||
WriteLiteral(">\r\n <button");
|
||||
|
||||
WriteLiteral(" id=\"Document_Generation_Dialog_Download\"");
|
||||
|
||||
WriteLiteral(" href=\"#\"");
|
||||
WriteLiteral(" type=\"button\"");
|
||||
|
||||
WriteLiteral(" class=\"button\"");
|
||||
|
||||
WriteLiteral(">Download Document</a>\r\n </div>\r\n <div");
|
||||
WriteLiteral(">Download Document</button>\r\n </div>\r\n <div" +
|
||||
"");
|
||||
|
||||
WriteLiteral(" id=\"Document_Generation_Dialog_HandlerUI\"");
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
@Html.BundleRenderDeferred()
|
||||
@RenderSection("head", false)
|
||||
</head>
|
||||
<body class="layout">
|
||||
<body class="layout" data-antiforgery="@AntiForgeryExtensions.GetToken(Context)">
|
||||
<div class="page">
|
||||
<header>
|
||||
<div id="heading">
|
||||
|
||||
@@ -113,6 +113,17 @@ WriteLiteral("\r\n</head>\r\n<body");
|
||||
|
||||
WriteLiteral(" class=\"layout\"");
|
||||
|
||||
WriteLiteral(" data-antiforgery=\"");
|
||||
|
||||
|
||||
#line 16 "..\..\Views\Shared\_Layout.cshtml"
|
||||
Write(AntiForgeryExtensions.GetToken(Context));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\"");
|
||||
|
||||
WriteLiteral(">\r\n <div");
|
||||
|
||||
WriteLiteral(" class=\"page\"");
|
||||
@@ -123,14 +134,14 @@ WriteLiteral(" id=\"heading\"");
|
||||
|
||||
WriteLiteral(">\r\n <a");
|
||||
|
||||
WriteAttribute("href", Tuple.Create(" href=\"", 688), Tuple.Create("\"", 723)
|
||||
WriteAttribute("href", Tuple.Create(" href=\"", 748), Tuple.Create("\"", 783)
|
||||
|
||||
#line 20 "..\..\Views\Shared\_Layout.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 695), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.Job.Index())
|
||||
, Tuple.Create(Tuple.Create("", 755), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.Job.Index())
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 695), false)
|
||||
, 755), false)
|
||||
);
|
||||
|
||||
WriteLiteral("><i");
|
||||
@@ -143,15 +154,15 @@ WriteLiteral(" id=\"menu\"");
|
||||
|
||||
WriteLiteral(">\r\n <li");
|
||||
|
||||
WriteAttribute("class", Tuple.Create(" class=\"", 850), Tuple.Create("\"", 940)
|
||||
, Tuple.Create(Tuple.Create("", 858), Tuple.Create("d-sm", 858), true)
|
||||
WriteAttribute("class", Tuple.Create(" class=\"", 910), Tuple.Create("\"", 1000)
|
||||
, Tuple.Create(Tuple.Create("", 918), Tuple.Create("d-sm", 918), true)
|
||||
|
||||
#line 24 "..\..\Views\Shared\_Layout.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 862), Tuple.Create<System.Object, System.Int32>((string)ViewContext.ViewData["MenuArea"] == MVC.Job.Name ? " active" : null
|
||||
, Tuple.Create(Tuple.Create("", 922), Tuple.Create<System.Object, System.Int32>((string)ViewContext.ViewData["MenuArea"] == MVC.Job.Name ? " active" : null
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 862), false)
|
||||
, 922), false)
|
||||
);
|
||||
|
||||
WriteLiteral(">");
|
||||
@@ -208,37 +219,37 @@ WriteLiteral("></i><a>Queues</a>\r\n <ul>\r\n
|
||||
#line hidden
|
||||
WriteLiteral(" <li><a");
|
||||
|
||||
WriteAttribute("href", Tuple.Create(" href=\"", 1681), Tuple.Create("\"", 1738)
|
||||
WriteAttribute("href", Tuple.Create(" href=\"", 1741), Tuple.Create("\"", 1798)
|
||||
|
||||
#line 35 "..\..\Views\Shared\_Layout.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 1688), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.Job.Queue(queueToken.JobQueue.Id))
|
||||
, Tuple.Create(Tuple.Create("", 1748), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.Job.Queue(queueToken.JobQueue.Id))
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 1688), false)
|
||||
, 1748), false)
|
||||
);
|
||||
|
||||
WriteLiteral("><i");
|
||||
|
||||
WriteAttribute("class", Tuple.Create(" class=\"", 1742), Tuple.Create("\"", 1825)
|
||||
, Tuple.Create(Tuple.Create("", 1750), Tuple.Create("fa", 1750), true)
|
||||
, Tuple.Create(Tuple.Create(" ", 1752), Tuple.Create("fa-", 1753), true)
|
||||
WriteAttribute("class", Tuple.Create(" class=\"", 1802), Tuple.Create("\"", 1885)
|
||||
, Tuple.Create(Tuple.Create("", 1810), Tuple.Create("fa", 1810), true)
|
||||
, Tuple.Create(Tuple.Create(" ", 1812), Tuple.Create("fa-", 1813), true)
|
||||
|
||||
#line 35 "..\..\Views\Shared\_Layout.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 1756), Tuple.Create<System.Object, System.Int32>(queueToken.JobQueue.Icon
|
||||
, Tuple.Create(Tuple.Create("", 1816), Tuple.Create<System.Object, System.Int32>(queueToken.JobQueue.Icon
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 1756), false)
|
||||
, Tuple.Create(Tuple.Create(" ", 1783), Tuple.Create("fa-fw", 1784), true)
|
||||
, Tuple.Create(Tuple.Create(" ", 1789), Tuple.Create("d-", 1790), true)
|
||||
, 1816), false)
|
||||
, Tuple.Create(Tuple.Create(" ", 1843), Tuple.Create("fa-fw", 1844), true)
|
||||
, Tuple.Create(Tuple.Create(" ", 1849), Tuple.Create("d-", 1850), true)
|
||||
|
||||
#line 35 "..\..\Views\Shared\_Layout.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 1792), Tuple.Create<System.Object, System.Int32>(queueToken.JobQueue.IconColour
|
||||
, Tuple.Create(Tuple.Create("", 1852), Tuple.Create<System.Object, System.Int32>(queueToken.JobQueue.IconColour
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 1792), false)
|
||||
, 1852), false)
|
||||
);
|
||||
|
||||
WriteLiteral("></i>");
|
||||
@@ -718,14 +729,14 @@ WriteLiteral(" </ul>\r\n </li>\r\n");
|
||||
#line hidden
|
||||
WriteLiteral(" <li");
|
||||
|
||||
WriteAttribute("class", Tuple.Create(" class=\"", 6905), Tuple.Create("\"", 6993)
|
||||
WriteAttribute("class", Tuple.Create(" class=\"", 6965), Tuple.Create("\"", 7053)
|
||||
|
||||
#line 111 "..\..\Views\Shared\_Layout.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 6913), Tuple.Create<System.Object, System.Int32>((string)ViewContext.ViewData["MenuArea"] == MVC.Device.Name ? "active" : null
|
||||
, Tuple.Create(Tuple.Create("", 6973), Tuple.Create<System.Object, System.Int32>((string)ViewContext.ViewData["MenuArea"] == MVC.Device.Name ? "active" : null
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 6913), false)
|
||||
, 6973), false)
|
||||
);
|
||||
|
||||
WriteLiteral(">");
|
||||
@@ -758,14 +769,14 @@ WriteLiteral(" ");
|
||||
#line hidden
|
||||
WriteLiteral(" <li");
|
||||
|
||||
WriteAttribute("class", Tuple.Create(" class=\"", 7206), Tuple.Create("\"", 7292)
|
||||
WriteAttribute("class", Tuple.Create(" class=\"", 7266), Tuple.Create("\"", 7352)
|
||||
|
||||
#line 115 "..\..\Views\Shared\_Layout.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 7214), Tuple.Create<System.Object, System.Int32>((string)ViewContext.ViewData["MenuArea"] == MVC.User.Name ? "active" : null
|
||||
, Tuple.Create(Tuple.Create("", 7274), Tuple.Create<System.Object, System.Int32>((string)ViewContext.ViewData["MenuArea"] == MVC.User.Name ? "active" : null
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 7214), false)
|
||||
, 7274), false)
|
||||
);
|
||||
|
||||
WriteLiteral(">");
|
||||
@@ -788,15 +799,15 @@ WriteLiteral("</li>\r\n");
|
||||
#line hidden
|
||||
WriteLiteral(" <li");
|
||||
|
||||
WriteAttribute("class", Tuple.Create(" class=\"", 7406), Tuple.Create("\"", 7504)
|
||||
, Tuple.Create(Tuple.Create("", 7414), Tuple.Create("moveRight", 7414), true)
|
||||
WriteAttribute("class", Tuple.Create(" class=\"", 7466), Tuple.Create("\"", 7564)
|
||||
, Tuple.Create(Tuple.Create("", 7474), Tuple.Create("moveRight", 7474), true)
|
||||
|
||||
#line 117 "..\..\Views\Shared\_Layout.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 7423), Tuple.Create<System.Object, System.Int32>((string)ViewContext.ViewData["MenuArea"] == MVC.Public.Name ? " active" : null
|
||||
, Tuple.Create(Tuple.Create("", 7483), Tuple.Create<System.Object, System.Int32>((string)ViewContext.ViewData["MenuArea"] == MVC.Public.Name ? " active" : null
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 7423), false)
|
||||
, 7483), false)
|
||||
);
|
||||
|
||||
WriteLiteral(">");
|
||||
@@ -826,14 +837,14 @@ WriteLiteral("</li>\r\n");
|
||||
#line hidden
|
||||
WriteLiteral(" <li");
|
||||
|
||||
WriteAttribute("class", Tuple.Create(" class=\"", 7682), Tuple.Create("\"", 7770)
|
||||
WriteAttribute("class", Tuple.Create(" class=\"", 7742), Tuple.Create("\"", 7830)
|
||||
|
||||
#line 120 "..\..\Views\Shared\_Layout.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 7690), Tuple.Create<System.Object, System.Int32>((string)ViewContext.ViewData["MenuArea"] == MVC.Config.Name ? "active" : null
|
||||
, Tuple.Create(Tuple.Create("", 7750), Tuple.Create<System.Object, System.Int32>((string)ViewContext.ViewData["MenuArea"] == MVC.Config.Name ? "active" : null
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 7690), false)
|
||||
, 7750), false)
|
||||
);
|
||||
|
||||
WriteLiteral(">");
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
var canRemoveOwnComments = Authorization.Has(Claims.User.Actions.RemoveOwnComments);
|
||||
}
|
||||
<div id="Comments" class="@(canAddComments ? "canAddComments" : "cannotAddComments") @(canRemoveAnyComments ? "canRemoveAnyComments" : "cannotRemoveAnyComments") @(canRemoveOwnComments ? "canRemoveOwnComments" : "cannotRemoveOwnComments")" data-id="@Model.User.UserId" data-userid="@CurrentUser.UserId" data-addurl="@Url.Action(MVC.API.User.CommentAdd(Model.User.UserId))" data-removeurl="@Url.Action(MVC.API.User.CommentRemove())" data-geturl="@Url.Action(MVC.API.User.Comment())">
|
||||
@Html.AntiForgeryToken()
|
||||
@if (canAddComments)
|
||||
{
|
||||
<div class="commentInput">
|
||||
@@ -48,7 +47,7 @@
|
||||
}
|
||||
async function onCommentAddedAsync(id) {
|
||||
const formData = new FormData();
|
||||
formData.append('__RequestVerificationToken', $comments.find('input[name="__RequestVerificationToken"]').val());
|
||||
formData.append('__RequestVerificationToken', document.body.dataset.antiforgery);
|
||||
formData.append('id', id);
|
||||
|
||||
const response = await fetch($comments.attr('data-geturl'), {
|
||||
@@ -136,7 +135,7 @@
|
||||
$commentInput.prop('disabled', true);
|
||||
|
||||
const formData = new FormData();
|
||||
formData.append('__RequestVerificationToken', $comments.find('input[name="__RequestVerificationToken"]').val());
|
||||
formData.append('__RequestVerificationToken', document.body.dataset.antiforgery);
|
||||
formData.append('comment', comment);
|
||||
|
||||
const response = await fetch($comments.attr('data-addurl'), {
|
||||
@@ -194,7 +193,7 @@
|
||||
}
|
||||
async function removeCommentAsync(commentId) {
|
||||
const formData = new FormData();
|
||||
formData.append('__RequestVerificationToken', $comments.find('input[name="__RequestVerificationToken"]').val());
|
||||
formData.append('__RequestVerificationToken', document.body.dataset.antiforgery);
|
||||
formData.append('id', commentId);
|
||||
|
||||
const response = await fetch($comments.attr('data-removeurl'), {
|
||||
|
||||
@@ -139,25 +139,14 @@ WriteLiteral("\"");
|
||||
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 9 "..\..\Views\User\UserParts\_Comments.cshtml"
|
||||
Write(Html.AntiForgeryToken());
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n");
|
||||
|
||||
|
||||
#line 10 "..\..\Views\User\UserParts\_Comments.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 10 "..\..\Views\User\UserParts\_Comments.cshtml"
|
||||
#line 9 "..\..\Views\User\UserParts\_Comments.cshtml"
|
||||
if (canAddComments)
|
||||
{
|
||||
|
||||
@@ -189,7 +178,7 @@ WriteLiteral(" class=\"fa fa-comment\"");
|
||||
WriteLiteral("></i></button>\r\n </div>\r\n");
|
||||
|
||||
|
||||
#line 16 "..\..\Views\User\UserParts\_Comments.cshtml"
|
||||
#line 15 "..\..\Views\User\UserParts\_Comments.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -202,13 +191,13 @@ WriteLiteral(" class=\"commentOutput\"");
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
|
||||
#line 18 "..\..\Views\User\UserParts\_Comments.cshtml"
|
||||
#line 17 "..\..\Views\User\UserParts\_Comments.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 18 "..\..\Views\User\UserParts\_Comments.cshtml"
|
||||
#line 17 "..\..\Views\User\UserParts\_Comments.cshtml"
|
||||
foreach (var c in Model.User.UserComments.OrderBy(m => m.Timestamp))
|
||||
{
|
||||
|
||||
@@ -222,7 +211,7 @@ WriteLiteral(" class=\"comment\"");
|
||||
WriteLiteral(" data-commentid=\"");
|
||||
|
||||
|
||||
#line 20 "..\..\Views\User\UserParts\_Comments.cshtml"
|
||||
#line 19 "..\..\Views\User\UserParts\_Comments.cshtml"
|
||||
Write(c.Id);
|
||||
|
||||
|
||||
@@ -237,7 +226,7 @@ WriteLiteral(" class=\"author\"");
|
||||
WriteLiteral(">");
|
||||
|
||||
|
||||
#line 21 "..\..\Views\User\UserParts\_Comments.cshtml"
|
||||
#line 20 "..\..\Views\User\UserParts\_Comments.cshtml"
|
||||
Write(c.TechUser.ToStringFriendly());
|
||||
|
||||
|
||||
@@ -246,7 +235,7 @@ WriteLiteral(">");
|
||||
WriteLiteral("</span>");
|
||||
|
||||
|
||||
#line 21 "..\..\Views\User\UserParts\_Comments.cshtml"
|
||||
#line 20 "..\..\Views\User\UserParts\_Comments.cshtml"
|
||||
if (canRemoveAnyComments || (canRemoveOwnComments && c.TechUserId.Equals(CurrentUser.UserId, StringComparison.OrdinalIgnoreCase)))
|
||||
{
|
||||
|
||||
@@ -259,7 +248,7 @@ WriteLiteral(" class=\"remove fa fa-times-circle\"");
|
||||
WriteLiteral("></span>");
|
||||
|
||||
|
||||
#line 22 "..\..\Views\User\UserParts\_Comments.cshtml"
|
||||
#line 21 "..\..\Views\User\UserParts\_Comments.cshtml"
|
||||
}
|
||||
|
||||
#line default
|
||||
@@ -271,7 +260,7 @@ WriteLiteral(" class=\"timestamp\"");
|
||||
WriteLiteral(" data-livestamp=\"");
|
||||
|
||||
|
||||
#line 22 "..\..\Views\User\UserParts\_Comments.cshtml"
|
||||
#line 21 "..\..\Views\User\UserParts\_Comments.cshtml"
|
||||
Write(c.Timestamp.ToUnixEpoc());
|
||||
|
||||
|
||||
@@ -279,20 +268,20 @@ WriteLiteral(" data-livestamp=\"");
|
||||
#line hidden
|
||||
WriteLiteral("\"");
|
||||
|
||||
WriteAttribute("title", Tuple.Create(" title=\"", 1701), Tuple.Create("\"", 1738)
|
||||
WriteAttribute("title", Tuple.Create(" title=\"", 1671), Tuple.Create("\"", 1708)
|
||||
|
||||
#line 22 "..\..\Views\User\UserParts\_Comments.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 1709), Tuple.Create<System.Object, System.Int32>(c.Timestamp.ToFullDateTime()
|
||||
#line 21 "..\..\Views\User\UserParts\_Comments.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 1679), Tuple.Create<System.Object, System.Int32>(c.Timestamp.ToFullDateTime()
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 1709), false)
|
||||
, 1679), false)
|
||||
);
|
||||
|
||||
WriteLiteral(">");
|
||||
|
||||
|
||||
#line 22 "..\..\Views\User\UserParts\_Comments.cshtml"
|
||||
#line 21 "..\..\Views\User\UserParts\_Comments.cshtml"
|
||||
Write(c.Timestamp.ToFullDateTime());
|
||||
|
||||
|
||||
@@ -305,7 +294,7 @@ WriteLiteral(" class=\"comment\"");
|
||||
WriteLiteral(">");
|
||||
|
||||
|
||||
#line 23 "..\..\Views\User\UserParts\_Comments.cshtml"
|
||||
#line 22 "..\..\Views\User\UserParts\_Comments.cshtml"
|
||||
Write(c.Comments.ToHtmlComment());
|
||||
|
||||
|
||||
@@ -314,7 +303,7 @@ WriteLiteral(">");
|
||||
WriteLiteral("</div>\r\n </div>\r\n");
|
||||
|
||||
|
||||
#line 25 "..\..\Views\User\UserParts\_Comments.cshtml"
|
||||
#line 24 "..\..\Views\User\UserParts\_Comments.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -331,40 +320,40 @@ WriteLiteral(" </div>\r\n</div>\r\n<script>\r\n if (!document.DiscoFunctio
|
||||
"l to Bottom\r\n }\r\n });\r\n\r\n function onCommentAdded(id) {" +
|
||||
"\r\n onCommentAddedAsync(id);\r\n }\r\n async function onComm" +
|
||||
"entAddedAsync(id) {\r\n const formData = new FormData();\r\n f" +
|
||||
"ormData.append(\'__RequestVerificationToken\', $comments.find(\'input[name=\"__Reque" +
|
||||
"stVerificationToken\"]\').val());\r\n formData.append(\'id\', id);\r\n\r\n " +
|
||||
" const response = await fetch($comments.attr(\'data-geturl\'), {\r\n " +
|
||||
" method: \'POST\',\r\n body: formData\r\n });\r\n\r\n " +
|
||||
" if (!response.ok) {\r\n alert(\'Unable to load live comment \' " +
|
||||
"+ id + \': \' + response.statusText);\r\n } else {\r\n const" +
|
||||
" comment = await response.json();\r\n\r\n if ($comments.hasClass(\'can" +
|
||||
"RemoveAnyComments\'))\r\n renderComment(comment, false, true);\r\n" +
|
||||
" else if ($comments.hasClass(\'canRemoveOwnComments\'))\r\n " +
|
||||
" renderComment(comment, false, (comment.AuthorId === $comments.attr(\'da" +
|
||||
"ta-userid\')));\r\n else\r\n renderComment(comment," +
|
||||
" false, false);\r\n }\r\n }\r\n function onCommentRemoved(id)" +
|
||||
" {\r\n $commentOutput.children(\'div[data-commentid=\"\' + id + \'\"]\').slid" +
|
||||
"eUp(300).delay(300).queue(function () {\r\n const $this = $(this);\r" +
|
||||
"\n $this.find(\'.timestamp\').livestamp(\'destroy\');\r\n " +
|
||||
" $this.remove();\r\n });\r\n }\r\n function renderComment(c, " +
|
||||
"quick, canRemove) {\r\n let t = \'<div><span class=\"author\" />\';\r\n " +
|
||||
" if (canRemove)\r\n t += \'<span class=\"remove fa fa-times-circ" +
|
||||
"le\" />\';\r\n t += \'<span class=\"timestamp\" /><div class=\"comment\" /></d" +
|
||||
"iv>\';\r\n\r\n const e = $(t);\r\n e.attr(\'data-commentid\', c.Id)" +
|
||||
";\r\n e.find(\'.author\').text(c.Author);\r\n e.find(\'.timestamp" +
|
||||
"\').text(c.TimestampFull).attr(\'title\', c.TimestampFull).livestamp(c.TimestampUni" +
|
||||
"xEpoc);\r\n e.find(\'.comment\').html(c.HtmlComments);\r\n\r\n $co" +
|
||||
"mmentOutput.append(e);\r\n\r\n if (!quick) {\r\n e.animate({" +
|
||||
" backgroundColor: \'#ffff99\' }, 500, function () {\r\n e.animate" +
|
||||
"({ backgroundColor: \'#fafafa\' }, 500, function () {\r\n e.c" +
|
||||
"ss(\'background-color\', \'\');\r\n });\r\n });\r\n " +
|
||||
" $commentOutput.animate({ scrollTop: $commentOutput[0].scrollHeight }," +
|
||||
" 250)\r\n }\r\n }\r\n\r\n document.DiscoFunctions.onCommentAdde" +
|
||||
"d = onCommentAdded;\r\n document.DiscoFunctions.onCommentRemoved = onCommen" +
|
||||
"tRemoved;\r\n });\r\n</script>\r\n");
|
||||
"ormData.append(\'__RequestVerificationToken\', document.body.dataset.antiforgery);" +
|
||||
"\r\n formData.append(\'id\', id);\r\n\r\n const response = await f" +
|
||||
"etch($comments.attr(\'data-geturl\'), {\r\n method: \'POST\',\r\n " +
|
||||
" body: formData\r\n });\r\n\r\n if (!response.ok) {\r\n " +
|
||||
" alert(\'Unable to load live comment \' + id + \': \' + response.statusTe" +
|
||||
"xt);\r\n } else {\r\n const comment = await response.json(" +
|
||||
");\r\n\r\n if ($comments.hasClass(\'canRemoveAnyComments\'))\r\n " +
|
||||
" renderComment(comment, false, true);\r\n else if ($comme" +
|
||||
"nts.hasClass(\'canRemoveOwnComments\'))\r\n renderComment(comment" +
|
||||
", false, (comment.AuthorId === $comments.attr(\'data-userid\')));\r\n " +
|
||||
" else\r\n renderComment(comment, false, false);\r\n }\r" +
|
||||
"\n }\r\n function onCommentRemoved(id) {\r\n $commentOutput." +
|
||||
"children(\'div[data-commentid=\"\' + id + \'\"]\').slideUp(300).delay(300).queue(funct" +
|
||||
"ion () {\r\n const $this = $(this);\r\n $this.find(\'.t" +
|
||||
"imestamp\').livestamp(\'destroy\');\r\n $this.remove();\r\n }" +
|
||||
");\r\n }\r\n function renderComment(c, quick, canRemove) {\r\n " +
|
||||
" let t = \'<div><span class=\"author\" />\';\r\n if (canRemove)\r\n " +
|
||||
" t += \'<span class=\"remove fa fa-times-circle\" />\';\r\n t += \'<sp" +
|
||||
"an class=\"timestamp\" /><div class=\"comment\" /></div>\';\r\n\r\n const e = " +
|
||||
"$(t);\r\n e.attr(\'data-commentid\', c.Id);\r\n e.find(\'.author\'" +
|
||||
").text(c.Author);\r\n e.find(\'.timestamp\').text(c.TimestampFull).attr(\'" +
|
||||
"title\', c.TimestampFull).livestamp(c.TimestampUnixEpoc);\r\n e.find(\'.c" +
|
||||
"omment\').html(c.HtmlComments);\r\n\r\n $commentOutput.append(e);\r\n\r\n " +
|
||||
" if (!quick) {\r\n e.animate({ backgroundColor: \'#ffff99\' }, " +
|
||||
"500, function () {\r\n e.animate({ backgroundColor: \'#fafafa\' }" +
|
||||
", 500, function () {\r\n e.css(\'background-color\', \'\');\r\n " +
|
||||
" });\r\n });\r\n $commentOutput.anima" +
|
||||
"te({ scrollTop: $commentOutput[0].scrollHeight }, 250)\r\n }\r\n }" +
|
||||
"\r\n\r\n document.DiscoFunctions.onCommentAdded = onCommentAdded;\r\n do" +
|
||||
"cument.DiscoFunctions.onCommentRemoved = onCommentRemoved;\r\n });\r\n</script>\r\n" +
|
||||
"");
|
||||
|
||||
|
||||
#line 107 "..\..\Views\User\UserParts\_Comments.cshtml"
|
||||
#line 106 "..\..\Views\User\UserParts\_Comments.cshtml"
|
||||
if (canAddComments)
|
||||
{
|
||||
|
||||
@@ -385,25 +374,25 @@ WriteLiteral(" <script>\r\n $(function () {\r\n const $comm
|
||||
" alert(\'Enter a comment to post\');\r\n $commentInput.focus(" +
|
||||
");\r\n return;\r\n }\r\n\r\n $commentIn" +
|
||||
"put.prop(\'disabled\', true);\r\n\r\n const formData = new FormData();\r" +
|
||||
"\n formData.append(\'__RequestVerificationToken\', $comments.find(\'i" +
|
||||
"nput[name=\"__RequestVerificationToken\"]\').val());\r\n formData.appe" +
|
||||
"nd(\'comment\', comment);\r\n\r\n const response = await fetch($comment" +
|
||||
"s.attr(\'data-addurl\'), {\r\n method: \'POST\',\r\n " +
|
||||
" body: formData\r\n });\r\n\r\n if (response.ok) {\r\n " +
|
||||
" $commentInput.val(\'\').prop(\'disabled\', false).focus();\r\n " +
|
||||
" } else {\r\n alert(\'Unable to add comment: \' + respon" +
|
||||
"se.statusText);\r\n $commentInput.prop(\'disabled\', false).focus" +
|
||||
"();\r\n }\r\n }\r\n });\r\n </script>\r\n");
|
||||
"\n formData.append(\'__RequestVerificationToken\', document.body.dat" +
|
||||
"aset.antiforgery);\r\n formData.append(\'comment\', comment);\r\n\r\n " +
|
||||
" const response = await fetch($comments.attr(\'data-addurl\'), {\r\n " +
|
||||
" method: \'POST\',\r\n body: formData\r\n " +
|
||||
" });\r\n\r\n if (response.ok) {\r\n $commentInput" +
|
||||
".val(\'\').prop(\'disabled\', false).focus();\r\n } else {\r\n " +
|
||||
" alert(\'Unable to add comment: \' + response.statusText);\r\n " +
|
||||
" $commentInput.prop(\'disabled\', false).focus();\r\n }\r\n " +
|
||||
" }\r\n });\r\n </script>\r\n");
|
||||
|
||||
|
||||
#line 156 "..\..\Views\User\UserParts\_Comments.cshtml"
|
||||
#line 155 "..\..\Views\User\UserParts\_Comments.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 157 "..\..\Views\User\UserParts\_Comments.cshtml"
|
||||
#line 156 "..\..\Views\User\UserParts\_Comments.cshtml"
|
||||
if (canRemoveAnyComments || canRemoveOwnComments)
|
||||
{
|
||||
|
||||
@@ -430,17 +419,16 @@ WriteLiteral(" <script>\r\n $(function () {\r\n const $comm
|
||||
" $dialogRemove.dialog(\"close\");\r\n }\r\n }).dialo" +
|
||||
"g(\'open\');\r\n }\r\n async function removeCommentAsync(comment" +
|
||||
"Id) {\r\n const formData = new FormData();\r\n formDat" +
|
||||
"a.append(\'__RequestVerificationToken\', $comments.find(\'input[name=\"__RequestVeri" +
|
||||
"ficationToken\"]\').val());\r\n formData.append(\'id\', commentId);\r\n\r\n" +
|
||||
" const response = await fetch($comments.attr(\'data-removeurl\'), {" +
|
||||
"\r\n method: \'POST\',\r\n body: formData\r\n " +
|
||||
" });\r\n\r\n if (!response.ok) {\r\n alert" +
|
||||
"(\'Unable to remove comment: \' + response.statusText);\r\n }\r\n " +
|
||||
" $dialogRemove.dialog(\"close\");\r\n }\r\n });\r\n </scri" +
|
||||
"pt>\r\n");
|
||||
"a.append(\'__RequestVerificationToken\', document.body.dataset.antiforgery);\r\n " +
|
||||
" formData.append(\'id\', commentId);\r\n\r\n const response " +
|
||||
"= await fetch($comments.attr(\'data-removeurl\'), {\r\n method: \'" +
|
||||
"POST\',\r\n body: formData\r\n });\r\n\r\n " +
|
||||
" if (!response.ok) {\r\n alert(\'Unable to remove comment: \' +" +
|
||||
" response.statusText);\r\n }\r\n $dialogRemove.dialog(" +
|
||||
"\"close\");\r\n }\r\n });\r\n </script>\r\n");
|
||||
|
||||
|
||||
#line 212 "..\..\Views\User\UserParts\_Comments.cshtml"
|
||||
#line 211 "..\..\Views\User\UserParts\_Comments.cshtml"
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -18,8 +18,7 @@
|
||||
<table id="userShowResources">
|
||||
<tr>
|
||||
<td id="AttachmentsContainer">
|
||||
<div id="Attachments" class="@(canAddAttachments ? "canAddAttachments" : "cannotAddAttachments") @(canRemoveAnyAttachments ? "canRemoveAnyAttachments" : "cannotRemoveAnyAttachments") @(canRemoveOwnAttachments ? "canRemoveOwnAttachments" : "cannotRemoveOwnAttachments")" data-userid="@CurrentUser.UserId" data-uploadurl="@(Url.Action(MVC.API.User.AttachmentUpload(Model.User.UserId, null)))" data-onlineuploadurl="@(Url.Action(MVC.API.User.AttachmentOnlineUploadSession(Model.User.UserId)))" data-qrcodeurl="@Url.Content("~/ClientSource/Scripts/Modules/qrcode.min.js")">
|
||||
@Html.AntiForgeryToken()
|
||||
<div id="Attachments" class="@(canAddAttachments ? "canAddAttachments" : "cannotAddAttachments") @(canRemoveAnyAttachments ? "canRemoveAnyAttachments" : "cannotRemoveAnyAttachments") @(canRemoveOwnAttachments ? "canRemoveOwnAttachments" : "cannotRemoveOwnAttachments")" data-userid="@CurrentUser.UserId" data-uploadurl="@(Url.Action(MVC.API.User.AttachmentUpload(Model.User.UserId, null)))" data-onlineuploadurl="@(Url.Action(MVC.API.User.AttachmentOnlineUploadSession(Model.User.UserId)))" data-qrcodeurl="@Url.Content("~/ClientSource/Scripts/Modules/qrcode.min.js")" data-removeurl="@Url.Action(MVC.API.User.AttachmentRemove())">
|
||||
<div class="Disco-AttachmentUpload-DropTarget">
|
||||
<h2>Drop Attachments Here</h2>
|
||||
</div>
|
||||
@@ -236,8 +235,6 @@
|
||||
function removeAttachment() {
|
||||
$this = $(this).closest('a');
|
||||
|
||||
var data = { id: $this.attr('data-attachmentid') };
|
||||
|
||||
if (!$dialogRemoveAttachment) {
|
||||
$dialogRemoveAttachment = $('#dialogRemoveAttachment').dialog({
|
||||
resizable: false,
|
||||
@@ -247,35 +244,36 @@
|
||||
});
|
||||
}
|
||||
|
||||
$dialogRemoveAttachment.dialog("enable");
|
||||
async function removeAttachmentAsync(id) {
|
||||
const body = new FormData();
|
||||
body.append('__RequestVerificationToken', document.body.dataset.antiforgery);
|
||||
body.append('id', id);
|
||||
|
||||
try {
|
||||
const response = await fetch($Attachments.attr('data-removeurl'), {
|
||||
body: body,
|
||||
method: 'POST'
|
||||
});
|
||||
if (!response.ok) {
|
||||
alert('Unable to remove attachment: ' + response.statusText);
|
||||
}
|
||||
$dialogRemoveAttachment.dialog("close");
|
||||
} catch (e) {
|
||||
alert('Unable to remove attachment: ' + e);
|
||||
$dialogRemoveAttachment.dialog("close");
|
||||
}
|
||||
}
|
||||
|
||||
const attachmentId = $this.attr('data-attachmentid');
|
||||
$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') {
|
||||
// Do nothing, await SignalR notification
|
||||
} else {
|
||||
alert('Unable to remove attachment: ' + d);
|
||||
}
|
||||
$dialogRemoveAttachment.dialog("close");
|
||||
},
|
||||
error: function (jqXHR, textStatus, errorThrown) {
|
||||
alert('Unable to remove attachment: ' + textStatus);
|
||||
$dialogRemoveAttachment.dialog("close");
|
||||
}
|
||||
});
|
||||
removeAttachmentAsync(attachmentId);
|
||||
},
|
||||
Cancel: function () {
|
||||
$dialogRemoveAttachment.dialog("close");
|
||||
}
|
||||
});
|
||||
|
||||
$dialogRemoveAttachment.dialog('open');
|
||||
}).dialog('open');
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -149,18 +149,18 @@ WriteLiteral(" data-qrcodeurl=\"");
|
||||
#line hidden
|
||||
WriteLiteral("\"");
|
||||
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
WriteLiteral(" data-removeurl=\"");
|
||||
|
||||
|
||||
#line 22 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
Write(Html.AntiForgeryToken());
|
||||
#line 21 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
Write(Url.Action(MVC.API.User.AttachmentRemove()));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n <div");
|
||||
WriteLiteral("\"");
|
||||
|
||||
WriteLiteral(">\r\n <div");
|
||||
|
||||
WriteLiteral(" class=\"Disco-AttachmentUpload-DropTarget\"");
|
||||
|
||||
@@ -172,13 +172,13 @@ WriteLiteral(" class=\"attachmentOutput\"");
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
|
||||
#line 27 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
#line 26 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 27 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
#line 26 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
if (Model.User.UserAttachments != null)
|
||||
{
|
||||
foreach (var ua in Model.User.UserAttachments.OrderByDescending(a => a.Id))
|
||||
@@ -189,20 +189,20 @@ WriteLiteral(">\r\n");
|
||||
#line hidden
|
||||
WriteLiteral(" <a");
|
||||
|
||||
WriteAttribute("href", Tuple.Create(" href=\"", 1868), Tuple.Create("\"", 1926)
|
||||
WriteAttribute("href", Tuple.Create(" href=\"", 1884), Tuple.Create("\"", 1942)
|
||||
|
||||
#line 31 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 1875), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.API.User.AttachmentDownload(ua.Id))
|
||||
#line 30 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 1891), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.API.User.AttachmentDownload(ua.Id))
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 1875), false)
|
||||
, 1891), false)
|
||||
);
|
||||
|
||||
WriteLiteral(" data-attachmentid=\"");
|
||||
|
||||
|
||||
#line 31 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
#line 30 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
Write(ua.Id);
|
||||
|
||||
|
||||
@@ -213,7 +213,7 @@ WriteLiteral("\"");
|
||||
WriteLiteral(" data-mimetype=\"");
|
||||
|
||||
|
||||
#line 31 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
#line 30 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
Write(ua.MimeType);
|
||||
|
||||
|
||||
@@ -225,28 +225,28 @@ WriteLiteral(">\r\n <span");
|
||||
|
||||
WriteLiteral(" class=\"icon\"");
|
||||
|
||||
WriteAttribute("title", Tuple.Create(" title=\"", 2040), Tuple.Create("\"", 2060)
|
||||
WriteAttribute("title", Tuple.Create(" title=\"", 2056), Tuple.Create("\"", 2076)
|
||||
|
||||
#line 32 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 2048), Tuple.Create<System.Object, System.Int32>(ua.Filename
|
||||
#line 31 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 2064), Tuple.Create<System.Object, System.Int32>(ua.Filename
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 2048), false)
|
||||
, 2064), false)
|
||||
);
|
||||
|
||||
WriteLiteral(">\r\n <img");
|
||||
|
||||
WriteLiteral(" alt=\"Attachment Thumbnail\"");
|
||||
|
||||
WriteAttribute("src", Tuple.Create(" src=\"", 2135), Tuple.Create("\"", 2195)
|
||||
WriteAttribute("src", Tuple.Create(" src=\"", 2151), Tuple.Create("\"", 2211)
|
||||
|
||||
#line 33 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 2141), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.API.User.AttachmentThumbnail(ua.Id))
|
||||
#line 32 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 2157), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.API.User.AttachmentThumbnail(ua.Id))
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 2141), false)
|
||||
, 2157), false)
|
||||
);
|
||||
|
||||
WriteLiteral(" />\r\n </span>\r\n " +
|
||||
@@ -254,40 +254,40 @@ WriteLiteral(" />\r\n </span>\r\n
|
||||
|
||||
WriteLiteral(" class=\"comments\"");
|
||||
|
||||
WriteAttribute("title", Tuple.Create(" title=\"", 2304), Tuple.Create("\"", 2324)
|
||||
WriteAttribute("title", Tuple.Create(" title=\"", 2320), Tuple.Create("\"", 2340)
|
||||
|
||||
#line 35 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 2312), Tuple.Create<System.Object, System.Int32>(ua.Comments
|
||||
#line 34 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 2328), Tuple.Create<System.Object, System.Int32>(ua.Comments
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 2312), false)
|
||||
, 2328), false)
|
||||
);
|
||||
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
|
||||
#line 36 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
#line 35 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 36 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
#line 35 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
if (!string.IsNullOrEmpty(ua.DocumentTemplateId))
|
||||
{
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 37 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
#line 36 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
Write(ua.DocumentTemplate.Description);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 37 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
#line 36 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -295,14 +295,14 @@ WriteLiteral(">\r\n");
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 39 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
#line 38 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
Write(ua.Comments ?? ua.Filename);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 39 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
#line 38 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
}
|
||||
|
||||
#line default
|
||||
@@ -314,7 +314,7 @@ WriteLiteral(" class=\"author\"");
|
||||
WriteLiteral(">");
|
||||
|
||||
|
||||
#line 40 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
#line 39 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
Write(ua.TechUser.ToStringFriendly());
|
||||
|
||||
|
||||
@@ -323,7 +323,7 @@ WriteLiteral(">");
|
||||
WriteLiteral("</span>");
|
||||
|
||||
|
||||
#line 40 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
#line 39 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
if (canRemoveAnyAttachments || (canRemoveOwnAttachments && ua.TechUserId.Equals(CurrentUser.UserId, StringComparison.OrdinalIgnoreCase)))
|
||||
{
|
||||
|
||||
@@ -336,7 +336,7 @@ WriteLiteral(" class=\"remove fa fa-times-circle\"");
|
||||
WriteLiteral("></span>");
|
||||
|
||||
|
||||
#line 41 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
#line 40 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
}
|
||||
|
||||
#line default
|
||||
@@ -348,7 +348,7 @@ WriteLiteral(" class=\"timestamp\"");
|
||||
WriteLiteral(" data-livestamp=\"");
|
||||
|
||||
|
||||
#line 41 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
#line 40 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
Write(ua.Timestamp.ToUnixEpoc());
|
||||
|
||||
|
||||
@@ -356,20 +356,20 @@ WriteLiteral(" data-livestamp=\"");
|
||||
#line hidden
|
||||
WriteLiteral("\"");
|
||||
|
||||
WriteAttribute("title", Tuple.Create(" title=\"", 3033), Tuple.Create("\"", 3071)
|
||||
WriteAttribute("title", Tuple.Create(" title=\"", 3049), Tuple.Create("\"", 3087)
|
||||
|
||||
#line 41 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 3041), Tuple.Create<System.Object, System.Int32>(ua.Timestamp.ToFullDateTime()
|
||||
#line 40 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 3057), Tuple.Create<System.Object, System.Int32>(ua.Timestamp.ToFullDateTime()
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 3041), false)
|
||||
, 3057), false)
|
||||
);
|
||||
|
||||
WriteLiteral(">");
|
||||
|
||||
|
||||
#line 41 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
#line 40 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
Write(ua.Timestamp.ToFullDateTime());
|
||||
|
||||
|
||||
@@ -378,7 +378,7 @@ WriteLiteral(">");
|
||||
WriteLiteral("</span>\r\n </a>\r\n");
|
||||
|
||||
|
||||
#line 43 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
#line 42 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -388,13 +388,13 @@ WriteLiteral("</span>\r\n </a>\r\n");
|
||||
WriteLiteral(" </div>\r\n");
|
||||
|
||||
|
||||
#line 46 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
#line 45 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 46 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
#line 45 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
if (canAddAttachments)
|
||||
{
|
||||
|
||||
@@ -432,7 +432,7 @@ WriteLiteral(" title=\"Upload with Online Services\"");
|
||||
WriteLiteral("></span>\r\n </div>\r\n");
|
||||
|
||||
|
||||
#line 52 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
#line 51 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -459,7 +459,7 @@ WriteLiteral(@">
|
||||
url: '");
|
||||
|
||||
|
||||
#line 67 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
#line 66 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
Write(Url.Action(MVC.API.User.Attachment()));
|
||||
|
||||
|
||||
@@ -492,7 +492,7 @@ WriteLiteral("\',\r\n dataType: \'json\',\r\n
|
||||
"chmentid\', a.Id).attr(\'data-mimetype\', a.MimeType).attr(\'href\', \'");
|
||||
|
||||
|
||||
#line 97 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
#line 96 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
Write(Url.Action(MVC.API.User.AttachmentDownload()));
|
||||
|
||||
|
||||
@@ -524,7 +524,7 @@ WriteLiteral(@"/' + a.Id);
|
||||
img.attr('src', '");
|
||||
|
||||
|
||||
#line 120 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
#line 119 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
Write(Url.Action(MVC.API.User.AttachmentThumbnail()));
|
||||
|
||||
|
||||
@@ -577,13 +577,13 @@ WriteLiteral("/\' + a.Id + \'?v=\' + retryCount);\r\n
|
||||
"DiscoFunctions.onAttachmentRemoved = onAttachmentRemoved;\r\n\r\n");
|
||||
|
||||
|
||||
#line 182 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
#line 181 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 182 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
#line 181 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
if (canAddAttachments)
|
||||
{
|
||||
|
||||
@@ -630,7 +630,7 @@ WriteLiteral("\r\n //#region Add Attachments\r\n
|
||||
" //#endregion\r\n ");
|
||||
|
||||
|
||||
#line 229 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
#line 228 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -639,69 +639,51 @@ WriteLiteral("\r\n //#region Add Attachments\r\n
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 230 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
#line 229 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
if (canRemoveAnyAttachments || canRemoveOwnAttachments)
|
||||
{
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(@"
|
||||
//#region Remove Attachments
|
||||
|
||||
$attachmentOutput.find('span.remove').click(removeAttachment);
|
||||
|
||||
function removeAttachment() {
|
||||
$this = $(this).closest('a');
|
||||
|
||||
var data = { id: $this.attr('data-attachmentid') };
|
||||
|
||||
if (!$dialogRemoveAttachment) {
|
||||
$dialogRemoveAttachment = $('#dialogRemoveAttachment').dialog({
|
||||
resizable: false,
|
||||
height: 140,
|
||||
modal: true,
|
||||
autoOpen: false
|
||||
});
|
||||
}
|
||||
|
||||
$dialogRemoveAttachment.dialog(""enable"");
|
||||
$dialogRemoveAttachment.dialog('option', 'buttons', {
|
||||
""Remove"": function () {
|
||||
$dialogRemoveAttachment.dialog(""disable"");
|
||||
$dialogRemoveAttachment.dialog(""option"", ""buttons"", null);
|
||||
$.ajax({
|
||||
url: '");
|
||||
WriteLiteral("\r\n //#region Remove Attachments\r\n\r\n " +
|
||||
" $attachmentOutput.find(\'span.remove\').click(removeAttachment);\r\n\r\n " +
|
||||
" function removeAttachment() {\r\n " +
|
||||
" $this = $(this).closest(\'a\');\r\n\r\n if (!$dia" +
|
||||
"logRemoveAttachment) {\r\n $dialogRemoveAttachm" +
|
||||
"ent = $(\'#dialogRemoveAttachment\').dialog({\r\n " +
|
||||
" resizable: false,\r\n height: 140,\r\n " +
|
||||
" modal: true,\r\n " +
|
||||
" autoOpen: false\r\n });\r\n " +
|
||||
" }\r\n\r\n async function remove" +
|
||||
"AttachmentAsync(id) {\r\n const body = new Form" +
|
||||
"Data();\r\n body.append(\'__RequestVerificationT" +
|
||||
"oken\', document.body.dataset.antiforgery);\r\n " +
|
||||
"body.append(\'id\', id);\r\n\r\n try {\r\n " +
|
||||
" const response = await fetch($Attachments.attr(\'dat" +
|
||||
"a-removeurl\'), {\r\n body: body,\r\n " +
|
||||
" method: \'POST\'\r\n " +
|
||||
" });\r\n if (!response.ok) {\r" +
|
||||
"\n alert(\'Unable to remove attachment:" +
|
||||
" \' + response.statusText);\r\n }\r\n " +
|
||||
" $dialogRemoveAttachment.dialog(\"close\");\r\n " +
|
||||
" } catch (e) {\r\n " +
|
||||
" alert(\'Unable to remove attachment: \' + e);\r\n " +
|
||||
" $dialogRemoveAttachment.dialog(\"close\");\r\n " +
|
||||
" }\r\n }\r\n\r\n c" +
|
||||
"onst attachmentId = $this.attr(\'data-attachmentid\');\r\n " +
|
||||
" $dialogRemoveAttachment.dialog(\'option\', \'buttons\', {\r\n " +
|
||||
" \"Remove\": function () {\r\n " +
|
||||
" $dialogRemoveAttachment.dialog(\"option\", \"buttons\", null);\r\n " +
|
||||
" removeAttachmentAsync(attachmentId);\r\n " +
|
||||
" },\r\n Cancel: function () {\r\n " +
|
||||
" $dialogRemoveAttachment.dialog(\"close\");\r" +
|
||||
"\n }\r\n }).dialo" +
|
||||
"g(\'open\');\r\n\r\n return false;\r\n " +
|
||||
" }\r\n\r\n //#endregion\r\n " +
|
||||
"");
|
||||
|
||||
|
||||
#line 256 "..\..\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 // Do noth" +
|
||||
"ing, await SignalR notification\r\n " +
|
||||
" } else {\r\n alert(\'Unable to " +
|
||||
"remove attachment: \' + d);\r\n }\r\n " +
|
||||
" $dialogRemoveAttachment.dialog(\"c" +
|
||||
"lose\");\r\n },\r\n " +
|
||||
" error: function (jqXHR, textStatus, errorThrown) {\r\n " +
|
||||
" alert(\'Unable to remove attachment: \' +" +
|
||||
" textStatus);\r\n $dialogRemoveAtta" +
|
||||
"chment.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 " +
|
||||
" $dialogRemoveAttachment.dialog(\'open\');\r\n\r\n " +
|
||||
" return false;\r\n }\r\n\r\n /" +
|
||||
"/#endregion\r\n ");
|
||||
|
||||
|
||||
#line 284 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
#line 282 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -725,7 +707,7 @@ WriteLiteral(@"
|
||||
$('#UserDetailTabItems').append('<li><a href=""#UserDetailTab-Resources"" id=""UserDetailTab-ResourcesLink"">Attachments [");
|
||||
|
||||
|
||||
#line 300 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
#line 298 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
Write(Model.User.UserAttachments == null ? 0 : Model.User.UserAttachments.Count);
|
||||
|
||||
|
||||
@@ -734,7 +716,7 @@ WriteLiteral(@"
|
||||
WriteLiteral("]</a></li>\');\r\n </script>\r\n</div>\r\n");
|
||||
|
||||
|
||||
#line 303 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
#line 301 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
if (canRemoveAnyAttachments || canRemoveOwnAttachments)
|
||||
{
|
||||
|
||||
@@ -756,7 +738,7 @@ WriteLiteral(" class=\"fa fa-exclamation-triangle fa-lg\"");
|
||||
WriteLiteral("></i> Are you sure?\r\n </p>\r\n </div>\r\n");
|
||||
|
||||
|
||||
#line 310 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
#line 308 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
}
|
||||
|
||||
#line default
|
||||
|
||||
Reference in New Issue
Block a user