17 Commits

Author SHA1 Message Date
Gary Sharp 76318d8d00 Release v2.0.0918.1700 2014-09-18 19:11:21 +10:00
Gary Sharp f2ac35a7fa Bug Fix #75: Display errors creating device batch
Thanks Patrick Connell
2014-09-15 13:24:28 +10:00
Gary Sharp b1575fa321 Unified SignalR disconnected/error dialogs
Dialogs (with a refresh option) appear whenever the SignalR client
disconnects or encounters an error. Nonsensical error messages replaced.
Page refresh technique changed to allow for urls containing fragment
hashes.
2014-09-11 17:21:39 +10:00
Gary Sharp 4283b62803 Bug Fix: Job searching with username
When searching jobs, the default domain is now assumed if none is
provided when checking for job users.
2014-09-11 16:48:45 +10:00
Gary Sharp 7551b39b8e Generated Job Log to Markdown
Generated job logs are formatted with Markdown. Includes other minor css
changes.
2014-09-09 13:54:14 +10:00
Gary Sharp 3ae99f45bb Update device model type on Enrolment 2014-09-08 14:53:10 +10:00
Gary Sharp c846fa053a Dialog height reduced & remove js minify maps
Provide better support for lower resolution devices (buttons became
hidden in tall dialogs). Remove references to JavaScript minification
source maps which aren't deployed and caused confusion.
2014-09-08 14:51:51 +10:00
Gary Sharp 57c2e062fc Update: Plugin provided assemblies
Update assemblies which are available to all plugins.
2014-09-02 14:45:44 +10:00
Gary Sharp e940c24522 Bug Fix: Document template bulk examples 2014-09-02 14:45:02 +10:00
Gary Sharp 73d6160db6 Fix typo: AvilableDomainControllers
AvilableDomainControllers -> AvailableDomainControllers
Thanks Boris Pekez
2014-08-29 14:46:29 +10:00
Gary Sharp 13c5efe5d6 Added new UI Icons in FontAwesome 4.2.0 2014-08-28 15:32:57 +10:00
Gary Sharp bbe4cccc91 Update #74: Friendly disconnected messages
When the live connection to the server is interrupted some ui elements
are disabled. If the connection fails (due to errors or failed
reconnection) a dialog instructs the user to check their connection and
refresh the browser. Relates to Device, Job and User pages (logs and
attachments).
2014-08-28 14:59:39 +10:00
Gary Sharp 41e061df54 Update: Font Awesome 4.2.0 2014-08-28 13:53:35 +10:00
Gary Sharp 35a07344cc Bug Fix #71: Update managed groups on device enrol 2014-08-28 12:50:53 +10:00
Gary Sharp 4b6604df5b Feature #69 #72: Noticeboard themes and filtering 2014-08-26 16:27:37 +10:00
Gary Sharp 0de162fce3 Update: Update Job Identifiers 2014-08-19 10:53:59 +10:00
Gary Sharp f26474fa4d Device decommissioning 'returned' reason 2014-08-07 13:43:59 +10:00
172 changed files with 5348 additions and 2540 deletions
+5
View File
@@ -52,6 +52,11 @@ namespace Disco.BI
} }
} }
} }
else
{
if (deviceModel.ModelType != ModelType)
deviceModel.ModelType = ModelType;
}
return new Tuple<DeviceModel,bool>(deviceModel, false); return new Tuple<DeviceModel,bool>(deviceModel, false);
} }
@@ -157,8 +157,8 @@ namespace Disco.BI.Extensions
JobId = j.Id, JobId = j.Id,
TechUserId = UserService.CurrentUser.UserId, TechUserId = UserService.CurrentUser.UserId,
Timestamp = DateTime.Now, Timestamp = DateTime.Now,
Comments = string.Format("Device Deleted{0}{0}Serial Number: {1}{0}Computer Name: {2}{0}Model: {3}{0}Profile: {4}", Comments = string.Format("# Device Deleted\r\n\r\nSerial Number: **{0}**\r\nComputer Name: **{1}**\r\nModel: **{2}**\r\nProfile: **{3}**",
Environment.NewLine, d.SerialNumber, d.DeviceDomainId, d.DeviceModel, d.DeviceProfile) d.SerialNumber, d.DeviceDomainId, d.DeviceModel, d.DeviceProfile)
}; };
Database.JobLogs.Add(jobLog); Database.JobLogs.Add(jobLog);
} }
@@ -213,6 +213,8 @@ namespace Disco.BI.Extensions
return "Damaged"; return "Damaged";
case DecommissionReasons.Donated: case DecommissionReasons.Donated:
return "Donated"; return "Donated";
case DecommissionReasons.Returned:
return "Returned";
default: default:
return "Unknown"; return "Unknown";
} }
@@ -113,7 +113,7 @@ namespace Disco.BI.Extensions
JobId = j.Id, JobId = j.Id,
TechUserId = Technician.UserId, TechUserId = Technician.UserId,
Timestamp = DateTime.Now, Timestamp = DateTime.Now,
Comments = string.Format("Waiting on User Action{0}Reason: {1}", Environment.NewLine, Reason) Comments = string.Format("# Waiting on User Action\r\n{0}", string.IsNullOrWhiteSpace(Reason) ? "<no reason provided>" : Reason)
}; };
Database.JobLogs.Add(jobLog); Database.JobLogs.Add(jobLog);
} }
@@ -140,7 +140,7 @@ namespace Disco.BI.Extensions
JobId = j.Id, JobId = j.Id,
TechUserId = Technician.UserId, TechUserId = Technician.UserId,
Timestamp = DateTime.Now, Timestamp = DateTime.Now,
Comments = string.Format("User Action Resolved{0}Resolution: {1}", Environment.NewLine, Resolution) Comments = string.Format("# User Action Resolved\r\n{0}", string.IsNullOrWhiteSpace(Resolution) ? "<no comment provided>" : Resolution)
}; };
Database.JobLogs.Add(jobLog); Database.JobLogs.Add(jobLog);
} }
@@ -210,7 +210,7 @@ namespace Disco.BI.Extensions
JobId = j.Id, JobId = j.Id,
TechUserId = TechUser.UserId, TechUserId = TechUser.UserId,
Timestamp = DateTime.Now, Timestamp = DateTime.Now,
Comments = string.Format("####Warranty Claim Submitted\r\nProvider: **{0}**\r\nAddress: **{1}**\r\nReference: **{2}**\r\n___\r\n{3}", WarrantyProvider.Manifest.Name, Address.Name, providerRef, FaultDescription) Comments = string.Format("# Warranty Claim Submitted\r\nProvider: **{0}**\r\nAddress: **{1}**\r\nReference: **{2}**\r\n___\r\n```{3}```", WarrantyProvider.Manifest.Name, Address.Name, providerRef, FaultDescription)
}; };
Database.JobLogs.Add(jobLog); Database.JobLogs.Add(jobLog);
@@ -243,7 +243,7 @@ namespace Disco.BI.Extensions
JobId = j.Id, JobId = j.Id,
TechUserId = TechUser.UserId, TechUserId = TechUser.UserId,
Timestamp = DateTime.Now, Timestamp = DateTime.Now,
Comments = string.Format("####Manual Warranty Claim Submitted\r\nProvider: **{0}**\r\nAddress: **{1}**\r\nReference: **{2}**\r\n___\r\n{3}", ManualProviderName, Address.Name, ManualProviderReference ?? "<None>", FaultDescription) Comments = string.Format("# Manual Warranty Claim Submitted\r\nProvider: **{0}**\r\nAddress: **{1}**\r\nReference: **{2}**\r\n___\r\n```{3}```", ManualProviderName, Address.Name, ManualProviderReference ?? "<none>", FaultDescription)
}; };
Database.JobLogs.Add(jobLog); Database.JobLogs.Add(jobLog);
} }
@@ -322,7 +322,7 @@ namespace Disco.BI.Extensions
JobId = j.Id, JobId = j.Id,
TechUserId = techUser.UserId, TechUserId = techUser.UserId,
Timestamp = DateTime.Now, Timestamp = DateTime.Now,
Comments = string.Format("Job Type Converted{0}From: {1}{0}To: {2}", Environment.NewLine, Database.JobTypes.Find(JobType.JobTypeIds.HWar), Database.JobTypes.Find(JobType.JobTypeIds.HNWar)) Comments = string.Format("# Job Type Converted\r\nFrom: **{0}**\r\nTo: **{1}**", Database.JobTypes.Find(JobType.JobTypeIds.HWar), Database.JobTypes.Find(JobType.JobTypeIds.HNWar))
}; };
Database.JobLogs.Add(jobLog); Database.JobLogs.Add(jobLog);
@@ -432,7 +432,7 @@ namespace Disco.BI.Extensions
JobId = j.Id, JobId = j.Id,
TechUserId = TechUser.UserId, TechUserId = TechUser.UserId,
Timestamp = DateTime.Now, Timestamp = DateTime.Now,
Comments = string.Format("####Repair Request Submitted\r\nProvider: **{0}**\r\nAddress: **{1}**\r\nReference: **{2}**\r\n___\r\n{3}", RepairProvider.Manifest.Name, Address.Name, providerRef, RepairDescription) Comments = string.Format("# Repair Request Submitted\r\nProvider: **{0}**\r\nAddress: **{1}**\r\nReference: **{2}**\r\n___\r\n```{3}```", RepairProvider.Manifest.Name, Address.Name, providerRef, RepairDescription)
}; };
Database.JobLogs.Add(jobLog); Database.JobLogs.Add(jobLog);
@@ -465,7 +465,7 @@ namespace Disco.BI.Extensions
JobId = j.Id, JobId = j.Id,
TechUserId = TechUser.UserId, TechUserId = TechUser.UserId,
Timestamp = DateTime.Now, Timestamp = DateTime.Now,
Comments = string.Format("####Manual Repair Request Submitted\r\nProvider: **{0}**\r\nAddress: **{1}**\r\nReference: **{2}**\r\n___\r\n{3}", ManualProviderName, Address.Name, ManualProviderReference ?? "<None>", FaultDescription) Comments = string.Format("# Manual Repair Request Submitted\r\nProvider: **{0}**\r\nAddress: **{1}**\r\nReference: **{2}**\r\n___\r\n```{3}```", ManualProviderName, Address.Name, ManualProviderReference ?? "<none>", FaultDescription)
}; };
Database.JobLogs.Add(jobLog); Database.JobLogs.Add(jobLog);
} }
@@ -639,7 +639,7 @@ namespace Disco.BI.Extensions
JobId = j.Id, JobId = j.Id,
TechUserId = Technician.UserId, TechUserId = Technician.UserId,
Timestamp = DateTime.Now, Timestamp = DateTime.Now,
Comments = string.Format("Job Forcibly Closed{0}Reason: {1}", Environment.NewLine, Reason) Comments = string.Format("# Job Forcibly Closed\r\n{0}", string.IsNullOrWhiteSpace(Reason) ? "<no reason provided>" : Reason)
}; };
Database.JobLogs.Add(jobLog); Database.JobLogs.Add(jobLog);
+5 -5
View File
@@ -132,18 +132,18 @@ namespace Disco.BI.Extensions
if (addedSubTypes.Count > 0 || removedSubTypes.Count > 0) if (addedSubTypes.Count > 0 || removedSubTypes.Count > 0)
{ {
StringBuilder logBuilder = new StringBuilder(); StringBuilder logBuilder = new StringBuilder();
logBuilder.AppendLine("Updated Job Sub Types"); logBuilder.AppendLine("# Updated Job Sub Types");
if (removedSubTypes.Count > 0) if (removedSubTypes.Count > 0)
{ {
logBuilder.AppendLine("Removed:"); logBuilder.AppendLine().AppendLine("Removed:");
foreach (var t in removedSubTypes) foreach (var t in removedSubTypes)
logBuilder.Append("- ").AppendLine(t.ToString()); logBuilder.Append("- **").Append(t.ToString()).AppendLine("**");
} }
if (addedSubTypes.Count > 0) if (addedSubTypes.Count > 0)
{ {
logBuilder.AppendLine("Added:"); logBuilder.AppendLine().AppendLine("Added:");
foreach (var t in addedSubTypes) foreach (var t in addedSubTypes)
logBuilder.Append("- ").AppendLine(t.ToString()); logBuilder.Append("- **").Append(t.ToString()).AppendLine("**");
} }
Database.JobLogs.Add(new JobLog() Database.JobLogs.Add(new JobLog()
{ {
+1 -1
View File
@@ -242,7 +242,7 @@ namespace Disco.BI.Interop.Pdf
TechUserId = CreatorUser.UserId, TechUserId = CreatorUser.UserId,
Timestamp = DateTime.Now Timestamp = DateTime.Now
}; };
jl.Comments = string.Format("Document Generated{0}{1} [{2}]", Environment.NewLine, dt.Description, dt.Id); jl.Comments = string.Format("# Document Generated\r\n**{0}** [{1}]", dt.Description, dt.Id);
Database.JobLogs.Add(jl); Database.JobLogs.Add(jl);
} }
+2 -2
View File
@@ -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("2.0.0731.1600")] [assembly: AssemblyVersion("2.0.0918.1700")]
[assembly: AssemblyFileVersion("2.0.0731.1600")] [assembly: AssemblyFileVersion("2.0.0918.1700")]
+2 -2
View File
@@ -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("2.0.0731.1600")] [assembly: AssemblyVersion("2.0.0918.1700")]
[assembly: AssemblyFileVersion("2.0.0731.1600")] [assembly: AssemblyFileVersion("2.0.0918.1700")]
@@ -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("2.0.0731.1600")] [assembly: AssemblyVersion("2.0.0918.1700")]
[assembly: AssemblyFileVersion("2.0.0731.1600")] [assembly: AssemblyFileVersion("2.0.0918.1700")]
@@ -41,6 +41,22 @@ namespace Disco.Data.Configuration.Modules
} }
} }
/// <summary>
/// Theme used in noticeboards by default.
/// <see cref="Disco.Services.Extensions.UIHelpers.NoticeboardThemes"/>
/// </summary>
public string DefaultNoticeboardTheme
{
get { return Get("default"); }
set
{
if (string.IsNullOrWhiteSpace(value))
throw new ArgumentNullException("DefaultNoticeboardTheme");
Set(value);
}
}
public LocationModes LocationMode public LocationModes LocationMode
{ {
get { return Get<LocationModes>(LocationModes.Unrestricted); } get { return Get<LocationModes>(LocationModes.Unrestricted); }
+2 -2
View File
@@ -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("2.0.0731.1600")] [assembly: AssemblyVersion("2.0.0918.1700")]
[assembly: AssemblyFileVersion("2.0.0731.1600")] [assembly: AssemblyFileVersion("2.0.0918.1700")]
+5 -1
View File
@@ -34,6 +34,9 @@
<Prefer32Bit>false</Prefer32Bit> <Prefer32Bit>false</Prefer32Bit>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<Reference Include="Newtonsoft.Json">
<HintPath>..\packages\Newtonsoft.Json.6.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="System" /> <Reference Include="System" />
<Reference Include="System.ComponentModel.DataAnnotations" /> <Reference Include="System.ComponentModel.DataAnnotations" />
<Reference Include="System.Core" /> <Reference Include="System.Core" />
@@ -176,12 +179,13 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<None Include="App.config" /> <None Include="App.config" />
<None Include="packages.config" />
</ItemGroup> </ItemGroup>
<ItemGroup /> <ItemGroup />
<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_StartDate="2014/6/1" BuildVersion_DetectChanges="False" BuildVersion_UseGlobalSettings="False" BuildVersion_BuildAction="Both" /> <UserProperties BuildVersion_BuildAction="Both" BuildVersion_UseGlobalSettings="False" BuildVersion_DetectChanges="False" BuildVersion_StartDate="2014/6/1" BuildVersion_BuildVersioningStyle="None.DeltaBaseYear.MonthAndDayStamp.TimeStamp" BuildVersion_UpdateAssemblyVersion="True" BuildVersion_UpdateFileVersion="True" />
</VisualStudio> </VisualStudio>
</ProjectExtensions> </ProjectExtensions>
<PropertyGroup> <PropertyGroup>
+2 -2
View File
@@ -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("2.0.0731.1600")] [assembly: AssemblyVersion("2.0.0918.1700")]
[assembly: AssemblyFileVersion("2.0.0731.1600")] [assembly: AssemblyFileVersion("2.0.0918.1700")]
@@ -1,9 +1,4 @@
using System; 
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Disco.Models.Repository namespace Disco.Models.Repository
{ {
public enum DecommissionReasons public enum DecommissionReasons
@@ -13,6 +8,7 @@ namespace Disco.Models.Repository
Stolen = 20, Stolen = 20,
Lost = 30, Lost = 30,
Damaged = 40, Damaged = 40,
Donated = 50 Donated = 50,
Returned = 60
} }
} }
@@ -1,4 +1,5 @@
using System; using Newtonsoft.Json;
using System;
using System.Collections.Generic; using System.Collections.Generic;
namespace Disco.Models.Services.Interop.DiscoServices namespace Disco.Models.Services.Interop.DiscoServices
@@ -21,18 +22,31 @@ namespace Disco.Models.Services.Interop.DiscoServices
public List<StatisticString> InstalledPlugins { get; set; } public List<StatisticString> InstalledPlugins { get; set; }
public List<StatisticIntPair> Stat_JobIdentifiers { get; set; }
public List<StatisticJob> Stat_Jobs { get; set; } public List<StatisticJob> Stat_Jobs { get; set; }
public class StatisticIntPair
{
[JsonProperty("B")]
public int Begin;
[JsonProperty("E")]
public int End;
}
public class StatisticInt public class StatisticInt
{ {
public string K; [JsonProperty("K")]
public int V; public string Key;
[JsonProperty("V")]
public int Value;
} }
public class StatisticString public class StatisticString
{ {
public string K; [JsonProperty("K")]
public string V; public string Key;
[JsonProperty("V")]
public string Value;
} }
public class StatisticJob public class StatisticJob
@@ -40,62 +54,74 @@ namespace Disco.Models.Services.Interop.DiscoServices
/// <summary> /// <summary>
/// Job Identifier /// Job Identifier
/// </summary> /// </summary>
public int I { get; set; } [JsonProperty("I")]
public int Identifier { get; set; }
/// <summary> /// <summary>
/// Opened Date /// Opened Date
/// </summary> /// </summary>
public DateTime OD { get; set; } [JsonProperty("OD")]
public DateTime OpenedDate { get; set; }
/// <summary> /// <summary>
/// Closed Date /// Closed Date
/// </summary> /// </summary>
public DateTime? CD { get; set; } [JsonProperty("CD", NullValueHandling = NullValueHandling.Ignore)]
public DateTime? ClosedDate { get; set; }
/// <summary> /// <summary>
/// Job Type /// Job Type
/// </summary> /// </summary>
public string T { get; set; } [JsonProperty("T")]
public string Type { get; set; }
/// <summary> /// <summary>
/// Job Sub Types (Semicolon Separated) /// Job Sub Types (Semicolon Separated)
/// </summary> /// </summary>
public string ST { get; set; } [JsonProperty("ST")]
public string SubTypes { get; set; }
/// <summary> /// <summary>
/// Deployment-Unique Device Serial Identifier (Device Serial Number anonymized via hashing salted with Deployment Secret) /// Deployment-Unique Device Serial Identifier (Device Serial Number anonymized via hashing salted with Deployment Secret)
/// </summary> /// </summary>
public string D { get; set; } [JsonProperty("D", NullValueHandling = NullValueHandling.Ignore)]
public string DeviceIdentifier { get; set; }
/// <summary> /// <summary>
/// Deployment-Unique Job User Identifier (Job User Id anonymized via hashing salted with Deployment Secret) /// Deployment-Unique Job User Identifier (Job User Id anonymized via hashing salted with Deployment Secret)
/// </summary> /// </summary>
public string U { get; set; } [JsonProperty("U", NullValueHandling = NullValueHandling.Ignore)]
public string UserIdentifier { get; set; }
/// <summary> /// <summary>
/// Deployment-Unique Job Technician Identifier (Job Technician Id anonymized via hashing salted with Deployment Secret) /// Deployment-Unique Job Technician Identifier (Job Technician Id anonymized via hashing salted with Deployment Secret)
/// </summary> /// </summary>
public string TI { get; set; } [JsonProperty("TI")]
public string TechnicianIdentifier { get; set; }
/// <summary> /// <summary>
/// Device Model /// Device Model
/// </summary> /// </summary>
public string DM { get; set; } [JsonProperty("DM", NullValueHandling = NullValueHandling.Ignore)]
public string DeviceModel { get; set; }
/// <summary> /// <summary>
/// External Repairer /// External Repairer
/// </summary> /// </summary>
public string R { get; set; } [JsonProperty("R", NullValueHandling = NullValueHandling.Ignore)]
public string Repairer { get; set; }
/// <summary> /// <summary>
/// External Repairer Logged /// External Repairer Logged
/// </summary> /// </summary>
public DateTime? RL { get; set; } [JsonProperty("RL", NullValueHandling = NullValueHandling.Ignore)]
public DateTime? RepairerLogged { get; set; }
/// <summary> /// <summary>
/// External Repairer Completed /// External Repairer Completed
/// </summary> /// </summary>
public DateTime? RC { get; set; } [JsonProperty("RC", NullValueHandling = NullValueHandling.Ignore)]
public DateTime? RepairerCompleted { get; set; }
} }
} }
} }
+4
View File
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Newtonsoft.Json" version="6.0.3" targetFramework="net45" />
</packages>
@@ -36,7 +36,7 @@ namespace Disco.Services.Devices.ManagedGroups
(e.EventType == RepositoryMonitorEventType.Added && (e.EventType == RepositoryMonitorEventType.Added &&
ActiveDirectory.IsValidDomainAccountId(((Device)e.Entity).DeviceDomainId)) || ActiveDirectory.IsValidDomainAccountId(((Device)e.Entity).DeviceDomainId)) ||
(e.EventType == RepositoryMonitorEventType.Modified && (e.EventType == RepositoryMonitorEventType.Modified &&
(e.ModifiedProperties.Contains("DeviceBatchId") || e.ModifiedProperties.Contains("DeviceDomainId"))) || (e.ModifiedProperties.Contains("DeviceBatchId") || e.ModifiedProperties.Contains("DeviceDomainId") || e.ModifiedProperties.Contains("LastEnrolDate"))) ||
(e.EventType == RepositoryMonitorEventType.Deleted) (e.EventType == RepositoryMonitorEventType.Deleted)
) )
)); ));
@@ -37,7 +37,7 @@ namespace Disco.Services.Devices.ManagedGroups
(e.EventType == RepositoryMonitorEventType.Added && (e.EventType == RepositoryMonitorEventType.Added &&
ActiveDirectory.IsValidDomainAccountId(((Device)e.Entity).DeviceDomainId)) || ActiveDirectory.IsValidDomainAccountId(((Device)e.Entity).DeviceDomainId)) ||
(e.EventType == RepositoryMonitorEventType.Modified && (e.EventType == RepositoryMonitorEventType.Modified &&
(e.ModifiedProperties.Contains("DeviceProfileId") || e.ModifiedProperties.Contains("DeviceDomainId"))) || (e.ModifiedProperties.Contains("DeviceProfileId") || e.ModifiedProperties.Contains("DeviceDomainId") || e.ModifiedProperties.Contains("LastEnrolDate"))) ||
(e.EventType == RepositoryMonitorEventType.Deleted) (e.EventType == RepositoryMonitorEventType.Deleted)
) )
)); ));
+38 -2
View File
@@ -17,6 +17,10 @@ namespace Disco.Services.Extensions
/// User-selectable Colour Themes /// User-selectable Colour Themes
/// </summary> /// </summary>
public static ReadOnlyCollection<KeyValuePair<string, string>> ThemeColours { get; private set; } public static ReadOnlyCollection<KeyValuePair<string, string>> ThemeColours { get; private set; }
/// <summary>
/// Noticeboard Colour Themes
/// </summary>
public static ReadOnlyCollection<KeyValuePair<string, string>> NoticeboardThemes { get; private set; }
/// <summary> /// <summary>
/// Returns a randomly selected Icon using <see cref="System.Random"/>. /// Returns a randomly selected Icon using <see cref="System.Random"/>.
@@ -73,6 +77,7 @@ namespace Disco.Services.Extensions
new KeyValuePair<string, string>("android" , "Android"), new KeyValuePair<string, string>("android" , "Android"),
new KeyValuePair<string, string>("apple" , "Apple"), new KeyValuePair<string, string>("apple" , "Apple"),
new KeyValuePair<string, string>("archive" , "Archive"), new KeyValuePair<string, string>("archive" , "Archive"),
new KeyValuePair<string, string>("area-chart" , "Area Chart"),
new KeyValuePair<string, string>("arrow-circle-down" , "Arrow Circle Down"), new KeyValuePair<string, string>("arrow-circle-down" , "Arrow Circle Down"),
new KeyValuePair<string, string>("arrow-circle-left" , "Arrow Circle Left"), new KeyValuePair<string, string>("arrow-circle-left" , "Arrow Circle Left"),
new KeyValuePair<string, string>("arrow-circle-right" , "Arrow Circle Right"), new KeyValuePair<string, string>("arrow-circle-right" , "Arrow Circle Right"),
@@ -81,16 +86,20 @@ namespace Disco.Services.Extensions
new KeyValuePair<string, string>("ban" , "Ban"), new KeyValuePair<string, string>("ban" , "Ban"),
new KeyValuePair<string, string>("beer" , "Beer"), new KeyValuePair<string, string>("beer" , "Beer"),
new KeyValuePair<string, string>("bell" , "Bell"), new KeyValuePair<string, string>("bell" , "Bell"),
new KeyValuePair<string, string>("binoculars" , "Binoculars"),
new KeyValuePair<string, string>("bolt" , "Bolt"), new KeyValuePair<string, string>("bolt" , "Bolt"),
new KeyValuePair<string, string>("bomb" , "Bomb"), new KeyValuePair<string, string>("bomb" , "Bomb"),
new KeyValuePair<string, string>("book" , "Book"), new KeyValuePair<string, string>("book" , "Book"),
new KeyValuePair<string, string>("bookmark" , "Bookmark"), new KeyValuePair<string, string>("bookmark" , "Bookmark"),
new KeyValuePair<string, string>("briefcase" , "Briefcase"), new KeyValuePair<string, string>("briefcase" , "Briefcase"),
new KeyValuePair<string, string>("bug" , "Bug"), new KeyValuePair<string, string>("bug" , "Bug"),
new KeyValuePair<string, string>("bicycle" , "Bicycle"),
new KeyValuePair<string, string>("building-o" , "Building"), new KeyValuePair<string, string>("building-o" , "Building"),
new KeyValuePair<string, string>("bullhorn" , "Bullhorn"), new KeyValuePair<string, string>("bullhorn" , "Bullhorn"),
new KeyValuePair<string, string>("bullseye" , "Bullseye"), new KeyValuePair<string, string>("bullseye" , "Bullseye"),
new KeyValuePair<string, string>("bus" , "Bus"),
new KeyValuePair<string, string>("cab" , "Cab"), new KeyValuePair<string, string>("cab" , "Cab"),
new KeyValuePair<string, string>("calculator" , "Calculator"),
new KeyValuePair<string, string>("calendar" , "Calendar"), new KeyValuePair<string, string>("calendar" , "Calendar"),
new KeyValuePair<string, string>("calendar-o" , "Calendar"), new KeyValuePair<string, string>("calendar-o" , "Calendar"),
new KeyValuePair<string, string>("car" , "Car"), new KeyValuePair<string, string>("car" , "Car"),
@@ -111,6 +120,7 @@ namespace Disco.Services.Extensions
new KeyValuePair<string, string>("envelope" , "Envelope"), new KeyValuePair<string, string>("envelope" , "Envelope"),
new KeyValuePair<string, string>("exclamation" , "Exclamation"), new KeyValuePair<string, string>("exclamation" , "Exclamation"),
new KeyValuePair<string, string>("eye" , "Eye"), new KeyValuePair<string, string>("eye" , "Eye"),
new KeyValuePair<string, string>("eyedropper" , "Eyedropper"),
new KeyValuePair<string, string>("fax" , "Fax"), new KeyValuePair<string, string>("fax" , "Fax"),
new KeyValuePair<string, string>("female" , "Female"), new KeyValuePair<string, string>("female" , "Female"),
new KeyValuePair<string, string>("fighter-jet" , "Fighter Jet"), new KeyValuePair<string, string>("fighter-jet" , "Fighter Jet"),
@@ -142,6 +152,7 @@ namespace Disco.Services.Extensions
new KeyValuePair<string, string>("legal" , "Legal"), new KeyValuePair<string, string>("legal" , "Legal"),
new KeyValuePair<string, string>("life-ring" , "Life Ring"), new KeyValuePair<string, string>("life-ring" , "Life Ring"),
new KeyValuePair<string, string>("lightbulb-o" , "Lightbulb"), new KeyValuePair<string, string>("lightbulb-o" , "Lightbulb"),
new KeyValuePair<string, string>("line-chart" , "Line Chart"),
new KeyValuePair<string, string>("linux" , "Linux"), new KeyValuePair<string, string>("linux" , "Linux"),
new KeyValuePair<string, string>("location-arrow" , "Location Arrow"), new KeyValuePair<string, string>("location-arrow" , "Location Arrow"),
new KeyValuePair<string, string>("magnet" , "Magnet"), new KeyValuePair<string, string>("magnet" , "Magnet"),
@@ -156,13 +167,17 @@ namespace Disco.Services.Extensions
new KeyValuePair<string, string>("money" , "Money"), new KeyValuePair<string, string>("money" , "Money"),
new KeyValuePair<string, string>("moon-o" , "Moon"), new KeyValuePair<string, string>("moon-o" , "Moon"),
new KeyValuePair<string, string>("music" , "Music"), new KeyValuePair<string, string>("music" , "Music"),
new KeyValuePair<string, string>("newspaper-o" , "Newspaper"),
new KeyValuePair<string, string>("paint-brush" , "Paint Brush"),
new KeyValuePair<string, string>("paper-plane" , "Paper Plane"), new KeyValuePair<string, string>("paper-plane" , "Paper Plane"),
new KeyValuePair<string, string>("paperclip" , "Paperclip"), new KeyValuePair<string, string>("paperclip" , "Paperclip"),
new KeyValuePair<string, string>("paw" , "Paw"), new KeyValuePair<string, string>("paw" , "Paw"),
new KeyValuePair<string, string>("pencil" , "Pencil"), new KeyValuePair<string, string>("pencil" , "Pencil"),
new KeyValuePair<string, string>("phone" , "Phone"), new KeyValuePair<string, string>("phone" , "Phone"),
new KeyValuePair<string, string>("pie-chart" , "Pie Chart"),
new KeyValuePair<string, string>("picture-o" , "Picture"), new KeyValuePair<string, string>("picture-o" , "Picture"),
new KeyValuePair<string, string>("plane" , "Plane"), new KeyValuePair<string, string>("plane" , "Plane"),
new KeyValuePair<string, string>("plug" , "Plug"),
new KeyValuePair<string, string>("power-off" , "Power Off"), new KeyValuePair<string, string>("power-off" , "Power Off"),
new KeyValuePair<string, string>("print" , "Print"), new KeyValuePair<string, string>("print" , "Print"),
new KeyValuePair<string, string>("puzzle-piece" , "Puzzle Piece"), new KeyValuePair<string, string>("puzzle-piece" , "Puzzle Piece"),
@@ -188,14 +203,15 @@ namespace Disco.Services.Extensions
new KeyValuePair<string, string>("thumbs-o-up" , "Thumbs Up"), new KeyValuePair<string, string>("thumbs-o-up" , "Thumbs Up"),
new KeyValuePair<string, string>("thumbs-up" , "Thumbs Up"), new KeyValuePair<string, string>("thumbs-up" , "Thumbs Up"),
new KeyValuePair<string, string>("thumb-tack" , "Thumb Tack"), new KeyValuePair<string, string>("thumb-tack" , "Thumb Tack"),
new KeyValuePair<string, string>("trash-o" , "Trash"), new KeyValuePair<string, string>("trash" , "Trash"),
new KeyValuePair<string, string>("trophy" , "Trophy"), new KeyValuePair<string, string>("trophy" , "Trophy"),
new KeyValuePair<string, string>("truck" , "Truck"), new KeyValuePair<string, string>("truck" , "Truck"),
new KeyValuePair<string, string>("umbrella" , "Umbrella"), new KeyValuePair<string, string>("umbrella" , "Umbrella"),
new KeyValuePair<string, string>("university" , "University"), new KeyValuePair<string, string>("university" , "University"),
new KeyValuePair<string, string>("wheelchair" , "Wheelchair"), new KeyValuePair<string, string>("wheelchair" , "Wheelchair"),
new KeyValuePair<string, string>("windows" , "Windows"), new KeyValuePair<string, string>("windows" , "Windows"),
new KeyValuePair<string, string>("wrench" , "Wrench") new KeyValuePair<string, string>("wrench" , "Wrench"),
new KeyValuePair<string, string>("wifi" , "WiFi")
}.AsReadOnly(); }.AsReadOnly();
// Icon Colours // Icon Colours
@@ -221,6 +237,26 @@ namespace Disco.Services.Extensions
new KeyValuePair<string, string>("mauve" , "Mauve"), new KeyValuePair<string, string>("mauve" , "Mauve"),
new KeyValuePair<string, string>("sienna" , "Sienna") new KeyValuePair<string, string>("sienna" , "Sienna")
}.AsReadOnly(); }.AsReadOnly();
// Noticeboard Themes
NoticeboardThemes = new List<KeyValuePair<string, string>>(){
new KeyValuePair<string, string>("default" , "Default Blue"),
new KeyValuePair<string, string>("default-soft" , "Default Blue Soft"),
new KeyValuePair<string, string>("green" , "Green"),
new KeyValuePair<string, string>("green-soft" , "Green Soft"),
new KeyValuePair<string, string>("violet" , "Violet"),
new KeyValuePair<string, string>("violet-soft" , "Violet Soft"),
new KeyValuePair<string, string>("magenta" , "Magenta"),
new KeyValuePair<string, string>("magenta-soft" , "Magenta Soft"),
new KeyValuePair<string, string>("crimson" , "Crimson"),
new KeyValuePair<string, string>("crimson-soft" , "Crimson Soft"),
new KeyValuePair<string, string>("amber" , "Amber"),
new KeyValuePair<string, string>("amber-soft" , "Amber Soft"),
new KeyValuePair<string, string>("brown" , "Brown"),
new KeyValuePair<string, string>("brown-soft" , "Brown Soft"),
new KeyValuePair<string, string>("steel" , "Steel"),
new KeyValuePair<string, string>("steel-soft" , "Steel Soft")
}.AsReadOnly();
} }
} }
} }
@@ -107,18 +107,18 @@ namespace Disco.Services.Interop.ActiveDirectory
IEnumerable<ADDomainController> availableServers; IEnumerable<ADDomainController> availableServers;
// Try Site Servers first // Try Site Servers first
availableServers = AvilableDomainControllers(RequireSiteServer: true, RequireWritable: RequireWritable); availableServers = AvailableDomainControllers(RequireSiteServer: true, RequireWritable: RequireWritable);
if (!availableServers.Any()) if (!availableServers.Any())
{ {
// No Site Servers available - try all // No Site Servers available - try all
availableServers = AvilableDomainControllers(RequireSiteServer: false, RequireWritable: RequireWritable); availableServers = AvailableDomainControllers(RequireSiteServer: false, RequireWritable: RequireWritable);
if (!availableServers.Any()) if (!availableServers.Any())
{ {
lock (domainMaintainLock) lock (domainMaintainLock)
{ {
availableServers = AvilableDomainControllers(RequireSiteServer: false, RequireWritable: RequireWritable); availableServers = AvailableDomainControllers(RequireSiteServer: false, RequireWritable: RequireWritable);
if (!availableServers.Any()) if (!availableServers.Any())
return DiscoverAvailableDomainController(RequireWritable); return DiscoverAvailableDomainController(RequireWritable);
@@ -142,7 +142,7 @@ namespace Disco.Services.Interop.ActiveDirectory
return availableServers.ElementAt(dcrrValue); return availableServers.ElementAt(dcrrValue);
} }
} }
private IEnumerable<ADDomainController> AvilableDomainControllers(bool RequireSiteServer, bool RequireWritable) private IEnumerable<ADDomainController> AvailableDomainControllers(bool RequireSiteServer, bool RequireWritable)
{ {
IEnumerable<ADDomainController> query = this.DomainControllers.Where(dc => dc.IsAvailable); IEnumerable<ADDomainController> query = this.DomainControllers.Where(dc => dc.IsAvailable);
if (RequireSiteServer) if (RequireSiteServer)
@@ -17,6 +17,7 @@ namespace Disco.Services.Interop.DiscoServices
using StatisticInt = UpdateRequestV2.StatisticInt; using StatisticInt = UpdateRequestV2.StatisticInt;
using StatisticJob = UpdateRequestV2.StatisticJob; using StatisticJob = UpdateRequestV2.StatisticJob;
using StatisticString = UpdateRequestV2.StatisticString; using StatisticString = UpdateRequestV2.StatisticString;
using StatisticIntPair = UpdateRequestV2.StatisticIntPair;
public static class UpdateQuery public static class UpdateQuery
{ {
@@ -63,7 +64,6 @@ namespace Disco.Services.Interop.DiscoServices
Status.UpdateStatus(10, "Gathering statistics and building update request"); Status.UpdateStatus(10, "Gathering statistics and building update request");
var updateRequest = BuildRequest(Database); var updateRequest = BuildRequest(Database);
var updateRequestJson = JsonConvert.SerializeObject(updateRequest);
Status.UpdateStatus(40, "Sending statistics and update request"); Status.UpdateStatus(40, "Sending statistics and update request");
@@ -87,7 +87,9 @@ namespace Disco.Services.Interop.DiscoServices
{ {
using (var requestStreamWriter = new StreamWriter(compressedStream, Encoding.UTF8)) using (var requestStreamWriter = new StreamWriter(compressedStream, Encoding.UTF8))
{ {
requestStreamWriter.Write(updateRequestJson); JsonSerializer serializer = new JsonSerializer();
serializer.Serialize(requestStreamWriter, updateRequest);
requestStreamWriter.Flush(); requestStreamWriter.Flush();
} }
} }
@@ -143,65 +145,85 @@ namespace Disco.Services.Interop.DiscoServices
if (whoAmIResponse != null && !string.IsNullOrWhiteSpace(whoAmIResponse.Item1)) if (whoAmIResponse != null && !string.IsNullOrWhiteSpace(whoAmIResponse.Item1))
m.VicEduDeptWanId = whoAmIResponse.Item1; m.VicEduDeptWanId = whoAmIResponse.Item1;
m.Stat_JobCounts = Database.Jobs.GroupBy(j => j.JobTypeId).Select(g => new StatisticInt() { K = g.Key, V = g.Count() }).ToList(); m.Stat_JobCounts = Database.Jobs.GroupBy(j => j.JobTypeId).Select(g => new StatisticInt() { Key = g.Key, Value = g.Count() }).ToList();
m.Stat_OpenJobCounts = Database.Jobs.Where(j => j.ClosedDate == null).GroupBy(j => j.JobTypeId).Select(g => new StatisticInt() { K = g.Key, V = g.Count() }).ToList(); m.Stat_OpenJobCounts = Database.Jobs.Where(j => j.ClosedDate == null).GroupBy(j => j.JobTypeId).Select(g => new StatisticInt() { Key = g.Key, Value = g.Count() }).ToList();
m.Stat_DeviceModelCounts = Database.DeviceModels.Select(dm => new StatisticInt() { K = dm.Manufacturer + ";" + dm.Model, V = dm.Devices.Count(d => d.DecommissionedDate == null) }).ToList(); m.Stat_DeviceModelCounts = Database.DeviceModels.Select(dm => new StatisticInt() { Key = dm.Manufacturer + ";" + dm.Model, Value = dm.Devices.Count(d => d.DecommissionedDate == null) }).ToList();
var activeThreshold = DateTime.Now.AddDays(-60); var activeThreshold = DateTime.Now.AddDays(-60);
m.Stat_ActiveDeviceModelCounts = Database.DeviceModels.Select(dm => new StatisticInt() { K = dm.Manufacturer + ";" + dm.Model, V = dm.Devices.Count(d => d.DecommissionedDate == null && (d.LastNetworkLogonDate == null || d.LastNetworkLogonDate > activeThreshold)) }).ToList(); m.Stat_ActiveDeviceModelCounts = Database.DeviceModels.Select(dm => new StatisticInt() { Key = dm.Manufacturer + ";" + dm.Model, Value = dm.Devices.Count(d => d.DecommissionedDate == null && (d.LastNetworkLogonDate == null || d.LastNetworkLogonDate > activeThreshold)) }).ToList();
m.Stat_UserCounts = new List<StatisticInt>() { m.Stat_UserCounts = new List<StatisticInt>() {
new StatisticInt() { K = "All", V = Database.Users.Count() }, new StatisticInt() { Key = "All", Value = Database.Users.Count() },
new StatisticInt() { K = "Assigned Current", V = Database.Users.Where(u => u.DeviceUserAssignments.Any(dua => !dua.UnassignedDate.HasValue)).Count() }, new StatisticInt() { Key = "Assigned Current", Value = Database.Users.Where(u => u.DeviceUserAssignments.Any(dua => !dua.UnassignedDate.HasValue)).Count() },
new StatisticInt() { K = "Assigned Ever", V = Database.Users.Where(u => u.DeviceUserAssignments.Any()).Count() }, new StatisticInt() { Key = "Assigned Ever", Value = Database.Users.Where(u => u.DeviceUserAssignments.Any()).Count() },
new StatisticInt() { K = "Job Technicians", V = Database.Jobs.Select(j => j.OpenedTechUserId).Distinct().ToList().Concat(Database.Jobs.Select(j => j.ClosedTechUserId).Distinct().ToList()).Distinct().Count() }, new StatisticInt() { Key = "Job Technicians", Value = Database.Jobs.Select(j => j.OpenedTechUserId).Distinct().ToList().Concat(Database.Jobs.Select(j => j.ClosedTechUserId).Distinct().ToList()).Distinct().Count() },
new StatisticInt() { K = "Job Users", V = Database.Jobs.Where(j => j.UserId != null).Select(j => j.UserId).Distinct().Count() } new StatisticInt() { Key = "Job Users", Value = Database.Jobs.Where(j => j.UserId != null).Select(j => j.UserId).Distinct().Count() }
}; };
IQueryable<Job> jobs; var jobIds = Database.Jobs.OrderBy(j => j.Id).Select(j => j.Id).ToList();
if (lastUpdate == null) if (jobIds.Count > 0)
jobs = Database.Jobs;
else
{ {
var lastUpdateDate = lastUpdate.UpdateResponseDate.Date; m.Stat_JobIdentifiers = new List<StatisticIntPair>();
jobs = Database.Jobs.Where(j => j.OpenedDate >= lastUpdateDate || (j.ClosedDate.HasValue && j.ClosedDate.Value >= lastUpdateDate)); var jobIdSequenceBegin = jobIds.First();
jobIds.Skip(1).Aggregate(jobIdSequenceBegin, (last, current) =>
{
if (current == last + 1)
return current;
else
{
m.Stat_JobIdentifiers.Add(new StatisticIntPair() { Begin = jobIdSequenceBegin, End = last });
jobIdSequenceBegin = current;
}
return current;
});
m.Stat_JobIdentifiers.Add(new StatisticIntPair() { Begin = jobIdSequenceBegin, End = jobIds.Last() });
IQueryable<Job> jobs;
if (lastUpdate == null)
jobs = Database.Jobs;
else
{
var lastUpdateDate = lastUpdate.UpdateResponseDate.Date;
jobs = Database.Jobs.Where(j => j.OpenedDate >= lastUpdateDate || (j.ClosedDate.HasValue && j.ClosedDate.Value >= lastUpdateDate));
}
var reportedJobs = jobs.Select(j => new
{
Id = j.Id,
OpenedDate = j.OpenedDate,
ClosedDate = j.ClosedDate,
JobType = j.JobTypeId,
JobSubTypes = j.JobSubTypes.Select(jst => jst.Id),
DeviceModelManufacturer = j.Device.DeviceModel.Manufacturer,
DeviceModelModel = j.Device.DeviceModel.Model,
DeviceSerialNumber = j.DeviceSerialNumber,
UserId = j.UserId,
JobTechnicianId = j.OpenedTechUserId,
WarrantyRepairer = j.JobMetaWarranty.ExternalName,
WarrantyRepairerLoggedDate = j.JobMetaWarranty.ExternalLoggedDate,
WarrantyRepairerCompletedDate = j.JobMetaWarranty.ExternalCompletedDate,
Repairer = j.JobMetaNonWarranty.RepairerName,
RepairerLoggedDate = j.JobMetaNonWarranty.RepairerLoggedDate,
RepairerCompletedDate = j.JobMetaNonWarranty.RepairerCompletedDate,
}).ToList();
m.Stat_Jobs = reportedJobs.Select(j => new StatisticJob()
{
Identifier = j.Id,
OpenedDate = j.OpenedDate,
ClosedDate = j.ClosedDate,
Type = j.JobType,
SubTypes = j.JobSubTypes == null ? null : string.Join(";", j.JobSubTypes),
DeviceIdentifier = HashDeploymentData(Database, j.DeviceSerialNumber),
UserIdentifier = HashDeploymentData(Database, j.UserId),
TechnicianIdentifier = HashDeploymentData(Database, j.JobTechnicianId),
DeviceModel = string.Format("{0};{1}", j.DeviceModelManufacturer, j.DeviceModelModel),
Repairer = j.JobType == JobType.JobTypeIds.HWar ? j.WarrantyRepairer : j.Repairer,
RepairerLogged = j.JobType == JobType.JobTypeIds.HWar ? j.WarrantyRepairerLoggedDate : j.RepairerLoggedDate,
RepairerCompleted = j.JobType == JobType.JobTypeIds.HWar ? j.WarrantyRepairerCompletedDate : j.RepairerCompletedDate
}).ToList();
} }
var reportedJobs = jobs.Select(j => new m.InstalledPlugins = Disco.Services.Plugins.Plugins.GetPlugins().Select(manifest => new StatisticString() { Key = manifest.Id, Value = manifest.VersionFormatted }).ToList();
{
Id = j.Id,
OpenedDate = j.OpenedDate,
ClosedDate = j.ClosedDate,
JobType = j.JobTypeId,
JobSubTypes = j.JobSubTypes.Select(jst => jst.Id),
DeviceModelManufacturer = j.Device.DeviceModel.Manufacturer,
DeviceModelModel = j.Device.DeviceModel.Model,
DeviceSerialNumber = j.DeviceSerialNumber,
UserId = j.UserId,
JobTechnicianId = j.OpenedTechUserId,
WarrantyRepairer = j.JobMetaWarranty.ExternalName,
WarrantyRepairerLoggedDate = j.JobMetaWarranty.ExternalLoggedDate,
WarrantyRepairerCompletedDate = j.JobMetaWarranty.ExternalCompletedDate,
Repairer = j.JobMetaNonWarranty.RepairerName,
RepairerLoggedDate = j.JobMetaNonWarranty.RepairerLoggedDate,
RepairerCompletedDate = j.JobMetaNonWarranty.RepairerCompletedDate,
}).ToList();
m.Stat_Jobs = reportedJobs.Select(j => new StatisticJob()
{
I = j.Id,
OD = j.OpenedDate,
CD = j.ClosedDate,
T = j.JobType,
ST = j.JobSubTypes == null ? null : string.Join(";", j.JobSubTypes),
D = HashDeploymentData(Database, j.DeviceSerialNumber),
U = HashDeploymentData(Database, j.UserId),
TI = HashDeploymentData(Database, j.JobTechnicianId),
DM = string.Format("{0};{1}", j.DeviceModelManufacturer, j.DeviceModelModel),
R = j.JobType == JobType.JobTypeIds.HWar ? j.WarrantyRepairer : j.Repairer,
RL = j.JobType == JobType.JobTypeIds.HWar ? j.WarrantyRepairerLoggedDate : j.RepairerLoggedDate,
RC = j.JobType == JobType.JobTypeIds.HWar ? j.WarrantyRepairerCompletedDate : j.RepairerCompletedDate
}).ToList();
m.InstalledPlugins = Disco.Services.Plugins.Plugins.GetPlugins().Select(manifest => new StatisticString() { K = manifest.Id, V = manifest.VersionFormatted }).ToList();
return m; return m;
} }
@@ -98,14 +98,14 @@ namespace Disco.Services.Jobs.JobQueues
JobId = jqj.JobId, JobId = jqj.JobId,
TechUserId = jqj.AddedUserId, TechUserId = jqj.AddedUserId,
Timestamp = jqj.AddedDate, Timestamp = jqj.AddedDate,
Comments = string.Format("Added to Job Queue: {1}{0}Priority: {2}{0}Comment: {3}", Environment.NewLine, queue.Name, jqj.Priority.ToString(), string.IsNullOrWhiteSpace(jqj.AddedComment) ? "<none>" : jqj.AddedComment) Comments = string.Format("# Added to Queue\r\n**{0}**\r\nPriority: **{1}**\r\n{2}", Environment.NewLine, queue.Name, jqj.Priority.ToString(), string.IsNullOrWhiteSpace(jqj.AddedComment) ? "<no comment>" : jqj.AddedComment)
}); });
Database.JobLogs.Add(new JobLog() Database.JobLogs.Add(new JobLog()
{ {
JobId = jqj.JobId, JobId = jqj.JobId,
TechUserId = jqj.RemovedUserId, TechUserId = jqj.RemovedUserId,
Timestamp = jqj.RemovedDate.Value, Timestamp = jqj.RemovedDate.Value,
Comments = string.Format("Removed from Job Queue: {1}{0}Comment: {2}", Environment.NewLine, queue.Name, string.IsNullOrWhiteSpace(jqj.RemovedComment) ? "<none>" : jqj.RemovedComment) Comments = string.Format("# Removed from Queue\r\n**{0}**\r\n{1}", queue.Name, string.IsNullOrWhiteSpace(jqj.RemovedComment) ? "<no comment>" : jqj.RemovedComment)
}); });
// Delete JQJ // Delete JQJ
@@ -209,7 +209,7 @@ namespace Disco.Services.Jobs.Noticeboards
} }
} }
private static IEnumerable<IHeldDeviceItem> GetHeldDevices(IQueryable<Job> query) public static IEnumerable<IHeldDeviceItem> GetHeldDevices(IQueryable<Job> query)
{ {
var jobs = query var jobs = query
.Where(j => .Where(j =>
@@ -38,7 +38,7 @@ namespace Disco.Services.Jobs.Noticeboards
} }
} }
private static IEnumerable<IHeldDeviceItem> GetHeldDevicesForUsers(IQueryable<Job> query) public static IEnumerable<IHeldDeviceItem> GetHeldDevicesForUsers(IQueryable<Job> query)
{ {
var jobs = query var jobs = query
.Where(j => .Where(j =>
@@ -36,5 +36,10 @@ namespace Disco.Services.Jobs.Noticeboards
return base.OnConnected(); return base.OnConnected();
} }
public static void SetTheme(string ThemeName)
{
HubContext.Clients.All.setTheme(ThemeName);
}
} }
} }
+4
View File
@@ -145,8 +145,12 @@ namespace Disco.Services.Plugins
"Disco.Web", "Disco.Web",
"Disco.Web.Extensions", "Disco.Web.Extensions",
"EntityFramework", "EntityFramework",
"Exceptionless",
"Exceptionless.Models",
"Exceptionless.Mvc",
"itextsharp", "itextsharp",
"LumenWorks.Framework.IO", "LumenWorks.Framework.IO",
"MarkdownSharp",
"Microsoft.AspNet.SignalR.Core", "Microsoft.AspNet.SignalR.Core",
"Microsoft.AspNet.SignalR.SystemWeb", "Microsoft.AspNet.SignalR.SystemWeb",
"Microsoft.Owin", "Microsoft.Owin",
+2 -2
View File
@@ -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("2.0.0731.1600")] [assembly: AssemblyVersion("2.0.0918.1700")]
[assembly: AssemblyFileVersion("2.0.0731.1600")] [assembly: AssemblyFileVersion("2.0.0918.1700")]
+10 -6
View File
@@ -22,6 +22,8 @@ namespace Disco.Services.Searching
IQueryable<Job> query = default(IQueryable<Job>); IQueryable<Job> query = default(IQueryable<Job>);
string userIdTerm = Term.Contains('\\') ? Term : ActiveDirectory.ParseDomainAccountId(Term);
if (int.TryParse(Term, out termInt)) if (int.TryParse(Term, out termInt))
{ {
// Term is a Number (int) // Term is a Number (int)
@@ -29,7 +31,7 @@ namespace Disco.Services.Searching
j.Id == termInt || j.Id == termInt ||
j.Device.SerialNumber.Contains(Term) || j.Device.SerialNumber.Contains(Term) ||
j.Device.AssetNumber.Contains(Term) || j.Device.AssetNumber.Contains(Term) ||
j.User.UserId == Term || j.User.UserId == userIdTerm ||
j.User.DisplayName.Contains(Term)); j.User.DisplayName.Contains(Term));
} }
else else
@@ -37,7 +39,7 @@ namespace Disco.Services.Searching
query = Database.Jobs.Where(j => query = Database.Jobs.Where(j =>
j.Device.SerialNumber.Contains(Term) || j.Device.SerialNumber.Contains(Term) ||
j.Device.AssetNumber.Contains(Term) || j.Device.AssetNumber.Contains(Term) ||
j.User.UserId == Term || j.User.UserId == userIdTerm ||
j.User.DisplayName.Contains(Term)); j.User.DisplayName.Contains(Term));
} }
@@ -65,6 +67,8 @@ namespace Disco.Services.Searching
IQueryable<Job> query = default(IQueryable<Job>); IQueryable<Job> query = default(IQueryable<Job>);
string userIdTerm = Term.Contains('\\') ? Term : ActiveDirectory.ParseDomainAccountId(Term);
if (int.TryParse(Term, out termInt)) if (int.TryParse(Term, out termInt))
{ {
// Term is a Number (int) // Term is a Number (int)
@@ -75,7 +79,7 @@ namespace Disco.Services.Searching
j.DeviceHeldLocation.Contains(Term) || j.DeviceHeldLocation.Contains(Term) ||
j.Device.SerialNumber.Contains(Term) || j.Device.SerialNumber.Contains(Term) ||
j.Device.AssetNumber.Contains(Term) || j.Device.AssetNumber.Contains(Term) ||
j.User.UserId == Term || j.User.UserId == userIdTerm ||
j.User.Surname.Contains(Term) || j.User.Surname.Contains(Term) ||
j.User.GivenName.Contains(Term) || j.User.GivenName.Contains(Term) ||
j.User.DisplayName.Contains(Term) || j.User.DisplayName.Contains(Term) ||
@@ -89,7 +93,7 @@ namespace Disco.Services.Searching
j.DeviceHeldLocation.Contains(Term) || j.DeviceHeldLocation.Contains(Term) ||
j.Device.SerialNumber.Contains(Term) || j.Device.SerialNumber.Contains(Term) ||
j.Device.AssetNumber.Contains(Term) || j.Device.AssetNumber.Contains(Term) ||
j.User.UserId == Term || j.User.UserId == userIdTerm ||
j.User.Surname.Contains(Term) || j.User.Surname.Contains(Term) ||
j.User.GivenName.Contains(Term) || j.User.GivenName.Contains(Term) ||
j.User.DisplayName.Contains(Term)); j.User.DisplayName.Contains(Term));
@@ -103,7 +107,7 @@ namespace Disco.Services.Searching
j.DeviceHeldLocation.Contains(Term) || j.DeviceHeldLocation.Contains(Term) ||
j.Device.SerialNumber.Contains(Term) || j.Device.SerialNumber.Contains(Term) ||
j.Device.AssetNumber.Contains(Term) || j.Device.AssetNumber.Contains(Term) ||
j.User.UserId == Term || j.User.UserId == userIdTerm ||
j.User.Surname.Contains(Term) || j.User.Surname.Contains(Term) ||
j.User.GivenName.Contains(Term) || j.User.GivenName.Contains(Term) ||
j.User.DisplayName.Contains(Term) || j.User.DisplayName.Contains(Term) ||
@@ -116,7 +120,7 @@ namespace Disco.Services.Searching
j.DeviceHeldLocation.Contains(Term) || j.DeviceHeldLocation.Contains(Term) ||
j.Device.SerialNumber.Contains(Term) || j.Device.SerialNumber.Contains(Term) ||
j.Device.AssetNumber.Contains(Term) || j.Device.AssetNumber.Contains(Term) ||
j.User.UserId == Term || j.User.UserId == userIdTerm ||
j.User.Surname.Contains(Term) || j.User.Surname.Contains(Term) ||
j.User.GivenName.Contains(Term) || j.User.GivenName.Contains(Term) ||
j.User.DisplayName.Contains(Term)); j.User.DisplayName.Contains(Term));
@@ -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("2.0.0731.1600")] [assembly: AssemblyVersion("2.0.0918.1700")]
[assembly: AssemblyFileVersion("2.0.0731.1600")] [assembly: AssemblyFileVersion("2.0.0918.1700")]
@@ -1510,7 +1510,7 @@ namespace Disco.Web.Areas.API.Controllers
JobId = job.Id, JobId = job.Id,
TechUserId = CurrentUser.UserId, TechUserId = CurrentUser.UserId,
Timestamp = DateTime.Now, Timestamp = DateTime.Now,
Comments = string.Format("Added Flag: {0}{1}Reason: {2}", flagStatus.Item1, Environment.NewLine, Reason) Comments = string.Format("# Added Flag\r\n**{0}**\r\n{1}", flagStatus.Item1, string.IsNullOrWhiteSpace(Reason) ? "<no reason provided>" : Reason)
}; };
Database.JobLogs.Add(jobLog); Database.JobLogs.Add(jobLog);
@@ -35,6 +35,20 @@ namespace Disco.Web.Areas.API.Controllers
return Json("OK", JsonRequestBehavior.AllowGet); return Json("OK", JsonRequestBehavior.AllowGet);
} }
[DiscoAuthorize(Claims.Config.JobPreferences.Configure)]
public virtual ActionResult UpdateDefaultNoticeboardTheme(string DefaultNoticeboardTheme, bool redirect = false)
{
Database.DiscoConfiguration.JobPreferences.DefaultNoticeboardTheme = DefaultNoticeboardTheme;
Database.SaveChanges();
Disco.Services.Jobs.Noticeboards.NoticeboardUpdatesHub.SetTheme(DefaultNoticeboardTheme);
if (redirect)
return RedirectToAction(MVC.Config.JobPreferences.Index());
else
return Json("OK", JsonRequestBehavior.AllowGet);
}
[DiscoAuthorize(Claims.Config.JobPreferences.Configure)] [DiscoAuthorize(Claims.Config.JobPreferences.Configure)]
public virtual ActionResult UpdateLocationMode(LocationModes LocationMode, bool redirect = false) public virtual ActionResult UpdateLocationMode(LocationModes LocationMode, bool redirect = false)
{ {
@@ -19,6 +19,7 @@ namespace Disco.Web.Areas.Config.Controllers
{ {
LongRunningJobDaysThreshold = Database.DiscoConfiguration.JobPreferences.LongRunningJobDaysThreshold, LongRunningJobDaysThreshold = Database.DiscoConfiguration.JobPreferences.LongRunningJobDaysThreshold,
StaleJobMinutesThreshold = Database.DiscoConfiguration.JobPreferences.StaleJobMinutesThreshold, StaleJobMinutesThreshold = Database.DiscoConfiguration.JobPreferences.StaleJobMinutesThreshold,
DefaultNoticeboardTheme = Database.DiscoConfiguration.JobPreferences.DefaultNoticeboardTheme,
LocationMode = Database.DiscoConfiguration.JobPreferences.LocationMode, LocationMode = Database.DiscoConfiguration.JobPreferences.LocationMode,
LocationList = Database.DiscoConfiguration.JobPreferences.LocationList LocationList = Database.DiscoConfiguration.JobPreferences.LocationList
}; };
@@ -1,11 +1,11 @@
using Disco.Models.BI.Job; using Disco.Data.Repository;
using Disco.Models.BI.Job;
using Disco.Models.UI.Config.JobPreferences; using Disco.Models.UI.Config.JobPreferences;
using Disco.Services.Extensions;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
using System.Linq; using System.Linq;
using System.Web;
using System.Web.Mvc;
namespace Disco.Web.Areas.Config.Models.JobPreferences namespace Disco.Web.Areas.Config.Models.JobPreferences
{ {
@@ -13,9 +13,31 @@ namespace Disco.Web.Areas.Config.Models.JobPreferences
{ {
public int LongRunningJobDaysThreshold { get; set; } public int LongRunningJobDaysThreshold { get; set; }
public int StaleJobMinutesThreshold { get; set; } public int StaleJobMinutesThreshold { get; set; }
public string DefaultNoticeboardTheme { get; set; }
public LocationModes LocationMode { get; set; } public LocationModes LocationMode { get; set; }
public List<string> LocationList { get; set; } public List<string> LocationList { get; set; }
public List<KeyValuePair<string, string>> DefaultNoticeboardThemeOptions()
{
return UIHelpers.NoticeboardThemes.ToList();
}
public Lazy<List<Disco.Models.Repository.DeviceProfile>> DeviceProfiles = new Lazy<List<Disco.Models.Repository.DeviceProfile>>(() =>
{
using (var database = new DiscoDataContext())
{
return database.DeviceProfiles.OrderBy(a => a.Description).ToList();
}
});
public Lazy<List<Disco.Models.BI.Config.OrganisationAddress>> OrganisationAddresses = new Lazy<List<Disco.Models.BI.Config.OrganisationAddress>>(() =>
{
using (var database = new DiscoDataContext())
{
return database.DiscoConfiguration.OrganisationAddresses.Addresses.OrderBy(a => a.Name).ToList();
}
});
public List<KeyValuePair<int, string>> LongRunningJobDaysThresholdOptions() public List<KeyValuePair<int, string>> LongRunningJobDaysThresholdOptions()
{ {
var options = new List<KeyValuePair<int, string>>() { var options = new List<KeyValuePair<int, string>>() {
@@ -5,21 +5,19 @@
} }
@using (Html.BeginForm()) @using (Html.BeginForm())
{ {
@Html.ValidationSummary(false)
<div class="form" style="width: 450px"> <div class="form" style="width: 450px">
<table> <table>
<tr> <tr>
<th> <th>Name:</th>
Name:
</th>
<td> <td>
@Html.EditorFor(model => model.DeviceBatch.Name)<br />@Html.ValidationMessageFor(model => model.DeviceBatch.Name) @Html.EditorFor(model => model.DeviceBatch.Name)<br />@Html.ValidationMessageFor(model => model.DeviceBatch.Name)
</td> </td>
</tr> </tr>
<tr> <tr>
<th> <th>Purchase Date:</th>
Purchase Date: <td>
</th> @Html.EditorFor(model => model.DeviceBatch.PurchaseDate)<br />@Html.ValidationMessageFor(model => model.DeviceBatch.PurchaseDate)
<td>@Html.EditorFor(model => model.DeviceBatch.PurchaseDate)<br />@Html.ValidationMessageFor(model => model.DeviceBatch.PurchaseDate)
</td> </td>
</tr> </tr>
</table> </table>
@@ -61,6 +61,20 @@ WriteLiteral("\r\n");
{ {
#line default
#line hidden
#line 8 "..\..\Areas\Config\Views\DeviceBatch\Create.cshtml"
Write(Html.ValidationSummary(false));
#line default
#line hidden
#line 8 "..\..\Areas\Config\Views\DeviceBatch\Create.cshtml"
#line default #line default
#line hidden #line hidden
WriteLiteral(" <div"); WriteLiteral(" <div");
@@ -69,13 +83,13 @@ WriteLiteral(" class=\"form\"");
WriteLiteral(" style=\"width: 450px\""); WriteLiteral(" style=\"width: 450px\"");
WriteLiteral(">\r\n <table>\r\n <tr>\r\n <th>\r\n N" + WriteLiteral(">\r\n <table>\r\n <tr>\r\n <th>Name:</th>\r\n " +
"ame:\r\n </th>\r\n <td>\r\n"); " <td>\r\n");
WriteLiteral(" "); WriteLiteral(" ");
#line 15 "..\..\Areas\Config\Views\DeviceBatch\Create.cshtml" #line 14 "..\..\Areas\Config\Views\DeviceBatch\Create.cshtml"
Write(Html.EditorFor(model => model.DeviceBatch.Name)); Write(Html.EditorFor(model => model.DeviceBatch.Name));
@@ -84,18 +98,19 @@ WriteLiteral(" ");
WriteLiteral("<br />"); WriteLiteral("<br />");
#line 15 "..\..\Areas\Config\Views\DeviceBatch\Create.cshtml" #line 14 "..\..\Areas\Config\Views\DeviceBatch\Create.cshtml"
Write(Html.ValidationMessageFor(model => model.DeviceBatch.Name)); Write(Html.ValidationMessageFor(model => model.DeviceBatch.Name));
#line default #line default
#line hidden #line hidden
WriteLiteral("\r\n </td>\r\n </tr>\r\n <tr>\r\n <th" + WriteLiteral("\r\n </td>\r\n </tr>\r\n <tr>\r\n <th" +
">\r\n Purchase Date:\r\n </th>\r\n <t" + ">Purchase Date:</th>\r\n <td>\r\n");
"d>");
WriteLiteral(" ");
#line 22 "..\..\Areas\Config\Views\DeviceBatch\Create.cshtml" #line 20 "..\..\Areas\Config\Views\DeviceBatch\Create.cshtml"
Write(Html.EditorFor(model => model.DeviceBatch.PurchaseDate)); Write(Html.EditorFor(model => model.DeviceBatch.PurchaseDate));
@@ -104,7 +119,7 @@ WriteLiteral("\r\n </td>\r\n </tr>\r\n <tr>
WriteLiteral("<br />"); WriteLiteral("<br />");
#line 22 "..\..\Areas\Config\Views\DeviceBatch\Create.cshtml" #line 20 "..\..\Areas\Config\Views\DeviceBatch\Create.cshtml"
Write(Html.ValidationMessageFor(model => model.DeviceBatch.PurchaseDate)); Write(Html.ValidationMessageFor(model => model.DeviceBatch.PurchaseDate));
@@ -141,7 +156,7 @@ WriteLiteral(@">
"); ");
#line 40 "..\..\Areas\Config\Views\DeviceBatch\Create.cshtml" #line 38 "..\..\Areas\Config\Views\DeviceBatch\Create.cshtml"
} }
@@ -38,7 +38,7 @@
<a target="_blank" href="#" data-bind="attr: { href: manuallyAssignUrl }, visible: $parent.sessionEnded">Manually Assign Page</a> <a target="_blank" href="#" data-bind="attr: { href: manuallyAssignUrl }, visible: $parent.sessionEnded">Manually Assign Page</a>
</div> </div>
<div data-bind="visible: detected"> <div data-bind="visible: detected">
Document: <a target="_blank" href="#" data-bind="text: documentTemplate, attr: { href: documentTemplateUrl }"></a> Document: <a target="_blank" href="#" data-bind="text: documentTemplate, attr: { href: documentTemplateUrl }"></a>
<br /> <br />
Target: <a target="_blank" href="#" data-bind="text: assignedData, attr: { href: assignedDataUrl }"></a> Target: <a target="_blank" href="#" data-bind="text: assignedData, attr: { href: assignedDataUrl }"></a>
</div> </div>
@@ -307,15 +307,35 @@
logHub.client.receiveLog = parseLog logHub.client.receiveLog = parseLog
$.connection.hub.qs = { LogModules: '@(Disco.BI.DocumentTemplateBI.DocumentsLog.Current.LiveLogGroupName)' }; $.connection.hub.qs = { LogModules: '@(Disco.BI.DocumentTemplateBI.DocumentsLog.Current.LiveLogGroupName)' };
$.connection.hub.error(function (error) { $.connection.hub.error(onHubFailed);
alert('Live-Log Error: ' + error);
});
$.connection.hub.start() $.connection.hub.start()
.done(function () { isLive = true; }) .done(function () { isLive = true; })
.fail(function (error) { .fail(onHubFailed);
alert('Live-Log Connection Error: ' + error);
}); function onHubFailed(error) {
// Show Dialog Message
if ($('.disconnected-dialog').length == 0) {
$('<div>')
.addClass('dialog disconnected-dialog')
.html('<h3><span class="fa-stack fa-lg"><i class="fa fa-wifi fa-stack-1x"></i><i class="fa fa-ban fa-stack-2x error"></i></span>Disconnected from the Disco ICT Server</h3><div>This page is not receiving live updates. Please ensure you are connected to the server, then refresh this page to enable features.</div>')
.dialog({
resizable: false,
title: 'Disconnected',
width: 400,
modal: true,
buttons: {
'Refresh Now': function () {
$(this).dialog('option', 'buttons', null);
window.location.reload(true);
},
'Close': function () {
$(this).dialog('destroy');
}
}
});
}
}
} }
init(); init();
}); });
@@ -157,7 +157,7 @@ WriteLiteral(">\r\n Document: <a");
WriteLiteral(" target=\"_blank\""); WriteLiteral(" target=\"_blank\"");
WriteLiteral(" href=\"#\""); WriteLiteral(" href=\"#\"");
WriteLiteral(" data-bind=\"text: documentTemplate, attr: { href: documentTemplateUrl }\""); WriteLiteral(" data-bind=\"text: documentTemplate, attr: { href: documentTemplateUrl }\"");
@@ -471,21 +471,26 @@ WriteLiteral(@"',
#line default #line default
#line hidden #line hidden
WriteLiteral(@"' }; WriteLiteral("\' };\r\n $.connection.hub.error(onHubFailed);\r\n\r\n $.connectio" +
$.connection.hub.error(function (error) { "n.hub.start()\r\n .done(function () { isLive = true; })\r\n " +
alert('Live-Log Error: ' + error); " .fail(onHubFailed);\r\n\r\n function onHubFailed(error) {\r\n " +
}); " // Show Dialog Message\r\n if ($(\'.disconnected-dialog\').le" +
"ngth == 0) {\r\n $(\'<div>\')\r\n .addClass(" +
$.connection.hub.start() "\'dialog disconnected-dialog\')\r\n .html(\'<h3><span class=\"f" +
.done(function () { isLive = true; }) "a-stack fa-lg\"><i class=\"fa fa-wifi fa-stack-1x\"></i><i class=\"fa fa-ban fa-stac" +
.fail(function (error) { "k-2x error\"></i></span>Disconnected from the Disco ICT Server</h3><div>This page" +
alert('Live-Log Connection Error: ' + error); " is not receiving live updates. Please ensure you are connected to the server, t" +
}); "hen refresh this page to enable features.</div>\')\r\n .dial" +
} "og({\r\n resizable: false,\r\n " +
init(); " title: \'Disconnected\',\r\n width: 400,\r\n " +
}); " modal: true,\r\n buttons: {\r\n " +
</script> " \'Refresh Now\': function () {\r\n " +
"); " $(this).dialog(\'option\', \'buttons\', null);\r\n " +
" window.location.reload(true);\r\n },\r\n " +
" \'Close\': function () {\r\n " +
" $(this).dialog(\'destroy\');\r\n }\r\n " +
" }\r\n });\r\n }\r\n }" +
"\r\n }\r\n init();\r\n });\r\n</script>\r\n");
} }
} }
@@ -257,7 +257,7 @@
modal: true, modal: true,
autoOpen: false, autoOpen: false,
width: 750, width: 750,
height: 620, height: 580,
buttons: { buttons: {
"Save Changes": saveChanges, "Save Changes": saveChanges,
Cancel: cancel Cancel: cancel
@@ -286,7 +286,7 @@
dialog.dialog("option", "buttons", null); dialog.dialog("option", "buttons", null);
// Refresh Page // Refresh Page
window.location.href = window.location.href; window.location.reload(true);
} }
function saveChanges() { function saveChanges() {
@@ -682,15 +682,47 @@
<a id="buttonBulkGenerate" href="#" class="button">Bulk Generate</a> <a id="buttonBulkGenerate" href="#" class="button">Bulk Generate</a>
<div id="dialogBulkGenerate" class="hiddenDialog" title="Bulk Generate: @(Model.DocumentTemplate.Id)"> <div id="dialogBulkGenerate" class="hiddenDialog" title="Bulk Generate: @(Model.DocumentTemplate.Id)">
<div class="brief"> <div class="brief">
<div> @switch (Model.DocumentTemplate.Scope)
Enter multiple <span class="scopeDescBulkGenerate"></span>&nbsp;separated by <code>&lt;new line&gt;</code>, commas (<code>,</code>) or semicolons (<code>;</code>). {
</div> case "Device":
<div class="examples clearfix"> <div>
<h4>Examples:</h4> Enter multiple <span class="scopeDescBulkGenerate">Device Serial Numbers</span> separated by <code>&lt;new line&gt;</code>, commas (<code>,</code>) or semicolons (<code>;</code>).
<div class="example1 code"></div> </div>
<div class="example2 code"></div> <div class="examples clearfix">
<div class="example3 code"></div> <h4>Examples:</h4>
</div> <div class="example1 code">01234567<br />
ABCD9876<br />
8VQ6G2R</div>
<div class="example2 code">01234567,ABCD9876,8VQ6G2R</div>
<div class="example3 code">01234567;ABCD9876;8VQ6G2R</div>
</div>
break;
case "Job":
<div>
Enter multiple <span class="scopeDescBulkGenerate">Job Ids</span> separated by <code>&lt;new line&gt;</code>, commas (<code>,</code>) or semicolons (<code>;</code>).
</div>
<div class="examples clearfix">
<h4>Examples:</h4>
<div class="example1 code">86<br />
99<br />
44</div>
<div class="example2 code">86,99,44</div>
<div class="example3 code">86;99;44</div>
</div>
break;
case "User":
<div>
Enter multiple <span class="scopeDescBulkGenerate">User Ids</span> separated by <code>&lt;new line&gt;</code>, commas (<code>,</code>) or semicolons (<code>;</code>).
</div>
<div class="examples clearfix">
<h4>Examples:</h4>
<div class="example1 code">user6<br />
smi0099<br />@(ActiveDirectory.Context.PrimaryDomain.NetBiosName)\rsmith</div>
<div class="example2 code">user6,smi0099,@(ActiveDirectory.Context.PrimaryDomain.NetBiosName)\rsmith</div>
<div class="example3 code">user6;smi0099;@(ActiveDirectory.Context.PrimaryDomain.NetBiosName)\rsmith</div>
</div>
break;
}
</div> </div>
@using (Html.BeginForm(MVC.API.DocumentTemplate.BulkGenerate(Model.DocumentTemplate.Id), FormMethod.Post)) @using (Html.BeginForm(MVC.API.DocumentTemplate.BulkGenerate(Model.DocumentTemplate.Id), FormMethod.Post))
{ {
@@ -724,27 +756,6 @@
$.validator.unobtrusive.reparse('#inputBulkGenerateDataIds'); $.validator.unobtrusive.reparse('#inputBulkGenerateDataIds');
} }
switch ($('#DocumentTemplate_Scope').val()) {
case 'Device':
dialog.find('.scopeDescBulkGenerate').text('Device Serial Numbers');
dialog.find('.example1').html('01234567<br />ABCD9876<br />8VQ6G2R');
dialog.find('.example2').text('01234567,ABCD9876,8VQ6G2R');
dialog.find('.example3').text('01234567;ABCD9876;8VQ6G2R');
break;
case 'Job':
dialog.find('.scopeDescBulkGenerate').text('Job Ids');
dialog.find('.example1').html('86<br />99<br />44');
dialog.find('.example2').text('86,99,44');
dialog.find('.example3').text('86;99;44');
break;
case 'User':
dialog.find('.scopeDescBulkGenerate').text('User Ids');
dialog.find('.example1').html('user6<br />smi0099<br />@(ActiveDirectory.Context.PrimaryDomain.NetBiosName)\\rsmith');
dialog.find('.example2').text('user6,smi0099,@(ActiveDirectory.Context.PrimaryDomain.NetBiosName)\\rsmith');
dialog.find('.example3').text('user6;smi0099;@(ActiveDirectory.Context.PrimaryDomain.NetBiosName)\\rsmith');
break;
}
dialog.dialog('open'); dialog.dialog('open');
return false; return false;
}); });
@@ -989,7 +989,7 @@ WriteLiteral(" <script>\r\n
"izable: false,\r\n modal: t" + "izable: false,\r\n modal: t" +
"rue,\r\n autoOpen: false,\r\n" + "rue,\r\n autoOpen: false,\r\n" +
" width: 750,\r\n " + " width: 750,\r\n " +
" height: 620,\r\n " + " height: 580,\r\n " +
" buttons: {\r\n " + " buttons: {\r\n " +
" \"Save Changes\": saveChanges,\r\n " + " \"Save Changes\": saveChanges,\r\n " +
" Cancel: cancel\r\n " + " Cancel: cancel\r\n " +
@@ -1012,21 +1012,21 @@ WriteLiteral(" <script>\r\n
"el() {\r\n dialog.dialog(\"disable\")" + "el() {\r\n dialog.dialog(\"disable\")" +
";\r\n dialog.dialog(\"option\", \"butt" + ";\r\n dialog.dialog(\"option\", \"butt" +
"ons\", null);\r\n\r\n // Refresh Page\r" + "ons\", null);\r\n\r\n // Refresh Page\r" +
"\n window.location.href = window.l" + "\n window.location.reload(true);\r\n" +
"ocation.href;\r\n }\r\n\r\n " + " }\r\n\r\n " +
" function saveChanges() {\r\n " + " function saveChanges() {\r\n " +
" var form = dialog.find(\'form\');\r\n\r\n " + " var form = dialog.find(\'form\');\r\n\r\n " +
" $(\'input.jobType:unchecked\').each(function () {\r\n " + " $(\'input.jobType:unchecked\').each(function () {\r\n " +
" $(\'#SubTypes_\' + $(this).val()).fi" + " $(\'#SubTypes_\' + $(this).val()).find(\'input\').pro" +
"nd(\'input\').prop(\'checked\', false);\r\n " + "p(\'checked\', false);\r\n });\r\n\r\n " +
" });\r\n\r\n form.submit();\r\n\r\n " + " form.submit();\r\n\r\n " +
" dialog.dialog(\"disable\");\r\n " + " dialog.dialog(\"disable\");\r\n " +
" dialog.dialog(\"option\", \"buttons\", null" + " dialog.dialog(\"option\", \"buttons\", null);\r\n " +
");\r\n }\r\n\r\n " + " }\r\n\r\n " +
" $(function () {\r\n " + " $(function () {\r\n $(\'#Config_Do" +
" $(\'#Config_DocumentTemplates_JobSubTypes_Update\').click(showDialog);\r\n " + "cumentTemplates_JobSubTypes_Update\').click(showDialog);\r\n " +
" });\r\n\r\n " + " });\r\n\r\n })();\r\n " +
" })();\r\n </script>\r\n"); " </script>\r\n");
#line 311 "..\..\Areas\Config\Views\DocumentTemplate\Show.cshtml" #line 311 "..\..\Areas\Config\Views\DocumentTemplate\Show.cshtml"
@@ -1959,53 +1959,177 @@ WriteLiteral(" id=\"dialogBulkGenerate\"");
WriteLiteral(" class=\"hiddenDialog\""); WriteLiteral(" class=\"hiddenDialog\"");
WriteAttribute("title", Tuple.Create(" title=\"", 38168), Tuple.Create("\"", 38219) WriteAttribute("title", Tuple.Create(" title=\"", 38153), Tuple.Create("\"", 38204)
, Tuple.Create(Tuple.Create("", 38176), Tuple.Create("Bulk", 38176), true) , Tuple.Create(Tuple.Create("", 38161), Tuple.Create("Bulk", 38161), true)
, Tuple.Create(Tuple.Create(" ", 38180), Tuple.Create("Generate:", 38181), true) , Tuple.Create(Tuple.Create(" ", 38165), Tuple.Create("Generate:", 38166), true)
#line 683 "..\..\Areas\Config\Views\DocumentTemplate\Show.cshtml" #line 683 "..\..\Areas\Config\Views\DocumentTemplate\Show.cshtml"
, Tuple.Create(Tuple.Create(" ", 38190), Tuple.Create<System.Object, System.Int32>(Model.DocumentTemplate.Id , Tuple.Create(Tuple.Create(" ", 38175), Tuple.Create<System.Object, System.Int32>(Model.DocumentTemplate.Id
#line default #line default
#line hidden #line hidden
, 38191), false) , 38176), false)
); );
WriteLiteral(">\r\n <div"); WriteLiteral(">\r\n <div");
WriteLiteral(" class=\"brief\""); WriteLiteral(" class=\"brief\"");
WriteLiteral(">\r\n <div>\r\n Enter multiple <span"); WriteLiteral(">\r\n");
WriteLiteral(" class=\"scopeDescBulkGenerate\"");
WriteLiteral("></span>&nbsp;separated by <code>&lt;new line&gt;</code>, commas (<code>,</code>)" +
" or semicolons (<code>;</code>).\r\n </div>\r\n <div");
WriteLiteral(" class=\"examples clearfix\"");
WriteLiteral(">\r\n <h4>Examples:</h4>\r\n <div");
WriteLiteral(" class=\"example1 code\"");
WriteLiteral("></div>\r\n <div");
WriteLiteral(" class=\"example2 code\"");
WriteLiteral("></div>\r\n <div");
WriteLiteral(" class=\"example3 code\"");
WriteLiteral("></div>\r\n </div>\r\n </div>\r\n");
#line 695 "..\..\Areas\Config\Views\DocumentTemplate\Show.cshtml" #line 685 "..\..\Areas\Config\Views\DocumentTemplate\Show.cshtml"
#line default #line default
#line hidden #line hidden
#line 695 "..\..\Areas\Config\Views\DocumentTemplate\Show.cshtml" #line 685 "..\..\Areas\Config\Views\DocumentTemplate\Show.cshtml"
switch (Model.DocumentTemplate.Scope)
{
case "Device":
#line default
#line hidden
WriteLiteral(" <div>\r\n Enter multiple <span");
WriteLiteral(" class=\"scopeDescBulkGenerate\"");
WriteLiteral(">Device Serial Numbers</span> separated by <code>&lt;new line&gt;</code>, commas " +
"(<code>,</code>) or semicolons (<code>;</code>).\r\n </div>\r\n");
WriteLiteral(" <div");
WriteLiteral(" class=\"examples clearfix\"");
WriteLiteral(">\r\n <h4>Examples:</h4>\r\n <div");
WriteLiteral(" class=\"example1 code\"");
WriteLiteral(">01234567<br />\r\n ABCD9876<br />\r\n " +
" 8VQ6G2R</div>\r\n <div");
WriteLiteral(" class=\"example2 code\"");
WriteLiteral(">01234567,ABCD9876,8VQ6G2R</div>\r\n <div");
WriteLiteral(" class=\"example3 code\"");
WriteLiteral(">01234567;ABCD9876;8VQ6G2R</div>\r\n </div>\r\n");
#line 699 "..\..\Areas\Config\Views\DocumentTemplate\Show.cshtml"
break;
case "Job":
#line default
#line hidden
WriteLiteral(" <div>\r\n Enter multiple <span");
WriteLiteral(" class=\"scopeDescBulkGenerate\"");
WriteLiteral(">Job Ids</span> separated by <code>&lt;new line&gt;</code>, commas (<code>,</code" +
">) or semicolons (<code>;</code>).\r\n </div>\r\n");
WriteLiteral(" <div");
WriteLiteral(" class=\"examples clearfix\"");
WriteLiteral(">\r\n <h4>Examples:</h4>\r\n <div");
WriteLiteral(" class=\"example1 code\"");
WriteLiteral(">86<br />\r\n 99<br />\r\n 44</" +
"div>\r\n <div");
WriteLiteral(" class=\"example2 code\"");
WriteLiteral(">86,99,44</div>\r\n <div");
WriteLiteral(" class=\"example3 code\"");
WriteLiteral(">86;99;44</div>\r\n </div>\r\n");
#line 712 "..\..\Areas\Config\Views\DocumentTemplate\Show.cshtml"
break;
case "User":
#line default
#line hidden
WriteLiteral(" <div>\r\n Enter multiple <span");
WriteLiteral(" class=\"scopeDescBulkGenerate\"");
WriteLiteral(">User Ids</span> separated by <code>&lt;new line&gt;</code>, commas (<code>,</cod" +
"e>) or semicolons (<code>;</code>).\r\n </div>\r\n");
WriteLiteral(" <div");
WriteLiteral(" class=\"examples clearfix\"");
WriteLiteral(">\r\n <h4>Examples:</h4>\r\n <div");
WriteLiteral(" class=\"example1 code\"");
WriteLiteral(">user6<br />\r\n smi0099<br />");
#line 720 "..\..\Areas\Config\Views\DocumentTemplate\Show.cshtml"
Write(ActiveDirectory.Context.PrimaryDomain.NetBiosName);
#line default
#line hidden
WriteLiteral("\\rsmith</div>\r\n <div");
WriteLiteral(" class=\"example2 code\"");
WriteLiteral(">user6,smi0099,");
#line 721 "..\..\Areas\Config\Views\DocumentTemplate\Show.cshtml"
Write(ActiveDirectory.Context.PrimaryDomain.NetBiosName);
#line default
#line hidden
WriteLiteral("\\rsmith</div>\r\n <div");
WriteLiteral(" class=\"example3 code\"");
WriteLiteral(">user6;smi0099;");
#line 722 "..\..\Areas\Config\Views\DocumentTemplate\Show.cshtml"
Write(ActiveDirectory.Context.PrimaryDomain.NetBiosName);
#line default
#line hidden
WriteLiteral("\\rsmith</div>\r\n </div>\r\n");
#line 724 "..\..\Areas\Config\Views\DocumentTemplate\Show.cshtml"
break;
}
#line default
#line hidden
WriteLiteral(" </div>\r\n");
#line 727 "..\..\Areas\Config\Views\DocumentTemplate\Show.cshtml"
#line default
#line hidden
#line 727 "..\..\Areas\Config\Views\DocumentTemplate\Show.cshtml"
using (Html.BeginForm(MVC.API.DocumentTemplate.BulkGenerate(Model.DocumentTemplate.Id), FormMethod.Post)) using (Html.BeginForm(MVC.API.DocumentTemplate.BulkGenerate(Model.DocumentTemplate.Id), FormMethod.Post))
{ {
@@ -2035,7 +2159,7 @@ WriteLiteral(" data-val-required=\"Identifiers are required\"");
WriteLiteral("></textarea>\r\n"); WriteLiteral("></textarea>\r\n");
#line 699 "..\..\Areas\Config\Views\DocumentTemplate\Show.cshtml" #line 731 "..\..\Areas\Config\Views\DocumentTemplate\Show.cshtml"
} }
@@ -2044,73 +2168,46 @@ WriteLiteral("></textarea>\r\n");
WriteLiteral(" </div>\r\n"); WriteLiteral(" </div>\r\n");
#line 701 "..\..\Areas\Config\Views\DocumentTemplate\Show.cshtml" #line 733 "..\..\Areas\Config\Views\DocumentTemplate\Show.cshtml"
#line default #line default
#line hidden #line hidden
WriteLiteral(" <script>\r\n $(function () {\r\n var dialog;\r\n\r\n " + WriteLiteral(@" <script>
" $(\'#buttonBulkGenerate\').click(function () {\r\n i" + $(function () {
"f (!dialog) {\r\n dialog = $(\'#dialogBulkGenerate\').dialog(" + var dialog;
"{\r\n resizable: false,\r\n mo" +
"dal: true,\r\n autoOpen: false,\r\n " + $('#buttonBulkGenerate').click(function () {
" width: 460,\r\n buttons: {\r\n " + if (!dialog) {
" \"Bulk Generate\": function () {\r\n d" + dialog = $('#dialogBulkGenerate').dialog({
"ialog.find(\'form\').submit();\r\n dialog.dialog(" + resizable: false,
"\"disable\");\r\n },\r\n " + modal: true,
" Close: function () {\r\n $(this).dialog(\"close" + autoOpen: false,
"\");\r\n }\r\n }\r\n " + width: 460,
" });\r\n\r\n $.validator.unobtrusive.reparse(\'#" + buttons: {
"inputBulkGenerateDataIds\');\r\n }\r\n\r\n switch" + ""Bulk Generate"": function () {
" ($(\'#DocumentTemplate_Scope\').val()) {\r\n case \'Device\':\r" + dialog.find('form').submit();
"\n dialog.find(\'.scopeDescBulkGenerate\').text(\'Device " + dialog.dialog(""disable"");
"Serial Numbers\');\r\n dialog.find(\'.example1\').html(\'01" + },
"234567<br />ABCD9876<br />8VQ6G2R\');\r\n dialog.find(\'." + Close: function () {
"example2\').text(\'01234567,ABCD9876,8VQ6G2R\');\r\n dialo" + $(this).dialog(""close"");
"g.find(\'.example3\').text(\'01234567;ABCD9876;8VQ6G2R\');\r\n " + }
" break;\r\n case \'Job\':\r\n dia" + }
"log.find(\'.scopeDescBulkGenerate\').text(\'Job Ids\');\r\n " + });
" dialog.find(\'.example1\').html(\'86<br />99<br />44\');\r\n " +
" dialog.find(\'.example2\').text(\'86,99,44\');\r\n dialo" + $.validator.unobtrusive.reparse('#inputBulkGenerateDataIds');
"g.find(\'.example3\').text(\'86;99;44\');\r\n break;\r\n " + }
" case \'User\':\r\n dialog.find(\'.scope" +
"DescBulkGenerate\').text(\'User Ids\');\r\n dialog.find(\'." + dialog.dialog('open');
"example1\').html(\'user6<br />smi0099<br />"); return false;
});
});
</script>
");
#line 742 "..\..\Areas\Config\Views\DocumentTemplate\Show.cshtml" #line 764 "..\..\Areas\Config\Views\DocumentTemplate\Show.cshtml"
Write(ActiveDirectory.Context.PrimaryDomain.NetBiosName);
#line default
#line hidden
WriteLiteral("\\\\rsmith\');\r\n dialog.find(\'.example2\').text(\'user6,smi" +
"0099,");
#line 743 "..\..\Areas\Config\Views\DocumentTemplate\Show.cshtml"
Write(ActiveDirectory.Context.PrimaryDomain.NetBiosName);
#line default
#line hidden
WriteLiteral("\\\\rsmith\');\r\n dialog.find(\'.example3\').text(\'user6;smi" +
"0099;");
#line 744 "..\..\Areas\Config\Views\DocumentTemplate\Show.cshtml"
Write(ActiveDirectory.Context.PrimaryDomain.NetBiosName);
#line default
#line hidden
WriteLiteral("\\\\rsmith\');\r\n break;\r\n }\r\n\r\n " +
" dialog.dialog(\'open\');\r\n return false;\r\n " +
" });\r\n });\r\n </script>\r\n");
#line 753 "..\..\Areas\Config\Views\DocumentTemplate\Show.cshtml"
} }
@@ -2119,7 +2216,7 @@ WriteLiteral("\\\\rsmith\');\r\n break;\r\n
WriteLiteral(" "); WriteLiteral(" ");
#line 754 "..\..\Areas\Config\Views\DocumentTemplate\Show.cshtml" #line 765 "..\..\Areas\Config\Views\DocumentTemplate\Show.cshtml"
if (Authorization.Has(Claims.Config.DocumentTemplate.Delete)) if (Authorization.Has(Claims.Config.DocumentTemplate.Delete))
{ {
@@ -2127,14 +2224,14 @@ WriteLiteral(" ");
#line default #line default
#line hidden #line hidden
#line 756 "..\..\Areas\Config\Views\DocumentTemplate\Show.cshtml" #line 767 "..\..\Areas\Config\Views\DocumentTemplate\Show.cshtml"
Write(Html.ActionLinkButton("Delete", MVC.API.DocumentTemplate.Delete(Model.DocumentTemplate.Id, true), "buttonDelete")); Write(Html.ActionLinkButton("Delete", MVC.API.DocumentTemplate.Delete(Model.DocumentTemplate.Id, true), "buttonDelete"));
#line default #line default
#line hidden #line hidden
#line 756 "..\..\Areas\Config\Views\DocumentTemplate\Show.cshtml" #line 767 "..\..\Areas\Config\Views\DocumentTemplate\Show.cshtml"
} }
@@ -8,101 +8,68 @@
} }
<div id="enrolStatus"> <div id="enrolStatus">
<div id="noSessions" data-bind="visible: noSessions"> <div id="noSessions" data-bind="visible: noSessions">
<h2> <h2>No enrolment sessions today</h2>
No enrolment sessions today</h2>
</div> </div>
<div id="sessions" data-bind="visible: !noSessions(), foreach: {data: sessions, afterRender: sessionRendered, afterAdd: sessionAdded}" <div id="sessions" data-bind="visible: !noSessions(), foreach: { data: sessions, afterRender: sessionRendered, afterAdd: sessionAdded }" style="display: none">
style="display: none"> <div class="session" data-bind="style: { backgroundImage: deviceModelImageUrl }, click: select">
<div class="session" data-bind="style: {backgroundImage: deviceModelImageUrl}, click: select">
<h3> <h3>
<span data-bind="text: title"></span><span class="details" data-bind="text: '(' + deviceModelDescription() + ')'"> <span data-bind="text: title"></span>
</span> <span class="details" data-bind="text: '(' + deviceModelDescription() + ')'"></span>
</h3> </h3>
<p class="sessionStart" data-bind="text: startTime"> <p class="sessionStart" data-bind="text: startTime"></p>
</p> <p class="sessionStatus" data-bind="text: progressStatus"></p>
<p class="sessionStatus" data-bind="text: progressStatus"> <div data-bind="visible: !sessionEnded(), progressValue: progressValue" class="sessionProgress"></div>
</p>
<div data-bind="visible: !sessionEnded(), progressValue: progressValue" class="sessionProgress">
</div>
</div> </div>
</div> </div>
<div id="dialogSession" data-bind="with: currentSession"> <div id="dialogSession" data-bind="with: currentSession">
<div class="sessionHeader clearfix" data-bind="style: {backgroundImage: deviceModelImageUrl}"> <div class="sessionHeader clearfix" data-bind="style: { backgroundImage: deviceModelImageUrl }">
<h2> <h2><a href="" target="_blank" data-bind="text: title, attr: { href: deviceUrl }"></a></h2>
<a href="" target="_blank" data-bind="text: title, attr: {href: deviceUrl}"></a> <h3 data-bind="text: deviceModelDescription"></h3>
</h2>
<h3 data-bind="text: deviceModelDescription">
</h3>
<table data-bind="if: sessionDeviceInfo"> <table data-bind="if: sessionDeviceInfo">
<tr> <tr>
<th style="width: 128px"> <th style="width: 128px">Computer Name:</th>
Computer Name: <td data-bind="text: sessionDeviceInfo().Arguments[3]"></td>
</th>
<td data-bind="text: sessionDeviceInfo().Arguments[3]">
</td>
</tr> </tr>
<tr> <tr>
<th style="width: 128px"> <th style="width: 128px">UUID:</th>
UUID: <td data-bind="text: sessionDeviceInfo().Arguments[2]"></td>
</th>
<td data-bind="text: sessionDeviceInfo().Arguments[2]">
</td>
</tr> </tr>
<tr> <tr>
<th style="width: 128px"> <th style="width: 128px">LAN Mac Address:</th>
LAN Mac Address: <td data-bind="text: sessionDeviceInfo().Arguments[4]"></td>
</th>
<td data-bind="text: sessionDeviceInfo().Arguments[4]">
</td>
</tr> </tr>
<tr> <tr>
<th style="width: 128px"> <th style="width: 128px">WLAN Mac Address:</th>
WLAN Mac Address: <td data-bind="text: sessionDeviceInfo().Arguments[5]"></td>
</th>
<td data-bind="text: sessionDeviceInfo().Arguments[5]">
</td>
</tr> </tr>
<tr> <tr>
<th style="width: 128px"> <th style="width: 128px">Manufacturer/Model:</th>
Manufacturer/Model: <td data-bind="text: sessionDeviceInfo().Arguments[6] + ' ' + sessionDeviceInfo().Arguments[7]"></td>
</th>
<td data-bind="text: sessionDeviceInfo().Arguments[6] + ' ' + sessionDeviceInfo().Arguments[7]">
</td>
</tr> </tr>
</table> </table>
</div> </div>
<div class="sessionProgress clearfix"> <div class="sessionProgress clearfix">
<p class="sessionStart" data-bind="text: startTime"> <p class="sessionStart" data-bind="text: startTime"></p>
</p> <p class="sessionStatus" data-bind="text: progressStatus"></p>
<p class="sessionStatus" data-bind="text: progressStatus"> <div data-bind="visible: !sessionEnded(), progressValue: progressValue"></div>
</p>
<div data-bind="visible: !sessionEnded(), progressValue: progressValue">
</div>
</div> </div>
<div class="sessionInfoContainer clearfix"> <div class="sessionInfoContainer clearfix">
<div class="sessionInfoMessages"> <div class="sessionInfoMessages">
<table class="logEventsViewport"> <table class="logEventsViewport">
<thead> <thead>
<tr> <tr>
<th class="icon"> <th class="icon">&nbsp;</th>
&nbsp; <th class="message">Message</th>
</th>
<th class="message">
Message
</th>
</tr> </tr>
</thead> </thead>
</table> </table>
<div class="logEventsViewportContainer"> <div class="logEventsViewportContainer">
<div class="logEventsViewportNoLogs" data-bind="visible: messages().length == 0" <div class="logEventsViewportNoLogs" data-bind="visible: messages().length == 0" style="display: none">No logs</div>
style="display: none">
No logs
</div>
<table class="logEventsViewport" data-bind="visible: messages().length > 0" style="display: none"> <table class="logEventsViewport" data-bind="visible: messages().length > 0" style="display: none">
<tbody data-bind="foreach: messages"> <tbody data-bind="foreach: messages">
<tr> <tr>
<td class="icon"><i class="fa" data-bind="css: { 'fa-info-circle': EventTypeSeverity == 0, 'fa-exclamation-triangle': EventTypeSeverity == 1, 'fa-exclamation-circle': EventTypeSeverity == 2 }"></i></td> <td class="icon"><i class="fa" data-bind="css: { 'fa-info-circle': EventTypeSeverity == 0, 'fa-exclamation-triangle': EventTypeSeverity == 1, 'fa-exclamation-circle': EventTypeSeverity == 2 }"></i></td>
<td class="message" data-bind="text: FormattedMessage, attr: {title: EventTypeName}"></td> <td class="message" data-bind="text: FormattedMessage, attr: { title: EventTypeName }"></td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
@@ -294,7 +261,7 @@
function init() { function init() {
hostDialogSessions.dialog({ hostDialogSessions.dialog({
modal: true, modal: true,
height: 664, height: 574,
width: 900, width: 900,
resizable: false, resizable: false,
autoOpen: false autoOpen: false
@@ -360,15 +327,35 @@
logHub.client.receiveLog = parseLog logHub.client.receiveLog = parseLog
$.connection.hub.qs = { LogModules: '@(Disco.BI.DeviceBI.EnrolmentLog.Current.LiveLogGroupName)' }; $.connection.hub.qs = { LogModules: '@(Disco.BI.DeviceBI.EnrolmentLog.Current.LiveLogGroupName)' };
$.connection.hub.error(function (error) { $.connection.hub.error(onHubFailed);
alert('Live-Log Error: ' + error);
});
$.connection.hub.start() $.connection.hub.start()
.done(function () { isLive = true; }) .done(function () { isLive = true; })
.fail(function (error) { .fail(onHubFailed);
alert('Live-Log Connection Error: ' + error);
}); function onHubFailed(error) {
// Show Dialog Message
if ($('.disconnected-dialog').length == 0) {
$('<div>')
.addClass('dialog disconnected-dialog')
.html('<h3><span class="fa-stack fa-lg"><i class="fa fa-wifi fa-stack-1x"></i><i class="fa fa-ban fa-stack-2x error"></i></span>Disconnected from the Disco ICT Server</h3><div>This page is not receiving live updates. Please ensure you are connected to the server, then refresh this page to enable features.</div>')
.dialog({
resizable: false,
title: 'Disconnected',
width: 400,
modal: true,
buttons: {
'Refresh Now': function () {
$(this).dialog('option', 'buttons', null);
window.location.reload(true);
},
'Close': function () {
$(this).dialog('destroy');
}
}
});
}
}
} }
init(); init();
}); });
@@ -67,51 +67,50 @@ WriteLiteral(" id=\"noSessions\"");
WriteLiteral(" data-bind=\"visible: noSessions\""); WriteLiteral(" data-bind=\"visible: noSessions\"");
WriteLiteral(">\r\n <h2>\r\n No enrolment sessions today</h2>\r\n </div>\r\n <d" + WriteLiteral(">\r\n <h2>No enrolment sessions today</h2>\r\n </div>\r\n <div");
"iv");
WriteLiteral(" id=\"sessions\""); WriteLiteral(" id=\"sessions\"");
WriteLiteral(" data-bind=\"visible: !noSessions(), foreach: {data: sessions, afterRender: sessio" + WriteLiteral(" data-bind=\"visible: !noSessions(), foreach: { data: sessions, afterRender: sessi" +
"nRendered, afterAdd: sessionAdded}\""); "onRendered, afterAdd: sessionAdded }\"");
WriteLiteral("\r\n style=\"display: none\""); WriteLiteral(" style=\"display: none\"");
WriteLiteral(">\r\n <div"); WriteLiteral(">\r\n <div");
WriteLiteral(" class=\"session\""); WriteLiteral(" class=\"session\"");
WriteLiteral(" data-bind=\"style: {backgroundImage: deviceModelImageUrl}, click: select\""); WriteLiteral(" data-bind=\"style: { backgroundImage: deviceModelImageUrl }, click: select\"");
WriteLiteral(">\r\n <h3>\r\n <span"); WriteLiteral(">\r\n <h3>\r\n <span");
WriteLiteral(" data-bind=\"text: title\""); WriteLiteral(" data-bind=\"text: title\"");
WriteLiteral("></span><span"); WriteLiteral("></span>\r\n <span");
WriteLiteral(" class=\"details\""); WriteLiteral(" class=\"details\"");
WriteLiteral(" data-bind=\"text: \'(\' + deviceModelDescription() + \')\'\""); WriteLiteral(" data-bind=\"text: \'(\' + deviceModelDescription() + \')\'\"");
WriteLiteral(">\r\n </span>\r\n </h3>\r\n <p"); WriteLiteral("></span>\r\n </h3>\r\n <p");
WriteLiteral(" class=\"sessionStart\""); WriteLiteral(" class=\"sessionStart\"");
WriteLiteral(" data-bind=\"text: startTime\""); WriteLiteral(" data-bind=\"text: startTime\"");
WriteLiteral(">\r\n </p>\r\n <p"); WriteLiteral("></p>\r\n <p");
WriteLiteral(" class=\"sessionStatus\""); WriteLiteral(" class=\"sessionStatus\"");
WriteLiteral(" data-bind=\"text: progressStatus\""); WriteLiteral(" data-bind=\"text: progressStatus\"");
WriteLiteral(">\r\n </p>\r\n <div"); WriteLiteral("></p>\r\n <div");
WriteLiteral(" data-bind=\"visible: !sessionEnded(), progressValue: progressValue\""); WriteLiteral(" data-bind=\"visible: !sessionEnded(), progressValue: progressValue\"");
WriteLiteral(" class=\"sessionProgress\""); WriteLiteral(" class=\"sessionProgress\"");
WriteLiteral(">\r\n </div>\r\n </div>\r\n </div>\r\n <div"); WriteLiteral("></div>\r\n </div>\r\n </div>\r\n <div");
WriteLiteral(" id=\"dialogSession\""); WriteLiteral(" id=\"dialogSession\"");
@@ -121,21 +120,21 @@ WriteLiteral(">\r\n <div");
WriteLiteral(" class=\"sessionHeader clearfix\""); WriteLiteral(" class=\"sessionHeader clearfix\"");
WriteLiteral(" data-bind=\"style: {backgroundImage: deviceModelImageUrl}\""); WriteLiteral(" data-bind=\"style: { backgroundImage: deviceModelImageUrl }\"");
WriteLiteral(">\r\n <h2>\r\n <a"); WriteLiteral(">\r\n <h2><a");
WriteLiteral(" href=\"\""); WriteLiteral(" href=\"\"");
WriteLiteral(" target=\"_blank\""); WriteLiteral(" target=\"_blank\"");
WriteLiteral(" data-bind=\"text: title, attr: {href: deviceUrl}\""); WriteLiteral(" data-bind=\"text: title, attr: { href: deviceUrl }\"");
WriteLiteral("></a>\r\n </h2>\r\n <h3"); WriteLiteral("></a></h2>\r\n <h3");
WriteLiteral(" data-bind=\"text: deviceModelDescription\""); WriteLiteral(" data-bind=\"text: deviceModelDescription\"");
WriteLiteral(">\r\n </h3>\r\n <table"); WriteLiteral("></h3>\r\n <table");
WriteLiteral(" data-bind=\"if: sessionDeviceInfo\""); WriteLiteral(" data-bind=\"if: sessionDeviceInfo\"");
@@ -143,54 +142,45 @@ WriteLiteral(">\r\n <tr>\r\n <th");
WriteLiteral(" style=\"width: 128px\""); WriteLiteral(" style=\"width: 128px\"");
WriteLiteral(">\r\n Computer Name:\r\n </th>\r\n " + WriteLiteral(">Computer Name:</th>\r\n <td");
" <td");
WriteLiteral(" data-bind=\"text: sessionDeviceInfo().Arguments[3]\""); WriteLiteral(" data-bind=\"text: sessionDeviceInfo().Arguments[3]\"");
WriteLiteral(">\r\n </td>\r\n </tr>\r\n <tr>\r\n " + WriteLiteral("></td>\r\n </tr>\r\n <tr>\r\n <th");
" <th");
WriteLiteral(" style=\"width: 128px\""); WriteLiteral(" style=\"width: 128px\"");
WriteLiteral(">\r\n UUID:\r\n </th>\r\n " + WriteLiteral(">UUID:</th>\r\n <td");
"<td");
WriteLiteral(" data-bind=\"text: sessionDeviceInfo().Arguments[2]\""); WriteLiteral(" data-bind=\"text: sessionDeviceInfo().Arguments[2]\"");
WriteLiteral(">\r\n </td>\r\n </tr>\r\n <tr>\r\n " + WriteLiteral("></td>\r\n </tr>\r\n <tr>\r\n <th");
" <th");
WriteLiteral(" style=\"width: 128px\""); WriteLiteral(" style=\"width: 128px\"");
WriteLiteral(">\r\n LAN Mac Address:\r\n </th>\r\n " + WriteLiteral(">LAN Mac Address:</th>\r\n <td");
" <td");
WriteLiteral(" data-bind=\"text: sessionDeviceInfo().Arguments[4]\""); WriteLiteral(" data-bind=\"text: sessionDeviceInfo().Arguments[4]\"");
WriteLiteral(">\r\n </td>\r\n </tr>\r\n <tr>\r\n " + WriteLiteral("></td>\r\n </tr>\r\n <tr>\r\n <th");
" <th");
WriteLiteral(" style=\"width: 128px\""); WriteLiteral(" style=\"width: 128px\"");
WriteLiteral(">\r\n WLAN Mac Address:\r\n </th>\r\n " + WriteLiteral(">WLAN Mac Address:</th>\r\n <td");
" <td");
WriteLiteral(" data-bind=\"text: sessionDeviceInfo().Arguments[5]\""); WriteLiteral(" data-bind=\"text: sessionDeviceInfo().Arguments[5]\"");
WriteLiteral(">\r\n </td>\r\n </tr>\r\n <tr>\r\n " + WriteLiteral("></td>\r\n </tr>\r\n <tr>\r\n <th");
" <th");
WriteLiteral(" style=\"width: 128px\""); WriteLiteral(" style=\"width: 128px\"");
WriteLiteral(">\r\n Manufacturer/Model:\r\n </th>\r\n " + WriteLiteral(">Manufacturer/Model:</th>\r\n <td");
" <td");
WriteLiteral(" data-bind=\"text: sessionDeviceInfo().Arguments[6] + \' \' + sessionDeviceInfo().Ar" + WriteLiteral(" data-bind=\"text: sessionDeviceInfo().Arguments[6] + \' \' + sessionDeviceInfo().Ar" +
"guments[7]\""); "guments[7]\"");
WriteLiteral(">\r\n </td>\r\n </tr>\r\n </table>\r\n " + WriteLiteral("></td>\r\n </tr>\r\n </table>\r\n </div>\r\n <div" +
" </div>\r\n <div"); "");
WriteLiteral(" class=\"sessionProgress clearfix\""); WriteLiteral(" class=\"sessionProgress clearfix\"");
@@ -200,17 +190,17 @@ WriteLiteral(" class=\"sessionStart\"");
WriteLiteral(" data-bind=\"text: startTime\""); WriteLiteral(" data-bind=\"text: startTime\"");
WriteLiteral(">\r\n </p>\r\n <p"); WriteLiteral("></p>\r\n <p");
WriteLiteral(" class=\"sessionStatus\""); WriteLiteral(" class=\"sessionStatus\"");
WriteLiteral(" data-bind=\"text: progressStatus\""); WriteLiteral(" data-bind=\"text: progressStatus\"");
WriteLiteral(">\r\n </p>\r\n <div"); WriteLiteral("></p>\r\n <div");
WriteLiteral(" data-bind=\"visible: !sessionEnded(), progressValue: progressValue\""); WriteLiteral(" data-bind=\"visible: !sessionEnded(), progressValue: progressValue\"");
WriteLiteral(">\r\n </div>\r\n </div>\r\n <div"); WriteLiteral("></div>\r\n </div>\r\n <div");
WriteLiteral(" class=\"sessionInfoContainer clearfix\""); WriteLiteral(" class=\"sessionInfoContainer clearfix\"");
@@ -227,14 +217,12 @@ WriteLiteral(">\r\n <thead>\r\n <tr>\r
WriteLiteral(" class=\"icon\""); WriteLiteral(" class=\"icon\"");
WriteLiteral(">\r\n &nbsp;\r\n </th>\r\n " + WriteLiteral(">&nbsp;</th>\r\n <th");
" <th");
WriteLiteral(" class=\"message\""); WriteLiteral(" class=\"message\"");
WriteLiteral(">\r\n Message\r\n </th>\r\n " + WriteLiteral(">Message</th>\r\n </tr>\r\n </thead>\r\n " +
" </tr>\r\n </thead>\r\n </tab" + " </table>\r\n <div");
"le>\r\n <div");
WriteLiteral(" class=\"logEventsViewportContainer\""); WriteLiteral(" class=\"logEventsViewportContainer\"");
@@ -244,10 +232,9 @@ WriteLiteral(" class=\"logEventsViewportNoLogs\"");
WriteLiteral(" data-bind=\"visible: messages().length == 0\""); WriteLiteral(" data-bind=\"visible: messages().length == 0\"");
WriteLiteral("\r\n style=\"display: none\""); WriteLiteral(" style=\"display: none\"");
WriteLiteral(">\r\n No logs\r\n </div>\r\n " + WriteLiteral(">No logs</div>\r\n <table");
" <table");
WriteLiteral(" class=\"logEventsViewport\""); WriteLiteral(" class=\"logEventsViewport\"");
@@ -275,7 +262,7 @@ WriteLiteral("></i></td>\r\n <td");
WriteLiteral(" class=\"message\""); WriteLiteral(" class=\"message\"");
WriteLiteral(" data-bind=\"text: FormattedMessage, attr: {title: EventTypeName}\""); WriteLiteral(" data-bind=\"text: FormattedMessage, attr: { title: EventTypeName }\"");
WriteLiteral("></td>\r\n </tr>\r\n </tbody>\r\n " + WriteLiteral("></td>\r\n </tr>\r\n </tbody>\r\n " +
" </table>\r\n </div>\r\n </div>\r\n " + " </table>\r\n </div>\r\n </div>\r\n " +
@@ -323,7 +310,7 @@ WriteLiteral(@">
var deviceBaseUrl = '"); var deviceBaseUrl = '");
#line 140 "..\..\Areas\Config\Views\Enrolment\Status.cshtml" #line 107 "..\..\Areas\Config\Views\Enrolment\Status.cshtml"
Write(Url.Action(MVC.Device.Show())); Write(Url.Action(MVC.Device.Show()));
@@ -332,7 +319,7 @@ WriteLiteral(@">
WriteLiteral("/\'\r\n var deviceModelImageUrl = \'"); WriteLiteral("/\'\r\n var deviceModelImageUrl = \'");
#line 141 "..\..\Areas\Config\Views\Enrolment\Status.cshtml" #line 108 "..\..\Areas\Config\Views\Enrolment\Status.cshtml"
Write(Url.Action(MVC.API.DeviceModel.Image())); Write(Url.Action(MVC.API.DeviceModel.Image()));
@@ -341,7 +328,7 @@ WriteLiteral("/\'\r\n var deviceModelImageUrl = \'");
WriteLiteral("/\'\r\n var iconWarningUrl = \'url("); WriteLiteral("/\'\r\n var iconWarningUrl = \'url(");
#line 142 "..\..\Areas\Config\Views\Enrolment\Status.cshtml" #line 109 "..\..\Areas\Config\Views\Enrolment\Status.cshtml"
Write(Links.ClientSource.Style.Images.Status.warning32_png); Write(Links.ClientSource.Style.Images.Status.warning32_png);
@@ -350,7 +337,7 @@ WriteLiteral("/\'\r\n var iconWarningUrl = \'url(");
WriteLiteral(")\';\r\n var iconErrorUrl = \'url("); WriteLiteral(")\';\r\n var iconErrorUrl = \'url(");
#line 143 "..\..\Areas\Config\Views\Enrolment\Status.cshtml" #line 110 "..\..\Areas\Config\Views\Enrolment\Status.cshtml"
Write(Links.ClientSource.Style.Images.Status.fail32_png); Write(Links.ClientSource.Style.Images.Status.fail32_png);
@@ -447,13 +434,13 @@ WriteLiteral(")\';\r\n\r\n function pageViewModel() {\r\n var
"ult:\r\n session.messages.unshift(log);\r\n " + "ult:\r\n session.messages.unshift(log);\r\n " +
" }\r\n }\r\n }\r\n }\r\n function init() {\r" + " }\r\n }\r\n }\r\n }\r\n function init() {\r" +
"\n hostDialogSessions.dialog({\r\n modal: true,\r\n " + "\n hostDialogSessions.dialog({\r\n modal: true,\r\n " +
" height: 664,\r\n width: 900,\r\n resizable: fa" + " height: 574,\r\n width: 900,\r\n resizable: fa" +
"lse,\r\n autoOpen: false\r\n });\r\n //hostDialog" + "lse,\r\n autoOpen: false\r\n });\r\n //hostDialog" +
"SessionsProgress.progressbar();\r\n\r\n // Create View Model\r\n " + "SessionsProgress.progressbar();\r\n\r\n // Create View Model\r\n " +
" vm = new pageViewModel();\r\n $.ajax({\r\n url: \'"); " vm = new pageViewModel();\r\n $.ajax({\r\n url: \'");
#line 307 "..\..\Areas\Config\Views\Enrolment\Status.cshtml" #line 274 "..\..\Areas\Config\Views\Enrolment\Status.cshtml"
Write(Url.Action(MVC.API.DeviceModel.Index())); Write(Url.Action(MVC.API.DeviceModel.Index()));
@@ -487,7 +474,7 @@ WriteLiteral(@"',
url: '"); url: '");
#line 332 "..\..\Areas\Config\Views\Enrolment\Status.cshtml" #line 299 "..\..\Areas\Config\Views\Enrolment\Status.cshtml"
Write(Url.Action(MVC.API.Logging.RetrieveEvents())); Write(Url.Action(MVC.API.Logging.RetrieveEvents()));
@@ -526,27 +513,32 @@ WriteLiteral(@"',
$.connection.hub.qs = { LogModules: '"); $.connection.hub.qs = { LogModules: '");
#line 362 "..\..\Areas\Config\Views\Enrolment\Status.cshtml" #line 329 "..\..\Areas\Config\Views\Enrolment\Status.cshtml"
Write(Disco.BI.DeviceBI.EnrolmentLog.Current.LiveLogGroupName); Write(Disco.BI.DeviceBI.EnrolmentLog.Current.LiveLogGroupName);
#line default #line default
#line hidden #line hidden
WriteLiteral(@"' }; WriteLiteral("\' };\r\n $.connection.hub.error(onHubFailed);\r\n\r\n $.connectio" +
$.connection.hub.error(function (error) { "n.hub.start()\r\n .done(function () { isLive = true; })\r\n " +
alert('Live-Log Error: ' + error); " .fail(onHubFailed);\r\n\r\n function onHubFailed(error) {\r\n " +
}); " // Show Dialog Message\r\n if ($(\'.disconnected-dialog\').le" +
"ngth == 0) {\r\n $(\'<div>\')\r\n .addClass(" +
$.connection.hub.start() "\'dialog disconnected-dialog\')\r\n .html(\'<h3><span class=\"f" +
.done(function () { isLive = true; }) "a-stack fa-lg\"><i class=\"fa fa-wifi fa-stack-1x\"></i><i class=\"fa fa-ban fa-stac" +
.fail(function (error) { "k-2x error\"></i></span>Disconnected from the Disco ICT Server</h3><div>This page" +
alert('Live-Log Connection Error: ' + error); " is not receiving live updates. Please ensure you are connected to the server, t" +
}); "hen refresh this page to enable features.</div>\')\r\n .dial" +
} "og({\r\n resizable: false,\r\n " +
init(); " title: \'Disconnected\',\r\n width: 400,\r\n " +
}); " modal: true,\r\n buttons: {\r\n " +
</script> " \'Refresh Now\': function () {\r\n " +
"); " $(this).dialog(\'option\', \'buttons\', null);\r\n " +
" window.location.reload(true);\r\n },\r\n " +
" \'Close\': function () {\r\n " +
" $(this).dialog(\'destroy\');\r\n }\r\n " +
" }\r\n });\r\n }\r\n }" +
"\r\n }\r\n init();\r\n });\r\n</script>\r\n");
} }
} }
@@ -12,5 +12,6 @@
Html.BundleDeferred("~/ClientScripts/Modules/Disco-AjaxHelperIcons"); Html.BundleDeferred("~/ClientScripts/Modules/Disco-AjaxHelperIcons");
} }
Html.RenderPartial(MVC.Config.JobPreferences.Views.Parts.General); Html.RenderPartial(MVC.Config.JobPreferences.Views.Parts.General);
Html.RenderPartial(MVC.Config.JobPreferences.Views.Parts.Reports);
Html.RenderPartial(MVC.Config.JobPreferences.Views.Parts.Locations); Html.RenderPartial(MVC.Config.JobPreferences.Views.Parts.Locations);
} }
@@ -59,6 +59,7 @@ namespace Disco.Web.Areas.Config.Views.JobPreferences
Html.BundleDeferred("~/ClientScripts/Modules/Disco-AjaxHelperIcons"); Html.BundleDeferred("~/ClientScripts/Modules/Disco-AjaxHelperIcons");
} }
Html.RenderPartial(MVC.Config.JobPreferences.Views.Parts.General); Html.RenderPartial(MVC.Config.JobPreferences.Views.Parts.General);
Html.RenderPartial(MVC.Config.JobPreferences.Views.Parts.Reports);
Html.RenderPartial(MVC.Config.JobPreferences.Views.Parts.Locations); Html.RenderPartial(MVC.Config.JobPreferences.Views.Parts.Locations);
@@ -0,0 +1,249 @@
@model Disco.Web.Areas.Config.Models.JobPreferences.IndexModel
@{
Authorization.Require(Claims.Config.JobPreferences.Show);
var canConfig = Authorization.Has(Claims.Config.JobPreferences.Configure);
}
<div id="Config_ReportPrefs" class="form" style="width: 530px;">
<h2>Report Preferences</h2>
<table>
<tr>
<th style="width: 200px">Noticeboard Default Theme:
</th>
<td>@if (canConfig)
{
@Html.DropDownListFor(model => model.DefaultNoticeboardTheme, Model.DefaultNoticeboardThemeOptions().Select(o => new SelectListItem() { Value = o.Key, Text = o.Value }))
@AjaxHelpers.AjaxSave()
@AjaxHelpers.AjaxLoader()
<script type="text/javascript">
$(function () {
$element = $('#DefaultNoticeboardTheme');
document.DiscoFunctions.PropertyChangeHelper(
$element,
null,
'@(Url.Action(MVC.API.JobPreferences.UpdateDefaultNoticeboardTheme()))',
'DefaultNoticeboardTheme');
$element.change(function () {
$('#Config_ReportPrefs_Preview').attr('class', 'theme-' + $(this).val());
});
});
</script>
}
else
{
@Model.DefaultNoticeboardThemeOptions().First(o => o.Key == Model.DefaultNoticeboardTheme).Value
}
<div id="Config_ReportPrefs_Preview" class="theme-@(Model.DefaultNoticeboardTheme)">
<div class="heading">Noticeboard Heading</div>
<div class="column-heading">Column One</div>
<div class="column-heading">Column Two</div>
<div class="column-heading">Column Three</div>
<div class="column"><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span></div>
<div class="column"><span></span><span class="alert"></span><span></span><span></span></div>
<div class="column"><span></span><span></span><span class="alert"></span><span></span><span class="alert"></span><span></span><span></span><span></span><span></span><span></span></div>
</div>
</td>
</tr>
<tr>
<th>&nbsp;</th>
<td>
<button id="Config_ReportPrefs_Builder_Button" class="button small">Link Builder</button>
<div class="info-box">
<p class="fa-p">
<i class="fa fa-info-circle"></i>Report Links can be created which override the default theme and filter the data shown.
</p>
</div>
<div id="Config_ReportPrefs_Builder" title="Report Link Builder" class="dialog">
<form>
<div class="report">
<h3>Report</h3>
<ul class="none">
<li>
<input type="radio" id="Config_ReportPrefs_Builder_NTHDU" name="Report" class="themeable" data-url="@(Url.ActionAbsolute(MVC.Public.UserHeldDevices.Noticeboard()))" checked="checked" /><label for="Config_ReportPrefs_Builder_NTHDU">Technician Held Devices for Users (Noticeboard)</label>
</li>
<li>
<input type="radio" id="Config_ReportPrefs_Builder_THDU" name="Report" data-url="@(Url.ActionAbsolute(MVC.Public.UserHeldDevices.Index()))" /><label for="Config_ReportPrefs_Builder_THDU">Technician Held Devices for Users (Report)</label>
</li>
<li>
<input type="radio" id="Config_ReportPrefs_Builder_NTHD" name="Report" class="themeable" data-url="@(Url.ActionAbsolute(MVC.Public.HeldDevices.Noticeboard()))" /><label for="Config_ReportPrefs_Builder_NTHD">Technician Held Devices (Noticeboard)</label>
</li>
<li>
<input type="radio" id="Config_ReportPrefs_Builder_THD" name="Report" data-url="@(Url.ActionAbsolute(MVC.Public.HeldDevices.Index()))" /><label for="Config_ReportPrefs_Builder_THD">Technician Held Devices (Report)</label>
</li>
</ul>
</div>
<div class="theme">
<h3>Noticeboard Theme</h3>
@Html.DropDownList("Config_ReportPrefs_Builder_Theme", new SelectListItem[] { new SelectListItem() { Value = "", Text = "<Default>", Selected = true } }.Concat(Model.DefaultNoticeboardThemeOptions().Select(o => new SelectListItem() { Value = o.Key, Text = o.Value })))
</div>
<div class="filter">
<h3>Filter</h3>
<select id="Config_ReportPrefs_Builder_Filter">
<option value="">&lt;None&gt;</option>
<option value="DeviceProfile">Device Profile</option>
<option value="DeviceAddress">Device Profile Address</option>
</select>
<div class="options">
<div class="method">
<input type="radio" id="Config_ReportPrefs_Builder_I" name="FilterAction" value="Include" checked="checked" /><label for="Config_ReportPrefs_Builder_I">Include</label>
<input type="radio" id="Config_ReportPrefs_Builder_E" name="FilterAction" value="Exclude" /><label for="Config_ReportPrefs_Builder_E">Exclude</label>
</div>
<div class="filter-option filter-DeviceProfile">
<ul class="none">
@foreach (var deviceProfile in Model.DeviceProfiles.Value)
{
<li>
<input id="Config_ReportPrefs_Builder_DP_@(deviceProfile.Id)" type="checkbox" value="@deviceProfile.Id" /><label for="Config_ReportPrefs_Builder_DP_@(deviceProfile.Id)">@deviceProfile.Description</label></li>
}
</ul>
</div>
<div class="filter-option filter-DeviceAddress">
<ul class="none">
@foreach (var address in Model.OrganisationAddresses.Value)
{
<li>
<input id="Config_ReportPrefs_Builder_OA_@(address.Id)" type="checkbox" value="@address.ShortName" /><label for="Config_ReportPrefs_Builder_OA_@(address.Id)">@address.Name (@address.ShortName)</label></li>
}
</ul>
</div>
</div>
</div>
</form>
<div class="output">
<textarea readonly></textarea>
<a href="#" target="_blank"><i class="fa fa-external-link" title="Open Link"></i></a>
<i class="fa fa-clipboard" title="Copy Link to Clipboard"></i>
</div>
</div>
<script>
$(function () {
var dialog, url;
function updateUrl() {
var theme = null;
var filter = null;
var filterMethod = null;
var filterValue = null;
var report = dialog.find('.report input:checked');
if (report.length > 0) {
url = report.attr('data-url');
if (report.hasClass('themeable')) {
theme = dialog.find('.theme > select').val();
}
filter = dialog.find('.filter > select').val();
if (!!filter) {
filterMethod = dialog.find('.filter .method input:checked').val();
filterValue = dialog
.find('.filter .filter-' + filter)
.find('input:checked')
.map(function (index, element) { return $(element).val(); })
.toArray().join(',');
}
if (!!theme || !!filter) {
url += '?';
if (!!theme)
url += 'theme=' + theme;
if (!!theme && !!filter)
url += '&';
if (!!filter)
url += filter + filterMethod + '=' + filterValue;
}
}
$('#Config_ReportPrefs_Builder_Buttonpane').find('textarea').val(url);
$('#Config_ReportPrefs_Builder_Buttonpane').find('.fa-external-link').closest('a').attr('href', url);
}
$('#Config_ReportPrefs_Builder_Button').click(function () {
if (!dialog) {
dialog = $('#Config_ReportPrefs_Builder').dialog({
resizable: false,
modal: true,
autoOpen: false,
width: 550,
maxHeight: 520,
buttons: {
Close: function () {
dialog.dialog('close');
}
}
});
dialog.find('.report').on('change', 'input', function () {
var $this = $(this);
var $theme = dialog.find('.theme');
if ($this.hasClass('themeable'))
$theme.slideDown();
else
$theme.slideUp();
updateUrl();
});
dialog.find('#Config_ReportPrefs_Builder_Theme').change(updateUrl);
dialog.find('#Config_ReportPrefs_Builder_Filter').change(function () {
var $this = $(this);
var $filter = dialog.find('.options');
if (!$this.val())
$filter.slideUp();
else {
$filter.find('.filter-option').hide();
$filter.show();
$filter.find('.filter-' + $this.val()).slideDown();
}
updateUrl();
});
dialog.find('.filter .options').on('click', 'input', updateUrl);
var $buttonpane = dialog.closest('.ui-dialog').children('.ui-dialog-buttonpane');
$buttonpane.attr('id', 'Config_ReportPrefs_Builder_Buttonpane').append(dialog.children('.output'));
$buttonpane.find('textarea').focus(function () {
$(this).select();
});
var $clipboard = $buttonpane.find('.fa-clipboard');
if (!!window.clipboardData) {
$clipboard.click(function () {
window.clipboardData.setData('Text', url);
alert('Link copied to Clipboard');
return false;
});
} else {
$clipboard.hide();
}
}
dialog.dialog('open');
updateUrl();
return false;
});
});
</script>
</td>
</tr>
</table>
</div>
@@ -0,0 +1,728 @@
#pragma warning disable 1591
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.34014
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace Disco.Web.Areas.Config.Views.JobPreferences.Parts
{
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;
using Disco.BI.Extensions;
using Disco.Models.Repository;
using Disco.Services;
using Disco.Services.Authorization;
using Disco.Services.Web;
using Disco.Web;
using Disco.Web.Extensions;
[System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "2.0.0.0")]
[System.Web.WebPages.PageVirtualPathAttribute("~/Areas/Config/Views/JobPreferences/Parts/Reports.cshtml")]
public partial class Reports : Disco.Services.Web.WebViewPage<Disco.Web.Areas.Config.Models.JobPreferences.IndexModel>
{
public Reports()
{
}
public override void Execute()
{
#line 2 "..\..\Areas\Config\Views\JobPreferences\Parts\Reports.cshtml"
Authorization.Require(Claims.Config.JobPreferences.Show);
var canConfig = Authorization.Has(Claims.Config.JobPreferences.Configure);
#line default
#line hidden
WriteLiteral("\r\n<div");
WriteLiteral(" id=\"Config_ReportPrefs\"");
WriteLiteral(" class=\"form\"");
WriteLiteral(" style=\"width: 530px;\"");
WriteLiteral(">\r\n <h2>Report Preferences</h2>\r\n <table>\r\n <tr>\r\n <th");
WriteLiteral(" style=\"width: 200px\"");
WriteLiteral(">Noticeboard Default Theme:\r\n </th>\r\n <td>");
#line 13 "..\..\Areas\Config\Views\JobPreferences\Parts\Reports.cshtml"
if (canConfig)
{
#line default
#line hidden
#line 15 "..\..\Areas\Config\Views\JobPreferences\Parts\Reports.cshtml"
Write(Html.DropDownListFor(model => model.DefaultNoticeboardTheme, Model.DefaultNoticeboardThemeOptions().Select(o => new SelectListItem() { Value = o.Key, Text = o.Value })));
#line default
#line hidden
#line 15 "..\..\Areas\Config\Views\JobPreferences\Parts\Reports.cshtml"
#line default
#line hidden
#line 16 "..\..\Areas\Config\Views\JobPreferences\Parts\Reports.cshtml"
Write(AjaxHelpers.AjaxSave());
#line default
#line hidden
#line 16 "..\..\Areas\Config\Views\JobPreferences\Parts\Reports.cshtml"
#line default
#line hidden
#line 17 "..\..\Areas\Config\Views\JobPreferences\Parts\Reports.cshtml"
Write(AjaxHelpers.AjaxLoader());
#line default
#line hidden
#line 17 "..\..\Areas\Config\Views\JobPreferences\Parts\Reports.cshtml"
#line default
#line hidden
WriteLiteral(" <script");
WriteLiteral(" type=\"text/javascript\"");
WriteLiteral(@">
$(function () {
$element = $('#DefaultNoticeboardTheme');
document.DiscoFunctions.PropertyChangeHelper(
$element,
null,
'");
#line 25 "..\..\Areas\Config\Views\JobPreferences\Parts\Reports.cshtml"
Write(Url.Action(MVC.API.JobPreferences.UpdateDefaultNoticeboardTheme()));
#line default
#line hidden
WriteLiteral(@"',
'DefaultNoticeboardTheme');
$element.change(function () {
$('#Config_ReportPrefs_Preview').attr('class', 'theme-' + $(this).val());
});
});
</script>
");
#line 33 "..\..\Areas\Config\Views\JobPreferences\Parts\Reports.cshtml"
}
else
{
#line default
#line hidden
#line 36 "..\..\Areas\Config\Views\JobPreferences\Parts\Reports.cshtml"
Write(Model.DefaultNoticeboardThemeOptions().First(o => o.Key == Model.DefaultNoticeboardTheme).Value);
#line default
#line hidden
#line 36 "..\..\Areas\Config\Views\JobPreferences\Parts\Reports.cshtml"
}
#line default
#line hidden
WriteLiteral(" <div");
WriteLiteral(" id=\"Config_ReportPrefs_Preview\"");
WriteAttribute("class", Tuple.Create(" class=\"", 1694), Tuple.Create("\"", 1740)
, Tuple.Create(Tuple.Create("", 1702), Tuple.Create("theme-", 1702), true)
#line 38 "..\..\Areas\Config\Views\JobPreferences\Parts\Reports.cshtml"
, Tuple.Create(Tuple.Create("", 1708), Tuple.Create<System.Object, System.Int32>(Model.DefaultNoticeboardTheme
#line default
#line hidden
, 1708), false)
);
WriteLiteral(">\r\n <div");
WriteLiteral(" class=\"heading\"");
WriteLiteral(">Noticeboard Heading</div>\r\n <div");
WriteLiteral(" class=\"column-heading\"");
WriteLiteral(">Column One</div>\r\n <div");
WriteLiteral(" class=\"column-heading\"");
WriteLiteral(">Column Two</div>\r\n <div");
WriteLiteral(" class=\"column-heading\"");
WriteLiteral(">Column Three</div>\r\n <div");
WriteLiteral(" class=\"column\"");
WriteLiteral("><span></span><span></span><span></span><span></span><span></span><span></span><s" +
"pan></span><span></span></div>\r\n <div");
WriteLiteral(" class=\"column\"");
WriteLiteral("><span></span><span");
WriteLiteral(" class=\"alert\"");
WriteLiteral("></span><span></span><span></span></div>\r\n <div");
WriteLiteral(" class=\"column\"");
WriteLiteral("><span></span><span></span><span");
WriteLiteral(" class=\"alert\"");
WriteLiteral("></span><span></span><span");
WriteLiteral(" class=\"alert\"");
WriteLiteral("></span><span></span><span></span><span></span><span></span><span></span></div>\r\n" +
" </div>\r\n </td>\r\n </tr>\r\n <tr>\r\n " +
" <th>&nbsp;</th>\r\n <td>\r\n <button");
WriteLiteral(" id=\"Config_ReportPrefs_Builder_Button\"");
WriteLiteral(" class=\"button small\"");
WriteLiteral(">Link Builder</button>\r\n <div");
WriteLiteral(" class=\"info-box\"");
WriteLiteral(">\r\n <p");
WriteLiteral(" class=\"fa-p\"");
WriteLiteral(">\r\n <i");
WriteLiteral(" class=\"fa fa-info-circle\"");
WriteLiteral("></i>Report Links can be created which override the default theme and filter the " +
"data shown.\r\n </p>\r\n </div>\r\n <" +
"div");
WriteLiteral(" id=\"Config_ReportPrefs_Builder\"");
WriteLiteral(" title=\"Report Link Builder\"");
WriteLiteral(" class=\"dialog\"");
WriteLiteral(">\r\n <form>\r\n <div");
WriteLiteral(" class=\"report\"");
WriteLiteral(">\r\n <h3>Report</h3>\r\n <ul");
WriteLiteral(" class=\"none\"");
WriteLiteral(">\r\n <li>\r\n <inp" +
"ut");
WriteLiteral(" type=\"radio\"");
WriteLiteral(" id=\"Config_ReportPrefs_Builder_NTHDU\"");
WriteLiteral(" name=\"Report\"");
WriteLiteral(" class=\"themeable\"");
WriteLiteral(" data-url=\"");
#line 64 "..\..\Areas\Config\Views\JobPreferences\Parts\Reports.cshtml"
Write(Url.ActionAbsolute(MVC.Public.UserHeldDevices.Noticeboard()));
#line default
#line hidden
WriteLiteral("\"");
WriteLiteral(" checked=\"checked\"");
WriteLiteral(" /><label");
WriteLiteral(" for=\"Config_ReportPrefs_Builder_NTHDU\"");
WriteLiteral(">Technician Held Devices for Users (Noticeboard)</label>\r\n " +
" </li>\r\n <li>\r\n " +
" <input");
WriteLiteral(" type=\"radio\"");
WriteLiteral(" id=\"Config_ReportPrefs_Builder_THDU\"");
WriteLiteral(" name=\"Report\"");
WriteLiteral(" data-url=\"");
#line 67 "..\..\Areas\Config\Views\JobPreferences\Parts\Reports.cshtml"
Write(Url.ActionAbsolute(MVC.Public.UserHeldDevices.Index()));
#line default
#line hidden
WriteLiteral("\"");
WriteLiteral(" /><label");
WriteLiteral(" for=\"Config_ReportPrefs_Builder_THDU\"");
WriteLiteral(">Technician Held Devices for Users (Report)</label>\r\n " +
" </li>\r\n <li>\r\n " +
" <input");
WriteLiteral(" type=\"radio\"");
WriteLiteral(" id=\"Config_ReportPrefs_Builder_NTHD\"");
WriteLiteral(" name=\"Report\"");
WriteLiteral(" class=\"themeable\"");
WriteLiteral(" data-url=\"");
#line 70 "..\..\Areas\Config\Views\JobPreferences\Parts\Reports.cshtml"
Write(Url.ActionAbsolute(MVC.Public.HeldDevices.Noticeboard()));
#line default
#line hidden
WriteLiteral("\"");
WriteLiteral(" /><label");
WriteLiteral(" for=\"Config_ReportPrefs_Builder_NTHD\"");
WriteLiteral(">Technician Held Devices (Noticeboard)</label>\r\n <" +
"/li>\r\n <li>\r\n " +
"<input");
WriteLiteral(" type=\"radio\"");
WriteLiteral(" id=\"Config_ReportPrefs_Builder_THD\"");
WriteLiteral(" name=\"Report\"");
WriteLiteral(" data-url=\"");
#line 73 "..\..\Areas\Config\Views\JobPreferences\Parts\Reports.cshtml"
Write(Url.ActionAbsolute(MVC.Public.HeldDevices.Index()));
#line default
#line hidden
WriteLiteral("\"");
WriteLiteral(" /><label");
WriteLiteral(" for=\"Config_ReportPrefs_Builder_THD\"");
WriteLiteral(">Technician Held Devices (Report)</label>\r\n </li>\r" +
"\n </ul>\r\n </div>\r\n " +
" <div");
WriteLiteral(" class=\"theme\"");
WriteLiteral(">\r\n <h3>Noticeboard Theme</h3>\r\n");
WriteLiteral(" ");
#line 79 "..\..\Areas\Config\Views\JobPreferences\Parts\Reports.cshtml"
Write(Html.DropDownList("Config_ReportPrefs_Builder_Theme", new SelectListItem[] { new SelectListItem() { Value = "", Text = "<Default>", Selected = true } }.Concat(Model.DefaultNoticeboardThemeOptions().Select(o => new SelectListItem() { Value = o.Key, Text = o.Value }))));
#line default
#line hidden
WriteLiteral("\r\n </div>\r\n <div");
WriteLiteral(" class=\"filter\"");
WriteLiteral(">\r\n <h3>Filter</h3>\r\n <sele" +
"ct");
WriteLiteral(" id=\"Config_ReportPrefs_Builder_Filter\"");
WriteLiteral(">\r\n <option");
WriteLiteral(" value=\"\"");
WriteLiteral(">&lt;None&gt;</option>\r\n <option");
WriteLiteral(" value=\"DeviceProfile\"");
WriteLiteral(">Device Profile</option>\r\n <option");
WriteLiteral(" value=\"DeviceAddress\"");
WriteLiteral(">Device Profile Address</option>\r\n </select>\r\n " +
" <div");
WriteLiteral(" class=\"options\"");
WriteLiteral(">\r\n <div");
WriteLiteral(" class=\"method\"");
WriteLiteral(">\r\n <input");
WriteLiteral(" type=\"radio\"");
WriteLiteral(" id=\"Config_ReportPrefs_Builder_I\"");
WriteLiteral(" name=\"FilterAction\"");
WriteLiteral(" value=\"Include\"");
WriteLiteral(" checked=\"checked\"");
WriteLiteral(" /><label");
WriteLiteral(" for=\"Config_ReportPrefs_Builder_I\"");
WriteLiteral(">Include</label>\r\n <input");
WriteLiteral(" type=\"radio\"");
WriteLiteral(" id=\"Config_ReportPrefs_Builder_E\"");
WriteLiteral(" name=\"FilterAction\"");
WriteLiteral(" value=\"Exclude\"");
WriteLiteral(" /><label");
WriteLiteral(" for=\"Config_ReportPrefs_Builder_E\"");
WriteLiteral(">Exclude</label>\r\n </div>\r\n " +
" <div");
WriteLiteral(" class=\"filter-option filter-DeviceProfile\"");
WriteLiteral(">\r\n <ul");
WriteLiteral(" class=\"none\"");
WriteLiteral(">\r\n");
#line 95 "..\..\Areas\Config\Views\JobPreferences\Parts\Reports.cshtml"
#line default
#line hidden
#line 95 "..\..\Areas\Config\Views\JobPreferences\Parts\Reports.cshtml"
foreach (var deviceProfile in Model.DeviceProfiles.Value)
{
#line default
#line hidden
WriteLiteral(" <li>\r\n " +
" <input");
WriteAttribute("id", Tuple.Create(" id=\"", 6584), Tuple.Create("\"", 6638)
, Tuple.Create(Tuple.Create("", 6589), Tuple.Create("Config_ReportPrefs_Builder_DP_", 6589), true)
#line 98 "..\..\Areas\Config\Views\JobPreferences\Parts\Reports.cshtml"
, Tuple.Create(Tuple.Create("", 6619), Tuple.Create<System.Object, System.Int32>(deviceProfile.Id
#line default
#line hidden
, 6619), false)
);
WriteLiteral(" type=\"checkbox\"");
WriteAttribute("value", Tuple.Create(" value=\"", 6655), Tuple.Create("\"", 6680)
#line 98 "..\..\Areas\Config\Views\JobPreferences\Parts\Reports.cshtml"
, Tuple.Create(Tuple.Create("", 6663), Tuple.Create<System.Object, System.Int32>(deviceProfile.Id
#line default
#line hidden
, 6663), false)
);
WriteLiteral(" /><label");
WriteAttribute("for", Tuple.Create(" for=\"", 6690), Tuple.Create("\"", 6745)
, Tuple.Create(Tuple.Create("", 6696), Tuple.Create("Config_ReportPrefs_Builder_DP_", 6696), true)
#line 98 "..\..\Areas\Config\Views\JobPreferences\Parts\Reports.cshtml"
, Tuple.Create(Tuple.Create("", 6726), Tuple.Create<System.Object, System.Int32>(deviceProfile.Id
#line default
#line hidden
, 6726), false)
);
WriteLiteral(">");
#line 98 "..\..\Areas\Config\Views\JobPreferences\Parts\Reports.cshtml"
Write(deviceProfile.Description);
#line default
#line hidden
WriteLiteral("</label></li>\r\n");
#line 99 "..\..\Areas\Config\Views\JobPreferences\Parts\Reports.cshtml"
}
#line default
#line hidden
WriteLiteral(" </ul>\r\n </div>" +
"\r\n <div");
WriteLiteral(" class=\"filter-option filter-DeviceAddress\"");
WriteLiteral(">\r\n <ul");
WriteLiteral(" class=\"none\"");
WriteLiteral(">\r\n");
#line 104 "..\..\Areas\Config\Views\JobPreferences\Parts\Reports.cshtml"
#line default
#line hidden
#line 104 "..\..\Areas\Config\Views\JobPreferences\Parts\Reports.cshtml"
foreach (var address in Model.OrganisationAddresses.Value)
{
#line default
#line hidden
WriteLiteral(" <li>\r\n " +
" <input");
WriteAttribute("id", Tuple.Create(" id=\"", 7299), Tuple.Create("\"", 7347)
, Tuple.Create(Tuple.Create("", 7304), Tuple.Create("Config_ReportPrefs_Builder_OA_", 7304), true)
#line 107 "..\..\Areas\Config\Views\JobPreferences\Parts\Reports.cshtml"
, Tuple.Create(Tuple.Create("", 7334), Tuple.Create<System.Object, System.Int32>(address.Id
#line default
#line hidden
, 7334), false)
);
WriteLiteral(" type=\"checkbox\"");
WriteAttribute("value", Tuple.Create(" value=\"", 7364), Tuple.Create("\"", 7390)
#line 107 "..\..\Areas\Config\Views\JobPreferences\Parts\Reports.cshtml"
, Tuple.Create(Tuple.Create("", 7372), Tuple.Create<System.Object, System.Int32>(address.ShortName
#line default
#line hidden
, 7372), false)
);
WriteLiteral(" /><label");
WriteAttribute("for", Tuple.Create(" for=\"", 7400), Tuple.Create("\"", 7449)
, Tuple.Create(Tuple.Create("", 7406), Tuple.Create("Config_ReportPrefs_Builder_OA_", 7406), true)
#line 107 "..\..\Areas\Config\Views\JobPreferences\Parts\Reports.cshtml"
, Tuple.Create(Tuple.Create("", 7436), Tuple.Create<System.Object, System.Int32>(address.Id
#line default
#line hidden
, 7436), false)
);
WriteLiteral(">");
#line 107 "..\..\Areas\Config\Views\JobPreferences\Parts\Reports.cshtml"
Write(address.Name);
#line default
#line hidden
WriteLiteral(" (");
#line 107 "..\..\Areas\Config\Views\JobPreferences\Parts\Reports.cshtml"
Write(address.ShortName);
#line default
#line hidden
WriteLiteral(")</label></li>\r\n");
#line 108 "..\..\Areas\Config\Views\JobPreferences\Parts\Reports.cshtml"
}
#line default
#line hidden
WriteLiteral(" </ul>\r\n </div>" +
"\r\n </div>\r\n </div>\r\n " +
" </form>\r\n <div");
WriteLiteral(" class=\"output\"");
WriteLiteral(">\r\n <textarea readonly></textarea>\r\n " +
" <a");
WriteLiteral(" href=\"#\"");
WriteLiteral(" target=\"_blank\"");
WriteLiteral("><i");
WriteLiteral(" class=\"fa fa-external-link\"");
WriteLiteral(" title=\"Open Link\"");
WriteLiteral("></i></a>\r\n <i");
WriteLiteral(" class=\"fa fa-clipboard\"");
WriteLiteral(" title=\"Copy Link to Clipboard\"");
WriteLiteral("></i>\r\n </div>\r\n </div>\r\n <scrip" +
"t>\r\n $(function () {\r\n var dialog, url" +
";\r\n\r\n function updateUrl() {\r\n " +
" var theme = null;\r\n var filter = null;\r\n " +
" var filterMethod = null;\r\n var filter" +
"Value = null;\r\n\r\n var report = dialog.find(\'.report i" +
"nput:checked\');\r\n if (report.length > 0) {\r\n " +
" url = report.attr(\'data-url\');\r\n\r\n " +
" if (report.hasClass(\'themeable\')) {\r\n " +
" theme = dialog.find(\'.theme > select\').val();\r\n " +
" }\r\n\r\n filter = dialog.find(\'.filter > select\').v" +
"al();\r\n\r\n if (!!filter) {\r\n " +
" filterMethod = dialog.find(\'.filter .method input:checked\').val();" +
"\r\n\r\n filterValue = dialog\r\n " +
" .find(\'.filter .filter-\' + filter)\r\n " +
" .find(\'input:checked\')\r\n " +
" .map(function (index, element) { return $(element).val(); })\r\n " +
" .toArray().join(\',\');\r\n }" +
"\r\n\r\n if (!!theme || !!filter) {\r\n " +
" url += \'?\';\r\n\r\n if (!!the" +
"me)\r\n url += \'theme=\' + theme;\r\n\r\n " +
" if (!!theme && !!filter)\r\n " +
" url += \'&\';\r\n\r\n if (!!filter)\r" +
"\n url += filter + filterMethod + \'=\' + fi" +
"lterValue;\r\n }\r\n }\r\n\r\n" +
" $(\'#Config_ReportPrefs_Builder_Buttonpane\').find(\'te" +
"xtarea\').val(url);\r\n $(\'#Config_ReportPrefs_Builder_B" +
"uttonpane\').find(\'.fa-external-link\').closest(\'a\').attr(\'href\', url);\r\n " +
" }\r\n\r\n $(\'#Config_ReportPrefs_Builder_Butto" +
"n\').click(function () {\r\n\r\n if (!dialog) {\r\n " +
" dialog = $(\'#Config_ReportPrefs_Builder\').dialog({\r\n " +
" resizable: false,\r\n " +
" modal: true,\r\n autoOpen: false,\r\n " +
" width: 550,\r\n m" +
"axHeight: 520,\r\n buttons: {\r\n " +
" Close: function () {\r\n " +
" dialog.dialog(\'close\');\r\n }\r\n " +
" }\r\n });\r\n\r\n " +
" dialog.find(\'.report\').on(\'change\', \'input\', functio" +
"n () {\r\n var $this = $(this);\r\n " +
" var $theme = dialog.find(\'.theme\');\r\n\r\n " +
" if ($this.hasClass(\'themeable\'))\r\n " +
" $theme.slideDown();\r\n else\r\n " +
" $theme.slideUp();\r\n\r\n " +
" updateUrl();\r\n });\r\n\r\n " +
" dialog.find(\'#Config_ReportPrefs_Builder_Theme\').change(updateUr" +
"l);\r\n\r\n dialog.find(\'#Config_ReportPrefs_Builder_" +
"Filter\').change(function () {\r\n var $this = $" +
"(this);\r\n var $filter = dialog.find(\'.options" +
"\');\r\n\r\n if (!$this.val())\r\n " +
" $filter.slideUp();\r\n el" +
"se {\r\n $filter.find(\'.filter-option\').hid" +
"e();\r\n $filter.show();\r\n " +
" $filter.find(\'.filter-\' + $this.val()).slideDown();\r\n " +
" }\r\n\r\n updateU" +
"rl();\r\n });\r\n\r\n di" +
"alog.find(\'.filter .options\').on(\'click\', \'input\', updateUrl);\r\n\r\n " +
" var $buttonpane = dialog.closest(\'.ui-dialog\').children(\'.ui-d" +
"ialog-buttonpane\');\r\n $buttonpane.attr(\'id\', \'Con" +
"fig_ReportPrefs_Builder_Buttonpane\').append(dialog.children(\'.output\'));\r\n\r\n " +
" $buttonpane.find(\'textarea\').focus(function () {\r\n " +
" $(this).select();\r\n " +
" });\r\n\r\n\r\n var $clipboard = $buttonpane.find(" +
"\'.fa-clipboard\');\r\n \r\n " +
" if (!!window.clipboardData) {\r\n $clipboa" +
"rd.click(function () {\r\n window.clipboard" +
"Data.setData(\'Text\', url);\r\n alert(\'Link " +
"copied to Clipboard\');\r\n return false;\r\n " +
" });\r\n } else {" +
"\r\n $clipboard.hide();\r\n " +
" }\r\n\r\n }\r\n\r\n dial" +
"og.dialog(\'open\');\r\n\r\n updateUrl();\r\n\r\n " +
" return false;\r\n });\r\n\r\n " +
"});\r\n </script>\r\n </td>\r\n </tr>\r\n </table>\r\n" +
"</div>\r\n");
}
}
}
#pragma warning restore 1591
@@ -119,8 +119,8 @@
resizable: false, resizable: false,
modal: true, modal: true,
autoOpen: false, autoOpen: false,
width: 750, width: 780,
height: 650, height: 540,
buttons: { buttons: {
"Save": save, "Save": save,
Cancel: cancel Cancel: cancel
@@ -566,7 +566,7 @@
modal: true, modal: true,
autoOpen: false, autoOpen: false,
width: 750, width: 750,
height: 620, height: 560,
buttons: { buttons: {
"Save Changes": saveChanges, "Save Changes": saveChanges,
Cancel: cancel Cancel: cancel
@@ -567,8 +567,8 @@ WriteLiteral(" </div>\r\n
" dialog = $(\'#Config_JobQueues_Icon_Update_Dialog\').dialog({\r\n " + " dialog = $(\'#Config_JobQueues_Icon_Update_Dialog\').dialog({\r\n " +
" resizable: false,\r\n " + " resizable: false,\r\n " +
" modal: true,\r\n autoOpen: f" + " modal: true,\r\n autoOpen: f" +
"alse,\r\n width: 750,\r\n " + "alse,\r\n width: 780,\r\n " +
" height: 650,\r\n " + " height: 540,\r\n " +
" buttons: {\r\n \"Save\": save,\r" + " buttons: {\r\n \"Save\": save,\r" +
"\n Cancel: cancel\r\n " + "\n Cancel: cancel\r\n " +
" }\r\n });\r\n\r\n " + " }\r\n });\r\n\r\n " +
@@ -1741,7 +1741,7 @@ WriteLiteral(" <script>\r\n (function
" resizable: false,\r\n " + " resizable: false,\r\n " +
" modal: true,\r\n autoOpen: " + " modal: true,\r\n autoOpen: " +
"false,\r\n width: 750,\r\n " + "false,\r\n width: 750,\r\n " +
" height: 620,\r\n butto" + " height: 560,\r\n butto" +
"ns: {\r\n \"Save Changes\": saveChanges,\r" + "ns: {\r\n \"Save Changes\": saveChanges,\r" +
"\n Cancel: cancel\r\n " + "\n Cancel: cancel\r\n " +
" }\r\n });\r\n\r\n " + " }\r\n });\r\n\r\n " +
@@ -120,13 +120,33 @@
}; };
$.connection.hub.qs = {LogModules: logModuleLiveGroupName}; $.connection.hub.qs = {LogModules: logModuleLiveGroupName};
$.connection.hub.error(function(error){ $.connection.hub.error(onHubFailed);
alert('Live-Log Error: '+error);
});
$.connection.hub.start().fail(function(error){ $.connection.hub.start().fail(onHubFailed);
alert('Live-Log Connection Error: '+error);
}); function onHubFailed(error) {
// Show Dialog Message
if ($('.disconnected-dialog').length == 0) {
$('<div>')
.addClass('dialog disconnected-dialog')
.html('<h3><span class="fa-stack fa-lg"><i class="fa fa-wifi fa-stack-1x"></i><i class="fa fa-ban fa-stack-2x error"></i></span>Disconnected from the Disco ICT Server</h3><div>This page is not receiving live updates. Please ensure you are connected to the server, then refresh this page to enable features.</div>')
.dialog({
resizable: false,
title: 'Disconnected',
width: 400,
modal: true,
buttons: {
'Refresh Now': function () {
$(this).dialog('option', 'buttons', null);
window.location.reload(true);
},
'Close': function () {
$(this).dialog('destroy');
}
}
});
}
}
} }
} }
@@ -329,12 +329,29 @@ WriteLiteral("\',\r\n dataType: \'json\',\r\n
"ge.UseDisplay) logsViewModel.EventLogs.unshift(message);\r\n " + "ge.UseDisplay) logsViewModel.EventLogs.unshift(message);\r\n " +
" if (liveEventReceivedFunction) liveEventReceivedFunction(message);\r\n " + " if (liveEventReceivedFunction) liveEventReceivedFunction(message);\r\n " +
" };\r\n\r\n $.connection.hub.qs = {LogModules: logModule" + " };\r\n\r\n $.connection.hub.qs = {LogModules: logModule" +
"LiveGroupName};\r\n $.connection.hub.error(function(error){\r\n " + "LiveGroupName};\r\n $.connection.hub.error(onHubFailed);\r\n\r\n " +
" alert(\'Live-Log Error: \'+error);\r\n });\r" + " $.connection.hub.start().fail(onHubFailed);\r\n\r\n " +
"\n\r\n $.connection.hub.start().fail(function(error){\r\n " + " function onHubFailed(error) {\r\n // Show Dialog Messag" +
" alert(\'Live-Log Connection Error: \'+error);\r\n " + "e\r\n if ($(\'.disconnected-dialog\').length == 0) {\r\n " +
"});\r\n }\r\n }\r\n\r\n loadInitialData();\r\n " + " $(\'<div>\')\r\n .addClass(\'dial" +
" });\r\n </script>\r\n</div>\r\n"); "og disconnected-dialog\')\r\n .html(\'<h3><span class" +
"=\"fa-stack fa-lg\"><i class=\"fa fa-wifi fa-stack-1x\"></i><i class=\"fa fa-ban fa-s" +
"tack-2x error\"></i></span>Disconnected from the Disco ICT Server</h3><div>This p" +
"age is not receiving live updates. Please ensure you are connected to the server" +
", then refresh this page to enable features.</div>\')\r\n " +
" .dialog({\r\n resizable: false,\r\n " +
" title: \'Disconnected\',\r\n " +
" width: 400,\r\n modal: true,\r\n " +
" buttons: {\r\n \'" +
"Refresh Now\': function () {\r\n $(this)" +
".dialog(\'option\', \'buttons\', null);\r\n " +
" window.location.reload(true);\r\n },\r\n " +
" \'Close\': function () {\r\n " +
" $(this).dialog(\'destroy\');\r\n " +
" }\r\n }\r\n " +
" });\r\n }\r\n }\r\n }\r\n" +
" }\r\n\r\n loadInitialData();\r\n });\r\n </script>\r\n</d" +
"iv>\r\n");
} }
} }
@@ -247,14 +247,34 @@
notificationsHub.client.updateTaskStatus = vm.Update; notificationsHub.client.updateTaskStatus = vm.Update;
$.connection.hub.qs = { TaskSessionId: sessionId }; $.connection.hub.qs = { TaskSessionId: sessionId };
$.connection.hub.error(function (error) { $.connection.hub.error(onHubFailed);
alert('Live-Status Error: ' + error);
});
$.connection.hub.start() $.connection.hub.start()
.fail(function (error) { .fail(onHubFailed);
alert('Live-Status Connection Error: ' + error); }
});
function onHubFailed(error) {
// Show Dialog Message
if ($('.disconnected-dialog').length == 0) {
$('<div>')
.addClass('dialog disconnected-dialog')
.html('<h3><span class="fa-stack fa-lg"><i class="fa fa-wifi fa-stack-1x"></i><i class="fa fa-ban fa-stack-2x error"></i></span>Disconnected from the Disco ICT Server</h3><div>This page is not receiving live updates. Please ensure you are connected to the server, then refresh this page to enable features.</div>')
.dialog({
resizable: false,
title: 'Disconnected',
width: 400,
modal: true,
buttons: {
'Refresh Now': function () {
$(this).dialog('option', 'buttons', null);
window.location.reload(true);
},
'Close': function () {
$(this).dialog('destroy');
}
}
});
}
} }
}); });
@@ -281,11 +281,24 @@ WriteLiteral("\';\r\n\r\n var view = $(\'#Logging_Task_Status\');\r\n
"n.scheduledTaskNotifications;\r\n notificationsHub.client.initializeTas" + "n.scheduledTaskNotifications;\r\n notificationsHub.client.initializeTas" +
"kStatus = vm.Initialize;\r\n notificationsHub.client.updateTaskStatus =" + "kStatus = vm.Initialize;\r\n notificationsHub.client.updateTaskStatus =" +
" vm.Update;\r\n\r\n $.connection.hub.qs = { TaskSessionId: sessionId };\r\n" + " vm.Update;\r\n\r\n $.connection.hub.qs = { TaskSessionId: sessionId };\r\n" +
" $.connection.hub.error(function (error) {\r\n alert(\'Li" + " $.connection.hub.error(onHubFailed);\r\n\r\n $.connection.hub" +
"ve-Status Error: \' + error);\r\n });\r\n\r\n $.connection.hub.st" + ".start()\r\n .fail(onHubFailed);\r\n }\r\n\r\n function onH" +
"art()\r\n .fail(function (error) {\r\n alert(\'Live" + "ubFailed(error) {\r\n // Show Dialog Message\r\n if ($(\'.disco" +
"-Status Connection Error: \' + error);\r\n });\r\n }\r\n\r\n });" + "nnected-dialog\').length == 0) {\r\n $(\'<div>\')\r\n " +
"\r\n</script>\r\n"); " .addClass(\'dialog disconnected-dialog\')\r\n .html(\'<h3><span c" +
"lass=\"fa-stack fa-lg\"><i class=\"fa fa-wifi fa-stack-1x\"></i><i class=\"fa fa-ban " +
"fa-stack-2x error\"></i></span>Disconnected from the Disco ICT Server</h3><div>Th" +
"is page is not receiving live updates. Please ensure you are connected to the se" +
"rver, then refresh this page to enable features.</div>\')\r\n .d" +
"ialog({\r\n resizable: false,\r\n titl" +
"e: \'Disconnected\',\r\n width: 400,\r\n " +
" modal: true,\r\n buttons: {\r\n \'" +
"Refresh Now\': function () {\r\n $(this).dialog(\'opt" +
"ion\', \'buttons\', null);\r\n window.location.reload(" +
"true);\r\n },\r\n \'Close\': fun" +
"ction () {\r\n $(this).dialog(\'destroy\');\r\n " +
" }\r\n }\r\n });\r\n " +
" }\r\n }\r\n\r\n });\r\n</script>\r\n");
} }
} }
@@ -127,8 +127,8 @@
resizable: false, resizable: false,
modal: true, modal: true,
autoOpen: false, autoOpen: false,
width: 750, width: 780,
height: 650, height: 540,
buttons: { buttons: {
"Save": save, "Save": save,
Cancel: cancel Cancel: cancel
@@ -598,8 +598,8 @@ WriteLiteral(" </div>\r\n
" dialog = $(\'#Config_UserFlags_Icon_Update_Dialog\').dialog({\r\n " + " dialog = $(\'#Config_UserFlags_Icon_Update_Dialog\').dialog({\r\n " +
" resizable: false,\r\n " + " resizable: false,\r\n " +
" modal: true,\r\n autoOpen: f" + " modal: true,\r\n autoOpen: f" +
"alse,\r\n width: 750,\r\n " + "alse,\r\n width: 780,\r\n " +
" height: 650,\r\n " + " height: 540,\r\n " +
" buttons: {\r\n \"Save\": save,\r" + " buttons: {\r\n \"Save\": save,\r" +
"\n Cancel: cancel\r\n " + "\n Cancel: cancel\r\n " +
" }\r\n });\r\n\r\n " + " }\r\n });\r\n\r\n " +
@@ -1,5 +1,8 @@
using Disco.Services.Jobs.Noticeboards; using Disco.Models.Repository;
using Disco.Services.Jobs.Noticeboards;
using Disco.Services.Web; using Disco.Services.Web;
using Disco.Web.Areas.Public.Models.UserHeldDevices;
using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Web.Mvc; using System.Web.Mvc;
@@ -7,9 +10,26 @@ namespace Disco.Web.Areas.Public.Controllers
{ {
public partial class HeldDevicesController : DatabaseController public partial class HeldDevicesController : DatabaseController
{ {
public virtual ActionResult Index() public virtual ActionResult Index(List<int?> DeviceProfileInclude, List<int?> DeviceProfileExclude, List<string> DeviceAddressInclude, List<string> DeviceAddressExclude)
{ {
var m = Disco.Services.Jobs.Noticeboards.HeldDevices.GetHeldDevices(Database); IQueryable<Job> query = Database.Jobs;
if (DeviceProfileInclude != null)
query = query.Where(j => DeviceProfileInclude.Contains(j.Device.DeviceProfileId));
if (DeviceProfileExclude != null)
query = query.Where(j => !DeviceProfileExclude.Contains(j.Device.DeviceProfileId));
if (DeviceAddressInclude != null && DeviceAddressInclude.Count > 0)
{
var addressIds = Database.DiscoConfiguration.OrganisationAddresses.Addresses.Where(a => DeviceAddressInclude.Contains(a.ShortName)).Select(a => a.Id).ToList();
query = query.Where(j => addressIds.Contains(j.Device.DeviceProfile.DefaultOrganisationAddress));
}
if (DeviceAddressExclude != null && DeviceAddressExclude.Count > 0)
{
var addressIds = Database.DiscoConfiguration.OrganisationAddresses.Addresses.Where(a => DeviceAddressExclude.Contains(a.ShortName)).Select(a => (int?)a.Id).ToList();
query = query.Where(j => j.Device.DeviceProfile.DefaultOrganisationAddress == null || !addressIds.Contains(j.Device.DeviceProfile.DefaultOrganisationAddress));
}
var m = Disco.Services.Jobs.Noticeboards.HeldDevices.GetHeldDevices(query);
return View(m); return View(m);
} }
@@ -38,7 +58,12 @@ namespace Disco.Web.Areas.Public.Controllers
public virtual ActionResult Noticeboard() public virtual ActionResult Noticeboard()
{ {
return View(); var model = new NoticeboardModel()
{
DefaultTheme = Database.DiscoConfiguration.JobPreferences.DefaultNoticeboardTheme
};
return View(model);
} }
public virtual ActionResult HeldDevice(string id) public virtual ActionResult HeldDevice(string id)
@@ -1,5 +1,8 @@
using Disco.Services.Jobs.Noticeboards; using Disco.Models.Repository;
using Disco.Services.Jobs.Noticeboards;
using Disco.Services.Web; using Disco.Services.Web;
using Disco.Web.Areas.Public.Models.UserHeldDevices;
using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Web.Mvc; using System.Web.Mvc;
@@ -7,9 +10,26 @@ namespace Disco.Web.Areas.Public.Controllers
{ {
public partial class UserHeldDevicesController : DatabaseController public partial class UserHeldDevicesController : DatabaseController
{ {
public virtual ActionResult Index() public virtual ActionResult Index(List<int?> DeviceProfileInclude, List<int?> DeviceProfileExclude, List<string> DeviceAddressInclude, List<string> DeviceAddressExclude)
{ {
var m = Disco.Services.Jobs.Noticeboards.HeldDevicesForUsers.GetHeldDevicesForUsers(Database); IQueryable<Job> query = Database.Jobs;
if (DeviceProfileInclude != null)
query = query.Where(j => DeviceProfileInclude.Contains(j.Device.DeviceProfileId));
if (DeviceProfileExclude != null)
query = query.Where(j => !DeviceProfileExclude.Contains(j.Device.DeviceProfileId));
if (DeviceAddressInclude != null && DeviceAddressInclude.Count > 0)
{
var addressIds = Database.DiscoConfiguration.OrganisationAddresses.Addresses.Where(a => DeviceAddressInclude.Contains(a.ShortName)).Select(a => a.Id).ToList();
query = query.Where(j => addressIds.Contains(j.Device.DeviceProfile.DefaultOrganisationAddress));
}
if (DeviceAddressExclude != null && DeviceAddressExclude.Count > 0)
{
var addressIds = Database.DiscoConfiguration.OrganisationAddresses.Addresses.Where(a => DeviceAddressExclude.Contains(a.ShortName)).Select(a => (int?)a.Id).ToList();
query = query.Where(j => j.Device.DeviceProfile.DefaultOrganisationAddress == null || !addressIds.Contains(j.Device.DeviceProfile.DefaultOrganisationAddress));
}
var m = Disco.Services.Jobs.Noticeboards.HeldDevicesForUsers.GetHeldDevicesForUsers(query);
return View(m); return View(m);
} }
@@ -38,7 +58,12 @@ namespace Disco.Web.Areas.Public.Controllers
public virtual ActionResult Noticeboard() public virtual ActionResult Noticeboard()
{ {
return View(); var model = new NoticeboardModel()
{
DefaultTheme = Database.DiscoConfiguration.JobPreferences.DefaultNoticeboardTheme
};
return View(model);
} }
public virtual ActionResult UserHeldDevice(string id) public virtual ActionResult UserHeldDevice(string id)
@@ -0,0 +1,8 @@

namespace Disco.Web.Areas.Public.Models.UserHeldDevices
{
public class NoticeboardModel
{
public string DefaultTheme { get; set; }
}
}
@@ -1,4 +1,5 @@
@{ @model Disco.Web.Areas.Public.Models.UserHeldDevices.NoticeboardModel
@{
Layout = null; Layout = null;
Html.BundleDeferred("~/ClientScripts/Modules/Knockout"); Html.BundleDeferred("~/ClientScripts/Modules/Knockout");
Html.BundleDeferred("~/ClientScripts/Modules/jQuery-SignalR"); Html.BundleDeferred("~/ClientScripts/Modules/jQuery-SignalR");
@@ -13,7 +14,7 @@
<title>Disco ICT - Held Devices</title> <title>Disco ICT - Held Devices</title>
@Html.BundleRenderDeferred() @Html.BundleRenderDeferred()
</head> </head>
<body class="status-connecting"> <body class="theme-@(Model.DefaultTheme) status-connecting">
<div id="page"> <div id="page">
<header id="header"> <header id="header">
<div id="heading">Held Devices</div> <div id="heading">Held Devices</div>
@@ -92,6 +93,7 @@
var rotateSpeed = 3000; var rotateSpeed = 3000;
var itemFilters; var itemFilters;
var fixedTheme = null;
var $inProcessList = $('#inProcess').find('ul'); var $inProcessList = $('#inProcess').find('ul');
var $readyForReturnList = $('#readyForReturn').find('ul'); var $readyForReturnList = $('#readyForReturn').find('ul');
@@ -118,11 +120,15 @@
} }
function init() { function init() {
monitorMouseMove();
applyQueryString();
// Connect to Hub // Connect to Hub
hub = $.connection.noticeboardUpdates; hub = $.connection.noticeboardUpdates;
// Map Functions // Map Functions
hub.client.updateHeldDevice = updateHeldDevice; hub.client.updateHeldDevice = updateHeldDevice;
hub.client.setTheme = setTheme;
$.connection.hub.qs = { Noticeboard: '@(Disco.Services.Jobs.Noticeboards.HeldDevices.Name)' }; $.connection.hub.qs = { Noticeboard: '@(Disco.Services.Jobs.Noticeboards.HeldDevices.Name)' };
$.connection.hub.error(connectionError); $.connection.hub.error(connectionError);
@@ -165,7 +171,6 @@
window.setTimeout(scheduleRotation, rotateSpeed); window.setTimeout(scheduleRotation, rotateSpeed);
}); });
buildFilters();
} }
// Called by SignalR // Called by SignalR
@@ -237,14 +242,53 @@
}, true); }, true);
} }
function buildFilters() { function setTheme(theme) {
var filters = []; if (!!fixedTheme)
return;
var $body = $(document.body);
// Existing classes
var c = $body.attr('class').split(' ');
// Remove existing theme
c = $.grep(c, function (i) { return (i.indexOf('theme-') !== 0) });
c.push('theme-' + theme);
$body.attr('class', c.join(' '));
}
function monitorMouseMove() {
var token = null,
$body = $(document.body);
$body.mousemove(function () {
if (!!token)
window.clearTimeout(token);
else if ($body.css('cursor') == 'none')
$body.css('cursor', 'auto');
token = window.setTimeout(function () {
$body.css('cursor', 'none');
token = null;
}, 3500);
});
}
function applyQueryString() {
var queryStringParameters = getQueryStringParameters(); var queryStringParameters = getQueryStringParameters();
if (queryStringParameters !== null) { if (queryStringParameters !== null) {
var filters = [];
$.each(queryStringParameters, function (key, value) { $.each(queryStringParameters, function (key, value) {
switch (key.toLowerCase()) { switch (key.toLowerCase()) {
case 'deviceaddressinclude': case 'theme': // THEME
setTheme(value);
fixedTheme = value;
break;
case 'deviceaddressinclude': // FILTER: Device Address Include
var deviceAddresses = value.split(",").map(function (v) { return v.toLowerCase(); }); var deviceAddresses = value.split(",").map(function (v) { return v.toLowerCase(); });
if (deviceAddresses.length > 0) { if (deviceAddresses.length > 0) {
filters.push(function (heldDeviceItem) { filters.push(function (heldDeviceItem) {
@@ -257,7 +301,7 @@
}); });
} }
break; break;
case 'deviceaddressexclude': case 'deviceaddressexclude': // FILTER: Device Address Exclude
var deviceAddresses = value.split(",").map(function (v) { return v.toLowerCase(); }); var deviceAddresses = value.split(",").map(function (v) { return v.toLowerCase(); });
if (deviceAddresses.length > 0) { if (deviceAddresses.length > 0) {
filters.push(function (heldDeviceItem) { filters.push(function (heldDeviceItem) {
@@ -270,7 +314,7 @@
}); });
} }
break; break;
case 'deviceprofileinclude': case 'deviceprofileinclude': // FILTER: Device Profile Include
var deviceProfiles = value.split(",").map(function (v) { return parseInt(v); }); var deviceProfiles = value.split(",").map(function (v) { return parseInt(v); });
if (deviceProfiles.length > 0) { if (deviceProfiles.length > 0) {
filters.push(function (heldDeviceItem) { filters.push(function (heldDeviceItem) {
@@ -279,7 +323,7 @@
}); });
} }
break; break;
case 'deviceprofileexclude': case 'deviceprofileexclude': // FILTER: Device Profile Exclude
var deviceProfiles = value.split(",").map(function (v) { return parseInt(v); }); var deviceProfiles = value.split(",").map(function (v) { return parseInt(v); });
if (deviceProfiles.length > 0) { if (deviceProfiles.length > 0) {
filters.push(function (heldDeviceItem) { filters.push(function (heldDeviceItem) {
@@ -290,12 +334,12 @@
break; break;
} }
}); });
}
if (filters.length > 0) if (filters.length > 0)
itemFilters = filters; itemFilters = filters;
else else
itemFilters = null; itemFilters = null;
}
} }
function connectionError() { function connectionError() {
@@ -307,7 +351,7 @@
} }
window.setTimeout(function () { window.setTimeout(function () {
window.location.href = window.location.href; window.location.reload(true);
}, 10000); }, 10000);
} }
@@ -36,7 +36,7 @@ namespace Disco.Web.Areas.Public.Views.HeldDevices
[System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "2.0.0.0")] [System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "2.0.0.0")]
[System.Web.WebPages.PageVirtualPathAttribute("~/Areas/Public/Views/HeldDevices/Noticeboard.cshtml")] [System.Web.WebPages.PageVirtualPathAttribute("~/Areas/Public/Views/HeldDevices/Noticeboard.cshtml")]
public partial class Noticeboard : Disco.Services.Web.WebViewPage<dynamic> public partial class Noticeboard : Disco.Services.Web.WebViewPage<Disco.Web.Areas.Public.Models.UserHeldDevices.NoticeboardModel>
{ {
public Noticeboard() public Noticeboard()
{ {
@@ -44,7 +44,7 @@ namespace Disco.Web.Areas.Public.Views.HeldDevices
public override void Execute() public override void Execute()
{ {
#line 1 "..\..\Areas\Public\Views\HeldDevices\Noticeboard.cshtml" #line 2 "..\..\Areas\Public\Views\HeldDevices\Noticeboard.cshtml"
Layout = null; Layout = null;
Html.BundleDeferred("~/ClientScripts/Modules/Knockout"); Html.BundleDeferred("~/ClientScripts/Modules/Knockout");
@@ -70,7 +70,7 @@ WriteLiteral(" />\r\n <title>Disco ICT - Held Devices</title>\r\n");
WriteLiteral(" "); WriteLiteral(" ");
#line 14 "..\..\Areas\Public\Views\HeldDevices\Noticeboard.cshtml" #line 15 "..\..\Areas\Public\Views\HeldDevices\Noticeboard.cshtml"
Write(Html.BundleRenderDeferred()); Write(Html.BundleRenderDeferred());
@@ -78,7 +78,17 @@ Write(Html.BundleRenderDeferred());
#line hidden #line hidden
WriteLiteral("\r\n</head>\r\n<body"); WriteLiteral("\r\n</head>\r\n<body");
WriteLiteral(" class=\"status-connecting\""); WriteAttribute("class", Tuple.Create(" class=\"", 562), Tuple.Create("\"", 615)
, Tuple.Create(Tuple.Create("", 570), Tuple.Create("theme-", 570), true)
#line 17 "..\..\Areas\Public\Views\HeldDevices\Noticeboard.cshtml"
, Tuple.Create(Tuple.Create("", 576), Tuple.Create<System.Object, System.Int32>(Model.DefaultTheme
#line default
#line hidden
, 576), false)
, Tuple.Create(Tuple.Create(" ", 597), Tuple.Create("status-connecting", 598), true)
);
WriteLiteral(">\r\n <div"); WriteLiteral(">\r\n <div");
@@ -219,26 +229,28 @@ WriteLiteral(">\r\n <li data-bind=\"css: { alert: IsAlert }\">\r\n
" else\r\n $(element).livestamp(\'destroy\');\r\n " + " else\r\n $(element).livestamp(\'destroy\');\r\n " +
" }\r\n };\r\n </script>\r\n <script>\r\n $(function () {\r\n " + " }\r\n };\r\n </script>\r\n <script>\r\n $(function () {\r\n " +
" var hub;\r\n var viewModel;\r\n\r\n var rotateSpeed = 3000" + " var hub;\r\n var viewModel;\r\n\r\n var rotateSpeed = 3000" +
";\r\n var itemFilters;\r\n\r\n var $inProcessList = $(\'#inProces" + ";\r\n var itemFilters;\r\n var fixedTheme = null;\r\n\r\n " +
"s\').find(\'ul\');\r\n var $readyForReturnList = $(\'#readyForReturn\').find" + " var $inProcessList = $(\'#inProcess\').find(\'ul\');\r\n var $readyForRe" +
"(\'ul\');\r\n var $waitingForUserActionList = $(\'#waitingForUserAction\')." + "turnList = $(\'#readyForReturn\').find(\'ul\');\r\n var $waitingForUserActi" +
"find(\'ul\');\r\n\r\n function noticeboardViewModel(inProcess, readyForRetu" + "onList = $(\'#waitingForUserAction\').find(\'ul\');\r\n\r\n function noticebo" +
"rn, waitingForUserAction) {\r\n var self = this;\r\n\r\n " + "ardViewModel(inProcess, readyForReturn, waitingForUserAction) {\r\n " +
" self.initialized = false;\r\n\r\n self.inProcess = ko.observableArra" + " var self = this;\r\n\r\n self.initialized = false;\r\n\r\n " +
"y(inProcess);\r\n self.readyForReturn = ko.observableArray(readyFor" + " self.inProcess = ko.observableArray(inProcess);\r\n self.readyFor" +
"Return);\r\n self.waitingForUserAction = ko.observableArray(waiting" + "Return = ko.observableArray(readyForReturn);\r\n self.waitingForUse" +
"ForUserAction);\r\n\r\n self.onRemove = function (element, index, dat" + "rAction = ko.observableArray(waitingForUserAction);\r\n\r\n self.onRe" +
"a) {\r\n $(element).slideUp(400, function () {\r\n " + "move = function (element, index, data) {\r\n $(element).slideUp" +
" $(this).remove();\r\n });\r\n }\r\n " + "(400, function () {\r\n $(this).remove();\r\n " +
" self.onAdd = function (element, index, data) {\r\n if (" + " });\r\n }\r\n self.onAdd = function (element, inde" +
"self.initialized)\r\n $(element).hide().slideDown(400);\r\n " + "x, data) {\r\n if (self.initialized)\r\n $" +
" }\r\n }\r\n\r\n function init() {\r\n " + "(element).hide().slideDown(400);\r\n }\r\n }\r\n\r\n " +
" // Connect to Hub\r\n hub = $.connection.noticeboardUpdates;\r\n\r\n " + " function init() {\r\n monitorMouseMove();\r\n applyQ" +
" // Map Functions\r\n hub.client.updateHeldDevice = up" + "ueryString();\r\n\r\n // Connect to Hub\r\n hub = $.conn" +
"dateHeldDevice;\r\n\r\n $.connection.hub.qs = { Noticeboard: \'"); "ection.noticeboardUpdates;\r\n\r\n // Map Functions\r\n " +
"hub.client.updateHeldDevice = updateHeldDevice;\r\n hub.client.setT" +
"heme = setTheme;\r\n\r\n $.connection.hub.qs = { Noticeboard: \'");
#line 127 "..\..\Areas\Public\Views\HeldDevices\Noticeboard.cshtml" #line 133 "..\..\Areas\Public\Views\HeldDevices\Noticeboard.cshtml"
Write(Disco.Services.Jobs.Noticeboards.HeldDevices.Name); Write(Disco.Services.Jobs.Noticeboards.HeldDevices.Name);
@@ -258,7 +270,7 @@ WriteLiteral(@"' };
$.getJSON('"); $.getJSON('");
#line 138 "..\..\Areas\Public\Views\HeldDevices\Noticeboard.cshtml" #line 144 "..\..\Areas\Public\Views\HeldDevices\Noticeboard.cshtml"
Write(Url.Action(MVC.Public.HeldDevices.HeldDevices())); Write(Url.Action(MVC.Public.HeldDevices.HeldDevices()));
@@ -280,136 +292,153 @@ WriteLiteral("\', null, function (data) {\r\n\r\n var inProce
"orUserAction);\r\n\r\n ko.applyBindings(viewModel);\r\n " + "orUserAction);\r\n\r\n ko.applyBindings(viewModel);\r\n " +
" viewModel.initialized = true;\r\n\r\n $(\'body\').removeCla" + " viewModel.initialized = true;\r\n\r\n $(\'body\').removeCla" +
"ss(\'status-connecting\');\r\n\r\n window.setTimeout(scheduleRotati" + "ss(\'status-connecting\');\r\n\r\n window.setTimeout(scheduleRotati" +
"on, rotateSpeed);\r\n });\r\n buildFilters();\r\n " + "on, rotateSpeed);\r\n });\r\n }\r\n\r\n // Called b" +
" }\r\n\r\n // Called by SignalR\r\n function updateHeldDevic" + "y SignalR\r\n function updateHeldDevice(updates) {\r\n if " +
"e(updates) {\r\n if (viewModel) {\r\n\r\n $.each(upd" + "(viewModel) {\r\n\r\n $.each(updates, function (deviceSerialNumbe" +
"ates, function (deviceSerialNumber, heldDeviceItem) {\r\n /" + "r, heldDeviceItem) {\r\n // Remove Existing\r\n " +
"/ Remove Existing\r\n removeItem(deviceSerialNumber);\r\n\r\n " + " removeItem(deviceSerialNumber);\r\n\r\n // Add Item" +
" // Add Item\r\n addItem(heldDeviceIte" + "\r\n addItem(heldDeviceItem);\r\n });\r\n " +
"m);\r\n });\r\n }\r\n }\r\n\r\n fu" + " }\r\n }\r\n\r\n function removeItem(deviceSerialNum" +
"nction removeItem(deviceSerialNumber) {\r\n removeItemFromArray(vie" + "ber) {\r\n removeItemFromArray(viewModel.inProcess, deviceSerialNum" +
"wModel.inProcess, deviceSerialNumber);\r\n removeItemFromArray(view" + "ber);\r\n removeItemFromArray(viewModel.readyForReturn, deviceSeria" +
"Model.readyForReturn, deviceSerialNumber);\r\n removeItemFromArray(" + "lNumber);\r\n removeItemFromArray(viewModel.waitingForUserAction, d" +
"viewModel.waitingForUserAction, deviceSerialNumber);\r\n }\r\n\r\n " + "eviceSerialNumber);\r\n }\r\n\r\n function addItem(heldDeviceIte" +
" function addItem(heldDeviceItem) {\r\n if (heldDeviceItem !== nu" + "m) {\r\n if (heldDeviceItem !== null &&\r\n heldDe" +
"ll &&\r\n heldDeviceItem !== undefined &&\r\n " + "viceItem !== undefined &&\r\n includeItem(heldDeviceItem)) {\r\n\r" +
"includeItem(heldDeviceItem)) {\r\n\r\n var array;\r\n\r\n " + "\n var array;\r\n\r\n if (isWaitingForUserActio" +
" if (isWaitingForUserAction(heldDeviceItem))\r\n arr" + "n(heldDeviceItem))\r\n array = viewModel.waitingForUserActi" +
"ay = viewModel.waitingForUserAction;\r\n else if (isReadyForRet" + "on;\r\n else if (isReadyForReturn(heldDeviceItem))\r\n " +
"urn(heldDeviceItem))\r\n array = viewModel.readyForReturn;\r" + " array = viewModel.readyForReturn;\r\n else if (isI" +
"\n else if (isInProcess(heldDeviceItem))\r\n " + "nProcess(heldDeviceItem))\r\n array = viewModel.inProcess;\r" +
" array = viewModel.inProcess;\r\n\r\n if (array().length === 0" + "\n\r\n if (array().length === 0) {\r\n arra" +
") {\r\n array.push(heldDeviceItem);\r\n } " + "y.push(heldDeviceItem);\r\n } else {\r\n v" +
"else {\r\n var index = findSortedInsertIndex(array, heldDev" + "ar index = findSortedInsertIndex(array, heldDeviceItem);\r\n " +
"iceItem);\r\n if (index === -1)\r\n " + " if (index === -1)\r\n array.push(heldDeviceItem);\r\n " +
" array.push(heldDeviceItem);\r\n else\r\n " + " else\r\n array.splice(index, 0, h" +
" array.splice(index, 0, heldDeviceItem);\r\n }\r\n " + "eldDeviceItem);\r\n }\r\n }\r\n }\r\n\r\n " +
" }\r\n }\r\n\r\n function rotateArrays() {\r\n " + " function rotateArrays() {\r\n rotateArray(viewModel.inProce" +
" rotateArray(viewModel.inProcess, $inProcessList);\r\n rotateArr" + "ss, $inProcessList);\r\n rotateArray(viewModel.readyForReturn, $rea" +
"ay(viewModel.readyForReturn, $readyForReturnList);\r\n rotateArray(" + "dyForReturnList);\r\n rotateArray(viewModel.waitingForUserAction, $" +
"viewModel.waitingForUserAction, $waitingForUserActionList);\r\n }\r\n\r\n " + "waitingForUserActionList);\r\n }\r\n\r\n function scheduleRotati" +
" function scheduleRotation() {\r\n rotateArrays();\r\n\r\n " + "on() {\r\n rotateArrays();\r\n\r\n window.setTimeout(sch" +
" window.setTimeout(scheduleRotation, rotateSpeed);\r\n }\r\n\r\n" + "eduleRotation, rotateSpeed);\r\n }\r\n\r\n function includeItem(" +
" function includeItem(heldDeviceItem) {\r\n if (itemFilt" + "heldDeviceItem) {\r\n if (itemFilters == null || itemFilters.length" +
"ers == null || itemFilters.length == 0)\r\n return true;\r\n\r\n " + " == 0)\r\n return true;\r\n\r\n return itemFilters.r" +
" return itemFilters.reduce(function (previousValue, currentValue, in" + "educe(function (previousValue, currentValue, index, array) {\r\n " +
"dex, array) {\r\n if (previousValue === false)\r\n " + " if (previousValue === false)\r\n return false;\r\n " +
" return false;\r\n return currentValue(heldDeviceItem);" + " return currentValue(heldDeviceItem);\r\n }, true);\r\n " +
"\r\n }, true);\r\n }\r\n\r\n function buildFilters(" + " }\r\n\r\n function setTheme(theme) {\r\n if (!!fixed" +
") {\r\n var filters = [];\r\n var queryStringParameter" + "Theme)\r\n return;\r\n\r\n var $body = $(document.bo" +
"s = getQueryStringParameters();\r\n\r\n if (queryStringParameters !==" + "dy);\r\n\r\n // Existing classes\r\n var c = $body.attr(" +
" null) {\r\n $.each(queryStringParameters, function (key, value" + "\'class\').split(\' \');\r\n // Remove existing theme\r\n " +
") {\r\n switch (key.toLowerCase()) {\r\n " + "c = $.grep(c, function (i) { return (i.indexOf(\'theme-\') !== 0) });\r\n\r\n " +
" case \'deviceaddressinclude\':\r\n var deviceA" + " c.push(\'theme-\' + theme);\r\n\r\n $body.attr(\'class\', c.join(\'" +
"ddresses = value.split(\",\").map(function (v) { return v.toLowerCase(); });\r\n " + " \'));\r\n }\r\n\r\n function monitorMouseMove() {\r\n " +
" if (deviceAddresses.length > 0) {\r\n " + " var token = null,\r\n $body = $(document.body);\r\n\r\n " +
" filters.push(function (heldDeviceItem) {\r\n " + " $body.mousemove(function () {\r\n if (!!token)\r\n " +
" // false if DeviceAddressShortName is null\r\n " + " window.clearTimeout(token);\r\n else if ($body." +
" if (!heldDeviceItem.DeviceAddressShortName)\r\n " + "css(\'cursor\') == \'none\')\r\n $body.css(\'cursor\', \'auto\');\r\n" +
" return false;\r\n\r\n " + "\r\n token = window.setTimeout(function () {\r\n " +
" // true if DeviceAddressShortName is included\r\n " + " $body.css(\'cursor\', \'none\');\r\n token = null;\r\n " +
" return $.inArray(heldDeviceItem.DeviceAddressShortName.toLower" + " }, 3500);\r\n });\r\n\r\n }\r\n\r\n f" +
"Case(), deviceAddresses) >= 0;\r\n });\r\n " + "unction applyQueryString() {\r\n var queryStringParameters = getQue" +
" }\r\n break;\r\n " + "ryStringParameters();\r\n\r\n if (queryStringParameters !== null) {\r\n" +
" case \'deviceaddressexclude\':\r\n va" + " var filters = [];\r\n\r\n $.each(queryStringP" +
"r deviceAddresses = value.split(\",\").map(function (v) { return v.toLowerCase(); " + "arameters, function (key, value) {\r\n switch (key.toLowerC" +
"});\r\n if (deviceAddresses.length > 0) {\r\n " + "ase()) {\r\n case \'theme\': // THEME\r\n " +
" filters.push(function (heldDeviceItem) {\r\n " + " setTheme(value);\r\n fixedTheme = val" +
" // true if DeviceAddressShortName is null\r\n " + "ue;\r\n break;\r\n case \'d" +
" if (!heldDeviceItem.DeviceAddressShortName)\r\n " + "eviceaddressinclude\': // FILTER: Device Address Include\r\n " +
" return true;\r\n\r\n " + " var deviceAddresses = value.split(\",\").map(function (v) { return v.toLo" +
" // true if DeviceAddressShortName is excluded\r\n " + "werCase(); });\r\n if (deviceAddresses.length > 0) " +
" return $.inArray(heldDeviceItem.DeviceAddressShortName." + "{\r\n filters.push(function (heldDeviceItem) {\r" +
"toLowerCase(), deviceAddresses) < 0;\r\n });\r\n " + "\n // false if DeviceAddressShortName is n" +
" }\r\n break;\r\n " + "ull\r\n if (!heldDeviceItem.DeviceAddressSh" +
" case \'deviceprofileinclude\':\r\n " + "ortName)\r\n return false;\r\n\r\n " +
" var deviceProfiles = value.split(\",\").map(function (v) { return parseInt(v);" + " // true if DeviceAddressShortName is included\r\n " +
" });\r\n if (deviceProfiles.length > 0) {\r\n " + " return $.inArray(heldDeviceItem.DeviceAddr" +
" filters.push(function (heldDeviceItem) {\r\n " + "essShortName.toLowerCase(), deviceAddresses) >= 0;\r\n " +
" // true if DeviceProfileId is included\r\n " + " });\r\n }\r\n " +
" return $.inArray(heldDeviceItem.DeviceProfileId, d" + "break;\r\n case \'deviceaddressexclude\': // FILTER: Devi" +
"eviceProfiles) >= 0;\r\n });\r\n " + "ce Address Exclude\r\n var deviceAddresses = value." +
" }\r\n break;\r\n " + "split(\",\").map(function (v) { return v.toLowerCase(); });\r\n " +
" case \'deviceprofileexclude\':\r\n var devicePr" + " if (deviceAddresses.length > 0) {\r\n " +
"ofiles = value.split(\",\").map(function (v) { return parseInt(v); });\r\n " + " filters.push(function (heldDeviceItem) {\r\n " +
" if (deviceProfiles.length > 0) {\r\n " + " // true if DeviceAddressShortName is null\r\n " +
" filters.push(function (heldDeviceItem) {\r\n " + " if (!heldDeviceItem.DeviceAddressShortName)\r\n " +
" // true if DeviceProfileId is excluded\r\n " + " return true;\r\n\r\n // true " +
" return $.inArray(heldDeviceItem.DeviceProfileId, deviceProfiles) <" + "if DeviceAddressShortName is excluded\r\n r" +
" 0;\r\n });\r\n }\r" + "eturn $.inArray(heldDeviceItem.DeviceAddressShortName.toLowerCase(), deviceAddre" +
"\n break;\r\n }\r\n " + "sses) < 0;\r\n });\r\n " +
" });\r\n }\r\n\r\n if (filters.length > 0)\r\n " + " }\r\n break;\r\n case" +
" itemFilters = filters;\r\n else\r\n " + " \'deviceprofileinclude\': // FILTER: Device Profile Include\r\n " +
" itemFilters = null;\r\n }\r\n\r\n function connectionError() {\r" + " var deviceProfiles = value.split(\",\").map(function (v) { return pars" +
"\n try {\r\n $(\'body\').addClass(\'status-error\');\r" + "eInt(v); });\r\n if (deviceProfiles.length > 0) {\r\n" +
"\n $.connection.hub.stop();\r\n } catch (e) {\r\n " + " filters.push(function (heldDeviceItem) {\r\n " +
" // Ignore\r\n }\r\n\r\n window.setTime" + " // true if DeviceProfileId is included\r\n " +
"out(function () {\r\n window.location.href = window.location.hr" + " return $.inArray(heldDeviceItem.DeviceProf" +
"ef;\r\n }, 10000);\r\n }\r\n\r\n // Helpers\r\n " + "ileId, deviceProfiles) >= 0;\r\n });\r\n " +
" function rotateArray(koArray, element) {\r\n var items = koAr" + " }\r\n break;\r\n " +
"ray();\r\n\r\n if (items.length <= 1)\r\n return 0;\r" + " case \'deviceprofileexclude\': // FILTER: Device Profile Exclude\r\n " +
"\n\r\n if (element.height() < (element.parent().height() - 30)) {\r\n\r" + " var deviceProfiles = value.split(\",\").map(function" +
"\n if (findUnsortedArrayTopIndex(items) !== 0)\r\n " + " (v) { return parseInt(v); });\r\n if (deviceProfil" +
" koArray.sort(sortFunction);\r\n\r\n // Don\'t rotate if " + "es.length > 0) {\r\n filters.push(function (hel" +
"small & sorted correctly\r\n return;\r\n }\r\n\r\n " + "dDeviceItem) {\r\n // true if DeviceProfile" +
" // Move Last Item to Top\r\n var item = koArray.pop();\r" + "Id is excluded\r\n return $.inArray(heldDev" +
"\n koArray.unshift(item);\r\n }\r\n function rem" + "iceItem.DeviceProfileId, deviceProfiles) < 0;\r\n " +
"oveItemFromArray(koArray, deviceSerialNumber) {\r\n var items = koA" + " });\r\n }\r\n break" +
"rray();\r\n for (var i = 0; i < items.length; i++) {\r\n " + ";\r\n }\r\n });\r\n\r\n if " +
" if (items[i].DeviceSerialNumber == deviceSerialNumber) {\r\n " + "(filters.length > 0)\r\n itemFilters = filters;\r\n " +
" koArray.splice(i, 1);\r\n items = koArray();\r\n " + " else\r\n itemFilters = null;\r\n }\r\n" +
" i--;\r\n }\r\n }\r\n " + " }\r\n\r\n function connectionError() {\r\n try {" +
"}\r\n function findUnsortedArrayTopIndex(items) {\r\n // O" + "\r\n $(\'body\').addClass(\'status-error\');\r\n $" +
"nly one Item\r\n if (items.length <= 1)\r\n return" + ".connection.hub.stop();\r\n } catch (e) {\r\n // I" +
" 0;\r\n\r\n for (var i = 1; i < items.length; i++) {\r\n " + "gnore\r\n }\r\n\r\n window.setTimeout(function () {\r\n " +
" var s = sortFunction(items[i - 1], items[i]);\r\n if (s > " + " window.location.reload(true);\r\n }, 10000);\r\n " +
"0)\r\n return i;\r\n }\r\n\r\n retu" + " }\r\n\r\n // Helpers\r\n function rotateArray(koArray, e" +
"rn 0;\r\n }\r\n function findSortedInsertIndex(koArray, heldDe" + "lement) {\r\n var items = koArray();\r\n\r\n if (items.l" +
"viceItem) {\r\n var items = koArray();\r\n var startIn" + "ength <= 1)\r\n return 0;\r\n\r\n if (element.height" +
"dex = findUnsortedArrayTopIndex(items);\r\n for (var i = startIndex" + "() < (element.parent().height() - 30)) {\r\n\r\n if (findUnsorted" +
"; i < items.length; i++) {\r\n var s = sortFunction(heldDeviceI" + "ArrayTopIndex(items) !== 0)\r\n koArray.sort(sortFunction);" +
"tem, items[i]);\r\n if (s <= 0)\r\n return" + "\r\n\r\n // Don\'t rotate if small & sorted correctly\r\n " +
" i;\r\n }\r\n if (startIndex !== 0) {\r\n " + " return;\r\n }\r\n\r\n // Move Last Item to Top\r" +
" for (var i = 0; i < startIndex; i++) {\r\n var s = sor" + "\n var item = koArray.pop();\r\n koArray.unshift(item" +
"tFunction(heldDeviceItem, items[i]);\r\n if (s <= 0)\r\n " + ");\r\n }\r\n function removeItemFromArray(koArray, deviceSeria" +
" return i;\r\n }\r\n ret" + "lNumber) {\r\n var items = koArray();\r\n for (var i =" +
"urn startIndex;\r\n } else {\r\n return -1;\r\n " + " 0; i < items.length; i++) {\r\n if (items[i].DeviceSerialNumbe" +
" }\r\n }\r\n function sortFunction(l, r) {\r\n " + "r == deviceSerialNumber) {\r\n koArray.splice(i, 1);\r\n " +
" return l.DeviceDescription.toLowerCase() == r.DeviceDescription.toLowerC" + " items = koArray();\r\n i--;\r\n " +
"ase() ? 0 : (l.DeviceDescription.toLowerCase() < r.DeviceDescription.toLowerCase" + " }\r\n }\r\n }\r\n function findUnsortedA" +
"() ? -1 : 1)\r\n }\r\n function isInProcess(i) {\r\n " + "rrayTopIndex(items) {\r\n // Only one Item\r\n if (ite" +
" return !i.ReadyForReturn && !i.WaitingForUserAction;\r\n }\r\n " + "ms.length <= 1)\r\n return 0;\r\n\r\n for (var i = 1" +
" function isReadyForReturn(i) {\r\n return i.ReadyForReturn && " + "; i < items.length; i++) {\r\n var s = sortFunction(items[i - 1" +
"!i.WaitingForUserAction;\r\n }\r\n function isWaitingForUserAc" + "], items[i]);\r\n if (s > 0)\r\n return i;" +
"tion(i) {\r\n return i.WaitingForUserAction;\r\n }\r\n " + "\r\n }\r\n\r\n return 0;\r\n }\r\n fun" +
" function getQueryStringParameters() {\r\n\r\n if (window.locati" + "ction findSortedInsertIndex(koArray, heldDeviceItem) {\r\n var item" +
"on.search.length === 0)\r\n return null;\r\n\r\n var" + "s = koArray();\r\n var startIndex = findUnsortedArrayTopIndex(items" +
" params = {};\r\n window.location.search.substr(1).split(\"&\").forEa" + ");\r\n for (var i = startIndex; i < items.length; i++) {\r\n " +
"ch(function (pair) {\r\n if (pair === \"\") return;\r\n " + " var s = sortFunction(heldDeviceItem, items[i]);\r\n " +
" var parts = pair.split(\"=\");\r\n params[parts[0]] = par" + "if (s <= 0)\r\n return i;\r\n }\r\n " +
"ts[1] && decodeURIComponent(parts[1].replace(/\\+/g, \" \"));\r\n });\r" + " if (startIndex !== 0) {\r\n for (var i = 0; i < startIndex; " +
"\n return params;\r\n }\r\n\r\n init();\r\n }" + "i++) {\r\n var s = sortFunction(heldDeviceItem, items[i]);\r" +
");\r\n </script>\r\n</body>\r\n</html>"); "\n if (s <= 0)\r\n return i;\r\n " +
" }\r\n return startIndex;\r\n } el" +
"se {\r\n return -1;\r\n }\r\n }\r\n " +
" function sortFunction(l, r) {\r\n return l.DeviceDescription.to" +
"LowerCase() == r.DeviceDescription.toLowerCase() ? 0 : (l.DeviceDescription.toLo" +
"werCase() < r.DeviceDescription.toLowerCase() ? -1 : 1)\r\n }\r\n " +
" function isInProcess(i) {\r\n return !i.ReadyForReturn && !i.Wa" +
"itingForUserAction;\r\n }\r\n function isReadyForReturn(i) {\r\n" +
" return i.ReadyForReturn && !i.WaitingForUserAction;\r\n " +
" }\r\n function isWaitingForUserAction(i) {\r\n return i.W" +
"aitingForUserAction;\r\n }\r\n function getQueryStringParamete" +
"rs() {\r\n\r\n if (window.location.search.length === 0)\r\n " +
" return null;\r\n\r\n var params = {};\r\n window" +
".location.search.substr(1).split(\"&\").forEach(function (pair) {\r\n " +
" if (pair === \"\") return;\r\n var parts = pair.split(\"=\");\r" +
"\n params[parts[0]] = parts[1] && decodeURIComponent(parts[1]." +
"replace(/\\+/g, \" \"));\r\n });\r\n return params;\r\n " +
" }\r\n\r\n init();\r\n });\r\n </script>\r\n</body>\r\n</html>");
} }
} }
@@ -1,4 +1,5 @@
@{ @model Disco.Web.Areas.Public.Models.UserHeldDevices.NoticeboardModel
@{
Layout = null; Layout = null;
Html.BundleDeferred("~/ClientScripts/Modules/Knockout"); Html.BundleDeferred("~/ClientScripts/Modules/Knockout");
Html.BundleDeferred("~/ClientScripts/Modules/jQuery-SignalR"); Html.BundleDeferred("~/ClientScripts/Modules/jQuery-SignalR");
@@ -13,7 +14,7 @@
<title>Disco ICT - Held Devices for Users</title> <title>Disco ICT - Held Devices for Users</title>
@Html.BundleRenderDeferred() @Html.BundleRenderDeferred()
</head> </head>
<body class="status-connecting"> <body class="theme-@(Model.DefaultTheme) status-connecting">
<div id="page"> <div id="page">
<header id="header"> <header id="header">
<div id="heading">Held Devices for Users</div> <div id="heading">Held Devices for Users</div>
@@ -92,6 +93,7 @@
var rotateSpeed = 3000; var rotateSpeed = 3000;
var itemFilters; var itemFilters;
var fixedTheme = null;
var $inProcessList = $('#inProcess').find('ul'); var $inProcessList = $('#inProcess').find('ul');
var $readyForReturnList = $('#readyForReturn').find('ul'); var $readyForReturnList = $('#readyForReturn').find('ul');
@@ -118,11 +120,15 @@
} }
function init() { function init() {
monitorMouseMove();
applyQueryString();
// Connect to Hub // Connect to Hub
hub = $.connection.noticeboardUpdates; hub = $.connection.noticeboardUpdates;
// Map Functions // Map Functions
hub.client.updateHeldDeviceForUser = updateHeldDevice; hub.client.updateHeldDeviceForUser = updateHeldDevice;
hub.client.setTheme = setTheme;
$.connection.hub.qs = { Noticeboard: '@(Disco.Services.Jobs.Noticeboards.HeldDevicesForUsers.Name)' }; $.connection.hub.qs = { Noticeboard: '@(Disco.Services.Jobs.Noticeboards.HeldDevicesForUsers.Name)' };
$.connection.hub.error(connectionError); $.connection.hub.error(connectionError);
@@ -165,7 +171,6 @@
window.setTimeout(scheduleRotation, rotateSpeed); window.setTimeout(scheduleRotation, rotateSpeed);
}); });
buildFilters();
} }
// Called by SignalR // Called by SignalR
@@ -237,14 +242,53 @@
}, true); }, true);
} }
function buildFilters() { function setTheme(theme) {
var filters = []; if (!!fixedTheme)
return;
var $body = $(document.body);
// Existing classes
var c = $body.attr('class').split(' ');
// Remove existing theme
c = $.grep(c, function (i) { return (i.indexOf('theme-') !== 0) });
c.push('theme-' + theme);
$body.attr('class', c.join(' '));
}
function monitorMouseMove() {
var token = null,
$body = $(document.body);
$body.mousemove(function () {
if (!!token)
window.clearTimeout(token);
else if ($body.css('cursor') == 'none')
$body.css('cursor', 'auto');
token = window.setTimeout(function () {
$body.css('cursor', 'none');
token = null;
}, 3500);
});
}
function applyQueryString() {
var queryStringParameters = getQueryStringParameters(); var queryStringParameters = getQueryStringParameters();
if (queryStringParameters !== null) { if (queryStringParameters !== null) {
var filters = [];
$.each(queryStringParameters, function (key, value) { $.each(queryStringParameters, function (key, value) {
switch (key.toLowerCase()) { switch (key.toLowerCase()) {
case 'deviceaddressinclude': case 'theme': // THEME
setTheme(value);
fixedTheme = value;
break;
case 'deviceaddressinclude': // FILTER: Device Address Include
var deviceAddresses = value.split(",").map(function (v) { return v.toLowerCase(); }); var deviceAddresses = value.split(",").map(function (v) { return v.toLowerCase(); });
if (deviceAddresses.length > 0) { if (deviceAddresses.length > 0) {
filters.push(function (heldDeviceItem) { filters.push(function (heldDeviceItem) {
@@ -257,7 +301,7 @@
}); });
} }
break; break;
case 'deviceaddressexclude': case 'deviceaddressexclude': // FILTER: Device Address Exclude
var deviceAddresses = value.split(",").map(function (v) { return v.toLowerCase(); }); var deviceAddresses = value.split(",").map(function (v) { return v.toLowerCase(); });
if (deviceAddresses.length > 0) { if (deviceAddresses.length > 0) {
filters.push(function (heldDeviceItem) { filters.push(function (heldDeviceItem) {
@@ -270,7 +314,7 @@
}); });
} }
break; break;
case 'deviceprofileinclude': case 'deviceprofileinclude': // FILTER: Device Profile Include
var deviceProfiles = value.split(",").map(function (v) { return parseInt(v); }); var deviceProfiles = value.split(",").map(function (v) { return parseInt(v); });
if (deviceProfiles.length > 0) { if (deviceProfiles.length > 0) {
filters.push(function (heldDeviceItem) { filters.push(function (heldDeviceItem) {
@@ -279,7 +323,7 @@
}); });
} }
break; break;
case 'deviceprofileexclude': case 'deviceprofileexclude': // FILTER: Device Profile Exclude
var deviceProfiles = value.split(",").map(function (v) { return parseInt(v); }); var deviceProfiles = value.split(",").map(function (v) { return parseInt(v); });
if (deviceProfiles.length > 0) { if (deviceProfiles.length > 0) {
filters.push(function (heldDeviceItem) { filters.push(function (heldDeviceItem) {
@@ -290,12 +334,12 @@
break; break;
} }
}); });
}
if (filters.length > 0) if (filters.length > 0)
itemFilters = filters; itemFilters = filters;
else else
itemFilters = null; itemFilters = null;
}
} }
function connectionError() { function connectionError() {
@@ -307,7 +351,7 @@
} }
window.setTimeout(function () { window.setTimeout(function () {
window.location.href = window.location.href; window.location.reload(true);
}, 10000); }, 10000);
} }
@@ -36,7 +36,7 @@ namespace Disco.Web.Areas.Public.Views.UserHeldDevices
[System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "2.0.0.0")] [System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "2.0.0.0")]
[System.Web.WebPages.PageVirtualPathAttribute("~/Areas/Public/Views/UserHeldDevices/Noticeboard.cshtml")] [System.Web.WebPages.PageVirtualPathAttribute("~/Areas/Public/Views/UserHeldDevices/Noticeboard.cshtml")]
public partial class Noticeboard : Disco.Services.Web.WebViewPage<dynamic> public partial class Noticeboard : Disco.Services.Web.WebViewPage<Disco.Web.Areas.Public.Models.UserHeldDevices.NoticeboardModel>
{ {
public Noticeboard() public Noticeboard()
{ {
@@ -44,7 +44,7 @@ namespace Disco.Web.Areas.Public.Views.UserHeldDevices
public override void Execute() public override void Execute()
{ {
#line 1 "..\..\Areas\Public\Views\UserHeldDevices\Noticeboard.cshtml" #line 2 "..\..\Areas\Public\Views\UserHeldDevices\Noticeboard.cshtml"
Layout = null; Layout = null;
Html.BundleDeferred("~/ClientScripts/Modules/Knockout"); Html.BundleDeferred("~/ClientScripts/Modules/Knockout");
@@ -70,7 +70,7 @@ WriteLiteral(" />\r\n <title>Disco ICT - Held Devices for Users</title>\r\n")
WriteLiteral(" "); WriteLiteral(" ");
#line 14 "..\..\Areas\Public\Views\UserHeldDevices\Noticeboard.cshtml" #line 15 "..\..\Areas\Public\Views\UserHeldDevices\Noticeboard.cshtml"
Write(Html.BundleRenderDeferred()); Write(Html.BundleRenderDeferred());
@@ -78,7 +78,17 @@ Write(Html.BundleRenderDeferred());
#line hidden #line hidden
WriteLiteral("\r\n</head>\r\n<body"); WriteLiteral("\r\n</head>\r\n<body");
WriteLiteral(" class=\"status-connecting\""); WriteAttribute("class", Tuple.Create(" class=\"", 572), Tuple.Create("\"", 625)
, Tuple.Create(Tuple.Create("", 580), Tuple.Create("theme-", 580), true)
#line 17 "..\..\Areas\Public\Views\UserHeldDevices\Noticeboard.cshtml"
, Tuple.Create(Tuple.Create("", 586), Tuple.Create<System.Object, System.Int32>(Model.DefaultTheme
#line default
#line hidden
, 586), false)
, Tuple.Create(Tuple.Create(" ", 607), Tuple.Create("status-connecting", 608), true)
);
WriteLiteral(">\r\n <div"); WriteLiteral(">\r\n <div");
@@ -219,27 +229,29 @@ WriteLiteral(">\r\n <li data-bind=\"css: { alert: IsAlert }\">\r\n
"p(valueUnwrapped);\r\n else\r\n $(element).livesta" + "p(valueUnwrapped);\r\n else\r\n $(element).livesta" +
"mp(\'destroy\');\r\n }\r\n };\r\n </script>\r\n <script>\r\n " + "mp(\'destroy\');\r\n }\r\n };\r\n </script>\r\n <script>\r\n " +
"$(function () {\r\n var hub;\r\n var viewModel;\r\n\r\n " + "$(function () {\r\n var hub;\r\n var viewModel;\r\n\r\n " +
" var rotateSpeed = 3000;\r\n var itemFilters;\r\n\r\n var $inPro" + " var rotateSpeed = 3000;\r\n var itemFilters;\r\n var fixedThe" +
"cessList = $(\'#inProcess\').find(\'ul\');\r\n var $readyForReturnList = $(" + "me = null;\r\n\r\n var $inProcessList = $(\'#inProcess\').find(\'ul\');\r\n " +
"\'#readyForReturn\').find(\'ul\');\r\n var $waitingForUserActionList = $(\'#" + " var $readyForReturnList = $(\'#readyForReturn\').find(\'ul\');\r\n " +
"waitingForUserAction\').find(\'ul\');\r\n\r\n function noticeboardViewModel(" + "var $waitingForUserActionList = $(\'#waitingForUserAction\').find(\'ul\');\r\n\r\n " +
"inProcess, readyForReturn, waitingForUserAction) {\r\n var self = t" + " function noticeboardViewModel(inProcess, readyForReturn, waitingForUserAct" +
"his;\r\n\r\n self.initialized = false;\r\n\r\n self.inProc" + "ion) {\r\n var self = this;\r\n\r\n self.initialized = f" +
"ess = ko.observableArray(inProcess);\r\n self.readyForReturn = ko.o" + "alse;\r\n\r\n self.inProcess = ko.observableArray(inProcess);\r\n " +
"bservableArray(readyForReturn);\r\n self.waitingForUserAction = ko." + " self.readyForReturn = ko.observableArray(readyForReturn);\r\n " +
"observableArray(waitingForUserAction);\r\n\r\n self.onRemove = functi" + " self.waitingForUserAction = ko.observableArray(waitingForUserAction);\r\n\r\n " +
"on (element, index, data) {\r\n $(element).slideUp(400, functio" + " self.onRemove = function (element, index, data) {\r\n " +
"n () {\r\n $(this).remove();\r\n });\r\n " + " $(element).slideUp(400, function () {\r\n $(this).remo" +
" }\r\n self.onAdd = function (element, index, data) {\r\n " + "ve();\r\n });\r\n }\r\n self.onAdd = " +
" if (self.initialized)\r\n $(element).hid" + "function (element, index, data) {\r\n if (self.initialized)\r\n " +
"e().slideDown(400);\r\n }\r\n }\r\n\r\n function in" + " $(element).hide().slideDown(400);\r\n }\r\n " +
"it() {\r\n // Connect to Hub\r\n hub = $.connection.no" + " }\r\n\r\n function init() {\r\n monitorMouseMove();\r" +
"ticeboardUpdates;\r\n\r\n // Map Functions\r\n hub.clien" + "\n applyQueryString();\r\n\r\n // Connect to Hub\r\n " +
"t.updateHeldDeviceForUser = updateHeldDevice;\r\n\r\n $.connection.hu" + " hub = $.connection.noticeboardUpdates;\r\n\r\n // Map Func" +
"b.qs = { Noticeboard: \'"); "tions\r\n hub.client.updateHeldDeviceForUser = updateHeldDevice;\r\n " +
" hub.client.setTheme = setTheme;\r\n\r\n $.connection.h" +
"ub.qs = { Noticeboard: \'");
#line 127 "..\..\Areas\Public\Views\UserHeldDevices\Noticeboard.cshtml" #line 133 "..\..\Areas\Public\Views\UserHeldDevices\Noticeboard.cshtml"
Write(Disco.Services.Jobs.Noticeboards.HeldDevicesForUsers.Name); Write(Disco.Services.Jobs.Noticeboards.HeldDevicesForUsers.Name);
@@ -259,7 +271,7 @@ WriteLiteral(@"' };
$.getJSON('"); $.getJSON('");
#line 138 "..\..\Areas\Public\Views\UserHeldDevices\Noticeboard.cshtml" #line 144 "..\..\Areas\Public\Views\UserHeldDevices\Noticeboard.cshtml"
Write(Url.Action(MVC.Public.UserHeldDevices.UserHeldDevices())); Write(Url.Action(MVC.Public.UserHeldDevices.UserHeldDevices()));
@@ -281,134 +293,152 @@ WriteLiteral("\', null, function (data) {\r\n\r\n var inProce
"orUserAction);\r\n\r\n ko.applyBindings(viewModel);\r\n " + "orUserAction);\r\n\r\n ko.applyBindings(viewModel);\r\n " +
" viewModel.initialized = true;\r\n\r\n $(\'body\').removeCla" + " viewModel.initialized = true;\r\n\r\n $(\'body\').removeCla" +
"ss(\'status-connecting\');\r\n\r\n window.setTimeout(scheduleRotati" + "ss(\'status-connecting\');\r\n\r\n window.setTimeout(scheduleRotati" +
"on, rotateSpeed);\r\n });\r\n buildFilters();\r\n " + "on, rotateSpeed);\r\n });\r\n }\r\n\r\n // Called b" +
" }\r\n\r\n // Called by SignalR\r\n function updateHeldDevic" + "y SignalR\r\n function updateHeldDevice(updates) {\r\n if " +
"e(updates) {\r\n if (viewModel) {\r\n\r\n $.each(upd" + "(viewModel) {\r\n\r\n $.each(updates, function (UserId, heldDevic" +
"ates, function (UserId, heldDeviceItem) {\r\n // Remove Exi" + "eItem) {\r\n // Remove Existing\r\n re" +
"sting\r\n removeItem(UserId);\r\n\r\n //" + "moveItem(UserId);\r\n\r\n // Add Item\r\n " +
" Add Item\r\n addItem(heldDeviceItem);\r\n " + " addItem(heldDeviceItem);\r\n });\r\n }\r\n " +
" });\r\n }\r\n }\r\n\r\n function removeItem(UserId" + " }\r\n\r\n function removeItem(UserId) {\r\n removeItemFr" +
") {\r\n removeItemFromArray(viewModel.inProcess, UserId);\r\n " + "omArray(viewModel.inProcess, UserId);\r\n removeItemFromArray(viewM" +
" removeItemFromArray(viewModel.readyForReturn, UserId);\r\n " + "odel.readyForReturn, UserId);\r\n removeItemFromArray(viewModel.wai" +
"removeItemFromArray(viewModel.waitingForUserAction, UserId);\r\n }\r\n\r\n " + "tingForUserAction, UserId);\r\n }\r\n\r\n function addItem(heldD" +
" function addItem(heldDeviceItem) {\r\n if (heldDeviceIte" + "eviceItem) {\r\n if (heldDeviceItem !== null &&\r\n " +
"m !== null &&\r\n heldDeviceItem !== undefined &&\r\n " + " heldDeviceItem !== undefined &&\r\n includeItem(heldDeviceIte" +
" includeItem(heldDeviceItem)) {\r\n\r\n var array;\r\n\r\n " + "m)) {\r\n\r\n var array;\r\n\r\n if (isWaitingForU" +
" if (isWaitingForUserAction(heldDeviceItem))\r\n " + "serAction(heldDeviceItem))\r\n array = viewModel.waitingFor" +
" array = viewModel.waitingForUserAction;\r\n else if (isRea" + "UserAction;\r\n else if (isReadyForReturn(heldDeviceItem))\r\n " +
"dyForReturn(heldDeviceItem))\r\n array = viewModel.readyFor" + " array = viewModel.readyForReturn;\r\n else" +
"Return;\r\n else if (isInProcess(heldDeviceItem))\r\n " + " if (isInProcess(heldDeviceItem))\r\n array = viewModel.inP" +
" array = viewModel.inProcess;\r\n\r\n if (array().leng" + "rocess;\r\n\r\n if (array().length === 0) {\r\n " +
"th === 0) {\r\n array.push(heldDeviceItem);\r\n " + " array.push(heldDeviceItem);\r\n } else {\r\n " +
" } else {\r\n var index = findSortedInsertIndex(array," + " var index = findSortedInsertIndex(array, heldDeviceItem);\r\n " +
" heldDeviceItem);\r\n if (index === -1)\r\n " + " if (index === -1)\r\n array.push(heldDeviceIt" +
" array.push(heldDeviceItem);\r\n else\r\n " + "em);\r\n else\r\n array.splice(ind" +
" array.splice(index, 0, heldDeviceItem);\r\n }\r" + "ex, 0, heldDeviceItem);\r\n }\r\n }\r\n }" +
"\n }\r\n }\r\n\r\n function rotateArrays() {\r\n " + "\r\n\r\n function rotateArrays() {\r\n rotateArray(viewModel" +
" rotateArray(viewModel.inProcess, $inProcessList);\r\n r" + ".inProcess, $inProcessList);\r\n rotateArray(viewModel.readyForRetu" +
"otateArray(viewModel.readyForReturn, $readyForReturnList);\r\n rota" + "rn, $readyForReturnList);\r\n rotateArray(viewModel.waitingForUserA" +
"teArray(viewModel.waitingForUserAction, $waitingForUserActionList);\r\n " + "ction, $waitingForUserActionList);\r\n }\r\n\r\n function schedu" +
" }\r\n\r\n function scheduleRotation() {\r\n rotateArrays();" + "leRotation() {\r\n rotateArrays();\r\n\r\n window.setTim" +
"\r\n\r\n window.setTimeout(scheduleRotation, rotateSpeed);\r\n " + "eout(scheduleRotation, rotateSpeed);\r\n }\r\n\r\n function incl" +
" }\r\n\r\n function includeItem(heldDeviceItem) {\r\n if (" + "udeItem(heldDeviceItem) {\r\n if (itemFilters == null || itemFilter" +
"itemFilters == null || itemFilters.length == 0)\r\n return true" + "s.length == 0)\r\n return true;\r\n\r\n return itemF" +
";\r\n\r\n return itemFilters.reduce(function (previousValue, currentV" + "ilters.reduce(function (previousValue, currentValue, index, array) {\r\n " +
"alue, index, array) {\r\n if (previousValue === false)\r\n " + " if (previousValue === false)\r\n return false;\r\n " +
" return false;\r\n return currentValue(heldDevi" + " return currentValue(heldDeviceItem);\r\n }, true" +
"ceItem);\r\n }, true);\r\n }\r\n\r\n function build" + ");\r\n }\r\n\r\n function setTheme(theme) {\r\n if " +
"Filters() {\r\n var filters = [];\r\n var queryStringP" + "(!!fixedTheme)\r\n return;\r\n\r\n var $body = $(doc" +
"arameters = getQueryStringParameters();\r\n\r\n if (queryStringParame" + "ument.body);\r\n\r\n // Existing classes\r\n var c = $bo" +
"ters !== null) {\r\n $.each(queryStringParameters, function (ke" + "dy.attr(\'class\').split(\' \');\r\n // Remove existing theme\r\n " +
"y, value) {\r\n switch (key.toLowerCase()) {\r\n " + " c = $.grep(c, function (i) { return (i.indexOf(\'theme-\') !== 0) });\r\n\r\n " +
" case \'deviceaddressinclude\':\r\n var" + " c.push(\'theme-\' + theme);\r\n\r\n $body.attr(\'class\', " +
" deviceAddresses = value.split(\",\").map(function (v) { return v.toLowerCase(); }" + "c.join(\' \'));\r\n }\r\n\r\n function monitorMouseMove() {\r\n " +
");\r\n if (deviceAddresses.length > 0) {\r\n " + " var token = null,\r\n $body = $(document.body);\r\n\r\n " +
" filters.push(function (heldDeviceItem) {\r\n " + " $body.mousemove(function () {\r\n if (!!token)\r\n" +
" // false if DeviceAddressShortName is null\r\n " + " window.clearTimeout(token);\r\n else if" +
" if (!heldDeviceItem.DeviceAddressShortName)\r\n " + " ($body.css(\'cursor\') == \'none\')\r\n $body.css(\'cursor\', \'a" +
" return false;\r\n\r\n " + "uto\');\r\n\r\n token = window.setTimeout(function () {\r\n " +
" // true if DeviceAddressShortName is included\r\n " + " $body.css(\'cursor\', \'none\');\r\n token = nul" +
" return $.inArray(heldDeviceItem.DeviceAddressShortName" + "l;\r\n }, 3500);\r\n });\r\n\r\n }\r\n\r\n " +
".toLowerCase(), deviceAddresses) >= 0;\r\n });\r" + " function applyQueryString() {\r\n var queryStringParameters " +
"\n }\r\n break;\r\n " + "= getQueryStringParameters();\r\n\r\n if (queryStringParameters !== n" +
" case \'deviceaddressexclude\':\r\n " + "ull) {\r\n var filters = [];\r\n\r\n $.each(quer" +
" var deviceAddresses = value.split(\",\").map(function (v) { return v.toLower" + "yStringParameters, function (key, value) {\r\n switch (key." +
"Case(); });\r\n if (deviceAddresses.length > 0) {\r\n" + "toLowerCase()) {\r\n case \'theme\': // THEME\r\n " +
" filters.push(function (heldDeviceItem) {\r\n " + " setTheme(value);\r\n fixedThe" +
" // true if DeviceAddressShortName is null\r" + "me = value;\r\n break;\r\n " +
"\n if (!heldDeviceItem.DeviceAddressShortN" + " case \'deviceaddressinclude\': // FILTER: Device Address Include\r\n " +
"ame)\r\n return true;\r\n\r\n " + " var deviceAddresses = value.split(\",\").map(function (v) { retur" +
" // true if DeviceAddressShortName is excluded\r\n " + "n v.toLowerCase(); });\r\n if (deviceAddresses.leng" +
" return $.inArray(heldDeviceItem.DeviceAddressSh" + "th > 0) {\r\n filters.push(function (heldDevice" +
"ortName.toLowerCase(), deviceAddresses) < 0;\r\n " + "Item) {\r\n // false if DeviceAddressShortN" +
" });\r\n }\r\n break;" + "ame is null\r\n if (!heldDeviceItem.DeviceA" +
"\r\n case \'deviceprofileinclude\':\r\n " + "ddressShortName)\r\n return false;\r\n\r\n " +
" var deviceProfiles = value.split(\",\").map(function (v) { return pars" + " // true if DeviceAddressShortName is incl" +
"eInt(v); });\r\n if (deviceProfiles.length > 0) {\r\n" + "uded\r\n return $.inArray(heldDeviceItem.De" +
" filters.push(function (heldDeviceItem) {\r\n " + "viceAddressShortName.toLowerCase(), deviceAddresses) >= 0;\r\n " +
" // true if DeviceProfileId is included\r\n " + " });\r\n }\r\n " +
" return $.inArray(heldDeviceItem.DeviceProf" + " break;\r\n case \'deviceaddressexclude\': // FILT" +
"ileId, deviceProfiles) >= 0;\r\n });\r\n " + "ER: Device Address Exclude\r\n var deviceAddresses " +
" }\r\n break;\r\n " + "= value.split(\",\").map(function (v) { return v.toLowerCase(); });\r\n " +
" case \'deviceprofileexclude\':\r\n var " + " if (deviceAddresses.length > 0) {\r\n " +
"deviceProfiles = value.split(\",\").map(function (v) { return parseInt(v); });\r\n " + " filters.push(function (heldDeviceItem) {\r\n " +
" if (deviceProfiles.length > 0) {\r\n " + " // true if DeviceAddressShortName is null\r\n " +
" filters.push(function (heldDeviceItem) {\r\n " + " if (!heldDeviceItem.DeviceAddressShortName)\r\n " +
" // true if DeviceProfileId is excluded\r\n " + " return true;\r\n\r\n " +
" return $.inArray(heldDeviceItem.DeviceProfileId, devicePro" + "// true if DeviceAddressShortName is excluded\r\n " +
"files) < 0;\r\n });\r\n " + " return $.inArray(heldDeviceItem.DeviceAddressShortName.toLowerCase(), dev" +
" }\r\n break;\r\n }\r\n " + "iceAddresses) < 0;\r\n });\r\n " +
" });\r\n }\r\n\r\n if (filters.length > 0" + " }\r\n break;\r\n " +
")\r\n itemFilters = filters;\r\n else\r\n " + " case \'deviceprofileinclude\': // FILTER: Device Profile Include\r\n " +
" itemFilters = null;\r\n }\r\n\r\n function connectionEr" + " var deviceProfiles = value.split(\",\").map(function (v) { ret" +
"ror() {\r\n try {\r\n $(\'body\').addClass(\'status-e" + "urn parseInt(v); });\r\n if (deviceProfiles.length " +
"rror\');\r\n $.connection.hub.stop();\r\n } catch (" + "> 0) {\r\n filters.push(function (heldDeviceIte" +
"e) {\r\n // Ignore\r\n }\r\n\r\n window" + "m) {\r\n // true if DeviceProfileId is incl" +
".setTimeout(function () {\r\n window.location.href = window.loc" + "uded\r\n return $.inArray(heldDeviceItem.De" +
"ation.href;\r\n }, 10000);\r\n }\r\n\r\n // Helpers" + "viceProfileId, deviceProfiles) >= 0;\r\n });\r\n " +
"\r\n function rotateArray(koArray, element) {\r\n var item" + " }\r\n break;\r\n " +
"s = koArray();\r\n\r\n if (items.length <= 1)\r\n re" + " case \'deviceprofileexclude\': // FILTER: Device Profile Exc" +
"turn 0;\r\n\r\n if (element.height() < (element.parent().height() - 3" + "lude\r\n var deviceProfiles = value.split(\",\").map(" +
"0)) {\r\n\r\n if (findUnsortedArrayTopIndex(items) !== 0)\r\n " + "function (v) { return parseInt(v); });\r\n if (devi" +
" koArray.sort(sortFunction);\r\n\r\n // Don\'t ro" + "ceProfiles.length > 0) {\r\n filters.push(funct" +
"tate if small & sorted correctly\r\n return;\r\n }" + "ion (heldDeviceItem) {\r\n // true if Devic" +
"\r\n\r\n // Move Last Item to Top\r\n var item = koArray" + "eProfileId is excluded\r\n return $.inArray" +
".pop();\r\n koArray.unshift(item);\r\n }\r\n func" + "(heldDeviceItem.DeviceProfileId, deviceProfiles) < 0;\r\n " +
"tion removeItemFromArray(koArray, UserId) {\r\n var items = koArray" + " });\r\n }\r\n " +
"();\r\n for (var i = 0; i < items.length; i++) {\r\n " + " break;\r\n }\r\n });\r\n\r\n " +
" if (items[i].UserId == UserId) {\r\n koArray.splice(i, 1" + " if (filters.length > 0)\r\n itemFilters = filters;\r\n " +
");\r\n items = koArray();\r\n i--;\r\n " + " else\r\n itemFilters = null;\r\n " +
" }\r\n }\r\n }\r\n function find" + " }\r\n }\r\n\r\n function connectionError() {\r\n " +
"UnsortedArrayTopIndex(items) {\r\n // Only one Item\r\n " + " try {\r\n $(\'body\').addClass(\'status-error\');\r\n " +
" if (items.length <= 1)\r\n return 0;\r\n\r\n for (" + " $.connection.hub.stop();\r\n } catch (e) {\r\n " +
"var i = 1; i < items.length; i++) {\r\n var s = sortFunction(it" + " // Ignore\r\n }\r\n\r\n window.setTimeout(function (" +
"ems[i - 1], items[i]);\r\n if (s > 0)\r\n " + ") {\r\n window.location.reload(true);\r\n }, 10000" +
"return i;\r\n }\r\n\r\n return 0;\r\n }\r\n " + ");\r\n }\r\n\r\n // Helpers\r\n function rotateArray(ko" +
" function findSortedInsertIndex(koArray, heldDeviceItem) {\r\n " + "Array, element) {\r\n var items = koArray();\r\n\r\n if " +
" var items = koArray();\r\n var startIndex = findUnsortedArrayTopIn" + "(items.length <= 1)\r\n return 0;\r\n\r\n if (elemen" +
"dex(items);\r\n for (var i = startIndex; i < items.length; i++) {\r\n" + "t.height() < (element.parent().height() - 30)) {\r\n\r\n if (find" +
" var s = sortFunction(heldDeviceItem, items[i]);\r\n " + "UnsortedArrayTopIndex(items) !== 0)\r\n koArray.sort(sortFu" +
" if (s <= 0)\r\n return i;\r\n }\r\n " + "nction);\r\n\r\n // Don\'t rotate if small & sorted correctly\r\n " +
" if (startIndex !== 0) {\r\n for (var i = 0; i < sta" + " return;\r\n }\r\n\r\n // Move Last Item" +
"rtIndex; i++) {\r\n var s = sortFunction(heldDeviceItem, it" + " to Top\r\n var item = koArray.pop();\r\n koArray.unsh" +
"ems[i]);\r\n if (s <= 0)\r\n retur" + "ift(item);\r\n }\r\n function removeItemFromArray(koArray, Use" +
"n i;\r\n }\r\n return startIndex;\r\n " + "rId) {\r\n var items = koArray();\r\n for (var i = 0; " +
" } else {\r\n return -1;\r\n }\r\n }\r" + "i < items.length; i++) {\r\n if (items[i].UserId == UserId) {\r\n" +
"\n function sortFunction(l, r) {\r\n return l.UserIdFrien" + " koArray.splice(i, 1);\r\n items = k" +
"dly.toLowerCase() == r.UserIdFriendly.toLowerCase() ? 0 : (l.UserIdFriendly.toLo" + "oArray();\r\n i--;\r\n }\r\n " +
"werCase() < r.UserIdFriendly.toLowerCase() ? -1 : 1)\r\n }\r\n " + "}\r\n }\r\n function findUnsortedArrayTopIndex(items) {\r\n " +
" function isInProcess(i) {\r\n return !i.ReadyForReturn && !i.Waiti" + " // Only one Item\r\n if (items.length <= 1)\r\n " +
"ngForUserAction;\r\n }\r\n function isReadyForReturn(i) {\r\n " + " return 0;\r\n\r\n for (var i = 1; i < items.length; i++) {\r\n" +
" return i.ReadyForReturn && !i.WaitingForUserAction;\r\n }\r" + " var s = sortFunction(items[i - 1], items[i]);\r\n " +
"\n function isWaitingForUserAction(i) {\r\n return i.Wait" + " if (s > 0)\r\n return i;\r\n }\r\n\r\n " +
"ingForUserAction;\r\n }\r\n function getQueryStringParameters(" + " return 0;\r\n }\r\n function findSortedInsertIndex(" +
") {\r\n\r\n if (window.location.search.length === 0)\r\n " + "koArray, heldDeviceItem) {\r\n var items = koArray();\r\n " +
" return null;\r\n\r\n var params = {};\r\n window.lo" + " var startIndex = findUnsortedArrayTopIndex(items);\r\n for (var" +
"cation.search.substr(1).split(\"&\").forEach(function (pair) {\r\n " + " i = startIndex; i < items.length; i++) {\r\n var s = sortFunct" +
" if (pair === \"\") return;\r\n var parts = pair.split(\"=\");\r\n " + "ion(heldDeviceItem, items[i]);\r\n if (s <= 0)\r\n " +
" params[parts[0]] = parts[1] && decodeURIComponent(parts[1].rep" + " return i;\r\n }\r\n if (startIndex !== 0) {\r\n" +
"lace(/\\+/g, \" \"));\r\n });\r\n return params;\r\n " + " for (var i = 0; i < startIndex; i++) {\r\n " +
" }\r\n\r\n init();\r\n });\r\n </script>\r\n</body>\r\n</html>"); " var s = sortFunction(heldDeviceItem, items[i]);\r\n if " +
"(s <= 0)\r\n return i;\r\n }\r\n " +
" return startIndex;\r\n } else {\r\n re" +
"turn -1;\r\n }\r\n }\r\n function sortFunction(l," +
" r) {\r\n return l.UserIdFriendly.toLowerCase() == r.UserIdFriendly" +
".toLowerCase() ? 0 : (l.UserIdFriendly.toLowerCase() < r.UserIdFriendly.toLowerC" +
"ase() ? -1 : 1)\r\n }\r\n function isInProcess(i) {\r\n " +
" return !i.ReadyForReturn && !i.WaitingForUserAction;\r\n }\r\n " +
" function isReadyForReturn(i) {\r\n return i.ReadyForReturn " +
"&& !i.WaitingForUserAction;\r\n }\r\n function isWaitingForUse" +
"rAction(i) {\r\n return i.WaitingForUserAction;\r\n }\r\n " +
" function getQueryStringParameters() {\r\n\r\n if (window.loc" +
"ation.search.length === 0)\r\n return null;\r\n\r\n " +
"var params = {};\r\n window.location.search.substr(1).split(\"&\").fo" +
"rEach(function (pair) {\r\n if (pair === \"\") return;\r\n " +
" var parts = pair.split(\"=\");\r\n params[parts[0]] = " +
"parts[1] && decodeURIComponent(parts[1].replace(/\\+/g, \" \"));\r\n }" +
");\r\n return params;\r\n }\r\n\r\n init();\r\n " +
" });\r\n </script>\r\n</body>\r\n</html>\r\n");
} }
} }
-14
View File
@@ -1,4 +1,3 @@
///#source 1 1 /ClientSource/Scripts/Core/modernizr-2.7.2.js
/*! /*!
* Modernizr v2.7.2 * Modernizr v2.7.2
* www.modernizr.com * www.modernizr.com
@@ -1406,7 +1405,6 @@ window.Modernizr = (function( window, document, undefined ) {
})(this, this.document); })(this, this.document);
///#source 1 1 /ClientSource/Scripts/Core/jquery-2.1.1.js
/*! /*!
* jQuery JavaScript Library v2.1.1 * jQuery JavaScript Library v2.1.1
* http://jquery.com/ * http://jquery.com/
@@ -10598,7 +10596,6 @@ return jQuery;
})); }));
///#source 1 1 /ClientSource/Scripts/Core/jquery.validate.js
/*! /*!
* jQuery Validation Plugin v1.12.0 * jQuery Validation Plugin v1.12.0
* *
@@ -11893,7 +11890,6 @@ $.format = function deprecated() {
}); });
}(jQuery)); }(jQuery));
///#source 1 1 /ClientSource/Scripts/Core/jquery.validate.unobtrusive.js
/* NUGET: BEGIN LICENSE TEXT /* NUGET: BEGIN LICENSE TEXT
* *
* Microsoft grants you the right to use these script files for the sole * Microsoft grants you the right to use these script files for the sole
@@ -12288,7 +12284,6 @@ $.format = function deprecated() {
$jQval.unobtrusive.parse(document); $jQval.unobtrusive.parse(document);
}); });
}(jQuery)); }(jQuery));
///#source 1 1 /ClientSource/Scripts/Core/disco.unobtrusiveValidation.extensions.js
// Adapted from: http://xhalent.wordpress.com/2011/01/24/applying-unobtrusive-validation-to-dynamic-content/ // Adapted from: http://xhalent.wordpress.com/2011/01/24/applying-unobtrusive-validation-to-dynamic-content/
(function ($) { (function ($) {
$.validator.unobtrusive.reparse = function (selector) { $.validator.unobtrusive.reparse = function (selector) {
@@ -12324,7 +12319,6 @@ $.format = function deprecated() {
}); });
} }
})($); })($);
///#source 1 1 /ClientSource/Scripts/Core/jquery-ui-1.10.4.js
/*! jQuery UI - v1.10.4 - 2014-01-17 /*! jQuery UI - v1.10.4 - 2014-01-17
* http://jqueryui.com * http://jqueryui.com
* Includes: jquery.ui.core.js, jquery.ui.widget.js, jquery.ui.mouse.js, jquery.ui.position.js, jquery.ui.accordion.js, jquery.ui.autocomplete.js, jquery.ui.button.js, jquery.ui.datepicker.js, jquery.ui.dialog.js, jquery.ui.draggable.js, jquery.ui.droppable.js, jquery.ui.effect.js, jquery.ui.effect-blind.js, jquery.ui.effect-bounce.js, jquery.ui.effect-clip.js, jquery.ui.effect-drop.js, jquery.ui.effect-explode.js, jquery.ui.effect-fade.js, jquery.ui.effect-fold.js, jquery.ui.effect-highlight.js, jquery.ui.effect-pulsate.js, jquery.ui.effect-scale.js, jquery.ui.effect-shake.js, jquery.ui.effect-slide.js, jquery.ui.effect-transfer.js, jquery.ui.menu.js, jquery.ui.progressbar.js, jquery.ui.resizable.js, jquery.ui.selectable.js, jquery.ui.slider.js, jquery.ui.sortable.js, jquery.ui.spinner.js, jquery.ui.tabs.js, jquery.ui.tooltip.js * Includes: jquery.ui.core.js, jquery.ui.widget.js, jquery.ui.mouse.js, jquery.ui.position.js, jquery.ui.accordion.js, jquery.ui.autocomplete.js, jquery.ui.button.js, jquery.ui.datepicker.js, jquery.ui.dialog.js, jquery.ui.draggable.js, jquery.ui.droppable.js, jquery.ui.effect.js, jquery.ui.effect-blind.js, jquery.ui.effect-bounce.js, jquery.ui.effect-clip.js, jquery.ui.effect-drop.js, jquery.ui.effect-explode.js, jquery.ui.effect-fade.js, jquery.ui.effect-fold.js, jquery.ui.effect-highlight.js, jquery.ui.effect-pulsate.js, jquery.ui.effect-scale.js, jquery.ui.effect-shake.js, jquery.ui.effect-slide.js, jquery.ui.effect-transfer.js, jquery.ui.menu.js, jquery.ui.progressbar.js, jquery.ui.resizable.js, jquery.ui.selectable.js, jquery.ui.slider.js, jquery.ui.sortable.js, jquery.ui.spinner.js, jquery.ui.tabs.js, jquery.ui.tooltip.js
@@ -27334,7 +27328,6 @@ $.widget( "ui.tooltip", {
}( jQuery ) ); }( jQuery ) );
///#source 1 1 /ClientSource/Scripts/Core/jquery.watermark.js
/* /*
Watermark plugin for jQuery Watermark plugin for jQuery
Version: 3.1.4 Version: 3.1.4
@@ -27934,7 +27927,6 @@ if ( $.watermark.runOnce ) {
})( jQuery, window ); })( jQuery, window );
///#source 1 1 /ClientSource/Scripts/Core/jquery.dataTables.js
/** /**
* @summary DataTables * @summary DataTables
* @description Paginate, search and sort HTML tables * @description Paginate, search and sort HTML tables
@@ -40028,7 +40020,6 @@ if ( $.watermark.runOnce ) {
*/ */
}(jQuery, window, document, undefined)); }(jQuery, window, document, undefined));
///#source 1 1 /ClientSource/Scripts/Core/moment.js
//! moment.js //! moment.js
//! version : 2.6.0 //! version : 2.6.0
//! authors : Tim Wood, Iskren Chernev, Moment.js contributors //! authors : Tim Wood, Iskren Chernev, Moment.js contributors
@@ -42519,7 +42510,6 @@ if ( $.watermark.runOnce ) {
} }
}).call(this); }).call(this);
///#source 1 1 /ClientSource/Scripts/Core/moment.en-au.js
// moment.js language configuration // moment.js language configuration
// language : australian english (en-au) // language : australian english (en-au)
@@ -42583,9 +42573,7 @@ if ( $.watermark.runOnce ) {
}); });
})); }));
///#source 1 1 /ClientSource/Scripts/Core/disco.moment.extensions.js
moment.lang('en-au'); moment.lang('en-au');
///#source 1 1 /ClientSource/Scripts/Core/livestamp.js
// Livestamp.js / v1.1.2 / (c) 2012 Matt Bradley / MIT License // Livestamp.js / v1.1.2 / (c) 2012 Matt Bradley / MIT License
(function (plugin) { (function (plugin) {
if (typeof define === 'function' && define.amd) { if (typeof define === 'function' && define.amd) {
@@ -42729,7 +42717,6 @@ moment.lang('en-au');
return livestampLocal[method](this, options); return livestampLocal[method](this, options);
}; };
})); }));
///#source 1 1 /ClientSource/Scripts/Core/disco.dataTables.extensions.js
jQuery.fn.dataTableExt.afnSortData['text'] = function (oSettings, iColumn) { jQuery.fn.dataTableExt.afnSortData['text'] = function (oSettings, iColumn) {
var aData = []; var aData = [];
$('td:eq(' + iColumn + ')', oSettings.oApi._fnGetTrNodes(oSettings)).each(function () { $('td:eq(' + iColumn + ')', oSettings.oApi._fnGetTrNodes(oSettings)).each(function () {
@@ -42776,7 +42763,6 @@ jQuery.fn.dataTableExt.oSort['disco_datetime-desc'] = function (a, b) {
// Change Default Menu Lengths // Change Default Menu Lengths
jQuery.fn.DataTable.defaults.aLengthMenu = [[10, 20, 50, -1], [10, 20, 50, "All"]]; jQuery.fn.DataTable.defaults.aLengthMenu = [[10, 20, 50, -1], [10, 20, 50, "All"]];
///#source 1 1 /ClientSource/Scripts/Core/disco.uicore.js
(function ($, window, document, Modernizr) { (function ($, window, document, Modernizr) {
// Document Ready // Document Ready
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1,4 +1,3 @@
///#source 1 1 /ClientSource/Scripts/Modules/Disco-AjaxHelperIcons/disco.ajaxhelpericons.js
$(function () { $(function () {
$('.ajaxLoading:not(.showInitially)').hide(); $('.ajaxLoading:not(.showInitially)').hide();
}) })
@@ -1,4 +1 @@
$(function(){$(".ajaxLoading:not(.showInitially)").hide()}); $(function(){$(".ajaxLoading:not(.showInitially)").hide()});
/*
//# sourceMappingURL=Disco-AjaxHelperIcons.min.js.map
*/
@@ -1,8 +0,0 @@
{
"version":3,
"file":"Disco-AjaxHelperIcons.min.js",
"lineCount":1,
"mappings":"AAAAA,CAAC,CAAC,QAAS,CAAA,CAAG,CACVA,CAAC,CAAC,kCAAD,CAAoCC,KAAK,CAAA,CADhC,CAAb,C",
"sources":["/ClientSource/Scripts/Modules/Disco-AjaxHelperIcons/disco.ajaxhelpericons.js"],
"names":["$","hide"]
}
@@ -1,4 +1,3 @@
///#source 1 1 /ClientSource/Scripts/Modules/Disco-AttachmentUploader/webcam.js
// WebcamJS v1.0 // WebcamJS v1.0
// Webcam library for capturing JPEG/PNG images in JavaScript // Webcam library for capturing JPEG/PNG images in JavaScript
// Attempts getUserMedia, falls back to Flash // Attempts getUserMedia, falls back to Flash
@@ -398,7 +397,6 @@ var Webcam = {
Webcam.init(); Webcam.init();
///#source 1 1 /ClientSource/Scripts/Modules/Disco-AttachmentUploader/disco-attachmentuploader.js
/// <reference path="webcam.js" /> /// <reference path="webcam.js" />
; (function (window, document, $, Webcam) { ; (function (window, document, $, Webcam) {
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1,7 +1,3 @@
///#source 1 1 /ClientSource/Scripts/Modules/Disco-CreateJob/disco.createjob.js
/// <reference path="../../Core/jquery-1.8.1.js" />
/// <reference path="../../Core/jquery-ui-1.8.23.js" />
(function ($, window, document) { (function ($, window, document) {
$(function () { $(function () {
var createJobDialog = null; var createJobDialog = null;
@@ -19,16 +15,16 @@
document.DiscoFunctions = {}; document.DiscoFunctions = {};
} }
document.DiscoFunctions.CreateOpenJobDialog = function (url) { document.DiscoFunctions.CreateOpenJobDialog = function (url) {
createJobDialog = $('<div>').attr('id', 'createJobDialog').css({ width: '100%', height: '100%', paddingTop: '0' }).appendTo(document.body); createJobDialog = $('<div>').attr('id', 'createJobDialog').css({ paddingTop: '0' }).appendTo(document.body);
createJobDialog.dialog({ createJobDialog.dialog({
resizable: false, resizable: false,
draggable: false, draggable: false,
modal: true, modal: true,
autoOpen: true, autoOpen: false,
title: 'Create Job', title: 'Create Job',
width: 850, width: 850,
height: $(window).height() - 100, height: Math.min(670, $(window).height() - 50),
close: function () { close: function () {
createJobDialog.find('iframe').attr('src', 'about:blank'); createJobDialog.find('iframe').attr('src', 'about:blank');
createJobDialog.dialog('destroy').remove(); createJobDialog.dialog('destroy').remove();
@@ -37,9 +33,20 @@
buttons: {} buttons: {}
}); });
var iframe = $('<iframe>').attr({ 'src': url }).width('100%').height('100%').css('border', 'none').appendTo(createJobDialog); var iframe = $('<iframe>')
.attr({ 'src': url })
.css({
'border': 'none',
'height': '100%',
'width': '100%'
})
.appendTo(createJobDialog);
createJobDialog[0].discoDialogMethods = dialogMethods; createJobDialog[0].discoDialogMethods = dialogMethods;
window.setTimeout(function () {
createJobDialog.dialog('open');
}, 1);
} }
// Create Job Button // Create Job Button
@@ -1,4 +1 @@
(function(n,t,i){n(function(){var r=null,u={close:function(){r.dialog("close")},setButtons:function(n){r&&r.dialog("option","buttons",n)}};i.DiscoFunctions||(i.DiscoFunctions={});i.DiscoFunctions.CreateOpenJobDialog=function(f){r=n("<div>").attr("id","createJobDialog").css({width:"100%",height:"100%",paddingTop:"0"}).appendTo(i.body);r.dialog({resizable:!1,draggable:!1,modal:!0,autoOpen:!0,title:"Create Job",width:850,height:n(t).height()-100,close:function(){r.find("iframe").attr("src","about:blank");r.dialog("destroy").remove();r=null},buttons:{}});var e=n("<iframe>").attr({src:f}).width("100%").height("100%").css("border","none").appendTo(r);r[0].discoDialogMethods=u};n("#buttonCreateJob").click(function(){var t=n(this),r=t.attr("href");return i.DiscoFunctions.CreateOpenJobDialog(r),!1})})})($,window,document); (function(n,t,i){n(function(){var r=null,u={close:function(){r.dialog("close")},setButtons:function(n){r&&r.dialog("option","buttons",n)}};i.DiscoFunctions||(i.DiscoFunctions={});i.DiscoFunctions.CreateOpenJobDialog=function(f){r=n("<div>").attr("id","createJobDialog").css({paddingTop:"0"}).appendTo(i.body);r.dialog({resizable:!1,draggable:!1,modal:!0,autoOpen:!1,title:"Create Job",width:850,height:Math.min(670,n(t).height()-50),close:function(){r.find("iframe").attr("src","about:blank");r.dialog("destroy").remove();r=null},buttons:{}});var e=n("<iframe>").attr({src:f}).css({border:"none",height:"100%",width:"100%"}).appendTo(r);r[0].discoDialogMethods=u;t.setTimeout(function(){r.dialog("open")},1)};n("#buttonCreateJob").click(function(){var t=n(this),r=t.attr("href");return i.DiscoFunctions.CreateOpenJobDialog(r),!1})})})($,window,document);
/*
//# sourceMappingURL=Disco-CreateJob.min.js.map
*/
@@ -1,8 +0,0 @@
{
"version":3,
"file":"Disco-CreateJob.min.js",
"lineCount":1,
"mappings":"CAGC,QAAS,CAACA,CAAC,CAAEC,CAAM,CAAEC,CAAZ,CAAsB,CAC5BF,CAAC,CAAC,QAAS,CAAA,CAAG,CACV,IAAIG,EAAkB,KAClBC,EAAgB,CAChB,KAAK,CAAEC,QAAS,CAAA,CAAG,CACfF,CAAeG,OAAO,CAAC,OAAD,CADP,CAElB,CACD,UAAU,CAAEC,QAAS,CAACC,CAAD,CAAU,CACvBL,C,EACAA,CAAeG,OAAO,CAAC,QAAQ,CAAE,SAAS,CAAEE,CAAtB,CAFC,CAJf,CADM,CAWrBN,CAAQO,e,GACTP,CAAQO,eAAgB,CAAE,CAAA,EAAE,CAEhCP,CAAQO,eAAeC,oBAAqB,CAAEC,QAAS,CAACC,CAAD,CAAM,CACzDT,CAAgB,CAAEH,CAAC,CAAC,OAAD,CAASa,KAAK,CAAC,IAAI,CAAE,iBAAP,CAAyBC,IAAI,CAAC,CAAE,KAAK,CAAE,MAAM,CAAE,MAAM,CAAE,MAAM,CAAE,UAAU,CAAE,GAA7C,CAAD,CAAoDC,SAAS,CAACb,CAAQc,KAAT,CAAe,CAE1Ib,CAAeG,OAAO,CAAC,CACnB,SAAS,CAAE,CAAA,CAAK,CAChB,SAAS,CAAE,CAAA,CAAK,CAChB,KAAK,CAAE,CAAA,CAAI,CACX,QAAQ,CAAE,CAAA,CAAI,CACd,KAAK,CAAE,YAAY,CACnB,KAAK,CAAE,GAAG,CACV,MAAM,CAAEN,CAAC,CAACC,CAAD,CAAQgB,OAAO,CAAA,CAAG,CAAE,GAAG,CAChC,KAAK,CAAEZ,QAAS,CAAA,CAAG,CACfF,CAAee,KAAK,CAAC,QAAD,CAAUL,KAAK,CAAC,KAAK,CAAE,aAAR,CAAsB,CACzDV,CAAeG,OAAO,CAAC,SAAD,CAAWa,OAAO,CAAA,CAAE,CAC1ChB,CAAgB,CAAE,IAHH,CAIlB,CACD,OAAO,CAAE,CAAA,CAbU,CAAD,CAcpB,CAEF,IAAIiB,EAASpB,CAAC,CAAC,UAAD,CAAYa,KAAK,CAAC,CAAE,GAAK,CAAED,CAAT,CAAD,CAAgBS,MAAM,CAAC,MAAD,CAAQJ,OAAO,CAAC,MAAD,CAAQH,IAAI,CAAC,QAAQ,CAAE,MAAX,CAAkBC,SAAS,CAACZ,CAAD,CAAiB,CAE5HA,CAAgB,CAAA,CAAA,CAAEmB,mBAAoB,CAAElB,CArBiB,C,CAyB7DJ,CAAC,CAAC,kBAAD,CAAoBuB,MAAM,CAAC,QAAS,CAAA,CAAG,CACpC,IAAIC,EAAQxB,CAAC,CAAC,IAAD,EACTyB,EAAOD,CAAKX,KAAK,CAAC,MAAD,CADF,CAKnB,OAFAX,CAAQO,eAAeC,oBAAoB,CAACe,CAAD,CAAM,CAE1C,CAAA,CAN6B,CAAb,CAxCjB,CAAb,CAD2B,EAkD9B,CAACzB,CAAC,CAAEC,MAAM,CAAEC,QAAZ,CAAqB",
"sources":["/ClientSource/Scripts/Modules/Disco-CreateJob/disco.createjob.js"],
"names":["$","window","document","createJobDialog","dialogMethods","close","dialog","setButtons","buttons","DiscoFunctions","CreateOpenJobDialog","document.DiscoFunctions.CreateOpenJobDialog","url","attr","css","appendTo","body","height","find","remove","iframe","width","discoDialogMethods","click","$this","href"]
}
@@ -1,7 +1,4 @@
/// <reference path="../../Core/jquery-1.8.1.js" /> (function ($, window, document) {
/// <reference path="../../Core/jquery-ui-1.8.23.js" />
(function ($, window, document) {
$(function () { $(function () {
var createJobDialog = null; var createJobDialog = null;
var dialogMethods = { var dialogMethods = {
@@ -18,16 +15,16 @@
document.DiscoFunctions = {}; document.DiscoFunctions = {};
} }
document.DiscoFunctions.CreateOpenJobDialog = function (url) { document.DiscoFunctions.CreateOpenJobDialog = function (url) {
createJobDialog = $('<div>').attr('id', 'createJobDialog').css({ width: '100%', height: '100%', paddingTop: '0' }).appendTo(document.body); createJobDialog = $('<div>').attr('id', 'createJobDialog').css({ paddingTop: '0' }).appendTo(document.body);
createJobDialog.dialog({ createJobDialog.dialog({
resizable: false, resizable: false,
draggable: false, draggable: false,
modal: true, modal: true,
autoOpen: true, autoOpen: false,
title: 'Create Job', title: 'Create Job',
width: 850, width: 850,
height: $(window).height() - 100, height: Math.min(670, $(window).height() - 50),
close: function () { close: function () {
createJobDialog.find('iframe').attr('src', 'about:blank'); createJobDialog.find('iframe').attr('src', 'about:blank');
createJobDialog.dialog('destroy').remove(); createJobDialog.dialog('destroy').remove();
@@ -36,9 +33,20 @@
buttons: {} buttons: {}
}); });
var iframe = $('<iframe>').attr({ 'src': url }).width('100%').height('100%').css('border', 'none').appendTo(createJobDialog); var iframe = $('<iframe>')
.attr({ 'src': url })
.css({
'border': 'none',
'height': '100%',
'width': '100%'
})
.appendTo(createJobDialog);
createJobDialog[0].discoDialogMethods = dialogMethods; createJobDialog[0].discoDialogMethods = dialogMethods;
window.setTimeout(function () {
createJobDialog.dialog('open');
}, 1);
} }
// Create Job Button // Create Job Button
@@ -1,4 +1,3 @@
///#source 1 1 /ClientSource/Scripts/Modules/Disco-DataTableHelpers/disco.datatablehelpers.js
(function (window, document, $) { (function (window, document, $) {
var dataTables = []; var dataTables = [];
@@ -1,4 +1 @@
(function(n,t,i){var r=[];i(function(){function t(){var t=i(this).closest(".dataTables_wrapper");t.length>0&&n.setTimeout(function(){var e=i(n),o=t.height(),r=t.offset(),u=e.scrollTop(),s=e.height(),h=u-r.top,f;h>0?i("html").animate({scrollTop:r.top},125):(f=(u+s-(o+r.top))*-1,f>0&&(o>s?i("html").animate({scrollTop:r.top},125):i("html").animate({scrollTop:u+f},125)))},1)}i("table.jobTable").each(function(){var u=i(this),h=!1,l=u.hasClass("enablePaging"),a=u.hasClass("enableFilter"),v=u.find("tr").length>20,y={bPaginate:l,sPaginationType:"full_numbers",bLengthChange:v,iDisplayLength:20,bFilter:a,bSort:!0,bInfo:!1,bAutoWidth:!1,aoColumnDefs:[{aTargets:["dates"],sSortDataType:"disco_datetime",sType:"disco_datetime"}],aaSorting:[],oLanguage:{sSearch:"Filter:"},fnDrawCallback:function(){h?t.apply(u):h=!0}},p=u.dataTable(y),c,o,f,e,n,s;if(u.hasClass("hideStatusClosed")&&(c=u.children("tbody"),o=c.children('tr[data-status="Closed"]'),o.length>0)){f=i(this).closest(".dataTables_wrapper");e=f;f.parent(".jobTable").length>0&&(e=f.parent());n=e.prev();n.length>0&&(n.is("h1")||n.is("h2")||n.is("h3"))?n.data("dataTable_originalContent",n.html()).text("Active "+n.text()):n=null;s=e.find("div.allClosed_container");s.length>0?(u.hide(),f.find(".dataTables_filter").hide()):i('<a class="dataTables_showStatusClosed button small" href="#">').text("Show Closed Jobs ("+o.length+")").appendTo(e);e.on("click","a.dataTables_showStatusClosed",function(){return u.show(),f.find(".dataTables_filter").show(),u.removeClass("hideStatusClosed"),s.remove(),i(this).remove(),n&&n.html(n.data("dataTable_originalContent")),t.apply(u[0]),!1})}r.push(this)});i("table.deviceTable").each(function(){var n=i(this),t=n.find("tr").length>20,u={bPaginate:t,sPaginationType:"full_numbers",bLengthChange:t,iDisplayLength:20,bFilter:!0,bSort:!0,bInfo:!1,bAutoWidth:!1,aaSorting:[],oLanguage:{sSearch:"Filter:"}};n.dataTable(u);r.push(this)});i("table.userTable").each(function(){var n=i(this),t=n.find("tr").length>20,u={bPaginate:t,sPaginationType:"full_numbers",bLengthChange:t,iDisplayLength:20,bFilter:!0,bSort:!0,bInfo:!1,bAutoWidth:!1,aaSorting:[],oLanguage:{sSearch:"Filter:"}};n.dataTable(u);r.push(this)})})})(window,document,$); (function(n,t,i){var r=[];i(function(){function t(){var t=i(this).closest(".dataTables_wrapper");t.length>0&&n.setTimeout(function(){var e=i(n),o=t.height(),r=t.offset(),u=e.scrollTop(),s=e.height(),h=u-r.top,f;h>0?i("html").animate({scrollTop:r.top},125):(f=(u+s-(o+r.top))*-1,f>0&&(o>s?i("html").animate({scrollTop:r.top},125):i("html").animate({scrollTop:u+f},125)))},1)}i("table.jobTable").each(function(){var u=i(this),h=!1,l=u.hasClass("enablePaging"),a=u.hasClass("enableFilter"),v=u.find("tr").length>20,y={bPaginate:l,sPaginationType:"full_numbers",bLengthChange:v,iDisplayLength:20,bFilter:a,bSort:!0,bInfo:!1,bAutoWidth:!1,aoColumnDefs:[{aTargets:["dates"],sSortDataType:"disco_datetime",sType:"disco_datetime"}],aaSorting:[],oLanguage:{sSearch:"Filter:"},fnDrawCallback:function(){h?t.apply(u):h=!0}},p=u.dataTable(y),c,o,f,e,n,s;if(u.hasClass("hideStatusClosed")&&(c=u.children("tbody"),o=c.children('tr[data-status="Closed"]'),o.length>0)){f=i(this).closest(".dataTables_wrapper");e=f;f.parent(".jobTable").length>0&&(e=f.parent());n=e.prev();n.length>0&&(n.is("h1")||n.is("h2")||n.is("h3"))?n.data("dataTable_originalContent",n.html()).text("Active "+n.text()):n=null;s=e.find("div.allClosed_container");s.length>0?(u.hide(),f.find(".dataTables_filter").hide()):i('<a class="dataTables_showStatusClosed button small" href="#">').text("Show Closed Jobs ("+o.length+")").appendTo(e);e.on("click","a.dataTables_showStatusClosed",function(){return u.show(),f.find(".dataTables_filter").show(),u.removeClass("hideStatusClosed"),s.remove(),i(this).remove(),n&&n.html(n.data("dataTable_originalContent")),t.apply(u[0]),!1})}r.push(this)});i("table.deviceTable").each(function(){var n=i(this),t=n.find("tr").length>20,u={bPaginate:t,sPaginationType:"full_numbers",bLengthChange:t,iDisplayLength:20,bFilter:!0,bSort:!0,bInfo:!1,bAutoWidth:!1,aaSorting:[],oLanguage:{sSearch:"Filter:"}};n.dataTable(u);r.push(this)});i("table.userTable").each(function(){var n=i(this),t=n.find("tr").length>20,u={bPaginate:t,sPaginationType:"full_numbers",bLengthChange:t,iDisplayLength:20,bFilter:!0,bSort:!0,bInfo:!1,bAutoWidth:!1,aaSorting:[],oLanguage:{sSearch:"Filter:"}};n.dataTable(u);r.push(this)})})})(window,document,$);
/*
//# sourceMappingURL=Disco-DataTableHelpers.min.js.map
*/
@@ -1,8 +0,0 @@
{
"version":3,
"file":"Disco-DataTableHelpers.min.js",
"lineCount":1,
"mappings":"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",
"sources":["/ClientSource/Scripts/Modules/Disco-DataTableHelpers/disco.datatablehelpers.js"],
"names":["window","document","$","dataTables","scrollCheck","wrapper","closest","length","setTimeout","$window","wrapperHeight","height","wrapperOffset","offset","windowScrollTop","scrollTop","windowHeight","wrapperTopNotShown","top","wrapperBottomNotShown","animate","each","$table","tableDrawn","enablePaging","hasClass","enableFilter","dataTableOptionsPagination","find","dataTableOptions","fnDrawCallback","apply","$dataTable","dataTable","$tbody","$closedJobs","wrapperContext","wrapperPrev","allClosedContainer","children","parent","prev","is","data","html","text","hide","appendTo","on","show","removeClass","remove","push"]
}
@@ -1,4 +1,3 @@
///#source 1 1 /ClientSource/Scripts/Modules/Disco-ExpressionEditor/disco.expressioneditor.js
/// <reference path="../../Core/jquery-1.7.1.js" /> /// <reference path="../../Core/jquery-1.7.1.js" />
function DiscoExpressionEditor(host, validateUrl, expression) { function DiscoExpressionEditor(host, validateUrl, expression) {
this.host = host; this.host = host;
@@ -1,2 +1 @@
function DiscoExpressionEditor(n,t,i){this.host=n,this.hostDocument=null,this.hostContainer=null,this.validateUrl=t,this.expression=i?i:"",this.expressionHtml="",this.expressionException=null,this.hostInited=null,this.expressionValidated=null,this.expressionExceptionChanged=null}DiscoExpressionEditor.prototype={hostInit:function(){var n=this,i=function(){n.hostDocument=n.host.contents(),n.hostContainer=n.hostDocument.find("body"),n.host.focus(function(){n.setException(null),n.renderExpression()}),n.hostContainer.bind("paste",function(){setTimeout(function(){n.setExpression(n.hostContainer.text())},50)}),n.expression&&n.setExpression(n.expression),n.hostInited&&n.hostInited()},t=function(){n.host.unbind("load",t),n.host.load(i),n.host[0].contentWindow.document.designMode="on"};n.host.load(t)},parseExpression:function(n,t){for(var u=n.split("\n"),f,r,i=0;i<u.length;i++)t&&t.PositionRow==i+1?(f=u[i].trim(),r='<p id="line'+i+'" class="line lineError">',f.length>=t.PositionColumn?(r+=f.substr(0,t.PositionColumn-1),r+='<span class="error">'+f.substr(t.PositionColumn-1,1)+"<\/span>",r+=f.substr(t.PositionColumn)):(r+=f,r+='<span class="error">&nbsp;<\/span>'),r+="<\/p>",u[i]=r):u[i]='<p id="line'+i+'" class="line">'+u[i].trim()+"<\/p>";return u.join("")},setExpression:function(n){this.expression=n,this.setException(null),this.renderExpression()},getExpression:function(){var n=null;return $("p",this.hostContainer).each(function(){n==null?n=$(this).text():n+="\n"+$(this).text()}),this.expression=n,n},setException:function(n){this.expressionException!==n&&(this.expressionException=n,this.expressionExceptionChanged&&this.expressionExceptionChanged(n))},renderExpression:function(){this.expressionHtml=this.parseExpression(this.expression,this.expressionException),this.hostContainer.html(this.expressionHtml)},validateExpression:function(){var n=this,t=n.getExpression();$.getJSON(n.validateUrl,{Expression:t},function(t){n.setException(t),n.renderExpression(),n.expressionValidated&&n.expressionValidated(t.ExpressionValid,t)})}},String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g,"")}; function DiscoExpressionEditor(n,t,i){this.host=n;this.hostDocument=null;this.hostContainer=null;this.validateUrl=t;this.expression=i?i:"";this.expressionHtml="";this.expressionException=null;this.hostInited=null;this.expressionValidated=null;this.expressionExceptionChanged=null}DiscoExpressionEditor.prototype={hostInit:function(){var n=this,i=function(){n.hostDocument=n.host.contents();n.hostContainer=n.hostDocument.find("body");n.host.focus(function(){n.setException(null);n.renderExpression()});n.hostContainer.bind("paste",function(){setTimeout(function(){n.setExpression(n.hostContainer.text())},50)});n.expression&&n.setExpression(n.expression);n.hostInited&&n.hostInited()},t=function(){n.host.unbind("load",t);n.host.load(i);n.host[0].contentWindow.document.designMode="on"};n.host.load(t)},parseExpression:function(n,t){for(var f,r,u=n.split("\n"),i=0;i<u.length;i++)t&&t.PositionRow==i+1?(f=u[i].trim(),r='<p id="line'+i+'" class="line lineError">',f.length>=t.PositionColumn?(r+=f.substr(0,t.PositionColumn-1),r+='<span class="error">'+f.substr(t.PositionColumn-1,1)+"<\/span>",r+=f.substr(t.PositionColumn)):(r+=f,r+='<span class="error">&nbsp;<\/span>'),r+="<\/p>",u[i]=r):u[i]='<p id="line'+i+'" class="line">'+u[i].trim()+"<\/p>";return u.join("")},setExpression:function(n){this.expression=n;this.setException(null);this.renderExpression()},getExpression:function(){var n=null;return $("p",this.hostContainer).each(function(){n==null?n=$(this).text():n+="\n"+$(this).text()}),this.expression=n,n},setException:function(n){this.expressionException!==n&&(this.expressionException=n,this.expressionExceptionChanged&&this.expressionExceptionChanged(n))},renderExpression:function(){this.expressionHtml=this.parseExpression(this.expression,this.expressionException);this.hostContainer.html(this.expressionHtml)},validateExpression:function(){var n=this,t=n.getExpression();$.getJSON(n.validateUrl,{Expression:t},function(t){n.setException(t);n.renderExpression();n.expressionValidated&&n.expressionValidated(t.ExpressionValid,t)})}};String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g,"")};
//@ sourceMappingURL=Disco-ExpressionEditor.min.js.map
@@ -1,8 +0,0 @@
{
"version":3,
"file":"Disco-ExpressionEditor.min.js",
"lineCount":1,
"mappings":"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",
"sources":["/ClientSource/Scripts/Modules/Disco-ExpressionEditor/disco.expressioneditor.js"],
"names":["DiscoExpressionEditor","host","validateUrl","expression","hostDocument","hostContainer","expressionHtml","expressionException","hostInited","expressionValidated","expressionExceptionChanged","prototype","hostInit","that","contents","find","focus","setException","renderExpression","bind","setTimeout","setExpression","text","designModeInit","unbind","load","contentWindow","document","designMode","parseExpression","exception","expressionLines","split","lineSrc","line","i","length","PositionRow","trim","PositionColumn","substr","join","getExpression","e","$","each","html","validateExpression","getJSON","response","ExpressionValid","String","String.prototype.trim","replace"]
}
@@ -1,4 +1,3 @@
///#source 1 1 /ClientSource/Scripts/Modules/Disco-PropertyChangeHelpers/disco.propertychangehelpers.js
if (!document.DiscoFunctions) { if (!document.DiscoFunctions) {
document.DiscoFunctions = {}; document.DiscoFunctions = {};
} }
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1,4 +1,3 @@
///#source 1 1 /ClientSource/Scripts/Modules/Disco-jQueryExtensions/disco.jQueryExtensions.js
/// <reference path="../../Core/jquery-1.7.1.js" /> /// <reference path="../../Core/jquery-1.7.1.js" />
(function ($) { (function ($) {
@@ -1,2 +1 @@
(function(n){var t={init:function(i){return i=n.extend({parentSelector:"tr"},i),this.each(function(){var u=n(this),r,e,o;if(u.data("checkboxBulkSelect_parentSelector",i.parentSelector),r=u.closest(i.parentSelector).find('input[type="checkbox"]'),r.length>0){function s(){return r.prop("checked",!0),f(),!1}function h(){return r.prop("checked",!1),f(),!1}function f(){t.update.apply(u,[r,i.parentSelector,e,o])}e=n("<a>").addClass("selectAll").attr("href","#").text("ALL").click(s),o=n("<a>").addClass("selectNone").attr("href","#").text("NONE").click(h),u.append(n("<span>").text("Select: "),e,n("<span>").text(" | "),o),r.click(f),f()}})},update:function(t,i,r,u){return this.each(function(){$this=n(this),i||(i=$this.data("checkboxBulkSelect_parentSelector")),t||(t=$this.closest(i).find('input[type="checkbox"]')),r||(r=$this.find("a.selectAll").first()),u||(u=$this.find("a.selectNone").first());var f=t.filter(":checked");t.length==f.length?(r.prop("disabled",!0),u.prop("disabled",!1)):f.length==0?(u.prop("disabled",!0),r.prop("disabled",!1)):(r.prop("disabled",!1),u.prop("disabled",!1))})}};n.fn.checkboxBulkSelect=function(i){if(t[i])return t[i].apply(this,Array.prototype.slice(arguments,1));if(typeof i!="object"&&i)n.error("Method "+i+" does not exist on jQuery.checkboxBulkSelect");else return t.init.apply(this,arguments)}})(jQuery); (function(n){var t={init:function(i){return i=n.extend({parentSelector:"tr"},i),this.each(function(){var u=n(this),r,e,o;if(u.data("checkboxBulkSelect_parentSelector",i.parentSelector),r=u.closest(i.parentSelector).find('input[type="checkbox"]'),r.length>0){function s(){return r.prop("checked",!0),f(),!1}function h(){return r.prop("checked",!1),f(),!1}function f(){t.update.apply(u,[r,i.parentSelector,e,o])}e=n("<a>").addClass("selectAll").attr("href","#").text("ALL").click(s);o=n("<a>").addClass("selectNone").attr("href","#").text("NONE").click(h);u.append(n("<span>").text("Select: "),e,n("<span>").text(" | "),o);r.click(f);f()}})},update:function(t,i,r,u){return this.each(function(){$this=n(this);i||(i=$this.data("checkboxBulkSelect_parentSelector"));t||(t=$this.closest(i).find('input[type="checkbox"]'));r||(r=$this.find("a.selectAll").first());u||(u=$this.find("a.selectNone").first());var f=t.filter(":checked");t.length==f.length?(r.prop("disabled",!0),u.prop("disabled",!1)):f.length==0?(u.prop("disabled",!0),r.prop("disabled",!1)):(r.prop("disabled",!1),u.prop("disabled",!1))})}};n.fn.checkboxBulkSelect=function(i){if(t[i])return t[i].apply(this,Array.prototype.slice(arguments,1));if(typeof i!="object"&&i)n.error("Method "+i+" does not exist on jQuery.checkboxBulkSelect");else return t.init.apply(this,arguments)}})(jQuery);
//# sourceMappingURL=Disco-jQueryExtensions.min.js.map
@@ -1,8 +0,0 @@
{
"version":3,
"file":"Disco-jQueryExtensions.min.js",
"lineCount":1,
"mappings":"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",
"sources":["/ClientSource/Scripts/Modules/Disco-jQueryExtensions/disco.jQueryExtensions.js"],
"names":["$","checkboxBulkSelectMethods","init","options","extend","each","$this","$checkboxes","$selectAll","$selectNone","data","parentSelector","closest","find","length","selectAll","prop","update","selectNone","apply","addClass","attr","text","click","append","first","$selectedCheckboxes","filter","fn","checkboxBulkSelect","$.fn.checkboxBulkSelect","method","Array","prototype","slice","arguments","error","jQuery"]
}
@@ -1,4 +1,3 @@
///#source 1 1 /ClientSource/Scripts/Modules/Highcharts/highcharts.src.js
// ==ClosureCompiler== // ==ClosureCompiler==
// @compilation_level SIMPLE_OPTIMIZATIONS // @compilation_level SIMPLE_OPTIMIZATIONS
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1,4 +1,3 @@
///#source 1 1 /ClientSource/Scripts/Modules/Knockout/knockout-3.1.0.js
// Knockout JavaScript library v3.1.0 // Knockout JavaScript library v3.1.0
// (c) Steven Sanderson - http://knockoutjs.com/ // (c) Steven Sanderson - http://knockoutjs.com/
// License: MIT (http://www.opensource.org/licenses/mit-license.php) // License: MIT (http://www.opensource.org/licenses/mit-license.php)
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1,4 +1,3 @@
///#source 1 1 /ClientSource/Scripts/Modules/Shadowbox/shadowbox.js
/* /*
* Shadowbox.js, version 3.0.3 * Shadowbox.js, version 3.0.3
* http://shadowbox-js.com/ * http://shadowbox-js.com/
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1,4 +1,3 @@
///#source 1 1 /ClientSource/Scripts/Modules/jQuery-Fancytree/jquery.fancytree-all.js
/*! /*!
* jquery.fancytree.js * jquery.fancytree.js
* Dynamic tree view control, with support for lazy loading of branches. * Dynamic tree view control, with support for lazy loading of branches.
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1,4 +1,3 @@
///#source 1 1 /ClientSource/Scripts/Modules/jQuery-Isotope/jquery.isotope.js
/** /**
* Isotope v1.5.25 * Isotope v1.5.25
* An exquisite jQuery plugin for magical layouts * An exquisite jQuery plugin for magical layouts

Some files were not shown because too many files have changed in this diff Show More