feature: scheduled flag removal
This commit is contained in:
@@ -11,12 +11,12 @@
|
||||
<tr>
|
||||
<th class="name">Name</th>
|
||||
<th class="added">Added</th>
|
||||
<th class="sla">Comments</th>
|
||||
<th class="sla">Detail</th>
|
||||
<th class="removed">Removed</th>
|
||||
</tr>
|
||||
@foreach (var fa in flagAssignments.OrderByDescending(a => a.Item1.AddedDate))
|
||||
{
|
||||
<tr data-deviceflagassignmentid="@fa.Item1.Id" data-flagassignmentaddeddate="@(fa.Item1.AddedDate.ToString("s"))" class="@(!fa.Item1.RemovedDate.HasValue ? "added" : "removed")">
|
||||
<tr data-deviceflagassignmentid="@fa.Item1.Id" data-flagassignmentaddeddate="@(fa.Item1.AddedDate.ToString("s"))" class="@(!fa.Item1.RemovedDate.HasValue ? "added" : "removed")" data-canremove="@fa.Item1.CanRemove()" data-removeon="@(fa.Item1.RemoveDate.HasValue ? fa.Item1.RemoveDate.Value.ToString("yyyy-MM-dd") : null)">
|
||||
<td class="name">
|
||||
<i class="fa fa-@(fa.Item2.flag.Icon) fa-fw fa-lg d-@(fa.Item2.flag.IconColour)"></i>
|
||||
@if (Authorization.Has(Claims.Config.DeviceFlag.Show))
|
||||
@@ -49,11 +49,19 @@
|
||||
<div class="comments">@fa.Item1.Comments.ToHtmlComment()</div>
|
||||
<div class="commentsRaw">@fa.Item1.Comments</div>
|
||||
}
|
||||
@if (!fa.Item1.RemovedDate.HasValue && fa.Item1.RemoveDate.HasValue)
|
||||
{
|
||||
<div class="removeDate" data-date="@fa.Item1.RemoveDate.Value.ToString("yyyy-MM-dd")">Removing @CommonHelpers.FriendlyDate(fa.Item1.RemoveDate.Value)</div>
|
||||
}
|
||||
</td>
|
||||
<td class="removed@(!fa.Item1.RemovedDate.HasValue ? " na" : null)">
|
||||
@if (fa.Item1.RemovedDate.HasValue)
|
||||
{
|
||||
@CommonHelpers.FriendlyDateAndUser(fa.Item1.RemovedDate.Value, fa.Item1.RemovedUser)
|
||||
if (fa.Item1.RemoveDate.HasValue)
|
||||
{
|
||||
<em>(scheduled)</em>
|
||||
}
|
||||
if (fa.Item1.OnUnassignmentExpressionResult != null)
|
||||
{
|
||||
<div class="expressionResult">@fa.Item1.OnUnassignmentExpressionResult</div>
|
||||
@@ -61,7 +69,7 @@
|
||||
}
|
||||
else if (fa.Item1.CanRemove())
|
||||
{
|
||||
<a href="#" class="button small remove">Remove</a>
|
||||
<button type="button" class="button small remove">Remove</button>
|
||||
}
|
||||
</td>
|
||||
</tr>
|
||||
@@ -77,8 +85,8 @@
|
||||
</p>
|
||||
}
|
||||
</div>
|
||||
<div id="Device_Show_Flags_Actions_EditComments_Dialog" class="dialog" title="Edit the Comments">
|
||||
@using (Html.BeginForm(MVC.API.DeviceFlagAssignment.UpdateComments()))
|
||||
<div id="Device_Show_Flags_Actions_EditComments_Dialog" class="dialog" title="Edit Details">
|
||||
@using (Html.BeginForm(MVC.API.DeviceFlagAssignment.Edit()))
|
||||
{
|
||||
@Html.AntiForgeryToken()
|
||||
<input id="Device_Show_Flags_Actions_EditComments_Dialog_Id" type="hidden" name="id" value="" />
|
||||
@@ -87,18 +95,23 @@
|
||||
<p>
|
||||
<textarea id="Device_Show_Flags_Actions_EditComments_Dialog_Comments" name="Comments" class="block"></textarea>
|
||||
</p>
|
||||
<div>
|
||||
<h4>Remove On</h4>
|
||||
<input name="RemoveDate" id="Device_Show_Flags_Actions_EditComments_Dialog_RemoveDate" type="date" min="@(DateTime.Today.AddDays(1).ToString("yyyy-MM-dd"))" />
|
||||
<span>12:00 AM</span>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
var deviceFlags = $('#deviceFlags');
|
||||
const deviceFlags = $('#deviceFlags');
|
||||
|
||||
var dialog = null;
|
||||
var dialogEditComments = null;
|
||||
let dialog = null;
|
||||
let dialogEditComments = null;
|
||||
|
||||
deviceFlags.on('click', 'a.remove', function (e) {
|
||||
var $this = $(this);
|
||||
var DeviceFlagAssignmentId = $this.closest('tr').attr('data-deviceflagassignmentid');
|
||||
deviceFlags.on('click', 'button.remove', function (e) {
|
||||
const $this = $(this);
|
||||
const DeviceFlagAssignmentId = $this.closest('tr').attr('data-deviceflagassignmentid');
|
||||
|
||||
if (!dialog) {
|
||||
dialog = $('#Device_Show_Flags_Actions_Remove_Dialog');
|
||||
@@ -108,7 +121,7 @@
|
||||
autoOpen: false,
|
||||
buttons: {
|
||||
"Remove Flag": function () {
|
||||
var $this = $(this);
|
||||
const $this = $(this);
|
||||
$this.dialog("disable");
|
||||
$this.dialog("option", "buttons", null);
|
||||
$this.find('form').submit();
|
||||
@@ -128,8 +141,11 @@
|
||||
});
|
||||
|
||||
deviceFlags.on('click', 'td.comments i.fa-edit', function (e) {
|
||||
var $this = $(this);
|
||||
var DeviceFlagAssignmentId = $this.closest('tr').attr('data-deviceflagassignmentid');
|
||||
const $this = $(this);
|
||||
const $row = $this.closest('tr');
|
||||
const DeviceFlagAssignmentId = $row.attr('data-deviceflagassignmentid');
|
||||
const canRemove = $row.attr('data-canremove') === 'True';
|
||||
const removeOn = $row.attr('data-removeon');
|
||||
|
||||
if (!dialogEditComments) {
|
||||
dialogEditComments = $('#Device_Show_Flags_Actions_EditComments_Dialog');
|
||||
@@ -140,7 +156,7 @@
|
||||
autoOpen: false,
|
||||
buttons: {
|
||||
"Save Changes": function () {
|
||||
var $this = $(this);
|
||||
const $this = $(this);
|
||||
$this.dialog("disable");
|
||||
$this.dialog("option", "buttons", null);
|
||||
$this.find('form').submit();
|
||||
@@ -152,13 +168,28 @@
|
||||
});
|
||||
}
|
||||
|
||||
var $comments = $this.closest('td').find('.commentsRaw');
|
||||
const $comments = $this.closest('td').find('.commentsRaw');
|
||||
if ($comments.hasClass('smallMessage')) {
|
||||
$('#Device_Show_Flags_Actions_EditComments_Dialog_Comments').val('');
|
||||
} else {
|
||||
$('#Device_Show_Flags_Actions_EditComments_Dialog_Comments').val($comments.text());
|
||||
}
|
||||
|
||||
const removeOnInput = $('#Device_Show_Flags_Actions_EditComments_Dialog_RemoveDate');
|
||||
if (canRemove) {
|
||||
removeOnInput.prop('disabled', false);
|
||||
if (removeOn) {
|
||||
removeOnInput.val(removeOn);
|
||||
} else {
|
||||
removeOnInput.val('');
|
||||
}
|
||||
removeOnInput.closest('div').css('display', 'block');
|
||||
} else {
|
||||
removeOnInput.prop('disabled', true);
|
||||
removeOnInput.val('');
|
||||
removeOnInput.closest('div').css('display', 'none');
|
||||
}
|
||||
|
||||
$('#Device_Show_Flags_Actions_EditComments_Dialog_Id').val(DeviceFlagAssignmentId);
|
||||
dialogEditComments.dialog('open');
|
||||
e.preventDefault();
|
||||
|
||||
@@ -96,7 +96,7 @@ WriteLiteral(">Added</th>\r\n <th");
|
||||
|
||||
WriteLiteral(" class=\"sla\"");
|
||||
|
||||
WriteLiteral(">Comments</th>\r\n <th");
|
||||
WriteLiteral(">Detail</th>\r\n <th");
|
||||
|
||||
WriteLiteral(" class=\"removed\"");
|
||||
|
||||
@@ -140,42 +140,64 @@ WriteLiteral(" data-flagassignmentaddeddate=\"");
|
||||
#line hidden
|
||||
WriteLiteral("\"");
|
||||
|
||||
WriteAttribute("class", Tuple.Create(" class=\"", 967), Tuple.Create("\"", 1030)
|
||||
WriteAttribute("class", Tuple.Create(" class=\"", 965), Tuple.Create("\"", 1028)
|
||||
|
||||
#line 19 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 975), Tuple.Create<System.Object, System.Int32>(!fa.Item1.RemovedDate.HasValue ? "added" : "removed"
|
||||
, Tuple.Create(Tuple.Create("", 973), Tuple.Create<System.Object, System.Int32>(!fa.Item1.RemovedDate.HasValue ? "added" : "removed"
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 975), false)
|
||||
, 973), false)
|
||||
);
|
||||
|
||||
WriteLiteral(" data-canremove=\"");
|
||||
|
||||
|
||||
#line 19 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
|
||||
Write(fa.Item1.CanRemove());
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\"");
|
||||
|
||||
WriteLiteral(" data-removeon=\"");
|
||||
|
||||
|
||||
#line 19 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
|
||||
Write(fa.Item1.RemoveDate.HasValue ? fa.Item1.RemoveDate.Value.ToString("yyyy-MM-dd") : null);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\"");
|
||||
|
||||
WriteLiteral(">\r\n <td");
|
||||
|
||||
WriteLiteral(" class=\"name\"");
|
||||
|
||||
WriteLiteral(">\r\n <i");
|
||||
|
||||
WriteAttribute("class", Tuple.Create(" class=\"", 1099), Tuple.Create("\"", 1176)
|
||||
, Tuple.Create(Tuple.Create("", 1107), Tuple.Create("fa", 1107), true)
|
||||
, Tuple.Create(Tuple.Create(" ", 1109), Tuple.Create("fa-", 1110), true)
|
||||
WriteAttribute("class", Tuple.Create(" class=\"", 1242), Tuple.Create("\"", 1319)
|
||||
, Tuple.Create(Tuple.Create("", 1250), Tuple.Create("fa", 1250), true)
|
||||
, Tuple.Create(Tuple.Create(" ", 1252), Tuple.Create("fa-", 1253), true)
|
||||
|
||||
#line 21 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 1113), Tuple.Create<System.Object, System.Int32>(fa.Item2.flag.Icon
|
||||
, Tuple.Create(Tuple.Create("", 1256), Tuple.Create<System.Object, System.Int32>(fa.Item2.flag.Icon
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 1113), false)
|
||||
, Tuple.Create(Tuple.Create(" ", 1134), Tuple.Create("fa-fw", 1135), true)
|
||||
, Tuple.Create(Tuple.Create(" ", 1140), Tuple.Create("fa-lg", 1141), true)
|
||||
, Tuple.Create(Tuple.Create(" ", 1146), Tuple.Create("d-", 1147), true)
|
||||
, 1256), false)
|
||||
, Tuple.Create(Tuple.Create(" ", 1277), Tuple.Create("fa-fw", 1278), true)
|
||||
, Tuple.Create(Tuple.Create(" ", 1283), Tuple.Create("fa-lg", 1284), true)
|
||||
, Tuple.Create(Tuple.Create(" ", 1289), Tuple.Create("d-", 1290), true)
|
||||
|
||||
#line 21 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 1149), Tuple.Create<System.Object, System.Int32>(fa.Item2.flag.IconColour
|
||||
, Tuple.Create(Tuple.Create("", 1292), Tuple.Create<System.Object, System.Int32>(fa.Item2.flag.IconColour
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 1149), false)
|
||||
, 1292), false)
|
||||
);
|
||||
|
||||
WriteLiteral("></i>\r\n");
|
||||
@@ -380,29 +402,72 @@ WriteLiteral("</div>\r\n");
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" </td>\r\n <td");
|
||||
WriteLiteral(" ");
|
||||
|
||||
WriteAttribute("class", Tuple.Create(" class=\"", 2763), Tuple.Create("\"", 2826)
|
||||
, Tuple.Create(Tuple.Create("", 2771), Tuple.Create("removed", 2771), true)
|
||||
|
||||
#line 53 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 2778), Tuple.Create<System.Object, System.Int32>(!fa.Item1.RemovedDate.HasValue ? " na" : null
|
||||
#line 52 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
|
||||
if (!fa.Item1.RemovedDate.HasValue && fa.Item1.RemoveDate.HasValue)
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 2778), false)
|
||||
WriteLiteral(" <div");
|
||||
|
||||
WriteLiteral(" class=\"removeDate\"");
|
||||
|
||||
WriteLiteral(" data-date=\"");
|
||||
|
||||
|
||||
#line 54 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
|
||||
Write(fa.Item1.RemoveDate.Value.ToString("yyyy-MM-dd"));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\"");
|
||||
|
||||
WriteLiteral(">Removing ");
|
||||
|
||||
|
||||
#line 54 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
|
||||
Write(CommonHelpers.FriendlyDate(fa.Item1.RemoveDate.Value));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("</div>\r\n");
|
||||
|
||||
|
||||
#line 55 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" </td>\r\n <td");
|
||||
|
||||
WriteAttribute("class", Tuple.Create(" class=\"", 3239), Tuple.Create("\"", 3302)
|
||||
, Tuple.Create(Tuple.Create("", 3247), Tuple.Create("removed", 3247), true)
|
||||
|
||||
#line 57 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 3254), Tuple.Create<System.Object, System.Int32>(!fa.Item1.RemovedDate.HasValue ? " na" : null
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 3254), false)
|
||||
);
|
||||
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
|
||||
#line 54 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
|
||||
#line 58 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 54 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
|
||||
#line 58 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
|
||||
if (fa.Item1.RemovedDate.HasValue)
|
||||
{
|
||||
|
||||
@@ -410,15 +475,26 @@ WriteLiteral(">\r\n");
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 56 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
|
||||
#line 60 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
|
||||
Write(CommonHelpers.FriendlyDateAndUser(fa.Item1.RemovedDate.Value, fa.Item1.RemovedUser));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 56 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
|
||||
#line 60 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
|
||||
|
||||
if (fa.Item1.RemoveDate.HasValue)
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <em>(scheduled)</em>\r\n");
|
||||
|
||||
|
||||
#line 64 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
|
||||
}
|
||||
if (fa.Item1.OnUnassignmentExpressionResult != null)
|
||||
{
|
||||
|
||||
@@ -432,7 +508,7 @@ WriteLiteral(" class=\"expressionResult\"");
|
||||
WriteLiteral(">");
|
||||
|
||||
|
||||
#line 59 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
|
||||
#line 67 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
|
||||
Write(fa.Item1.OnUnassignmentExpressionResult);
|
||||
|
||||
|
||||
@@ -441,7 +517,7 @@ WriteLiteral(">");
|
||||
WriteLiteral("</div>\r\n");
|
||||
|
||||
|
||||
#line 60 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
|
||||
#line 68 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
|
||||
}
|
||||
}
|
||||
else if (fa.Item1.CanRemove())
|
||||
@@ -450,16 +526,16 @@ WriteLiteral("</div>\r\n");
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <a");
|
||||
WriteLiteral(" <button");
|
||||
|
||||
WriteLiteral(" href=\"#\"");
|
||||
WriteLiteral(" type=\"button\"");
|
||||
|
||||
WriteLiteral(" class=\"button small remove\"");
|
||||
|
||||
WriteLiteral(">Remove</a>\r\n");
|
||||
WriteLiteral(">Remove</button>\r\n");
|
||||
|
||||
|
||||
#line 65 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
|
||||
#line 73 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -468,7 +544,7 @@ WriteLiteral(">Remove</a>\r\n");
|
||||
WriteLiteral(" </td>\r\n </tr>\r\n");
|
||||
|
||||
|
||||
#line 68 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
|
||||
#line 76 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -487,13 +563,13 @@ WriteLiteral(" title=\"Remove this flag from the device?\"");
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
|
||||
#line 71 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
|
||||
#line 79 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 71 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
|
||||
#line 79 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
|
||||
using (Html.BeginForm(MVC.API.DeviceFlagAssignment.RemoveDevice()))
|
||||
{
|
||||
|
||||
@@ -501,14 +577,14 @@ WriteLiteral(">\r\n");
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 73 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
|
||||
#line 81 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
|
||||
Write(Html.AntiForgeryToken());
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 73 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
|
||||
#line 81 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
|
||||
|
||||
|
||||
|
||||
@@ -533,7 +609,7 @@ WriteLiteral(" class=\"fa fa-exclamation-triangle fa-lg\"");
|
||||
WriteLiteral("></i> Are you sure?\r\n </p>\r\n");
|
||||
|
||||
|
||||
#line 78 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
|
||||
#line 86 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -547,33 +623,33 @@ WriteLiteral(" id=\"Device_Show_Flags_Actions_EditComments_Dialog\"");
|
||||
|
||||
WriteLiteral(" class=\"dialog\"");
|
||||
|
||||
WriteLiteral(" title=\"Edit the Comments\"");
|
||||
WriteLiteral(" title=\"Edit Details\"");
|
||||
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
|
||||
#line 81 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
|
||||
#line 89 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 81 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
|
||||
using (Html.BeginForm(MVC.API.DeviceFlagAssignment.UpdateComments()))
|
||||
#line 89 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
|
||||
using (Html.BeginForm(MVC.API.DeviceFlagAssignment.Edit()))
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 83 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
|
||||
#line 91 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
|
||||
Write(Html.AntiForgeryToken());
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 83 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
|
||||
#line 91 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
|
||||
|
||||
|
||||
|
||||
@@ -613,8 +689,29 @@ WriteLiteral(" class=\"block\"");
|
||||
|
||||
WriteLiteral("></textarea>\r\n </p>\r\n");
|
||||
|
||||
WriteLiteral(" <div>\r\n <h4>Remove On</h4>\r\n " +
|
||||
" <input");
|
||||
|
||||
WriteLiteral(" name=\"RemoveDate\"");
|
||||
|
||||
WriteLiteral(" id=\"Device_Show_Flags_Actions_EditComments_Dialog_RemoveDate\"");
|
||||
|
||||
WriteLiteral(" type=\"date\"");
|
||||
|
||||
WriteAttribute("min", Tuple.Create(" min=\"", 5593), Tuple.Create("\"", 5650)
|
||||
|
||||
#line 90 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
|
||||
#line 100 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 5599), Tuple.Create<System.Object, System.Int32>(DateTime.Today.AddDays(1).ToString("yyyy-MM-dd")
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 5599), false)
|
||||
);
|
||||
|
||||
WriteLiteral(" />\r\n <span>12:00 AM</span>\r\n </div>\r\n");
|
||||
|
||||
|
||||
#line 103 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -626,53 +723,65 @@ WriteLiteral(" <script");
|
||||
|
||||
WriteLiteral(" type=\"text/javascript\"");
|
||||
|
||||
WriteLiteral(">\r\n $(function () {\r\n var deviceFlags = $(\'#deviceFlags" +
|
||||
"\');\r\n\r\n var dialog = null;\r\n var dialogEditComment" +
|
||||
"s = null;\r\n\r\n deviceFlags.on(\'click\', \'a.remove\', function (e) {\r" +
|
||||
"\n var $this = $(this);\r\n var DeviceFlagAss" +
|
||||
"ignmentId = $this.closest(\'tr\').attr(\'data-deviceflagassignmentid\');\r\n\r\n " +
|
||||
" if (!dialog) {\r\n dialog = $(\'#Device_Show_Fla" +
|
||||
"gs_Actions_Remove_Dialog\');\r\n dialog.dialog({\r\n " +
|
||||
" resizable: false,\r\n modal: true,\r\n " +
|
||||
" autoOpen: false,\r\n buttons" +
|
||||
": {\r\n \"Remove Flag\": function () {\r\n " +
|
||||
" var $this = $(this);\r\n " +
|
||||
" $this.dialog(\"disable\");\r\n $this.dialog(\"opt" +
|
||||
"ion\", \"buttons\", null);\r\n $this.find(\'form\')." +
|
||||
"submit();\r\n },\r\n C" +
|
||||
"ancel: function () {\r\n $(this).dialog(\"close\"" +
|
||||
");\r\n }\r\n }\r\n " +
|
||||
" });\r\n }\r\n\r\n $(\'#Device_Show_" +
|
||||
"Flags_Actions_Remove_Dialog_Id\').val(DeviceFlagAssignmentId);\r\n " +
|
||||
" dialog.dialog(\'open\');\r\n\r\n e.preventDefault();\r\n " +
|
||||
" return false;\r\n });\r\n\r\n deviceFlags.on(\'" +
|
||||
"click\', \'td.comments i.fa-edit\', function (e) {\r\n var $this =" +
|
||||
" $(this);\r\n var DeviceFlagAssignmentId = $this.closest(\'tr\')." +
|
||||
"attr(\'data-deviceflagassignmentid\');\r\n\r\n if (!dialogEditComme" +
|
||||
"nts) {\r\n dialogEditComments = $(\'#Device_Show_Flags_Actio" +
|
||||
"ns_EditComments_Dialog\');\r\n dialogEditComments.dialog({\r\n" +
|
||||
" resizable: false,\r\n modal" +
|
||||
": true,\r\n width: 320,\r\n au" +
|
||||
"toOpen: false,\r\n buttons: {\r\n " +
|
||||
" \"Save Changes\": function () {\r\n var $" +
|
||||
"this = $(this);\r\n $this.dialog(\"disable\");\r\n " +
|
||||
" $this.dialog(\"option\", \"buttons\", null);\r\n " +
|
||||
" $this.find(\'form\').submit();\r\n " +
|
||||
" },\r\n Cancel: function () {\r\n " +
|
||||
" $(this).dialog(\"close\");\r\n " +
|
||||
" }\r\n }\r\n });\r\n " +
|
||||
" }\r\n\r\n var $comments = $this.closest(\'td\').find(\'.c" +
|
||||
"ommentsRaw\');\r\n if ($comments.hasClass(\'smallMessage\')) {\r\n " +
|
||||
" $(\'#Device_Show_Flags_Actions_EditComments_Dialog_Comments" +
|
||||
"\').val(\'\');\r\n } else {\r\n $(\'#Device_Sh" +
|
||||
"ow_Flags_Actions_EditComments_Dialog_Comments\').val($comments.text());\r\n " +
|
||||
" }\r\n\r\n $(\'#Device_Show_Flags_Actions_EditComments_" +
|
||||
"Dialog_Id\').val(DeviceFlagAssignmentId);\r\n dialogEditComments" +
|
||||
".dialog(\'open\');\r\n e.preventDefault();\r\n r" +
|
||||
"eturn false;\r\n });\r\n });\r\n </script>\r\n");
|
||||
WriteLiteral(">\r\n $(function () {\r\n const deviceFlags = $(\'#deviceFla" +
|
||||
"gs\');\r\n\r\n let dialog = null;\r\n let dialogEditComme" +
|
||||
"nts = null;\r\n\r\n deviceFlags.on(\'click\', \'button.remove\', function" +
|
||||
" (e) {\r\n const $this = $(this);\r\n const De" +
|
||||
"viceFlagAssignmentId = $this.closest(\'tr\').attr(\'data-deviceflagassignmentid\');\r" +
|
||||
"\n\r\n if (!dialog) {\r\n dialog = $(\'#Devi" +
|
||||
"ce_Show_Flags_Actions_Remove_Dialog\');\r\n dialog.dialog({\r" +
|
||||
"\n resizable: false,\r\n moda" +
|
||||
"l: true,\r\n autoOpen: false,\r\n " +
|
||||
" buttons: {\r\n \"Remove Flag\": function () {\r\n " +
|
||||
" const $this = $(this);\r\n " +
|
||||
" $this.dialog(\"disable\");\r\n $thi" +
|
||||
"s.dialog(\"option\", \"buttons\", null);\r\n $this." +
|
||||
"find(\'form\').submit();\r\n },\r\n " +
|
||||
" Cancel: function () {\r\n $(this).d" +
|
||||
"ialog(\"close\");\r\n }\r\n " +
|
||||
"}\r\n });\r\n }\r\n\r\n $(\'" +
|
||||
"#Device_Show_Flags_Actions_Remove_Dialog_Id\').val(DeviceFlagAssignmentId);\r\n " +
|
||||
" dialog.dialog(\'open\');\r\n\r\n e.preventDefault()" +
|
||||
";\r\n return false;\r\n });\r\n\r\n dev" +
|
||||
"iceFlags.on(\'click\', \'td.comments i.fa-edit\', function (e) {\r\n " +
|
||||
" const $this = $(this);\r\n const $row = $this.closest(\'tr\');\r" +
|
||||
"\n const DeviceFlagAssignmentId = $row.attr(\'data-deviceflagas" +
|
||||
"signmentid\');\r\n const canRemove = $row.attr(\'data-canremove\')" +
|
||||
" === \'True\';\r\n const removeOn = $row.attr(\'data-removeon\');\r\n" +
|
||||
"\r\n if (!dialogEditComments) {\r\n dialog" +
|
||||
"EditComments = $(\'#Device_Show_Flags_Actions_EditComments_Dialog\');\r\n " +
|
||||
" dialogEditComments.dialog({\r\n resizable:" +
|
||||
" false,\r\n modal: true,\r\n w" +
|
||||
"idth: 320,\r\n autoOpen: false,\r\n " +
|
||||
" buttons: {\r\n \"Save Changes\": function () {\r" +
|
||||
"\n const $this = $(this);\r\n " +
|
||||
" $this.dialog(\"disable\");\r\n $" +
|
||||
"this.dialog(\"option\", \"buttons\", null);\r\n $th" +
|
||||
"is.find(\'form\').submit();\r\n },\r\n " +
|
||||
" Cancel: function () {\r\n $(this" +
|
||||
").dialog(\"close\");\r\n }\r\n " +
|
||||
" }\r\n });\r\n }\r\n\r\n " +
|
||||
"const $comments = $this.closest(\'td\').find(\'.commentsRaw\');\r\n " +
|
||||
" if ($comments.hasClass(\'smallMessage\')) {\r\n $(\'#Device_S" +
|
||||
"how_Flags_Actions_EditComments_Dialog_Comments\').val(\'\');\r\n }" +
|
||||
" else {\r\n $(\'#Device_Show_Flags_Actions_EditComments_Dial" +
|
||||
"og_Comments\').val($comments.text());\r\n }\r\n\r\n " +
|
||||
" const removeOnInput = $(\'#Device_Show_Flags_Actions_EditComments_Dialog_Remov" +
|
||||
"eDate\');\r\n if (canRemove) {\r\n removeOn" +
|
||||
"Input.prop(\'disabled\', false);\r\n if (removeOn) {\r\n " +
|
||||
" removeOnInput.val(removeOn);\r\n } els" +
|
||||
"e {\r\n removeOnInput.val(\'\');\r\n " +
|
||||
" }\r\n removeOnInput.closest(\'div\').css(\'display\', \'block\')" +
|
||||
";\r\n } else {\r\n removeOnInput.prop(\'dis" +
|
||||
"abled\', true);\r\n removeOnInput.val(\'\');\r\n " +
|
||||
" removeOnInput.closest(\'div\').css(\'display\', \'none\');\r\n " +
|
||||
" }\r\n\r\n $(\'#Device_Show_Flags_Actions_EditComments_Dialog_Id\'" +
|
||||
").val(DeviceFlagAssignmentId);\r\n dialogEditComments.dialog(\'o" +
|
||||
"pen\');\r\n e.preventDefault();\r\n return fals" +
|
||||
"e;\r\n });\r\n });\r\n </script>\r\n");
|
||||
|
||||
|
||||
#line 169 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
|
||||
#line 200 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -687,7 +796,7 @@ WriteLiteral(" class=\"none\"");
|
||||
WriteLiteral(">This device has no associated flags</div>\r\n");
|
||||
|
||||
|
||||
#line 173 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
|
||||
#line 204 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -697,7 +806,7 @@ WriteLiteral(" <script>\r\n $(\'#DeviceDetailTabItems\').append(\'<li>
|
||||
"ilTab-Flags\">Flags [");
|
||||
|
||||
|
||||
#line 175 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
|
||||
#line 206 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
|
||||
Write(activeAssignmentCount);
|
||||
|
||||
|
||||
|
||||
@@ -776,12 +776,12 @@
|
||||
{
|
||||
@Html.AntiForgeryToken()
|
||||
<input id="Device_Show_Details_Actions_AddFlag_Dialog_Id" type="hidden" name="id" />
|
||||
<input id="Device_Show_Details_Actions_AddFlag_Dialog_DeviceSerialNumber" type="hidden" name="DeviceSerialNumber" value="@Model.Device.SerialNumber" />
|
||||
<input id="Device_Show_Details_Actions_AddFlag_Dialog_DeviceSerialNumber" type="hidden" name="deviceSerialNumber" value="@Model.Device.SerialNumber" />
|
||||
<div class="flagPicker">
|
||||
<input id="Device_Show_Details_Actions_AddFlag_Dialog_Filter" type="text" placeholder="Filter" autocomplete="off" />
|
||||
@foreach (var flag in Model.AvailableDeviceFlags.OrderBy(jq => jq.Name))
|
||||
{
|
||||
<div class="flag" data-flagid="@(flag.Id)" data-flagname="@flag.Name">
|
||||
<div class="flag" data-flagid="@(flag.Id)" data-flagname="@flag.Name" data-flagcanremove="@Model.Device.CanRemoveDeviceFlag(flag)" data-flagremovedays="@flag.DefaultRemoveDays">
|
||||
<i class="fa fa-@(flag.Icon) fa-fw fa-lg d-@(flag.IconColour)"></i>@flag.Name
|
||||
</div>
|
||||
}
|
||||
@@ -789,7 +789,12 @@
|
||||
<div class="details">
|
||||
<div>
|
||||
<h4>Comments</h4>
|
||||
<textarea name="Comments" id="Device_Show_Details_Actions_AddFlag_Dialog_Comments"></textarea>
|
||||
<textarea name="comments" id="Device_Show_Details_Actions_AddFlag_Dialog_Comments"></textarea>
|
||||
</div>
|
||||
<div>
|
||||
<h4>Remove On</h4>
|
||||
<input name="removeDate" id="Device_Show_Details_Actions_AddFlag_Dialog_RemoveDate" type="date" min="@(DateTime.Today.AddDays(1).ToString("yyyy-MM-dd"))" />
|
||||
<span>12:00 AM</span>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
@@ -802,6 +807,7 @@
|
||||
let flagPicker = null;
|
||||
let flagAddId = null;
|
||||
let flagAddComments = null;
|
||||
let flagAddRemoveDate = null;
|
||||
let details = null;
|
||||
|
||||
function flagSelected() {
|
||||
@@ -812,6 +818,26 @@
|
||||
|
||||
flagAddId.val(flag.attr('data-flagid'));
|
||||
|
||||
const removeDays = flag.attr('data-flagremovedays');
|
||||
if (removeDays) {
|
||||
const date = new Date();
|
||||
date.setDate(date.getDate() + parseInt(removeDays) - 1);
|
||||
flagAddRemoveDate[0].valueAsDate = date;
|
||||
flagAddRemoveDate.trigger('change');
|
||||
} else {
|
||||
flagAddRemoveDate[0].valueAsDate = null;
|
||||
flagAddRemoveDate.trigger('change');
|
||||
}
|
||||
flagAddRemoveDate.closest('div').show();
|
||||
if (flag.attr('data-flagcanremove') === 'True') {
|
||||
flagAddRemoveDate.prop('disabled', false);
|
||||
} else {
|
||||
flagAddRemoveDate.prop('disabled', true);
|
||||
if (!removeDays) {
|
||||
flagAddRemoveDate.closest('div').hide();
|
||||
}
|
||||
}
|
||||
|
||||
details.show();
|
||||
|
||||
flagAddComments.focus().select();
|
||||
@@ -844,6 +870,7 @@
|
||||
|
||||
flagAddId = $('#Device_Show_Details_Actions_AddFlag_Dialog_Id');
|
||||
flagAddComments = buttonDialog.find('#Device_Show_Details_Actions_AddFlag_Dialog_Comments');
|
||||
flagAddRemoveDate = buttonDialog.find('#Device_Show_Details_Actions_AddFlag_Dialog_RemoveDate');
|
||||
flagPicker = buttonDialog.find('.flagPicker');
|
||||
details = buttonDialog.find('.details');
|
||||
|
||||
@@ -864,6 +891,13 @@
|
||||
});
|
||||
|
||||
flagPicker.on('click', 'div.flag', flagSelected);
|
||||
flagAddRemoveDate.on('change', function () {
|
||||
if (flagAddRemoveDate.val()) {
|
||||
flagAddRemoveDate.next('span').show();
|
||||
} else {
|
||||
flagAddRemoveDate.next('span').hide();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
$('#Device_Show_Details_Actions_AddFlag_Dialog_Filter').val('');
|
||||
|
||||
@@ -2843,7 +2843,7 @@ WriteLiteral(" id=\"Device_Show_Details_Actions_AddFlag_Dialog_DeviceSerialNumbe
|
||||
|
||||
WriteLiteral(" type=\"hidden\"");
|
||||
|
||||
WriteLiteral(" name=\"DeviceSerialNumber\"");
|
||||
WriteLiteral(" name=\"deviceSerialNumber\"");
|
||||
|
||||
WriteAttribute("value", Tuple.Create(" value=\"", 49530), Tuple.Create("\"", 49564)
|
||||
|
||||
@@ -2913,28 +2913,50 @@ WriteLiteral(" data-flagname=\"");
|
||||
#line hidden
|
||||
WriteLiteral("\"");
|
||||
|
||||
WriteLiteral(" data-flagcanremove=\"");
|
||||
|
||||
|
||||
#line 784 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
Write(Model.Device.CanRemoveDeviceFlag(flag));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\"");
|
||||
|
||||
WriteLiteral(" data-flagremovedays=\"");
|
||||
|
||||
|
||||
#line 784 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
Write(flag.DefaultRemoveDays);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\"");
|
||||
|
||||
WriteLiteral(">\r\n <i");
|
||||
|
||||
WriteAttribute("class", Tuple.Create(" class=\"", 50041), Tuple.Create("\"", 50100)
|
||||
, Tuple.Create(Tuple.Create("", 50049), Tuple.Create("fa", 50049), true)
|
||||
, Tuple.Create(Tuple.Create(" ", 50051), Tuple.Create("fa-", 50052), true)
|
||||
WriteAttribute("class", Tuple.Create(" class=\"", 50148), Tuple.Create("\"", 50207)
|
||||
, Tuple.Create(Tuple.Create("", 50156), Tuple.Create("fa", 50156), true)
|
||||
, Tuple.Create(Tuple.Create(" ", 50158), Tuple.Create("fa-", 50159), true)
|
||||
|
||||
#line 785 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 50055), Tuple.Create<System.Object, System.Int32>(flag.Icon
|
||||
, Tuple.Create(Tuple.Create("", 50162), Tuple.Create<System.Object, System.Int32>(flag.Icon
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 50055), false)
|
||||
, Tuple.Create(Tuple.Create(" ", 50067), Tuple.Create("fa-fw", 50068), true)
|
||||
, Tuple.Create(Tuple.Create(" ", 50073), Tuple.Create("fa-lg", 50074), true)
|
||||
, Tuple.Create(Tuple.Create(" ", 50079), Tuple.Create("d-", 50080), true)
|
||||
, 50162), false)
|
||||
, Tuple.Create(Tuple.Create(" ", 50174), Tuple.Create("fa-fw", 50175), true)
|
||||
, Tuple.Create(Tuple.Create(" ", 50180), Tuple.Create("fa-lg", 50181), true)
|
||||
, Tuple.Create(Tuple.Create(" ", 50186), Tuple.Create("d-", 50187), true)
|
||||
|
||||
#line 785 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 50082), Tuple.Create<System.Object, System.Int32>(flag.IconColour
|
||||
, Tuple.Create(Tuple.Create("", 50189), Tuple.Create<System.Object, System.Int32>(flag.IconColour
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 50082), false)
|
||||
, 50189), false)
|
||||
);
|
||||
|
||||
WriteLiteral("></i>");
|
||||
@@ -2964,15 +2986,35 @@ WriteLiteral(" class=\"details\"");
|
||||
WriteLiteral(">\r\n <div>\r\n <h4>Comment" +
|
||||
"s</h4>\r\n <textarea");
|
||||
|
||||
WriteLiteral(" name=\"Comments\"");
|
||||
WriteLiteral(" name=\"comments\"");
|
||||
|
||||
WriteLiteral(" id=\"Device_Show_Details_Actions_AddFlag_Dialog_Comments\"");
|
||||
|
||||
WriteLiteral("></textarea>\r\n </div>\r\n </div>\r" +
|
||||
"\n");
|
||||
WriteLiteral("></textarea>\r\n </div>\r\n <di" +
|
||||
"v>\r\n <h4>Remove On</h4>\r\n " +
|
||||
" <input");
|
||||
|
||||
WriteLiteral(" name=\"removeDate\"");
|
||||
|
||||
WriteLiteral(" id=\"Device_Show_Details_Actions_AddFlag_Dialog_RemoveDate\"");
|
||||
|
||||
WriteLiteral(" type=\"date\"");
|
||||
|
||||
WriteAttribute("min", Tuple.Create(" min=\"", 50839), Tuple.Create("\"", 50896)
|
||||
|
||||
#line 796 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 50845), Tuple.Create<System.Object, System.Int32>(DateTime.Today.AddDays(1).ToString("yyyy-MM-dd")
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 50845), false)
|
||||
);
|
||||
|
||||
WriteLiteral(" />\r\n <span>12:00 AM</span>\r\n " +
|
||||
" </div>\r\n </div>\r\n");
|
||||
|
||||
|
||||
#line 795 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
#line 800 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -2988,56 +3030,78 @@ WriteLiteral(">\r\n $(function () {\r\n
|
||||
"\'#Device_Show_Details_Actions_AddFlag_Button\');\r\n let but" +
|
||||
"tonDialog = null;\r\n\r\n let flagPicker = null;\r\n " +
|
||||
" let flagAddId = null;\r\n let flagAddComments " +
|
||||
"= null;\r\n let details = null;\r\n\r\n " +
|
||||
"function flagSelected() {\r\n const flag = $(this);\r\n\r\n" +
|
||||
" flagPicker.children().removeClass(\'selected\');\r\n " +
|
||||
" flag.addClass(\'selected\');\r\n\r\n " +
|
||||
" flagAddId.val(flag.attr(\'data-flagid\'));\r\n\r\n detail" +
|
||||
"s.show();\r\n\r\n flagAddComments.focus().select();\r\n " +
|
||||
" }\r\n\r\n button.click(function (e) {\r\n " +
|
||||
" if (!buttonDialog) {\r\n " +
|
||||
"buttonDialog = $(\'#Device_Show_Details_Actions_AddFlag_Dialog\');\r\n " +
|
||||
" buttonDialog.dialog({\r\n wid" +
|
||||
"th: 600,\r\n height: 410,\r\n " +
|
||||
" resizable: false,\r\n modal: tr" +
|
||||
"ue,\r\n autoOpen: false,\r\n " +
|
||||
" buttons: {\r\n Cancel: funct" +
|
||||
"ion () {\r\n $(this).dialog(\"close\");\r\n" +
|
||||
" },\r\n " +
|
||||
" \"Add Flag\": function () {\r\n if (!" +
|
||||
"!flagAddId.val()) {\r\n buttonDialo" +
|
||||
"g\r\n .dialog(\"option\", \"button" +
|
||||
"s\", null)\r\n .find(\'form\').sub" +
|
||||
"mit();\r\n } else {\r\n " +
|
||||
" alert(\'Select a Device Flag\');\r\n " +
|
||||
" }\r\n }\r\n " +
|
||||
" }\r\n });\r\n\r\n " +
|
||||
" flagAddId = $(\'#Device_Show_Details_Actions_AddFlag_Dialog" +
|
||||
"_Id\');\r\n flagAddComments = buttonDialog.find(\'#De" +
|
||||
"vice_Show_Details_Actions_AddFlag_Dialog_Comments\');\r\n " +
|
||||
" flagPicker = buttonDialog.find(\'.flagPicker\');\r\n " +
|
||||
" details = buttonDialog.find(\'.details\');\r\n\r\n " +
|
||||
" $(\'#Device_Show_Details_Actions_AddFlag_Dialog_Filter\').on(\'keyup\', function (" +
|
||||
"e) {\r\n const filter = $(e.currentTarget).val(" +
|
||||
").toLowerCase();\r\n if (filter) {\r\n " +
|
||||
" flagPicker.children(\'div.flag\').each(function () {\r" +
|
||||
"\n const $this = $(this);\r\n " +
|
||||
" if ($this.attr(\'data-flagname\').toLowerCase().i" +
|
||||
"ndexOf(filter) >= 0) {\r\n $this.cs" +
|
||||
"s(\'display\', \'block\');\r\n } else {\r\n " +
|
||||
" $this.css(\'display\', \'none\');\r\n " +
|
||||
" }\r\n " +
|
||||
" });\r\n } else {\r\n " +
|
||||
" flagPicker.children(\'div.flag\').each(function () { $(this).css(\'d" +
|
||||
"isplay\', \'block\'); });\r\n }\r\n " +
|
||||
" });\r\n\r\n flagPicker.on(\'click\', \'di" +
|
||||
"v.flag\', flagSelected);\r\n }\r\n\r\n " +
|
||||
" $(\'#Device_Show_Details_Actions_AddFlag_Dialog_Filter\').val(\'\');\r\n " +
|
||||
" buttonDialog.dialog(\'open\');\r\n });\r\n " +
|
||||
" });\r\n </script>\r\n");
|
||||
"= null;\r\n let flagAddRemoveDate = null;\r\n " +
|
||||
" let details = null;\r\n\r\n function flagSelected() {" +
|
||||
"\r\n const flag = $(this);\r\n\r\n " +
|
||||
" flagPicker.children().removeClass(\'selected\');\r\n f" +
|
||||
"lag.addClass(\'selected\');\r\n\r\n flagAddId.val(flag.attr" +
|
||||
"(\'data-flagid\'));\r\n\r\n const removeDays = flag.attr(\'d" +
|
||||
"ata-flagremovedays\');\r\n if (removeDays) {\r\n " +
|
||||
" const date = new Date();\r\n " +
|
||||
"date.setDate(date.getDate() + parseInt(removeDays) - 1);\r\n " +
|
||||
" flagAddRemoveDate[0].valueAsDate = date;\r\n " +
|
||||
" flagAddRemoveDate.trigger(\'change\');\r\n } else {\r\n" +
|
||||
" flagAddRemoveDate[0].valueAsDate = null;\r\n " +
|
||||
" flagAddRemoveDate.trigger(\'change\');\r\n " +
|
||||
" }\r\n flagAddRemoveDate.closest(\'div\').show" +
|
||||
"();\r\n if (flag.attr(\'data-flagcanremove\') === \'True\')" +
|
||||
" {\r\n flagAddRemoveDate.prop(\'disabled\', false);\r\n" +
|
||||
" } else {\r\n flagAddRem" +
|
||||
"oveDate.prop(\'disabled\', true);\r\n if (!removeDays" +
|
||||
") {\r\n flagAddRemoveDate.closest(\'div\').hide()" +
|
||||
";\r\n }\r\n }\r\n\r\n " +
|
||||
" details.show();\r\n\r\n flagAddComment" +
|
||||
"s.focus().select();\r\n }\r\n\r\n button" +
|
||||
".click(function (e) {\r\n if (!buttonDialog) {\r\n " +
|
||||
" buttonDialog = $(\'#Device_Show_Details_Actions_AddFlag_" +
|
||||
"Dialog\');\r\n buttonDialog.dialog({\r\n " +
|
||||
" width: 600,\r\n height: 4" +
|
||||
"10,\r\n resizable: false,\r\n " +
|
||||
" modal: true,\r\n autoOpen: fals" +
|
||||
"e,\r\n buttons: {\r\n " +
|
||||
" Cancel: function () {\r\n $" +
|
||||
"(this).dialog(\"close\");\r\n },\r\n " +
|
||||
" \"Add Flag\": function () {\r\n " +
|
||||
" if (!!flagAddId.val()) {\r\n " +
|
||||
" buttonDialog\r\n " +
|
||||
".dialog(\"option\", \"buttons\", null)\r\n " +
|
||||
" .find(\'form\').submit();\r\n } e" +
|
||||
"lse {\r\n alert(\'Select a Device Fl" +
|
||||
"ag\');\r\n }\r\n " +
|
||||
" }\r\n }\r\n " +
|
||||
" });\r\n\r\n flagAddId = $(\'#Device_Show_Detai" +
|
||||
"ls_Actions_AddFlag_Dialog_Id\');\r\n flagAddComments" +
|
||||
" = buttonDialog.find(\'#Device_Show_Details_Actions_AddFlag_Dialog_Comments\');\r\n " +
|
||||
" flagAddRemoveDate = buttonDialog.find(\'#Device_Sh" +
|
||||
"ow_Details_Actions_AddFlag_Dialog_RemoveDate\');\r\n " +
|
||||
" flagPicker = buttonDialog.find(\'.flagPicker\');\r\n " +
|
||||
" details = buttonDialog.find(\'.details\');\r\n\r\n $(\'" +
|
||||
"#Device_Show_Details_Actions_AddFlag_Dialog_Filter\').on(\'keyup\', function (e) {\r" +
|
||||
"\n const filter = $(e.currentTarget).val().toL" +
|
||||
"owerCase();\r\n if (filter) {\r\n " +
|
||||
" flagPicker.children(\'div.flag\').each(function () {\r\n " +
|
||||
" const $this = $(this);\r\n " +
|
||||
" if ($this.attr(\'data-flagname\').toLowerCase().indexO" +
|
||||
"f(filter) >= 0) {\r\n $this.css(\'di" +
|
||||
"splay\', \'block\');\r\n } else {\r\n " +
|
||||
" $this.css(\'display\', \'none\');\r\n " +
|
||||
" }\r\n }" +
|
||||
");\r\n } else {\r\n " +
|
||||
" flagPicker.children(\'div.flag\').each(function () { $(this).css(\'displa" +
|
||||
"y\', \'block\'); });\r\n }\r\n " +
|
||||
" });\r\n\r\n flagPicker.on(\'click\', \'div.fla" +
|
||||
"g\', flagSelected);\r\n flagAddRemoveDate.on(\'change" +
|
||||
"\', function () {\r\n if (flagAddRemoveDate.val(" +
|
||||
")) {\r\n flagAddRemoveDate.next(\'span\').sho" +
|
||||
"w();\r\n } else {\r\n " +
|
||||
" flagAddRemoveDate.next(\'span\').hide();\r\n " +
|
||||
" }\r\n });\r\n }\r\n\r" +
|
||||
"\n $(\'#Device_Show_Details_Actions_AddFlag_Dialog_Filt" +
|
||||
"er\').val(\'\');\r\n buttonDialog.dialog(\'open\');\r\n " +
|
||||
" });\r\n });\r\n </script>\r\n");
|
||||
|
||||
|
||||
#line 874 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
#line 908 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -3046,7 +3110,7 @@ WriteLiteral(">\r\n $(function () {\r\n
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 875 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
#line 909 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
if (Model.Device.CanUpdateTrustEnrol())
|
||||
{
|
||||
|
||||
@@ -3074,13 +3138,13 @@ WriteLiteral(" title=\"Trust this Device?\"");
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
|
||||
#line 879 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
#line 913 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 879 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
#line 913 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
using (Html.BeginForm(MVC.API.Device.UpdateAllowUnauthenticatedEnrol(Model.Device.SerialNumber, true.ToString(), true)))
|
||||
{
|
||||
|
||||
@@ -3088,14 +3152,14 @@ WriteLiteral(">\r\n");
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 881 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
#line 915 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
Write(Html.AntiForgeryToken());
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 881 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
#line 915 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
|
||||
}
|
||||
|
||||
@@ -3128,7 +3192,7 @@ WriteLiteral("></i>This action will allow a device <em>claiming</em> to have the
|
||||
"\'");
|
||||
|
||||
|
||||
#line 891 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
#line 925 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
Write(Model.Device.SerialNumber);
|
||||
|
||||
|
||||
@@ -3176,7 +3240,7 @@ WriteLiteral(@">
|
||||
");
|
||||
|
||||
|
||||
#line 924 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
#line 958 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -3185,7 +3249,7 @@ WriteLiteral(@">
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 925 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
#line 959 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
if (Model.Device.CanUpdateUntrustEnrol())
|
||||
{
|
||||
|
||||
@@ -3213,13 +3277,13 @@ WriteLiteral(" title=\"Untrust this Device?\"");
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
|
||||
#line 929 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
#line 963 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 929 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
#line 963 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
using (Html.BeginForm(MVC.API.Device.UpdateAllowUnauthenticatedEnrol(Model.Device.SerialNumber, false.ToString(), true)))
|
||||
{
|
||||
|
||||
@@ -3227,14 +3291,14 @@ WriteLiteral(">\r\n");
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 931 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
#line 965 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
Write(Html.AntiForgeryToken());
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 931 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
#line 965 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
|
||||
}
|
||||
|
||||
@@ -3297,7 +3361,7 @@ WriteLiteral(@">
|
||||
");
|
||||
|
||||
|
||||
#line 968 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
#line 1002 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -3306,7 +3370,7 @@ WriteLiteral(@">
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 969 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
#line 1003 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
if (Model.Device.CanDecommission())
|
||||
{
|
||||
|
||||
@@ -3334,13 +3398,13 @@ WriteLiteral(" title=\"Device Decommissioning\"");
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
|
||||
#line 973 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
#line 1007 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 973 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
#line 1007 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
using (Html.BeginForm(MVC.API.Device.Decommission(Model.Device.SerialNumber, null, true)))
|
||||
{
|
||||
|
||||
@@ -3348,14 +3412,14 @@ WriteLiteral(">\r\n");
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 975 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
#line 1009 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
Write(Html.AntiForgeryToken());
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 975 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
#line 1009 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
|
||||
|
||||
|
||||
@@ -3381,13 +3445,13 @@ WriteLiteral(" class=\"none\"");
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
|
||||
#line 981 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
#line 1015 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 981 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
#line 1015 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
foreach (DecommissionReasons decommissionReason in Enum.GetValues(typeof(DecommissionReasons)).Cast<DecommissionReasons>().OrderBy(r => r.ToString()))
|
||||
{
|
||||
|
||||
@@ -3399,33 +3463,33 @@ WriteLiteral(" <li>\r\n
|
||||
|
||||
WriteLiteral(" type=\"radio\"");
|
||||
|
||||
WriteAttribute("id", Tuple.Create(" id=\"", 61379), Tuple.Create("\"", 61457)
|
||||
, Tuple.Create(Tuple.Create("", 61384), Tuple.Create("Device_Show_Device_Actions_Decommission_Reason_", 61384), true)
|
||||
WriteAttribute("id", Tuple.Create(" id=\"", 63637), Tuple.Create("\"", 63715)
|
||||
, Tuple.Create(Tuple.Create("", 63642), Tuple.Create("Device_Show_Device_Actions_Decommission_Reason_", 63642), true)
|
||||
|
||||
#line 984 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 61431), Tuple.Create<System.Object, System.Int32>((int)decommissionReason
|
||||
#line 1018 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 63689), Tuple.Create<System.Object, System.Int32>((int)decommissionReason
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 61431), false)
|
||||
, 63689), false)
|
||||
);
|
||||
|
||||
WriteLiteral("\r\n name=\"Reason\"");
|
||||
|
||||
WriteAttribute("value", Tuple.Create(" value=\"", 61520), Tuple.Create("\"", 61554)
|
||||
WriteAttribute("value", Tuple.Create(" value=\"", 63778), Tuple.Create("\"", 63812)
|
||||
|
||||
#line 985 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 61528), Tuple.Create<System.Object, System.Int32>((int)decommissionReason
|
||||
#line 1019 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 63786), Tuple.Create<System.Object, System.Int32>((int)decommissionReason
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 61528), false)
|
||||
, 63786), false)
|
||||
);
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 985 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
#line 1019 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
Write((decommissionReason == DecommissionReasons.EndOfLife) ? "checked=\"checked\"" : string.Empty);
|
||||
|
||||
|
||||
@@ -3433,21 +3497,21 @@ WriteLiteral(" ");
|
||||
#line hidden
|
||||
WriteLiteral(" />\r\n <label");
|
||||
|
||||
WriteAttribute("for", Tuple.Create(" for=\"", 61702), Tuple.Create("\"", 61781)
|
||||
, Tuple.Create(Tuple.Create("", 61708), Tuple.Create("Device_Show_Device_Actions_Decommission_Reason_", 61708), true)
|
||||
WriteAttribute("for", Tuple.Create(" for=\"", 63960), Tuple.Create("\"", 64039)
|
||||
, Tuple.Create(Tuple.Create("", 63966), Tuple.Create("Device_Show_Device_Actions_Decommission_Reason_", 63966), true)
|
||||
|
||||
#line 986 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 61755), Tuple.Create<System.Object, System.Int32>((int)decommissionReason
|
||||
#line 1020 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 64013), Tuple.Create<System.Object, System.Int32>((int)decommissionReason
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 61755), false)
|
||||
, 64013), false)
|
||||
);
|
||||
|
||||
WriteLiteral(">");
|
||||
|
||||
|
||||
#line 986 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
#line 1020 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
Write(decommissionReason.ReasonMessage());
|
||||
|
||||
|
||||
@@ -3456,7 +3520,7 @@ WriteLiteral(">");
|
||||
WriteLiteral("</label>\r\n </li>\r\n");
|
||||
|
||||
|
||||
#line 988 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
#line 1022 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -3465,7 +3529,7 @@ WriteLiteral("</label>\r\n </li>\r\n");
|
||||
WriteLiteral(" </ul>\r\n </div>\r\n");
|
||||
|
||||
|
||||
#line 991 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
#line 1025 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -3506,7 +3570,7 @@ WriteLiteral(@">
|
||||
");
|
||||
|
||||
|
||||
#line 1019 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
#line 1053 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -3515,7 +3579,7 @@ WriteLiteral(@">
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 1020 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
#line 1054 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
if (Model.Device.CanRecommission())
|
||||
{
|
||||
|
||||
@@ -3543,13 +3607,13 @@ WriteLiteral(" title=\"Recommission this Device?\"");
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
|
||||
#line 1024 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
#line 1058 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 1024 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
#line 1058 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
using (Html.BeginForm(MVC.API.Device.Recommission(Model.Device.SerialNumber, true)))
|
||||
{
|
||||
|
||||
@@ -3557,14 +3621,14 @@ WriteLiteral(">\r\n");
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 1026 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
#line 1060 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
Write(Html.AntiForgeryToken());
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 1026 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
#line 1060 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
|
||||
}
|
||||
|
||||
@@ -3611,7 +3675,7 @@ WriteLiteral(@">
|
||||
");
|
||||
|
||||
|
||||
#line 1059 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
#line 1093 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -3620,7 +3684,7 @@ WriteLiteral(@">
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 1060 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
#line 1094 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
if (Model.Device.CanDelete())
|
||||
{
|
||||
|
||||
@@ -3648,13 +3712,13 @@ WriteLiteral(" title=\"Delete this Device?\"");
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
|
||||
#line 1064 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
#line 1098 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 1064 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
#line 1098 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
using (Html.BeginForm(MVC.API.Device.Delete(Model.Device.SerialNumber, true)))
|
||||
{
|
||||
|
||||
@@ -3662,14 +3726,14 @@ WriteLiteral(">\r\n");
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 1066 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
#line 1100 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
Write(Html.AntiForgeryToken());
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 1066 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
#line 1100 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
|
||||
}
|
||||
|
||||
@@ -3721,7 +3785,7 @@ WriteLiteral(@">
|
||||
");
|
||||
|
||||
|
||||
#line 1101 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
#line 1135 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -11,12 +11,12 @@
|
||||
<tr>
|
||||
<th class="name">Name</th>
|
||||
<th class="added">Added</th>
|
||||
<th class="sla">Comments</th>
|
||||
<th class="sla">Detail</th>
|
||||
<th class="removed">Removed</th>
|
||||
</tr>
|
||||
@foreach (var fa in flagAssignments.OrderByDescending(a => a.Item1.AddedDate))
|
||||
{
|
||||
<tr data-userflagassignmentid="@fa.Item1.Id" data-flagassignmentaddeddate="@(fa.Item1.AddedDate.ToString("s"))" class="@(!fa.Item1.RemovedDate.HasValue ? "added" : "removed")">
|
||||
<tr data-userflagassignmentid="@fa.Item1.Id" data-flagassignmentaddeddate="@(fa.Item1.AddedDate.ToString("s"))" class="@(!fa.Item1.RemovedDate.HasValue ? "added" : "removed")" data-canremove="@fa.Item1.CanRemove()" data-removeon="@(fa.Item1.RemoveDate.HasValue ? fa.Item1.RemoveDate.Value.ToString("yyyy-MM-dd") : null)">
|
||||
<td class="name">
|
||||
<i class="fa fa-@(fa.Item2.flag.Icon) fa-fw fa-lg d-@(fa.Item2.flag.IconColour)"></i>
|
||||
@if (Authorization.Has(Claims.Config.UserFlag.Show))
|
||||
@@ -49,11 +49,19 @@
|
||||
<div class="comments">@fa.Item1.Comments.ToHtmlComment()</div>
|
||||
<div class="commentsRaw">@fa.Item1.Comments</div>
|
||||
}
|
||||
@if (!fa.Item1.RemovedDate.HasValue && fa.Item1.RemoveDate.HasValue)
|
||||
{
|
||||
<div class="removeDate" data-date="@fa.Item1.RemoveDate.Value.ToString("yyyy-MM-dd")">Removing @CommonHelpers.FriendlyDate(fa.Item1.RemoveDate.Value)</div>
|
||||
}
|
||||
</td>
|
||||
<td class="removed@(!fa.Item1.RemovedDate.HasValue ? " na" : null)">
|
||||
@if (fa.Item1.RemovedDate.HasValue)
|
||||
{
|
||||
@CommonHelpers.FriendlyDateAndUser(fa.Item1.RemovedDate.Value, fa.Item1.RemovedUser)
|
||||
if (fa.Item1.RemoveDate.HasValue)
|
||||
{
|
||||
<em>(scheduled)</em>
|
||||
}
|
||||
if (fa.Item1.OnUnassignmentExpressionResult != null)
|
||||
{
|
||||
<div class="expressionResult">@fa.Item1.OnUnassignmentExpressionResult</div>
|
||||
@@ -61,7 +69,7 @@
|
||||
}
|
||||
else if (fa.Item1.CanRemove())
|
||||
{
|
||||
<a href="#" class="button small remove">Remove</a>
|
||||
<button type="button" class="button small remove">Remove</button>
|
||||
}
|
||||
</td>
|
||||
</tr>
|
||||
@@ -77,8 +85,8 @@
|
||||
</p>
|
||||
}
|
||||
</div>
|
||||
<div id="User_Show_Flags_Actions_EditComments_Dialog" class="dialog" title="Edit the Comments">
|
||||
@using (Html.BeginForm(MVC.API.UserFlagAssignment.UpdateComments()))
|
||||
<div id="User_Show_Flags_Actions_EditComments_Dialog" class="dialog" title="Edit Details">
|
||||
@using (Html.BeginForm(MVC.API.UserFlagAssignment.Edit()))
|
||||
{
|
||||
@Html.AntiForgeryToken()
|
||||
<input id="User_Show_Flags_Actions_EditComments_Dialog_Id" type="hidden" name="id" value="" />
|
||||
@@ -87,18 +95,23 @@
|
||||
<p>
|
||||
<textarea id="User_Show_Flags_Actions_EditComments_Dialog_Comments" name="Comments" class="block"></textarea>
|
||||
</p>
|
||||
<div>
|
||||
<h4>Remove On</h4>
|
||||
<input name="RemoveDate" id="User_Show_Flags_Actions_EditComments_Dialog_RemoveDate" type="date" min="@(DateTime.Today.AddDays(1).ToString("yyyy-MM-dd"))" />
|
||||
<span>12:00 AM</span>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
var userFlags = $('#userFlags');
|
||||
const userFlags = $('#userFlags');
|
||||
|
||||
var dialog = null;
|
||||
var dialogEditComments = null;
|
||||
let dialog = null;
|
||||
let dialogEditComments = null;
|
||||
|
||||
userFlags.on('click', 'a.remove', function (e) {
|
||||
var $this = $(this);
|
||||
var UserFlagAssignmentId = $this.closest('tr').attr('data-userflagassignmentid');
|
||||
userFlags.on('click', 'button.remove', function (e) {
|
||||
const $this = $(this);
|
||||
const UserFlagAssignmentId = $this.closest('tr').attr('data-userflagassignmentid');
|
||||
|
||||
if (!dialog) {
|
||||
dialog = $('#User_Show_Flags_Actions_Remove_Dialog');
|
||||
@@ -108,7 +121,7 @@
|
||||
autoOpen: false,
|
||||
buttons: {
|
||||
"Remove Flag": function () {
|
||||
var $this = $(this);
|
||||
const $this = $(this);
|
||||
$this.dialog("disable");
|
||||
$this.dialog("option", "buttons", null);
|
||||
$this.find('form').submit();
|
||||
@@ -128,8 +141,11 @@
|
||||
});
|
||||
|
||||
userFlags.on('click', 'td.comments i.fa-edit', function (e) {
|
||||
var $this = $(this);
|
||||
var UserFlagAssignmentId = $this.closest('tr').attr('data-userflagassignmentid');
|
||||
const $this = $(this);
|
||||
const $row = $this.closest('tr');
|
||||
const UserFlagAssignmentId = $row.attr('data-userflagassignmentid');
|
||||
const canRemove = $row.attr('data-canremove') === 'True';
|
||||
const removeOn = $row.attr('data-removeon');
|
||||
|
||||
if (!dialogEditComments) {
|
||||
dialogEditComments = $('#User_Show_Flags_Actions_EditComments_Dialog');
|
||||
@@ -159,6 +175,21 @@
|
||||
$('#User_Show_Flags_Actions_EditComments_Dialog_Comments').val($comments.text());
|
||||
}
|
||||
|
||||
const removeOnInput = $('#User_Show_Flags_Actions_EditComments_Dialog_RemoveDate');
|
||||
if (canRemove) {
|
||||
removeOnInput.prop('disabled', false);
|
||||
if (removeOn) {
|
||||
removeOnInput.val(removeOn);
|
||||
} else {
|
||||
removeOnInput.val('');
|
||||
}
|
||||
removeOnInput.closest('div').css('display', 'block');
|
||||
} else {
|
||||
removeOnInput.prop('disabled', true);
|
||||
removeOnInput.val('');
|
||||
removeOnInput.closest('div').css('display', 'none');
|
||||
}
|
||||
|
||||
$('#User_Show_Flags_Actions_EditComments_Dialog_Id').val(UserFlagAssignmentId);
|
||||
dialogEditComments.dialog('open');
|
||||
e.preventDefault();
|
||||
|
||||
@@ -96,7 +96,7 @@ WriteLiteral(">Added</th>\r\n <th");
|
||||
|
||||
WriteLiteral(" class=\"sla\"");
|
||||
|
||||
WriteLiteral(">Comments</th>\r\n <th");
|
||||
WriteLiteral(">Detail</th>\r\n <th");
|
||||
|
||||
WriteLiteral(" class=\"removed\"");
|
||||
|
||||
@@ -140,42 +140,64 @@ WriteLiteral(" data-flagassignmentaddeddate=\"");
|
||||
#line hidden
|
||||
WriteLiteral("\"");
|
||||
|
||||
WriteAttribute("class", Tuple.Create(" class=\"", 943), Tuple.Create("\"", 1006)
|
||||
WriteAttribute("class", Tuple.Create(" class=\"", 941), Tuple.Create("\"", 1004)
|
||||
|
||||
#line 19 "..\..\Views\User\UserParts\_Flags.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 951), Tuple.Create<System.Object, System.Int32>(!fa.Item1.RemovedDate.HasValue ? "added" : "removed"
|
||||
, Tuple.Create(Tuple.Create("", 949), Tuple.Create<System.Object, System.Int32>(!fa.Item1.RemovedDate.HasValue ? "added" : "removed"
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 951), false)
|
||||
, 949), false)
|
||||
);
|
||||
|
||||
WriteLiteral(" data-canremove=\"");
|
||||
|
||||
|
||||
#line 19 "..\..\Views\User\UserParts\_Flags.cshtml"
|
||||
Write(fa.Item1.CanRemove());
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\"");
|
||||
|
||||
WriteLiteral(" data-removeon=\"");
|
||||
|
||||
|
||||
#line 19 "..\..\Views\User\UserParts\_Flags.cshtml"
|
||||
Write(fa.Item1.RemoveDate.HasValue ? fa.Item1.RemoveDate.Value.ToString("yyyy-MM-dd") : null);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\"");
|
||||
|
||||
WriteLiteral(">\r\n <td");
|
||||
|
||||
WriteLiteral(" class=\"name\"");
|
||||
|
||||
WriteLiteral(">\r\n <i");
|
||||
|
||||
WriteAttribute("class", Tuple.Create(" class=\"", 1075), Tuple.Create("\"", 1152)
|
||||
, Tuple.Create(Tuple.Create("", 1083), Tuple.Create("fa", 1083), true)
|
||||
, Tuple.Create(Tuple.Create(" ", 1085), Tuple.Create("fa-", 1086), true)
|
||||
WriteAttribute("class", Tuple.Create(" class=\"", 1218), Tuple.Create("\"", 1295)
|
||||
, Tuple.Create(Tuple.Create("", 1226), Tuple.Create("fa", 1226), true)
|
||||
, Tuple.Create(Tuple.Create(" ", 1228), Tuple.Create("fa-", 1229), true)
|
||||
|
||||
#line 21 "..\..\Views\User\UserParts\_Flags.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 1089), Tuple.Create<System.Object, System.Int32>(fa.Item2.flag.Icon
|
||||
, Tuple.Create(Tuple.Create("", 1232), Tuple.Create<System.Object, System.Int32>(fa.Item2.flag.Icon
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 1089), false)
|
||||
, Tuple.Create(Tuple.Create(" ", 1110), Tuple.Create("fa-fw", 1111), true)
|
||||
, Tuple.Create(Tuple.Create(" ", 1116), Tuple.Create("fa-lg", 1117), true)
|
||||
, Tuple.Create(Tuple.Create(" ", 1122), Tuple.Create("d-", 1123), true)
|
||||
, 1232), false)
|
||||
, Tuple.Create(Tuple.Create(" ", 1253), Tuple.Create("fa-fw", 1254), true)
|
||||
, Tuple.Create(Tuple.Create(" ", 1259), Tuple.Create("fa-lg", 1260), true)
|
||||
, Tuple.Create(Tuple.Create(" ", 1265), Tuple.Create("d-", 1266), true)
|
||||
|
||||
#line 21 "..\..\Views\User\UserParts\_Flags.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 1125), Tuple.Create<System.Object, System.Int32>(fa.Item2.flag.IconColour
|
||||
, Tuple.Create(Tuple.Create("", 1268), Tuple.Create<System.Object, System.Int32>(fa.Item2.flag.IconColour
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 1125), false)
|
||||
, 1268), false)
|
||||
);
|
||||
|
||||
WriteLiteral("></i>\r\n");
|
||||
@@ -380,29 +402,72 @@ WriteLiteral("</div>\r\n");
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" </td>\r\n <td");
|
||||
WriteLiteral(" ");
|
||||
|
||||
WriteAttribute("class", Tuple.Create(" class=\"", 2735), Tuple.Create("\"", 2798)
|
||||
, Tuple.Create(Tuple.Create("", 2743), Tuple.Create("removed", 2743), true)
|
||||
|
||||
#line 53 "..\..\Views\User\UserParts\_Flags.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 2750), Tuple.Create<System.Object, System.Int32>(!fa.Item1.RemovedDate.HasValue ? " na" : null
|
||||
#line 52 "..\..\Views\User\UserParts\_Flags.cshtml"
|
||||
if (!fa.Item1.RemovedDate.HasValue && fa.Item1.RemoveDate.HasValue)
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 2750), false)
|
||||
WriteLiteral(" <div");
|
||||
|
||||
WriteLiteral(" class=\"removeDate\"");
|
||||
|
||||
WriteLiteral(" data-date=\"");
|
||||
|
||||
|
||||
#line 54 "..\..\Views\User\UserParts\_Flags.cshtml"
|
||||
Write(fa.Item1.RemoveDate.Value.ToString("yyyy-MM-dd"));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\"");
|
||||
|
||||
WriteLiteral(">Removing ");
|
||||
|
||||
|
||||
#line 54 "..\..\Views\User\UserParts\_Flags.cshtml"
|
||||
Write(CommonHelpers.FriendlyDate(fa.Item1.RemoveDate.Value));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("</div>\r\n");
|
||||
|
||||
|
||||
#line 55 "..\..\Views\User\UserParts\_Flags.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" </td>\r\n <td");
|
||||
|
||||
WriteAttribute("class", Tuple.Create(" class=\"", 3211), Tuple.Create("\"", 3274)
|
||||
, Tuple.Create(Tuple.Create("", 3219), Tuple.Create("removed", 3219), true)
|
||||
|
||||
#line 57 "..\..\Views\User\UserParts\_Flags.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 3226), Tuple.Create<System.Object, System.Int32>(!fa.Item1.RemovedDate.HasValue ? " na" : null
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 3226), false)
|
||||
);
|
||||
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
|
||||
#line 54 "..\..\Views\User\UserParts\_Flags.cshtml"
|
||||
#line 58 "..\..\Views\User\UserParts\_Flags.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 54 "..\..\Views\User\UserParts\_Flags.cshtml"
|
||||
#line 58 "..\..\Views\User\UserParts\_Flags.cshtml"
|
||||
if (fa.Item1.RemovedDate.HasValue)
|
||||
{
|
||||
|
||||
@@ -410,15 +475,26 @@ WriteLiteral(">\r\n");
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 56 "..\..\Views\User\UserParts\_Flags.cshtml"
|
||||
#line 60 "..\..\Views\User\UserParts\_Flags.cshtml"
|
||||
Write(CommonHelpers.FriendlyDateAndUser(fa.Item1.RemovedDate.Value, fa.Item1.RemovedUser));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 56 "..\..\Views\User\UserParts\_Flags.cshtml"
|
||||
#line 60 "..\..\Views\User\UserParts\_Flags.cshtml"
|
||||
|
||||
if (fa.Item1.RemoveDate.HasValue)
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <em>(scheduled)</em>\r\n");
|
||||
|
||||
|
||||
#line 64 "..\..\Views\User\UserParts\_Flags.cshtml"
|
||||
}
|
||||
if (fa.Item1.OnUnassignmentExpressionResult != null)
|
||||
{
|
||||
|
||||
@@ -432,7 +508,7 @@ WriteLiteral(" class=\"expressionResult\"");
|
||||
WriteLiteral(">");
|
||||
|
||||
|
||||
#line 59 "..\..\Views\User\UserParts\_Flags.cshtml"
|
||||
#line 67 "..\..\Views\User\UserParts\_Flags.cshtml"
|
||||
Write(fa.Item1.OnUnassignmentExpressionResult);
|
||||
|
||||
|
||||
@@ -441,7 +517,7 @@ WriteLiteral(">");
|
||||
WriteLiteral("</div>\r\n");
|
||||
|
||||
|
||||
#line 60 "..\..\Views\User\UserParts\_Flags.cshtml"
|
||||
#line 68 "..\..\Views\User\UserParts\_Flags.cshtml"
|
||||
}
|
||||
}
|
||||
else if (fa.Item1.CanRemove())
|
||||
@@ -450,16 +526,16 @@ WriteLiteral("</div>\r\n");
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <a");
|
||||
WriteLiteral(" <button");
|
||||
|
||||
WriteLiteral(" href=\"#\"");
|
||||
WriteLiteral(" type=\"button\"");
|
||||
|
||||
WriteLiteral(" class=\"button small remove\"");
|
||||
|
||||
WriteLiteral(">Remove</a>\r\n");
|
||||
WriteLiteral(">Remove</button>\r\n");
|
||||
|
||||
|
||||
#line 65 "..\..\Views\User\UserParts\_Flags.cshtml"
|
||||
#line 73 "..\..\Views\User\UserParts\_Flags.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -468,7 +544,7 @@ WriteLiteral(">Remove</a>\r\n");
|
||||
WriteLiteral(" </td>\r\n </tr>\r\n");
|
||||
|
||||
|
||||
#line 68 "..\..\Views\User\UserParts\_Flags.cshtml"
|
||||
#line 76 "..\..\Views\User\UserParts\_Flags.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -487,13 +563,13 @@ WriteLiteral(" title=\"Remove this flag from the user?\"");
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
|
||||
#line 71 "..\..\Views\User\UserParts\_Flags.cshtml"
|
||||
#line 79 "..\..\Views\User\UserParts\_Flags.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 71 "..\..\Views\User\UserParts\_Flags.cshtml"
|
||||
#line 79 "..\..\Views\User\UserParts\_Flags.cshtml"
|
||||
using (Html.BeginForm(MVC.API.UserFlagAssignment.RemoveUser()))
|
||||
{
|
||||
|
||||
@@ -501,14 +577,14 @@ WriteLiteral(">\r\n");
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 73 "..\..\Views\User\UserParts\_Flags.cshtml"
|
||||
#line 81 "..\..\Views\User\UserParts\_Flags.cshtml"
|
||||
Write(Html.AntiForgeryToken());
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 73 "..\..\Views\User\UserParts\_Flags.cshtml"
|
||||
#line 81 "..\..\Views\User\UserParts\_Flags.cshtml"
|
||||
|
||||
|
||||
|
||||
@@ -533,7 +609,7 @@ WriteLiteral(" class=\"fa fa-exclamation-triangle fa-lg\"");
|
||||
WriteLiteral("></i> Are you sure?\r\n </p>\r\n");
|
||||
|
||||
|
||||
#line 78 "..\..\Views\User\UserParts\_Flags.cshtml"
|
||||
#line 86 "..\..\Views\User\UserParts\_Flags.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -547,33 +623,33 @@ WriteLiteral(" id=\"User_Show_Flags_Actions_EditComments_Dialog\"");
|
||||
|
||||
WriteLiteral(" class=\"dialog\"");
|
||||
|
||||
WriteLiteral(" title=\"Edit the Comments\"");
|
||||
WriteLiteral(" title=\"Edit Details\"");
|
||||
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
|
||||
#line 81 "..\..\Views\User\UserParts\_Flags.cshtml"
|
||||
#line 89 "..\..\Views\User\UserParts\_Flags.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 81 "..\..\Views\User\UserParts\_Flags.cshtml"
|
||||
using (Html.BeginForm(MVC.API.UserFlagAssignment.UpdateComments()))
|
||||
#line 89 "..\..\Views\User\UserParts\_Flags.cshtml"
|
||||
using (Html.BeginForm(MVC.API.UserFlagAssignment.Edit()))
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 83 "..\..\Views\User\UserParts\_Flags.cshtml"
|
||||
#line 91 "..\..\Views\User\UserParts\_Flags.cshtml"
|
||||
Write(Html.AntiForgeryToken());
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 83 "..\..\Views\User\UserParts\_Flags.cshtml"
|
||||
#line 91 "..\..\Views\User\UserParts\_Flags.cshtml"
|
||||
|
||||
|
||||
|
||||
@@ -613,8 +689,29 @@ WriteLiteral(" class=\"block\"");
|
||||
|
||||
WriteLiteral("></textarea>\r\n </p>\r\n");
|
||||
|
||||
WriteLiteral(" <div>\r\n <h4>Remove On</h4>\r\n " +
|
||||
" <input");
|
||||
|
||||
WriteLiteral(" name=\"RemoveDate\"");
|
||||
|
||||
WriteLiteral(" id=\"User_Show_Flags_Actions_EditComments_Dialog_RemoveDate\"");
|
||||
|
||||
WriteLiteral(" type=\"date\"");
|
||||
|
||||
WriteAttribute("min", Tuple.Create(" min=\"", 5545), Tuple.Create("\"", 5602)
|
||||
|
||||
#line 90 "..\..\Views\User\UserParts\_Flags.cshtml"
|
||||
#line 100 "..\..\Views\User\UserParts\_Flags.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 5551), Tuple.Create<System.Object, System.Int32>(DateTime.Today.AddDays(1).ToString("yyyy-MM-dd")
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 5551), false)
|
||||
);
|
||||
|
||||
WriteLiteral(" />\r\n <span>12:00 AM</span>\r\n </div>\r\n");
|
||||
|
||||
|
||||
#line 103 "..\..\Views\User\UserParts\_Flags.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -626,53 +723,65 @@ WriteLiteral(" <script");
|
||||
|
||||
WriteLiteral(" type=\"text/javascript\"");
|
||||
|
||||
WriteLiteral(">\r\n $(function () {\r\n var userFlags = $(\'#userFlags\');\r" +
|
||||
"\n\r\n var dialog = null;\r\n var dialogEditComments = " +
|
||||
"null;\r\n\r\n userFlags.on(\'click\', \'a.remove\', function (e) {\r\n " +
|
||||
" var $this = $(this);\r\n var UserFlagAssignmentI" +
|
||||
"d = $this.closest(\'tr\').attr(\'data-userflagassignmentid\');\r\n\r\n " +
|
||||
" if (!dialog) {\r\n dialog = $(\'#User_Show_Flags_Actions_R" +
|
||||
"emove_Dialog\');\r\n dialog.dialog({\r\n " +
|
||||
" resizable: false,\r\n modal: true,\r\n " +
|
||||
" autoOpen: false,\r\n buttons: {\r\n " +
|
||||
" \"Remove Flag\": function () {\r\n " +
|
||||
" var $this = $(this);\r\n $this.dialo" +
|
||||
"g(\"disable\");\r\n $this.dialog(\"option\", \"butto" +
|
||||
"ns\", null);\r\n $this.find(\'form\').submit();\r\n " +
|
||||
" },\r\n Cancel: funct" +
|
||||
"ion () {\r\n $(this).dialog(\"close\");\r\n " +
|
||||
" }\r\n }\r\n " +
|
||||
" });\r\n }\r\n\r\n $(\'#User_Show_Flags_Actions_" +
|
||||
"Remove_Dialog_Id\').val(UserFlagAssignmentId);\r\n dialog.dialog" +
|
||||
"(\'open\');\r\n\r\n e.preventDefault();\r\n return" +
|
||||
" false;\r\n });\r\n\r\n userFlags.on(\'click\', \'td.commen" +
|
||||
"ts i.fa-edit\', function (e) {\r\n var $this = $(this);\r\n " +
|
||||
" var UserFlagAssignmentId = $this.closest(\'tr\').attr(\'data-userflaga" +
|
||||
"ssignmentid\');\r\n\r\n if (!dialogEditComments) {\r\n " +
|
||||
" dialogEditComments = $(\'#User_Show_Flags_Actions_EditComments_Dialog\')" +
|
||||
";\r\n dialogEditComments.dialog({\r\n " +
|
||||
" resizable: false,\r\n modal: true,\r\n " +
|
||||
" width: 320,\r\n autoOpen: false,\r\n " +
|
||||
" buttons: {\r\n \"Save Changes\": " +
|
||||
"function () {\r\n var $this = $(this);\r\n " +
|
||||
" $this.dialog(\"disable\");\r\n " +
|
||||
" $this.dialog(\"option\", \"buttons\", null);\r\n " +
|
||||
" $this.find(\'form\').submit();\r\n },\r\n " +
|
||||
" Cancel: function () {\r\n " +
|
||||
" $(this).dialog(\"close\");\r\n }\r\n " +
|
||||
" }\r\n });\r\n }\r\n\r\n " +
|
||||
" var $comments = $this.closest(\'td\').find(\'.commentsRaw\');\r\n " +
|
||||
" if ($comments.hasClass(\'smallMessage\')) {\r\n $(" +
|
||||
"\'#User_Show_Flags_Actions_EditComments_Dialog_Comments\').val(\'\');\r\n " +
|
||||
" } else {\r\n $(\'#User_Show_Flags_Actions_EditComment" +
|
||||
"s_Dialog_Comments\').val($comments.text());\r\n }\r\n\r\n " +
|
||||
" $(\'#User_Show_Flags_Actions_EditComments_Dialog_Id\').val(UserFlagAssign" +
|
||||
"mentId);\r\n dialogEditComments.dialog(\'open\');\r\n " +
|
||||
" e.preventDefault();\r\n return false;\r\n })" +
|
||||
";\r\n });\r\n </script>\r\n");
|
||||
WriteLiteral(">\r\n $(function () {\r\n const userFlags = $(\'#userFlags\')" +
|
||||
";\r\n\r\n let dialog = null;\r\n let dialogEditComments " +
|
||||
"= null;\r\n\r\n userFlags.on(\'click\', \'button.remove\', function (e) {" +
|
||||
"\r\n const $this = $(this);\r\n const UserFlag" +
|
||||
"AssignmentId = $this.closest(\'tr\').attr(\'data-userflagassignmentid\');\r\n\r\n " +
|
||||
" if (!dialog) {\r\n dialog = $(\'#User_Show_Flag" +
|
||||
"s_Actions_Remove_Dialog\');\r\n dialog.dialog({\r\n " +
|
||||
" resizable: false,\r\n modal: true,\r\n " +
|
||||
" autoOpen: false,\r\n buttons:" +
|
||||
" {\r\n \"Remove Flag\": function () {\r\n " +
|
||||
" const $this = $(this);\r\n " +
|
||||
" $this.dialog(\"disable\");\r\n $this.dialog(\"op" +
|
||||
"tion\", \"buttons\", null);\r\n $this.find(\'form\')" +
|
||||
".submit();\r\n },\r\n " +
|
||||
"Cancel: function () {\r\n $(this).dialog(\"close" +
|
||||
"\");\r\n }\r\n }\r\n " +
|
||||
" });\r\n }\r\n\r\n $(\'#User_Show_F" +
|
||||
"lags_Actions_Remove_Dialog_Id\').val(UserFlagAssignmentId);\r\n " +
|
||||
"dialog.dialog(\'open\');\r\n\r\n e.preventDefault();\r\n " +
|
||||
" return false;\r\n });\r\n\r\n userFlags.on(\'click" +
|
||||
"\', \'td.comments i.fa-edit\', function (e) {\r\n const $this = $(" +
|
||||
"this);\r\n const $row = $this.closest(\'tr\');\r\n " +
|
||||
" const UserFlagAssignmentId = $row.attr(\'data-userflagassignmentid\');\r\n " +
|
||||
" const canRemove = $row.attr(\'data-canremove\') === \'True\';\r\n " +
|
||||
" const removeOn = $row.attr(\'data-removeon\');\r\n\r\n " +
|
||||
"if (!dialogEditComments) {\r\n dialogEditComments = $(\'#Use" +
|
||||
"r_Show_Flags_Actions_EditComments_Dialog\');\r\n dialogEditC" +
|
||||
"omments.dialog({\r\n resizable: false,\r\n " +
|
||||
" modal: true,\r\n width: 320,\r\n " +
|
||||
" autoOpen: false,\r\n buttons: {\r\n " +
|
||||
" \"Save Changes\": function () {\r\n " +
|
||||
" var $this = $(this);\r\n $this.dia" +
|
||||
"log(\"disable\");\r\n $this.dialog(\"option\", \"but" +
|
||||
"tons\", null);\r\n $this.find(\'form\').submit();\r" +
|
||||
"\n },\r\n Cancel: fun" +
|
||||
"ction () {\r\n $(this).dialog(\"close\");\r\n " +
|
||||
" }\r\n }\r\n " +
|
||||
" });\r\n }\r\n\r\n var $comments = $this.clos" +
|
||||
"est(\'td\').find(\'.commentsRaw\');\r\n if ($comments.hasClass(\'sma" +
|
||||
"llMessage\')) {\r\n $(\'#User_Show_Flags_Actions_EditComments" +
|
||||
"_Dialog_Comments\').val(\'\');\r\n } else {\r\n " +
|
||||
" $(\'#User_Show_Flags_Actions_EditComments_Dialog_Comments\').val($comments.text" +
|
||||
"());\r\n }\r\n\r\n const removeOnInput = $(\'#Use" +
|
||||
"r_Show_Flags_Actions_EditComments_Dialog_RemoveDate\');\r\n if (" +
|
||||
"canRemove) {\r\n removeOnInput.prop(\'disabled\', false);\r\n " +
|
||||
" if (removeOn) {\r\n removeOnInput" +
|
||||
".val(removeOn);\r\n } else {\r\n r" +
|
||||
"emoveOnInput.val(\'\');\r\n }\r\n remove" +
|
||||
"OnInput.closest(\'div\').css(\'display\', \'block\');\r\n } else {\r\n " +
|
||||
" removeOnInput.prop(\'disabled\', true);\r\n " +
|
||||
" removeOnInput.val(\'\');\r\n removeOnInput.closest(\'div" +
|
||||
"\').css(\'display\', \'none\');\r\n }\r\n\r\n $(\'#Use" +
|
||||
"r_Show_Flags_Actions_EditComments_Dialog_Id\').val(UserFlagAssignmentId);\r\n " +
|
||||
" dialogEditComments.dialog(\'open\');\r\n e.preventD" +
|
||||
"efault();\r\n return false;\r\n });\r\n }" +
|
||||
");\r\n </script>\r\n");
|
||||
|
||||
|
||||
#line 169 "..\..\Views\User\UserParts\_Flags.cshtml"
|
||||
#line 200 "..\..\Views\User\UserParts\_Flags.cshtml"
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -687,7 +796,7 @@ WriteLiteral(" class=\"none\"");
|
||||
WriteLiteral(">This user has no associated flags</div>\r\n");
|
||||
|
||||
|
||||
#line 173 "..\..\Views\User\UserParts\_Flags.cshtml"
|
||||
#line 204 "..\..\Views\User\UserParts\_Flags.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -697,7 +806,7 @@ WriteLiteral(" <script>\r\n $(\'#UserDetailTabItems\').append(\'<li><a
|
||||
"b-Flags\">Flags [");
|
||||
|
||||
|
||||
#line 175 "..\..\Views\User\UserParts\_Flags.cshtml"
|
||||
#line 206 "..\..\Views\User\UserParts\_Flags.cshtml"
|
||||
Write(activeAssignmentCount);
|
||||
|
||||
|
||||
|
||||
@@ -249,7 +249,7 @@
|
||||
<input id="User_Show_Details_Actions_AddFlag_Dialog_Filter" type="text" placeholder="Filter" autocomplete="off" />
|
||||
@foreach (var userFlag in Model.AvailableUserFlags.OrderBy(jq => jq.Name))
|
||||
{
|
||||
<div class="flag" data-userflagid="@(userFlag.Id)" data-userflagname="@userFlag.Name">
|
||||
<div class="flag" data-userflagid="@(userFlag.Id)" data-userflagname="@userFlag.Name" data-userflagcanremove="@Model.User.CanRemoveUserFlag(userFlag)" data-userflagremovedays="@userFlag.DefaultRemoveDays">
|
||||
<i class="fa fa-@(userFlag.Icon) fa-fw fa-lg d-@(userFlag.IconColour)"></i>@userFlag.Name
|
||||
</div>
|
||||
}
|
||||
@@ -259,6 +259,11 @@
|
||||
<h4>Comments</h4>
|
||||
<textarea name="Comments" id="User_Show_Details_Actions_AddFlag_Dialog_Comments"></textarea>
|
||||
</div>
|
||||
<div>
|
||||
<h4>Remove On</h4>
|
||||
<input name="RemoveDate" id="User_Show_Details_Actions_AddFlag_Dialog_RemoveDate" type="date" min="@(DateTime.Today.AddDays(1).ToString("yyyy-MM-dd"))" />
|
||||
<span>12:00 AM</span>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
@@ -270,6 +275,7 @@
|
||||
let flagPicker = null;
|
||||
let flagAddId = null;
|
||||
let flagAddComments = null;
|
||||
let flagAddRemoveDate = null;
|
||||
let details = null;
|
||||
|
||||
function flagSelected() {
|
||||
@@ -280,6 +286,26 @@
|
||||
|
||||
flagAddId.val(flag.attr('data-userflagid'));
|
||||
|
||||
const removeDays = flag.attr('data-userflagremovedays');
|
||||
if (removeDays) {
|
||||
const date = new Date();
|
||||
date.setDate(date.getDate() + parseInt(removeDays) - 1);
|
||||
flagAddRemoveDate[0].valueAsDate = date;
|
||||
flagAddRemoveDate.trigger('change');
|
||||
} else {
|
||||
flagAddRemoveDate[0].valueAsDate = null;
|
||||
flagAddRemoveDate.trigger('change');
|
||||
}
|
||||
flagAddRemoveDate.closest('div').show();
|
||||
if (flag.attr('data-userflagcanremove') === 'True') {
|
||||
flagAddRemoveDate.prop('disabled', false);
|
||||
} else {
|
||||
flagAddRemoveDate.prop('disabled', true);
|
||||
if (!removeDays) {
|
||||
flagAddRemoveDate.closest('div').hide();
|
||||
}
|
||||
}
|
||||
|
||||
details.show();
|
||||
|
||||
flagAddComments.focus().select();
|
||||
@@ -314,6 +340,7 @@
|
||||
|
||||
flagAddId = $('#User_Show_Details_Actions_AddFlag_Dialog_Id');
|
||||
flagAddComments = buttonDialog.find('#User_Show_Details_Actions_AddFlag_Dialog_Comments');
|
||||
flagAddRemoveDate = buttonDialog.find('#User_Show_Details_Actions_AddFlag_Dialog_RemoveDate');
|
||||
flagPicker = buttonDialog.find('.flagPicker');
|
||||
details = buttonDialog.find('.details');
|
||||
|
||||
@@ -334,6 +361,13 @@
|
||||
});
|
||||
|
||||
flagPicker.on('click', 'div.flag', flagSelected);
|
||||
flagAddRemoveDate.on('change', function () {
|
||||
if (flagAddRemoveDate.val()) {
|
||||
flagAddRemoveDate.next('span').show();
|
||||
} else {
|
||||
flagAddRemoveDate.next('span').hide();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
$('#User_Show_Details_Actions_AddFlag_Dialog_Filter').val('');
|
||||
|
||||
@@ -1033,28 +1033,50 @@ WriteLiteral(" data-userflagname=\"");
|
||||
#line hidden
|
||||
WriteLiteral("\"");
|
||||
|
||||
WriteLiteral(" data-userflagcanremove=\"");
|
||||
|
||||
|
||||
#line 252 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
Write(Model.User.CanRemoveUserFlag(userFlag));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\"");
|
||||
|
||||
WriteLiteral(" data-userflagremovedays=\"");
|
||||
|
||||
|
||||
#line 252 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
Write(userFlag.DefaultRemoveDays);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\"");
|
||||
|
||||
WriteLiteral(">\r\n <i");
|
||||
|
||||
WriteAttribute("class", Tuple.Create(" class=\"", 16614), Tuple.Create("\"", 16681)
|
||||
, Tuple.Create(Tuple.Create("", 16622), Tuple.Create("fa", 16622), true)
|
||||
, Tuple.Create(Tuple.Create(" ", 16624), Tuple.Create("fa-", 16625), true)
|
||||
WriteAttribute("class", Tuple.Create(" class=\"", 16733), Tuple.Create("\"", 16800)
|
||||
, Tuple.Create(Tuple.Create("", 16741), Tuple.Create("fa", 16741), true)
|
||||
, Tuple.Create(Tuple.Create(" ", 16743), Tuple.Create("fa-", 16744), true)
|
||||
|
||||
#line 253 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 16628), Tuple.Create<System.Object, System.Int32>(userFlag.Icon
|
||||
, Tuple.Create(Tuple.Create("", 16747), Tuple.Create<System.Object, System.Int32>(userFlag.Icon
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 16628), false)
|
||||
, Tuple.Create(Tuple.Create(" ", 16644), Tuple.Create("fa-fw", 16645), true)
|
||||
, Tuple.Create(Tuple.Create(" ", 16650), Tuple.Create("fa-lg", 16651), true)
|
||||
, Tuple.Create(Tuple.Create(" ", 16656), Tuple.Create("d-", 16657), true)
|
||||
, 16747), false)
|
||||
, Tuple.Create(Tuple.Create(" ", 16763), Tuple.Create("fa-fw", 16764), true)
|
||||
, Tuple.Create(Tuple.Create(" ", 16769), Tuple.Create("fa-lg", 16770), true)
|
||||
, Tuple.Create(Tuple.Create(" ", 16775), Tuple.Create("d-", 16776), true)
|
||||
|
||||
#line 253 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 16659), Tuple.Create<System.Object, System.Int32>(userFlag.IconColour
|
||||
, Tuple.Create(Tuple.Create("", 16778), Tuple.Create<System.Object, System.Int32>(userFlag.IconColour
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 16659), false)
|
||||
, 16778), false)
|
||||
);
|
||||
|
||||
WriteLiteral("></i>");
|
||||
@@ -1090,10 +1112,31 @@ WriteLiteral(" name=\"Comments\"");
|
||||
WriteLiteral(" id=\"User_Show_Details_Actions_AddFlag_Dialog_Comments\"");
|
||||
|
||||
WriteLiteral("></textarea>\r\n </div>\r\n " +
|
||||
" </div>\r\n");
|
||||
" <div>\r\n <h4>Remo" +
|
||||
"ve On</h4>\r\n <input");
|
||||
|
||||
WriteLiteral(" name=\"RemoveDate\"");
|
||||
|
||||
WriteLiteral(" id=\"User_Show_Details_Actions_AddFlag_Dialog_RemoveDate\"");
|
||||
|
||||
WriteLiteral(" type=\"date\"");
|
||||
|
||||
WriteAttribute("min", Tuple.Create(" min=\"", 17564), Tuple.Create("\"", 17621)
|
||||
|
||||
#line 264 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 17570), Tuple.Create<System.Object, System.Int32>(DateTime.Today.AddDays(1).ToString("yyyy-MM-dd")
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 17570), false)
|
||||
);
|
||||
|
||||
WriteLiteral(" />\r\n <span>12:00 AM</span>\r\n " +
|
||||
" </div>\r\n </div" +
|
||||
">\r\n");
|
||||
|
||||
|
||||
#line 263 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 268 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -1110,66 +1153,93 @@ WriteLiteral(">\r\n $(function () {\r\n
|
||||
" let buttonDialog = null;\r\n\r\n " +
|
||||
" let flagPicker = null;\r\n let flagA" +
|
||||
"ddId = null;\r\n let flagAddComments = null;\r\n " +
|
||||
" let details = null;\r\n\r\n " +
|
||||
" function flagSelected() {\r\n " +
|
||||
" const flag = $(this);\r\n\r\n flagPicker.chi" +
|
||||
"ldren().removeClass(\'selected\');\r\n flag.a" +
|
||||
"ddClass(\'selected\');\r\n\r\n flagAddId.val(fl" +
|
||||
"ag.attr(\'data-userflagid\'));\r\n\r\n details." +
|
||||
"show();\r\n\r\n flagAddComments.focus().selec" +
|
||||
"t();\r\n }\r\n\r\n " +
|
||||
" button.click(function (e) {\r\n e.preven" +
|
||||
"tDefault();\r\n\r\n if (!buttonDialog) {\r\n " +
|
||||
" buttonDialog = $(\'#User_Show_Details_Ac" +
|
||||
"tions_AddFlag_Dialog\');\r\n buttonDialo" +
|
||||
"g.dialog({\r\n width: 600,\r\n " +
|
||||
" height: 410,\r\n " +
|
||||
" resizable: false,\r\n " +
|
||||
" modal: true,\r\n autoOpen" +
|
||||
": false,\r\n buttons: {\r\n " +
|
||||
" Cancel: function () {\r\n " +
|
||||
" $(this).dialog(\"close\");\r\n " +
|
||||
" },\r\n " +
|
||||
" \"Add Flag\": function () {\r\n " +
|
||||
" if (!!flagAddId.val()) {\r\n " +
|
||||
" buttonDialog\r\n " +
|
||||
" .dialog(\"option\", \"buttons\", null)\r\n " +
|
||||
" .find(\'form\').submit();\r\n " +
|
||||
" } else {\r\n " +
|
||||
" alert(\'Select a User Flag\');\r\n " +
|
||||
" }\r\n " +
|
||||
" }\r\n }\r\n " +
|
||||
" });\r\n\r\n " +
|
||||
" flagAddId = $(\'#User_Show_Details_Actions_AddFlag_Dialog_Id\');\r\n " +
|
||||
" flagAddComments = buttonDialog.find(\'#User_Show_D" +
|
||||
"etails_Actions_AddFlag_Dialog_Comments\');\r\n " +
|
||||
" flagPicker = buttonDialog.find(\'.flagPicker\');\r\n " +
|
||||
" details = buttonDialog.find(\'.details\');\r\n\r\n " +
|
||||
" $(\'#User_Show_Details_Actions_AddFlag_Dialog_Filter\')" +
|
||||
".on(\'keyup\', function (e) {\r\n con" +
|
||||
"st filter = $(e.currentTarget).val().toLowerCase();\r\n " +
|
||||
" if (filter) {\r\n " +
|
||||
" flagPicker.children(\'div.flag\').each(function () {\r\n " +
|
||||
" const $this = $(this);\r\n " +
|
||||
" if ($this.attr(\'data-userflagname\').toLowerC" +
|
||||
"ase().indexOf(filter) >= 0) {\r\n " +
|
||||
" $this.css(\'display\', \'block\');\r\n " +
|
||||
" } else {\r\n " +
|
||||
" $this.css(\'display\', \'none\');\r\n " +
|
||||
" }\r\n });\r\n " +
|
||||
" } else {\r\n " +
|
||||
" flagPicker.children(\'div.flag\').each(function () { $(t" +
|
||||
"his).css(\'display\', \'block\'); });\r\n " +
|
||||
" }\r\n });\r\n\r\n " +
|
||||
" flagPicker.on(\'click\', \'div.flag\', flagSelected);\r\n " +
|
||||
" }\r\n\r\n $(\'" +
|
||||
"#User_Show_Details_Actions_AddFlag_Dialog_Filter\').val(\'\');\r\n " +
|
||||
" buttonDialog.dialog(\'open\');\r\n " +
|
||||
" return false;\r\n });\r\n " +
|
||||
" });\r\n </script>\r\n");
|
||||
" let flagAddRemoveDate = null;\r\n " +
|
||||
" let details = null;\r\n\r\n " +
|
||||
" function flagSelected() {\r\n const flag =" +
|
||||
" $(this);\r\n\r\n flagPicker.children().remov" +
|
||||
"eClass(\'selected\');\r\n flag.addClass(\'sele" +
|
||||
"cted\');\r\n\r\n flagAddId.val(flag.attr(\'data" +
|
||||
"-userflagid\'));\r\n\r\n const removeDays = fl" +
|
||||
"ag.attr(\'data-userflagremovedays\');\r\n if " +
|
||||
"(removeDays) {\r\n const date = new Dat" +
|
||||
"e();\r\n date.setDate(date.getDate() + " +
|
||||
"parseInt(removeDays) - 1);\r\n flagAddR" +
|
||||
"emoveDate[0].valueAsDate = date;\r\n fl" +
|
||||
"agAddRemoveDate.trigger(\'change\');\r\n } el" +
|
||||
"se {\r\n flagAddRemoveDate[0].valueAsDa" +
|
||||
"te = null;\r\n flagAddRemoveDate.trigge" +
|
||||
"r(\'change\');\r\n }\r\n " +
|
||||
" flagAddRemoveDate.closest(\'div\').show();\r\n " +
|
||||
" if (flag.attr(\'data-userflagcanremove\') === \'True\') {\r\n " +
|
||||
" flagAddRemoveDate.prop(\'disabled\', false);" +
|
||||
"\r\n } else {\r\n " +
|
||||
" flagAddRemoveDate.prop(\'disabled\', true);\r\n " +
|
||||
" if (!removeDays) {\r\n " +
|
||||
" flagAddRemoveDate.closest(\'div\').hide();\r\n " +
|
||||
" }\r\n }\r\n\r\n " +
|
||||
" details.show();\r\n\r\n " +
|
||||
" flagAddComments.focus().select();\r\n }\r\n\r\n" +
|
||||
" button.click(function (e) {\r\n " +
|
||||
" e.preventDefault();\r\n\r\n " +
|
||||
" if (!buttonDialog) {\r\n button" +
|
||||
"Dialog = $(\'#User_Show_Details_Actions_AddFlag_Dialog\');\r\n " +
|
||||
" buttonDialog.dialog({\r\n " +
|
||||
" width: 600,\r\n height" +
|
||||
": 410,\r\n resizable: false,\r\n " +
|
||||
" modal: true,\r\n " +
|
||||
" autoOpen: false,\r\n " +
|
||||
" buttons: {\r\n Cance" +
|
||||
"l: function () {\r\n $(this" +
|
||||
").dialog(\"close\");\r\n },\r\n " +
|
||||
" \"Add Flag\": function () {\r\n " +
|
||||
" if (!!flagAddId.val()) {\r\n " +
|
||||
" buttonDialog\r\n " +
|
||||
" .dialog(\"option\", \"button" +
|
||||
"s\", null)\r\n .find" +
|
||||
"(\'form\').submit();\r\n } el" +
|
||||
"se {\r\n alert(\'Select " +
|
||||
"a User Flag\');\r\n }\r\n " +
|
||||
" }\r\n " +
|
||||
" }\r\n });\r\n\r\n " +
|
||||
" flagAddId = $(\'#User_Show_Details_Actions_Ad" +
|
||||
"dFlag_Dialog_Id\');\r\n flagAddComments " +
|
||||
"= buttonDialog.find(\'#User_Show_Details_Actions_AddFlag_Dialog_Comments\');\r\n " +
|
||||
" flagAddRemoveDate = buttonDialog.find(\'#" +
|
||||
"User_Show_Details_Actions_AddFlag_Dialog_RemoveDate\');\r\n " +
|
||||
" flagPicker = buttonDialog.find(\'.flagPicker\');\r\n " +
|
||||
" details = buttonDialog.find(\'.details\');\r\n\r\n " +
|
||||
" $(\'#User_Show_Details_Actions_AddFlag_Di" +
|
||||
"alog_Filter\').on(\'keyup\', function (e) {\r\n " +
|
||||
" const filter = $(e.currentTarget).val().toLowerCase();\r\n " +
|
||||
" if (filter) {\r\n " +
|
||||
" flagPicker.children(\'div.flag\').each(function () {\r\n " +
|
||||
" const $this = $(this);\r\n " +
|
||||
" if ($this.attr(\'data-userflagna" +
|
||||
"me\').toLowerCase().indexOf(filter) >= 0) {\r\n " +
|
||||
" $this.css(\'display\', \'block\');\r\n " +
|
||||
" } else {\r\n " +
|
||||
" $this.css(\'display\', \'none\');\r\n " +
|
||||
" }\r\n " +
|
||||
" });\r\n } else {\r\n " +
|
||||
" flagPicker.children(\'div.flag\').each(func" +
|
||||
"tion () { $(this).css(\'display\', \'block\'); });\r\n " +
|
||||
" }\r\n });\r\n\r\n " +
|
||||
" flagPicker.on(\'click\', \'div.flag\', flagSelecte" +
|
||||
"d);\r\n flagAddRemoveDate.on(\'change\', " +
|
||||
"function () {\r\n if (flagAddRemove" +
|
||||
"Date.val()) {\r\n flagAddRemove" +
|
||||
"Date.next(\'span\').show();\r\n } els" +
|
||||
"e {\r\n flagAddRemoveDate.next(" +
|
||||
"\'span\').hide();\r\n }\r\n " +
|
||||
" });\r\n }\r\n" +
|
||||
"\r\n $(\'#User_Show_Details_Actions_AddFlag_" +
|
||||
"Dialog_Filter\').val(\'\');\r\n buttonDialog.d" +
|
||||
"ialog(\'open\');\r\n return false;\r\n " +
|
||||
" });\r\n });\r\n " +
|
||||
" </script>\r\n");
|
||||
|
||||
|
||||
#line 345 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 379 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -1178,13 +1248,13 @@ WriteLiteral(">\r\n $(function () {\r\n
|
||||
WriteLiteral(" </div>\r\n </div>\r\n </td>\r\n");
|
||||
|
||||
|
||||
#line 349 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 383 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 349 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 383 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
if (Authorization.Has(Claims.User.ShowAssignments))
|
||||
{
|
||||
|
||||
@@ -1202,13 +1272,13 @@ WriteLiteral(" id=\"User_Show_AssignedDevices_Active\"");
|
||||
WriteLiteral(">\r\n <h3>Current Device Assignments</h3>\r\n");
|
||||
|
||||
|
||||
#line 355 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 389 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 355 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 389 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
if (currentDeviceAssignments.Count > 0)
|
||||
{
|
||||
foreach (var assignment in currentDeviceAssignments)
|
||||
@@ -1224,7 +1294,7 @@ WriteLiteral(" class=\"User_Show_AssignedDevices_CurrentAssignment clearfix\"");
|
||||
WriteLiteral(" data-deviceserialnumber=\"");
|
||||
|
||||
|
||||
#line 359 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 393 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
Write(assignment.DeviceSerialNumber);
|
||||
|
||||
|
||||
@@ -1235,13 +1305,13 @@ WriteLiteral("\"");
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
|
||||
#line 360 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 394 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 360 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 394 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
if (Authorization.Has(Claims.Device.Show))
|
||||
{
|
||||
|
||||
@@ -1250,14 +1320,14 @@ WriteLiteral(">\r\n");
|
||||
#line hidden
|
||||
WriteLiteral(" <a");
|
||||
|
||||
WriteAttribute("href", Tuple.Create(" href=\"", 23264), Tuple.Create("\"", 23331)
|
||||
WriteAttribute("href", Tuple.Create(" href=\"", 25934), Tuple.Create("\"", 26001)
|
||||
|
||||
#line 362 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 23271), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.Device.Show(assignment.Device.SerialNumber))
|
||||
#line 396 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 25941), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.Device.Show(assignment.Device.SerialNumber))
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 23271), false)
|
||||
, 25941), false)
|
||||
);
|
||||
|
||||
WriteLiteral(">\r\n <img");
|
||||
@@ -1266,20 +1336,20 @@ WriteLiteral(" class=\"User_Show_AssignedDevices_CurrentAssignment_Image\"");
|
||||
|
||||
WriteLiteral(" alt=\"Model Image\"");
|
||||
|
||||
WriteAttribute("src", Tuple.Create(" src=\"", 23463), Tuple.Create("\"", 23584)
|
||||
WriteAttribute("src", Tuple.Create(" src=\"", 26133), Tuple.Create("\"", 26254)
|
||||
|
||||
#line 363 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 23469), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.API.DeviceModel.Image(assignment.Device.DeviceModel.Id, assignment.Device.DeviceModel.ImageHash()))
|
||||
#line 397 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 26139), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.API.DeviceModel.Image(assignment.Device.DeviceModel.Id, assignment.Device.DeviceModel.ImageHash()))
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 23469), false)
|
||||
, 26139), false)
|
||||
);
|
||||
|
||||
WriteLiteral(" />\r\n </a>\r\n");
|
||||
|
||||
|
||||
#line 365 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 399 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1293,20 +1363,20 @@ WriteLiteral(" class=\"User_Show_AssignedDevices_CurrentAssignment_Image\"");
|
||||
|
||||
WriteLiteral(" alt=\"Model Image\"");
|
||||
|
||||
WriteAttribute("src", Tuple.Create(" src=\"", 23896), Tuple.Create("\"", 24017)
|
||||
WriteAttribute("src", Tuple.Create(" src=\"", 26566), Tuple.Create("\"", 26687)
|
||||
|
||||
#line 368 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 23902), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.API.DeviceModel.Image(assignment.Device.DeviceModel.Id, assignment.Device.DeviceModel.ImageHash()))
|
||||
#line 402 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 26572), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.API.DeviceModel.Image(assignment.Device.DeviceModel.Id, assignment.Device.DeviceModel.ImageHash()))
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 23902), false)
|
||||
, 26572), false)
|
||||
);
|
||||
|
||||
WriteLiteral(" />\r\n");
|
||||
|
||||
|
||||
#line 369 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 403 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -1334,13 +1404,13 @@ WriteLiteral(" class=\"User_Show_AssignedDevices_CurrentAssignment_SerialNumber\
|
||||
WriteLiteral(" data-clipboard>\r\n");
|
||||
|
||||
|
||||
#line 379 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 413 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 379 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 413 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
if (Authorization.Has(Claims.Device.Show))
|
||||
{
|
||||
|
||||
@@ -1348,14 +1418,14 @@ WriteLiteral(" data-clipboard>\r\n");
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 381 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 415 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
Write(Html.ActionLink(assignment.Device.SerialNumber, MVC.Device.Show(assignment.Device.SerialNumber)));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 381 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 415 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
|
||||
}
|
||||
else
|
||||
@@ -1365,14 +1435,14 @@ WriteLiteral(" data-clipboard>\r\n");
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 385 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 419 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
Write(assignment.Device.SerialNumber);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 385 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 419 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
|
||||
}
|
||||
|
||||
@@ -1382,13 +1452,13 @@ WriteLiteral(" data-clipboard>\r\n");
|
||||
WriteLiteral(" </span>\r\n");
|
||||
|
||||
|
||||
#line 388 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 422 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 388 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 422 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
if (!string.IsNullOrWhiteSpace(assignment.Device.ComputerName))
|
||||
{
|
||||
|
||||
@@ -1404,7 +1474,7 @@ WriteLiteral(" class=\"User_Show_AssignedDevices_CurrentAssignment_ComputerName\
|
||||
WriteLiteral(" data-clipboard>");
|
||||
|
||||
|
||||
#line 390 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 424 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
Write(assignment.Device.ComputerName);
|
||||
|
||||
|
||||
@@ -1415,7 +1485,7 @@ WriteLiteral("</span>)");
|
||||
WriteLiteral("\r\n");
|
||||
|
||||
|
||||
#line 391 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 425 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -1425,13 +1495,13 @@ WriteLiteral(" </td>\r\n
|
||||
" </tr>\r\n");
|
||||
|
||||
|
||||
#line 394 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 428 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 394 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 428 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
if (!string.IsNullOrEmpty(assignment.Device.AssetNumber))
|
||||
{
|
||||
|
||||
@@ -1448,7 +1518,7 @@ WriteLiteral(" class=\"User_Show_AssignedDevices_CurrentAssignment_Asset\"");
|
||||
WriteLiteral(" data-clipboard>");
|
||||
|
||||
|
||||
#line 399 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 433 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
Write(assignment.Device.AssetNumber);
|
||||
|
||||
|
||||
@@ -1458,7 +1528,7 @@ WriteLiteral("</span>\r\n
|
||||
" </tr>\r\n");
|
||||
|
||||
|
||||
#line 402 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 436 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -1467,7 +1537,7 @@ WriteLiteral("</span>\r\n
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 403 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 437 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
if (assignment.Device.DeviceModelId.HasValue)
|
||||
{
|
||||
|
||||
@@ -1486,7 +1556,7 @@ WriteLiteral(" class=\"User_Show_AssignedDevices_CurrentAssignment_Model\"");
|
||||
WriteLiteral(">");
|
||||
|
||||
|
||||
#line 410 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 444 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
Write(assignment.Device.DeviceModel.ToString());
|
||||
|
||||
|
||||
@@ -1496,7 +1566,7 @@ WriteLiteral("</span>\r\n
|
||||
" </tr>\r\n");
|
||||
|
||||
|
||||
#line 413 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 447 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -1514,7 +1584,7 @@ WriteLiteral(" class=\"User_Show_AssignedDevices_CurrentAssignment_Profile\"");
|
||||
WriteLiteral(">");
|
||||
|
||||
|
||||
#line 419 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 453 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
Write(assignment.Device.DeviceProfile.ToString());
|
||||
|
||||
|
||||
@@ -1524,13 +1594,13 @@ WriteLiteral("</span>\r\n
|
||||
" </tr>\r\n");
|
||||
|
||||
|
||||
#line 422 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 456 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 422 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 456 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
if (assignment.Device.DeviceBatchId.HasValue)
|
||||
{
|
||||
|
||||
@@ -1549,7 +1619,7 @@ WriteLiteral(" class=\"User_Show_AssignedDevices_CurrentAssignment_Batch\"");
|
||||
WriteLiteral(">");
|
||||
|
||||
|
||||
#line 429 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 463 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
Write(assignment.Device.DeviceBatch.ToString());
|
||||
|
||||
|
||||
@@ -1559,7 +1629,7 @@ WriteLiteral("</span>\r\n
|
||||
" </tr>\r\n");
|
||||
|
||||
|
||||
#line 432 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 466 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -1575,7 +1645,7 @@ WriteLiteral(" class=\"User_Show_AssignedDevices_CurrentAssignment_Assigned\"");
|
||||
WriteLiteral(">");
|
||||
|
||||
|
||||
#line 436 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 470 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
Write(CommonHelpers.FriendlyDate(assignment.AssignedDate));
|
||||
|
||||
|
||||
@@ -1585,13 +1655,13 @@ WriteLiteral("</span>\r\n
|
||||
" </tr>\r\n");
|
||||
|
||||
|
||||
#line 439 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 473 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 439 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 473 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
if (assignment.Device.DeviceFlagAssignments.CanShowAny())
|
||||
{
|
||||
|
||||
@@ -1610,13 +1680,13 @@ WriteLiteral(" class=\"User_Show_Assigned_Devices_CurrentAssignment_Flags\"");
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
|
||||
#line 444 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 478 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 444 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 478 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
foreach (var flag in assignment.Device.DeviceFlagAssignments.Where(f => !f.RemovedDate.HasValue).Select(f => Tuple.Create(f, DeviceFlagService.GetDeviceFlag(f.DeviceFlagId))))
|
||||
{
|
||||
if (flag.Item2.permission.CanShow())
|
||||
@@ -1627,26 +1697,26 @@ WriteLiteral(">\r\n");
|
||||
#line hidden
|
||||
WriteLiteral(" <i");
|
||||
|
||||
WriteAttribute("class", Tuple.Create(" class=\"", 30707), Tuple.Create("\"", 30787)
|
||||
, Tuple.Create(Tuple.Create("", 30715), Tuple.Create("flag", 30715), true)
|
||||
, Tuple.Create(Tuple.Create(" ", 30719), Tuple.Create("fa", 30720), true)
|
||||
, Tuple.Create(Tuple.Create(" ", 30722), Tuple.Create("fa-", 30723), true)
|
||||
WriteAttribute("class", Tuple.Create(" class=\"", 33377), Tuple.Create("\"", 33457)
|
||||
, Tuple.Create(Tuple.Create("", 33385), Tuple.Create("flag", 33385), true)
|
||||
, Tuple.Create(Tuple.Create(" ", 33389), Tuple.Create("fa", 33390), true)
|
||||
, Tuple.Create(Tuple.Create(" ", 33392), Tuple.Create("fa-", 33393), true)
|
||||
|
||||
#line 448 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 30726), Tuple.Create<System.Object, System.Int32>(flag.Item2.flag.Icon
|
||||
#line 482 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 33396), Tuple.Create<System.Object, System.Int32>(flag.Item2.flag.Icon
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 30726), false)
|
||||
, Tuple.Create(Tuple.Create(" ", 30749), Tuple.Create("fa-fw", 30750), true)
|
||||
, Tuple.Create(Tuple.Create(" ", 30755), Tuple.Create("d-", 30756), true)
|
||||
, 33396), false)
|
||||
, Tuple.Create(Tuple.Create(" ", 33419), Tuple.Create("fa-fw", 33420), true)
|
||||
, Tuple.Create(Tuple.Create(" ", 33425), Tuple.Create("d-", 33426), true)
|
||||
|
||||
#line 448 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 30758), Tuple.Create<System.Object, System.Int32>(flag.Item2.flag.IconColour
|
||||
#line 482 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 33428), Tuple.Create<System.Object, System.Int32>(flag.Item2.flag.IconColour
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 30758), false)
|
||||
, 33428), false)
|
||||
);
|
||||
|
||||
WriteLiteral(">\r\n " +
|
||||
@@ -1662,7 +1732,7 @@ WriteLiteral(" class=\"name\"");
|
||||
WriteLiteral(">");
|
||||
|
||||
|
||||
#line 450 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 484 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
Write(flag.Item2.flag.Name);
|
||||
|
||||
|
||||
@@ -1671,7 +1741,7 @@ WriteLiteral(">");
|
||||
WriteLiteral("</span>");
|
||||
|
||||
|
||||
#line 450 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 484 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
if (flag.Item1.Comments != null)
|
||||
{
|
||||
|
||||
@@ -1684,7 +1754,7 @@ WriteLiteral(" class=\"comments\"");
|
||||
WriteLiteral(">");
|
||||
|
||||
|
||||
#line 451 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 485 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
Write(flag.Item1.Comments.ToHtmlComment());
|
||||
|
||||
|
||||
@@ -1693,7 +1763,7 @@ WriteLiteral(">");
|
||||
WriteLiteral("</span>");
|
||||
|
||||
|
||||
#line 451 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 485 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
}
|
||||
|
||||
#line default
|
||||
@@ -1705,7 +1775,7 @@ WriteLiteral(" class=\"added\"");
|
||||
WriteLiteral(">");
|
||||
|
||||
|
||||
#line 451 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 485 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
Write(CommonHelpers.FriendlyDateAndUser(flag.Item1.AddedDate, flag.Item1.AddedUserId));
|
||||
|
||||
|
||||
@@ -1716,7 +1786,7 @@ WriteLiteral("</span>\r\n
|
||||
" </i>\r\n");
|
||||
|
||||
|
||||
#line 454 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 488 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1770,7 +1840,7 @@ WriteLiteral(">\r\n
|
||||
" </tr>\r\n");
|
||||
|
||||
|
||||
#line 489 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 523 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -1781,7 +1851,7 @@ WriteLiteral(" </tbody>\r\n
|
||||
" </div>\r\n");
|
||||
|
||||
|
||||
#line 494 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 528 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -1797,7 +1867,7 @@ WriteLiteral(" class=\"smallMessage\"");
|
||||
WriteLiteral(">No Current Device Assignments</span>\r\n");
|
||||
|
||||
|
||||
#line 499 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 533 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -1807,7 +1877,7 @@ WriteLiteral(" </div>\r\n </div>\r\n
|
||||
"\r\n");
|
||||
|
||||
|
||||
#line 503 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 537 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user