Feature: Held Devices Noticeboard
Provides a noticeboard for all devices, not just those assigned to users.
This commit is contained in:
@@ -0,0 +1,72 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using Microsoft.AspNet.SignalR;
|
||||||
|
using System.Reactive.Linq;
|
||||||
|
using Disco.Data.Repository.Monitor;
|
||||||
|
using Disco.Models.Repository;
|
||||||
|
|
||||||
|
namespace Disco.BI.Interop.SignalRHandlers
|
||||||
|
{
|
||||||
|
public class HeldDeviceNotifications : PersistentConnection
|
||||||
|
{
|
||||||
|
private static bool subscribed = false;
|
||||||
|
private static object subscribeLock = new object();
|
||||||
|
private static IPersistentConnectionContext notificationContext;
|
||||||
|
|
||||||
|
static HeldDeviceNotifications()
|
||||||
|
{
|
||||||
|
if (!subscribed)
|
||||||
|
lock (subscribeLock)
|
||||||
|
if (!subscribed)
|
||||||
|
{
|
||||||
|
notificationContext = GlobalHost.ConnectionManager.GetConnectionContext<HeldDeviceNotifications>();
|
||||||
|
|
||||||
|
Disco.Data.Repository.Monitor.RepositoryMonitor.StreamAfterCommit.Where(e => e.EntityType == typeof(Job)).Subscribe(JobUpdated);
|
||||||
|
|
||||||
|
Disco.Data.Repository.Monitor.RepositoryMonitor.StreamAfterCommit.Where(e =>
|
||||||
|
e.EntityType == typeof(Device) &&
|
||||||
|
(e.ModifiedProperties.Contains("Location") ||
|
||||||
|
e.ModifiedProperties.Contains("DeviceModelId") ||
|
||||||
|
e.ModifiedProperties.Contains("DeviceProfileId") ||
|
||||||
|
e.ModifiedProperties.Contains("DeviceBatchId") ||
|
||||||
|
e.ModifiedProperties.Contains("ComputerName") ||
|
||||||
|
e.ModifiedProperties.Contains("AssignedUserId"))
|
||||||
|
).Subscribe(DeviceUpdated);
|
||||||
|
|
||||||
|
Disco.Data.Repository.Monitor.RepositoryMonitor.StreamAfterCommit.Where(e =>
|
||||||
|
e.EntityType == typeof(User) &&
|
||||||
|
e.ModifiedProperties.Contains("DisplayName")
|
||||||
|
).Subscribe(UserUpdated);
|
||||||
|
|
||||||
|
subscribed = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private static void JobUpdated(RepositoryMonitorEvent e)
|
||||||
|
{
|
||||||
|
Job j = (Job)e.Entity;
|
||||||
|
|
||||||
|
if (j.DeviceSerialNumber != null)
|
||||||
|
notificationContext.Connection.Broadcast(j.DeviceSerialNumber);
|
||||||
|
}
|
||||||
|
private static void DeviceUpdated(RepositoryMonitorEvent e)
|
||||||
|
{
|
||||||
|
Device d = (Device)e.Entity;
|
||||||
|
|
||||||
|
notificationContext.Connection.Broadcast(d.SerialNumber);
|
||||||
|
}
|
||||||
|
private static void UserUpdated(RepositoryMonitorEvent e)
|
||||||
|
{
|
||||||
|
User u = (User)e.Entity;
|
||||||
|
|
||||||
|
var userDevices = e.dbContext.Devices.Where(d => d.AssignedUserId == u.Id);
|
||||||
|
|
||||||
|
foreach (var userDevice in userDevices)
|
||||||
|
{
|
||||||
|
notificationContext.Connection.Broadcast(userDevice.SerialNumber);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -13,6 +13,7 @@ namespace Disco.BI.Interop.SignalRHandlers
|
|||||||
{
|
{
|
||||||
private static bool subscribed = false;
|
private static bool subscribed = false;
|
||||||
private static object subscribeLock = new object();
|
private static object subscribeLock = new object();
|
||||||
|
private static IPersistentConnectionContext notificationContext;
|
||||||
|
|
||||||
static UserHeldDeviceNotifications()
|
static UserHeldDeviceNotifications()
|
||||||
{
|
{
|
||||||
@@ -20,22 +21,62 @@ namespace Disco.BI.Interop.SignalRHandlers
|
|||||||
lock (subscribeLock)
|
lock (subscribeLock)
|
||||||
if (!subscribed)
|
if (!subscribed)
|
||||||
{
|
{
|
||||||
Disco.Data.Repository.Monitor.RepositoryMonitor.StreamAfterCommit.Where(e => e.EntityType == typeof(Job)).Subscribe(UserJobUpdated);
|
notificationContext = GlobalHost.ConnectionManager.GetConnectionContext<UserHeldDeviceNotifications>();
|
||||||
|
|
||||||
|
Disco.Data.Repository.Monitor.RepositoryMonitor.StreamAfterCommit.Where(e => e.EntityType == typeof(Job)).Subscribe(JobUpdated);
|
||||||
|
|
||||||
|
Disco.Data.Repository.Monitor.RepositoryMonitor.StreamBeforeCommit.Where(e =>
|
||||||
|
e.EntityType == typeof(Device) &&
|
||||||
|
(e.ModifiedProperties.Contains("DeviceModelId") ||
|
||||||
|
e.ModifiedProperties.Contains("DeviceProfileId") ||
|
||||||
|
e.ModifiedProperties.Contains("DeviceBatchId") ||
|
||||||
|
e.ModifiedProperties.Contains("AssignedUserId"))
|
||||||
|
).Subscribe(DeviceUpdated);
|
||||||
|
|
||||||
|
Disco.Data.Repository.Monitor.RepositoryMonitor.StreamAfterCommit.Where(e =>
|
||||||
|
e.EntityType == typeof(User) &&
|
||||||
|
e.ModifiedProperties.Contains("DisplayName")
|
||||||
|
).Subscribe(UserUpdated);
|
||||||
|
|
||||||
subscribed = true;
|
subscribed = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void UserJobUpdated(RepositoryMonitorEvent e)
|
private static void JobUpdated(RepositoryMonitorEvent e)
|
||||||
{
|
{
|
||||||
Job j = (Job)e.Entity;
|
Job j = (Job)e.Entity;
|
||||||
|
|
||||||
if (j.UserId != null)
|
if (j.DeviceSerialNumber != null)
|
||||||
{
|
{
|
||||||
var connectionManager = GlobalHost.ConnectionManager;
|
var jobDevice = e.dbContext.Devices.Where(d => d.SerialNumber == j.DeviceSerialNumber).FirstOrDefault();
|
||||||
var connectionContext = connectionManager.GetConnectionContext<UserHeldDeviceNotifications>();
|
|
||||||
if (connectionContext != null)
|
if (jobDevice.AssignedUserId != null)
|
||||||
connectionContext.Connection.Broadcast(j.UserId);
|
notificationContext.Connection.Broadcast(jobDevice.AssignedUserId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
private static void DeviceUpdated(RepositoryMonitorEvent e)
|
||||||
|
{
|
||||||
|
Device d = (Device)e.Entity;
|
||||||
|
|
||||||
|
string previouslyAssignedUserId = null;
|
||||||
|
|
||||||
|
if (e.ModifiedProperties.Contains("AssignedUserId"))
|
||||||
|
previouslyAssignedUserId = e.GetPreviousPropertyValue<string>("AssignedUserId");
|
||||||
|
|
||||||
|
e.ExecuteAfterCommit(me =>
|
||||||
|
{
|
||||||
|
if (previouslyAssignedUserId != null)
|
||||||
|
notificationContext.Connection.Broadcast(previouslyAssignedUserId);
|
||||||
|
|
||||||
|
if (d.AssignedUserId != null)
|
||||||
|
notificationContext.Connection.Broadcast(d.AssignedUserId);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
private static void UserUpdated(RepositoryMonitorEvent e)
|
||||||
|
{
|
||||||
|
User u = (User)e.Entity;
|
||||||
|
|
||||||
|
notificationContext.Connection.Broadcast(u.Id);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -181,6 +181,7 @@
|
|||||||
<Compile Include="BI\Interop\PluginServices\Utilities.cs" />
|
<Compile Include="BI\Interop\PluginServices\Utilities.cs" />
|
||||||
<Compile Include="BI\Interop\SignalRHandlers\AdminAuthorizedPersistentConnection.cs" />
|
<Compile Include="BI\Interop\SignalRHandlers\AdminAuthorizedPersistentConnection.cs" />
|
||||||
<Compile Include="BI\Interop\SignalRHandlers\AuthorizedPersistentConnection.cs" />
|
<Compile Include="BI\Interop\SignalRHandlers\AuthorizedPersistentConnection.cs" />
|
||||||
|
<Compile Include="BI\Interop\SignalRHandlers\HeldDeviceNotifications.cs" />
|
||||||
<Compile Include="BI\Interop\SignalRHandlers\LogNotifications.cs" />
|
<Compile Include="BI\Interop\SignalRHandlers\LogNotifications.cs" />
|
||||||
<Compile Include="BI\Interop\SignalRHandlers\RepositoryMonitorNotifications.cs" />
|
<Compile Include="BI\Interop\SignalRHandlers\RepositoryMonitorNotifications.cs" />
|
||||||
<Compile Include="BI\Interop\SignalRHandlers\ScheduledTasksStatusNotifications.cs" />
|
<Compile Include="BI\Interop\SignalRHandlers\ScheduledTasksStatusNotifications.cs" />
|
||||||
@@ -250,7 +251,7 @@
|
|||||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||||
<ProjectExtensions>
|
<ProjectExtensions>
|
||||||
<VisualStudio>
|
<VisualStudio>
|
||||||
<UserProperties BuildVersion_UpdateFileVersion="True" BuildVersion_UpdateAssemblyVersion="True" BuildVersion_BuildVersioningStyle="None.DeltaBaseYear.MonthAndDayStamp.TimeStamp" BuildVersion_UseGlobalSettings="False" BuildVersion_DetectChanges="False" BuildVersion_BuildAction="Both" BuildVersion_StartDate="2011/7/1" />
|
<UserProperties BuildVersion_StartDate="2011/7/1" BuildVersion_BuildAction="Both" BuildVersion_DetectChanges="False" BuildVersion_UseGlobalSettings="False" BuildVersion_BuildVersioningStyle="None.DeltaBaseYear.MonthAndDayStamp.TimeStamp" BuildVersion_UpdateAssemblyVersion="True" BuildVersion_UpdateFileVersion="True" />
|
||||||
</VisualStudio>
|
</VisualStudio>
|
||||||
</ProjectExtensions>
|
</ProjectExtensions>
|
||||||
<Import Project="$(SolutionDir)\.nuget\nuget.targets" />
|
<Import Project="$(SolutionDir)\.nuget\nuget.targets" />
|
||||||
|
|||||||
@@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
|
|||||||
// You can specify all the values or you can default the Build and Revision Numbers
|
// You can specify all the values or you can default the Build and Revision Numbers
|
||||||
// by using the '*' as shown below:
|
// by using the '*' as shown below:
|
||||||
// [assembly: AssemblyVersion("1.0.*")]
|
// [assembly: AssemblyVersion("1.0.*")]
|
||||||
[assembly: AssemblyVersion("1.2.0625.1305")]
|
[assembly: AssemblyVersion("1.2.0704.1521")]
|
||||||
[assembly: AssemblyFileVersion("1.2.0625.1305")]
|
[assembly: AssemblyFileVersion("1.2.0704.1521")]
|
||||||
@@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
|
|||||||
// You can specify all the values or you can default the Build and Revision Numbers
|
// You can specify all the values or you can default the Build and Revision Numbers
|
||||||
// by using the '*' as shown below:
|
// by using the '*' as shown below:
|
||||||
// [assembly: AssemblyVersion("1.0.*")]
|
// [assembly: AssemblyVersion("1.0.*")]
|
||||||
[assembly: AssemblyVersion("1.2.0625.1305")]
|
[assembly: AssemblyVersion("1.2.0704.1521")]
|
||||||
[assembly: AssemblyFileVersion("1.2.0625.1305")]
|
[assembly: AssemblyFileVersion("1.2.0704.1521")]
|
||||||
@@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
|
|||||||
// You can specify all the values or you can default the Build and Revision Numbers
|
// You can specify all the values or you can default the Build and Revision Numbers
|
||||||
// by using the '*' as shown below:
|
// by using the '*' as shown below:
|
||||||
// [assembly: AssemblyVersion("1.0.*")]
|
// [assembly: AssemblyVersion("1.0.*")]
|
||||||
[assembly: AssemblyVersion("1.2.0625.1305")]
|
[assembly: AssemblyVersion("1.2.0704.1521")]
|
||||||
[assembly: AssemblyFileVersion("1.2.0625.1305")]
|
[assembly: AssemblyFileVersion("1.2.0704.1521")]
|
||||||
@@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
|
|||||||
// You can specify all the values or you can default the Build and Revision Numbers
|
// You can specify all the values or you can default the Build and Revision Numbers
|
||||||
// by using the '*' as shown below:
|
// by using the '*' as shown below:
|
||||||
// [assembly: AssemblyVersion("1.0.*")]
|
// [assembly: AssemblyVersion("1.0.*")]
|
||||||
[assembly: AssemblyVersion("1.2.0625.1305")]
|
[assembly: AssemblyVersion("1.2.0704.1521")]
|
||||||
[assembly: AssemblyFileVersion("1.2.0625.1305")]
|
[assembly: AssemblyFileVersion("1.2.0704.1521")]
|
||||||
@@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
|
|||||||
// You can specify all the values or you can default the Build and Revision Numbers
|
// You can specify all the values or you can default the Build and Revision Numbers
|
||||||
// by using the '*' as shown below:
|
// by using the '*' as shown below:
|
||||||
// [assembly: AssemblyVersion("1.0.*")]
|
// [assembly: AssemblyVersion("1.0.*")]
|
||||||
[assembly: AssemblyVersion("1.2.0625.1305")]
|
[assembly: AssemblyVersion("1.2.0704.1521")]
|
||||||
[assembly: AssemblyFileVersion("1.2.0625.1305")]
|
[assembly: AssemblyFileVersion("1.2.0704.1521")]
|
||||||
@@ -27,8 +27,8 @@ namespace Disco.Web
|
|||||||
BundleTable.Add(new Bundle("~/Style/Timeline", Links.ClientSource.Style.Timeline_min_css));
|
BundleTable.Add(new Bundle("~/Style/Timeline", Links.ClientSource.Style.Timeline_min_css));
|
||||||
|
|
||||||
// Styles - Public Targeted
|
// Styles - Public Targeted
|
||||||
BundleTable.Add(new Bundle("~/Style/Public/UserHeldDevices", Links.ClientSource.Style.Public.UserHeldDevices_min_css));
|
BundleTable.Add(new Bundle("~/Style/Public/HeldDevices", Links.ClientSource.Style.Public.HeldDevices_min_css));
|
||||||
BundleTable.Add(new Bundle("~/Style/Public/UserHeldDevicesNoticeboard", Links.ClientSource.Style.Public.UserHeldDevicesNoticeboard_min_css));
|
BundleTable.Add(new Bundle("~/Style/Public/HeldDevicesNoticeboard", Links.ClientSource.Style.Public.HeldDevicesNoticeboard_min_css));
|
||||||
|
|
||||||
|
|
||||||
// Scripts - Core
|
// Scripts - Core
|
||||||
|
|||||||
@@ -0,0 +1,107 @@
|
|||||||
|
using Disco.Data.Repository;
|
||||||
|
using Disco.Models.Repository;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Web;
|
||||||
|
using System.Web.Mvc;
|
||||||
|
|
||||||
|
namespace Disco.Web.Areas.Public.Controllers
|
||||||
|
{
|
||||||
|
public partial class HeldDevicesController : dbController
|
||||||
|
{
|
||||||
|
#region Helpers
|
||||||
|
|
||||||
|
private List<Models.HeldDevices.HeldDeviceModel> GetHeldDevices(IQueryable<Job> query)
|
||||||
|
{
|
||||||
|
var jobs = query.Where(j =>
|
||||||
|
!j.ClosedDate.HasValue &&
|
||||||
|
j.DeviceSerialNumber != null &&
|
||||||
|
((j.DeviceHeld.HasValue && !j.DeviceReturnedDate.HasValue) || j.WaitingForUserAction.HasValue)
|
||||||
|
).Select(j => new Models.HeldDevices.HeldDeviceQueryModel
|
||||||
|
{
|
||||||
|
JobId = j.Id,
|
||||||
|
DeviceSerialNumber = j.DeviceSerialNumber,
|
||||||
|
DeviceComputerName = j.Device.ComputerName,
|
||||||
|
DeviceLocation = j.Device.Location,
|
||||||
|
DeviceProfileId = j.Device.DeviceProfileId,
|
||||||
|
DeviceAddressId = j.Device.DeviceProfile.DefaultOrganisationAddress,
|
||||||
|
UserId = j.Device.AssignedUserId,
|
||||||
|
UserDisplayName = j.Device.AssignedUser.DisplayName,
|
||||||
|
WaitingForUserAction = j.WaitingForUserAction.HasValue || ((j.JobMetaNonWarranty.AccountingChargeRequiredDate.HasValue || j.JobMetaNonWarranty.AccountingChargeAddedDate.HasValue) && !j.JobMetaNonWarranty.AccountingChargePaidDate.HasValue),
|
||||||
|
WaitingForUserActionSince = j.WaitingForUserAction.HasValue ? j.WaitingForUserAction : (j.JobMetaNonWarranty.AccountingChargeRequiredDate.HasValue ? j.JobMetaNonWarranty.AccountingChargeRequiredDate : j.JobMetaNonWarranty.AccountingChargeAddedDate),
|
||||||
|
ReadyForReturn = j.DeviceReadyForReturn.HasValue,
|
||||||
|
EstimatedReturnTime = j.ExpectedClosedDate,
|
||||||
|
ReadyForReturnSince = j.DeviceReadyForReturn
|
||||||
|
}).GroupBy(j => j.DeviceSerialNumber);
|
||||||
|
|
||||||
|
var thd = new List<Models.HeldDevices.HeldDeviceModel>();
|
||||||
|
foreach (var job in jobs)
|
||||||
|
{
|
||||||
|
if (job.Any(j => j.WaitingForUserAction))
|
||||||
|
{
|
||||||
|
thd.Add(job.Where(j => j.WaitingForUserAction).OrderBy(j => j.WaitingForUserActionSince).FirstOrDefault().ToUserHeldDeviceModel(dbContext));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (job.All(j => j.ReadyForReturn))
|
||||||
|
{
|
||||||
|
thd.Add(job.FirstOrDefault().ToUserHeldDeviceModel(dbContext));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
thd.Add(job.Where(j => !j.ReadyForReturn).OrderByDescending(j => j.EstimatedReturnTime).FirstOrDefault().ToUserHeldDeviceModel(dbContext));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return thd;
|
||||||
|
}
|
||||||
|
|
||||||
|
private List<Models.HeldDevices.HeldDeviceModel> GetHeldDevices()
|
||||||
|
{
|
||||||
|
return GetHeldDevices(dbContext.Jobs);
|
||||||
|
}
|
||||||
|
private Models.HeldDevices.HeldDeviceModel GetHeldDevice(string DeviceSerialNumber)
|
||||||
|
{
|
||||||
|
return GetHeldDevices(dbContext.Jobs.Where(j => j.DeviceSerialNumber == DeviceSerialNumber)).FirstOrDefault();
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
public virtual ActionResult Index()
|
||||||
|
{
|
||||||
|
return View(GetHeldDevices());
|
||||||
|
}
|
||||||
|
|
||||||
|
public virtual ActionResult ReadyForReturnXml()
|
||||||
|
{
|
||||||
|
var readyForReturn = GetHeldDevices().Where(j => j.ReadyForReturn && !j.WaitingForUserAction).ToArray();
|
||||||
|
return new Extensions.XmlResult(readyForReturn);
|
||||||
|
}
|
||||||
|
public virtual ActionResult WaitingForUserActionXml()
|
||||||
|
{
|
||||||
|
var waitingForUserAction = GetHeldDevices().Where(j => j.WaitingForUserAction).ToArray();
|
||||||
|
return new Extensions.XmlResult(waitingForUserAction);
|
||||||
|
}
|
||||||
|
public virtual ActionResult HeldDevicesXml()
|
||||||
|
{
|
||||||
|
var heldDevices = GetHeldDevices().Where(j => !j.ReadyForReturn && !j.WaitingForUserAction).ToArray();
|
||||||
|
return new Extensions.XmlResult(heldDevices);
|
||||||
|
}
|
||||||
|
|
||||||
|
public virtual ActionResult Noticeboard()
|
||||||
|
{
|
||||||
|
return View();
|
||||||
|
}
|
||||||
|
|
||||||
|
public virtual ActionResult HeldDevice(string id)
|
||||||
|
{
|
||||||
|
var uhd = GetHeldDevice(id);
|
||||||
|
return Json(uhd, JsonRequestBehavior.AllowGet);
|
||||||
|
}
|
||||||
|
public virtual ActionResult HeldDevices()
|
||||||
|
{
|
||||||
|
var uhd = GetHeldDevices();
|
||||||
|
return Json(uhd, JsonRequestBehavior.AllowGet);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -5,90 +5,65 @@ using System.Web;
|
|||||||
using System.Web.Mvc;
|
using System.Web.Mvc;
|
||||||
using Disco.BI;
|
using Disco.BI;
|
||||||
using Disco.BI.Extensions;
|
using Disco.BI.Extensions;
|
||||||
|
using Disco.Models.Repository;
|
||||||
|
|
||||||
namespace Disco.Web.Areas.Public.Controllers
|
namespace Disco.Web.Areas.Public.Controllers
|
||||||
{
|
{
|
||||||
public partial class UserHeldDevicesController : dbController
|
public partial class UserHeldDevicesController : dbController
|
||||||
{
|
{
|
||||||
private List<Models.UserHeldDevices.UserHeldDeviceModel> GetUserHeldDevices()
|
#region Helpers
|
||||||
|
|
||||||
|
private List<Models.UserHeldDevices.UserHeldDeviceModel> GetUserHeldDevices(IQueryable<Job> query)
|
||||||
{
|
{
|
||||||
var usersJobs = dbContext.Jobs.Where(j =>
|
var jobs = query.Where(j =>
|
||||||
!j.ClosedDate.HasValue && j.UserId != null &&
|
!j.ClosedDate.HasValue && j.Device.AssignedUserId != null &&
|
||||||
j.DeviceSerialNumber != null &&
|
j.DeviceSerialNumber != null &&
|
||||||
((j.DeviceHeld.HasValue && !j.DeviceReturnedDate.HasValue) || j.WaitingForUserAction.HasValue)
|
((j.DeviceHeld.HasValue && !j.DeviceReturnedDate.HasValue) || j.WaitingForUserAction.HasValue)
|
||||||
).Select(j => new Models.UserHeldDevices.HeldJobDeviceModel
|
).Select(j => new Models.UserHeldDevices.HeldJobDeviceModel
|
||||||
{
|
{
|
||||||
JobId = j.Id,
|
JobId = j.Id,
|
||||||
WaitingForUserAction = j.WaitingForUserAction.HasValue || ((j.JobMetaNonWarranty.AccountingChargeRequiredDate.HasValue || j.JobMetaNonWarranty.AccountingChargeAddedDate.HasValue) && !j.JobMetaNonWarranty.AccountingChargePaidDate.HasValue),
|
WaitingForUserAction = j.WaitingForUserAction.HasValue || ((j.JobMetaNonWarranty.AccountingChargeRequiredDate.HasValue || j.JobMetaNonWarranty.AccountingChargeAddedDate.HasValue) && !j.JobMetaNonWarranty.AccountingChargePaidDate.HasValue),
|
||||||
WaitingForUserActionSince = j.WaitingForUserAction.HasValue ? j.WaitingForUserAction : (j.JobMetaNonWarranty.AccountingChargeRequiredDate.HasValue ? j.JobMetaNonWarranty.AccountingChargeRequiredDate : j.JobMetaNonWarranty.AccountingChargeAddedDate),
|
WaitingForUserActionSince = j.WaitingForUserAction.HasValue ? j.WaitingForUserAction : (j.JobMetaNonWarranty.AccountingChargeRequiredDate.HasValue ? j.JobMetaNonWarranty.AccountingChargeRequiredDate : j.JobMetaNonWarranty.AccountingChargeAddedDate),
|
||||||
ReadyForReturn = j.DeviceReadyForReturn.HasValue,
|
ReadyForReturn = j.DeviceReadyForReturn.HasValue,
|
||||||
EstimatedReturnTime = j.ExpectedClosedDate,
|
EstimatedReturnTime = j.ExpectedClosedDate,
|
||||||
ReadyForReturnSince = j.DeviceReadyForReturn,
|
ReadyForReturnSince = j.DeviceReadyForReturn,
|
||||||
UserDisplayName = j.User.DisplayName,
|
UserId = j.Device.AssignedUserId,
|
||||||
UserId = j.UserId,
|
UserDisplayName = j.Device.AssignedUser.DisplayName,
|
||||||
DeviceProfileId = j.Device.DeviceProfileId,
|
DeviceProfileId = j.Device.DeviceProfileId,
|
||||||
DeviceAddressId = j.Device.DeviceProfile.DefaultOrganisationAddress
|
DeviceAddressId = j.Device.DeviceProfile.DefaultOrganisationAddress
|
||||||
}).GroupBy(j => j.UserId);
|
}).GroupBy(j => j.UserId);
|
||||||
|
|
||||||
var thd = new List<Models.UserHeldDevices.UserHeldDeviceModel>();
|
var thd = new List<Models.UserHeldDevices.UserHeldDeviceModel>();
|
||||||
foreach (var userJobs in usersJobs)
|
foreach (var job in jobs)
|
||||||
{
|
{
|
||||||
if (userJobs.Any(j => j.WaitingForUserAction))
|
if (job.Any(j => j.WaitingForUserAction))
|
||||||
{
|
{
|
||||||
thd.Add(userJobs.Where(j => j.WaitingForUserAction).OrderBy(j => j.WaitingForUserActionSince).FirstOrDefault().ToUserHeldDeviceModel(dbContext));
|
thd.Add(job.Where(j => j.WaitingForUserAction).OrderBy(j => j.WaitingForUserActionSince).FirstOrDefault().ToUserHeldDeviceModel(dbContext));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (userJobs.All(j => j.ReadyForReturn))
|
if (job.All(j => j.ReadyForReturn))
|
||||||
{
|
{
|
||||||
thd.Add(userJobs.FirstOrDefault().ToUserHeldDeviceModel(dbContext));
|
thd.Add(job.FirstOrDefault().ToUserHeldDeviceModel(dbContext));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
thd.Add(userJobs.Where(j => !j.ReadyForReturn).OrderByDescending(j => j.EstimatedReturnTime).FirstOrDefault().ToUserHeldDeviceModel(dbContext));
|
thd.Add(job.Where(j => !j.ReadyForReturn).OrderByDescending(j => j.EstimatedReturnTime).FirstOrDefault().ToUserHeldDeviceModel(dbContext));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return thd;
|
return thd;
|
||||||
}
|
}
|
||||||
private Models.UserHeldDevices.UserHeldDeviceModel GetUserHeldDevice(string userId)
|
|
||||||
{
|
|
||||||
var userJobs = dbContext.Jobs.Where(j => !j.ClosedDate.HasValue && j.UserId == userId && j.DeviceSerialNumber != null && ((j.DeviceHeld.HasValue && !j.DeviceReturnedDate.HasValue) || j.WaitingForUserAction.HasValue)).Select(j => new Models.UserHeldDevices.HeldJobDeviceModel
|
|
||||||
{
|
|
||||||
JobId = j.Id,
|
|
||||||
WaitingForUserAction = j.WaitingForUserAction.HasValue,
|
|
||||||
WaitingForUserActionSince = j.WaitingForUserAction,
|
|
||||||
ReadyForReturn = j.DeviceReadyForReturn.HasValue,
|
|
||||||
EstimatedReturnTime = j.ExpectedClosedDate,
|
|
||||||
ReadyForReturnSince = j.DeviceReadyForReturn,
|
|
||||||
UserDisplayName = j.User.DisplayName,
|
|
||||||
UserId = j.UserId,
|
|
||||||
DeviceProfileId = j.Device.DeviceProfileId,
|
|
||||||
DeviceAddressId = j.Device.DeviceProfile.DefaultOrganisationAddress
|
|
||||||
}).ToList();
|
|
||||||
|
|
||||||
if (userJobs == null || userJobs.Count == 0)
|
#endregion
|
||||||
{
|
|
||||||
return null;
|
private List<Models.UserHeldDevices.UserHeldDeviceModel> GetUserHeldDevices()
|
||||||
}
|
{
|
||||||
else
|
return GetUserHeldDevices(dbContext.Jobs);
|
||||||
{
|
}
|
||||||
if (userJobs.Any(j => j.WaitingForUserAction))
|
private Models.UserHeldDevices.UserHeldDeviceModel GetUserHeldDevice(string UserId)
|
||||||
{
|
{
|
||||||
return userJobs.Where(j => j.WaitingForUserAction).OrderBy(j => j.WaitingForUserActionSince).FirstOrDefault().ToUserHeldDeviceModel(dbContext);
|
return GetUserHeldDevices(dbContext.Jobs.Where(j => j.Device.AssignedUserId == UserId)).FirstOrDefault();
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if (userJobs.All(j => j.ReadyForReturn))
|
|
||||||
{
|
|
||||||
return userJobs.FirstOrDefault().ToUserHeldDeviceModel(dbContext);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
return userJobs.Where(j => !j.ReadyForReturn).OrderByDescending(j => j.EstimatedReturnTime).FirstOrDefault().ToUserHeldDeviceModel(dbContext);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public virtual ActionResult Index()
|
public virtual ActionResult Index()
|
||||||
|
|||||||
@@ -0,0 +1,44 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Web;
|
||||||
|
|
||||||
|
namespace Disco.Web.Areas.Public.Models.HeldDevices
|
||||||
|
{
|
||||||
|
public class HeldDeviceModel
|
||||||
|
{
|
||||||
|
public string DeviceSerialNumber { get; set; }
|
||||||
|
public string DeviceComputerName { get; set; }
|
||||||
|
public int DeviceProfileId { get; set; }
|
||||||
|
public string DeviceAddress { get; set; }
|
||||||
|
public string DeviceLocation { get; set; }
|
||||||
|
public string DeviceDescription
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
StringBuilder sb = new StringBuilder(this.DeviceSerialNumber);
|
||||||
|
|
||||||
|
if (UserId != null)
|
||||||
|
sb.Append(" - ").Append(this.UserDisplayName).Append(" (").Append(this.UserId).Append(")");
|
||||||
|
|
||||||
|
if (!string.IsNullOrWhiteSpace(this.DeviceLocation))
|
||||||
|
sb.Append(" - ").Append(this.DeviceLocation);
|
||||||
|
else if (UserId == null)
|
||||||
|
sb.Append(" - ").Append(this.DeviceComputerName);
|
||||||
|
|
||||||
|
return sb.ToString();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public string UserId { get; set; }
|
||||||
|
public string UserDisplayName { get; set; }
|
||||||
|
public bool WaitingForUserAction { get; set; }
|
||||||
|
public string WaitingForUserActionSince { get; set; }
|
||||||
|
|
||||||
|
public bool ReadyForReturn { get; set; }
|
||||||
|
public string EstimatedReturnTime { get; set; }
|
||||||
|
public string ReadyForReturnSince { get; set; }
|
||||||
|
public bool IsAlert { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,61 @@
|
|||||||
|
using Disco.Data.Repository;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Web;
|
||||||
|
using Disco.BI.Extensions;
|
||||||
|
|
||||||
|
namespace Disco.Web.Areas.Public.Models.HeldDevices
|
||||||
|
{
|
||||||
|
public class HeldDeviceQueryModel
|
||||||
|
{
|
||||||
|
public int JobId { get; set; }
|
||||||
|
|
||||||
|
public string DeviceSerialNumber { get; set; }
|
||||||
|
public string DeviceComputerName { get; set; }
|
||||||
|
public int DeviceProfileId { get; set; }
|
||||||
|
public int? DeviceAddressId { get; set; }
|
||||||
|
public string DeviceLocation { get; set; }
|
||||||
|
|
||||||
|
public string UserId { get; set; }
|
||||||
|
public string UserDisplayName { get; set; }
|
||||||
|
|
||||||
|
public bool ReadyForReturn { get; set; }
|
||||||
|
public bool WaitingForUserAction { get; set; }
|
||||||
|
public DateTime? EstimatedReturnTime { get; set; }
|
||||||
|
public DateTime? ReadyForReturnSince { get; set; }
|
||||||
|
public DateTime? WaitingForUserActionSince { get; set; }
|
||||||
|
|
||||||
|
public HeldDeviceModel ToUserHeldDeviceModel(DiscoDataContext dbContext)
|
||||||
|
{
|
||||||
|
var uhdm = new HeldDeviceModel()
|
||||||
|
{
|
||||||
|
DeviceSerialNumber = this.DeviceSerialNumber,
|
||||||
|
DeviceComputerName = this.DeviceComputerName,
|
||||||
|
DeviceLocation = this.DeviceLocation,
|
||||||
|
DeviceProfileId = this.DeviceProfileId,
|
||||||
|
DeviceAddress = (this.DeviceAddressId.HasValue ? dbContext.DiscoConfiguration.OrganisationAddresses.GetAddress(this.DeviceAddressId.Value).ShortName : string.Empty),
|
||||||
|
UserId = this.UserId,
|
||||||
|
UserDisplayName = this.UserDisplayName,
|
||||||
|
ReadyForReturn = this.ReadyForReturn,
|
||||||
|
WaitingForUserAction = this.WaitingForUserAction
|
||||||
|
};
|
||||||
|
var n = DateTime.Now;
|
||||||
|
if (!this.ReadyForReturn && this.EstimatedReturnTime.HasValue && this.EstimatedReturnTime.Value > n)
|
||||||
|
{
|
||||||
|
uhdm.EstimatedReturnTime = this.EstimatedReturnTime.ToFuzzy();
|
||||||
|
}
|
||||||
|
if (this.ReadyForReturn)
|
||||||
|
{
|
||||||
|
uhdm.ReadyForReturnSince = this.ReadyForReturnSince.ToFuzzy();
|
||||||
|
uhdm.IsAlert = (this.ReadyForReturnSince.Value < DateTime.Now.AddDays(-3));
|
||||||
|
}
|
||||||
|
if (this.WaitingForUserAction)
|
||||||
|
{
|
||||||
|
uhdm.WaitingForUserActionSince = this.WaitingForUserActionSince.ToFuzzy();
|
||||||
|
uhdm.IsAlert = (this.WaitingForUserActionSince.Value < n.AddDays(-6));
|
||||||
|
}
|
||||||
|
return uhdm;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -37,20 +37,6 @@ namespace Disco.Web.Areas.Public.Models.UserHeldDevices
|
|||||||
if (!this.ReadyForReturn && this.EstimatedReturnTime.HasValue && this.EstimatedReturnTime.Value > n)
|
if (!this.ReadyForReturn && this.EstimatedReturnTime.HasValue && this.EstimatedReturnTime.Value > n)
|
||||||
{
|
{
|
||||||
uhdm.EstimatedReturnTime = this.EstimatedReturnTime.ToFuzzy();
|
uhdm.EstimatedReturnTime = this.EstimatedReturnTime.ToFuzzy();
|
||||||
if (this.EstimatedReturnTime.Value.Date == n.Date)
|
|
||||||
{
|
|
||||||
if (this.EstimatedReturnTime.Value < n.AddHours(2))
|
|
||||||
{
|
|
||||||
if (this.EstimatedReturnTime.Value < n.AddMinutes(12))
|
|
||||||
{
|
|
||||||
uhdm.UpdateAt = this.EstimatedReturnTime.Value;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
uhdm.UpdateAt = this.EstimatedReturnTime.Value.AddMinutes(-10);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
if (this.ReadyForReturn)
|
if (this.ReadyForReturn)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -15,7 +15,6 @@ namespace Disco.Web.Areas.Public.Models.UserHeldDevices
|
|||||||
public bool IsAlert { get; set; }
|
public bool IsAlert { get; set; }
|
||||||
public bool WaitingForUserAction { get; set; }
|
public bool WaitingForUserAction { get; set; }
|
||||||
public string WaitingForUserActionSince { get; set; }
|
public string WaitingForUserActionSince { get; set; }
|
||||||
public Nullable<DateTime> UpdateAt { get; set; }
|
|
||||||
public int DeviceProfileId { get; set; }
|
public int DeviceProfileId { get; set; }
|
||||||
public string DeviceAddress { get; set; }
|
public string DeviceAddress { get; set; }
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -19,6 +19,8 @@ namespace Disco.Web.Areas.Public
|
|||||||
{
|
{
|
||||||
context.Routes.MapConnection<UserHeldDeviceNotifications>(
|
context.Routes.MapConnection<UserHeldDeviceNotifications>(
|
||||||
"Public_UserHeldDevices_Notifications", "Public/UserHeldDevices/Notifications", new ConnectionConfiguration(), SignalRAuthenticationWorkaround.AddMiddleware);
|
"Public_UserHeldDevices_Notifications", "Public/UserHeldDevices/Notifications", new ConnectionConfiguration(), SignalRAuthenticationWorkaround.AddMiddleware);
|
||||||
|
context.Routes.MapConnection<HeldDeviceNotifications>(
|
||||||
|
"Public_HeldDevices_Notifications", "Public/HeldDevices/Notifications", new ConnectionConfiguration(), SignalRAuthenticationWorkaround.AddMiddleware);
|
||||||
|
|
||||||
context.MapRoute(
|
context.MapRoute(
|
||||||
"Public_Credits",
|
"Public_Credits",
|
||||||
|
|||||||
@@ -0,0 +1,97 @@
|
|||||||
|
@model IEnumerable<Disco.Web.Areas.Public.Models.HeldDevices.HeldDeviceModel>
|
||||||
|
@{
|
||||||
|
ViewBag.Title = Html.ToBreadcrumb("Public Reports", MVC.Public.Public.Index(), "Held Devices", null);
|
||||||
|
Html.BundleDeferred("~/Style/Public/HeldDevices");
|
||||||
|
}
|
||||||
|
<div class="clearfix page">
|
||||||
|
<div class="column1">
|
||||||
|
@{
|
||||||
|
var DevicesInProcess = Model.Where(i => !i.ReadyForReturn && !i.WaitingForUserAction).ToArray();
|
||||||
|
}
|
||||||
|
<h2>In Process (@DevicesInProcess.Length)</h2>
|
||||||
|
<table class="dataTable">
|
||||||
|
@foreach (var item in DevicesInProcess)
|
||||||
|
{
|
||||||
|
<tr>
|
||||||
|
<td class="id">
|
||||||
|
@item.DeviceSerialNumber
|
||||||
|
</td>
|
||||||
|
<td class="description">
|
||||||
|
@if (item.UserId != null)
|
||||||
|
{
|
||||||
|
<span class="user">@item.UserDisplayName (@item.UserId)</span>
|
||||||
|
}
|
||||||
|
@if (!string.IsNullOrWhiteSpace(item.DeviceLocation))
|
||||||
|
{
|
||||||
|
if (item.UserId != null)
|
||||||
|
{
|
||||||
|
<text> - </text>
|
||||||
|
}
|
||||||
|
@item.DeviceLocation
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (item.UserId == null)
|
||||||
|
{
|
||||||
|
@item.DeviceComputerName
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@if (!string.IsNullOrEmpty(item.EstimatedReturnTime))
|
||||||
|
{
|
||||||
|
<span class="smallMessage">(Expected: @item.EstimatedReturnTime)</span>
|
||||||
|
}
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
}
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
<div class="column2">
|
||||||
|
@{
|
||||||
|
var WaitingForUserActionJobs = Model.Where(i => i.WaitingForUserAction).ToArray();
|
||||||
|
}
|
||||||
|
<h2>Waiting for User Action (@WaitingForUserActionJobs.Length)</h2>
|
||||||
|
<table class="dataTable">
|
||||||
|
@foreach (var item in WaitingForUserActionJobs)
|
||||||
|
{
|
||||||
|
<tr>
|
||||||
|
<td class="id">
|
||||||
|
@item.DeviceSerialNumber
|
||||||
|
</td>
|
||||||
|
<td class="description">
|
||||||
|
<span class="user">@item.UserDisplayName (@item.UserId)</span>
|
||||||
|
@if (!string.IsNullOrWhiteSpace(item.DeviceLocation))
|
||||||
|
{
|
||||||
|
<text> - </text>@item.DeviceLocation
|
||||||
|
}
|
||||||
|
</td>
|
||||||
|
<td class="timestamp@(item.IsAlert ? " Alert" : string.Empty)">Since @item.WaitingForUserActionSince
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
}
|
||||||
|
</table>
|
||||||
|
<hr />
|
||||||
|
@{
|
||||||
|
var DevicesReadyForReturn = Model.Where(i => i.ReadyForReturn && !i.WaitingForUserAction).ToArray();
|
||||||
|
}
|
||||||
|
<h2>Ready for Return (@DevicesReadyForReturn.Length)</h2>
|
||||||
|
<table class="dataTable">
|
||||||
|
@foreach (var item in DevicesReadyForReturn)
|
||||||
|
{
|
||||||
|
<tr>
|
||||||
|
<td class="id">
|
||||||
|
@item.DeviceSerialNumber
|
||||||
|
</td>
|
||||||
|
<td class="description">
|
||||||
|
<span class="user">@item.UserDisplayName (@item.UserId)</span>
|
||||||
|
@if (!string.IsNullOrWhiteSpace(item.DeviceLocation))
|
||||||
|
{
|
||||||
|
<text> - </text>@item.DeviceLocation
|
||||||
|
}
|
||||||
|
</td>
|
||||||
|
<td class="timestamp@(item.IsAlert ? " Alert" : string.Empty)">Ready @item.ReadyForReturnSince
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
}
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
@@ -0,0 +1,597 @@
|
|||||||
|
#pragma warning disable 1591
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// <auto-generated>
|
||||||
|
// This code was generated by a tool.
|
||||||
|
// Runtime Version:4.0.30319.18033
|
||||||
|
//
|
||||||
|
// Changes to this file may cause incorrect behavior and will be lost if
|
||||||
|
// the code is regenerated.
|
||||||
|
// </auto-generated>
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
namespace Disco.Web.Areas.Public.Views.HeldDevices
|
||||||
|
{
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.IO;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Net;
|
||||||
|
using System.Text;
|
||||||
|
using System.Web;
|
||||||
|
using System.Web.Helpers;
|
||||||
|
using System.Web.Mvc;
|
||||||
|
using System.Web.Mvc.Ajax;
|
||||||
|
using System.Web.Mvc.Html;
|
||||||
|
using System.Web.Routing;
|
||||||
|
using System.Web.Security;
|
||||||
|
using System.Web.UI;
|
||||||
|
using System.Web.WebPages;
|
||||||
|
using Disco.BI.Extensions;
|
||||||
|
using Disco.Models.Repository;
|
||||||
|
using Disco.Web;
|
||||||
|
using Disco.Web.Extensions;
|
||||||
|
|
||||||
|
[System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "2.0.0.0")]
|
||||||
|
[System.Web.WebPages.PageVirtualPathAttribute("~/Areas/Public/Views/HeldDevices/Index.cshtml")]
|
||||||
|
public partial class Index : System.Web.Mvc.WebViewPage<IEnumerable<Disco.Web.Areas.Public.Models.HeldDevices.HeldDeviceModel>>
|
||||||
|
{
|
||||||
|
public Index()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
public override void Execute()
|
||||||
|
{
|
||||||
|
|
||||||
|
#line 2 "..\..\Areas\Public\Views\HeldDevices\Index.cshtml"
|
||||||
|
|
||||||
|
ViewBag.Title = Html.ToBreadcrumb("Public Reports", MVC.Public.Public.Index(), "Held Devices", null);
|
||||||
|
Html.BundleDeferred("~/Style/Public/HeldDevices");
|
||||||
|
|
||||||
|
|
||||||
|
#line default
|
||||||
|
#line hidden
|
||||||
|
WriteLiteral("\r\n<div");
|
||||||
|
|
||||||
|
WriteLiteral(" class=\"clearfix page\"");
|
||||||
|
|
||||||
|
WriteLiteral(">\r\n <div");
|
||||||
|
|
||||||
|
WriteLiteral(" class=\"column1\"");
|
||||||
|
|
||||||
|
WriteLiteral(">\r\n");
|
||||||
|
|
||||||
|
|
||||||
|
#line 8 "..\..\Areas\Public\Views\HeldDevices\Index.cshtml"
|
||||||
|
|
||||||
|
|
||||||
|
#line default
|
||||||
|
#line hidden
|
||||||
|
|
||||||
|
#line 8 "..\..\Areas\Public\Views\HeldDevices\Index.cshtml"
|
||||||
|
|
||||||
|
var DevicesInProcess = Model.Where(i => !i.ReadyForReturn && !i.WaitingForUserAction).ToArray();
|
||||||
|
|
||||||
|
|
||||||
|
#line default
|
||||||
|
#line hidden
|
||||||
|
WriteLiteral("\r\n <h2>In Process (");
|
||||||
|
|
||||||
|
|
||||||
|
#line 11 "..\..\Areas\Public\Views\HeldDevices\Index.cshtml"
|
||||||
|
Write(DevicesInProcess.Length);
|
||||||
|
|
||||||
|
|
||||||
|
#line default
|
||||||
|
#line hidden
|
||||||
|
WriteLiteral(")</h2>\r\n <table");
|
||||||
|
|
||||||
|
WriteLiteral(" class=\"dataTable\"");
|
||||||
|
|
||||||
|
WriteLiteral(">\r\n");
|
||||||
|
|
||||||
|
|
||||||
|
#line 13 "..\..\Areas\Public\Views\HeldDevices\Index.cshtml"
|
||||||
|
|
||||||
|
|
||||||
|
#line default
|
||||||
|
#line hidden
|
||||||
|
|
||||||
|
#line 13 "..\..\Areas\Public\Views\HeldDevices\Index.cshtml"
|
||||||
|
foreach (var item in DevicesInProcess)
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
#line default
|
||||||
|
#line hidden
|
||||||
|
WriteLiteral(" <tr>\r\n <td");
|
||||||
|
|
||||||
|
WriteLiteral(" class=\"id\"");
|
||||||
|
|
||||||
|
WriteLiteral(">\r\n");
|
||||||
|
|
||||||
|
WriteLiteral(" ");
|
||||||
|
|
||||||
|
|
||||||
|
#line 17 "..\..\Areas\Public\Views\HeldDevices\Index.cshtml"
|
||||||
|
Write(item.DeviceSerialNumber);
|
||||||
|
|
||||||
|
|
||||||
|
#line default
|
||||||
|
#line hidden
|
||||||
|
WriteLiteral("\r\n </td>\r\n <td");
|
||||||
|
|
||||||
|
WriteLiteral(" class=\"description\"");
|
||||||
|
|
||||||
|
WriteLiteral(">\r\n");
|
||||||
|
|
||||||
|
|
||||||
|
#line 20 "..\..\Areas\Public\Views\HeldDevices\Index.cshtml"
|
||||||
|
|
||||||
|
|
||||||
|
#line default
|
||||||
|
#line hidden
|
||||||
|
|
||||||
|
#line 20 "..\..\Areas\Public\Views\HeldDevices\Index.cshtml"
|
||||||
|
if (item.UserId != null)
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
#line default
|
||||||
|
#line hidden
|
||||||
|
WriteLiteral(" <span");
|
||||||
|
|
||||||
|
WriteLiteral(" class=\"user\"");
|
||||||
|
|
||||||
|
WriteLiteral(">");
|
||||||
|
|
||||||
|
|
||||||
|
#line 22 "..\..\Areas\Public\Views\HeldDevices\Index.cshtml"
|
||||||
|
Write(item.UserDisplayName);
|
||||||
|
|
||||||
|
|
||||||
|
#line default
|
||||||
|
#line hidden
|
||||||
|
WriteLiteral(" (");
|
||||||
|
|
||||||
|
|
||||||
|
#line 22 "..\..\Areas\Public\Views\HeldDevices\Index.cshtml"
|
||||||
|
Write(item.UserId);
|
||||||
|
|
||||||
|
|
||||||
|
#line default
|
||||||
|
#line hidden
|
||||||
|
WriteLiteral(")</span>\r\n");
|
||||||
|
|
||||||
|
|
||||||
|
#line 23 "..\..\Areas\Public\Views\HeldDevices\Index.cshtml"
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#line default
|
||||||
|
#line hidden
|
||||||
|
WriteLiteral(" ");
|
||||||
|
|
||||||
|
|
||||||
|
#line 24 "..\..\Areas\Public\Views\HeldDevices\Index.cshtml"
|
||||||
|
if (!string.IsNullOrWhiteSpace(item.DeviceLocation))
|
||||||
|
{
|
||||||
|
if (item.UserId != null)
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
#line default
|
||||||
|
#line hidden
|
||||||
|
WriteLiteral(" ");
|
||||||
|
|
||||||
|
WriteLiteral(" - ");
|
||||||
|
|
||||||
|
WriteLiteral("\r\n");
|
||||||
|
|
||||||
|
|
||||||
|
#line 29 "..\..\Areas\Public\Views\HeldDevices\Index.cshtml"
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#line default
|
||||||
|
#line hidden
|
||||||
|
|
||||||
|
#line 30 "..\..\Areas\Public\Views\HeldDevices\Index.cshtml"
|
||||||
|
Write(item.DeviceLocation);
|
||||||
|
|
||||||
|
|
||||||
|
#line default
|
||||||
|
#line hidden
|
||||||
|
|
||||||
|
#line 30 "..\..\Areas\Public\Views\HeldDevices\Index.cshtml"
|
||||||
|
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (item.UserId == null)
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
#line default
|
||||||
|
#line hidden
|
||||||
|
|
||||||
|
#line 36 "..\..\Areas\Public\Views\HeldDevices\Index.cshtml"
|
||||||
|
Write(item.DeviceComputerName);
|
||||||
|
|
||||||
|
|
||||||
|
#line default
|
||||||
|
#line hidden
|
||||||
|
|
||||||
|
#line 36 "..\..\Areas\Public\Views\HeldDevices\Index.cshtml"
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#line default
|
||||||
|
#line hidden
|
||||||
|
WriteLiteral(" ");
|
||||||
|
|
||||||
|
|
||||||
|
#line 39 "..\..\Areas\Public\Views\HeldDevices\Index.cshtml"
|
||||||
|
if (!string.IsNullOrEmpty(item.EstimatedReturnTime))
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
#line default
|
||||||
|
#line hidden
|
||||||
|
WriteLiteral(" <span");
|
||||||
|
|
||||||
|
WriteLiteral(" class=\"smallMessage\"");
|
||||||
|
|
||||||
|
WriteLiteral(">(Expected: ");
|
||||||
|
|
||||||
|
|
||||||
|
#line 41 "..\..\Areas\Public\Views\HeldDevices\Index.cshtml"
|
||||||
|
Write(item.EstimatedReturnTime);
|
||||||
|
|
||||||
|
|
||||||
|
#line default
|
||||||
|
#line hidden
|
||||||
|
WriteLiteral(")</span>\r\n");
|
||||||
|
|
||||||
|
|
||||||
|
#line 42 "..\..\Areas\Public\Views\HeldDevices\Index.cshtml"
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#line default
|
||||||
|
#line hidden
|
||||||
|
WriteLiteral(" </td>\r\n </tr>\r\n");
|
||||||
|
|
||||||
|
|
||||||
|
#line 45 "..\..\Areas\Public\Views\HeldDevices\Index.cshtml"
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#line default
|
||||||
|
#line hidden
|
||||||
|
WriteLiteral(" </table>\r\n </div>\r\n <div");
|
||||||
|
|
||||||
|
WriteLiteral(" class=\"column2\"");
|
||||||
|
|
||||||
|
WriteLiteral(">\r\n");
|
||||||
|
|
||||||
|
|
||||||
|
#line 49 "..\..\Areas\Public\Views\HeldDevices\Index.cshtml"
|
||||||
|
|
||||||
|
|
||||||
|
#line default
|
||||||
|
#line hidden
|
||||||
|
|
||||||
|
#line 49 "..\..\Areas\Public\Views\HeldDevices\Index.cshtml"
|
||||||
|
|
||||||
|
var WaitingForUserActionJobs = Model.Where(i => i.WaitingForUserAction).ToArray();
|
||||||
|
|
||||||
|
|
||||||
|
#line default
|
||||||
|
#line hidden
|
||||||
|
WriteLiteral("\r\n <h2>Waiting for User Action (");
|
||||||
|
|
||||||
|
|
||||||
|
#line 52 "..\..\Areas\Public\Views\HeldDevices\Index.cshtml"
|
||||||
|
Write(WaitingForUserActionJobs.Length);
|
||||||
|
|
||||||
|
|
||||||
|
#line default
|
||||||
|
#line hidden
|
||||||
|
WriteLiteral(")</h2>\r\n <table");
|
||||||
|
|
||||||
|
WriteLiteral(" class=\"dataTable\"");
|
||||||
|
|
||||||
|
WriteLiteral(">\r\n");
|
||||||
|
|
||||||
|
|
||||||
|
#line 54 "..\..\Areas\Public\Views\HeldDevices\Index.cshtml"
|
||||||
|
|
||||||
|
|
||||||
|
#line default
|
||||||
|
#line hidden
|
||||||
|
|
||||||
|
#line 54 "..\..\Areas\Public\Views\HeldDevices\Index.cshtml"
|
||||||
|
foreach (var item in WaitingForUserActionJobs)
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
#line default
|
||||||
|
#line hidden
|
||||||
|
WriteLiteral(" <tr>\r\n <td");
|
||||||
|
|
||||||
|
WriteLiteral(" class=\"id\"");
|
||||||
|
|
||||||
|
WriteLiteral(">\r\n");
|
||||||
|
|
||||||
|
WriteLiteral(" ");
|
||||||
|
|
||||||
|
|
||||||
|
#line 58 "..\..\Areas\Public\Views\HeldDevices\Index.cshtml"
|
||||||
|
Write(item.DeviceSerialNumber);
|
||||||
|
|
||||||
|
|
||||||
|
#line default
|
||||||
|
#line hidden
|
||||||
|
WriteLiteral("\r\n </td>\r\n <td");
|
||||||
|
|
||||||
|
WriteLiteral(" class=\"description\"");
|
||||||
|
|
||||||
|
WriteLiteral(">\r\n <span");
|
||||||
|
|
||||||
|
WriteLiteral(" class=\"user\"");
|
||||||
|
|
||||||
|
WriteLiteral(">");
|
||||||
|
|
||||||
|
|
||||||
|
#line 61 "..\..\Areas\Public\Views\HeldDevices\Index.cshtml"
|
||||||
|
Write(item.UserDisplayName);
|
||||||
|
|
||||||
|
|
||||||
|
#line default
|
||||||
|
#line hidden
|
||||||
|
WriteLiteral(" (");
|
||||||
|
|
||||||
|
|
||||||
|
#line 61 "..\..\Areas\Public\Views\HeldDevices\Index.cshtml"
|
||||||
|
Write(item.UserId);
|
||||||
|
|
||||||
|
|
||||||
|
#line default
|
||||||
|
#line hidden
|
||||||
|
WriteLiteral(")</span>\r\n");
|
||||||
|
|
||||||
|
|
||||||
|
#line 62 "..\..\Areas\Public\Views\HeldDevices\Index.cshtml"
|
||||||
|
|
||||||
|
|
||||||
|
#line default
|
||||||
|
#line hidden
|
||||||
|
|
||||||
|
#line 62 "..\..\Areas\Public\Views\HeldDevices\Index.cshtml"
|
||||||
|
if (!string.IsNullOrWhiteSpace(item.DeviceLocation))
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
#line default
|
||||||
|
#line hidden
|
||||||
|
WriteLiteral(" ");
|
||||||
|
|
||||||
|
WriteLiteral(" - ");
|
||||||
|
|
||||||
|
|
||||||
|
#line 64 "..\..\Areas\Public\Views\HeldDevices\Index.cshtml"
|
||||||
|
|
||||||
|
|
||||||
|
#line default
|
||||||
|
#line hidden
|
||||||
|
|
||||||
|
#line 64 "..\..\Areas\Public\Views\HeldDevices\Index.cshtml"
|
||||||
|
Write(item.DeviceLocation);
|
||||||
|
|
||||||
|
|
||||||
|
#line default
|
||||||
|
#line hidden
|
||||||
|
|
||||||
|
#line 64 "..\..\Areas\Public\Views\HeldDevices\Index.cshtml"
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#line default
|
||||||
|
#line hidden
|
||||||
|
WriteLiteral(" </td>\r\n <td");
|
||||||
|
|
||||||
|
WriteAttribute("class", Tuple.Create(" class=\"", 2758), Tuple.Create("\"", 2816)
|
||||||
|
, Tuple.Create(Tuple.Create("", 2766), Tuple.Create("timestamp", 2766), true)
|
||||||
|
|
||||||
|
#line 67 "..\..\Areas\Public\Views\HeldDevices\Index.cshtml"
|
||||||
|
, Tuple.Create(Tuple.Create("", 2775), Tuple.Create<System.Object, System.Int32>(item.IsAlert ? " Alert" : string.Empty
|
||||||
|
|
||||||
|
#line default
|
||||||
|
#line hidden
|
||||||
|
, 2775), false)
|
||||||
|
);
|
||||||
|
|
||||||
|
WriteLiteral(">Since ");
|
||||||
|
|
||||||
|
|
||||||
|
#line 67 "..\..\Areas\Public\Views\HeldDevices\Index.cshtml"
|
||||||
|
Write(item.WaitingForUserActionSince);
|
||||||
|
|
||||||
|
|
||||||
|
#line default
|
||||||
|
#line hidden
|
||||||
|
WriteLiteral("\r\n </td>\r\n </tr>\r\n");
|
||||||
|
|
||||||
|
|
||||||
|
#line 70 "..\..\Areas\Public\Views\HeldDevices\Index.cshtml"
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#line default
|
||||||
|
#line hidden
|
||||||
|
WriteLiteral(" </table>\r\n <hr />\r\n");
|
||||||
|
|
||||||
|
|
||||||
|
#line 73 "..\..\Areas\Public\Views\HeldDevices\Index.cshtml"
|
||||||
|
|
||||||
|
|
||||||
|
#line default
|
||||||
|
#line hidden
|
||||||
|
|
||||||
|
#line 73 "..\..\Areas\Public\Views\HeldDevices\Index.cshtml"
|
||||||
|
|
||||||
|
var DevicesReadyForReturn = Model.Where(i => i.ReadyForReturn && !i.WaitingForUserAction).ToArray();
|
||||||
|
|
||||||
|
|
||||||
|
#line default
|
||||||
|
#line hidden
|
||||||
|
WriteLiteral("\r\n <h2>Ready for Return (");
|
||||||
|
|
||||||
|
|
||||||
|
#line 76 "..\..\Areas\Public\Views\HeldDevices\Index.cshtml"
|
||||||
|
Write(DevicesReadyForReturn.Length);
|
||||||
|
|
||||||
|
|
||||||
|
#line default
|
||||||
|
#line hidden
|
||||||
|
WriteLiteral(")</h2>\r\n <table");
|
||||||
|
|
||||||
|
WriteLiteral(" class=\"dataTable\"");
|
||||||
|
|
||||||
|
WriteLiteral(">\r\n");
|
||||||
|
|
||||||
|
|
||||||
|
#line 78 "..\..\Areas\Public\Views\HeldDevices\Index.cshtml"
|
||||||
|
|
||||||
|
|
||||||
|
#line default
|
||||||
|
#line hidden
|
||||||
|
|
||||||
|
#line 78 "..\..\Areas\Public\Views\HeldDevices\Index.cshtml"
|
||||||
|
foreach (var item in DevicesReadyForReturn)
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
#line default
|
||||||
|
#line hidden
|
||||||
|
WriteLiteral(" <tr>\r\n <td");
|
||||||
|
|
||||||
|
WriteLiteral(" class=\"id\"");
|
||||||
|
|
||||||
|
WriteLiteral(">\r\n");
|
||||||
|
|
||||||
|
WriteLiteral(" ");
|
||||||
|
|
||||||
|
|
||||||
|
#line 82 "..\..\Areas\Public\Views\HeldDevices\Index.cshtml"
|
||||||
|
Write(item.DeviceSerialNumber);
|
||||||
|
|
||||||
|
|
||||||
|
#line default
|
||||||
|
#line hidden
|
||||||
|
WriteLiteral("\r\n </td>\r\n <td");
|
||||||
|
|
||||||
|
WriteLiteral(" class=\"description\"");
|
||||||
|
|
||||||
|
WriteLiteral(">\r\n <span");
|
||||||
|
|
||||||
|
WriteLiteral(" class=\"user\"");
|
||||||
|
|
||||||
|
WriteLiteral(">");
|
||||||
|
|
||||||
|
|
||||||
|
#line 85 "..\..\Areas\Public\Views\HeldDevices\Index.cshtml"
|
||||||
|
Write(item.UserDisplayName);
|
||||||
|
|
||||||
|
|
||||||
|
#line default
|
||||||
|
#line hidden
|
||||||
|
WriteLiteral(" (");
|
||||||
|
|
||||||
|
|
||||||
|
#line 85 "..\..\Areas\Public\Views\HeldDevices\Index.cshtml"
|
||||||
|
Write(item.UserId);
|
||||||
|
|
||||||
|
|
||||||
|
#line default
|
||||||
|
#line hidden
|
||||||
|
WriteLiteral(")</span>\r\n");
|
||||||
|
|
||||||
|
|
||||||
|
#line 86 "..\..\Areas\Public\Views\HeldDevices\Index.cshtml"
|
||||||
|
|
||||||
|
|
||||||
|
#line default
|
||||||
|
#line hidden
|
||||||
|
|
||||||
|
#line 86 "..\..\Areas\Public\Views\HeldDevices\Index.cshtml"
|
||||||
|
if (!string.IsNullOrWhiteSpace(item.DeviceLocation))
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
#line default
|
||||||
|
#line hidden
|
||||||
|
WriteLiteral(" ");
|
||||||
|
|
||||||
|
WriteLiteral(" - ");
|
||||||
|
|
||||||
|
|
||||||
|
#line 88 "..\..\Areas\Public\Views\HeldDevices\Index.cshtml"
|
||||||
|
|
||||||
|
|
||||||
|
#line default
|
||||||
|
#line hidden
|
||||||
|
|
||||||
|
#line 88 "..\..\Areas\Public\Views\HeldDevices\Index.cshtml"
|
||||||
|
Write(item.DeviceLocation);
|
||||||
|
|
||||||
|
|
||||||
|
#line default
|
||||||
|
#line hidden
|
||||||
|
|
||||||
|
#line 88 "..\..\Areas\Public\Views\HeldDevices\Index.cshtml"
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#line default
|
||||||
|
#line hidden
|
||||||
|
WriteLiteral(" </td>\r\n <td");
|
||||||
|
|
||||||
|
WriteAttribute("class", Tuple.Create(" class=\"", 3787), Tuple.Create("\"", 3845)
|
||||||
|
, Tuple.Create(Tuple.Create("", 3795), Tuple.Create("timestamp", 3795), true)
|
||||||
|
|
||||||
|
#line 91 "..\..\Areas\Public\Views\HeldDevices\Index.cshtml"
|
||||||
|
, Tuple.Create(Tuple.Create("", 3804), Tuple.Create<System.Object, System.Int32>(item.IsAlert ? " Alert" : string.Empty
|
||||||
|
|
||||||
|
#line default
|
||||||
|
#line hidden
|
||||||
|
, 3804), false)
|
||||||
|
);
|
||||||
|
|
||||||
|
WriteLiteral(">Ready ");
|
||||||
|
|
||||||
|
|
||||||
|
#line 91 "..\..\Areas\Public\Views\HeldDevices\Index.cshtml"
|
||||||
|
Write(item.ReadyForReturnSince);
|
||||||
|
|
||||||
|
|
||||||
|
#line default
|
||||||
|
#line hidden
|
||||||
|
WriteLiteral("\r\n </td>\r\n </tr>\r\n");
|
||||||
|
|
||||||
|
|
||||||
|
#line 94 "..\..\Areas\Public\Views\HeldDevices\Index.cshtml"
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#line default
|
||||||
|
#line hidden
|
||||||
|
WriteLiteral(" </table>\r\n </div>\r\n</div>\r\n");
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#pragma warning restore 1591
|
||||||
@@ -0,0 +1,476 @@
|
|||||||
|
@{
|
||||||
|
Layout = null;
|
||||||
|
Html.BundleDeferred("~/ClientScripts/Modules/jQuery-SignalR");
|
||||||
|
Html.BundleDeferred("~/ClientScripts/Core");
|
||||||
|
Html.BundleDeferred("~/Style/Public/HeldDevicesNoticeboard");
|
||||||
|
}
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8" />
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
||||||
|
<title>Disco - Held Devices</title>
|
||||||
|
@Html.BundleRenderDeferred()
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div id="page">
|
||||||
|
<header id="mainHeader">
|
||||||
|
Held Devices
|
||||||
|
</header>
|
||||||
|
<section id="mainSection">
|
||||||
|
<div id="inProcess" class="list">
|
||||||
|
<h3>In Process <span id="inProcessCount"></span>
|
||||||
|
</h3>
|
||||||
|
<div class="content">
|
||||||
|
<ul>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div id="readyForReturn" class="list">
|
||||||
|
<h3>Ready for Return <span id="readyForReturnCount"></span>
|
||||||
|
</h3>
|
||||||
|
<div class="content">
|
||||||
|
<ul>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div id="waitingForUserAction" class="list">
|
||||||
|
<h3>Waiting for User Action <span id="waitingForUserActionCount"></span>
|
||||||
|
</h3>
|
||||||
|
<div class="content">
|
||||||
|
<ul>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
<footer>
|
||||||
|
</footer>
|
||||||
|
</div>
|
||||||
|
<script type="text/javascript">
|
||||||
|
// Resizing
|
||||||
|
$(function () {
|
||||||
|
var $inProcess = $('#inProcess');
|
||||||
|
var $inProcessContent = $inProcess.find('.content');
|
||||||
|
var $inProcessHeader = $inProcess.find('.h3');
|
||||||
|
var $readyForReturn = $('#readyForReturn');
|
||||||
|
var $readyForReturnContent = $readyForReturn.find('.content');
|
||||||
|
var $readyForReturnHeader = $readyForReturn.find('.h3');
|
||||||
|
var $waitingForUserAction = $('#waitingForUserAction');
|
||||||
|
var $waitingForUserActionContent = $waitingForUserAction.find('.content');
|
||||||
|
var $waitingForUserActionHeader = $waitingForUserAction.find('.h3');
|
||||||
|
var $mainSection = $('#mainSection');
|
||||||
|
var $mainHeader = $('#mainHeader');
|
||||||
|
var $mainFooter = $('#mainFooter');
|
||||||
|
|
||||||
|
var onResize = function () {
|
||||||
|
var width = $mainSection.width();
|
||||||
|
var height = $(window).height() - $mainHeader.outerHeight() - $mainFooter.outerHeight() - 25;
|
||||||
|
|
||||||
|
$inProcess.height(height);
|
||||||
|
$inProcess.width((width * .28) - 11);
|
||||||
|
$inProcessContent.height(height - $inProcessHeader.outerHeight() - 56);
|
||||||
|
|
||||||
|
$readyForReturn.height(height);
|
||||||
|
$readyForReturn.width((width * .36) - 11);
|
||||||
|
$readyForReturnContent.height(height - $readyForReturnHeader.outerHeight() - 56);
|
||||||
|
|
||||||
|
$waitingForUserAction.height(height);
|
||||||
|
$waitingForUserAction.width((width * .36) - 11);
|
||||||
|
$waitingForUserActionContent.height(height - $waitingForUserActionHeader.outerHeight() - 56);
|
||||||
|
};
|
||||||
|
|
||||||
|
$(window).resize(onResize);
|
||||||
|
onResize();
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
<script type="text/javascript">
|
||||||
|
// Hide Mouse Mouse
|
||||||
|
$(function () {
|
||||||
|
var mouseVisible = true;
|
||||||
|
var mouseHideToken;
|
||||||
|
var documentBody = $('body');
|
||||||
|
|
||||||
|
var hideMouse = function () {
|
||||||
|
if (mouseVisible) {
|
||||||
|
documentBody.css('cursor', 'none');
|
||||||
|
mouseVisible = false;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
var showMouse = function () {
|
||||||
|
if (!mouseVisible) {
|
||||||
|
documentBody.css('cursor', 'auto');
|
||||||
|
mouseVisible = true;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
$(document).mousemove(function () {
|
||||||
|
showMouse();
|
||||||
|
if (mouseHideToken)
|
||||||
|
window.clearTimeout(mouseHideToken);
|
||||||
|
mouseHideToken = window.setTimeout(hideMouse, 2000);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
<script type="text/javascript">
|
||||||
|
$(function () {
|
||||||
|
var models = {};
|
||||||
|
var modelsInProcessSorted = [];
|
||||||
|
var modelsInProcessCount = 0;
|
||||||
|
var modelsReadyForReturnSorted = [];
|
||||||
|
var modelsReadyForReturnCount = 0;
|
||||||
|
var modelsWaitingForUserActionSorted = [];
|
||||||
|
var modelsWaitingForUserActionCount = 0;
|
||||||
|
var $inProcess = $('#inProcess');
|
||||||
|
var $inProcessContent = $inProcess.find('.content ul');
|
||||||
|
var $readyForReturn = $('#readyForReturn');
|
||||||
|
var $readyForReturnContent = $readyForReturn.find('.content ul');
|
||||||
|
var $waitingForUserAction = $('#waitingForUserAction');
|
||||||
|
var $waitingForUserActionContent = $waitingForUserAction.find('.content ul');
|
||||||
|
var modelsInProcessIndexOffset = 0;
|
||||||
|
var scrollInProcessToken = null;
|
||||||
|
var modelsReadyForReturnIndexOffset = 0;
|
||||||
|
var scrollReadyForReturnToken = null;
|
||||||
|
var modelsWaitingForUserActionIndexOffset = 0;
|
||||||
|
var scrollWaitingForUserActionToken = null;
|
||||||
|
var scrollSpeed = 3000;
|
||||||
|
var persistantConnection = null;
|
||||||
|
var filterDeviceAddressInclude;
|
||||||
|
var filterDeviceAddressExclude;
|
||||||
|
var filterDeviceProfileInclude;
|
||||||
|
var filterDeviceProfileExclude;
|
||||||
|
|
||||||
|
var getParameterByName = function (name) {
|
||||||
|
name = name.replace(/[\[]/, "\\\[").replace(/[\]]/, "\\\]");
|
||||||
|
var regexS = "[\\?&]" + name + "=([^&#]*)";
|
||||||
|
var regex = new RegExp(regexS);
|
||||||
|
var results = regex.exec(window.location.search);
|
||||||
|
if (results == null)
|
||||||
|
return "";
|
||||||
|
else
|
||||||
|
return decodeURIComponent(results[1].replace(/\+/g, " "));
|
||||||
|
}
|
||||||
|
|
||||||
|
var buildFilters = function () {
|
||||||
|
var deviceAddressInclude = getParameterByName('deviceAddressInclude');
|
||||||
|
if (deviceAddressInclude) {
|
||||||
|
filterDeviceAddressInclude = {};
|
||||||
|
var split = deviceAddressInclude.split(",");
|
||||||
|
for (var i = 0; i < split.length; i++) {
|
||||||
|
filterDeviceAddressInclude[split[i].toLowerCase()] = true;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
var deviceAddressExclude = getParameterByName('deviceAddressExclude');
|
||||||
|
if (deviceAddressExclude) {
|
||||||
|
filterDeviceAddressExclude = {};
|
||||||
|
var split = deviceAddressExclude.split(",");
|
||||||
|
for (var i = 0; i < split.length; i++) {
|
||||||
|
filterDeviceAddressExclude[split[i].toLowerCase()] = true;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
var deviceProfileInclude = getParameterByName('deviceProfileInclude');
|
||||||
|
if (deviceProfileInclude) {
|
||||||
|
filterDeviceProfileInclude = {};
|
||||||
|
var deviceProfileIncludeSplit = deviceProfileInclude.split(",");
|
||||||
|
for (var i = 0; i < deviceProfileIncludeSplit.length; i++) {
|
||||||
|
filterDeviceProfileInclude[parseInt(deviceProfileIncludeSplit[i])] = true;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
var deviceProfileExclude = getParameterByName('deviceProfileExclude');
|
||||||
|
if (deviceProfileExclude) {
|
||||||
|
filterDeviceProfileExclude = {};
|
||||||
|
var deviceProfileExcludeSplit = deviceProfileExclude.split(",");
|
||||||
|
for (var i = 0; i < deviceProfileExcludeSplit.length; i++) {
|
||||||
|
filterDeviceProfileExclude[parseInt(deviceProfileExcludeSplit[i])] = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
var calculateFilter = function (model) {
|
||||||
|
if (model) {
|
||||||
|
if (filterDeviceAddressInclude) {
|
||||||
|
return (filterDeviceAddressInclude[model.DeviceAddress.toLowerCase()] == true)
|
||||||
|
}
|
||||||
|
if (filterDeviceAddressExclude) {
|
||||||
|
return (!filterDeviceAddressExclude[model.DeviceAddress.toLowerCase()])
|
||||||
|
}
|
||||||
|
if (filterDeviceProfileInclude) {
|
||||||
|
return (filterDeviceProfileInclude[model.DeviceProfileId] == true)
|
||||||
|
}
|
||||||
|
if (filterDeviceProfileExclude) {
|
||||||
|
return (!filterDeviceProfileExclude[model.DeviceProfileId])
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
var sortModels = function () {
|
||||||
|
modelsInProcessSorted = [];
|
||||||
|
modelsReadyForReturnSorted = [];
|
||||||
|
modelsWaitingForUserActionSorted = [];
|
||||||
|
var modelSortFunc = function (a, b) {
|
||||||
|
if (a.DeviceSerialNumber.toUpperCase() == b.DeviceSerialNumber.toUpperCase()) {
|
||||||
|
return 0;
|
||||||
|
} else {
|
||||||
|
if (a.DeviceSerialNumber.toUpperCase() < b.DeviceSerialNumber.toUpperCase()) {
|
||||||
|
return -1
|
||||||
|
} else {
|
||||||
|
return 1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
for (var key in models) {
|
||||||
|
var model = models[key];
|
||||||
|
if (model) {
|
||||||
|
if (model.WaitingForUserAction) {
|
||||||
|
modelsWaitingForUserActionSorted.push(model);
|
||||||
|
} else {
|
||||||
|
if (model.ReadyForReturn) {
|
||||||
|
modelsReadyForReturnSorted.push(model);
|
||||||
|
} else {
|
||||||
|
modelsInProcessSorted.push(model);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
modelsReadyForReturnSorted = modelsReadyForReturnSorted.sort(modelSortFunc);
|
||||||
|
modelsInProcessSorted = modelsInProcessSorted.sort(modelSortFunc);
|
||||||
|
modelsWaitingForUserActionSorted = modelsWaitingForUserActionSorted.sort(modelSortFunc);
|
||||||
|
|
||||||
|
if (modelsInProcessSorted.length != modelsInProcessCount) {
|
||||||
|
modelsInProcessCount = modelsInProcessSorted.length;
|
||||||
|
$('#inProcessCount').text('(' + modelsInProcessCount + ')');
|
||||||
|
}
|
||||||
|
if (modelsReadyForReturnSorted.length != modelsReadyForReturnCount) {
|
||||||
|
modelsReadyForReturnCount = modelsReadyForReturnSorted.length;
|
||||||
|
$('#readyForReturnCount').text('(' + modelsReadyForReturnCount + ')');
|
||||||
|
}
|
||||||
|
if (modelsWaitingForUserActionSorted.length != modelsWaitingForUserActionCount) {
|
||||||
|
modelsWaitingForUserActionCount = modelsWaitingForUserActionSorted.length;
|
||||||
|
$('#waitingForUserActionCount').text('(' + modelsWaitingForUserActionCount + ')');
|
||||||
|
}
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
var scrollReadyForReturn = function () {
|
||||||
|
$readyForReturnContent.find('li').last().detach().prependTo($readyForReturnContent).hide().slideDown('slow');
|
||||||
|
modelsReadyForReturnIndexOffset++;
|
||||||
|
if (modelsReadyForReturnIndexOffset >= modelsReadyForReturnSorted.length) {
|
||||||
|
modelsReadyForReturnIndexOffset = 0;
|
||||||
|
}
|
||||||
|
scrollReadyForReturnToken = window.setTimeout(scrollReadyForReturn, scrollSpeed);
|
||||||
|
};
|
||||||
|
var updateScrollReadyForReturn = function () {
|
||||||
|
var containerHeight = $readyForReturn.find('.content').height();
|
||||||
|
var contentHeight = $readyForReturnContent.height();
|
||||||
|
if (containerHeight >= contentHeight && scrollReadyForReturnToken) {
|
||||||
|
window.clearTimeout(scrollReadyForReturnToken);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (containerHeight < contentHeight && scrollReadyForReturnToken == null) {
|
||||||
|
scrollReadyForReturnToken = window.setTimeout(scrollReadyForReturn, scrollSpeed);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
var scrollInProcess = function () {
|
||||||
|
$inProcessContent.find('li').last().detach().prependTo($inProcessContent).hide().slideDown('slow');
|
||||||
|
modelsInProcessIndexOffset++;
|
||||||
|
if (modelsInProcessIndexOffset >= modelsInProcessSorted.length) {
|
||||||
|
modelsInProcessIndexOffset = 0;
|
||||||
|
}
|
||||||
|
scrollInProcessToken = window.setTimeout(scrollInProcess, scrollSpeed);
|
||||||
|
};
|
||||||
|
var updateScrollInProcess = function () {
|
||||||
|
var containerHeight = $inProcess.find('.content').height();
|
||||||
|
var contentHeight = $inProcessContent.height();
|
||||||
|
if (containerHeight >= contentHeight && scrollInProcessToken) {
|
||||||
|
window.clearTimeout(scrollInProcessToken);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (containerHeight < contentHeight && scrollInProcessToken == null) {
|
||||||
|
scrollInProcessToken = window.setTimeout(scrollInProcess, scrollSpeed);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
var scrollWaitingForUserAction = function () {
|
||||||
|
$waitingForUserActionContent.find('li').last().detach().prependTo($waitingForUserActionContent).hide().slideDown('slow');
|
||||||
|
modelsInProcessIndexOffset++;
|
||||||
|
if (modelsWaitingForUserActionIndexOffset >= modelsWaitingForUserActionSorted.length) {
|
||||||
|
modelsWaitingForUserActionIndexOffset = 0;
|
||||||
|
}
|
||||||
|
scrollWaitingForUserActionToken = window.setTimeout(scrollWaitingForUserAction, scrollSpeed);
|
||||||
|
};
|
||||||
|
var updateScrollWaitingForUserAction = function () {
|
||||||
|
var containerHeight = $waitingForUserAction.find('.content').height();
|
||||||
|
var contentHeight = $waitingForUserActionContent.height();
|
||||||
|
if (containerHeight >= contentHeight && scrollWaitingForUserActionToken) {
|
||||||
|
window.clearTimeout(scrollWaitingForUserActionToken);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (containerHeight < contentHeight && scrollWaitingForUserActionToken == null) {
|
||||||
|
scrollWaitingForUserActionToken = window.setTimeout(scrollWaitingForUserAction, scrollSpeed);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
var modelInsertIndex = function (model) {
|
||||||
|
sortModels();
|
||||||
|
var findIndex = function (model, array, offset) {
|
||||||
|
for (var i = 0; i < array.length; i++) {
|
||||||
|
if (model.DeviceSerialNumber == array[i].DeviceSerialNumber) {
|
||||||
|
var index = i + offset;
|
||||||
|
if (index > (array.length - 1)) {
|
||||||
|
index = index - (array.length - 1);
|
||||||
|
}
|
||||||
|
return index;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
};
|
||||||
|
if (model.WaitingForUserAction) {
|
||||||
|
return findIndex(model, modelsWaitingForUserActionSorted, modelsWaitingForUserActionIndexOffset);
|
||||||
|
} else {
|
||||||
|
if (model.ReadyForReturn) {
|
||||||
|
return findIndex(model, modelsReadyForReturnSorted, modelsReadyForReturnIndexOffset);
|
||||||
|
} else {
|
||||||
|
return findIndex(model, modelsInProcessSorted, modelsInProcessIndexOffset);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
var modelInsert = function (model) {
|
||||||
|
var index = modelInsertIndex(model);
|
||||||
|
var insertTo = function (model, host) {
|
||||||
|
var hostLi = host.children('li');
|
||||||
|
if (hostLi.length == 0 || hostLi.length < index) {
|
||||||
|
host.append(model.htmlLi);
|
||||||
|
} else {
|
||||||
|
if (index == 0) {
|
||||||
|
host.prepend(model.htmlLi);
|
||||||
|
} else {
|
||||||
|
$(hostLi.get(index - 1)).after(model.htmlLi);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (model.WaitingForUserAction) {
|
||||||
|
insertTo(model, $waitingForUserActionContent);
|
||||||
|
window.setTimeout(updateScrollWaitingForUserAction, 100);
|
||||||
|
} else {
|
||||||
|
if (model.ReadyForReturn) {
|
||||||
|
insertTo(model, $readyForReturnContent);
|
||||||
|
window.setTimeout(updateScrollReadyForReturn, 100);
|
||||||
|
} else {
|
||||||
|
insertTo(model, $inProcessContent);
|
||||||
|
window.setTimeout(updateScrollInProcess, 100);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
var removeModel = function (model) {
|
||||||
|
if (model) {
|
||||||
|
model.htmlLi.slideUp('fast', function () {
|
||||||
|
model.htmlLi.remove();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
var processModel = function (id, model, init) {
|
||||||
|
if (!calculateFilter(model)) {
|
||||||
|
removeModel(models[id]);
|
||||||
|
delete models[id];
|
||||||
|
sortModels();
|
||||||
|
} else {
|
||||||
|
var existing = models[id];
|
||||||
|
models[id] = model;
|
||||||
|
|
||||||
|
// Add
|
||||||
|
model.htmlContent = $('<div>').text(model.DeviceDescription);
|
||||||
|
if (!model.ReadyForReturn && model.EstimatedReturnTime) {
|
||||||
|
model.htmlContent.append($('<span class="small">').text(' (Expected: ' + model.EstimatedReturnTime + ')'));
|
||||||
|
}
|
||||||
|
if (model.WaitingForUserAction) {
|
||||||
|
model.htmlContent.append($('<span class="small">').text(' (Since ' + model.WaitingForUserActionSince + ')'));
|
||||||
|
} else {
|
||||||
|
if (model.ReadyForReturn && model.ReadyForReturnSince) {
|
||||||
|
model.htmlContent.append($('<span class="small">').text(' (Ready ' + model.ReadyForReturnSince + ')'));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (existing) {
|
||||||
|
if (existing.ReadyForReturn != model.ReadyForReturn || existing.WaitingForUserAction != model.WaitingForUserAction) {
|
||||||
|
removeModel(existing);
|
||||||
|
model.htmlLi = $('<li>').html(model.htmlContent).data('ModelId', id).hide();
|
||||||
|
modelInsert(model);
|
||||||
|
if (init) {
|
||||||
|
model.htmlLi.fadeIn();
|
||||||
|
} else {
|
||||||
|
model.htmlLi.slideDown();
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
model.htmlLi = existing.htmlLi;
|
||||||
|
model.htmlLi.slideUp('fast', function () {
|
||||||
|
model.htmlLi.html(model.htmlContent).slideDown();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
model.htmlLi = $('<li>').html(model.htmlContent).data('ModelId', id).hide();
|
||||||
|
modelInsert(model);
|
||||||
|
if (init) {
|
||||||
|
model.htmlLi.fadeIn();
|
||||||
|
} else {
|
||||||
|
model.htmlLi.slideDown('slow');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (model.htmlLi && model.IsAlert) {
|
||||||
|
model.htmlLi.addClass('alert');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
var updatedModel = function (id) {
|
||||||
|
var deviceSerialNumber = id.toString();
|
||||||
|
|
||||||
|
$.ajax({
|
||||||
|
dataType: 'json',
|
||||||
|
url: '@(Url.Action(MVC.Public.HeldDevices.HeldDevice()))',
|
||||||
|
data: { id: deviceSerialNumber },
|
||||||
|
success: function (data) {
|
||||||
|
processModel(deviceSerialNumber, data, false);
|
||||||
|
},
|
||||||
|
error: function (jqXHR, textStatus, errorThrown) {
|
||||||
|
if (textStatus == 'parsererror') // null Result
|
||||||
|
processModel(deviceSerialNumber, null, false);
|
||||||
|
}
|
||||||
|
})
|
||||||
|
};
|
||||||
|
|
||||||
|
var connectionError = function () {
|
||||||
|
if (persistantConnection) {
|
||||||
|
persistantConnection.stop();
|
||||||
|
persistantConnection = null;
|
||||||
|
window.setTimeout(function () {
|
||||||
|
window.location.href = '@(Url.Action(MVC.Public.HeldDevices.Noticeboard()))';
|
||||||
|
}, 10000);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
var init = function () {
|
||||||
|
buildFilters();
|
||||||
|
persistantConnection = $.connection('@(Url.Content("~/Public/HeldDevices/Notifications"))');
|
||||||
|
persistantConnection.received(updatedModel);
|
||||||
|
persistantConnection.error(connectionError);
|
||||||
|
persistantConnection.start(function () {
|
||||||
|
$.getJSON('@(Url.Action(MVC.Public.HeldDevices.HeldDevices()))', null, function (data) {
|
||||||
|
for (var i = 0; i < data.length; i++) {
|
||||||
|
processModel(data[i].DeviceSerialNumber, data[i], true);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
};
|
||||||
|
init();
|
||||||
|
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
<div id="mainFooter">
|
||||||
|
<img style="width: 32px; height: 32px; margin-top: -5px; margin-bottom: -15px;" src="@Links.ClientSource.Style.Images.Icon32_png" alt="Disco Logo" />
|
||||||
|
powered by Disco
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@@ -0,0 +1,494 @@
|
|||||||
|
#pragma warning disable 1591
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// <auto-generated>
|
||||||
|
// This code was generated by a tool.
|
||||||
|
// Runtime Version:4.0.30319.18033
|
||||||
|
//
|
||||||
|
// Changes to this file may cause incorrect behavior and will be lost if
|
||||||
|
// the code is regenerated.
|
||||||
|
// </auto-generated>
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
namespace Disco.Web.Areas.Public.Views.HeldDevices
|
||||||
|
{
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.IO;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Net;
|
||||||
|
using System.Text;
|
||||||
|
using System.Web;
|
||||||
|
using System.Web.Helpers;
|
||||||
|
using System.Web.Mvc;
|
||||||
|
using System.Web.Mvc.Ajax;
|
||||||
|
using System.Web.Mvc.Html;
|
||||||
|
using System.Web.Routing;
|
||||||
|
using System.Web.Security;
|
||||||
|
using System.Web.UI;
|
||||||
|
using System.Web.WebPages;
|
||||||
|
using Disco.BI.Extensions;
|
||||||
|
using Disco.Models.Repository;
|
||||||
|
using Disco.Web;
|
||||||
|
using Disco.Web.Extensions;
|
||||||
|
|
||||||
|
[System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "2.0.0.0")]
|
||||||
|
[System.Web.WebPages.PageVirtualPathAttribute("~/Areas/Public/Views/HeldDevices/Noticeboard.cshtml")]
|
||||||
|
public partial class Noticeboard : System.Web.Mvc.WebViewPage<dynamic>
|
||||||
|
{
|
||||||
|
public Noticeboard()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
public override void Execute()
|
||||||
|
{
|
||||||
|
|
||||||
|
#line 1 "..\..\Areas\Public\Views\HeldDevices\Noticeboard.cshtml"
|
||||||
|
|
||||||
|
Layout = null;
|
||||||
|
Html.BundleDeferred("~/ClientScripts/Modules/jQuery-SignalR");
|
||||||
|
Html.BundleDeferred("~/ClientScripts/Core");
|
||||||
|
Html.BundleDeferred("~/Style/Public/HeldDevicesNoticeboard");
|
||||||
|
|
||||||
|
|
||||||
|
#line default
|
||||||
|
#line hidden
|
||||||
|
WriteLiteral("\r\n<!DOCTYPE html>\r\n<html>\r\n<head>\r\n <meta");
|
||||||
|
|
||||||
|
WriteLiteral(" charset=\"utf-8\"");
|
||||||
|
|
||||||
|
WriteLiteral(" />\r\n <meta");
|
||||||
|
|
||||||
|
WriteLiteral(" http-equiv=\"X-UA-Compatible\"");
|
||||||
|
|
||||||
|
WriteLiteral(" content=\"IE=edge\"");
|
||||||
|
|
||||||
|
WriteLiteral(" />\r\n <title>Disco - Held Devices</title>\r\n");
|
||||||
|
|
||||||
|
WriteLiteral(" ");
|
||||||
|
|
||||||
|
|
||||||
|
#line 13 "..\..\Areas\Public\Views\HeldDevices\Noticeboard.cshtml"
|
||||||
|
Write(Html.BundleRenderDeferred());
|
||||||
|
|
||||||
|
|
||||||
|
#line default
|
||||||
|
#line hidden
|
||||||
|
WriteLiteral("\r\n</head>\r\n<body>\r\n <div");
|
||||||
|
|
||||||
|
WriteLiteral(" id=\"page\"");
|
||||||
|
|
||||||
|
WriteLiteral(">\r\n <header");
|
||||||
|
|
||||||
|
WriteLiteral(" id=\"mainHeader\"");
|
||||||
|
|
||||||
|
WriteLiteral(">\r\n Held Devices\r\n </header>\r\n <section");
|
||||||
|
|
||||||
|
WriteLiteral(" id=\"mainSection\"");
|
||||||
|
|
||||||
|
WriteLiteral(">\r\n <div");
|
||||||
|
|
||||||
|
WriteLiteral(" id=\"inProcess\"");
|
||||||
|
|
||||||
|
WriteLiteral(" class=\"list\"");
|
||||||
|
|
||||||
|
WriteLiteral(">\r\n <h3>In Process <span");
|
||||||
|
|
||||||
|
WriteLiteral(" id=\"inProcessCount\"");
|
||||||
|
|
||||||
|
WriteLiteral("></span>\r\n </h3>\r\n <div");
|
||||||
|
|
||||||
|
WriteLiteral(" class=\"content\"");
|
||||||
|
|
||||||
|
WriteLiteral(">\r\n <ul>\r\n </ul>\r\n </div>\r\n " +
|
||||||
|
" </div>\r\n <div");
|
||||||
|
|
||||||
|
WriteLiteral(" id=\"readyForReturn\"");
|
||||||
|
|
||||||
|
WriteLiteral(" class=\"list\"");
|
||||||
|
|
||||||
|
WriteLiteral(">\r\n <h3>Ready for Return <span");
|
||||||
|
|
||||||
|
WriteLiteral(" id=\"readyForReturnCount\"");
|
||||||
|
|
||||||
|
WriteLiteral("></span>\r\n </h3>\r\n <div");
|
||||||
|
|
||||||
|
WriteLiteral(" class=\"content\"");
|
||||||
|
|
||||||
|
WriteLiteral(">\r\n <ul>\r\n </ul>\r\n </div>\r\n " +
|
||||||
|
" </div>\r\n <div");
|
||||||
|
|
||||||
|
WriteLiteral(" id=\"waitingForUserAction\"");
|
||||||
|
|
||||||
|
WriteLiteral(" class=\"list\"");
|
||||||
|
|
||||||
|
WriteLiteral(">\r\n <h3>Waiting for User Action <span");
|
||||||
|
|
||||||
|
WriteLiteral(" id=\"waitingForUserActionCount\"");
|
||||||
|
|
||||||
|
WriteLiteral("></span>\r\n </h3>\r\n <div");
|
||||||
|
|
||||||
|
WriteLiteral(" class=\"content\"");
|
||||||
|
|
||||||
|
WriteLiteral(">\r\n <ul>\r\n </ul>\r\n </div>\r\n " +
|
||||||
|
" </div>\r\n </section>\r\n <footer>\r\n </footer>\r\n " +
|
||||||
|
"</div>\r\n <script");
|
||||||
|
|
||||||
|
WriteLiteral(" type=\"text/javascript\"");
|
||||||
|
|
||||||
|
WriteLiteral(">\r\n // Resizing\r\n $(function () {\r\n var $inProcess = $(\'" +
|
||||||
|
"#inProcess\');\r\n var $inProcessContent = $inProcess.find(\'.content\');\r" +
|
||||||
|
"\n var $inProcessHeader = $inProcess.find(\'.h3\');\r\n var $re" +
|
||||||
|
"adyForReturn = $(\'#readyForReturn\');\r\n var $readyForReturnContent = $" +
|
||||||
|
"readyForReturn.find(\'.content\');\r\n var $readyForReturnHeader = $ready" +
|
||||||
|
"ForReturn.find(\'.h3\');\r\n var $waitingForUserAction = $(\'#waitingForUs" +
|
||||||
|
"erAction\');\r\n var $waitingForUserActionContent = $waitingForUserActio" +
|
||||||
|
"n.find(\'.content\');\r\n var $waitingForUserActionHeader = $waitingForUs" +
|
||||||
|
"erAction.find(\'.h3\');\r\n var $mainSection = $(\'#mainSection\');\r\n " +
|
||||||
|
" var $mainHeader = $(\'#mainHeader\');\r\n var $mainFooter = $(\'#mai" +
|
||||||
|
"nFooter\');\r\n\r\n var onResize = function () {\r\n var widt" +
|
||||||
|
"h = $mainSection.width();\r\n var height = $(window).height() - $ma" +
|
||||||
|
"inHeader.outerHeight() - $mainFooter.outerHeight() - 25;\r\n\r\n $inP" +
|
||||||
|
"rocess.height(height);\r\n $inProcess.width((width * .28) - 11);\r\n " +
|
||||||
|
" $inProcessContent.height(height - $inProcessHeader.outerHeight() " +
|
||||||
|
"- 56);\r\n\r\n $readyForReturn.height(height);\r\n $read" +
|
||||||
|
"yForReturn.width((width * .36) - 11);\r\n $readyForReturnContent.he" +
|
||||||
|
"ight(height - $readyForReturnHeader.outerHeight() - 56);\r\n\r\n $wai" +
|
||||||
|
"tingForUserAction.height(height);\r\n $waitingForUserAction.width((" +
|
||||||
|
"width * .36) - 11);\r\n $waitingForUserActionContent.height(height " +
|
||||||
|
"- $waitingForUserActionHeader.outerHeight() - 56);\r\n };\r\n\r\n " +
|
||||||
|
" $(window).resize(onResize);\r\n onResize();\r\n });\r\n </scrip" +
|
||||||
|
"t>\r\n <script");
|
||||||
|
|
||||||
|
WriteLiteral(" type=\"text/javascript\"");
|
||||||
|
|
||||||
|
WriteLiteral(@">
|
||||||
|
// Hide Mouse Mouse
|
||||||
|
$(function () {
|
||||||
|
var mouseVisible = true;
|
||||||
|
var mouseHideToken;
|
||||||
|
var documentBody = $('body');
|
||||||
|
|
||||||
|
var hideMouse = function () {
|
||||||
|
if (mouseVisible) {
|
||||||
|
documentBody.css('cursor', 'none');
|
||||||
|
mouseVisible = false;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
var showMouse = function () {
|
||||||
|
if (!mouseVisible) {
|
||||||
|
documentBody.css('cursor', 'auto');
|
||||||
|
mouseVisible = true;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
$(document).mousemove(function () {
|
||||||
|
showMouse();
|
||||||
|
if (mouseHideToken)
|
||||||
|
window.clearTimeout(mouseHideToken);
|
||||||
|
mouseHideToken = window.setTimeout(hideMouse, 2000);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
<script");
|
||||||
|
|
||||||
|
WriteLiteral(" type=\"text/javascript\"");
|
||||||
|
|
||||||
|
WriteLiteral(">\r\n $(function () {\r\n var models = {};\r\n var modelsI" +
|
||||||
|
"nProcessSorted = [];\r\n var modelsInProcessCount = 0;\r\n var" +
|
||||||
|
" modelsReadyForReturnSorted = [];\r\n var modelsReadyForReturnCount = 0" +
|
||||||
|
";\r\n var modelsWaitingForUserActionSorted = [];\r\n var model" +
|
||||||
|
"sWaitingForUserActionCount = 0;\r\n var $inProcess = $(\'#inProcess\');\r\n" +
|
||||||
|
" var $inProcessContent = $inProcess.find(\'.content ul\');\r\n " +
|
||||||
|
" var $readyForReturn = $(\'#readyForReturn\');\r\n var $readyForReturnCon" +
|
||||||
|
"tent = $readyForReturn.find(\'.content ul\');\r\n var $waitingForUserActi" +
|
||||||
|
"on = $(\'#waitingForUserAction\');\r\n var $waitingForUserActionContent =" +
|
||||||
|
" $waitingForUserAction.find(\'.content ul\');\r\n var modelsInProcessInde" +
|
||||||
|
"xOffset = 0;\r\n var scrollInProcessToken = null;\r\n var mode" +
|
||||||
|
"lsReadyForReturnIndexOffset = 0;\r\n var scrollReadyForReturnToken = nu" +
|
||||||
|
"ll;\r\n var modelsWaitingForUserActionIndexOffset = 0;\r\n var" +
|
||||||
|
" scrollWaitingForUserActionToken = null;\r\n var scrollSpeed = 3000;\r\n " +
|
||||||
|
" var persistantConnection = null;\r\n var filterDeviceAddress" +
|
||||||
|
"Include;\r\n var filterDeviceAddressExclude;\r\n var filterDev" +
|
||||||
|
"iceProfileInclude;\r\n var filterDeviceProfileExclude;\r\n\r\n v" +
|
||||||
|
"ar getParameterByName = function (name) {\r\n name = name.replace(/" +
|
||||||
|
"[\\[]/, \"\\\\\\[\").replace(/[\\]]/, \"\\\\\\]\");\r\n var regexS = \"[\\\\?&]\" +" +
|
||||||
|
" name + \"=([^&#]*)\";\r\n var regex = new RegExp(regexS);\r\n " +
|
||||||
|
" var results = regex.exec(window.location.search);\r\n if (re" +
|
||||||
|
"sults == null)\r\n return \"\";\r\n else\r\n " +
|
||||||
|
" return decodeURIComponent(results[1].replace(/\\+/g, \" \"));\r\n " +
|
||||||
|
" }\r\n\r\n var buildFilters = function () {\r\n var deviceA" +
|
||||||
|
"ddressInclude = getParameterByName(\'deviceAddressInclude\');\r\n if " +
|
||||||
|
"(deviceAddressInclude) {\r\n filterDeviceAddressInclude = {};\r\n" +
|
||||||
|
" var split = deviceAddressInclude.split(\",\");\r\n " +
|
||||||
|
" for (var i = 0; i < split.length; i++) {\r\n filterDe" +
|
||||||
|
"viceAddressInclude[split[i].toLowerCase()] = true;\r\n }\r\n " +
|
||||||
|
" } else {\r\n var deviceAddressExclude = getParameter" +
|
||||||
|
"ByName(\'deviceAddressExclude\');\r\n if (deviceAddressExclude) {" +
|
||||||
|
"\r\n filterDeviceAddressExclude = {};\r\n " +
|
||||||
|
" var split = deviceAddressExclude.split(\",\");\r\n for (v" +
|
||||||
|
"ar i = 0; i < split.length; i++) {\r\n filterDeviceAddr" +
|
||||||
|
"essExclude[split[i].toLowerCase()] = true;\r\n }\r\n " +
|
||||||
|
" } else {\r\n var deviceProfileInclude = getParam" +
|
||||||
|
"eterByName(\'deviceProfileInclude\');\r\n if (deviceProfileIn" +
|
||||||
|
"clude) {\r\n filterDeviceProfileInclude = {};\r\n " +
|
||||||
|
" var deviceProfileIncludeSplit = deviceProfileInclude.split(\"" +
|
||||||
|
",\");\r\n for (var i = 0; i < deviceProfileIncludeSplit." +
|
||||||
|
"length; i++) {\r\n filterDeviceProfileInclude[parse" +
|
||||||
|
"Int(deviceProfileIncludeSplit[i])] = true;\r\n }\r\n " +
|
||||||
|
" } else {\r\n var deviceProfileExclud" +
|
||||||
|
"e = getParameterByName(\'deviceProfileExclude\');\r\n if " +
|
||||||
|
"(deviceProfileExclude) {\r\n filterDeviceProfileExc" +
|
||||||
|
"lude = {};\r\n var deviceProfileExcludeSplit = devi" +
|
||||||
|
"ceProfileExclude.split(\",\");\r\n for (var i = 0; i " +
|
||||||
|
"< deviceProfileExcludeSplit.length; i++) {\r\n " +
|
||||||
|
"filterDeviceProfileExclude[parseInt(deviceProfileExcludeSplit[i])] = true;\r\n " +
|
||||||
|
" }\r\n }\r\n " +
|
||||||
|
" }\r\n }\r\n }\r\n }\r\n va" +
|
||||||
|
"r calculateFilter = function (model) {\r\n if (model) {\r\n " +
|
||||||
|
" if (filterDeviceAddressInclude) {\r\n return (fil" +
|
||||||
|
"terDeviceAddressInclude[model.DeviceAddress.toLowerCase()] == true)\r\n " +
|
||||||
|
" }\r\n if (filterDeviceAddressExclude) {\r\n " +
|
||||||
|
" return (!filterDeviceAddressExclude[model.DeviceAddress.toLowerCase()" +
|
||||||
|
"])\r\n }\r\n if (filterDeviceProfileInclude) {" +
|
||||||
|
"\r\n return (filterDeviceProfileInclude[model.DeviceProfile" +
|
||||||
|
"Id] == true)\r\n }\r\n if (filterDeviceProfile" +
|
||||||
|
"Exclude) {\r\n return (!filterDeviceProfileExclude[model.De" +
|
||||||
|
"viceProfileId])\r\n }\r\n return true;\r\n " +
|
||||||
|
" }\r\n return false;\r\n }\r\n\r\n var sor" +
|
||||||
|
"tModels = function () {\r\n modelsInProcessSorted = [];\r\n " +
|
||||||
|
" modelsReadyForReturnSorted = [];\r\n modelsWaitingForUserActi" +
|
||||||
|
"onSorted = [];\r\n var modelSortFunc = function (a, b) {\r\n " +
|
||||||
|
" if (a.DeviceSerialNumber.toUpperCase() == b.DeviceSerialNumber.toUppe" +
|
||||||
|
"rCase()) {\r\n return 0;\r\n } else {\r\n " +
|
||||||
|
" if (a.DeviceSerialNumber.toUpperCase() < b.DeviceSerialNumb" +
|
||||||
|
"er.toUpperCase()) {\r\n return -1\r\n " +
|
||||||
|
" } else {\r\n return 1\r\n }\r\n " +
|
||||||
|
" }\r\n };\r\n for (var key in models" +
|
||||||
|
") {\r\n var model = models[key];\r\n if (model" +
|
||||||
|
") {\r\n if (model.WaitingForUserAction) {\r\n " +
|
||||||
|
" modelsWaitingForUserActionSorted.push(model);\r\n " +
|
||||||
|
" } else {\r\n if (model.ReadyForReturn) {\r\n " +
|
||||||
|
" modelsReadyForReturnSorted.push(model);\r\n " +
|
||||||
|
" } else {\r\n modelsInProcessSorted.push(" +
|
||||||
|
"model);\r\n }\r\n }\r\n " +
|
||||||
|
" }\r\n }\r\n modelsReadyForReturnSorted = models" +
|
||||||
|
"ReadyForReturnSorted.sort(modelSortFunc);\r\n modelsInProcessSorted" +
|
||||||
|
" = modelsInProcessSorted.sort(modelSortFunc);\r\n modelsWaitingForU" +
|
||||||
|
"serActionSorted = modelsWaitingForUserActionSorted.sort(modelSortFunc);\r\n\r\n " +
|
||||||
|
" if (modelsInProcessSorted.length != modelsInProcessCount) {\r\n " +
|
||||||
|
" modelsInProcessCount = modelsInProcessSorted.length;\r\n " +
|
||||||
|
" $(\'#inProcessCount\').text(\'(\' + modelsInProcessCount + \')\');\r\n " +
|
||||||
|
" }\r\n if (modelsReadyForReturnSorted.length != modelsReadyForRe" +
|
||||||
|
"turnCount) {\r\n modelsReadyForReturnCount = modelsReadyForRetu" +
|
||||||
|
"rnSorted.length;\r\n $(\'#readyForReturnCount\').text(\'(\' + model" +
|
||||||
|
"sReadyForReturnCount + \')\');\r\n }\r\n if (modelsWaiti" +
|
||||||
|
"ngForUserActionSorted.length != modelsWaitingForUserActionCount) {\r\n " +
|
||||||
|
" modelsWaitingForUserActionCount = modelsWaitingForUserActionSorted.lengt" +
|
||||||
|
"h;\r\n $(\'#waitingForUserActionCount\').text(\'(\' + modelsWaiting" +
|
||||||
|
"ForUserActionCount + \')\');\r\n }\r\n\r\n };\r\n\r\n v" +
|
||||||
|
"ar scrollReadyForReturn = function () {\r\n $readyForReturnContent." +
|
||||||
|
"find(\'li\').last().detach().prependTo($readyForReturnContent).hide().slideDown(\'s" +
|
||||||
|
"low\');\r\n modelsReadyForReturnIndexOffset++;\r\n if (" +
|
||||||
|
"modelsReadyForReturnIndexOffset >= modelsReadyForReturnSorted.length) {\r\n " +
|
||||||
|
" modelsReadyForReturnIndexOffset = 0;\r\n }\r\n " +
|
||||||
|
" scrollReadyForReturnToken = window.setTimeout(scrollReadyForReturn, scroll" +
|
||||||
|
"Speed);\r\n };\r\n var updateScrollReadyForReturn = function (" +
|
||||||
|
") {\r\n var containerHeight = $readyForReturn.find(\'.content\').heig" +
|
||||||
|
"ht();\r\n var contentHeight = $readyForReturnContent.height();\r\n " +
|
||||||
|
" if (containerHeight >= contentHeight && scrollReadyForReturnToken) " +
|
||||||
|
"{\r\n window.clearTimeout(scrollReadyForReturnToken);\r\n " +
|
||||||
|
" return;\r\n }\r\n if (containerHeight < co" +
|
||||||
|
"ntentHeight && scrollReadyForReturnToken == null) {\r\n scrollR" +
|
||||||
|
"eadyForReturnToken = window.setTimeout(scrollReadyForReturn, scrollSpeed);\r\n " +
|
||||||
|
" }\r\n };\r\n var scrollInProcess = function () {\r\n" +
|
||||||
|
" $inProcessContent.find(\'li\').last().detach().prependTo($inProces" +
|
||||||
|
"sContent).hide().slideDown(\'slow\');\r\n modelsInProcessIndexOffset+" +
|
||||||
|
"+;\r\n if (modelsInProcessIndexOffset >= modelsInProcessSorted.leng" +
|
||||||
|
"th) {\r\n modelsInProcessIndexOffset = 0;\r\n }\r\n " +
|
||||||
|
" scrollInProcessToken = window.setTimeout(scrollInProcess, scrollS" +
|
||||||
|
"peed);\r\n };\r\n var updateScrollInProcess = function () {\r\n " +
|
||||||
|
" var containerHeight = $inProcess.find(\'.content\').height();\r\n " +
|
||||||
|
" var contentHeight = $inProcessContent.height();\r\n if " +
|
||||||
|
"(containerHeight >= contentHeight && scrollInProcessToken) {\r\n " +
|
||||||
|
" window.clearTimeout(scrollInProcessToken);\r\n return;\r\n " +
|
||||||
|
" }\r\n if (containerHeight < contentHeight && scrollInPro" +
|
||||||
|
"cessToken == null) {\r\n scrollInProcessToken = window.setTimeo" +
|
||||||
|
"ut(scrollInProcess, scrollSpeed);\r\n }\r\n };\r\n " +
|
||||||
|
" var scrollWaitingForUserAction = function () {\r\n $waitingForUse" +
|
||||||
|
"rActionContent.find(\'li\').last().detach().prependTo($waitingForUserActionContent" +
|
||||||
|
").hide().slideDown(\'slow\');\r\n modelsInProcessIndexOffset++;\r\n " +
|
||||||
|
" if (modelsWaitingForUserActionIndexOffset >= modelsWaitingForUserAct" +
|
||||||
|
"ionSorted.length) {\r\n modelsWaitingForUserActionIndexOffset =" +
|
||||||
|
" 0;\r\n }\r\n scrollWaitingForUserActionToken = window" +
|
||||||
|
".setTimeout(scrollWaitingForUserAction, scrollSpeed);\r\n };\r\n " +
|
||||||
|
" var updateScrollWaitingForUserAction = function () {\r\n var con" +
|
||||||
|
"tainerHeight = $waitingForUserAction.find(\'.content\').height();\r\n " +
|
||||||
|
" var contentHeight = $waitingForUserActionContent.height();\r\n if " +
|
||||||
|
"(containerHeight >= contentHeight && scrollWaitingForUserActionToken) {\r\n " +
|
||||||
|
" window.clearTimeout(scrollWaitingForUserActionToken);\r\n " +
|
||||||
|
" return;\r\n }\r\n if (containerHeight < conten" +
|
||||||
|
"tHeight && scrollWaitingForUserActionToken == null) {\r\n scrol" +
|
||||||
|
"lWaitingForUserActionToken = window.setTimeout(scrollWaitingForUserAction, scrol" +
|
||||||
|
"lSpeed);\r\n }\r\n };\r\n\r\n var modelInsertIndex " +
|
||||||
|
"= function (model) {\r\n sortModels();\r\n var findInd" +
|
||||||
|
"ex = function (model, array, offset) {\r\n for (var i = 0; i < " +
|
||||||
|
"array.length; i++) {\r\n if (model.DeviceSerialNumber == ar" +
|
||||||
|
"ray[i].DeviceSerialNumber) {\r\n var index = i + offset" +
|
||||||
|
";\r\n if (index > (array.length - 1)) {\r\n " +
|
||||||
|
" index = index - (array.length - 1);\r\n " +
|
||||||
|
" }\r\n return index;\r\n }\r\n " +
|
||||||
|
" };\r\n };\r\n if (model.WaitingForUser" +
|
||||||
|
"Action) {\r\n return findIndex(model, modelsWaitingForUserActio" +
|
||||||
|
"nSorted, modelsWaitingForUserActionIndexOffset);\r\n } else {\r\n " +
|
||||||
|
" if (model.ReadyForReturn) {\r\n return find" +
|
||||||
|
"Index(model, modelsReadyForReturnSorted, modelsReadyForReturnIndexOffset);\r\n " +
|
||||||
|
" } else {\r\n return findIndex(model, models" +
|
||||||
|
"InProcessSorted, modelsInProcessIndexOffset);\r\n }\r\n " +
|
||||||
|
" }\r\n }\r\n var modelInsert = function (model) {\r\n " +
|
||||||
|
" var index = modelInsertIndex(model);\r\n var insertTo = f" +
|
||||||
|
"unction (model, host) {\r\n var hostLi = host.children(\'li\');\r\n" +
|
||||||
|
" if (hostLi.length == 0 || hostLi.length < index) {\r\n " +
|
||||||
|
" host.append(model.htmlLi);\r\n } else {\r\n " +
|
||||||
|
" if (index == 0) {\r\n host.prepend(mo" +
|
||||||
|
"del.htmlLi);\r\n } else {\r\n $(ho" +
|
||||||
|
"stLi.get(index - 1)).after(model.htmlLi);\r\n }\r\n " +
|
||||||
|
" }\r\n }\r\n if (model.WaitingForUserAction) " +
|
||||||
|
"{\r\n insertTo(model, $waitingForUserActionContent);\r\n " +
|
||||||
|
" window.setTimeout(updateScrollWaitingForUserAction, 100);\r\n " +
|
||||||
|
" } else {\r\n if (model.ReadyForReturn) {\r\n " +
|
||||||
|
" insertTo(model, $readyForReturnContent);\r\n windo" +
|
||||||
|
"w.setTimeout(updateScrollReadyForReturn, 100);\r\n } else {\r\n " +
|
||||||
|
" insertTo(model, $inProcessContent);\r\n " +
|
||||||
|
" window.setTimeout(updateScrollInProcess, 100);\r\n }\r\n " +
|
||||||
|
" }\r\n }\r\n\r\n var removeModel = function (model) {\r\n" +
|
||||||
|
" if (model) {\r\n model.htmlLi.slideUp(\'fast\', f" +
|
||||||
|
"unction () {\r\n model.htmlLi.remove();\r\n " +
|
||||||
|
" });\r\n }\r\n };\r\n\r\n var processModel = funct" +
|
||||||
|
"ion (id, model, init) {\r\n if (!calculateFilter(model)) {\r\n " +
|
||||||
|
" removeModel(models[id]);\r\n delete models[id];\r\n " +
|
||||||
|
" sortModels();\r\n } else {\r\n " +
|
||||||
|
"var existing = models[id];\r\n models[id] = model;\r\n\r\n " +
|
||||||
|
" // Add\r\n model.htmlContent = $(\'<div>\').text(model" +
|
||||||
|
".DeviceDescription);\r\n if (!model.ReadyForReturn && model.Est" +
|
||||||
|
"imatedReturnTime) {\r\n model.htmlContent.append($(\'<span c" +
|
||||||
|
"lass=\"small\">\').text(\' (Expected: \' + model.EstimatedReturnTime + \')\'));\r\n " +
|
||||||
|
" }\r\n if (model.WaitingForUserAction) {\r\n " +
|
||||||
|
" model.htmlContent.append($(\'<span class=\"small\">\').text(\' (Since" +
|
||||||
|
" \' + model.WaitingForUserActionSince + \')\'));\r\n } else {\r\n " +
|
||||||
|
" if (model.ReadyForReturn && model.ReadyForReturnSince) {\r\n " +
|
||||||
|
" model.htmlContent.append($(\'<span class=\"small\">\').te" +
|
||||||
|
"xt(\' (Ready \' + model.ReadyForReturnSince + \')\'));\r\n }\r\n " +
|
||||||
|
" }\r\n\r\n if (existing) {\r\n " +
|
||||||
|
" if (existing.ReadyForReturn != model.ReadyForReturn || existing.WaitingForU" +
|
||||||
|
"serAction != model.WaitingForUserAction) {\r\n removeMo" +
|
||||||
|
"del(existing);\r\n model.htmlLi = $(\'<li>\').html(model." +
|
||||||
|
"htmlContent).data(\'ModelId\', id).hide();\r\n modelInser" +
|
||||||
|
"t(model);\r\n if (init) {\r\n " +
|
||||||
|
" model.htmlLi.fadeIn();\r\n } else {\r\n " +
|
||||||
|
" model.htmlLi.slideDown();\r\n }\r\n " +
|
||||||
|
" } else {\r\n model.htmlLi = existin" +
|
||||||
|
"g.htmlLi;\r\n model.htmlLi.slideUp(\'fast\', function () " +
|
||||||
|
"{\r\n model.htmlLi.html(model.htmlContent).slideDow" +
|
||||||
|
"n();\r\n });\r\n }\r\n " +
|
||||||
|
" } else {\r\n model.htmlLi = $(\'<li>\').html(model.html" +
|
||||||
|
"Content).data(\'ModelId\', id).hide();\r\n modelInsert(model)" +
|
||||||
|
";\r\n if (init) {\r\n model.htmlLi" +
|
||||||
|
".fadeIn();\r\n } else {\r\n model." +
|
||||||
|
"htmlLi.slideDown(\'slow\');\r\n }\r\n }\r\n " +
|
||||||
|
" if (model.htmlLi && model.IsAlert) {\r\n m" +
|
||||||
|
"odel.htmlLi.addClass(\'alert\');\r\n }\r\n }\r\n " +
|
||||||
|
" };\r\n\r\n var updatedModel = function (id) {\r\n var " +
|
||||||
|
"deviceSerialNumber = id.toString();\r\n\r\n $.ajax({\r\n " +
|
||||||
|
" dataType: \'json\',\r\n url: \'");
|
||||||
|
|
||||||
|
|
||||||
|
#line 432 "..\..\Areas\Public\Views\HeldDevices\Noticeboard.cshtml"
|
||||||
|
Write(Url.Action(MVC.Public.HeldDevices.HeldDevice()));
|
||||||
|
|
||||||
|
|
||||||
|
#line default
|
||||||
|
#line hidden
|
||||||
|
WriteLiteral(@"',
|
||||||
|
data: { id: deviceSerialNumber },
|
||||||
|
success: function (data) {
|
||||||
|
processModel(deviceSerialNumber, data, false);
|
||||||
|
},
|
||||||
|
error: function (jqXHR, textStatus, errorThrown) {
|
||||||
|
if (textStatus == 'parsererror') // null Result
|
||||||
|
processModel(deviceSerialNumber, null, false);
|
||||||
|
}
|
||||||
|
})
|
||||||
|
};
|
||||||
|
|
||||||
|
var connectionError = function () {
|
||||||
|
if (persistantConnection) {
|
||||||
|
persistantConnection.stop();
|
||||||
|
persistantConnection = null;
|
||||||
|
window.setTimeout(function () {
|
||||||
|
window.location.href = '");
|
||||||
|
|
||||||
|
|
||||||
|
#line 449 "..\..\Areas\Public\Views\HeldDevices\Noticeboard.cshtml"
|
||||||
|
Write(Url.Action(MVC.Public.HeldDevices.Noticeboard()));
|
||||||
|
|
||||||
|
|
||||||
|
#line default
|
||||||
|
#line hidden
|
||||||
|
WriteLiteral("\';\r\n }, 10000);\r\n }\r\n }\r\n\r\n " +
|
||||||
|
" var init = function () {\r\n buildFilters();\r\n " +
|
||||||
|
" persistantConnection = $.connection(\'");
|
||||||
|
|
||||||
|
|
||||||
|
#line 456 "..\..\Areas\Public\Views\HeldDevices\Noticeboard.cshtml"
|
||||||
|
Write(Url.Content("~/Public/HeldDevices/Notifications"));
|
||||||
|
|
||||||
|
|
||||||
|
#line default
|
||||||
|
#line hidden
|
||||||
|
WriteLiteral("\');\r\n persistantConnection.received(updatedModel);\r\n " +
|
||||||
|
" persistantConnection.error(connectionError);\r\n persistantConnec" +
|
||||||
|
"tion.start(function () {\r\n $.getJSON(\'");
|
||||||
|
|
||||||
|
|
||||||
|
#line 460 "..\..\Areas\Public\Views\HeldDevices\Noticeboard.cshtml"
|
||||||
|
Write(Url.Action(MVC.Public.HeldDevices.HeldDevices()));
|
||||||
|
|
||||||
|
|
||||||
|
#line default
|
||||||
|
#line hidden
|
||||||
|
WriteLiteral(@"', null, function (data) {
|
||||||
|
for (var i = 0; i < data.length; i++) {
|
||||||
|
processModel(data[i].DeviceSerialNumber, data[i], true);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
};
|
||||||
|
init();
|
||||||
|
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
<div");
|
||||||
|
|
||||||
|
WriteLiteral(" id=\"mainFooter\"");
|
||||||
|
|
||||||
|
WriteLiteral(">\r\n <img");
|
||||||
|
|
||||||
|
WriteLiteral(" style=\"width: 32px; height: 32px; margin-top: -5px; margin-bottom: -15px;\"");
|
||||||
|
|
||||||
|
WriteAttribute("src", Tuple.Create(" src=\"", 22627), Tuple.Create("\"", 22676)
|
||||||
|
|
||||||
|
#line 472 "..\..\Areas\Public\Views\HeldDevices\Noticeboard.cshtml"
|
||||||
|
, Tuple.Create(Tuple.Create("", 22633), Tuple.Create<System.Object, System.Int32>(Links.ClientSource.Style.Images.Icon32_png
|
||||||
|
|
||||||
|
#line default
|
||||||
|
#line hidden
|
||||||
|
, 22633), false)
|
||||||
|
);
|
||||||
|
|
||||||
|
WriteLiteral(" alt=\"Disco Logo\"");
|
||||||
|
|
||||||
|
WriteLiteral(" />\r\n powered by Disco\r\n </div>\r\n</body>\r\n</html>\r\n");
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#pragma warning restore 1591
|
||||||
@@ -5,8 +5,7 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<td style="width: 50%">
|
<td style="width: 50%">
|
||||||
<div class="pageMenuArea">
|
<div class="pageMenuArea">
|
||||||
<h2>
|
<h2>Technician Held Devices for Users</h2>
|
||||||
Technician Held Devices</h2>
|
|
||||||
@Html.ActionLinkClass("Report", MVC.Public.UserHeldDevices.Index(), "report")
|
@Html.ActionLinkClass("Report", MVC.Public.UserHeldDevices.Index(), "report")
|
||||||
<div class="pageMenuBlurb">
|
<div class="pageMenuBlurb">
|
||||||
Display users involved in current jobs where the user's device is held by the technicians.
|
Display users involved in current jobs where the user's device is held by the technicians.
|
||||||
@@ -23,7 +22,19 @@
|
|||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
<td style="width: 50%">
|
<td style="width: 50%">
|
||||||
|
<div class="pageMenuArea">
|
||||||
|
<h2>Technician Held Devices</h2>
|
||||||
|
@Html.ActionLinkClass("Report", MVC.Public.HeldDevices.Index(), "report")
|
||||||
|
<div class="pageMenuBlurb">
|
||||||
|
Display devices involved in current jobs where the device is held by the technicians.
|
||||||
|
Also displays devices which are ready to be collected.
|
||||||
|
</div>
|
||||||
|
@Html.ActionLinkClass("Noticeboard", MVC.Public.HeldDevices.Noticeboard(), "noticeboard")
|
||||||
|
<div class="pageMenuBlurb">
|
||||||
|
Display a full-screen active noticeboard screen which lists devices involved in current
|
||||||
|
jobs where the device is held by the technicians. Also displays devices which are ready to be collected.
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
|||||||
@@ -60,12 +60,12 @@ WriteLiteral(">\r\n <div");
|
|||||||
|
|
||||||
WriteLiteral(" class=\"pageMenuArea\"");
|
WriteLiteral(" class=\"pageMenuArea\"");
|
||||||
|
|
||||||
WriteLiteral(">\r\n <h2>\r\n Technician Held Devices</h2>\r\n");
|
WriteLiteral(">\r\n <h2>Technician Held Devices for Users</h2>\r\n");
|
||||||
|
|
||||||
WriteLiteral(" ");
|
WriteLiteral(" ");
|
||||||
|
|
||||||
|
|
||||||
#line 10 "..\..\Areas\Public\Views\Public\Index.cshtml"
|
#line 9 "..\..\Areas\Public\Views\Public\Index.cshtml"
|
||||||
Write(Html.ActionLinkClass("Report", MVC.Public.UserHeldDevices.Index(), "report"));
|
Write(Html.ActionLinkClass("Report", MVC.Public.UserHeldDevices.Index(), "report"));
|
||||||
|
|
||||||
|
|
||||||
@@ -85,7 +85,7 @@ WriteLiteral(@">
|
|||||||
WriteLiteral(" ");
|
WriteLiteral(" ");
|
||||||
|
|
||||||
|
|
||||||
#line 16 "..\..\Areas\Public\Views\Public\Index.cshtml"
|
#line 15 "..\..\Areas\Public\Views\Public\Index.cshtml"
|
||||||
Write(Html.ActionLinkClass("Noticeboard", MVC.Public.UserHeldDevices.Noticeboard(), "noticeboard"));
|
Write(Html.ActionLinkClass("Noticeboard", MVC.Public.UserHeldDevices.Noticeboard(), "noticeboard"));
|
||||||
|
|
||||||
|
|
||||||
@@ -107,7 +107,51 @@ WriteLiteral(@">
|
|||||||
|
|
||||||
WriteLiteral(" style=\"width: 50%\"");
|
WriteLiteral(" style=\"width: 50%\"");
|
||||||
|
|
||||||
WriteLiteral(">\r\n \r\n </td>\r\n </tr>\r\n</table>\r\n");
|
WriteLiteral(">\r\n <div");
|
||||||
|
|
||||||
|
WriteLiteral(" class=\"pageMenuArea\"");
|
||||||
|
|
||||||
|
WriteLiteral(">\r\n <h2>Technician Held Devices</h2>\r\n");
|
||||||
|
|
||||||
|
WriteLiteral(" ");
|
||||||
|
|
||||||
|
|
||||||
|
#line 27 "..\..\Areas\Public\Views\Public\Index.cshtml"
|
||||||
|
Write(Html.ActionLinkClass("Report", MVC.Public.HeldDevices.Index(), "report"));
|
||||||
|
|
||||||
|
|
||||||
|
#line default
|
||||||
|
#line hidden
|
||||||
|
WriteLiteral("\r\n <div");
|
||||||
|
|
||||||
|
WriteLiteral(" class=\"pageMenuBlurb\"");
|
||||||
|
|
||||||
|
WriteLiteral(">\r\n Display devices involved in current jobs where the device " +
|
||||||
|
"is held by the technicians.\r\n Also displays devices which are" +
|
||||||
|
" ready to be collected.\r\n </div>\r\n");
|
||||||
|
|
||||||
|
WriteLiteral(" ");
|
||||||
|
|
||||||
|
|
||||||
|
#line 32 "..\..\Areas\Public\Views\Public\Index.cshtml"
|
||||||
|
Write(Html.ActionLinkClass("Noticeboard", MVC.Public.HeldDevices.Noticeboard(), "noticeboard"));
|
||||||
|
|
||||||
|
|
||||||
|
#line default
|
||||||
|
#line hidden
|
||||||
|
WriteLiteral("\r\n <div");
|
||||||
|
|
||||||
|
WriteLiteral(" class=\"pageMenuBlurb\"");
|
||||||
|
|
||||||
|
WriteLiteral(@">
|
||||||
|
Display a full-screen active noticeboard screen which lists devices involved in current
|
||||||
|
jobs where the device is held by the technicians. Also displays devices which are ready to be collected.
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
");
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
@model IEnumerable<Disco.Web.Areas.Public.Models.UserHeldDevices.UserHeldDeviceModel>
|
@model IEnumerable<Disco.Web.Areas.Public.Models.UserHeldDevices.UserHeldDeviceModel>
|
||||||
@{
|
@{
|
||||||
ViewBag.Title = Html.ToBreadcrumb("Public Reports", MVC.Public.Public.Index(), "Technician Held Devices", null);
|
ViewBag.Title = Html.ToBreadcrumb("Public Reports", MVC.Public.Public.Index(), "Held Devices for Users", null);
|
||||||
Html.BundleDeferred("~/Style/Public/UserHeldDevices");
|
Html.BundleDeferred("~/Style/Public/HeldDevices");
|
||||||
}
|
}
|
||||||
<div class="clearfix page">
|
<div class="clearfix page">
|
||||||
<div class="column1">
|
<div class="column1">
|
||||||
@@ -14,10 +14,10 @@
|
|||||||
@foreach (var item in DevicesInProcess)
|
@foreach (var item in DevicesInProcess)
|
||||||
{
|
{
|
||||||
<tr>
|
<tr>
|
||||||
<td class="userId">
|
<td class="id">
|
||||||
@item.UserId
|
@item.UserId
|
||||||
</td>
|
</td>
|
||||||
<td class="userDisplayName">
|
<td class="description">
|
||||||
@item.UserDisplayName@{
|
@item.UserDisplayName@{
|
||||||
if (!string.IsNullOrEmpty(item.EstimatedReturnTime))
|
if (!string.IsNullOrEmpty(item.EstimatedReturnTime))
|
||||||
{
|
{
|
||||||
@@ -39,10 +39,10 @@
|
|||||||
@foreach (var item in WaitingForUserActionJobs)
|
@foreach (var item in WaitingForUserActionJobs)
|
||||||
{
|
{
|
||||||
<tr>
|
<tr>
|
||||||
<td class="userId">
|
<td class="id">
|
||||||
@item.UserId
|
@item.UserId
|
||||||
</td>
|
</td>
|
||||||
<td class="userDisplayName">
|
<td class="description">
|
||||||
@item.UserDisplayName
|
@item.UserDisplayName
|
||||||
</td>
|
</td>
|
||||||
<td class="timestamp@(item.IsAlert ? " Alert" : string.Empty)">
|
<td class="timestamp@(item.IsAlert ? " Alert" : string.Empty)">
|
||||||
@@ -61,10 +61,10 @@
|
|||||||
@foreach (var item in DevicesReadyForReturn)
|
@foreach (var item in DevicesReadyForReturn)
|
||||||
{
|
{
|
||||||
<tr>
|
<tr>
|
||||||
<td class="userId">
|
<td class="id">
|
||||||
@item.UserId
|
@item.UserId
|
||||||
</td>
|
</td>
|
||||||
<td class="userDisplayName">
|
<td class="description">
|
||||||
@item.UserDisplayName
|
@item.UserDisplayName
|
||||||
</td>
|
</td>
|
||||||
<td class="timestamp@(item.IsAlert ? " Alert" : string.Empty)">
|
<td class="timestamp@(item.IsAlert ? " Alert" : string.Empty)">
|
||||||
|
|||||||
@@ -43,8 +43,8 @@ namespace Disco.Web.Areas.Public.Views.UserHeldDevices
|
|||||||
|
|
||||||
#line 2 "..\..\Areas\Public\Views\UserHeldDevices\Index.cshtml"
|
#line 2 "..\..\Areas\Public\Views\UserHeldDevices\Index.cshtml"
|
||||||
|
|
||||||
ViewBag.Title = Html.ToBreadcrumb("Public Reports", MVC.Public.Public.Index(), "Technician Held Devices", null);
|
ViewBag.Title = Html.ToBreadcrumb("Public Reports", MVC.Public.Public.Index(), "Held Devices for Users", null);
|
||||||
Html.BundleDeferred("~/Style/Public/UserHeldDevices");
|
Html.BundleDeferred("~/Style/Public/HeldDevices");
|
||||||
|
|
||||||
|
|
||||||
#line default
|
#line default
|
||||||
@@ -104,7 +104,7 @@ WriteLiteral(">\r\n");
|
|||||||
#line hidden
|
#line hidden
|
||||||
WriteLiteral(" <tr>\r\n <td");
|
WriteLiteral(" <tr>\r\n <td");
|
||||||
|
|
||||||
WriteLiteral(" class=\"userId\"");
|
WriteLiteral(" class=\"id\"");
|
||||||
|
|
||||||
WriteLiteral(">\r\n");
|
WriteLiteral(">\r\n");
|
||||||
|
|
||||||
@@ -119,7 +119,7 @@ WriteLiteral(" ");
|
|||||||
#line hidden
|
#line hidden
|
||||||
WriteLiteral("\r\n </td>\r\n <td");
|
WriteLiteral("\r\n </td>\r\n <td");
|
||||||
|
|
||||||
WriteLiteral(" class=\"userDisplayName\"");
|
WriteLiteral(" class=\"description\"");
|
||||||
|
|
||||||
WriteLiteral(">\r\n");
|
WriteLiteral(">\r\n");
|
||||||
|
|
||||||
@@ -223,7 +223,7 @@ WriteLiteral(">\r\n");
|
|||||||
#line hidden
|
#line hidden
|
||||||
WriteLiteral(" <tr>\r\n <td");
|
WriteLiteral(" <tr>\r\n <td");
|
||||||
|
|
||||||
WriteLiteral(" class=\"userId\"");
|
WriteLiteral(" class=\"id\"");
|
||||||
|
|
||||||
WriteLiteral(">\r\n");
|
WriteLiteral(">\r\n");
|
||||||
|
|
||||||
@@ -238,7 +238,7 @@ WriteLiteral(" ");
|
|||||||
#line hidden
|
#line hidden
|
||||||
WriteLiteral("\r\n </td>\r\n <td");
|
WriteLiteral("\r\n </td>\r\n <td");
|
||||||
|
|
||||||
WriteLiteral(" class=\"userDisplayName\"");
|
WriteLiteral(" class=\"description\"");
|
||||||
|
|
||||||
WriteLiteral(">\r\n");
|
WriteLiteral(">\r\n");
|
||||||
|
|
||||||
@@ -253,15 +253,15 @@ WriteLiteral(" ");
|
|||||||
#line hidden
|
#line hidden
|
||||||
WriteLiteral("\r\n </td>\r\n <td");
|
WriteLiteral("\r\n </td>\r\n <td");
|
||||||
|
|
||||||
WriteAttribute("class", Tuple.Create(" class=\"", 1816), Tuple.Create("\"", 1874)
|
WriteAttribute("class", Tuple.Create(" class=\"", 1795), Tuple.Create("\"", 1853)
|
||||||
, Tuple.Create(Tuple.Create("", 1824), Tuple.Create("timestamp", 1824), true)
|
, Tuple.Create(Tuple.Create("", 1803), Tuple.Create("timestamp", 1803), true)
|
||||||
|
|
||||||
#line 48 "..\..\Areas\Public\Views\UserHeldDevices\Index.cshtml"
|
#line 48 "..\..\Areas\Public\Views\UserHeldDevices\Index.cshtml"
|
||||||
, Tuple.Create(Tuple.Create("", 1833), Tuple.Create<System.Object, System.Int32>(item.IsAlert ? " Alert" : string.Empty
|
, Tuple.Create(Tuple.Create("", 1812), Tuple.Create<System.Object, System.Int32>(item.IsAlert ? " Alert" : string.Empty
|
||||||
|
|
||||||
#line default
|
#line default
|
||||||
#line hidden
|
#line hidden
|
||||||
, 1833), false)
|
, 1812), false)
|
||||||
);
|
);
|
||||||
|
|
||||||
WriteLiteral(">\r\n Since ");
|
WriteLiteral(">\r\n Since ");
|
||||||
@@ -329,7 +329,7 @@ WriteLiteral(">\r\n");
|
|||||||
#line hidden
|
#line hidden
|
||||||
WriteLiteral(" <tr>\r\n <td");
|
WriteLiteral(" <tr>\r\n <td");
|
||||||
|
|
||||||
WriteLiteral(" class=\"userId\"");
|
WriteLiteral(" class=\"id\"");
|
||||||
|
|
||||||
WriteLiteral(">\r\n");
|
WriteLiteral(">\r\n");
|
||||||
|
|
||||||
@@ -344,7 +344,7 @@ WriteLiteral(" ");
|
|||||||
#line hidden
|
#line hidden
|
||||||
WriteLiteral("\r\n </td>\r\n <td");
|
WriteLiteral("\r\n </td>\r\n <td");
|
||||||
|
|
||||||
WriteLiteral(" class=\"userDisplayName\"");
|
WriteLiteral(" class=\"description\"");
|
||||||
|
|
||||||
WriteLiteral(">\r\n");
|
WriteLiteral(">\r\n");
|
||||||
|
|
||||||
@@ -359,15 +359,15 @@ WriteLiteral(" ");
|
|||||||
#line hidden
|
#line hidden
|
||||||
WriteLiteral("\r\n </td>\r\n <td");
|
WriteLiteral("\r\n </td>\r\n <td");
|
||||||
|
|
||||||
WriteAttribute("class", Tuple.Create(" class=\"", 2641), Tuple.Create("\"", 2699)
|
WriteAttribute("class", Tuple.Create(" class=\"", 2612), Tuple.Create("\"", 2670)
|
||||||
, Tuple.Create(Tuple.Create("", 2649), Tuple.Create("timestamp", 2649), true)
|
, Tuple.Create(Tuple.Create("", 2620), Tuple.Create("timestamp", 2620), true)
|
||||||
|
|
||||||
#line 70 "..\..\Areas\Public\Views\UserHeldDevices\Index.cshtml"
|
#line 70 "..\..\Areas\Public\Views\UserHeldDevices\Index.cshtml"
|
||||||
, Tuple.Create(Tuple.Create("", 2658), Tuple.Create<System.Object, System.Int32>(item.IsAlert ? " Alert" : string.Empty
|
, Tuple.Create(Tuple.Create("", 2629), Tuple.Create<System.Object, System.Int32>(item.IsAlert ? " Alert" : string.Empty
|
||||||
|
|
||||||
#line default
|
#line default
|
||||||
#line hidden
|
#line hidden
|
||||||
, 2658), false)
|
, 2629), false)
|
||||||
);
|
);
|
||||||
|
|
||||||
WriteLiteral(">\r\n Ready ");
|
WriteLiteral(">\r\n Ready ");
|
||||||
|
|||||||
@@ -2,20 +2,20 @@
|
|||||||
Layout = null;
|
Layout = null;
|
||||||
Html.BundleDeferred("~/ClientScripts/Modules/jQuery-SignalR");
|
Html.BundleDeferred("~/ClientScripts/Modules/jQuery-SignalR");
|
||||||
Html.BundleDeferred("~/ClientScripts/Core");
|
Html.BundleDeferred("~/ClientScripts/Core");
|
||||||
Html.BundleDeferred("~/Style/Public/UserHeldDevicesNoticeboard");
|
Html.BundleDeferred("~/Style/Public/HeldDevicesNoticeboard");
|
||||||
}
|
}
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8" />
|
<meta charset="utf-8" />
|
||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
||||||
<title>Disco - Technician Held Devices</title>
|
<title>Disco - Technician Held Devices for Users</title>
|
||||||
@Html.BundleRenderDeferred()
|
@Html.BundleRenderDeferred()
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div id="page">
|
<div id="page">
|
||||||
<header id="mainHeader">
|
<header id="mainHeader">
|
||||||
Technician Held Devices
|
Technician Held Devices for Users
|
||||||
</header>
|
</header>
|
||||||
<section id="mainSection">
|
<section id="mainSection">
|
||||||
<div id="inProcess" class="list">
|
<div id="inProcess" class="list">
|
||||||
@@ -368,33 +368,12 @@
|
|||||||
|
|
||||||
var removeModel = function (model) {
|
var removeModel = function (model) {
|
||||||
if (model) {
|
if (model) {
|
||||||
if (model.updateAtToken) {
|
|
||||||
window.clearTimeout(model.updateAtToken);
|
|
||||||
};
|
|
||||||
model.htmlLi.slideUp('fast', function () {
|
model.htmlLi.slideUp('fast', function () {
|
||||||
model.htmlLi.remove();
|
model.htmlLi.remove();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
var scheduleModelUpdate = function (model) {
|
|
||||||
if (model.updateAtToken) {
|
|
||||||
window.clearTimeout(model.updateAtToken);
|
|
||||||
};
|
|
||||||
if (model.UpdateAt) {
|
|
||||||
if (typeof model.UpdateAt == 'string' && model.UpdateAt.indexOf('\/Date(') == 0) {
|
|
||||||
model.UpdateAt = new Date(parseInt(model.UpdateAt.substr(6)));
|
|
||||||
}
|
|
||||||
var nowMilliseconds = new Date().getTime();
|
|
||||||
var updateAtMilliseconds = (model.UpdateAt - nowMilliseconds);
|
|
||||||
if (updateAtMilliseconds > 0) {
|
|
||||||
model.updateAtToken = window.setTimeout(function () { updatedModel(model.UserId); }, updateAtMilliseconds);
|
|
||||||
} else {
|
|
||||||
model.UpdateAt = null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
var processModel = function (id, model, init) {
|
var processModel = function (id, model, init) {
|
||||||
if (!calculateFilter(model)) {
|
if (!calculateFilter(model)) {
|
||||||
removeModel(models[id]);
|
removeModel(models[id]);
|
||||||
@@ -428,9 +407,6 @@
|
|||||||
model.htmlLi.slideDown();
|
model.htmlLi.slideDown();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (existing.updateAtToken) {
|
|
||||||
window.clearTimeout(existing.updateAtToken);
|
|
||||||
};
|
|
||||||
model.htmlLi = existing.htmlLi;
|
model.htmlLi = existing.htmlLi;
|
||||||
model.htmlLi.slideUp('fast', function () {
|
model.htmlLi.slideUp('fast', function () {
|
||||||
model.htmlLi.html(model.htmlContent).slideDown();
|
model.htmlLi.html(model.htmlContent).slideDown();
|
||||||
@@ -448,7 +424,6 @@
|
|||||||
if (model.htmlLi && model.IsAlert) {
|
if (model.htmlLi && model.IsAlert) {
|
||||||
model.htmlLi.addClass('alert');
|
model.htmlLi.addClass('alert');
|
||||||
}
|
}
|
||||||
scheduleModelUpdate(model);
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ namespace Disco.Web.Areas.Public.Views.UserHeldDevices
|
|||||||
Layout = null;
|
Layout = null;
|
||||||
Html.BundleDeferred("~/ClientScripts/Modules/jQuery-SignalR");
|
Html.BundleDeferred("~/ClientScripts/Modules/jQuery-SignalR");
|
||||||
Html.BundleDeferred("~/ClientScripts/Core");
|
Html.BundleDeferred("~/ClientScripts/Core");
|
||||||
Html.BundleDeferred("~/Style/Public/UserHeldDevicesNoticeboard");
|
Html.BundleDeferred("~/Style/Public/HeldDevicesNoticeboard");
|
||||||
|
|
||||||
|
|
||||||
#line default
|
#line default
|
||||||
@@ -61,7 +61,7 @@ WriteLiteral(" http-equiv=\"X-UA-Compatible\"");
|
|||||||
|
|
||||||
WriteLiteral(" content=\"IE=edge\"");
|
WriteLiteral(" content=\"IE=edge\"");
|
||||||
|
|
||||||
WriteLiteral(" />\r\n <title>Disco - Technician Held Devices</title>\r\n");
|
WriteLiteral(" />\r\n <title>Disco - Technician Held Devices for Users</title>\r\n");
|
||||||
|
|
||||||
WriteLiteral(" ");
|
WriteLiteral(" ");
|
||||||
|
|
||||||
@@ -80,7 +80,7 @@ WriteLiteral(">\r\n <header");
|
|||||||
|
|
||||||
WriteLiteral(" id=\"mainHeader\"");
|
WriteLiteral(" id=\"mainHeader\"");
|
||||||
|
|
||||||
WriteLiteral(">\r\n Technician Held Devices\r\n </header>\r\n <section");
|
WriteLiteral(">\r\n Technician Held Devices for Users\r\n </header>\r\n <section");
|
||||||
|
|
||||||
WriteLiteral(" id=\"mainSection\"");
|
WriteLiteral(" id=\"mainSection\"");
|
||||||
|
|
||||||
@@ -359,64 +359,48 @@ WriteLiteral(">\r\n $(function () {\r\n var models = {};\r\n
|
|||||||
" } else {\r\n insertTo(model, $inProcessContent);\r\n " +
|
" } else {\r\n insertTo(model, $inProcessContent);\r\n " +
|
||||||
" window.setTimeout(updateScrollInProcess, 100);\r\n " +
|
" window.setTimeout(updateScrollInProcess, 100);\r\n " +
|
||||||
" }\r\n }\r\n }\r\n\r\n var removeModel = " +
|
" }\r\n }\r\n }\r\n\r\n var removeModel = " +
|
||||||
"function (model) {\r\n if (model) {\r\n if (model." +
|
"function (model) {\r\n if (model) {\r\n model.html" +
|
||||||
"updateAtToken) {\r\n window.clearTimeout(model.updateAtToke" +
|
"Li.slideUp(\'fast\', function () {\r\n model.htmlLi.remove();" +
|
||||||
"n);\r\n };\r\n model.htmlLi.slideUp(\'fast\', fu" +
|
"\r\n });\r\n }\r\n };\r\n\r\n var " +
|
||||||
"nction () {\r\n model.htmlLi.remove();\r\n " +
|
"processModel = function (id, model, init) {\r\n if (!calculateFilte" +
|
||||||
" });\r\n }\r\n };\r\n\r\n var scheduleModelUpdate =" +
|
"r(model)) {\r\n removeModel(models[id]);\r\n d" +
|
||||||
" function (model) {\r\n if (model.updateAtToken) {\r\n " +
|
"elete models[id];\r\n sortModels();\r\n } else {\r\n" +
|
||||||
" window.clearTimeout(model.updateAtToken);\r\n };\r\n " +
|
" var existing = models[id];\r\n models[id] =" +
|
||||||
" if (model.UpdateAt) {\r\n if (typeof model.UpdateAt == \'str" +
|
" model;\r\n\r\n // Add\r\n model.htmlContent = $" +
|
||||||
"ing\' && model.UpdateAt.indexOf(\'\\/Date(\') == 0) {\r\n model" +
|
"(\'<div>\').text(model.UserId + \' - \' + model.UserDisplayName);\r\n " +
|
||||||
".UpdateAt = new Date(parseInt(model.UpdateAt.substr(6)));\r\n }" +
|
" if (!model.ReadyForReturn && model.EstimatedReturnTime) {\r\n " +
|
||||||
"\r\n var nowMilliseconds = new Date().getTime();\r\n " +
|
" model.htmlContent.append($(\'<span class=\"small\">\').text(\' (Expected: \' + m" +
|
||||||
" var updateAtMilliseconds = (model.UpdateAt - nowMilliseconds);\r\n " +
|
"odel.EstimatedReturnTime + \')\'));\r\n }\r\n if" +
|
||||||
" if (updateAtMilliseconds > 0) {\r\n model.update" +
|
" (model.WaitingForUserAction) {\r\n model.htmlContent.appen" +
|
||||||
"AtToken = window.setTimeout(function () { updatedModel(model.UserId); }, updateA" +
|
"d($(\'<span class=\"small\">\').text(\' (Since \' + model.WaitingForUserActionSince + " +
|
||||||
"tMilliseconds);\r\n } else {\r\n model.Upd" +
|
"\')\'));\r\n } else {\r\n if (model.ReadyFor" +
|
||||||
"ateAt = null;\r\n }\r\n }\r\n };\r\n\r\n " +
|
"Return && model.ReadyForReturnSince) {\r\n model.htmlCo" +
|
||||||
" var processModel = function (id, model, init) {\r\n if (!cal" +
|
"ntent.append($(\'<span class=\"small\">\').text(\' (Ready \' + model.ReadyForReturnSin" +
|
||||||
"culateFilter(model)) {\r\n removeModel(models[id]);\r\n " +
|
"ce + \')\'));\r\n }\r\n }\r\n\r\n " +
|
||||||
" delete models[id];\r\n sortModels();\r\n " +
|
" if (existing) {\r\n if (existing.ReadyForReturn != mod" +
|
||||||
" } else {\r\n var existing = models[id];\r\n m" +
|
"el.ReadyForReturn || existing.WaitingForUserAction != model.WaitingForUserAction" +
|
||||||
"odels[id] = model;\r\n\r\n // Add\r\n model.html" +
|
") {\r\n removeModel(existing);\r\n " +
|
||||||
"Content = $(\'<div>\').text(model.UserId + \' - \' + model.UserDisplayName);\r\n " +
|
" model.htmlLi = $(\'<li>\').html(model.htmlContent).data(\'ModelId\', id).hide()" +
|
||||||
" if (!model.ReadyForReturn && model.EstimatedReturnTime) {\r\n " +
|
";\r\n modelInsert(model);\r\n " +
|
||||||
" model.htmlContent.append($(\'<span class=\"small\">\').text(\' (Expe" +
|
"if (init) {\r\n model.htmlLi.fadeIn();\r\n " +
|
||||||
"cted: \' + model.EstimatedReturnTime + \')\'));\r\n }\r\n " +
|
" } else {\r\n model.htmlLi.slideDow" +
|
||||||
" if (model.WaitingForUserAction) {\r\n model.htmlCo" +
|
"n();\r\n }\r\n } else {\r\n " +
|
||||||
"ntent.append($(\'<span class=\"small\">\').text(\' (Since \' + model.WaitingForUserAct" +
|
" model.htmlLi = existing.htmlLi;\r\n " +
|
||||||
"ionSince + \')\'));\r\n } else {\r\n if (mod" +
|
"model.htmlLi.slideUp(\'fast\', function () {\r\n mode" +
|
||||||
"el.ReadyForReturn && model.ReadyForReturnSince) {\r\n m" +
|
"l.htmlLi.html(model.htmlContent).slideDown();\r\n });\r\n" +
|
||||||
"odel.htmlContent.append($(\'<span class=\"small\">\').text(\' (Ready \' + model.ReadyF" +
|
" }\r\n } else {\r\n " +
|
||||||
"orReturnSince + \')\'));\r\n }\r\n }\r\n\r\n " +
|
" model.htmlLi = $(\'<li>\').html(model.htmlContent).data(\'ModelId\', id).hide();\r\n " +
|
||||||
" if (existing) {\r\n if (existing.ReadyForRe" +
|
" modelInsert(model);\r\n if (init) {\r" +
|
||||||
"turn != model.ReadyForReturn || existing.WaitingForUserAction != model.WaitingFo" +
|
"\n model.htmlLi.fadeIn();\r\n } e" +
|
||||||
"rUserAction) {\r\n removeModel(existing);\r\n " +
|
"lse {\r\n model.htmlLi.slideDown(\'slow\');\r\n " +
|
||||||
" model.htmlLi = $(\'<li>\').html(model.htmlContent).data(\'ModelId\'," +
|
" }\r\n }\r\n if (model.htmlLi && mo" +
|
||||||
" id).hide();\r\n modelInsert(model);\r\n " +
|
"del.IsAlert) {\r\n model.htmlLi.addClass(\'alert\');\r\n " +
|
||||||
" if (init) {\r\n model.htmlLi.fadeIn();\r\n" +
|
" }\r\n }\r\n };\r\n\r\n var updatedMode" +
|
||||||
" } else {\r\n model.html" +
|
"l = function (id) {\r\n var userId = id.toString();\r\n\r\n " +
|
||||||
"Li.slideDown();\r\n }\r\n } else {" +
|
" $.ajax({\r\n dataType: \'json\',\r\n url: \'");
|
||||||
"\r\n if (existing.updateAtToken) {\r\n " +
|
|
||||||
" window.clearTimeout(existing.updateAtToken);\r\n " +
|
|
||||||
" };\r\n model.htmlLi = existing.htmlLi;\r\n " +
|
|
||||||
" model.htmlLi.slideUp(\'fast\', function () {\r\n " +
|
|
||||||
" model.htmlLi.html(model.htmlContent).slideDown();\r\n " +
|
|
||||||
" });\r\n }\r\n } else {\r\n " +
|
|
||||||
" model.htmlLi = $(\'<li>\').html(model.htmlContent).data(\'Mode" +
|
|
||||||
"lId\', id).hide();\r\n modelInsert(model);\r\n " +
|
|
||||||
" if (init) {\r\n model.htmlLi.fadeIn();\r\n " +
|
|
||||||
" } else {\r\n model.htmlLi.slideDown(\'s" +
|
|
||||||
"low\');\r\n }\r\n }\r\n if" +
|
|
||||||
" (model.htmlLi && model.IsAlert) {\r\n model.htmlLi.addClas" +
|
|
||||||
"s(\'alert\');\r\n }\r\n scheduleModelUpdate(mode" +
|
|
||||||
"l);\r\n }\r\n };\r\n\r\n var updatedModel = functio" +
|
|
||||||
"n (id) {\r\n var userId = id.toString();\r\n\r\n $.ajax(" +
|
|
||||||
"{\r\n dataType: \'json\',\r\n url: \'");
|
|
||||||
|
|
||||||
|
|
||||||
#line 460 "..\..\Areas\Public\Views\UserHeldDevices\Noticeboard.cshtml"
|
#line 435 "..\..\Areas\Public\Views\UserHeldDevices\Noticeboard.cshtml"
|
||||||
Write(Url.Action(MVC.Public.UserHeldDevices.UserHeldDevice()));
|
Write(Url.Action(MVC.Public.UserHeldDevices.UserHeldDevice()));
|
||||||
|
|
||||||
|
|
||||||
@@ -442,7 +426,7 @@ WriteLiteral(@"',
|
|||||||
window.location.href = '");
|
window.location.href = '");
|
||||||
|
|
||||||
|
|
||||||
#line 477 "..\..\Areas\Public\Views\UserHeldDevices\Noticeboard.cshtml"
|
#line 452 "..\..\Areas\Public\Views\UserHeldDevices\Noticeboard.cshtml"
|
||||||
Write(Url.Action(MVC.Public.UserHeldDevices.Noticeboard()));
|
Write(Url.Action(MVC.Public.UserHeldDevices.Noticeboard()));
|
||||||
|
|
||||||
|
|
||||||
@@ -453,7 +437,7 @@ WriteLiteral("\';\r\n }, 10000);\r\n }\r\n
|
|||||||
"rsistantConnection = $.connection(\'");
|
"rsistantConnection = $.connection(\'");
|
||||||
|
|
||||||
|
|
||||||
#line 484 "..\..\Areas\Public\Views\UserHeldDevices\Noticeboard.cshtml"
|
#line 459 "..\..\Areas\Public\Views\UserHeldDevices\Noticeboard.cshtml"
|
||||||
Write(Url.Content("~/Public/UserHeldDevices/Notifications"));
|
Write(Url.Content("~/Public/UserHeldDevices/Notifications"));
|
||||||
|
|
||||||
|
|
||||||
@@ -464,7 +448,7 @@ WriteLiteral("\');\r\n persistantConnection.received(updatedModel
|
|||||||
"tion.start(function () {\r\n $.getJSON(\'");
|
"tion.start(function () {\r\n $.getJSON(\'");
|
||||||
|
|
||||||
|
|
||||||
#line 488 "..\..\Areas\Public\Views\UserHeldDevices\Noticeboard.cshtml"
|
#line 463 "..\..\Areas\Public\Views\UserHeldDevices\Noticeboard.cshtml"
|
||||||
Write(Url.Action(MVC.Public.UserHeldDevices.UserHeldDevices()));
|
Write(Url.Action(MVC.Public.UserHeldDevices.UserHeldDevices()));
|
||||||
|
|
||||||
|
|
||||||
@@ -489,14 +473,14 @@ WriteLiteral(">\r\n <img");
|
|||||||
|
|
||||||
WriteLiteral(" style=\"width: 32px; height: 32px; margin-top: -5px; margin-bottom: -15px;\"");
|
WriteLiteral(" style=\"width: 32px; height: 32px; margin-top: -5px; margin-bottom: -15px;\"");
|
||||||
|
|
||||||
WriteAttribute("src", Tuple.Create(" src=\"", 23895), Tuple.Create("\"", 23944)
|
WriteAttribute("src", Tuple.Create(" src=\"", 22642), Tuple.Create("\"", 22691)
|
||||||
|
|
||||||
#line 500 "..\..\Areas\Public\Views\UserHeldDevices\Noticeboard.cshtml"
|
#line 475 "..\..\Areas\Public\Views\UserHeldDevices\Noticeboard.cshtml"
|
||||||
, Tuple.Create(Tuple.Create("", 23901), Tuple.Create<System.Object, System.Int32>(Links.ClientSource.Style.Images.Icon32_png
|
, Tuple.Create(Tuple.Create("", 22648), Tuple.Create<System.Object, System.Int32>(Links.ClientSource.Style.Images.Icon32_png
|
||||||
|
|
||||||
#line default
|
#line default
|
||||||
#line hidden
|
#line hidden
|
||||||
, 23901), false)
|
, 22648), false)
|
||||||
);
|
);
|
||||||
|
|
||||||
WriteLiteral(" alt=\"Disco Logo\"");
|
WriteLiteral(" alt=\"Disco Logo\"");
|
||||||
|
|||||||
+4
-4
@@ -1,4 +1,4 @@
|
|||||||
div.page div.column1 {
|
div.page div.column1 {
|
||||||
width: 44%;
|
width: 44%;
|
||||||
padding-right: 1%;
|
padding-right: 1%;
|
||||||
float: left;
|
float: left;
|
||||||
@@ -22,9 +22,9 @@ div.page table tr:nth-child(odd) {
|
|||||||
div.page table td.Alert {
|
div.page table td.Alert {
|
||||||
background-color: #FFADAD;
|
background-color: #FFADAD;
|
||||||
}
|
}
|
||||||
div.page table td.userId {
|
div.page table td.id {
|
||||||
width: 100px;
|
width: 120px;
|
||||||
}
|
}
|
||||||
div.page table td.timestamp {
|
div.page table td.timestamp {
|
||||||
width: 250px;
|
width: 200px;
|
||||||
}
|
}
|
||||||
+3
-3
@@ -23,11 +23,11 @@ div.page {
|
|||||||
td.Alert {
|
td.Alert {
|
||||||
background-color: #FFADAD;
|
background-color: #FFADAD;
|
||||||
}
|
}
|
||||||
td.userId {
|
td.id {
|
||||||
width: 100px;
|
width: 120px;
|
||||||
}
|
}
|
||||||
td.timestamp {
|
td.timestamp {
|
||||||
width: 250px;
|
width: 200px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
div.page div.column1{width:44%;padding-right:1%;float:left}div.page div.column2{border-left:1px dashed #aaa;padding-left:1%;width:53%;float:left}div.page table{table-layout:fixed}div.page table tr{border-bottom:1px dashed #8db2d8;border-top:1px dashed #8db2d8}div.page table tr:nth-child(odd){background-color:#e8eef4}div.page table td.Alert{background-color:#ffadad}div.page table td.id{width:120px}div.page table td.timestamp{width:200px}
|
||||||
+6
-3
@@ -25,7 +25,9 @@ div#page {
|
|||||||
padding: 0px;
|
padding: 0px;
|
||||||
}
|
}
|
||||||
header {
|
header {
|
||||||
font-family: "Segoe UI Light", Arial, Verdana, Tahoma, sans-serif;
|
font-family: "Segoe UI", Arial, Verdana, Tahoma, sans-serif;
|
||||||
|
font-weight: lighter;
|
||||||
|
font-stretch: condensed;
|
||||||
font-size: 2em;
|
font-size: 2em;
|
||||||
padding: 10px 20px;
|
padding: 10px 20px;
|
||||||
background-color: rgba(255, 255, 255, 0.7);
|
background-color: rgba(255, 255, 255, 0.7);
|
||||||
@@ -48,8 +50,9 @@ div#mainFooter {
|
|||||||
}
|
}
|
||||||
.list h3 {
|
.list h3 {
|
||||||
color: #000;
|
color: #000;
|
||||||
font-family: "Segoe UI Light", Arial, Verdana, Tahoma, sans-serif;
|
font-family: "Segoe UI", Arial, Verdana, Tahoma, sans-serif;
|
||||||
font-weight: normal;
|
font-weight: lighter;
|
||||||
|
font-stretch: condensed;
|
||||||
margin-left: 10px;
|
margin-left: 10px;
|
||||||
margin-bottom: 10px;
|
margin-bottom: 10px;
|
||||||
font-size: 1.4em;
|
font-size: 1.4em;
|
||||||
+4
-1
@@ -29,6 +29,8 @@ div#page {
|
|||||||
|
|
||||||
header {
|
header {
|
||||||
font-family: @FontFamilyHeading;
|
font-family: @FontFamilyHeading;
|
||||||
|
font-weight: @FontWeightHeading;
|
||||||
|
font-stretch: @FontStretchHeading;
|
||||||
font-size: 2em;
|
font-size: 2em;
|
||||||
padding: 10px 20px;
|
padding: 10px 20px;
|
||||||
background-color: rgba(255, 255, 255, 0.7);
|
background-color: rgba(255, 255, 255, 0.7);
|
||||||
@@ -53,7 +55,8 @@ div#mainFooter {
|
|||||||
h3 {
|
h3 {
|
||||||
color: #000;
|
color: #000;
|
||||||
font-family: @FontFamilyHeading;
|
font-family: @FontFamilyHeading;
|
||||||
font-weight: normal;
|
font-weight: @FontWeightHeading;
|
||||||
|
font-stretch: @FontStretchHeading;
|
||||||
margin-left: 10px;
|
margin-left: 10px;
|
||||||
margin-bottom: 10px;
|
margin-bottom: 10px;
|
||||||
font-size: 1.4em;
|
font-size: 1.4em;
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
html,body{margin:0;padding:0;height:100%;width:100%;overflow:hidden}body{background-color:#84abcb;font-size:1em;font-family:"Segoe UI",Arial,Verdana,Tahoma,sans-serif;color:#333;cursor:auto}h1,h2,h3,h4{margin:0;padding:0}div#page{margin:0;padding:0}header{font-family:"Segoe UI",Arial,Verdana,Tahoma,sans-serif;font-weight:lighter;font-stretch:condensed;font-size:2em;padding:10px 20px;background-color:rgba(255,255,255,.7);border-bottom:10px solid rgba(255,255,255,.8);height:40px;box-shadow:0 5px 20px #555}div#mainFooter{clear:both;padding:10px 20px;background-color:rgba(255,255,255,.7);text-align:right;height:20px;color:#000;font-size:.8em}.list{float:left;margin:15px 5px 10px 5px}.list h3{color:#000;font-family:"Segoe UI",Arial,Verdana,Tahoma,sans-serif;font-weight:lighter;font-stretch:condensed;margin-left:10px;margin-bottom:10px;font-size:1.4em}.list div.content{border:2px solid rgba(255,255,255,0);background:rgba(255,255,255,.3);border-radius:2px;overflow:hidden}.list div.content ul{padding:0;margin:0;list-style:none}.list div.content ul li{font-size:1em;margin:3px;background-color:#fff;border:5px solid rgba(132,171,203,.2);border-radius:2px;padding:4px 5px}.list div.content ul li .small{font-size:.75em;font-style:italic}.list div.content ul li.alert{background-color:#ffadad}
|
||||||
@@ -1 +0,0 @@
|
|||||||
div.page div.column1{width:44%;padding-right:1%;float:left}div.page div.column2{border-left:1px dashed #aaa;padding-left:1%;width:53%;float:left}div.page table{table-layout:fixed}div.page table tr{border-bottom:1px dashed #8db2d8;border-top:1px dashed #8db2d8}div.page table tr:nth-child(odd){background-color:#e8eef4}div.page table td.Alert{background-color:#ffadad}div.page table td.userId{width:100px}div.page table td.timestamp{width:250px}
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
html,body{margin:0;padding:0;height:100%;width:100%;overflow:hidden}body{background-color:#84abcb;font-size:1em;font-family:"Segoe UI",Arial,Verdana,Tahoma,sans-serif;color:#333;cursor:auto}h1,h2,h3,h4{margin:0;padding:0}div#page{margin:0;padding:0}header{font-family:"Segoe UI Light",Arial,Verdana,Tahoma,sans-serif;font-size:2em;padding:10px 20px;background-color:rgba(255,255,255,.7);border-bottom:10px solid rgba(255,255,255,.8);height:40px;box-shadow:0 5px 20px #555}div#mainFooter{clear:both;padding:10px 20px;background-color:rgba(255,255,255,.7);text-align:right;height:20px;color:#000;font-size:.8em}.list{float:left;margin:15px 5px 10px 5px}.list h3{color:#000;font-family:"Segoe UI Light",Arial,Verdana,Tahoma,sans-serif;font-weight:normal;margin-left:10px;margin-bottom:10px;font-size:1.4em}.list div.content{border:2px solid rgba(255,255,255,0);background:rgba(255,255,255,.3);border-radius:2px;overflow:hidden}.list div.content ul{padding:0;margin:0;list-style:none}.list div.content ul li{font-size:1em;margin:3px;background-color:#fff;border:5px solid rgba(132,171,203,.2);border-radius:2px;padding:4px 5px}.list div.content ul li .small{font-size:.75em;font-style:italic}.list div.content ul li.alert{background-color:#ffadad}
|
|
||||||
+34
-13
@@ -203,6 +203,19 @@
|
|||||||
<DesignTime>True</DesignTime>
|
<DesignTime>True</DesignTime>
|
||||||
<DependentUpon>Install.cshtml</DependentUpon>
|
<DependentUpon>Install.cshtml</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
<Compile Include="Areas\Public\Controllers\HeldDevicesController.cs" />
|
||||||
|
<Compile Include="Areas\Public\Models\HeldDevices\HeldDeviceModel.cs" />
|
||||||
|
<Compile Include="Areas\Public\Models\HeldDevices\HeldDeviceQueryModel.cs" />
|
||||||
|
<Compile Include="Areas\Public\Views\HeldDevices\Index.generated.cs">
|
||||||
|
<DependentUpon>Index.cshtml</DependentUpon>
|
||||||
|
<AutoGen>True</AutoGen>
|
||||||
|
<DesignTime>True</DesignTime>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Areas\Public\Views\HeldDevices\Noticeboard.generated.cs">
|
||||||
|
<DependentUpon>Noticeboard.cshtml</DependentUpon>
|
||||||
|
<AutoGen>True</AutoGen>
|
||||||
|
<DesignTime>True</DesignTime>
|
||||||
|
</Compile>
|
||||||
<Compile Include="Controllers\InitialConfigController.cs" />
|
<Compile Include="Controllers\InitialConfigController.cs" />
|
||||||
<Compile Include="Controllers\PluginWebHandlerController.cs" />
|
<Compile Include="Controllers\PluginWebHandlerController.cs" />
|
||||||
<Compile Include="Controllers\UpdateController.cs" />
|
<Compile Include="Controllers\UpdateController.cs" />
|
||||||
@@ -811,6 +824,14 @@
|
|||||||
<Generator>RazorGenerator</Generator>
|
<Generator>RazorGenerator</Generator>
|
||||||
<LastGenOutput>Install.generated.cs</LastGenOutput>
|
<LastGenOutput>Install.generated.cs</LastGenOutput>
|
||||||
</None>
|
</None>
|
||||||
|
<Content Include="Areas\Public\Views\HeldDevices\Index.cshtml">
|
||||||
|
<Generator>RazorGenerator</Generator>
|
||||||
|
<LastGenOutput>Index.generated.cs</LastGenOutput>
|
||||||
|
</Content>
|
||||||
|
<Content Include="Areas\Public\Views\HeldDevices\Noticeboard.cshtml">
|
||||||
|
<Generator>RazorGenerator</Generator>
|
||||||
|
<LastGenOutput>Noticeboard.generated.cs</LastGenOutput>
|
||||||
|
</Content>
|
||||||
<None Include="ClientSource\Scripts\Core.min.js.map">
|
<None Include="ClientSource\Scripts\Core.min.js.map">
|
||||||
<DependentUpon>Core.js.bundle</DependentUpon>
|
<DependentUpon>Core.js.bundle</DependentUpon>
|
||||||
</None>
|
</None>
|
||||||
@@ -1167,18 +1188,18 @@
|
|||||||
<None Include="ClientSource\Style\jQueryUI\images\ui-icons_ef8c08_256x240.png" />
|
<None Include="ClientSource\Style\jQueryUI\images\ui-icons_ef8c08_256x240.png" />
|
||||||
<None Include="ClientSource\Style\jQueryUI\images\ui-icons_ffd27a_256x240.png" />
|
<None Include="ClientSource\Style\jQueryUI\images\ui-icons_ffd27a_256x240.png" />
|
||||||
<None Include="ClientSource\Style\jQueryUI\images\ui-icons_ffffff_256x240.png" />
|
<None Include="ClientSource\Style\jQueryUI\images\ui-icons_ffffff_256x240.png" />
|
||||||
<None Include="ClientSource\Style\Public\UserHeldDevices.css">
|
|
||||||
<DependentUpon>UserHeldDevices.less</DependentUpon>
|
|
||||||
</None>
|
|
||||||
<None Include="ClientSource\Style\jQueryUI\images\animated-overlay.gif" />
|
<None Include="ClientSource\Style\jQueryUI\images\animated-overlay.gif" />
|
||||||
<Content Include="ClientSource\Style\Public\UserHeldDevices.min.css">
|
<Content Include="ClientSource\Style\Public\HeldDevices.css">
|
||||||
<DependentUpon>UserHeldDevices.less</DependentUpon>
|
<DependentUpon>HeldDevices.less</DependentUpon>
|
||||||
</Content>
|
</Content>
|
||||||
<None Include="ClientSource\Style\Public\UserHeldDevicesNoticeboard.css">
|
<Content Include="ClientSource\Style\Public\HeldDevices.min.css">
|
||||||
<DependentUpon>UserHeldDevicesNoticeboard.less</DependentUpon>
|
<DependentUpon>HeldDevices.less</DependentUpon>
|
||||||
</None>
|
</Content>
|
||||||
<Content Include="ClientSource\Style\Public\UserHeldDevicesNoticeboard.min.css">
|
<Content Include="ClientSource\Style\Public\HeldDevicesNoticeboard.css">
|
||||||
<DependentUpon>UserHeldDevicesNoticeboard.less</DependentUpon>
|
<DependentUpon>HeldDevicesNoticeboard.less</DependentUpon>
|
||||||
|
</Content>
|
||||||
|
<Content Include="ClientSource\Style\Public\HeldDevicesNoticeboard.min.css">
|
||||||
|
<DependentUpon>HeldDevicesNoticeboard.less</DependentUpon>
|
||||||
</Content>
|
</Content>
|
||||||
<Content Include="ClientSource\Style\Public\UserHeldDevicesXml_Sharepoint.xslt">
|
<Content Include="ClientSource\Style\Public\UserHeldDevicesXml_Sharepoint.xslt">
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
@@ -1566,8 +1587,8 @@
|
|||||||
<None Include="ClientSource\Style\Site.less" />
|
<None Include="ClientSource\Style\Site.less" />
|
||||||
<None Include="ClientSource\Style\User.less" />
|
<None Include="ClientSource\Style\User.less" />
|
||||||
<None Include="ClientSource\Style\Timeline\disco.timelineextensions.less" />
|
<None Include="ClientSource\Style\Timeline\disco.timelineextensions.less" />
|
||||||
<None Include="ClientSource\Style\Public\UserHeldDevices.less" />
|
<None Include="ClientSource\Style\Public\HeldDevices.less" />
|
||||||
<None Include="ClientSource\Style\Public\UserHeldDevicesNoticeboard.less" />
|
<None Include="ClientSource\Style\Public\HeldDevicesNoticeboard.less" />
|
||||||
<None Include="Areas\Config\Views\Config\Index.cshtml">
|
<None Include="Areas\Config\Views\Config\Index.cshtml">
|
||||||
<Generator>RazorGenerator</Generator>
|
<Generator>RazorGenerator</Generator>
|
||||||
<LastGenOutput>Index.generated.cs</LastGenOutput>
|
<LastGenOutput>Index.generated.cs</LastGenOutput>
|
||||||
@@ -1890,7 +1911,7 @@
|
|||||||
<SaveServerSettingsInUserFile>False</SaveServerSettingsInUserFile>
|
<SaveServerSettingsInUserFile>False</SaveServerSettingsInUserFile>
|
||||||
</WebProjectProperties>
|
</WebProjectProperties>
|
||||||
</FlavorProperties>
|
</FlavorProperties>
|
||||||
<UserProperties BuildVersion_UpdateFileVersion="True" BuildVersion_UpdateAssemblyVersion="True" BuildVersion_BuildVersioningStyle="None.DeltaBaseYear.MonthAndDayStamp.TimeStamp" BuildVersion_DetectChanges="False" BuildVersion_UseGlobalSettings="False" BuildVersion_BuildAction="Both" BuildVersion_StartDate="2011/7/1" />
|
<UserProperties BuildVersion_StartDate="2011/7/1" BuildVersion_BuildAction="Both" BuildVersion_UseGlobalSettings="False" BuildVersion_DetectChanges="False" BuildVersion_BuildVersioningStyle="None.DeltaBaseYear.MonthAndDayStamp.TimeStamp" BuildVersion_UpdateAssemblyVersion="True" BuildVersion_UpdateFileVersion="True" />
|
||||||
</VisualStudio>
|
</VisualStudio>
|
||||||
</ProjectExtensions>
|
</ProjectExtensions>
|
||||||
<Import Project="$(SolutionDir)\.nuget\nuget.targets" />
|
<Import Project="$(SolutionDir)\.nuget\nuget.targets" />
|
||||||
|
|||||||
@@ -31,5 +31,5 @@ using System.Runtime.InteropServices;
|
|||||||
//
|
//
|
||||||
// You can specify all the values or you can default the Revision and Build Numbers
|
// You can specify all the values or you can default the Revision and Build Numbers
|
||||||
// by using the '*' as shown below:
|
// by using the '*' as shown below:
|
||||||
[assembly: AssemblyVersion("1.2.0625.1305")]
|
[assembly: AssemblyVersion("1.2.0704.1521")]
|
||||||
[assembly: AssemblyFileVersion("1.2.0625.1305")]
|
[assembly: AssemblyFileVersion("1.2.0704.1521")]
|
||||||
+173
-6
@@ -83,6 +83,7 @@ namespace T4MVC
|
|||||||
public class PublicClass
|
public class PublicClass
|
||||||
{
|
{
|
||||||
public readonly string Name = "Public";
|
public readonly string Name = "Public";
|
||||||
|
public Disco.Web.Areas.Public.Controllers.HeldDevicesController HeldDevices = new Disco.Web.Areas.Public.Controllers.T4MVC_HeldDevicesController();
|
||||||
public Disco.Web.Areas.Public.Controllers.PublicController Public = new Disco.Web.Areas.Public.Controllers.T4MVC_PublicController();
|
public Disco.Web.Areas.Public.Controllers.PublicController Public = new Disco.Web.Areas.Public.Controllers.T4MVC_PublicController();
|
||||||
public Disco.Web.Areas.Public.Controllers.UserHeldDevicesController UserHeldDevices = new Disco.Web.Areas.Public.Controllers.T4MVC_UserHeldDevicesController();
|
public Disco.Web.Areas.Public.Controllers.UserHeldDevicesController UserHeldDevices = new Disco.Web.Areas.Public.Controllers.T4MVC_UserHeldDevicesController();
|
||||||
public T4MVC.Public.SharedController Shared = new T4MVC.Public.SharedController();
|
public T4MVC.Public.SharedController Shared = new T4MVC.Public.SharedController();
|
||||||
@@ -899,14 +900,14 @@ namespace Links
|
|||||||
private const string URLPATH = "~/ClientSource/Style/Public";
|
private const string URLPATH = "~/ClientSource/Style/Public";
|
||||||
public static string Url() { return T4MVCHelpers.ProcessVirtualPath(URLPATH); }
|
public static string Url() { return T4MVCHelpers.ProcessVirtualPath(URLPATH); }
|
||||||
public static string Url(string fileName) { return T4MVCHelpers.ProcessVirtualPath(URLPATH + "/" + fileName); }
|
public static string Url(string fileName) { return T4MVCHelpers.ProcessVirtualPath(URLPATH + "/" + fileName); }
|
||||||
public static readonly string UserHeldDevices_less = Url("UserHeldDevices.less");
|
public static readonly string HeldDevices_less = Url("HeldDevices.less");
|
||||||
public static readonly string UserHeldDevices_css = T4MVCHelpers.IsProduction() && T4Extensions.FileExists(URLPATH + "/UserHeldDevices.min.css") ? Url("UserHeldDevices.min.css") : Url("UserHeldDevices.css");
|
public static readonly string HeldDevices_css = T4MVCHelpers.IsProduction() && T4Extensions.FileExists(URLPATH + "/HeldDevices.min.css") ? Url("HeldDevices.min.css") : Url("HeldDevices.css");
|
||||||
|
|
||||||
public static readonly string UserHeldDevices_min_css = Url("UserHeldDevices.min.css");
|
public static readonly string HeldDevices_min_css = Url("HeldDevices.min.css");
|
||||||
public static readonly string UserHeldDevicesNoticeboard_less = Url("UserHeldDevicesNoticeboard.less");
|
public static readonly string HeldDevicesNoticeboard_less = Url("HeldDevicesNoticeboard.less");
|
||||||
public static readonly string UserHeldDevicesNoticeboard_css = T4MVCHelpers.IsProduction() && T4Extensions.FileExists(URLPATH + "/UserHeldDevicesNoticeboard.min.css") ? Url("UserHeldDevicesNoticeboard.min.css") : Url("UserHeldDevicesNoticeboard.css");
|
public static readonly string HeldDevicesNoticeboard_css = T4MVCHelpers.IsProduction() && T4Extensions.FileExists(URLPATH + "/HeldDevicesNoticeboard.min.css") ? Url("HeldDevicesNoticeboard.min.css") : Url("HeldDevicesNoticeboard.css");
|
||||||
|
|
||||||
public static readonly string UserHeldDevicesNoticeboard_min_css = Url("UserHeldDevicesNoticeboard.min.css");
|
public static readonly string HeldDevicesNoticeboard_min_css = Url("HeldDevicesNoticeboard.min.css");
|
||||||
public static readonly string UserHeldDevicesXml_Sharepoint_xslt = Url("UserHeldDevicesXml_Sharepoint.xslt");
|
public static readonly string UserHeldDevicesXml_Sharepoint_xslt = Url("UserHeldDevicesXml_Sharepoint.xslt");
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -9476,6 +9477,172 @@ namespace T4MVC.Config
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
namespace Disco.Web.Areas.Public.Controllers
|
||||||
|
{
|
||||||
|
public partial class HeldDevicesController
|
||||||
|
{
|
||||||
|
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||||
|
public HeldDevicesController() { }
|
||||||
|
|
||||||
|
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||||
|
protected HeldDevicesController(Dummy d) { }
|
||||||
|
|
||||||
|
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||||
|
protected RedirectToRouteResult RedirectToAction(ActionResult result)
|
||||||
|
{
|
||||||
|
var callInfo = result.GetT4MVCResult();
|
||||||
|
return RedirectToRoute(callInfo.RouteValueDictionary);
|
||||||
|
}
|
||||||
|
|
||||||
|
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||||
|
protected RedirectToRouteResult RedirectToActionPermanent(ActionResult result)
|
||||||
|
{
|
||||||
|
var callInfo = result.GetT4MVCResult();
|
||||||
|
return RedirectToRoutePermanent(callInfo.RouteValueDictionary);
|
||||||
|
}
|
||||||
|
|
||||||
|
[NonAction]
|
||||||
|
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||||
|
public virtual System.Web.Mvc.ActionResult HeldDevice()
|
||||||
|
{
|
||||||
|
return new T4MVC_System_Web_Mvc_ActionResult(Area, Name, ActionNames.HeldDevice);
|
||||||
|
}
|
||||||
|
|
||||||
|
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||||
|
public HeldDevicesController Actions { get { return MVC.Public.HeldDevices; } }
|
||||||
|
[GeneratedCode("T4MVC", "2.0")]
|
||||||
|
public readonly string Area = "Public";
|
||||||
|
[GeneratedCode("T4MVC", "2.0")]
|
||||||
|
public readonly string Name = "HeldDevices";
|
||||||
|
[GeneratedCode("T4MVC", "2.0")]
|
||||||
|
public const string NameConst = "HeldDevices";
|
||||||
|
|
||||||
|
static readonly ActionNamesClass s_actions = new ActionNamesClass();
|
||||||
|
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||||
|
public ActionNamesClass ActionNames { get { return s_actions; } }
|
||||||
|
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||||
|
public class ActionNamesClass
|
||||||
|
{
|
||||||
|
public readonly string Index = "Index";
|
||||||
|
public readonly string ReadyForReturnXml = "ReadyForReturnXml";
|
||||||
|
public readonly string WaitingForUserActionXml = "WaitingForUserActionXml";
|
||||||
|
public readonly string HeldDevicesXml = "HeldDevicesXml";
|
||||||
|
public readonly string Noticeboard = "Noticeboard";
|
||||||
|
public readonly string HeldDevice = "HeldDevice";
|
||||||
|
public readonly string HeldDevices = "HeldDevices";
|
||||||
|
}
|
||||||
|
|
||||||
|
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||||
|
public class ActionNameConstants
|
||||||
|
{
|
||||||
|
public const string Index = "Index";
|
||||||
|
public const string ReadyForReturnXml = "ReadyForReturnXml";
|
||||||
|
public const string WaitingForUserActionXml = "WaitingForUserActionXml";
|
||||||
|
public const string HeldDevicesXml = "HeldDevicesXml";
|
||||||
|
public const string Noticeboard = "Noticeboard";
|
||||||
|
public const string HeldDevice = "HeldDevice";
|
||||||
|
public const string HeldDevices = "HeldDevices";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static readonly ActionParamsClass_HeldDevice s_params_HeldDevice = new ActionParamsClass_HeldDevice();
|
||||||
|
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||||
|
public ActionParamsClass_HeldDevice HeldDeviceParams { get { return s_params_HeldDevice; } }
|
||||||
|
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||||
|
public class ActionParamsClass_HeldDevice
|
||||||
|
{
|
||||||
|
public readonly string id = "id";
|
||||||
|
}
|
||||||
|
static readonly ViewsClass s_views = new ViewsClass();
|
||||||
|
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||||
|
public ViewsClass Views { get { return s_views; } }
|
||||||
|
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||||
|
public class ViewsClass
|
||||||
|
{
|
||||||
|
static readonly _ViewNamesClass s_ViewNames = new _ViewNamesClass();
|
||||||
|
public _ViewNamesClass ViewNames { get { return s_ViewNames; } }
|
||||||
|
public class _ViewNamesClass
|
||||||
|
{
|
||||||
|
public readonly string Index = "Index";
|
||||||
|
public readonly string Noticeboard = "Noticeboard";
|
||||||
|
}
|
||||||
|
public readonly string Index = "~/Areas/Public/Views/HeldDevices/Index.cshtml";
|
||||||
|
public readonly string Noticeboard = "~/Areas/Public/Views/HeldDevices/Noticeboard.cshtml";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||||
|
public partial class T4MVC_HeldDevicesController : Disco.Web.Areas.Public.Controllers.HeldDevicesController
|
||||||
|
{
|
||||||
|
public T4MVC_HeldDevicesController() : base(Dummy.Instance) { }
|
||||||
|
|
||||||
|
partial void IndexOverride(T4MVC_System_Web_Mvc_ActionResult callInfo);
|
||||||
|
|
||||||
|
public override System.Web.Mvc.ActionResult Index()
|
||||||
|
{
|
||||||
|
var callInfo = new T4MVC_System_Web_Mvc_ActionResult(Area, Name, ActionNames.Index);
|
||||||
|
IndexOverride(callInfo);
|
||||||
|
return callInfo;
|
||||||
|
}
|
||||||
|
|
||||||
|
partial void ReadyForReturnXmlOverride(T4MVC_System_Web_Mvc_ActionResult callInfo);
|
||||||
|
|
||||||
|
public override System.Web.Mvc.ActionResult ReadyForReturnXml()
|
||||||
|
{
|
||||||
|
var callInfo = new T4MVC_System_Web_Mvc_ActionResult(Area, Name, ActionNames.ReadyForReturnXml);
|
||||||
|
ReadyForReturnXmlOverride(callInfo);
|
||||||
|
return callInfo;
|
||||||
|
}
|
||||||
|
|
||||||
|
partial void WaitingForUserActionXmlOverride(T4MVC_System_Web_Mvc_ActionResult callInfo);
|
||||||
|
|
||||||
|
public override System.Web.Mvc.ActionResult WaitingForUserActionXml()
|
||||||
|
{
|
||||||
|
var callInfo = new T4MVC_System_Web_Mvc_ActionResult(Area, Name, ActionNames.WaitingForUserActionXml);
|
||||||
|
WaitingForUserActionXmlOverride(callInfo);
|
||||||
|
return callInfo;
|
||||||
|
}
|
||||||
|
|
||||||
|
partial void HeldDevicesXmlOverride(T4MVC_System_Web_Mvc_ActionResult callInfo);
|
||||||
|
|
||||||
|
public override System.Web.Mvc.ActionResult HeldDevicesXml()
|
||||||
|
{
|
||||||
|
var callInfo = new T4MVC_System_Web_Mvc_ActionResult(Area, Name, ActionNames.HeldDevicesXml);
|
||||||
|
HeldDevicesXmlOverride(callInfo);
|
||||||
|
return callInfo;
|
||||||
|
}
|
||||||
|
|
||||||
|
partial void NoticeboardOverride(T4MVC_System_Web_Mvc_ActionResult callInfo);
|
||||||
|
|
||||||
|
public override System.Web.Mvc.ActionResult Noticeboard()
|
||||||
|
{
|
||||||
|
var callInfo = new T4MVC_System_Web_Mvc_ActionResult(Area, Name, ActionNames.Noticeboard);
|
||||||
|
NoticeboardOverride(callInfo);
|
||||||
|
return callInfo;
|
||||||
|
}
|
||||||
|
|
||||||
|
partial void HeldDeviceOverride(T4MVC_System_Web_Mvc_ActionResult callInfo, string id);
|
||||||
|
|
||||||
|
public override System.Web.Mvc.ActionResult HeldDevice(string id)
|
||||||
|
{
|
||||||
|
var callInfo = new T4MVC_System_Web_Mvc_ActionResult(Area, Name, ActionNames.HeldDevice);
|
||||||
|
ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "id", id);
|
||||||
|
HeldDeviceOverride(callInfo, id);
|
||||||
|
return callInfo;
|
||||||
|
}
|
||||||
|
|
||||||
|
partial void HeldDevicesOverride(T4MVC_System_Web_Mvc_ActionResult callInfo);
|
||||||
|
|
||||||
|
public override System.Web.Mvc.ActionResult HeldDevices()
|
||||||
|
{
|
||||||
|
var callInfo = new T4MVC_System_Web_Mvc_ActionResult(Area, Name, ActionNames.HeldDevices);
|
||||||
|
HeldDevicesOverride(callInfo);
|
||||||
|
return callInfo;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
namespace Disco.Web.Areas.Public.Controllers
|
namespace Disco.Web.Areas.Public.Controllers
|
||||||
{
|
{
|
||||||
public partial class PublicController
|
public partial class PublicController
|
||||||
|
|||||||
Reference in New Issue
Block a user