Feature: Held Devices Noticeboard
Provides a noticeboard for all devices, not just those assigned to users.
This commit is contained in:
@@ -2,20 +2,20 @@
|
||||
Layout = null;
|
||||
Html.BundleDeferred("~/ClientScripts/Modules/jQuery-SignalR");
|
||||
Html.BundleDeferred("~/ClientScripts/Core");
|
||||
Html.BundleDeferred("~/Style/Public/UserHeldDevicesNoticeboard");
|
||||
Html.BundleDeferred("~/Style/Public/HeldDevicesNoticeboard");
|
||||
}
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
||||
<title>Disco - Technician Held Devices</title>
|
||||
<title>Disco - Technician Held Devices for Users</title>
|
||||
@Html.BundleRenderDeferred()
|
||||
</head>
|
||||
<body>
|
||||
<div id="page">
|
||||
<header id="mainHeader">
|
||||
Technician Held Devices
|
||||
Technician Held Devices for Users
|
||||
</header>
|
||||
<section id="mainSection">
|
||||
<div id="inProcess" class="list">
|
||||
@@ -368,33 +368,12 @@
|
||||
|
||||
var removeModel = function (model) {
|
||||
if (model) {
|
||||
if (model.updateAtToken) {
|
||||
window.clearTimeout(model.updateAtToken);
|
||||
};
|
||||
model.htmlLi.slideUp('fast', function () {
|
||||
model.htmlLi.remove();
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
var scheduleModelUpdate = function (model) {
|
||||
if (model.updateAtToken) {
|
||||
window.clearTimeout(model.updateAtToken);
|
||||
};
|
||||
if (model.UpdateAt) {
|
||||
if (typeof model.UpdateAt == 'string' && model.UpdateAt.indexOf('\/Date(') == 0) {
|
||||
model.UpdateAt = new Date(parseInt(model.UpdateAt.substr(6)));
|
||||
}
|
||||
var nowMilliseconds = new Date().getTime();
|
||||
var updateAtMilliseconds = (model.UpdateAt - nowMilliseconds);
|
||||
if (updateAtMilliseconds > 0) {
|
||||
model.updateAtToken = window.setTimeout(function () { updatedModel(model.UserId); }, updateAtMilliseconds);
|
||||
} else {
|
||||
model.UpdateAt = null;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
var processModel = function (id, model, init) {
|
||||
if (!calculateFilter(model)) {
|
||||
removeModel(models[id]);
|
||||
@@ -428,9 +407,6 @@
|
||||
model.htmlLi.slideDown();
|
||||
}
|
||||
} else {
|
||||
if (existing.updateAtToken) {
|
||||
window.clearTimeout(existing.updateAtToken);
|
||||
};
|
||||
model.htmlLi = existing.htmlLi;
|
||||
model.htmlLi.slideUp('fast', function () {
|
||||
model.htmlLi.html(model.htmlContent).slideDown();
|
||||
@@ -448,7 +424,6 @@
|
||||
if (model.htmlLi && model.IsAlert) {
|
||||
model.htmlLi.addClass('alert');
|
||||
}
|
||||
scheduleModelUpdate(model);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user