feature: add clipboard link to various identifiers (resolves #148)

This commit is contained in:
Gary Sharp
2025-01-18 13:33:55 +11:00
parent 7a336e699a
commit b640e51874
17 changed files with 1156 additions and 877 deletions
+36
View File
@@ -58665,5 +58665,41 @@ jQuery.fn.DataTable.defaults.aLengthMenu = [[10, 20, 50, 100, 200, -1], [10, 20,
$(window).resize(function () { $(window).resize(function () {
$('.ui-dialog-content').filter(':visible').dialog('option', 'position', 'center'); $('.ui-dialog-content').filter(':visible').dialog('option', 'position', 'center');
}); });
if (navigator.clipboard) {
window.setTimeout(() => {
$('[data-clipboard]')
.on('mouseenter', e => {
const $this = $(e.currentTarget);
const previousPosition = $this.css('position');
$this.css('position', 'relative');
const link = $('<i class="clipboard-link fa fa-clipboard fa-fw">');
link.appendTo($this)
link.on('click', e => {
e.preventDefault();
let value = $this.attr('data-clipboard');
if (!value) {
value = $this.text().trim();
}
navigator.clipboard.writeText(value).then(() => {
link.removeClass('fa-clipboard').addClass('fa-check');
})
return false;
});
$this.data('clipboard', {
previousPosition: previousPosition,
link: link
})
}).on('mouseleave', e => {
const $this = $(e.currentTarget);
const data = $this.data('clipboard');
if (data) {
data.link.remove();
$this.css('position', data.previousPosition);
$this.removeData('clipboard');
}
});
}, 100);
}
}); });
})(jQuery, window, document, Modernizr); })(jQuery, window, document, Modernizr);
File diff suppressed because one or more lines are too long
@@ -195,5 +195,41 @@
$(window).resize(function () { $(window).resize(function () {
$('.ui-dialog-content').filter(':visible').dialog('option', 'position', 'center'); $('.ui-dialog-content').filter(':visible').dialog('option', 'position', 'center');
}); });
if (navigator.clipboard) {
window.setTimeout(() => {
$('[data-clipboard]')
.on('mouseenter', e => {
const $this = $(e.currentTarget);
const previousPosition = $this.css('position');
$this.css('position', 'relative');
const link = $('<i class="clipboard-link fa fa-clipboard fa-fw">');
link.appendTo($this)
link.on('click', e => {
e.preventDefault();
let value = $this.attr('data-clipboard');
if (!value) {
value = $this.text().trim();
}
navigator.clipboard.writeText(value).then(() => {
link.removeClass('fa-clipboard').addClass('fa-check');
})
return false;
});
$this.data('clipboard', {
previousPosition: previousPosition,
link: link
})
}).on('mouseleave', e => {
const $this = $(e.currentTarget);
const data = $this.data('clipboard');
if (data) {
data.link.remove();
$this.css('position', data.previousPosition);
$this.removeData('clipboard');
}
});
}, 100);
}
}); });
})(jQuery, window, document, Modernizr); })(jQuery, window, document, Modernizr);
@@ -6014,3 +6014,16 @@ ul.list-group li:not(:first-child) {
.whitespace-pre-wrap { .whitespace-pre-wrap {
white-space: pre-wrap; white-space: pre-wrap;
} }
i.clipboard-link {
cursor: pointer;
position: absolute;
padding-left: 4px;
right: calc(-1.28571429em - 4px);
top: calc(100% - 14px);
z-index: 100;
color: #D1D1D1;
background-color: #fff;
}
i.clipboard-link:hover {
color: #333;
}
File diff suppressed because one or more lines are too long
+25 -25
View File
@@ -983,9 +983,9 @@
border-bottom: 1px dashed #ccc; border-bottom: 1px dashed #ccc;
} }
.createJob_Component:last-child { .createJob_Component:last-child {
border-bottom: none; border-bottom: none;
} }
#createJob_Type { #createJob_Type {
@@ -1006,34 +1006,34 @@
} }
} }
#createJob_Type li, #createJob_SubTypes li { #createJob_Type li, #createJob_SubTypes li {
margin: 2px 0; margin: 2px 0;
padding: 0 0 0 4px; padding: 0 0 0 4px;
i {
display: none;
cursor: default;
font-weight: normal;
}
&:hover i {
display: inline-block;
}
&.highlight {
background-color: @HighlightColour;
font-weight: 600;
color: @black;
i { i {
display: none;
cursor: default;
font-weight: normal;
}
&:hover i {
display: inline-block; display: inline-block;
} }
&.highlight {
background-color: @HighlightColour;
font-weight: 600;
color: @black;
i {
display: inline-block;
}
}
} }
}
#createJob_SubTypes.isQuickLog li i { #createJob_SubTypes.isQuickLog li i {
display: none; display: none;
} }
#createJob_CommentsContainer { #createJob_CommentsContainer {
+13
View File
@@ -1582,3 +1582,16 @@ ul.list-group li:not(:first-child) {
.whitespace-pre-wrap { .whitespace-pre-wrap {
white-space: pre-wrap; white-space: pre-wrap;
} }
i.clipboard-link {
cursor: pointer;
position: absolute;
padding-left: 4px;
right: calc(-1.28571429em - 4px);
top: calc(100% - 14px);
z-index: 100;
color: #D1D1D1;
background-color: #fff;
}
i.clipboard-link:hover {
color: #333;
}
+15
View File
@@ -1681,3 +1681,18 @@ ul.list-group {
.whitespace-pre-wrap { .whitespace-pre-wrap {
white-space: pre-wrap; white-space: pre-wrap;
} }
i.clipboard-link {
cursor: pointer;
position: absolute;
padding-left: 4px;
right: calc(-1.28571429em - 4px);
top: calc(100% - 14px);
z-index: 100;
color: @BackgroundColour;
background-color: #fff;
&:hover {
color: @HeaderBackgroundColour;
}
}
File diff suppressed because one or more lines are too long
@@ -22,7 +22,7 @@
} }
else else
{ {
<h4 id="Device_Show_Details_Asset_Name" title="Computer Name">@Model.Device.ComputerName</h4> <h4 id="Device_Show_Details_Asset_Name" title="Computer Name"><span data-clipboard>@Model.Device.ComputerName</span></h4>
} }
</td> </td>
</tr> </tr>
@@ -37,7 +37,7 @@
} }
else else
{ {
<h4 id="Device_Show_Details_Asset_Domain" title="Computer Domain">@Model.Device.ComputerDomainName</h4> <h4 id="Device_Show_Details_Asset_Domain" title="Computer Domain"><span data-clipboard>@Model.Device.ComputerDomainName</span></h4>
} }
</td> </td>
</tr> </tr>
@@ -50,7 +50,7 @@
} }
else else
{ {
<span class="small discreet">@(Model.Device.AssetNumber ?? "Unknown")</span> <span class="small discreet" data-clipboard>@(Model.Device.AssetNumber ?? "Unknown")</span>
} }
</td> </td>
</tr> </tr>
@@ -63,7 +63,7 @@
} }
else else
{ {
<span class="small discreet">@(Model.Device.Location ?? "Unknown")</span> <span class="small discreet" data-clipboard>@(Model.Device.Location ?? "Unknown")</span>
} }
</td> </td>
</tr> </tr>
@@ -207,25 +207,27 @@
</div> </div>
} }
<div id="Device_Show_User_DisplayName" title="Display Name"> <div id="Device_Show_User_DisplayName" title="Display Name">
@if (Authorization.Has(Claims.User.Show)) <span data-clipboard>
{ @if (Authorization.Has(Claims.User.Show))
@Html.ActionLink(assignedUser.DisplayName, MVC.User.Show(assignedUser.UserId)) {
} @Html.ActionLink(assignedUser.DisplayName, MVC.User.Show(assignedUser.UserId))
else }
{ else
@assignedUser.DisplayName {
} @assignedUser.DisplayName
}
</span>
</div> </div>
<div id="Device_Show_User_Id" title="Id">@assignedUser.FriendlyId()</div> <div id="Device_Show_User_Id" title="Id"><span data-clipboard>@assignedUser.FriendlyId()</span></div>
@if (Authorization.Has(Claims.User.ShowDetails)) @if (Authorization.Has(Claims.User.ShowDetails))
{ {
if (!string.IsNullOrWhiteSpace(assignedUser.PhoneNumber)) if (!string.IsNullOrWhiteSpace(assignedUser.PhoneNumber))
{ {
<div id="Device_Show_User_PhoneNumber" title="Phone Number"><a href="tel:@assignedUser.PhoneNumber">@assignedUser.PhoneNumber</a></div> <div id="Device_Show_User_PhoneNumber" title="Phone Number"><a href="tel:@assignedUser.PhoneNumber" data-clipboard>@assignedUser.PhoneNumber</a></div>
} }
if (!string.IsNullOrWhiteSpace(assignedUser.EmailAddress)) if (!string.IsNullOrWhiteSpace(assignedUser.EmailAddress))
{ {
<div id="Device_Show_User_EmailAddress" title="Email Address"><a href="mailto:@(Model.Device.AssignedUser.EmailAddress)">@assignedUser.EmailAddress</a></div> <div id="Device_Show_User_EmailAddress" title="Email Address"><a href="mailto:@(Model.Device.AssignedUser.EmailAddress)" data-clipboard="@assignedUser.DisplayName &lt;@assignedUser.EmailAddress&gt;">@assignedUser.EmailAddress</a></div>
} }
} }
@if (Authorization.Has(Claims.User.ShowFlagAssignments)) @if (Authorization.Has(Claims.User.ShowFlagAssignments))
File diff suppressed because it is too large Load Diff
+16 -12
View File
@@ -177,15 +177,17 @@
<td id="Job_Show_Device"> <td id="Job_Show_Device">
<div> <div>
<h2 id="Job_Show_Device_SerialNumber" title="Serial Number"> <h2 id="Job_Show_Device_SerialNumber" title="Serial Number">
@if (Authorization.Has(Claims.Device.Show)) <span data-clipboard>
{@Html.ActionLink(Model.Job.DeviceSerialNumber, MVC.Device.Show(Model.Job.DeviceSerialNumber))} @if (Authorization.Has(Claims.Device.Show))
else {@Html.ActionLink(Model.Job.DeviceSerialNumber, MVC.Device.Show(Model.Job.DeviceSerialNumber))}
{@Model.Job.DeviceSerialNumber} else
{@Model.Job.DeviceSerialNumber}
</span>
</h2> </h2>
<div class="clearfix"> <div class="clearfix">
<div id="Job_Show_Device_Details"> <div id="Job_Show_Device_Details">
<img id="Job_Show_Device_Model_Image" alt="Model Image" src="@Url.Action(MVC.API.DeviceModel.Image(Model.Job.Device.DeviceModelId, Model.Job.Device.DeviceModel.ImageHash()))" /> <img id="Job_Show_Device_Model_Image" alt="Model Image" src="@Url.Action(MVC.API.DeviceModel.Image(Model.Job.Device.DeviceModelId, Model.Job.Device.DeviceModel.ImageHash()))" />
<div id="Job_Show_Device_ComputerName" title="Computer Name">@Model.Job.Device.ComputerName</div> <div id="Job_Show_Device_ComputerName" title="Computer Name"><span data-clipboard>@Model.Job.Device.ComputerName</span></div>
<div id="Job_Show_Device_Model" title="Model">@Html.ActionLink(Model.Job.Device.DeviceModel.ToString(), MVC.Config.DeviceModel.Index(Model.Job.Device.DeviceModelId))</div> <div id="Job_Show_Device_Model" title="Model">@Html.ActionLink(Model.Job.Device.DeviceModel.ToString(), MVC.Config.DeviceModel.Index(Model.Job.Device.DeviceModelId))</div>
@if (Model.Job.Device.DeviceBatch != null) @if (Model.Job.Device.DeviceBatch != null)
{ {
@@ -482,18 +484,20 @@
</div> </div>
} }
<h2 id="Job_Show_User_DisplayName" title="Display Name"> <h2 id="Job_Show_User_DisplayName" title="Display Name">
@if (Authorization.Has(Claims.User.Show)) <span data-clipboard>
{@Html.ActionLink(Model.Job.User.DisplayName, MVC.User.Show(Model.Job.UserId))} @if (Authorization.Has(Claims.User.Show))
else {@Html.ActionLink(Model.Job.User.DisplayName, MVC.User.Show(Model.Job.UserId))}
{@Model.Job.User.DisplayName} else
{@Model.Job.User.DisplayName}
</span>
</h2> </h2>
<div id="Job_Show_User_Id" title="Id">@Model.Job.User.FriendlyId()</div> <div id="Job_Show_User_Id" title="Id"><span data-clipboard>@Model.Job.User.FriendlyId()</span></div>
@if (Authorization.Has(Claims.User.ShowDetails)) @if (Authorization.Has(Claims.User.ShowDetails))
{ {
if (!string.IsNullOrWhiteSpace(Model.Job.User.PhoneNumber)) if (!string.IsNullOrWhiteSpace(Model.Job.User.PhoneNumber))
{<div id="Job_Show_User_PhoneNumber" title="Phone Number">Phone: <a href="tel:@Model.Job.User.PhoneNumber">@Model.Job.User.PhoneNumber</a></div>} {<div id="Job_Show_User_PhoneNumber" title="Phone Number">Phone: <a href="tel:@Model.Job.User.PhoneNumber" data-clipboard>@Model.Job.User.PhoneNumber</a></div>}
if (!string.IsNullOrWhiteSpace(Model.Job.User.EmailAddress)) if (!string.IsNullOrWhiteSpace(Model.Job.User.EmailAddress))
{<div id="Job_Show_User_EmailAddress" title="Email Address">Email: <a href="mailto:@(Model.Job.User.EmailAddress)">@Model.Job.User.EmailAddress</a></div>} {<div id="Job_Show_User_EmailAddress" title="Email Address">Email: <a href="mailto:@(Model.Job.User.EmailAddress)" data-clipboard="@Model.Job.User.DisplayName &lt;@Model.Job.User.EmailAddress&gt;">@Model.Job.User.EmailAddress</a></div>}
} }
@if (Authorization.Has(Claims.User.ShowFlagAssignments)) @if (Authorization.Has(Claims.User.ShowFlagAssignments))
{ {
File diff suppressed because it is too large Load Diff
@@ -1,23 +1,29 @@
@model System.Collections.Generic.KeyValuePair<string, string> @model System.Collections.Generic.KeyValuePair<string, string>
@using System.Text.RegularExpressions @using Disco.Models.Services.Users.Contact
@{ @{
var emailMatch = Regex.Match(Model.Value, @"^(?<name>.+)\s?<(?<address>.+@.+)>$"); UserContactEmail email;
if (!emailMatch.Success) if (UserContactEmail.TryParse(null, null, Model.Value, out email))
{ {
emailMatch = Regex.Match(Model.Value, @"^(?<address>.+@.+)$"); <a href="mailto:@email.EmailAddress" data-clipboard="@email.ToString()">@(string.IsNullOrWhiteSpace(email.Name) ? email.EmailAddress : email.Name)</a>
}
else
{
UserContactAustralianPhone phone;
if (UserContactAustralianPhone.TryParse(null, null, Model.Value, out phone))
{
<a href="tel:@phone.PhoneNumber" data-clipboard="@phone.ToString()">@(string.IsNullOrWhiteSpace(phone.Name) ? phone.PhoneNumber : phone.Name)</a>
}
else
{
UserContactAustralianPhone mobile;
if (UserContactAustralianPhone.TryParse(null, null, Model.Value, out mobile))
{
<a href="tel:@mobile.PhoneNumber" data-clipboard="@mobile.ToString()">@(string.IsNullOrWhiteSpace(mobile.Name) ? mobile.PhoneNumber : mobile.Name)</a>
}
else
{
<span data-clipboard>@Model.Value</span>
}
}
} }
} }
@if (emailMatch.Success)
{
var emailAddress = emailMatch.Groups["address"].Value;
var emailName = emailAddress;
if (emailMatch.Groups["name"].Success)
{
emailName = emailMatch.Groups["name"].Value;
}
<a href="mailto:@emailAddress">@emailName</a>
}
else
{
<span>@Model.Value</span>
}
@@ -17,12 +17,6 @@ namespace Disco.Web.Views.Shared
using System.Linq; using System.Linq;
using System.Net; using System.Net;
using System.Text; using System.Text;
#line 2 "..\..\Views\Shared\_CustomDetailValueRender.cshtml"
using System.Text.RegularExpressions;
#line default
#line hidden
using System.Web; using System.Web;
using System.Web.Helpers; using System.Web.Helpers;
using System.Web.Mvc; using System.Web.Mvc;
@@ -34,6 +28,12 @@ namespace Disco.Web.Views.Shared
using System.Web.WebPages; using System.Web.WebPages;
using Disco; using Disco;
using Disco.Models.Repository; using Disco.Models.Repository;
#line 2 "..\..\Views\Shared\_CustomDetailValueRender.cshtml"
using Disco.Models.Services.Users.Contact;
#line default
#line hidden
using Disco.Services; using Disco.Services;
using Disco.Services.Authorization; using Disco.Services.Authorization;
using Disco.Services.Web; using Disco.Services.Web;
@@ -52,49 +52,42 @@ namespace Disco.Web.Views.Shared
#line 3 "..\..\Views\Shared\_CustomDetailValueRender.cshtml" #line 3 "..\..\Views\Shared\_CustomDetailValueRender.cshtml"
var emailMatch = Regex.Match(Model.Value, @"^(?<name>.+)\s?<(?<address>.+@.+)>$"); UserContactEmail email;
if (!emailMatch.Success) if (UserContactEmail.TryParse(null, null, Model.Value, out email))
{ {
emailMatch = Regex.Match(Model.Value, @"^(?<address>.+@.+)$");
}
#line default #line default
#line hidden #line hidden
WriteLiteral("\r\n"); WriteLiteral(" <a");
WriteAttribute("href", Tuple.Create(" href=\"", 230), Tuple.Create("\"", 263)
, Tuple.Create(Tuple.Create("", 237), Tuple.Create("mailto:", 237), true)
#line 10 "..\..\Views\Shared\_CustomDetailValueRender.cshtml" #line 7 "..\..\Views\Shared\_CustomDetailValueRender.cshtml"
if (emailMatch.Success) , Tuple.Create(Tuple.Create("", 244), Tuple.Create<System.Object, System.Int32>(email.EmailAddress
{
var emailAddress = emailMatch.Groups["address"].Value;
var emailName = emailAddress;
if (emailMatch.Groups["name"].Success)
{
emailName = emailMatch.Groups["name"].Value;
}
#line default #line default
#line hidden #line hidden
WriteLiteral(" <a"); , 244), false)
WriteAttribute("href", Tuple.Create(" href=\"", 556), Tuple.Create("\"", 583)
, Tuple.Create(Tuple.Create("", 563), Tuple.Create("mailto:", 563), true)
#line 18 "..\..\Views\Shared\_CustomDetailValueRender.cshtml"
, Tuple.Create(Tuple.Create("", 570), Tuple.Create<System.Object, System.Int32>(emailAddress
#line default
#line hidden
, 570), false)
); );
WriteLiteral(" data-clipboard=\"");
#line 7 "..\..\Views\Shared\_CustomDetailValueRender.cshtml"
Write(email.ToString());
#line default
#line hidden
WriteLiteral("\"");
WriteLiteral(">"); WriteLiteral(">");
#line 18 "..\..\Views\Shared\_CustomDetailValueRender.cshtml" #line 7 "..\..\Views\Shared\_CustomDetailValueRender.cshtml"
Write(emailName); Write(string.IsNullOrWhiteSpace(email.Name) ? email.EmailAddress : email.Name);
#line default #line default
@@ -102,19 +95,113 @@ WriteLiteral(">");
WriteLiteral("</a>\r\n"); WriteLiteral("</a>\r\n");
#line 19 "..\..\Views\Shared\_CustomDetailValueRender.cshtml" #line 8 "..\..\Views\Shared\_CustomDetailValueRender.cshtml"
} }
else else
{ {
UserContactAustralianPhone phone;
if (UserContactAustralianPhone.TryParse(null, null, Model.Value, out phone))
{
#line default #line default
#line hidden #line hidden
WriteLiteral(" <span>"); WriteLiteral(" <a");
WriteAttribute("href", Tuple.Create(" href=\"", 558), Tuple.Create("\"", 587)
, Tuple.Create(Tuple.Create("", 565), Tuple.Create("tel:", 565), true)
#line 14 "..\..\Views\Shared\_CustomDetailValueRender.cshtml"
, Tuple.Create(Tuple.Create("", 569), Tuple.Create<System.Object, System.Int32>(phone.PhoneNumber
#line default
#line hidden
, 569), false)
);
WriteLiteral(" data-clipboard=\"");
#line 14 "..\..\Views\Shared\_CustomDetailValueRender.cshtml"
Write(phone.ToString());
#line default
#line hidden
WriteLiteral("\"");
WriteLiteral(">");
#line 14 "..\..\Views\Shared\_CustomDetailValueRender.cshtml"
Write(string.IsNullOrWhiteSpace(phone.Name) ? phone.PhoneNumber : phone.Name);
#line default
#line hidden
WriteLiteral("</a>\r\n");
#line 15 "..\..\Views\Shared\_CustomDetailValueRender.cshtml"
}
else
{
UserContactAustralianPhone mobile;
if (UserContactAustralianPhone.TryParse(null, null, Model.Value, out mobile))
{
#line default
#line hidden
WriteLiteral(" <a");
WriteAttribute("href", Tuple.Create(" href=\"", 911), Tuple.Create("\"", 941)
, Tuple.Create(Tuple.Create("", 918), Tuple.Create("tel:", 918), true)
#line 21 "..\..\Views\Shared\_CustomDetailValueRender.cshtml"
, Tuple.Create(Tuple.Create("", 922), Tuple.Create<System.Object, System.Int32>(mobile.PhoneNumber
#line default
#line hidden
, 922), false)
);
WriteLiteral(" data-clipboard=\"");
#line 21 "..\..\Views\Shared\_CustomDetailValueRender.cshtml"
Write(mobile.ToString());
#line default
#line hidden
WriteLiteral("\"");
WriteLiteral(">");
#line 21 "..\..\Views\Shared\_CustomDetailValueRender.cshtml"
Write(string.IsNullOrWhiteSpace(mobile.Name) ? mobile.PhoneNumber : mobile.Name);
#line default
#line hidden
WriteLiteral("</a>\r\n");
#line 22 "..\..\Views\Shared\_CustomDetailValueRender.cshtml" #line 22 "..\..\Views\Shared\_CustomDetailValueRender.cshtml"
Write(Model.Value); }
else
{
#line default
#line hidden
WriteLiteral(" <span data-clipboard>");
#line 25 "..\..\Views\Shared\_CustomDetailValueRender.cshtml"
Write(Model.Value);
#line default #line default
@@ -122,11 +209,16 @@ WriteLiteral(" <span>");
WriteLiteral("</span>\r\n"); WriteLiteral("</span>\r\n");
#line 23 "..\..\Views\Shared\_CustomDetailValueRender.cshtml" #line 26 "..\..\Views\Shared\_CustomDetailValueRender.cshtml"
} }
}
}
#line default #line default
#line hidden #line hidden
WriteLiteral("\r\n");
} }
} }
} }
@@ -23,20 +23,20 @@
<span>Username (Id):</span> <span>Username (Id):</span>
</td> </td>
<td> <td>
<h4 id="User_Show_Details_Identity_Id" title="Username">@Model.User.UserId</h4> <h4 id="User_Show_Details_Identity_Id" title="Username" data-clipboard>@Model.User.UserId</h4>
</td> </td>
</tr> </tr>
<tr> <tr>
<td>Display Name:</td> <td>Display Name:</td>
<td><span id="User_Show_Details_Identity_DisplayName" title="Display Name">@Model.User.DisplayName</span></td> <td><span id="User_Show_Details_Identity_DisplayName" title="Display Name" data-clipboard>@Model.User.DisplayName</span></td>
</tr> </tr>
<tr> <tr>
<td>Given Name:</td> <td>Given Name:</td>
<td><span id="User_Show_Details_Identity_GivenName" title="Given Name">@Model.User.GivenName</span></td> <td><span id="User_Show_Details_Identity_GivenName" title="Given Name" data-clipboard>@Model.User.GivenName</span></td>
</tr> </tr>
<tr> <tr>
<td>Surname:</td> <td>Surname:</td>
<td><span id="User_Show_Details_Identity_Surname" title="Surname">@Model.User.Surname</span></td> <td><span id="User_Show_Details_Identity_Surname" title="Surname" data-clipboard>@Model.User.Surname</span></td>
</tr> </tr>
</table> </table>
</div> </div>
@@ -49,7 +49,7 @@
<td> <td>
@if (!string.IsNullOrEmpty(Model.User.EmailAddress)) @if (!string.IsNullOrEmpty(Model.User.EmailAddress))
{ {
<span id="User_Show_Details_Attributes_Email" title="Email Address [Update in Active Directory]"><a href="mailto:@Model.User.EmailAddress">@Model.User.EmailAddress</a></span> <span id="User_Show_Details_Attributes_Email" title="Email Address [Update in Active Directory]"><a href="mailto:@Model.User.EmailAddress" data-clipboard="@Model.User.DisplayName &lt;@Model.User.EmailAddress&gt;">@Model.User.EmailAddress</a></span>
} }
else else
{ {
@@ -62,7 +62,7 @@
<td> <td>
@if (!string.IsNullOrEmpty(Model.User.PhoneNumber)) @if (!string.IsNullOrEmpty(Model.User.PhoneNumber))
{ {
<span id="User_Show_Details_Attributes_Phone" title="Phone Number [Update in Active Directory]"><a href="tel:@Model.User.PhoneNumber">@Model.User.PhoneNumber</a></span> <span id="User_Show_Details_Attributes_Phone" title="Phone Number [Update in Active Directory]"><a href="tel:@Model.User.PhoneNumber" data-clipboard>@Model.User.PhoneNumber</a></span>
} }
else else
{ {
@@ -358,7 +358,7 @@
Serial Number: Serial Number:
</td> </td>
<td> <td>
<span class="User_Show_AssignedDevices_CurrentAssignment_SerialNumber"> <span class="User_Show_AssignedDevices_CurrentAssignment_SerialNumber" data-clipboard>
@if (Authorization.Has(Claims.Device.Show)) @if (Authorization.Has(Claims.Device.Show))
{ {
@Html.ActionLink(assignment.Device.SerialNumber, MVC.Device.Show(assignment.Device.SerialNumber)) @Html.ActionLink(assignment.Device.SerialNumber, MVC.Device.Show(assignment.Device.SerialNumber))
@@ -370,7 +370,7 @@
</span> </span>
@if (!string.IsNullOrWhiteSpace(assignment.Device.ComputerName)) @if (!string.IsNullOrWhiteSpace(assignment.Device.ComputerName))
{ {
<text>(<span class="User_Show_AssignedDevices_CurrentAssignment_ComputerName">@assignment.Device.ComputerName</span>)</text> <text>(<span class="User_Show_AssignedDevices_CurrentAssignment_ComputerName" data-clipboard>@assignment.Device.ComputerName</span>)</text>
} }
</td> </td>
</tr> </tr>
@@ -379,7 +379,7 @@
<tr> <tr>
<td>Asset:</td> <td>Asset:</td>
<td> <td>
<span class="User_Show_AssignedDevices_CurrentAssignment_Asset">@assignment.Device.AssetNumber</span> <span class="User_Show_AssignedDevices_CurrentAssignment_Asset" data-clipboard>@assignment.Device.AssetNumber</span>
</td> </td>
</tr> </tr>
} }
@@ -141,11 +141,11 @@ WriteLiteral(" id=\"User_Show_Details_Identity_Id\"");
WriteLiteral(" title=\"Username\""); WriteLiteral(" title=\"Username\"");
WriteLiteral(">"); WriteLiteral(" data-clipboard>");
#line 26 "..\..\Views\User\UserParts\_Subject.cshtml" #line 26 "..\..\Views\User\UserParts\_Subject.cshtml"
Write(Model.User.UserId); Write(Model.User.UserId);
#line default #line default
@@ -158,11 +158,11 @@ WriteLiteral(" id=\"User_Show_Details_Identity_DisplayName\"");
WriteLiteral(" title=\"Display Name\""); WriteLiteral(" title=\"Display Name\"");
WriteLiteral(">"); WriteLiteral(" data-clipboard>");
#line 31 "..\..\Views\User\UserParts\_Subject.cshtml" #line 31 "..\..\Views\User\UserParts\_Subject.cshtml"
Write(Model.User.DisplayName); Write(Model.User.DisplayName);
#line default #line default
@@ -175,11 +175,11 @@ WriteLiteral(" id=\"User_Show_Details_Identity_GivenName\"");
WriteLiteral(" title=\"Given Name\""); WriteLiteral(" title=\"Given Name\"");
WriteLiteral(">"); WriteLiteral(" data-clipboard>");
#line 35 "..\..\Views\User\UserParts\_Subject.cshtml" #line 35 "..\..\Views\User\UserParts\_Subject.cshtml"
Write(Model.User.GivenName); Write(Model.User.GivenName);
#line default #line default
@@ -192,11 +192,11 @@ WriteLiteral(" id=\"User_Show_Details_Identity_Surname\"");
WriteLiteral(" title=\"Surname\""); WriteLiteral(" title=\"Surname\"");
WriteLiteral(">"); WriteLiteral(" data-clipboard>");
#line 39 "..\..\Views\User\UserParts\_Subject.cshtml" #line 39 "..\..\Views\User\UserParts\_Subject.cshtml"
Write(Model.User.Surname); Write(Model.User.Surname);
#line default #line default
@@ -253,22 +253,42 @@ WriteLiteral(" title=\"Email Address [Update in Active Directory]\"");
WriteLiteral("><a"); WriteLiteral("><a");
WriteAttribute("href", Tuple.Create(" href=\"", 2808), Tuple.Create("\"", 2846) WriteAttribute("href", Tuple.Create(" href=\"", 2868), Tuple.Create("\"", 2906)
, Tuple.Create(Tuple.Create("", 2815), Tuple.Create("mailto:", 2815), true) , Tuple.Create(Tuple.Create("", 2875), Tuple.Create("mailto:", 2875), true)
#line 52 "..\..\Views\User\UserParts\_Subject.cshtml" #line 52 "..\..\Views\User\UserParts\_Subject.cshtml"
, Tuple.Create(Tuple.Create("", 2822), Tuple.Create<System.Object, System.Int32>(Model.User.EmailAddress , Tuple.Create(Tuple.Create("", 2882), Tuple.Create<System.Object, System.Int32>(Model.User.EmailAddress
#line default #line default
#line hidden #line hidden
, 2822), false) , 2882), false)
); );
WriteLiteral(" data-clipboard=\"");
#line 52 "..\..\Views\User\UserParts\_Subject.cshtml"
Write(Model.User.DisplayName);
#line default
#line hidden
WriteLiteral(" &lt;");
#line 52 "..\..\Views\User\UserParts\_Subject.cshtml"
Write(Model.User.EmailAddress);
#line default
#line hidden
WriteLiteral("&gt;\"");
WriteLiteral(">"); WriteLiteral(">");
#line 52 "..\..\Views\User\UserParts\_Subject.cshtml" #line 52 "..\..\Views\User\UserParts\_Subject.cshtml"
Write(Model.User.EmailAddress); Write(Model.User.EmailAddress);
#line default #line default
@@ -323,22 +343,22 @@ WriteLiteral(" title=\"Phone Number [Update in Active Directory]\"");
WriteLiteral("><a"); WriteLiteral("><a");
WriteAttribute("href", Tuple.Create(" href=\"", 3640), Tuple.Create("\"", 3674) WriteAttribute("href", Tuple.Create(" href=\"", 3774), Tuple.Create("\"", 3808)
, Tuple.Create(Tuple.Create("", 3647), Tuple.Create("tel:", 3647), true) , Tuple.Create(Tuple.Create("", 3781), Tuple.Create("tel:", 3781), true)
#line 65 "..\..\Views\User\UserParts\_Subject.cshtml" #line 65 "..\..\Views\User\UserParts\_Subject.cshtml"
, Tuple.Create(Tuple.Create("", 3651), Tuple.Create<System.Object, System.Int32>(Model.User.PhoneNumber , Tuple.Create(Tuple.Create("", 3785), Tuple.Create<System.Object, System.Int32>(Model.User.PhoneNumber
#line default #line default
#line hidden #line hidden
, 3651), false) , 3785), false)
); );
WriteLiteral(">"); WriteLiteral(" data-clipboard>");
#line 65 "..\..\Views\User\UserParts\_Subject.cshtml" #line 65 "..\..\Views\User\UserParts\_Subject.cshtml"
Write(Model.User.PhoneNumber); Write(Model.User.PhoneNumber);
#line default #line default
@@ -670,14 +690,14 @@ WriteLiteral(" class=\"CreateJob_Assignment_Image\"");
WriteLiteral(" alt=\"Model Image\""); WriteLiteral(" alt=\"Model Image\"");
WriteAttribute("src", Tuple.Create(" src=\"", 8673), Tuple.Create("\"", 8794) WriteAttribute("src", Tuple.Create(" src=\"", 8822), Tuple.Create("\"", 8943)
#line 141 "..\..\Views\User\UserParts\_Subject.cshtml" #line 141 "..\..\Views\User\UserParts\_Subject.cshtml"
, Tuple.Create(Tuple.Create("", 8679), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.API.DeviceModel.Image(assignment.Device.DeviceModel.Id, assignment.Device.DeviceModel.ImageHash())) , Tuple.Create(Tuple.Create("", 8828), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.API.DeviceModel.Image(assignment.Device.DeviceModel.Id, assignment.Device.DeviceModel.ImageHash()))
#line default #line default
#line hidden #line hidden
, 8679), false) , 8828), false)
); );
WriteLiteral(@" /> WriteLiteral(@" />
@@ -935,14 +955,14 @@ WriteLiteral(" type=\"hidden\"");
WriteLiteral(" name=\"UserId\""); WriteLiteral(" name=\"UserId\"");
WriteAttribute("value", Tuple.Create(" value=\"", 15859), Tuple.Create("\"", 15885) WriteAttribute("value", Tuple.Create(" value=\"", 16008), Tuple.Create("\"", 16034)
#line 246 "..\..\Views\User\UserParts\_Subject.cshtml" #line 246 "..\..\Views\User\UserParts\_Subject.cshtml"
, Tuple.Create(Tuple.Create("", 15867), Tuple.Create<System.Object, System.Int32>(Model.User.UserId , Tuple.Create(Tuple.Create("", 16016), Tuple.Create<System.Object, System.Int32>(Model.User.UserId
#line default #line default
#line hidden #line hidden
, 15867), false) , 16016), false)
); );
WriteLiteral(" />\r\n"); WriteLiteral(" />\r\n");
@@ -984,26 +1004,26 @@ WriteLiteral("\"");
WriteLiteral(">\r\n <i"); WriteLiteral(">\r\n <i");
WriteAttribute("class", Tuple.Create(" class=\"", 16259), Tuple.Create("\"", 16326) WriteAttribute("class", Tuple.Create(" class=\"", 16408), Tuple.Create("\"", 16475)
, Tuple.Create(Tuple.Create("", 16267), Tuple.Create("fa", 16267), true) , Tuple.Create(Tuple.Create("", 16416), Tuple.Create("fa", 16416), true)
, Tuple.Create(Tuple.Create(" ", 16269), Tuple.Create("fa-", 16270), true) , Tuple.Create(Tuple.Create(" ", 16418), Tuple.Create("fa-", 16419), true)
#line 251 "..\..\Views\User\UserParts\_Subject.cshtml" #line 251 "..\..\Views\User\UserParts\_Subject.cshtml"
, Tuple.Create(Tuple.Create("", 16273), Tuple.Create<System.Object, System.Int32>(userFlag.Icon , Tuple.Create(Tuple.Create("", 16422), Tuple.Create<System.Object, System.Int32>(userFlag.Icon
#line default #line default
#line hidden #line hidden
, 16273), false) , 16422), false)
, Tuple.Create(Tuple.Create(" ", 16289), Tuple.Create("fa-fw", 16290), true) , Tuple.Create(Tuple.Create(" ", 16438), Tuple.Create("fa-fw", 16439), true)
, Tuple.Create(Tuple.Create(" ", 16295), Tuple.Create("fa-lg", 16296), true) , Tuple.Create(Tuple.Create(" ", 16444), Tuple.Create("fa-lg", 16445), true)
, Tuple.Create(Tuple.Create(" ", 16301), Tuple.Create("d-", 16302), true) , Tuple.Create(Tuple.Create(" ", 16450), Tuple.Create("d-", 16451), true)
#line 251 "..\..\Views\User\UserParts\_Subject.cshtml" #line 251 "..\..\Views\User\UserParts\_Subject.cshtml"
, Tuple.Create(Tuple.Create("", 16304), Tuple.Create<System.Object, System.Int32>(userFlag.IconColour , Tuple.Create(Tuple.Create("", 16453), Tuple.Create<System.Object, System.Int32>(userFlag.IconColour
#line default #line default
#line hidden #line hidden
, 16304), false) , 16453), false)
); );
WriteLiteral("></i>"); WriteLiteral("></i>");
@@ -1184,14 +1204,14 @@ WriteLiteral(">\r\n");
#line hidden #line hidden
WriteLiteral(" <a"); WriteLiteral(" <a");
WriteAttribute("href", Tuple.Create(" href=\"", 21724), Tuple.Create("\"", 21791) WriteAttribute("href", Tuple.Create(" href=\"", 21873), Tuple.Create("\"", 21940)
#line 345 "..\..\Views\User\UserParts\_Subject.cshtml" #line 345 "..\..\Views\User\UserParts\_Subject.cshtml"
, Tuple.Create(Tuple.Create("", 21731), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.Device.Show(assignment.Device.SerialNumber)) , Tuple.Create(Tuple.Create("", 21880), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.Device.Show(assignment.Device.SerialNumber))
#line default #line default
#line hidden #line hidden
, 21731), false) , 21880), false)
); );
WriteLiteral(">\r\n <img"); WriteLiteral(">\r\n <img");
@@ -1200,14 +1220,14 @@ WriteLiteral(" class=\"User_Show_AssignedDevices_CurrentAssignment_Image\"");
WriteLiteral(" alt=\"Model Image\""); WriteLiteral(" alt=\"Model Image\"");
WriteAttribute("src", Tuple.Create(" src=\"", 21923), Tuple.Create("\"", 22044) WriteAttribute("src", Tuple.Create(" src=\"", 22072), Tuple.Create("\"", 22193)
#line 346 "..\..\Views\User\UserParts\_Subject.cshtml" #line 346 "..\..\Views\User\UserParts\_Subject.cshtml"
, Tuple.Create(Tuple.Create("", 21929), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.API.DeviceModel.Image(assignment.Device.DeviceModel.Id, assignment.Device.DeviceModel.ImageHash())) , Tuple.Create(Tuple.Create("", 22078), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.API.DeviceModel.Image(assignment.Device.DeviceModel.Id, assignment.Device.DeviceModel.ImageHash()))
#line default #line default
#line hidden #line hidden
, 21929), false) , 22078), false)
); );
WriteLiteral(" />\r\n </a>\r\n"); WriteLiteral(" />\r\n </a>\r\n");
@@ -1227,14 +1247,14 @@ WriteLiteral(" class=\"User_Show_AssignedDevices_CurrentAssignment_Image\"");
WriteLiteral(" alt=\"Model Image\""); WriteLiteral(" alt=\"Model Image\"");
WriteAttribute("src", Tuple.Create(" src=\"", 22356), Tuple.Create("\"", 22477) WriteAttribute("src", Tuple.Create(" src=\"", 22505), Tuple.Create("\"", 22626)
#line 351 "..\..\Views\User\UserParts\_Subject.cshtml" #line 351 "..\..\Views\User\UserParts\_Subject.cshtml"
, Tuple.Create(Tuple.Create("", 22362), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.API.DeviceModel.Image(assignment.Device.DeviceModel.Id, assignment.Device.DeviceModel.ImageHash())) , Tuple.Create(Tuple.Create("", 22511), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.API.DeviceModel.Image(assignment.Device.DeviceModel.Id, assignment.Device.DeviceModel.ImageHash()))
#line default #line default
#line hidden #line hidden
, 22362), false) , 22511), false)
); );
WriteLiteral(" />\r\n"); WriteLiteral(" />\r\n");
@@ -1265,7 +1285,7 @@ WriteLiteral(@">
WriteLiteral(" class=\"User_Show_AssignedDevices_CurrentAssignment_SerialNumber\""); WriteLiteral(" class=\"User_Show_AssignedDevices_CurrentAssignment_SerialNumber\"");
WriteLiteral(">\r\n"); WriteLiteral(" data-clipboard>\r\n");
#line 362 "..\..\Views\User\UserParts\_Subject.cshtml" #line 362 "..\..\Views\User\UserParts\_Subject.cshtml"
@@ -1335,11 +1355,11 @@ WriteLiteral("(<span");
WriteLiteral(" class=\"User_Show_AssignedDevices_CurrentAssignment_ComputerName\""); WriteLiteral(" class=\"User_Show_AssignedDevices_CurrentAssignment_ComputerName\"");
WriteLiteral(">"); WriteLiteral(" data-clipboard>");
#line 373 "..\..\Views\User\UserParts\_Subject.cshtml" #line 373 "..\..\Views\User\UserParts\_Subject.cshtml"
Write(assignment.Device.ComputerName); Write(assignment.Device.ComputerName);
#line default #line default
@@ -1379,11 +1399,11 @@ WriteLiteral(@" <tr>
WriteLiteral(" class=\"User_Show_AssignedDevices_CurrentAssignment_Asset\""); WriteLiteral(" class=\"User_Show_AssignedDevices_CurrentAssignment_Asset\"");
WriteLiteral(">"); WriteLiteral(" data-clipboard>");
#line 382 "..\..\Views\User\UserParts\_Subject.cshtml" #line 382 "..\..\Views\User\UserParts\_Subject.cshtml"
Write(assignment.Device.AssetNumber); Write(assignment.Device.AssetNumber);
#line default #line default
@@ -1560,26 +1580,26 @@ WriteLiteral(">\r\n");
#line hidden #line hidden
WriteLiteral(" <i"); WriteLiteral(" <i");
WriteAttribute("class", Tuple.Create(" class=\"", 29066), Tuple.Create("\"", 29136) WriteAttribute("class", Tuple.Create(" class=\"", 29260), Tuple.Create("\"", 29330)
, Tuple.Create(Tuple.Create("", 29074), Tuple.Create("flag", 29074), true) , Tuple.Create(Tuple.Create("", 29268), Tuple.Create("flag", 29268), true)
, Tuple.Create(Tuple.Create(" ", 29078), Tuple.Create("fa", 29079), true) , Tuple.Create(Tuple.Create(" ", 29272), Tuple.Create("fa", 29273), true)
, Tuple.Create(Tuple.Create(" ", 29081), Tuple.Create("fa-", 29082), true) , Tuple.Create(Tuple.Create(" ", 29275), Tuple.Create("fa-", 29276), true)
#line 430 "..\..\Views\User\UserParts\_Subject.cshtml" #line 430 "..\..\Views\User\UserParts\_Subject.cshtml"
, Tuple.Create(Tuple.Create("", 29085), Tuple.Create<System.Object, System.Int32>(flag.Item2.Icon , Tuple.Create(Tuple.Create("", 29279), Tuple.Create<System.Object, System.Int32>(flag.Item2.Icon
#line default #line default
#line hidden #line hidden
, 29085), false) , 29279), false)
, Tuple.Create(Tuple.Create(" ", 29103), Tuple.Create("fa-fw", 29104), true) , Tuple.Create(Tuple.Create(" ", 29297), Tuple.Create("fa-fw", 29298), true)
, Tuple.Create(Tuple.Create(" ", 29109), Tuple.Create("d-", 29110), true) , Tuple.Create(Tuple.Create(" ", 29303), Tuple.Create("d-", 29304), true)
#line 430 "..\..\Views\User\UserParts\_Subject.cshtml" #line 430 "..\..\Views\User\UserParts\_Subject.cshtml"
, Tuple.Create(Tuple.Create("", 29112), Tuple.Create<System.Object, System.Int32>(flag.Item2.IconColour , Tuple.Create(Tuple.Create("", 29306), Tuple.Create<System.Object, System.Int32>(flag.Item2.IconColour
#line default #line default
#line hidden #line hidden
, 29112), false) , 29306), false)
); );
WriteLiteral(">\r\n <s" + WriteLiteral(">\r\n <s" +