feature: flag permissions

feature: flag permissions
This commit is contained in:
Gary Sharp
2025-07-20 10:45:55 +10:00
parent 7deead494b
commit be7ee4cae8
72 changed files with 5590 additions and 2109 deletions
@@ -1,15 +1,8 @@
@model Disco.Web.Models.Device.ShowModel
@using Disco.Services.Devices.DeviceFlags;
@{
Authorization.Require(Claims.Device.ShowFlagAssignments);
var hasRemove = Authorization.Has(Claims.Device.Actions.RemoveFlags);
var hasEdit = Authorization.Has(Claims.Device.Actions.EditFlags);
var hasDeviceFlagShow = Authorization.Has(Claims.Config.DeviceFlag.Show);
var activeAssignmentCount = Model.Device.DeviceFlagAssignments == null ? 0 : Model.Device.DeviceFlagAssignments.Count(a => !a.RemovedDate.HasValue);
var flagAssignments = Model.Device.DeviceFlagAssignments.Select(a => Tuple.Create(a, DeviceFlagService.GetDeviceFlag(a.DeviceFlagId))).ToList();
var flagAssignments = Model.Device.DeviceFlagAssignments.Select(a => Tuple.Create(a, DeviceFlagService.GetDeviceFlag(a.DeviceFlagId))).Where(a => a.Item2.permission.CanShow()).ToList();
var activeAssignmentCount = flagAssignments.Count(a => !a.Item1.RemovedDate.HasValue);
}
<div id="DeviceDetailTab-Flags" class="DevicePart">
@if (flagAssignments.Count > 0)
@@ -25,14 +18,14 @@
{
<tr data-deviceflagassignmentid="@fa.Item1.Id" data-flagassignmentaddeddate="@(fa.Item1.AddedDate.ToString("s"))" class="@(!fa.Item1.RemovedDate.HasValue ? "added" : "removed")">
<td class="name">
<i class="fa fa-@(fa.Item2.Icon) fa-fw fa-lg d-@(fa.Item2.IconColour)"></i>
@if (hasDeviceFlagShow)
<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))
{
@Html.ActionLink(fa.Item2.Name, MVC.Config.DeviceFlag.Index(fa.Item2.Id))
@Html.ActionLink(fa.Item2.flag.Name, MVC.Config.DeviceFlag.Index(fa.Item2.flag.Id))
}
else
{
@fa.Item2.Name
@fa.Item2.flag.Name
}
</td>
<td class="added">
@@ -43,7 +36,7 @@
}
</td>
<td class="comments">
@if (hasEdit)
@if (fa.Item2.permission.CanEdit())
{
<div class="editable"><i class="fa fa-fw fa-edit" title="Edit Comments"></i></div>
}
@@ -77,6 +70,7 @@
<div id="Device_Show_Flags_Actions_Remove_Dialog" class="dialog" title="Remove this flag from the device?">
@using (Html.BeginForm(MVC.API.DeviceFlagAssignment.RemoveDevice()))
{
@Html.AntiForgeryToken()
<input id="Device_Show_Flags_Actions_Remove_Dialog_Id" type="hidden" name="id" value="" />
<p>
<i class="fa fa-exclamation-triangle fa-lg"></i>&nbsp;Are you sure?
@@ -86,6 +80,7 @@
<div id="Device_Show_Flags_Actions_EditComments_Dialog" class="dialog" title="Edit the Comments">
@using (Html.BeginForm(MVC.API.DeviceFlagAssignment.UpdateComments()))
{
@Html.AntiForgeryToken()
<input id="Device_Show_Flags_Actions_EditComments_Dialog_Id" type="hidden" name="id" value="" />
<input type="hidden" name="redirect" value="true" />
<h4>Comments:</h4>
@@ -52,15 +52,8 @@ namespace Disco.Web.Views.Device.DeviceParts
#line 3 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
Authorization.Require(Claims.Device.ShowFlagAssignments);
var hasRemove = Authorization.Has(Claims.Device.Actions.RemoveFlags);
var hasEdit = Authorization.Has(Claims.Device.Actions.EditFlags);
var hasDeviceFlagShow = Authorization.Has(Claims.Config.DeviceFlag.Show);
var activeAssignmentCount = Model.Device.DeviceFlagAssignments == null ? 0 : Model.Device.DeviceFlagAssignments.Count(a => !a.RemovedDate.HasValue);
var flagAssignments = Model.Device.DeviceFlagAssignments.Select(a => Tuple.Create(a, DeviceFlagService.GetDeviceFlag(a.DeviceFlagId))).ToList();
var flagAssignments = Model.Device.DeviceFlagAssignments.Select(a => Tuple.Create(a, DeviceFlagService.GetDeviceFlag(a.DeviceFlagId))).Where(a => a.Item2.permission.CanShow()).ToList();
var activeAssignmentCount = flagAssignments.Count(a => !a.Item1.RemovedDate.HasValue);
#line default
@@ -74,13 +67,13 @@ WriteLiteral(" class=\"DevicePart\"");
WriteLiteral(">\r\n");
#line 15 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
#line 8 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
#line default
#line hidden
#line 15 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
#line 8 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
if (flagAssignments.Count > 0)
{
@@ -110,13 +103,13 @@ WriteLiteral(" class=\"removed\"");
WriteLiteral(">Removed</th>\r\n </tr>\r\n");
#line 24 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
#line 17 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
#line default
#line hidden
#line 24 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
#line 17 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
foreach (var fa in flagAssignments.OrderByDescending(a => a.Item1.AddedDate))
{
@@ -128,7 +121,7 @@ WriteLiteral(" <tr");
WriteLiteral(" data-deviceflagassignmentid=\"");
#line 26 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
#line 19 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
Write(fa.Item1.Id);
@@ -139,7 +132,7 @@ WriteLiteral("\"");
WriteLiteral(" data-flagassignmentaddeddate=\"");
#line 26 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
#line 19 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
Write(fa.Item1.AddedDate.ToString("s"));
@@ -147,14 +140,14 @@ WriteLiteral(" data-flagassignmentaddeddate=\"");
#line hidden
WriteLiteral("\"");
WriteAttribute("class", Tuple.Create(" class=\"", 1282), Tuple.Create("\"", 1345)
WriteAttribute("class", Tuple.Create(" class=\"", 967), Tuple.Create("\"", 1030)
#line 26 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
, Tuple.Create(Tuple.Create("", 1290), Tuple.Create<System.Object, System.Int32>(!fa.Item1.RemovedDate.HasValue ? "added" : "removed"
#line 19 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
, Tuple.Create(Tuple.Create("", 975), Tuple.Create<System.Object, System.Int32>(!fa.Item1.RemovedDate.HasValue ? "added" : "removed"
#line default
#line hidden
, 1290), false)
, 975), false)
);
WriteLiteral(">\r\n <td");
@@ -163,54 +156,54 @@ WriteLiteral(" class=\"name\"");
WriteLiteral(">\r\n <i");
WriteAttribute("class", Tuple.Create(" class=\"", 1414), Tuple.Create("\"", 1481)
, Tuple.Create(Tuple.Create("", 1422), Tuple.Create("fa", 1422), true)
, Tuple.Create(Tuple.Create(" ", 1424), Tuple.Create("fa-", 1425), true)
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)
#line 28 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
, Tuple.Create(Tuple.Create("", 1428), Tuple.Create<System.Object, System.Int32>(fa.Item2.Icon
#line 21 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
, Tuple.Create(Tuple.Create("", 1113), Tuple.Create<System.Object, System.Int32>(fa.Item2.flag.Icon
#line default
#line hidden
, 1428), false)
, Tuple.Create(Tuple.Create(" ", 1444), Tuple.Create("fa-fw", 1445), true)
, Tuple.Create(Tuple.Create(" ", 1450), Tuple.Create("fa-lg", 1451), true)
, Tuple.Create(Tuple.Create(" ", 1456), Tuple.Create("d-", 1457), true)
, 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)
#line 28 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
, Tuple.Create(Tuple.Create("", 1459), Tuple.Create<System.Object, System.Int32>(fa.Item2.IconColour
#line 21 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
, Tuple.Create(Tuple.Create("", 1149), Tuple.Create<System.Object, System.Int32>(fa.Item2.flag.IconColour
#line default
#line hidden
, 1459), false)
, 1149), false)
);
WriteLiteral("></i>\r\n");
#line 29 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
#line 22 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
#line default
#line hidden
#line 29 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
if (hasDeviceFlagShow)
#line 22 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
if (Authorization.Has(Claims.Config.DeviceFlag.Show))
{
#line default
#line hidden
#line 31 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
Write(Html.ActionLink(fa.Item2.Name, MVC.Config.DeviceFlag.Index(fa.Item2.Id)));
#line 24 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
Write(Html.ActionLink(fa.Item2.flag.Name, MVC.Config.DeviceFlag.Index(fa.Item2.flag.Id)));
#line default
#line hidden
#line 31 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
#line 24 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
}
else
{
@@ -219,15 +212,15 @@ WriteLiteral("></i>\r\n");
#line default
#line hidden
#line 35 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
Write(fa.Item2.Name);
#line 28 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
Write(fa.Item2.flag.Name);
#line default
#line hidden
#line 35 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
#line 28 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
}
@@ -242,7 +235,7 @@ WriteLiteral(">\r\n");
WriteLiteral(" ");
#line 39 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
#line 32 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
Write(CommonHelpers.FriendlyDateAndUser(fa.Item1.AddedDate, fa.Item1.AddedUser));
@@ -251,13 +244,13 @@ WriteLiteral(" ");
WriteLiteral("\r\n");
#line 40 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
#line 33 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
#line default
#line hidden
#line 40 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
#line 33 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
if (fa.Item1.OnAssignmentExpressionResult != null)
{
@@ -271,7 +264,7 @@ WriteLiteral(" class=\"expressionResult\"");
WriteLiteral(">");
#line 42 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
#line 35 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
Write(fa.Item1.OnAssignmentExpressionResult);
@@ -280,7 +273,7 @@ WriteLiteral(">");
WriteLiteral("</div>\r\n");
#line 43 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
#line 36 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
}
@@ -293,14 +286,14 @@ WriteLiteral(" class=\"comments\"");
WriteLiteral(">\r\n");
#line 46 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
#line 39 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
#line default
#line hidden
#line 46 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
if (hasEdit)
#line 39 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
if (fa.Item2.permission.CanEdit())
{
@@ -319,7 +312,7 @@ WriteLiteral(" title=\"Edit Comments\"");
WriteLiteral("></i></div>\r\n");
#line 49 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
#line 42 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
}
@@ -328,7 +321,7 @@ WriteLiteral("></i></div>\r\n");
WriteLiteral(" ");
#line 50 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
#line 43 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
if (fa.Item1.Comments == null)
{
@@ -342,7 +335,7 @@ WriteLiteral(" class=\"comments smallMessage\"");
WriteLiteral(">[no comments]</div>\r\n");
#line 53 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
#line 46 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
}
else
{
@@ -357,7 +350,7 @@ WriteLiteral(" class=\"comments\"");
WriteLiteral(">");
#line 56 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
#line 49 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
Write(fa.Item1.Comments.ToHtmlComment());
@@ -372,7 +365,7 @@ WriteLiteral(" class=\"commentsRaw\"");
WriteLiteral(">");
#line 57 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
#line 50 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
Write(fa.Item1.Comments);
@@ -381,7 +374,7 @@ WriteLiteral(">");
WriteLiteral("</div>\r\n");
#line 58 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
#line 51 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
}
@@ -389,27 +382,27 @@ WriteLiteral("</div>\r\n");
#line hidden
WriteLiteral(" </td>\r\n <td");
WriteAttribute("class", Tuple.Create(" class=\"", 3000), Tuple.Create("\"", 3063)
, Tuple.Create(Tuple.Create("", 3008), Tuple.Create("removed", 3008), true)
WriteAttribute("class", Tuple.Create(" class=\"", 2763), Tuple.Create("\"", 2826)
, Tuple.Create(Tuple.Create("", 2771), Tuple.Create("removed", 2771), true)
#line 60 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
, Tuple.Create(Tuple.Create("", 3015), Tuple.Create<System.Object, System.Int32>(!fa.Item1.RemovedDate.HasValue ? " na" : null
#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 default
#line hidden
, 3015), false)
, 2778), false)
);
WriteLiteral(">\r\n");
#line 61 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
#line 54 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
#line default
#line hidden
#line 61 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
#line 54 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
if (fa.Item1.RemovedDate.HasValue)
{
@@ -417,14 +410,14 @@ WriteLiteral(">\r\n");
#line default
#line hidden
#line 63 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
#line 56 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
Write(CommonHelpers.FriendlyDateAndUser(fa.Item1.RemovedDate.Value, fa.Item1.RemovedUser));
#line default
#line hidden
#line 63 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
#line 56 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
if (fa.Item1.OnUnassignmentExpressionResult != null)
{
@@ -439,7 +432,7 @@ WriteLiteral(" class=\"expressionResult\"");
WriteLiteral(">");
#line 66 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
#line 59 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
Write(fa.Item1.OnUnassignmentExpressionResult);
@@ -448,7 +441,7 @@ WriteLiteral(">");
WriteLiteral("</div>\r\n");
#line 67 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
#line 60 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
}
}
else if (fa.Item1.CanRemove())
@@ -466,7 +459,7 @@ WriteLiteral(" class=\"button small remove\"");
WriteLiteral(">Remove</a>\r\n");
#line 72 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
#line 65 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
}
@@ -475,7 +468,7 @@ WriteLiteral(">Remove</a>\r\n");
WriteLiteral(" </td>\r\n </tr>\r\n");
#line 75 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
#line 68 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
}
@@ -494,15 +487,29 @@ WriteLiteral(" title=\"Remove this flag from the device?\"");
WriteLiteral(">\r\n");
#line 78 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
#line 71 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
#line default
#line hidden
#line 78 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
#line 71 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
using (Html.BeginForm(MVC.API.DeviceFlagAssignment.RemoveDevice()))
{
#line default
#line hidden
#line 73 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
Write(Html.AntiForgeryToken());
#line default
#line hidden
#line 73 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
#line default
@@ -526,7 +533,7 @@ WriteLiteral(" class=\"fa fa-exclamation-triangle fa-lg\"");
WriteLiteral("></i>&nbsp;Are you sure?\r\n </p>\r\n");
#line 84 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
#line 78 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
}
@@ -545,15 +552,29 @@ WriteLiteral(" title=\"Edit the Comments\"");
WriteLiteral(">\r\n");
#line 87 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
#line 81 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
#line default
#line hidden
#line 87 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
#line 81 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
using (Html.BeginForm(MVC.API.DeviceFlagAssignment.UpdateComments()))
{
#line default
#line hidden
#line 83 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
Write(Html.AntiForgeryToken());
#line default
#line hidden
#line 83 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
#line default
@@ -593,7 +614,7 @@ WriteLiteral(" class=\"block\"");
WriteLiteral("></textarea>\r\n </p>\r\n");
#line 95 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
#line 90 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
}
@@ -651,7 +672,7 @@ WriteLiteral(">\r\n $(function () {\r\n var deviceFlag
"eturn false;\r\n });\r\n });\r\n </script>\r\n");
#line 174 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
#line 169 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
}
else
{
@@ -666,7 +687,7 @@ WriteLiteral(" class=\"none\"");
WriteLiteral(">This device has no associated flags</div>\r\n");
#line 178 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
#line 173 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
}
@@ -676,7 +697,7 @@ WriteLiteral(" <script>\r\n $(\'#DeviceDetailTabItems\').append(\'<li>
"ilTab-Flags\">Flags [");
#line 180 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
#line 175 "..\..\Views\Device\DeviceParts\_Flags.cshtml"
Write(activeAssignmentCount);
@@ -239,17 +239,20 @@
<div id="Device_Show_User_EmailAddress" title="Email Address"><a href="mailto:@(Model.Device.AssignedUser.EmailAddress)" data-clipboard="@assignedUser.DisplayName &lt;@assignedUser.EmailAddress&gt;">@assignedUser.EmailAddress</a></div>
}
}
@if (Authorization.Has(Claims.User.ShowFlagAssignments))
@if (assignedUser.UserFlagAssignments.CanShowAny())
{
<div id="Device_Show_User_Flags">
@foreach (var flag in assignedUser.UserFlagAssignments.Where(f => !f.RemovedDate.HasValue).Select(f => Tuple.Create(f, UserFlagService.GetUserFlag(f.UserFlagId))))
{
<i class="flag fa fa-@(flag.Item2.Icon) fa-fw d-@(flag.Item2.IconColour)">
<span class="details">
<span class="name">@flag.Item2.Name</span>@if (flag.Item1.Comments != null)
{<span class="comments">@flag.Item1.Comments.ToHtmlComment()</span>}<span class="added">@CommonHelpers.FriendlyDateAndUser(flag.Item1.AddedDate, flag.Item1.AddedUserId)</span>
</span>
</i>
if (flag.Item2.permission.CanShow())
{
<i class="flag fa fa-@(flag.Item2.flag.Icon) fa-fw d-@(flag.Item2.flag.IconColour)">
<span class="details">
<span class="name">@flag.Item2.flag.Name</span>@if (flag.Item1.Comments != null)
{<span class="comments">@flag.Item1.Comments.ToHtmlComment()</span>}<span class="added">@CommonHelpers.FriendlyDateAndUser(flag.Item1.AddedDate, flag.Item1.AddedUserId)</span>
</span>
</i>
}
}
<script type="text/javascript">
$(function () {
@@ -765,12 +768,13 @@
});
</script>
}
@if (Model.Device.CanAddDeviceFlags() && Model.AvailableDeviceFlags != null && Model.AvailableDeviceFlags.Count > 0)
@if (Model.AvailableDeviceFlags != null && Model.AvailableDeviceFlags.Count > 0)
{
@Html.ActionLinkSmallButton("Add Flag", MVC.API.DeviceFlagAssignment.AddDevice(), "Device_Show_Details_Actions_AddFlag_Button")
<button id="Device_Show_Details_Actions_AddFlag_Button" type="button" class="button small">Add Flag</button>
<div id="Device_Show_Details_Actions_AddFlag_Dialog" class="dialog" title="Add Device Flag">
@using (Html.BeginForm(MVC.API.DeviceFlagAssignment.AddDevice()))
{
@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" />
<div class="flagPicker">
@@ -794,7 +798,6 @@
$(function () {
const button = $('#Device_Show_Details_Actions_AddFlag_Button');
let buttonDialog = null;
const buttonLink = button.attr('href');
let flagPicker = null;
let flagAddId = null;
@@ -814,9 +817,7 @@
flagAddComments.focus().select();
}
button.attr('href', '#').click(function (e) {
e.preventDefault();
button.click(function (e) {
if (!buttonDialog) {
buttonDialog = $('#Device_Show_Details_Actions_AddFlag_Dialog');
buttonDialog.dialog({
@@ -831,10 +832,9 @@
},
"Add Flag": function () {
if (!!flagAddId.val()) {
const $this = $(this);
$this.dialog("disable");
$this.dialog("option", "buttons", null);
buttonDialog.find('form').submit();
buttonDialog
.dialog("option", "buttons", null)
.find('form').submit();
} else {
alert('Select a Device Flag');
}
@@ -868,7 +868,6 @@
$('#Device_Show_Details_Actions_AddFlag_Dialog_Filter').val('');
buttonDialog.dialog('open');
return false;
});
});
</script>
File diff suppressed because it is too large Load Diff
+11 -8
View File
@@ -19,17 +19,20 @@
});
</script>
</div>
@if (Authorization.Has(Claims.Device.ShowFlagAssignments))
@if (Model.Device.DeviceFlagAssignments.CanShowAny())
{
<div id="Device_Show_Flags">
@foreach (var flag in Model.Device.DeviceFlagAssignments.Where(f => !f.RemovedDate.HasValue).Select(f => Tuple.Create(f, DeviceFlagService.GetDeviceFlag(f.DeviceFlagId))))
{
<i class="flag fa fa-@(flag.Item2.Icon) fa-fw fa-lg d-@(flag.Item2.IconColour)">
<span class="details">
<span class="name">@flag.Item2.Name</span>@if (flag.Item1.Comments != null)
{<span class="comments">@flag.Item1.Comments.ToHtmlComment()</span>}<span class="added">@CommonHelpers.FriendlyDateAndUser(flag.Item1.AddedDate, flag.Item1.AddedUser)</span>
</span>
</i>
if (flag.Item2.permission.CanShow())
{
<i class="flag fa fa-@(flag.Item2.flag.Icon) fa-fw fa-lg d-@(flag.Item2.flag.IconColour)">
<span class="details">
<span class="name">@flag.Item2.flag.Name</span>@if (flag.Item1.Comments != null)
{<span class="comments">@flag.Item1.Comments.ToHtmlComment()</span>}<span class="added">@CommonHelpers.FriendlyDateAndUser(flag.Item1.AddedDate, flag.Item1.AddedUser)</span>
</span>
</i>
}
}
</div>
<script type="text/javascript">
@@ -116,7 +119,7 @@
{
@Html.Partial(MVC.Device.Views.DeviceParts._Resources, Model)
}
@if (Authorization.Has(Claims.Device.ShowFlagAssignments))
@if (Authorization.Has(Claims.Device.ShowFlagAssignments) || Model.Device.DeviceFlagAssignments.CanShowAny())
{
@Html.Partial(MVC.Device.Views.DeviceParts._Flags, Model)
}
+58 -55
View File
@@ -122,7 +122,7 @@ WriteLiteral(">\r\n $(function () {\r\n $(\'#Device_Sh
#line hidden
#line 22 "..\..\Views\Device\Show.cshtml"
if (Authorization.Has(Claims.Device.ShowFlagAssignments))
if (Model.Device.DeviceFlagAssignments.CanShowAny())
{
@@ -144,48 +144,50 @@ WriteLiteral(">\r\n");
#line 25 "..\..\Views\Device\Show.cshtml"
foreach (var flag in Model.Device.DeviceFlagAssignments.Where(f => !f.RemovedDate.HasValue).Select(f => Tuple.Create(f, DeviceFlagService.GetDeviceFlag(f.DeviceFlagId))))
{
if (flag.Item2.permission.CanShow())
{
#line default
#line hidden
WriteLiteral(" <i");
WriteLiteral(" <i");
WriteAttribute("class", Tuple.Create(" class=\"", 1178), Tuple.Create("\"", 1254)
, Tuple.Create(Tuple.Create("", 1186), Tuple.Create("flag", 1186), true)
, Tuple.Create(Tuple.Create(" ", 1190), Tuple.Create("fa", 1191), true)
, Tuple.Create(Tuple.Create(" ", 1193), Tuple.Create("fa-", 1194), true)
WriteAttribute("class", Tuple.Create(" class=\"", 1250), Tuple.Create("\"", 1336)
, Tuple.Create(Tuple.Create("", 1258), Tuple.Create("flag", 1258), true)
, Tuple.Create(Tuple.Create(" ", 1262), Tuple.Create("fa", 1263), true)
, Tuple.Create(Tuple.Create(" ", 1265), Tuple.Create("fa-", 1266), true)
#line 27 "..\..\Views\Device\Show.cshtml"
, Tuple.Create(Tuple.Create("", 1197), Tuple.Create<System.Object, System.Int32>(flag.Item2.Icon
#line 29 "..\..\Views\Device\Show.cshtml"
, Tuple.Create(Tuple.Create("", 1269), Tuple.Create<System.Object, System.Int32>(flag.Item2.flag.Icon
#line default
#line hidden
, 1197), false)
, Tuple.Create(Tuple.Create(" ", 1215), Tuple.Create("fa-fw", 1216), true)
, Tuple.Create(Tuple.Create(" ", 1221), Tuple.Create("fa-lg", 1222), true)
, Tuple.Create(Tuple.Create(" ", 1227), Tuple.Create("d-", 1228), true)
, 1269), false)
, Tuple.Create(Tuple.Create(" ", 1292), Tuple.Create("fa-fw", 1293), true)
, Tuple.Create(Tuple.Create(" ", 1298), Tuple.Create("fa-lg", 1299), true)
, Tuple.Create(Tuple.Create(" ", 1304), Tuple.Create("d-", 1305), true)
#line 27 "..\..\Views\Device\Show.cshtml"
, Tuple.Create(Tuple.Create("", 1230), Tuple.Create<System.Object, System.Int32>(flag.Item2.IconColour
#line 29 "..\..\Views\Device\Show.cshtml"
, Tuple.Create(Tuple.Create("", 1307), Tuple.Create<System.Object, System.Int32>(flag.Item2.flag.IconColour
#line default
#line hidden
, 1230), false)
, 1307), false)
);
WriteLiteral(">\r\n <span");
WriteLiteral(">\r\n <span");
WriteLiteral(" class=\"details\"");
WriteLiteral(">\r\n <span");
WriteLiteral(">\r\n <span");
WriteLiteral(" class=\"name\"");
WriteLiteral(">");
#line 29 "..\..\Views\Device\Show.cshtml"
Write(flag.Item2.Name);
#line 31 "..\..\Views\Device\Show.cshtml"
Write(flag.Item2.flag.Name);
#line default
@@ -193,9 +195,9 @@ WriteLiteral(">");
WriteLiteral("</span>");
#line 29 "..\..\Views\Device\Show.cshtml"
if (flag.Item1.Comments != null)
{
#line 31 "..\..\Views\Device\Show.cshtml"
if (flag.Item1.Comments != null)
{
#line default
#line hidden
@@ -206,8 +208,8 @@ WriteLiteral(" class=\"comments\"");
WriteLiteral(">");
#line 30 "..\..\Views\Device\Show.cshtml"
Write(flag.Item1.Comments.ToHtmlComment());
#line 32 "..\..\Views\Device\Show.cshtml"
Write(flag.Item1.Comments.ToHtmlComment());
#line default
@@ -215,8 +217,8 @@ WriteLiteral(">");
WriteLiteral("</span>");
#line 30 "..\..\Views\Device\Show.cshtml"
}
#line 32 "..\..\Views\Device\Show.cshtml"
}
#line default
#line hidden
@@ -227,16 +229,17 @@ WriteLiteral(" class=\"added\"");
WriteLiteral(">");
#line 30 "..\..\Views\Device\Show.cshtml"
Write(CommonHelpers.FriendlyDateAndUser(flag.Item1.AddedDate, flag.Item1.AddedUser));
#line 32 "..\..\Views\Device\Show.cshtml"
Write(CommonHelpers.FriendlyDateAndUser(flag.Item1.AddedDate, flag.Item1.AddedUser));
#line default
#line hidden
WriteLiteral("</span>\r\n </span>\r\n </i>\r\n");
WriteLiteral("</span>\r\n </span>\r\n </i>\r\n");
#line 33 "..\..\Views\Device\Show.cshtml"
#line 35 "..\..\Views\Device\Show.cshtml"
}
}
@@ -282,7 +285,7 @@ WriteLiteral(@">
");
#line 66 "..\..\Views\Device\Show.cshtml"
#line 69 "..\..\Views\Device\Show.cshtml"
}
@@ -291,7 +294,7 @@ WriteLiteral(@">
WriteLiteral(" ");
#line 67 "..\..\Views\Device\Show.cshtml"
#line 70 "..\..\Views\Device\Show.cshtml"
Write(Html.Partial(MVC.Device.Views.DeviceParts._Subject, Model));
@@ -332,13 +335,13 @@ WriteLiteral(" id=\"DeviceDetailTabItems\"");
WriteLiteral("></ul>\r\n");
#line 103 "..\..\Views\Device\Show.cshtml"
#line 106 "..\..\Views\Device\Show.cshtml"
#line default
#line hidden
#line 103 "..\..\Views\Device\Show.cshtml"
#line 106 "..\..\Views\Device\Show.cshtml"
if (Authorization.HasAny(Claims.Device.ShowComments, Claims.Device.ShowJobs))
{
@@ -346,14 +349,14 @@ WriteLiteral("></ul>\r\n");
#line default
#line hidden
#line 105 "..\..\Views\Device\Show.cshtml"
#line 108 "..\..\Views\Device\Show.cshtml"
Write(Html.Partial(MVC.Device.Views.DeviceParts._CommentsAndJobs, Model));
#line default
#line hidden
#line 105 "..\..\Views\Device\Show.cshtml"
#line 108 "..\..\Views\Device\Show.cshtml"
}
@@ -363,7 +366,7 @@ WriteLiteral("></ul>\r\n");
WriteLiteral(" ");
#line 107 "..\..\Views\Device\Show.cshtml"
#line 110 "..\..\Views\Device\Show.cshtml"
if (Authorization.Has(Claims.Device.ShowDetails))
{
@@ -371,14 +374,14 @@ WriteLiteral(" ");
#line default
#line hidden
#line 109 "..\..\Views\Device\Show.cshtml"
#line 112 "..\..\Views\Device\Show.cshtml"
Write(Html.Partial(MVC.Device.Views.DeviceParts._Details, Model));
#line default
#line hidden
#line 109 "..\..\Views\Device\Show.cshtml"
#line 112 "..\..\Views\Device\Show.cshtml"
}
@@ -388,7 +391,7 @@ WriteLiteral(" ");
WriteLiteral(" ");
#line 111 "..\..\Views\Device\Show.cshtml"
#line 114 "..\..\Views\Device\Show.cshtml"
if (Authorization.Has(Claims.Device.ShowAssignmentHistory))
{
@@ -396,14 +399,14 @@ WriteLiteral(" ");
#line default
#line hidden
#line 113 "..\..\Views\Device\Show.cshtml"
#line 116 "..\..\Views\Device\Show.cshtml"
Write(Html.Partial(MVC.Device.Views.DeviceParts._AssignmentHistory, Model));
#line default
#line hidden
#line 113 "..\..\Views\Device\Show.cshtml"
#line 116 "..\..\Views\Device\Show.cshtml"
}
@@ -413,7 +416,7 @@ WriteLiteral(" ");
WriteLiteral(" ");
#line 115 "..\..\Views\Device\Show.cshtml"
#line 118 "..\..\Views\Device\Show.cshtml"
if (Authorization.Has(Claims.Device.ShowAttachments))
{
@@ -421,14 +424,14 @@ WriteLiteral(" ");
#line default
#line hidden
#line 117 "..\..\Views\Device\Show.cshtml"
#line 120 "..\..\Views\Device\Show.cshtml"
Write(Html.Partial(MVC.Device.Views.DeviceParts._Resources, Model));
#line default
#line hidden
#line 117 "..\..\Views\Device\Show.cshtml"
#line 120 "..\..\Views\Device\Show.cshtml"
}
@@ -438,22 +441,22 @@ WriteLiteral(" ");
WriteLiteral(" ");
#line 119 "..\..\Views\Device\Show.cshtml"
if (Authorization.Has(Claims.Device.ShowFlagAssignments))
#line 122 "..\..\Views\Device\Show.cshtml"
if (Authorization.Has(Claims.Device.ShowFlagAssignments) || Model.Device.DeviceFlagAssignments.CanShowAny())
{
#line default
#line hidden
#line 121 "..\..\Views\Device\Show.cshtml"
#line 124 "..\..\Views\Device\Show.cshtml"
Write(Html.Partial(MVC.Device.Views.DeviceParts._Flags, Model));
#line default
#line hidden
#line 121 "..\..\Views\Device\Show.cshtml"
#line 124 "..\..\Views\Device\Show.cshtml"
}
@@ -463,7 +466,7 @@ WriteLiteral(" ");
WriteLiteral(" ");
#line 123 "..\..\Views\Device\Show.cshtml"
#line 126 "..\..\Views\Device\Show.cshtml"
if (Authorization.Has(Claims.Device.ShowCertificates))
{
@@ -471,14 +474,14 @@ WriteLiteral(" ");
#line default
#line hidden
#line 125 "..\..\Views\Device\Show.cshtml"
#line 128 "..\..\Views\Device\Show.cshtml"
Write(Html.Partial(MVC.Device.Views.DeviceParts._Certificates, Model));
#line default
#line hidden
#line 125 "..\..\Views\Device\Show.cshtml"
#line 128 "..\..\Views\Device\Show.cshtml"
}
@@ -488,13 +491,13 @@ WriteLiteral(" ");
WriteLiteral(" </div>\r\n");
#line 128 "..\..\Views\Device\Show.cshtml"
#line 131 "..\..\Views\Device\Show.cshtml"
#line default
#line hidden
#line 128 "..\..\Views\Device\Show.cshtml"
#line 131 "..\..\Views\Device\Show.cshtml"
if (requiresLive)
{
@@ -550,7 +553,7 @@ WriteLiteral(" <script>\r\n $(function () {\r\n
" </script>\r\n");
#line 197 "..\..\Views\Device\Show.cshtml"
#line 200 "..\..\Views\Device\Show.cshtml"
}
+41 -41
View File
@@ -32,22 +32,22 @@
{@Html.ActionLink(item.Id, MVC.Device.Show(item.Id))}
else
{@item.Id}
@if (Authorization.Has(Claims.Device.ShowFlagAssignments))
@if (item.DeviceFlagAssignments.CanShowAny())
{
@if (item.DeviceFlagAssignments != null && item.DeviceFlagAssignments.Count > 0)
{
<div class="flags">
@foreach (var flag in item.DeviceFlagAssignments.Where(f => !f.RemovedDate.HasValue).Select(f => Tuple.Create(f, DeviceFlagService.GetDeviceFlag(f.DeviceFlagId))))
<div class="flags">
@foreach (var flag in item.DeviceFlagAssignments.Where(f => !f.RemovedDate.HasValue).Select(f => Tuple.Create(f, DeviceFlagService.GetDeviceFlag(f.DeviceFlagId))))
{
@if (flag.Item2.permission.CanShow())
{
<i class="flag fa fa-@(flag.Item2.Icon) fa-fw d-@(flag.Item2.IconColour)">
<i class="flag fa fa-@(flag.Item2.flag.Icon) fa-fw d-@(flag.Item2.flag.IconColour)">
<span class="details">
<span class="name">@flag.Item2.Name</span>@if (flag.Item1.Comments != null)
<span class="name">@flag.Item2.flag.Name</span>@if (flag.Item1.Comments != null)
{<span class="comments">@flag.Item1.Comments.ToHtmlComment()</span>}<span class="added">@CommonHelpers.FriendlyDateAndUser(flag.Item1.AddedDate, flag.Item1.AddedUserId)</span>
</span>
</i>
}
</div>
}
}
</div>
}
</td>
<td>
@@ -117,43 +117,43 @@
</tbody>
</table>
<script type="text/javascript">
$(function () {
var userTable = $('table.deviceTable');
$(function () {
var userTable = $('table.deviceTable');
userTable.each(function () {
var $this = $(this);
userTable.each(function () {
var $this = $(this);
if (!$this.data('deviceTable_Flags')) {
$this.tooltip({
items: 'i.flag',
content: function () {
var $this = $(this);
return $this.children('.details').html();
},
tooltipClass: 'FlagAssignment_Tooltip',
position: {
my: "right top",
at: "right bottom",
collision: "flipfit flip"
},
hade: {
effect: ''
},
close: function (e, ui) {
ui.tooltip.hover(
function () {
$(this).stop(true).fadeTo(100, 1);
if (!$this.data('deviceTable_Flags')) {
$this.tooltip({
items: 'i.flag',
content: function () {
var $this = $(this);
return $this.children('.details').html();
},
function () {
$(this).fadeOut(100, function () { $(this).remove(); });
});
tooltipClass: 'FlagAssignment_Tooltip',
position: {
my: "right top",
at: "right bottom",
collision: "flipfit flip"
},
hade: {
effect: ''
},
close: function (e, ui) {
ui.tooltip.hover(
function () {
$(this).stop(true).fadeTo(100, 1);
},
function () {
$(this).fadeOut(100, function () { $(this).remove(); });
});
}
});
$this.data('deviceTable_Flags', true)
}
});
$this.data('deviceTable_Flags', true)
}
});
});
});
</script>
}
else
@@ -175,35 +175,35 @@ WriteLiteral(" ");
#line 35 "..\..\Views\Device\_DeviceTable.cshtml"
if (Authorization.Has(Claims.Device.ShowFlagAssignments))
if (item.DeviceFlagAssignments.CanShowAny())
{
#line default
#line hidden
#line 37 "..\..\Views\Device\_DeviceTable.cshtml"
if (item.DeviceFlagAssignments != null && item.DeviceFlagAssignments.Count > 0)
{
#line default
#line hidden
WriteLiteral(" <div");
WriteLiteral(" <div");
WriteLiteral(" class=\"flags\"");
WriteLiteral(">\r\n");
#line 40 "..\..\Views\Device\_DeviceTable.cshtml"
#line 38 "..\..\Views\Device\_DeviceTable.cshtml"
#line default
#line hidden
#line 38 "..\..\Views\Device\_DeviceTable.cshtml"
foreach (var flag in item.DeviceFlagAssignments.Where(f => !f.RemovedDate.HasValue).Select(f => Tuple.Create(f, DeviceFlagService.GetDeviceFlag(f.DeviceFlagId))))
{
#line default
#line hidden
#line 40 "..\..\Views\Device\_DeviceTable.cshtml"
foreach (var flag in item.DeviceFlagAssignments.Where(f => !f.RemovedDate.HasValue).Select(f => Tuple.Create(f, DeviceFlagService.GetDeviceFlag(f.DeviceFlagId))))
if (flag.Item2.permission.CanShow())
{
@@ -211,26 +211,26 @@ WriteLiteral(">\r\n");
#line hidden
WriteLiteral(" <i");
WriteAttribute("class", Tuple.Create(" class=\"", 1953), Tuple.Create("\"", 2023)
, Tuple.Create(Tuple.Create("", 1961), Tuple.Create("flag", 1961), true)
, Tuple.Create(Tuple.Create(" ", 1965), Tuple.Create("fa", 1966), true)
, Tuple.Create(Tuple.Create(" ", 1968), Tuple.Create("fa-", 1969), true)
WriteAttribute("class", Tuple.Create(" class=\"", 1901), Tuple.Create("\"", 1981)
, Tuple.Create(Tuple.Create("", 1909), Tuple.Create("flag", 1909), true)
, Tuple.Create(Tuple.Create(" ", 1913), Tuple.Create("fa", 1914), true)
, Tuple.Create(Tuple.Create(" ", 1916), Tuple.Create("fa-", 1917), true)
#line 42 "..\..\Views\Device\_DeviceTable.cshtml"
, Tuple.Create(Tuple.Create("", 1972), Tuple.Create<System.Object, System.Int32>(flag.Item2.Icon
, Tuple.Create(Tuple.Create("", 1920), Tuple.Create<System.Object, System.Int32>(flag.Item2.flag.Icon
#line default
#line hidden
, 1972), false)
, Tuple.Create(Tuple.Create(" ", 1990), Tuple.Create("fa-fw", 1991), true)
, Tuple.Create(Tuple.Create(" ", 1996), Tuple.Create("d-", 1997), true)
, 1920), false)
, Tuple.Create(Tuple.Create(" ", 1943), Tuple.Create("fa-fw", 1944), true)
, Tuple.Create(Tuple.Create(" ", 1949), Tuple.Create("d-", 1950), true)
#line 42 "..\..\Views\Device\_DeviceTable.cshtml"
, Tuple.Create(Tuple.Create("", 1999), Tuple.Create<System.Object, System.Int32>(flag.Item2.IconColour
, Tuple.Create(Tuple.Create("", 1952), Tuple.Create<System.Object, System.Int32>(flag.Item2.flag.IconColour
#line default
#line hidden
, 1999), false)
, 1952), false)
);
WriteLiteral(">\r\n <span");
@@ -245,7 +245,7 @@ WriteLiteral(">");
#line 44 "..\..\Views\Device\_DeviceTable.cshtml"
Write(flag.Item2.Name);
Write(flag.Item2.flag.Name);
#line default
@@ -254,7 +254,7 @@ WriteLiteral("</span>");
#line 44 "..\..\Views\Device\_DeviceTable.cshtml"
if (flag.Item1.Comments != null)
if (flag.Item1.Comments != null)
{
#line default
@@ -302,17 +302,18 @@ WriteLiteral("</span>\r\n </span>
#line default
#line hidden
WriteLiteral("\r\n </div>\r\n");
#line 50 "..\..\Views\Device\_DeviceTable.cshtml"
}
#line 48 "..\..\Views\Device\_DeviceTable.cshtml"
}
#line default
#line hidden
WriteLiteral(" </div>\r\n");
#line 50 "..\..\Views\Device\_DeviceTable.cshtml"
#line 51 "..\..\Views\Device\_DeviceTable.cshtml"
}
@@ -627,46 +628,27 @@ WriteLiteral(" <script");
WriteLiteral(" type=\"text/javascript\"");
WriteLiteral(@">
$(function () {
var userTable = $('table.deviceTable');
userTable.each(function () {
var $this = $(this);
if (!$this.data('deviceTable_Flags')) {
$this.tooltip({
items: 'i.flag',
content: function () {
var $this = $(this);
return $this.children('.details').html();
},
tooltipClass: 'FlagAssignment_Tooltip',
position: {
my: ""right top"",
at: ""right bottom"",
collision: ""flipfit flip""
},
hade: {
effect: ''
},
close: function (e, ui) {
ui.tooltip.hover(
function () {
$(this).stop(true).fadeTo(100, 1);
},
function () {
$(this).fadeOut(100, function () { $(this).remove(); });
});
}
});
$this.data('deviceTable_Flags', true)
}
});
});
</script>
");
WriteLiteral(">\r\n $(function () {\r\n var userTable = $(\'table.deviceTa" +
"ble\');\r\n\r\n userTable.each(function () {\r\n var " +
"$this = $(this);\r\n\r\n if (!$this.data(\'deviceTable_Flags\')) {\r" +
"\n $this.tooltip({\r\n items: \'i." +
"flag\',\r\n content: function () {\r\n " +
" var $this = $(this);\r\n return $this.c" +
"hildren(\'.details\').html();\r\n },\r\n " +
" tooltipClass: \'FlagAssignment_Tooltip\',\r\n po" +
"sition: {\r\n my: \"right top\",\r\n " +
" at: \"right bottom\",\r\n collision: \"fl" +
"ipfit flip\"\r\n },\r\n hade: {" +
"\r\n effect: \'\'\r\n },\r\n " +
" close: function (e, ui) {\r\n " +
" ui.tooltip.hover(\r\n function () {\r\n " +
" $(this).stop(true).fadeTo(100, 1);\r\n " +
" },\r\n function () {" +
"\r\n $(this).fadeOut(100, function () { $(t" +
"his).remove(); });\r\n });\r\n " +
" }\r\n });\r\n\r\n $this.data(\'d" +
"eviceTable_Flags\', true)\r\n }\r\n });\r\n " +
" });\r\n </script>\r\n");
#line 158 "..\..\Views\Device\_DeviceTable.cshtml"