SignalR Bug Fixes & Minor UI Changes
Document Template import status and Device Enrolment status fixes. Attachment download fixes for SignalR foreverFrame transport. Database queries for Devices, Jobs and Users updated. Device attributes (model, profile, batch) now shown in various places.
This commit is contained in:
@@ -13,6 +13,10 @@
|
||||
</th>
|
||||
<th>Device Model
|
||||
</th>
|
||||
<th>Device Profile
|
||||
</th>
|
||||
<th>Device Batch
|
||||
</th>
|
||||
<th>Assigned
|
||||
</th>
|
||||
<th>Unassigned
|
||||
@@ -32,10 +36,58 @@
|
||||
}
|
||||
</td>
|
||||
<td>
|
||||
@dua.Device.AssetNumber
|
||||
@if (!string.IsNullOrWhiteSpace(dua.Device.AssetNumber))
|
||||
{
|
||||
@dua.Device.AssetNumber
|
||||
}
|
||||
else
|
||||
{
|
||||
<span class="smallMessage">N/A</span>
|
||||
}
|
||||
</td>
|
||||
<td>
|
||||
@dua.Device.DeviceModel.ToString()
|
||||
@if (dua.Device.DeviceModelId.HasValue)
|
||||
{
|
||||
if (Authorization.Has(Claims.Config.DeviceModel.Show))
|
||||
{
|
||||
@Html.ActionLink(dua.Device.DeviceModel.ToString(), MVC.Config.DeviceModel.Index(dua.Device.DeviceModelId))
|
||||
}
|
||||
else
|
||||
{
|
||||
@dua.Device.DeviceModel.ToString()
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
<span class="smallMessage">Unknown</span>
|
||||
}
|
||||
</td>
|
||||
<td>
|
||||
@if (Authorization.Has(Claims.Config.DeviceProfile.Show))
|
||||
{
|
||||
@Html.ActionLink(dua.Device.DeviceProfile.ToString(), MVC.Config.DeviceProfile.Index(dua.Device.DeviceProfileId))
|
||||
}
|
||||
else
|
||||
{
|
||||
@dua.Device.DeviceProfile.ToString()
|
||||
}
|
||||
</td>
|
||||
<td>
|
||||
@if (dua.Device.DeviceBatchId.HasValue)
|
||||
{
|
||||
if (Authorization.Has(Claims.Config.DeviceBatch.Show))
|
||||
{
|
||||
@Html.ActionLink(dua.Device.DeviceBatch.ToString(), MVC.Config.DeviceBatch.Index(dua.Device.DeviceBatchId))
|
||||
}
|
||||
else
|
||||
{
|
||||
@dua.Device.DeviceModel.ToString()
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
<span class="smallMessage">None</span>
|
||||
}
|
||||
</td>
|
||||
<td>
|
||||
@CommonHelpers.FriendlyDate(dua.AssignedDate)
|
||||
|
||||
@@ -86,6 +86,10 @@ WriteLiteral(@">
|
||||
</th>
|
||||
<th>Device Model
|
||||
</th>
|
||||
<th>Device Profile
|
||||
</th>
|
||||
<th>Device Batch
|
||||
</th>
|
||||
<th>Assigned
|
||||
</th>
|
||||
<th>Unassigned
|
||||
@@ -94,13 +98,13 @@ WriteLiteral(@">
|
||||
");
|
||||
|
||||
|
||||
#line 21 "..\..\Views\User\UserParts\_AssignmentHistory.cshtml"
|
||||
#line 25 "..\..\Views\User\UserParts\_AssignmentHistory.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 21 "..\..\Views\User\UserParts\_AssignmentHistory.cshtml"
|
||||
#line 25 "..\..\Views\User\UserParts\_AssignmentHistory.cshtml"
|
||||
foreach (var dua in Model.User.DeviceUserAssignments.OrderByDescending(m => m.AssignedDate))
|
||||
{
|
||||
|
||||
@@ -110,13 +114,13 @@ WriteLiteral(@">
|
||||
WriteLiteral(" <tr>\r\n <td>\r\n");
|
||||
|
||||
|
||||
#line 25 "..\..\Views\User\UserParts\_AssignmentHistory.cshtml"
|
||||
#line 29 "..\..\Views\User\UserParts\_AssignmentHistory.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 25 "..\..\Views\User\UserParts\_AssignmentHistory.cshtml"
|
||||
#line 29 "..\..\Views\User\UserParts\_AssignmentHistory.cshtml"
|
||||
if (Authorization.Has(Claims.Device.Show))
|
||||
{
|
||||
|
||||
@@ -124,14 +128,14 @@ WriteLiteral(" <tr>\r\n <td>\r\n");
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 27 "..\..\Views\User\UserParts\_AssignmentHistory.cshtml"
|
||||
#line 31 "..\..\Views\User\UserParts\_AssignmentHistory.cshtml"
|
||||
Write(Html.ActionLink(dua.Device.SerialNumber, MVC.Device.Show(dua.DeviceSerialNumber)));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 27 "..\..\Views\User\UserParts\_AssignmentHistory.cshtml"
|
||||
#line 31 "..\..\Views\User\UserParts\_AssignmentHistory.cshtml"
|
||||
|
||||
}
|
||||
else
|
||||
@@ -141,14 +145,14 @@ WriteLiteral(" <tr>\r\n <td>\r\n");
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 31 "..\..\Views\User\UserParts\_AssignmentHistory.cshtml"
|
||||
#line 35 "..\..\Views\User\UserParts\_AssignmentHistory.cshtml"
|
||||
Write(dua.Device.SerialNumber);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 31 "..\..\Views\User\UserParts\_AssignmentHistory.cshtml"
|
||||
#line 35 "..\..\Views\User\UserParts\_AssignmentHistory.cshtml"
|
||||
|
||||
}
|
||||
|
||||
@@ -157,32 +161,236 @@ WriteLiteral(" <tr>\r\n <td>\r\n");
|
||||
#line hidden
|
||||
WriteLiteral(" </td>\r\n <td>\r\n");
|
||||
|
||||
|
||||
#line 39 "..\..\Views\User\UserParts\_AssignmentHistory.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 39 "..\..\Views\User\UserParts\_AssignmentHistory.cshtml"
|
||||
if (!string.IsNullOrWhiteSpace(dua.Device.AssetNumber))
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 41 "..\..\Views\User\UserParts\_AssignmentHistory.cshtml"
|
||||
Write(dua.Device.AssetNumber);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 41 "..\..\Views\User\UserParts\_AssignmentHistory.cshtml"
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <span");
|
||||
|
||||
WriteLiteral(" class=\"smallMessage\"");
|
||||
|
||||
WriteLiteral(">N/A</span>\r\n");
|
||||
|
||||
|
||||
#line 46 "..\..\Views\User\UserParts\_AssignmentHistory.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" </td>\r\n <td>\r\n");
|
||||
|
||||
|
||||
#line 49 "..\..\Views\User\UserParts\_AssignmentHistory.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 49 "..\..\Views\User\UserParts\_AssignmentHistory.cshtml"
|
||||
if (dua.Device.DeviceModelId.HasValue)
|
||||
{
|
||||
if (Authorization.Has(Claims.Config.DeviceModel.Show))
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 53 "..\..\Views\User\UserParts\_AssignmentHistory.cshtml"
|
||||
Write(Html.ActionLink(dua.Device.DeviceModel.ToString(), MVC.Config.DeviceModel.Index(dua.Device.DeviceModelId)));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 53 "..\..\Views\User\UserParts\_AssignmentHistory.cshtml"
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 57 "..\..\Views\User\UserParts\_AssignmentHistory.cshtml"
|
||||
Write(dua.Device.DeviceModel.ToString());
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 57 "..\..\Views\User\UserParts\_AssignmentHistory.cshtml"
|
||||
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <span");
|
||||
|
||||
WriteLiteral(" class=\"smallMessage\"");
|
||||
|
||||
WriteLiteral(">Unknown</span>\r\n");
|
||||
|
||||
|
||||
#line 63 "..\..\Views\User\UserParts\_AssignmentHistory.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" </td>\r\n <td>\r\n");
|
||||
|
||||
|
||||
#line 66 "..\..\Views\User\UserParts\_AssignmentHistory.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 66 "..\..\Views\User\UserParts\_AssignmentHistory.cshtml"
|
||||
if (Authorization.Has(Claims.Config.DeviceProfile.Show))
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 68 "..\..\Views\User\UserParts\_AssignmentHistory.cshtml"
|
||||
Write(Html.ActionLink(dua.Device.DeviceProfile.ToString(), MVC.Config.DeviceProfile.Index(dua.Device.DeviceProfileId)));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 68 "..\..\Views\User\UserParts\_AssignmentHistory.cshtml"
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 72 "..\..\Views\User\UserParts\_AssignmentHistory.cshtml"
|
||||
Write(dua.Device.DeviceProfile.ToString());
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 72 "..\..\Views\User\UserParts\_AssignmentHistory.cshtml"
|
||||
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" </td>\r\n <td>\r\n");
|
||||
|
||||
|
||||
#line 76 "..\..\Views\User\UserParts\_AssignmentHistory.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 76 "..\..\Views\User\UserParts\_AssignmentHistory.cshtml"
|
||||
if (dua.Device.DeviceBatchId.HasValue)
|
||||
{
|
||||
if (Authorization.Has(Claims.Config.DeviceBatch.Show))
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 80 "..\..\Views\User\UserParts\_AssignmentHistory.cshtml"
|
||||
Write(Html.ActionLink(dua.Device.DeviceBatch.ToString(), MVC.Config.DeviceBatch.Index(dua.Device.DeviceBatchId)));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 80 "..\..\Views\User\UserParts\_AssignmentHistory.cshtml"
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 84 "..\..\Views\User\UserParts\_AssignmentHistory.cshtml"
|
||||
Write(dua.Device.DeviceModel.ToString());
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 84 "..\..\Views\User\UserParts\_AssignmentHistory.cshtml"
|
||||
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <span");
|
||||
|
||||
WriteLiteral(" class=\"smallMessage\"");
|
||||
|
||||
WriteLiteral(">None</span>\r\n");
|
||||
|
||||
|
||||
#line 90 "..\..\Views\User\UserParts\_AssignmentHistory.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" </td>\r\n <td>\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 35 "..\..\Views\User\UserParts\_AssignmentHistory.cshtml"
|
||||
Write(dua.Device.AssetNumber);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n </td>\r\n <td>\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 38 "..\..\Views\User\UserParts\_AssignmentHistory.cshtml"
|
||||
Write(dua.Device.DeviceModel.ToString());
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n </td>\r\n <td>\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 41 "..\..\Views\User\UserParts\_AssignmentHistory.cshtml"
|
||||
#line 93 "..\..\Views\User\UserParts\_AssignmentHistory.cshtml"
|
||||
Write(CommonHelpers.FriendlyDate(dua.AssignedDate));
|
||||
|
||||
|
||||
@@ -193,7 +401,7 @@ WriteLiteral("\r\n </td>\r\n <td>\r\n");
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 44 "..\..\Views\User\UserParts\_AssignmentHistory.cshtml"
|
||||
#line 96 "..\..\Views\User\UserParts\_AssignmentHistory.cshtml"
|
||||
Write(CommonHelpers.FriendlyDate(dua.UnassignedDate, "Current"));
|
||||
|
||||
|
||||
@@ -202,7 +410,7 @@ WriteLiteral(" ");
|
||||
WriteLiteral("\r\n </td>\r\n </tr>\r\n");
|
||||
|
||||
|
||||
#line 47 "..\..\Views\User\UserParts\_AssignmentHistory.cshtml"
|
||||
#line 99 "..\..\Views\User\UserParts\_AssignmentHistory.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -211,7 +419,7 @@ WriteLiteral("\r\n </td>\r\n </tr>\r\n");
|
||||
WriteLiteral(" </table>\r\n");
|
||||
|
||||
|
||||
#line 49 "..\..\Views\User\UserParts\_AssignmentHistory.cshtml"
|
||||
#line 101 "..\..\Views\User\UserParts\_AssignmentHistory.cshtml"
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -226,7 +434,7 @@ WriteLiteral(" class=\"smallMessage\"");
|
||||
WriteLiteral(">No Assignment History Available</span>\r\n");
|
||||
|
||||
|
||||
#line 53 "..\..\Views\User\UserParts\_AssignmentHistory.cshtml"
|
||||
#line 105 "..\..\Views\User\UserParts\_AssignmentHistory.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -236,7 +444,7 @@ WriteLiteral(" <script>\r\n $(\'#UserDetailTabItems\').append(\'<li><a
|
||||
"b-AssignmentHistory\">Assignment History [");
|
||||
|
||||
|
||||
#line 55 "..\..\Views\User\UserParts\_AssignmentHistory.cshtml"
|
||||
#line 107 "..\..\Views\User\UserParts\_AssignmentHistory.cshtml"
|
||||
Write(Model.User.DeviceUserAssignments.Count);
|
||||
|
||||
|
||||
|
||||
@@ -112,7 +112,7 @@
|
||||
|
||||
e.attr('data-attachmentid', a.Id).attr('data-mimetype', a.MimeType).attr('href', '@(Url.Action(MVC.API.User.AttachmentDownload()))/' + a.Id);
|
||||
e.find('.icon img').attr('src', '@(Url.Action(MVC.API.User.AttachmentThumbnail()))/' + a.Id);
|
||||
e.find('.comments').text(a.Comments);
|
||||
e.find('.comments').text(a.Description);
|
||||
e.find('.author').text(a.Author);
|
||||
e.find('.timestamp').text(a.TimestampFull).attr('title', a.TimestampFull).livestamp(a.TimestampUnixEpoc);
|
||||
if (canRemove)
|
||||
@@ -124,8 +124,35 @@
|
||||
if (!quick)
|
||||
e.show('slow');
|
||||
if (a.MimeType.toLowerCase().indexOf('image/') == 0)
|
||||
e.shadowbox({ gallery: 'attachments', player: 'img', title: a.Comments });
|
||||
e.shadowbox({ gallery: 'attachments', player: 'img', title: a.Description });
|
||||
else
|
||||
e.click(onDownload);
|
||||
}
|
||||
|
||||
function onDownload() {
|
||||
var $this = $(this);
|
||||
var url = $this.attr('href');
|
||||
|
||||
if ($.connection && $.connection.hub && $.connection.hub.transport &&
|
||||
$.connection.hub.transport.name == 'foreverFrame') {
|
||||
// SignalR active with foreverFrame transport - use popup window
|
||||
window.open(url, '_blank', 'height=150,width=250,location=no,menubar=no,resizable=no,scrollbars=no,status=no,toolbar=no');
|
||||
} else {
|
||||
// use iFrame
|
||||
if (!$attachmentDownloadHost) {
|
||||
$attachmentDownloadHost = $('<iframe>')
|
||||
.attr({ 'src': url, 'title': 'Attachment Download Host' })
|
||||
.addClass('hidden')
|
||||
.appendTo('body')
|
||||
.contents();
|
||||
} else {
|
||||
$attachmentDownloadHost[0].location.href = url;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
function onRemoveAttachment(id) {
|
||||
var a = $attachmentOutput.find('a[data-attachmentid=' + id + ']');
|
||||
|
||||
@@ -265,6 +292,8 @@
|
||||
$this = $(this);
|
||||
if ($this.attr('data-mimetype').toLowerCase().indexOf('image/') == 0)
|
||||
$this.shadowbox({ gallery: 'attachments', player: 'img', title: $this.find('.comments').text() });
|
||||
else
|
||||
$this.click(onDownload);
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
@@ -511,39 +511,58 @@ WriteLiteral("/\' + a.Id);\r\n e.find(\'.icon img\').
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("/\' + a.Id);\r\n e.find(\'.comments\').text(a.Comments);\r\n " +
|
||||
" e.find(\'.author\').text(a.Author);\r\n " +
|
||||
" e.find(\'.timestamp\').text(a.TimestampFull).attr(\'title\', a.TimestampFu" +
|
||||
"ll).livestamp(a.TimestampUnixEpoc);\r\n if (canRemove)\r" +
|
||||
"\n e.find(\'.remove\').click(removeAttachment);\r\n " +
|
||||
" if (!quick)\r\n e.hide();\r" +
|
||||
"\n $attachmentOutput.append(e);\r\n " +
|
||||
" onUpdate();\r\n if (!quick)\r\n " +
|
||||
" e.show(\'slow\');\r\n if (a.MimeType.toLower" +
|
||||
"Case().indexOf(\'image/\') == 0)\r\n e.shadowbox({ ga" +
|
||||
"llery: \'attachments\', player: \'img\', title: a.Comments });\r\n " +
|
||||
" }\r\n function onRemoveAttachment(id) {\r\n " +
|
||||
" var a = $attachmentOutput.find(\'a[data-attachmentid=\' + id + \']\');" +
|
||||
"\r\n\r\n a.hide(300).delay(300).queue(function () {\r\n " +
|
||||
" var $this = $(this);\r\n " +
|
||||
" if ($this.attr(\'data-mimetype\').toLowerCase().indexOf(\'image/\') == 0)\r\n " +
|
||||
" Shadowbox.removeCache(this);\r\n " +
|
||||
" $this.find(\'.timestamp\').livestamp(\'destroy\');\r\n " +
|
||||
" $this.remove();\r\n onUpdate();\r\n " +
|
||||
" });\r\n }\r\n\r\n f" +
|
||||
"unction onUpdate() {\r\n var attachmentCount = $attachm" +
|
||||
"entOutput.children(\'a\').length;\r\n var tabHeading = \'A" +
|
||||
"ttachments [\' + attachmentCount + \']\';\r\n $(\'#UserDeta" +
|
||||
"ilTab-ResourcesLink\').text(tabHeading);\r\n }\r\n\r\n");
|
||||
WriteLiteral("/\' + a.Id);\r\n e.find(\'.comments\').text(a.Description);" +
|
||||
"\r\n e.find(\'.author\').text(a.Author);\r\n " +
|
||||
" e.find(\'.timestamp\').text(a.TimestampFull).attr(\'title\', a.Timestam" +
|
||||
"pFull).livestamp(a.TimestampUnixEpoc);\r\n if (canRemov" +
|
||||
"e)\r\n e.find(\'.remove\').click(removeAttachment);\r\n" +
|
||||
" if (!quick)\r\n e.hide(" +
|
||||
");\r\n $attachmentOutput.append(e);\r\n " +
|
||||
" onUpdate();\r\n if (!quick)\r\n " +
|
||||
" e.show(\'slow\');\r\n if (a.MimeType.toLo" +
|
||||
"werCase().indexOf(\'image/\') == 0)\r\n e.shadowbox({" +
|
||||
" gallery: \'attachments\', player: \'img\', title: a.Description });\r\n " +
|
||||
" else\r\n e.click(onDownload);\r\n " +
|
||||
" }\r\n\r\n function onDownload() {\r\n " +
|
||||
" var $this = $(this);\r\n var url = " +
|
||||
"$this.attr(\'href\');\r\n\r\n if ($.connection && $.connect" +
|
||||
"ion.hub && $.connection.hub.transport &&\r\n " +
|
||||
" $.connection.hub.transport.name == \'foreverFrame\') {\r\n " +
|
||||
" // SignalR active with foreverFrame transport - use popup window" +
|
||||
"\r\n window.open(url, \'_blank\', \'height=150,width=2" +
|
||||
"50,location=no,menubar=no,resizable=no,scrollbars=no,status=no,toolbar=no\');\r\n " +
|
||||
" } else {\r\n // use iFram" +
|
||||
"e\r\n if (!$attachmentDownloadHost) {\r\n " +
|
||||
" $attachmentDownloadHost = $(\'<iframe>\')\r\n " +
|
||||
" .attr({ \'src\': url, \'title\': \'Attachment Download Host\'" +
|
||||
" })\r\n .addClass(\'hidden\')\r\n " +
|
||||
" .appendTo(\'body\')\r\n " +
|
||||
" .contents();\r\n } else {\r\n " +
|
||||
" $attachmentDownloadHost[0].location.href = url;\r\n " +
|
||||
" }\r\n }\r\n\r\n " +
|
||||
" return false;\r\n }\r\n\r\n function o" +
|
||||
"nRemoveAttachment(id) {\r\n var a = $attachmentOutput.f" +
|
||||
"ind(\'a[data-attachmentid=\' + id + \']\');\r\n\r\n a.hide(30" +
|
||||
"0).delay(300).queue(function () {\r\n var $this = $" +
|
||||
"(this);\r\n if ($this.attr(\'data-mimetype\').toLower" +
|
||||
"Case().indexOf(\'image/\') == 0)\r\n Shadowbox.re" +
|
||||
"moveCache(this);\r\n $this.find(\'.timestamp\').lives" +
|
||||
"tamp(\'destroy\');\r\n $this.remove();\r\n " +
|
||||
" onUpdate();\r\n });\r\n " +
|
||||
" }\r\n\r\n function onUpdate() {\r\n " +
|
||||
" var attachmentCount = $attachmentOutput.children(\'a\').length;\r\n " +
|
||||
" var tabHeading = \'Attachments [\' + attachmentCount + \']\';\r\n " +
|
||||
" $(\'#UserDetailTab-ResourcesLink\').text(tabHeading);\r\n" +
|
||||
" }\r\n\r\n");
|
||||
|
||||
|
||||
#line 148 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
#line 175 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 148 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
#line 175 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
if (canAddAttachments)
|
||||
{
|
||||
|
||||
@@ -574,7 +593,7 @@ WriteLiteral("\r\n //#region Add Attachments\r\n
|
||||
" Silverlight.createObject(\'");
|
||||
|
||||
|
||||
#line 183 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
#line 210 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
Write(Links.ClientBin.Disco_Silverlight_AttachmentUpload_xap);
|
||||
|
||||
|
||||
@@ -595,7 +614,7 @@ WriteLiteral(@"',
|
||||
'UploadUrl=");
|
||||
|
||||
|
||||
#line 195 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
#line 222 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
Write(Url.Action(MVC.API.User.AttachmentUpload(Model.User.UserId, null)));
|
||||
|
||||
|
||||
@@ -616,7 +635,7 @@ WriteLiteral(@"');
|
||||
");
|
||||
|
||||
|
||||
#line 207 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
#line 234 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -625,7 +644,7 @@ WriteLiteral(@"');
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 208 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
#line 235 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
if (canRemoveAnyAttachments || canRemoveOwnAttachments)
|
||||
{
|
||||
|
||||
@@ -659,7 +678,7 @@ WriteLiteral(@"
|
||||
url: '");
|
||||
|
||||
|
||||
#line 234 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
#line 261 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
Write(Url.Action(MVC.API.User.AttachmentRemove()));
|
||||
|
||||
|
||||
@@ -696,7 +715,7 @@ WriteLiteral(@"',
|
||||
");
|
||||
|
||||
|
||||
#line 262 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
#line 289 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -707,6 +726,8 @@ WriteLiteral(@"
|
||||
$this = $(this);
|
||||
if ($this.attr('data-mimetype').toLowerCase().indexOf('image/') == 0)
|
||||
$this.shadowbox({ gallery: 'attachments', player: 'img', title: $this.find('.comments').text() });
|
||||
else
|
||||
$this.click(onDownload);
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@@ -717,7 +738,7 @@ WriteLiteral(@"
|
||||
$('#UserDetailTabItems').append('<li><a href=""#UserDetailTab-Resources"" id=""UserDetailTab-ResourcesLink"">Attachments [");
|
||||
|
||||
|
||||
#line 275 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
#line 304 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
Write(Model.User.UserAttachments == null ? 0 : Model.User.UserAttachments.Count);
|
||||
|
||||
|
||||
@@ -726,7 +747,7 @@ WriteLiteral(@"
|
||||
WriteLiteral("]</a></li>\');\r\n </script>\r\n</div>\r\n");
|
||||
|
||||
|
||||
#line 278 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
#line 307 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
if (canAddAttachments)
|
||||
{
|
||||
|
||||
@@ -748,14 +769,14 @@ WriteLiteral(" id=\"silverlightHostUploadAttachment\"");
|
||||
WriteLiteral(">\r\n </div>\r\n </div>\r\n");
|
||||
|
||||
|
||||
#line 284 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
#line 313 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 285 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
#line 314 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
if (canRemoveAnyAttachments || canRemoveOwnAttachments)
|
||||
{
|
||||
|
||||
@@ -777,7 +798,7 @@ WriteLiteral(" class=\"fa fa-exclamation-triangle fa-lg\"");
|
||||
WriteLiteral("></i> Are you sure?\r\n </p>\r\n </div>\r\n");
|
||||
|
||||
|
||||
#line 292 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
#line 321 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
}
|
||||
|
||||
#line default
|
||||
|
||||
@@ -261,29 +261,49 @@
|
||||
{
|
||||
@assignment.Device.SerialNumber
|
||||
}
|
||||
</span>(<span>@assignment.Device.ComputerName</span>)
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Model:
|
||||
</td>
|
||||
<td>
|
||||
<span class="User_Show_AssignedDevices_CurrentAssignment_Model">@assignment.Device.DeviceModel.ToString()</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Asset:</td>
|
||||
<td>
|
||||
@if (!string.IsNullOrEmpty(assignment.Device.AssetNumber))
|
||||
</span>
|
||||
@if (!string.IsNullOrWhiteSpace(assignment.Device.ComputerName))
|
||||
{
|
||||
<text>(<span class="User_Show_AssignedDevices_CurrentAssignment_ComputerName">@assignment.Device.ComputerName</span>)</text>
|
||||
}
|
||||
</td>
|
||||
</tr>
|
||||
@if (!string.IsNullOrEmpty(assignment.Device.AssetNumber))
|
||||
{
|
||||
<tr>
|
||||
<td>Asset:</td>
|
||||
<td>
|
||||
<span class="User_Show_AssignedDevices_CurrentAssignment_Asset">@assignment.Device.AssetNumber</span>
|
||||
}
|
||||
else
|
||||
{
|
||||
<span class="smallMessage">Unknown</span>
|
||||
}
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
@if (assignment.Device.DeviceModelId.HasValue)
|
||||
{
|
||||
<tr>
|
||||
<td>Model:
|
||||
</td>
|
||||
<td>
|
||||
<span class="User_Show_AssignedDevices_CurrentAssignment_Model">@assignment.Device.DeviceModel.ToString()</span>
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
<tr>
|
||||
<td>Profile:
|
||||
</td>
|
||||
<td>
|
||||
<span class="User_Show_AssignedDevices_CurrentAssignment_Profile">@assignment.Device.DeviceProfile.ToString()</span>
|
||||
</td>
|
||||
</tr>
|
||||
@if (assignment.Device.DeviceBatchId.HasValue)
|
||||
{
|
||||
<tr>
|
||||
<td>Batch:
|
||||
</td>
|
||||
<td>
|
||||
<span class="User_Show_AssignedDevices_CurrentAssignment_Batch">@assignment.Device.DeviceBatch.ToString()</span>
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
<tr>
|
||||
<td>Assigned:</td>
|
||||
<td>
|
||||
|
||||
@@ -873,107 +873,200 @@ WriteLiteral(">\r\n");
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" </span>(<span>");
|
||||
WriteLiteral(" </span>\r\n");
|
||||
|
||||
|
||||
#line 264 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
Write(assignment.Device.ComputerName);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(@"</span>)
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Model:
|
||||
</td>
|
||||
<td>
|
||||
<span");
|
||||
|
||||
WriteLiteral(" class=\"User_Show_AssignedDevices_CurrentAssignment_Model\"");
|
||||
|
||||
WriteLiteral(">");
|
||||
|
||||
|
||||
#line 271 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
Write(assignment.Device.DeviceModel.ToString());
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(@"</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Asset:</td>
|
||||
<td>
|
||||
");
|
||||
|
||||
|
||||
#line 277 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 265 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 277 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
if (!string.IsNullOrEmpty(assignment.Device.AssetNumber))
|
||||
#line 265 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
if (!string.IsNullOrWhiteSpace(assignment.Device.ComputerName))
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <span");
|
||||
WriteLiteral(" ");
|
||||
|
||||
WriteLiteral("(<span");
|
||||
|
||||
WriteLiteral(" class=\"User_Show_AssignedDevices_CurrentAssignment_ComputerName\"");
|
||||
|
||||
WriteLiteral(">");
|
||||
|
||||
|
||||
#line 267 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
Write(assignment.Device.ComputerName);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("</span>)");
|
||||
|
||||
WriteLiteral("\r\n");
|
||||
|
||||
|
||||
#line 268 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" </td>\r\n " +
|
||||
" </tr>\r\n");
|
||||
|
||||
|
||||
#line 271 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 271 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
if (!string.IsNullOrEmpty(assignment.Device.AssetNumber))
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(@" <tr>
|
||||
<td>Asset:</td>
|
||||
<td>
|
||||
<span");
|
||||
|
||||
WriteLiteral(" class=\"User_Show_AssignedDevices_CurrentAssignment_Asset\"");
|
||||
|
||||
WriteLiteral(">");
|
||||
|
||||
|
||||
#line 279 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 276 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
Write(assignment.Device.AssetNumber);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("</span>\r\n");
|
||||
WriteLiteral("</span>\r\n </td>\r\n " +
|
||||
" </tr>\r\n");
|
||||
|
||||
|
||||
#line 279 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 280 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
}
|
||||
else
|
||||
{
|
||||
if (assignment.Device.DeviceModelId.HasValue)
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <span");
|
||||
WriteLiteral(@" <tr>
|
||||
<td>Model:
|
||||
</td>
|
||||
<td>
|
||||
<span");
|
||||
|
||||
WriteLiteral(" class=\"smallMessage\"");
|
||||
WriteLiteral(" class=\"User_Show_AssignedDevices_CurrentAssignment_Model\"");
|
||||
|
||||
WriteLiteral(">Unknown</span>\r\n");
|
||||
WriteLiteral(">");
|
||||
|
||||
|
||||
#line 284 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
}
|
||||
#line 286 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
Write(assignment.Device.DeviceModel.ToString());
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(@" </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Assigned:</td>
|
||||
WriteLiteral("</span>\r\n </td>\r\n " +
|
||||
" </tr>\r\n");
|
||||
|
||||
|
||||
#line 289 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(@" <tr>
|
||||
<td>Profile:
|
||||
</td>
|
||||
<td>
|
||||
<span");
|
||||
|
||||
WriteLiteral(" class=\"User_Show_AssignedDevices_CurrentAssignment_Profile\"");
|
||||
|
||||
WriteLiteral(">");
|
||||
|
||||
|
||||
#line 294 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
Write(assignment.Device.DeviceProfile.ToString());
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("</span>\r\n </td>\r\n " +
|
||||
" </tr>\r\n");
|
||||
|
||||
|
||||
#line 297 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 297 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
if (assignment.Device.DeviceBatchId.HasValue)
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(@" <tr>
|
||||
<td>Batch:
|
||||
</td>
|
||||
<td>
|
||||
<span");
|
||||
|
||||
WriteLiteral(" class=\"User_Show_AssignedDevices_CurrentAssignment_Batch\"");
|
||||
|
||||
WriteLiteral(">");
|
||||
|
||||
|
||||
#line 303 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
Write(assignment.Device.DeviceBatch.ToString());
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("</span>\r\n </td>\r\n " +
|
||||
" </tr>\r\n");
|
||||
|
||||
|
||||
#line 306 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <tr>\r\n " +
|
||||
" <td>Assigned:</td>\r\n " +
|
||||
" <td>\r\n <" +
|
||||
"span");
|
||||
|
||||
WriteLiteral(" class=\"User_Show_AssignedDevices_CurrentAssignment_Assigned\"");
|
||||
|
||||
WriteLiteral(">");
|
||||
|
||||
|
||||
#line 290 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 310 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
Write(CommonHelpers.FriendlyDate(assignment.AssignedDate));
|
||||
|
||||
|
||||
@@ -989,7 +1082,7 @@ WriteLiteral(@"</span>
|
||||
");
|
||||
|
||||
|
||||
#line 297 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 317 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -1005,7 +1098,7 @@ WriteLiteral(" class=\"smallMessage\"");
|
||||
WriteLiteral(">No Current Device Assignments</span>\r\n");
|
||||
|
||||
|
||||
#line 302 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 322 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -1015,7 +1108,7 @@ WriteLiteral(" </div>\r\n </div>\r\n
|
||||
"\r\n");
|
||||
|
||||
|
||||
#line 306 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 326 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user