Files
Disco/Disco.Web/Areas/Public/Views/UserHeldDevices/Noticeboard.generated.cs
T
2025-10-31 17:45:04 +11:00

498 lines
29 KiB
C#

#pragma warning disable 1591
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace Disco.Web.Areas.Public.Views.UserHeldDevices
{
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.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/Public/Views/UserHeldDevices/Noticeboard.cshtml")]
public partial class Noticeboard : Disco.Services.Web.WebViewPage<Disco.Web.Areas.Public.Models.UserHeldDevices.NoticeboardModel>
{
public Noticeboard()
{
}
public override void Execute()
{
#line 2 "..\..\Areas\Public\Views\UserHeldDevices\Noticeboard.cshtml"
Layout = null;
Html.BundleDeferred("~/ClientScripts/Modules/Knockout");
Html.BundleDeferred("~/ClientScripts/Modules/jQuery-SignalR");
Html.BundleDeferred("~/ClientScripts/Core");
Html.BundleDeferred("~/Style/Public/HeldDevicesNoticeboard");
#line default
#line hidden
WriteLiteral("\r\n<!DOCTYPE html>\r\n<html>\r\n<head>\r\n <meta");
WriteLiteral(" charset=\"utf-8\"");
WriteLiteral(" />\r\n <meta");
WriteLiteral(" http-equiv=\"X-UA-Compatible\"");
WriteLiteral(" content=\"IE=edge\"");
WriteLiteral(" />\r\n <title>Disco ICT - Held Devices for Users</title>\r\n");
WriteLiteral(" ");
#line 15 "..\..\Areas\Public\Views\UserHeldDevices\Noticeboard.cshtml"
Write(Html.BundleRenderDeferred());
#line default
#line hidden
WriteLiteral("\r\n</head>\r\n<body");
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(" data-antiforgery=\"");
#line 17 "..\..\Areas\Public\Views\UserHeldDevices\Noticeboard.cshtml"
Write(AntiForgeryExtensions.GetToken(Context));
#line default
#line hidden
WriteLiteral("\"");
WriteLiteral(" data-hubname=\"");
#line 17 "..\..\Areas\Public\Views\UserHeldDevices\Noticeboard.cshtml"
Write(Disco.Services.Jobs.Noticeboards.HeldDevicesForUsers.Name);
#line default
#line hidden
WriteLiteral("\"");
WriteLiteral(" data-dataurl=\"");
#line 17 "..\..\Areas\Public\Views\UserHeldDevices\Noticeboard.cshtml"
Write(Url.Action(MVC.Public.UserHeldDevices.UserHeldDevices()));
#line default
#line hidden
WriteLiteral("\"");
WriteLiteral(">\r\n <div");
WriteLiteral(" id=\"page\"");
WriteLiteral(">\r\n <header");
WriteLiteral(" id=\"header\"");
WriteLiteral(">\r\n <div");
WriteLiteral(" id=\"heading\"");
WriteLiteral(">Held Devices for Users</div>\r\n <div");
WriteLiteral(" id=\"statusConnecting\"");
WriteLiteral("><i");
WriteLiteral(" class=\"fa fa-cog fa-spin\"");
WriteLiteral("></i><span>connecting...</span></div>\r\n <div");
WriteLiteral(" id=\"statusError\"");
WriteLiteral("><i");
WriteLiteral(" class=\"fa fa-cog fa-spin\"");
WriteLiteral("></i><span>disconnected, reconnecting...</span></div>\r\n <div");
WriteLiteral(" id=\"credits\"");
WriteLiteral(">\r\n powered by Disco ICT <i");
WriteLiteral(" title=\"Disco ICT - Jobs\"");
WriteLiteral("></i>\r\n </div>\r\n </header>\r\n <section");
WriteLiteral(" id=\"mainSection\"");
WriteLiteral(">\r\n <div");
WriteLiteral(" id=\"inProcess\"");
WriteLiteral(" class=\"list\"");
WriteLiteral(">\r\n <h3>\r\n In Process (<span");
WriteLiteral(" data-bind=\"text: inProcess().length\"");
WriteLiteral("></span>)\r\n </h3>\r\n <div");
WriteLiteral(" class=\"content\"");
WriteLiteral(">\r\n <!-- ko if: inProcess().length == 0 -->\r\n " +
" <div");
WriteLiteral(" class=\"noContent\"");
WriteLiteral(">&lt;None&gt;</div>\r\n <!-- /ko -->\r\n <ul");
WriteLiteral(" data-bind=\"template: { name: \'item-template\', foreach: inProcess, afterRender: o" +
"nAdd, beforeRemove: onRemove }\"");
WriteLiteral("></ul>\r\n </div>\r\n </div>\r\n <div");
WriteLiteral(" id=\"readyForReturn\"");
WriteLiteral(" class=\"list\"");
WriteLiteral(">\r\n <h3>\r\n Ready for Return (<span");
WriteLiteral(" data-bind=\"text: readyForReturn().length\"");
WriteLiteral("></span>)\r\n </h3>\r\n <div");
WriteLiteral(" class=\"content\"");
WriteLiteral(">\r\n <!-- ko if: readyForReturn().length == 0 -->\r\n " +
" <div");
WriteLiteral(" class=\"noContent\"");
WriteLiteral(">&lt;None&gt;</div>\r\n <!-- /ko -->\r\n <ul");
WriteLiteral(" data-bind=\"template: { name: \'item-template\', foreach: readyForReturn, afterRend" +
"er: onAdd, beforeRemove: onRemove }\"");
WriteLiteral("></ul>\r\n </div>\r\n </div>\r\n <div");
WriteLiteral(" id=\"waitingForUserAction\"");
WriteLiteral(" class=\"list\"");
WriteLiteral(">\r\n <h3>\r\n Waiting for User Action (<span");
WriteLiteral(" data-bind=\"text: waitingForUserAction().length\"");
WriteLiteral("></span>)\r\n </h3>\r\n <div");
WriteLiteral(" class=\"content\"");
WriteLiteral(">\r\n <!-- ko if: waitingForUserAction().length == 0 -->\r\n " +
" <div");
WriteLiteral(" class=\"noContent\"");
WriteLiteral(">&lt;None&gt;</div>\r\n <!-- /ko -->\r\n <ul");
WriteLiteral(" data-bind=\"template: { name: \'item-template\', foreach: waitingForUserAction, aft" +
"erAdd: onAdd, beforeRemove: onRemove }\"");
WriteLiteral("></ul>\r\n </div>\r\n </div>\r\n <footer");
WriteLiteral(" id=\"footer\"");
WriteLiteral(">\r\n </footer>\r\n </section>\r\n </div>\r\n <script");
WriteLiteral(" type=\"text/html\"");
WriteLiteral(" id=\"item-template\"");
WriteLiteral(">\r\n <li data-bind=\"css: { alert: IsAlert }\">\r\n <span data-bind=" +
"\"text: UserIdFriendly + \' - \' + UserDisplayName\"></span>\r\n <!-- ko if" +
": !ReadyForReturn && EstimatedReturnTimeUnixEpoc -->\r\n <span class=\"s" +
"mall\">(Expected <span data-bind=\"livestamp: EstimatedReturnTimeUnixEpoc\"></span>" +
")</span>\r\n <!-- /ko -->\r\n <!-- ko if: WaitingForUserAction" +
" -->\r\n <span class=\"small\">(Since <span data-bind=\"livestamp: Waiting" +
"ForUserActionSinceUnixEpoc\"></span>)</span>\r\n <!-- /ko -->\r\n " +
" <!-- ko if: ReadyForReturn && !WaitingForUserAction -->\r\n <span cl" +
"ass=\"small\">(Ready <span data-bind=\"livestamp: ReadyForReturnSinceUnixEpoc\"></sp" +
"an>)</span>\r\n <!-- /ko -->\r\n </li>\r\n </script>\r\n <script" +
">\r\n ko.bindingHandlers.livestamp = {\r\n init: function (element" +
", valueAccessor, allBindings, viewModel, bindingContext) {\r\n var " +
"value = valueAccessor();\r\n var valueUnwrapped = ko.unwrap(value);" +
"\r\n\r\n if (valueUnwrapped)\r\n $(element).livestam" +
"p(valueUnwrapped);\r\n else\r\n $(element).livesta" +
"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 " +
" var rotateSpeed = 3000;\r\n var itemFilters;\r\n var fixedThe" +
"me = null;\r\n\r\n var $inProcessList = $(\'#inProcess\').find(\'ul\');\r\n " +
" var $readyForReturnList = $(\'#readyForReturn\').find(\'ul\');\r\n " +
"var $waitingForUserActionList = $(\'#waitingForUserAction\').find(\'ul\');\r\n\r\n " +
" function noticeboardViewModel(inProcess, readyForReturn, waitingForUserAct" +
"ion) {\r\n var self = this;\r\n\r\n self.initialized = f" +
"alse;\r\n\r\n self.inProcess = ko.observableArray(inProcess);\r\n " +
" self.readyForReturn = ko.observableArray(readyForReturn);\r\n " +
" self.waitingForUserAction = ko.observableArray(waitingForUserAction);\r\n\r\n " +
" self.onRemove = function (element, index, data) {\r\n " +
" $(element).slideUp(400, function () {\r\n $(this).remo" +
"ve();\r\n });\r\n }\r\n self.onAdd = " +
"function (element, index, data) {\r\n if (self.initialized)\r\n " +
" $(element).hide().slideDown(400);\r\n }\r\n " +
" }\r\n\r\n function init() {\r\n monitorMouseMove();\r" +
"\n applyQueryString();\r\n\r\n // Connect to Hub\r\n " +
" hub = $.connection.noticeboardUpdates;\r\n\r\n // Map Func" +
"tions\r\n hub.client.updateHeldDeviceForUser = updateHeldDevice;\r\n " +
" hub.client.setTheme = setTheme;\r\n\r\n $.connection.h" +
"ub.qs = { Noticeboard: document.body.dataset.hubname };\r\n $.conne" +
"ction.hub.error(function (error) {\r\n console.log(\'Server conn" +
"ection error: \' + error);\r\n });\r\n $.connection.hub" +
".disconnected(connectionError);\r\n\r\n // Start Connection\r\n " +
" $.connection.hub.start().fail(connectionError).done(function () { loadDa" +
"ta(); });\r\n }\r\n\r\n // Called after SignalR is connected\r\n " +
" async function loadData() {\r\n\r\n const body = new FormDa" +
"ta();\r\n body.append(\'__RequestVerificationToken\', document.body.d" +
"ataset.antiforgery);\r\n const response = await fetch(document.body" +
".dataset.dataurl, {\r\n method: \'POST\',\r\n bo" +
"dy: body\r\n });\r\n const data = await response.json(" +
");\r\n\r\n var inProcess = [];\r\n var readyForReturn = " +
"[];\r\n var waitingForUserAction = [];\r\n\r\n data.filt" +
"er(function (heldDeviceItem) {\r\n return includeItem(heldDevic" +
"eItem)\r\n }).forEach(function (heldDeviceItem) {\r\n " +
" if (isWaitingForUserAction(heldDeviceItem))\r\n waiting" +
"ForUserAction.push(heldDeviceItem);\r\n else if (isReadyForRetu" +
"rn(heldDeviceItem))\r\n readyForReturn.push(heldDeviceItem)" +
";\r\n else if (isInProcess(heldDeviceItem))\r\n " +
" inProcess.push(heldDeviceItem);\r\n });\r\n\r\n in" +
"Process.sort(sortFunction);\r\n readyForReturn.sort(sortFunction);\r" +
"\n waitingForUserAction.sort(sortFunction);\r\n\r\n vie" +
"wModel = new noticeboardViewModel(inProcess, readyForReturn, waitingForUserActio" +
"n);\r\n\r\n ko.applyBindings(viewModel);\r\n viewModel.i" +
"nitialized = true;\r\n\r\n $(\'body\').removeClass(\'status-connecting\')" +
";\r\n\r\n window.setTimeout(scheduleRotation, rotateSpeed);\r\n " +
" }\r\n\r\n // Called by SignalR\r\n function updateHeldDevice" +
"(updates) {\r\n if (viewModel) {\r\n\r\n $.each(upda" +
"tes, function (UserId, heldDeviceItem) {\r\n // Remove Exis" +
"ting\r\n removeItem(UserId);\r\n\r\n // " +
"Add Item\r\n addItem(heldDeviceItem);\r\n " +
"});\r\n }\r\n }\r\n\r\n function removeItem(UserId)" +
" {\r\n removeItemFromArray(viewModel.inProcess, UserId);\r\n " +
" removeItemFromArray(viewModel.readyForReturn, UserId);\r\n r" +
"emoveItemFromArray(viewModel.waitingForUserAction, UserId);\r\n }\r\n\r\n " +
" function addItem(heldDeviceItem) {\r\n if (heldDeviceItem" +
" !== null &&\r\n heldDeviceItem !== undefined &&\r\n " +
" includeItem(heldDeviceItem)) {\r\n\r\n var array;\r\n\r\n " +
" if (isWaitingForUserAction(heldDeviceItem))\r\n " +
" array = viewModel.waitingForUserAction;\r\n else if (isRead" +
"yForReturn(heldDeviceItem))\r\n array = viewModel.readyForR" +
"eturn;\r\n else if (isInProcess(heldDeviceItem))\r\n " +
" array = viewModel.inProcess;\r\n\r\n if (array().lengt" +
"h === 0) {\r\n array.push(heldDeviceItem);\r\n " +
" } else {\r\n var index = findSortedInsertIndex(array, " +
"heldDeviceItem);\r\n if (index === -1)\r\n " +
" array.push(heldDeviceItem);\r\n else\r\n " +
" array.splice(index, 0, heldDeviceItem);\r\n }\r\n" +
" }\r\n }\r\n\r\n function rotateArrays() {\r\n " +
" rotateArray(viewModel.inProcess, $inProcessList);\r\n ro" +
"tateArray(viewModel.readyForReturn, $readyForReturnList);\r\n rotat" +
"eArray(viewModel.waitingForUserAction, $waitingForUserActionList);\r\n " +
"}\r\n\r\n function scheduleRotation() {\r\n rotateArrays();\r" +
"\n\r\n window.setTimeout(scheduleRotation, rotateSpeed);\r\n " +
" }\r\n\r\n function includeItem(heldDeviceItem) {\r\n if (i" +
"temFilters == null || itemFilters.length == 0)\r\n return true;" +
"\r\n\r\n return itemFilters.reduce(function (previousValue, currentVa" +
"lue, index, array) {\r\n if (previousValue === false)\r\n " +
" return false;\r\n return currentValue(heldDevic" +
"eItem);\r\n }, true);\r\n }\r\n\r\n function setThe" +
"me(theme) {\r\n if (!!fixedTheme)\r\n return;\r\n\r\n " +
" var $body = $(document.body);\r\n\r\n // Existing clas" +
"ses\r\n var c = $body.attr(\'class\').split(\' \');\r\n //" +
" Remove existing theme\r\n c = $.grep(c, function (i) { return (i.i" +
"ndexOf(\'theme-\') !== 0) });\r\n\r\n c.push(\'theme-\' + theme);\r\n\r\n " +
" $body.attr(\'class\', c.join(\' \'));\r\n }\r\n\r\n func" +
"tion monitorMouseMove() {\r\n var token = null,\r\n " +
" $body = $(document.body);\r\n\r\n $body.mousemove(function () {\r\n " +
" if (!!token)\r\n window.clearTimeout(toke" +
"n);\r\n else if ($body.css(\'cursor\') == \'none\')\r\n " +
" $body.css(\'cursor\', \'auto\');\r\n\r\n token = window.set" +
"Timeout(function () {\r\n $body.css(\'cursor\', \'none\');\r\n " +
" token = null;\r\n }, 3500);\r\n " +
" });\r\n\r\n }\r\n\r\n function applyQueryString() {\r\n " +
" var queryStringParameters = getQueryStringParameters();\r\n\r\n " +
" if (queryStringParameters !== null) {\r\n var filters = [];\r\n\r" +
"\n $.each(queryStringParameters, function (key, value) {\r\n " +
" switch (key.toLowerCase()) {\r\n ca" +
"se \'components\':\r\n const showComponents = value.s" +
"plit(\",\");\r\n if (showComponents.length > 0) {\r\n " +
" const components = [\'inProcess\', \'readyForRetu" +
"rn\', \'waitingForUserAction\'];\r\n components.fo" +
"rEach(function (component) {\r\n if (!showC" +
"omponents.includes(component)) {\r\n $(" +
"\'body\').addClass(\'hide-\' + component);\r\n " +
"}\r\n });\r\n }\r\n " +
" break;\r\n case \'theme\':" +
" // THEME\r\n setTheme(value);\r\n " +
" fixedTheme = value;\r\n break;\r\n " +
" case \'deviceaddressinclude\': // FILTER: Device Address Inc" +
"lude\r\n var deviceAddresses = value.split(\",\").map" +
"(function (v) { return v.toLowerCase(); });\r\n if " +
"(deviceAddresses.length > 0) {\r\n filters.push" +
"(function (heldDeviceItem) {\r\n // false i" +
"f DeviceAddressShortName is null\r\n if (!h" +
"eldDeviceItem.DeviceAddressShortName)\r\n " +
" return false;\r\n\r\n // true if DeviceAdd" +
"ressShortName is included\r\n return $.inAr" +
"ray(heldDeviceItem.DeviceAddressShortName.toLowerCase(), deviceAddresses) >= 0;\r" +
"\n });\r\n }\r\n " +
" break;\r\n case \'deviceadd" +
"ressexclude\': // FILTER: Device Address Exclude\r\n " +
" var deviceAddresses = value.split(\",\").map(function (v) { return v.toLowerCase(" +
"); });\r\n if (deviceAddresses.length > 0) {\r\n " +
" filters.push(function (heldDeviceItem) {\r\n " +
" // true if DeviceAddressShortName is null\r\n " +
" if (!heldDeviceItem.DeviceAddressShortName)\r" +
"\n return true;\r\n\r\n " +
" // true if DeviceAddressShortName is excluded\r\n " +
" return $.inArray(heldDeviceItem.DeviceAddressShortNa" +
"me.toLowerCase(), deviceAddresses) < 0;\r\n });" +
"\r\n }\r\n break;\r\n " +
" case \'deviceprofileinclude\': // FILTER: Device Profile " +
"Include\r\n var deviceProfiles = value.split(\",\").m" +
"ap(function (v) { return parseInt(v); });\r\n if (d" +
"eviceProfiles.length > 0) {\r\n filters.push(fu" +
"nction (heldDeviceItem) {\r\n // true if De" +
"viceProfileId is included\r\n return $.inAr" +
"ray(heldDeviceItem.DeviceProfileId, deviceProfiles) >= 0;\r\n " +
" });\r\n }\r\n " +
" break;\r\n case \'deviceprofileexclude\': // FILTE" +
"R: Device Profile Exclude\r\n var deviceProfiles = " +
"value.split(\",\").map(function (v) { return parseInt(v); });\r\n " +
" if (deviceProfiles.length > 0) {\r\n " +
" filters.push(function (heldDeviceItem) {\r\n " +
" // true if DeviceProfileId is excluded\r\n " +
" return $.inArray(heldDeviceItem.DeviceProfileId, deviceProfiles) < 0;\r\n " +
" });\r\n }\r\n " +
" break;\r\n case \'jobqueueinclud" +
"e\': // FILTER: Job Queue Include\r\n var jobQueues " +
"= value.split(\",\").map(function (v) { return parseInt(v); });\r\n " +
" if (jobQueues.length > 0) {\r\n " +
"filters.push(function (heldDeviceItem) {\r\n " +
" // true if any JobQueueId is included\r\n " +
" if (!heldDeviceItem.JobQueueIds)\r\n r" +
"eturn false; // not in any queues\r\n var i" +
"nclude = false;\r\n $.each(jobQueues, funct" +
"ion (i, v) {\r\n if ($.inArray(v, heldD" +
"eviceItem.JobQueueIds) >= 0) {\r\n " +
"include = true;\r\n return false; /" +
"/ break\r\n }\r\n " +
" });\r\n return include;\r\n " +
" });\r\n }\r\n " +
" break;\r\n case \'jobqueueexcl" +
"ude\': // FILTER: Job Queue Exclude\r\n var jobQueue" +
"s = value.split(\",\").map(function (v) { return parseInt(v); });\r\n " +
" if (jobQueues.length > 0) {\r\n " +
" filters.push(function (heldDeviceItem) {\r\n " +
" // true if any JobQueueId is excluded\r\n " +
" if (!heldDeviceItem.JobQueueIds)\r\n " +
" return true; // not in any queues\r\n var " +
"exclude = false;\r\n $.each(jobQueues, func" +
"tion (i, v) {\r\n if ($.inArray(v, held" +
"DeviceItem.JobQueueIds) >= 0) {\r\n " +
" exclude = true;\r\n return false; " +
"// break\r\n }\r\n " +
" });\r\n return !exclude;\r\n" +
" });\r\n }\r\n " +
" break;\r\n }\r\n " +
" });\r\n\r\n if (filters.length > 0)\r\n i" +
"temFilters = filters;\r\n else\r\n itemFil" +
"ters = null;\r\n }\r\n }\r\n\r\n function connectio" +
"nError() {\r\n try {\r\n $(\'body\').addClass(\'statu" +
"s-error\');\r\n } catch (e) {\r\n // Ignore\r\n " +
" }\r\n\r\n window.setTimeout(function () {\r\n " +
" window.location.reload(true);\r\n }, 10000);\r\n }\r\n\r\n" +
" // Helpers\r\n function rotateArray(koArray, element) {\r\n " +
" var items = koArray();\r\n\r\n if (items.length <= 1)\r\n" +
" return 0;\r\n\r\n if (element.height() < (element" +
".parent().height() - 30)) {\r\n\r\n if (findUnsortedArrayTopIndex" +
"(items) !== 0)\r\n koArray.sort(sortFunction);\r\n\r\n " +
" // Don\'t rotate if small & sorted correctly\r\n retu" +
"rn;\r\n }\r\n\r\n // Move Last Item to Top\r\n " +
" var item = koArray.pop();\r\n koArray.unshift(item);\r\n " +
" }\r\n function removeItemFromArray(koArray, UserId) {\r\n " +
" var items = koArray();\r\n for (var i = 0; i < items.length; i++" +
") {\r\n if (items[i].UserId == UserId) {\r\n " +
" koArray.splice(i, 1);\r\n items = koArray();\r\n " +
" i--;\r\n }\r\n }\r\n }\r\n " +
" function findUnsortedArrayTopIndex(items) {\r\n // Only on" +
"e Item\r\n if (items.length <= 1)\r\n return 0;\r\n\r" +
"\n for (var i = 1; i < items.length; i++) {\r\n v" +
"ar s = sortFunction(items[i - 1], items[i]);\r\n if (s > 0)\r\n " +
" return i;\r\n }\r\n\r\n return 0;\r" +
"\n }\r\n function findSortedInsertIndex(koArray, heldDeviceIt" +
"em) {\r\n var items = koArray();\r\n var startIndex = " +
"findUnsortedArrayTopIndex(items);\r\n for (var i = startIndex; i < " +
"items.length; i++) {\r\n var s = sortFunction(heldDeviceItem, i" +
"tems[i]);\r\n if (s <= 0)\r\n return i;\r\n " +
" }\r\n if (startIndex !== 0) {\r\n f" +
"or (var i = 0; i < startIndex; i++) {\r\n var s = sortFunct" +
"ion(heldDeviceItem, items[i]);\r\n if (s <= 0)\r\n " +
" return i;\r\n }\r\n return st" +
"artIndex;\r\n } else {\r\n return -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.toLowerCase() ? -1 : 1)\r\n " +
" }\r\n function isInProcess(i) {\r\n return !i.Read" +
"yForReturn && !i.WaitingForUserAction;\r\n }\r\n function isRe" +
"adyForReturn(i) {\r\n return i.ReadyForReturn && !i.WaitingForUserA" +
"ction;\r\n }\r\n function isWaitingForUserAction(i) {\r\n " +
" return i.WaitingForUserAction;\r\n }\r\n function get" +
"QueryStringParameters() {\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] && decodeURI" +
"Component(parts[1].replace(/\\+/g, \" \"));\r\n });\r\n r" +
"eturn params;\r\n }\r\n\r\n init();\r\n });\r\n </script>\r" +
"\n</body>\r\n</html>\r\n");
}
}
}
#pragma warning restore 1591