Feature #35: Livestamp implemented

Humanized dates now update automatically when a page is left open for
some time.
This commit is contained in:
Gary Sharp committed 2014-02-11 16:50:03 +11:00
1 parent c4cc54d316
commit 7bdbeb6a82
40 files changed
+1400 -1027

No files matched your search

+1 -1
View File
@@ -194,7 +194,7 @@
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<ProjectExtensions>
<VisualStudio>
<UserProperties BuildVersion_UpdateFileVersion="True" BuildVersion_UpdateAssemblyVersion="True" BuildVersion_BuildVersioningStyle="None.DeltaBaseYear.MonthAndDayStamp.TimeStamp" BuildVersion_StartDate="2011/7/1" BuildVersion_DetectChanges="False" BuildVersion_UseGlobalSettings="False" BuildVersion_BuildAction="Both" />
<UserProperties BuildVersion_BuildAction="Both" BuildVersion_UseGlobalSettings="False" BuildVersion_DetectChanges="False" BuildVersion_StartDate="2011/7/1" BuildVersion_BuildVersioningStyle="None.DeltaBaseYear.MonthAndDayStamp.TimeStamp" BuildVersion_UpdateAssemblyVersion="True" BuildVersion_UpdateFileVersion="True" />
</VisualStudio>
</ProjectExtensions>
<Import Project="$(SolutionDir)\.nuget\nuget.targets" />
+1 -2
View File
@@ -88,7 +88,6 @@
<Compile Include="Repository\Device\DeviceCertificate.cs" />
<Compile Include="Repository\DocumentTemplate\DocumentTemplate.cs" />
<Compile Include="Repository\Job\Job.cs" />
<Compile Include="Repository\Job\JobAssignment.cs" />
<Compile Include="Repository\Job\JobAttachment.cs" />
<Compile Include="Repository\Job\JobComponent.cs" />
<Compile Include="Repository\Job\JobLog.cs" />
@@ -167,7 +166,7 @@
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<ProjectExtensions>
<VisualStudio>
<UserProperties BuildVersion_BuildAction="Both" BuildVersion_UseGlobalSettings="False" BuildVersion_DetectChanges="False" BuildVersion_StartDate="2011/7/1" BuildVersion_BuildVersioningStyle="None.DeltaBaseYear.MonthAndDayStamp.TimeStamp" BuildVersion_UpdateAssemblyVersion="True" BuildVersion_UpdateFileVersion="True" />
<UserProperties BuildVersion_UpdateFileVersion="True" BuildVersion_UpdateAssemblyVersion="True" BuildVersion_BuildVersioningStyle="None.DeltaBaseYear.MonthAndDayStamp.TimeStamp" BuildVersion_StartDate="2011/7/1" BuildVersion_DetectChanges="False" BuildVersion_UseGlobalSettings="False" BuildVersion_BuildAction="Both" />
</VisualStudio>
</ProjectExtensions>
<PropertyGroup>
@@ -1,30 +0,0 @@
//using System;
//using System.Collections.Generic;
//using System.Linq;
//using System.Text;
//using System.ComponentModel.DataAnnotations;
//using System.ComponentModel.DataAnnotations.Schema;
//namespace Disco.Models.Repository
//{
// // Added 2012-10-23 G# - DBv5 Migration
// public class JobAssignment
// {
// [Key, Required, ColumnAttribute(Order = 0)]
// public int JobId { get; set; }
// [Key, Required, ColumnAttribute(Order = 1)]
// public string TechUserId { get; set; }
// [Key, Required, ColumnAttribute(Order = 2)]
// public DateTime AssignedDate { get; set; }
// public DateTime? UnassignedDate { get; set; }
// public DateTime? TargetCompletionDate { get; set; }
// [ForeignKey("JobId"), InverseProperty("JobAssignments")]
// public virtual Job Job { get; set; }
// [ForeignKey("TechUserId")]
// public User TechUser { get; set; }
// }
//}
+16 -13
View File
@@ -8,7 +8,6 @@ namespace Disco
{
public static class DateTimeExtensions
{
public static string From(this DateTime moment, DateTime to, bool withoutSuffix)
{
var duration = to - moment;
@@ -62,7 +61,6 @@ namespace Disco
{
return moment.FromNow("n/a");
}
public static string Humanize(this TimeSpan duration, bool withSuffix)
{
string output = RelativeTime(duration.Ticks > 0 ? duration : duration.Negate(), true);
@@ -123,25 +121,30 @@ namespace Disco
else
return NullValue;
}
public static long ToSortable(this DateTime? d)
private const long unixEpocOffset = 621355968000000000;
public static long ToUnixEpoc(this DateTime d)
{
var epoc = new DateTime(unixEpocOffset, DateTimeKind.Utc);
var offset = d.ToUniversalTime() - epoc;
return offset.Ticks / 10000;
}
public static long? ToUnixEpoc(this DateTime? d)
{
if (d.HasValue)
return d.Value.ToBinary();
return d.Value.ToUnixEpoc();
else
return -1;
return null;
}
public static long ToSortable(this DateTime d)
public static string ToISO8601(this DateTime d)
{
return d.ToBinary();
return d.ToString("yyyy-MM-ddTHH\\:mm\\:sszzz");
}
public static string ToJavaScript(this DateTime d)
{
return d.ToString("yyyy/MM/dd hh:mm tt");
}
public static string ToJavaScript(this DateTime? d)
public static string ToISO8601(this DateTime? d)
{
if (d.HasValue)
return d.Value.ToString("yyyy/MM/dd hh:mm tt");
return d.Value.ToISO8601();
else
return null;
}
+50 -44
View File
@@ -6,10 +6,43 @@
@using System.Web.Mvc
@using System.Web.Mvc.Html;
@using Disco.Services.Web;
@helper FriendlyDate(DateTime d, string ElementId = null, bool WithoutSuffix = false)
{<span @(ElementId == null ? null : new HtmlString(string.Format("id=\"{0}\" ", ElementId)))title="@d.ToFullDateTime()" data-discodatetime="@d.ToSortable()" data-datetimeformatted="@d.ToJavaScript()" class="date nowrap">@d.FromNow(WithoutSuffix)</span>}
{<span @(ElementId == null ? null : new HtmlString(string.Format("id=\"{0}\" ", ElementId)))title="@d.ToFullDateTime()" data-livestamp="@d.ToUnixEpoc()" data-isodate="@d.ToISO8601()" class="date nowrap@(WithoutSuffix ? " noMomentSuffix" : null)">@d.ToFullDateTime()</span>}
@helper FriendlyDate(DateTime? d, string NullValue = "n/a", string ElementId = null, bool WithoutSuffix = false)
{<span @(ElementId == null ? null : new HtmlString(string.Format("id=\"{0}\" ", ElementId)))title="@d.ToFullDateTime(NullValue)" data-discodatetime="@d.ToSortable()" data-datetimeformatted="@d.ToJavaScript()" class="date nowrap">@d.FromNow(WithoutSuffix, NullValue)</span>}
{<span @(ElementId == null ? null : new HtmlString(string.Format("id=\"{0}\" ", ElementId)))title="@d.ToFullDateTime(NullValue)" data-livestamp="@d.ToUnixEpoc()" data-isodate="@d.ToISO8601()" class="date nowrap@(WithoutSuffix ? " noMomentSuffix" : null)">@d.ToFullDateTime(NullValue)</span>}
@helper FriendlyDateAndUser(DateTime? d, User u, string DateNullValue = "n/a", bool WithoutSuffix = false)
{
@FriendlyDate(d, DateNullValue, WithoutSuffix: WithoutSuffix);
@FriendlyUser(u, null, " by");
}
@helper FriendlyDateAndUser(DateTime d, User u, bool WithoutSuffix = false)
{
@FriendlyDate(d, WithoutSuffix: WithoutSuffix);
@FriendlyUser(u, null, " by");
}
@helper FriendlyDateAndTitleUser(DateTime? d, User u, string DateNullValue = "n/a", bool WithoutSuffix = false)
{
<span title="@d.ToFullDateTime(DateNullValue) by @u" data-livestamp="@d.ToUnixEpoc()" class="date nowrap@(WithoutSuffix ? " noMomentSuffix" : null)">@d.ToFullDateTime(DateNullValue)</span>
}
@helper FriendlyDateAndTitleUser(DateTime d, User u, bool WithoutSuffix = false)
{
<span title="@d.ToFullDateTime() by @u" data-livestamp="@d.ToUnixEpoc()" class="date nowrap@(WithoutSuffix ? " noMomentSuffix" : null)">@d.ToFullDateTime()</span>
}
@helper FriendlyUser(User u, string nullValue = null, string prepend = null)
{
if (u != null)
{
@prepend <span title="@u">@u.Id</span>
}
else
{
<span>@nullValue</span>
}
}
@helper RadioButtonList(string id, List<System.Web.Mvc.SelectListItem> items, int columns = 1)
{
@ItemList("radio", id, items, columns)
@@ -18,6 +51,19 @@
{
@ItemList("checkbox", id, items, columns, alignEven, forceUniqueIds, htmlEncodeText)
}
@helper CheckboxBulkSelect(string BulkSelectContainerId, string ParentJQuerySelector = null)
{Html.GetPageHelper().BundleDeferred("~/ClientScripts/Modules/Disco-jQueryExtensions");
<span id="@BulkSelectContainerId" class="checkboxBulkSelectContainer">
@if (string.IsNullOrWhiteSpace(ParentJQuerySelector))
{
<script type="text/javascript">$(function () { $('#@(BulkSelectContainerId)').checkboxBulkSelect(); });</script>
}
else
{
<script type="text/javascript">$(function () { $('#@(BulkSelectContainerId)').checkboxBulkSelect({ parentSelector: '@(ParentJQuerySelector)' }); });</script>
}
</span>
}
@helper ItemList(string inputType, string id, List<System.Web.Mvc.SelectListItem> items, int columns = 1, bool alignEven = true, int? forceUniqueIds = null, bool htmlEncodeText = true)
{
int itemsPerColumn = items.Count / columns;
@@ -49,35 +95,8 @@
</tr>
</table>
}
@helper FriendlyDateAndUser(DateTime? d, User u, string DateNullValue = "n/a", bool WithoutSuffix = false)
{
@FriendlyDate(d, DateNullValue, WithoutSuffix: WithoutSuffix);
@FriendlyUser(u, null, " by");
}
@helper FriendlyDateAndUser(DateTime d, User u, bool WithoutSuffix = false)
{
@FriendlyDate(d, WithoutSuffix: WithoutSuffix);
@FriendlyUser(u, null, " by");
}
@helper FriendlyDateAndTitleUser(DateTime? d, User u, string DateNullValue = "n/a", bool WithoutSuffix = false)
{
<span title="@d.ToFullDateTime(DateNullValue) by @u" data-discodatetime="@d.ToSortable()" class="date nowrap">@d.FromNow(WithoutSuffix, DateNullValue)</span>
}
@helper FriendlyDateAndTitleUser(DateTime d, User u, bool WithoutSuffix = false)
{
<span title="@d.ToFullDateTime() by @u" data-discodatetime="@d.ToSortable()" class="date nowrap">@d.FromNow(WithoutSuffix)</span>
}
@helper FriendlyUser(User u, string nullValue = null, string prepend = null)
{
if (u != null)
{
@prepend <span title="@u">@u.Id</span>
}
else
{
<span>@nullValue</span>
}
}
@helper Breadcrumbs(List<Tuple<string, ActionResult>> BreadCrumbs)
{
for (int index = 0; index < BreadCrumbs.Count; index++)
@@ -117,16 +136,3 @@
{
@Title
}
@helper CheckboxBulkSelect(string BulkSelectContainerId, string ParentJQuerySelector = null)
{Html.GetPageHelper().BundleDeferred("~/ClientScripts/Modules/Disco-jQueryExtensions");
<span id="@BulkSelectContainerId" class="checkboxBulkSelectContainer">
@if (string.IsNullOrWhiteSpace(ParentJQuerySelector))
{
<script type="text/javascript">$(function () { $('#@(BulkSelectContainerId)').checkboxBulkSelect(); });</script>
}
else
{
<script type="text/javascript">$(function () { $('#@(BulkSelectContainerId)').checkboxBulkSelect({ parentSelector: '@(ParentJQuerySelector)' }); });</script>
}
</span>
}
File diff suppressed because it is too large. Load diff
@@ -373,7 +373,7 @@ namespace Disco.Web.Areas.API.Controllers
var result = new
{
Timestamp = device.LastNetworkLogonDate,
Friendly = device.LastNetworkLogonDate.FromNow("Unknown"),
UnixEpoc = device.LastNetworkLogonDate.ToUnixEpoc(),
Formatted = device.LastNetworkLogonDate.ToFullDateTime("Unknown")
};
@@ -279,8 +279,8 @@ namespace Disco.Web.Areas.API.Controllers
var m = undetectedDirectory.GetFiles("*.pdf").Select(f => new Models.DocumentTemplate.ImporterUndetectedFilesModel()
{
Id = System.IO.Path.GetFileNameWithoutExtension(f.Name),
Timestamp = f.CreationTime.ToString(),
TimestampFuzzy = f.CreationTime.FromNow()
Timestamp = f.CreationTime.ToFullDateTime(),
TimestampUnixEpoc = f.CreationTime.ToUnixEpoc()
}).ToArray();
return Json(m);
@@ -17,28 +17,8 @@ namespace Disco.Web.Areas.API.Models.Attachment
public string Comments { get; set; }
public string Filename { get; set; }
public string MimeType { get; set; }
public string TimestampFuzzy
{
get
{
return Timestamp.FromNow();
}
set
{
// Ignore
}
}
public string TimestampFull
{
get
{
return Timestamp.ToFullDateTime();
}
set
{
// Ignore
}
}
public long TimestampUnixEpoc { get { return Timestamp.ToUnixEpoc(); } }
public string TimestampFull { get { return Timestamp.ToFullDateTime(); } }
public static _AttachmentModel FromAttachment(Disco.Models.Repository.UserAttachment ua)
{
@@ -9,6 +9,6 @@ namespace Disco.Web.Areas.API.Models.DocumentTemplate
{
public string Id { get; set; }
public string Timestamp { get; set; }
public string TimestampFuzzy { get; set; }
public long TimestampUnixEpoc { get; set; }
}
}
@@ -15,28 +15,8 @@ namespace Disco.Web.Areas.API.Models.Job
public string Author { get; set; }
public DateTime Timestamp { get; set; }
public string Comments { get; set; }
public string TimestampFuzzy
{
get
{
return Timestamp.FromNow();
}
set
{
// Ignore
}
}
public string TimestampFull
{
get
{
return Timestamp.ToFullDateTime();
}
set
{
// Ignore
}
}
public long TimestampUnixEpoc { get { return this.Timestamp.ToUnixEpoc(); } }
public string TimestampFull { get { return Timestamp.ToFullDateTime(); } }
public static _CommentModel FromJobLog(Disco.Models.Repository.JobLog jl)
{
@@ -13,14 +13,14 @@ namespace Disco.Web.Areas.API.Models.Job
public string UserDescription { get; set; }
public string DateTimeFull { get; set; }
public string DateTimeFriendly { get; set; }
public string DateTimeJavascript { get; set; }
public long DateTimeSortable { get; set; }
public string DateTimeISO8601 { get; set; }
public long DateTimeUnixEpoc { get; set; }
public _DateChangeModel SetDateTime(DateTime? date)
{
this.DateTimeFriendly = date.FromNow(null);
this.DateTimeJavascript = date.ToJavaScript();
this.DateTimeSortable = date.ToSortable();
this.DateTimeISO8601 = date.ToISO8601();
this.DateTimeUnixEpoc = date.ToUnixEpoc() ?? -1;
this.DateTimeFull = date.ToFullDateTime(null);
return this;
+152 -2
View File
@@ -41888,6 +41888,150 @@ if ( $.watermark.runOnce ) {
///#source 1 1 /ClientSource/Scripts/Core/disco.moment.extensions.js
moment.lang('en-au');
///#source 1 1 /ClientSource/Scripts/Core/livestamp.js
// Livestamp.js / v1.1.2 / (c) 2012 Matt Bradley / MIT License
(function (plugin) {
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
define(['jquery', 'moment'], plugin);
} else {
// Browser globals
plugin(jQuery, moment);
}
}(function ($, moment) {
// DISCO: Update Interval = 30 seconds (not 1 second)
var updateInterval = 30e3,
paused = false,
$livestamps = $([]),
init = function () {
livestampGlobal.resume();
},
prep = function ($el, timestamp) {
var oldData = $el.data('livestampdata');
// DISCO: Use milliseconds, not seconds
//if (typeof timestamp == 'number')
// timestamp *= 1e3;
$el.removeAttr('data-livestamp')
.removeData('livestamp');
timestamp = moment(timestamp);
if (moment.isMoment(timestamp) && !isNaN(+timestamp)) {
var newData = $.extend({}, { 'original': $el.contents() }, oldData);
newData.moment = moment(timestamp);
// DISCO: Add 'WithoutSuffix' support
newData.fromNowWithoutSuffix = $el.hasClass('noMomentSuffix');
$el.data('livestampdata', newData).empty();
$livestamps.push($el[0]);
}
},
run = function () {
if (paused) return;
livestampGlobal.update();
setTimeout(run, updateInterval);
},
livestampGlobal = {
update: function () {
$('[data-livestamp]').each(function () {
var $this = $(this);
prep($this, $this.data('livestamp'));
});
var toRemove = [];
$livestamps.each(function () {
var $this = $(this),
data = $this.data('livestampdata');
if (data === undefined)
toRemove.push(this);
else if (moment.isMoment(data.moment)) {
var from = $this.html(),
to = data.moment.fromNow(data.fromNowWithoutSuffix); // DISCO: Implement 'WithoutSuffix' support
if (from != to) {
var e = $.Event('change.livestamp');
$this.trigger(e, [from, to]);
if (!e.isDefaultPrevented())
$this.html(to);
}
}
});
$livestamps = $livestamps.not(toRemove);
delete $livestamps.prevObject
},
pause: function () {
paused = true;
},
resume: function () {
paused = false;
run();
},
interval: function (interval) {
if (interval === undefined)
return updateInterval;
updateInterval = interval;
}
},
livestampLocal = {
add: function ($el, timestamp) {
// DISCO: Use milliseconds, not seconds
//if (typeof timestamp == 'number')
// timestamp *= 1e3;
timestamp = moment(timestamp);
if (moment.isMoment(timestamp) && !isNaN(+timestamp)) {
$el.each(function () {
prep($(this), timestamp);
});
livestampGlobal.update();
}
return $el;
},
destroy: function ($el) {
$livestamps = $livestamps.not($el);
$el.each(function () {
var $this = $(this),
data = $this.data('livestampdata');
if (data === undefined)
return $el;
$this
.html(data.original ? data.original : '')
.removeData('livestampdata');
});
return $el;
},
isLivestamp: function ($el) {
return $el.data('livestampdata') !== undefined;
}
};
$.livestamp = livestampGlobal;
$(init);
$.fn.livestamp = function (method, options) {
if (!livestampLocal[method]) {
options = method;
method = 'add';
}
return livestampLocal[method](this, options);
};
}));
///#source 1 1 /ClientSource/Scripts/Core/disco.dataTables.extensions.js
jQuery.fn.dataTableExt.afnSortData['text'] = function (oSettings, iColumn) {
var aData = [];
@@ -41899,9 +42043,15 @@ jQuery.fn.dataTableExt.afnSortData['text'] = function (oSettings, iColumn) {
jQuery.fn.dataTableExt.afnSortData['disco_datetime'] = function (oSettings, iColumn) {
var aData = [];
$('td:eq(' + iColumn + ')', oSettings.oApi._fnGetTrNodes(oSettings)).each(function () {
var d = $(this).children('span.date[data-discodatetime]');
var d = $(this).children('span.date');
if (d.length > 0)
aData.push((d.attr('data-discodatetime')) * 1);
if (d.is('[data-livestamp]')){
aData.push((d.attr('data-livestamp')) * 1);
} else if (d.data('livestampdata') !== undefined) {
aData.push(d.data('livestampdata').moment.valueOf());
}else{
aData.push(-1);
}
else
aData.push(-1);
});
@@ -11,6 +11,7 @@
<file>/ClientSource/Scripts/Core/moment.js</file>
<file>/ClientSource/Scripts/Core/moment.en-au.js</file>
<file>/ClientSource/Scripts/Core/disco.moment.extensions.js</file>
<file>/ClientSource/Scripts/Core/livestamp.js</file>
<file>/ClientSource/Scripts/Core/disco.dataTables.extensions.js</file>
<file>/ClientSource/Scripts/Core/disco.uicore.js</file>
</bundle>
+1 -1
View File
@@ -1,4 +1,4 @@
window.Modernizr=function(n,t,i){function a(n){c.cssText=n}function vt(n,t){return a(y.join(n+";")+(t||""))}function h(n,t){return typeof n===t}function v(n,t){return!!~(""+n).indexOf(t)}function lt(n,t){var u,r;for(u in n)if(r=n[u],!v(r,"-")&&c[r]!==i)return t=="pfx"?r:!0;return!1}function yt(n,t,r){var f,u;for(f in n)if(u=t[n[f]],u!==i)return r===!1?n[f]:h(u,"function")?u.bind(r||t):u;return!1}function f(n,t,i){var r=n.charAt(0).toUpperCase()+n.slice(1),u=(n+" "+ot.join(r+" ")+r).split(" ");return h(t,"string")||h(t,"undefined")?lt(u,t):(u=(n+" "+st.join(r+" ")+r).split(" "),yt(u,t,i))}function pt(){u.input=function(i){for(var r=0,u=i.length;r<u;r++)w[i[r]]=!!(i[r]in o);return w.list&&(w.list=!!(t.createElement("datalist")&&n.HTMLDataListElement)),w}("autocomplete autofocus list placeholder max min multiple pattern required step".split(" "));u.inputtypes=function(n){for(var u=0,r,f,e,h=n.length;u<h;u++)o.setAttribute("type",f=n[u]),r=o.type!=="text",r&&(o.value=g,o.style.cssText="position:absolute;visibility:hidden;",/^range$/.test(f)&&o.style.WebkitAppearance!==i?(s.appendChild(o),e=t.defaultView,r=e.getComputedStyle&&e.getComputedStyle(o,null).WebkitAppearance!=="textfield"&&o.offsetHeight!==0,s.removeChild(o)):/^(search|tel)$/.test(f)||(r=/^(url|email)$/.test(f)?o.checkValidity&&o.checkValidity()===!1:o.value!=g)),ht[n[u]]=!!r;return ht}("search tel url email datetime date month week time datetime-local number range color".split(" "))}var u={},d=!0,s=t.documentElement,e="modernizr",ut=t.createElement(e),c=ut.style,o=t.createElement("input"),g=":)",ft={}.toString,y=" -webkit- -moz- -o- -ms- ".split(" "),et="Webkit Moz O ms",ot=et.split(" "),st=et.toLowerCase().split(" "),p={svg:"http://www.w3.org/2000/svg"},r={},ht={},w={},nt=[],tt=nt.slice,b,l=function(n,i,r,u){var l,a,c,v,f=t.createElement("div"),h=t.body,o=h||t.createElement("body");if(parseInt(r,10))while(r--)c=t.createElement("div"),c.id=u?u[r]:e+(r+1),f.appendChild(c);return l=["&#173;",'<style id="s',e,'">',n,"<\/style>"].join(""),f.id=e,(h?f:o).innerHTML+=l,o.appendChild(f),h||(o.style.background="",o.style.overflow="hidden",v=s.style.overflow,s.style.overflow="hidden",s.appendChild(o)),a=i(f,n),h?f.parentNode.removeChild(f):(o.parentNode.removeChild(o),s.style.overflow=v),!!a},at=function(t){var i=n.matchMedia||n.msMatchMedia,r;return i?i(t).matches:(l("@media "+t+" { #"+e+" { position: absolute; } }",function(t){r=(n.getComputedStyle?getComputedStyle(t,null):t.currentStyle).position=="absolute"}),r)},ct=function(){function r(r,u){u=u||t.createElement(n[r]||"div");r="on"+r;var f=r in u;return f||(u.setAttribute||(u=t.createElement("div")),u.setAttribute&&u.removeAttribute&&(u.setAttribute(r,""),f=h(u[r],"function"),h(u[r],"undefined")||(u[r]=i),u.removeAttribute(r))),u=null,f}var n={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"};return r}(),it={}.hasOwnProperty,rt,k;rt=h(it,"undefined")||h(it.call,"undefined")?function(n,t){return t in n&&h(n.constructor.prototype[t],"undefined")}:function(n,t){return it.call(n,t)};Function.prototype.bind||(Function.prototype.bind=function(n){var t=this,i,r;if(typeof t!="function")throw new TypeError;return i=tt.call(arguments,1),r=function(){var f,e,u;return this instanceof r?(f=function(){},f.prototype=t.prototype,e=new f,u=t.apply(e,i.concat(tt.call(arguments))),Object(u)===u)?u:e:t.apply(n,i.concat(tt.call(arguments)))},r});r.flexbox=function(){return f("flexWrap")};r.flexboxlegacy=function(){return f("boxDirection")};r.canvas=function(){var n=t.createElement("canvas");return!!(n.getContext&&n.getContext("2d"))};r.canvastext=function(){return!!(u.canvas&&h(t.createElement("canvas").getContext("2d").fillText,"function"))};r.webgl=function(){return!!n.WebGLRenderingContext};r.touch=function(){var i;return"ontouchstart"in n||n.DocumentTouch&&t instanceof DocumentTouch?i=!0:l(["@media (",y.join("touch-enabled),("),e,")","{#modernizr{top:9px;position:absolute}}"].join(""),function(n){i=n.offsetTop===9}),i};r.geolocation=function(){return"geolocation"in navigator};r.postmessage=function(){return!!n.postMessage};r.websqldatabase=function(){return!!n.openDatabase};r.indexedDB=function(){return!!f("indexedDB",n)};r.hashchange=function(){return ct("hashchange",n)&&(t.documentMode===i||t.documentMode>7)};r.history=function(){return!!(n.history&&history.pushState)};r.draganddrop=function(){var n=t.createElement("div");return"draggable"in n||"ondragstart"in n&&"ondrop"in n};r.websockets=function(){return"WebSocket"in n||"MozWebSocket"in n};r.rgba=function(){return a("background-color:rgba(150,255,150,.5)"),v(c.backgroundColor,"rgba")};r.hsla=function(){return a("background-color:hsla(120,40%,100%,.5)"),v(c.backgroundColor,"rgba")||v(c.backgroundColor,"hsla")};r.multiplebgs=function(){return a("background:url(https://),url(https://),red url(https://)"),/(url\s*\(.*?){3}/.test(c.background)};r.backgroundsize=function(){return f("backgroundSize")};r.borderimage=function(){retuLine truncated
window.Modernizr=function(n,t,i){function a(n){c.cssText=n}function vt(n,t){return a(y.join(n+";")+(t||""))}function h(n,t){return typeof n===t}function v(n,t){return!!~(""+n).indexOf(t)}function lt(n,t){var u,r;for(u in n)if(r=n[u],!v(r,"-")&&c[r]!==i)return t=="pfx"?r:!0;return!1}function yt(n,t,r){var f,u;for(f in n)if(u=t[n[f]],u!==i)return r===!1?n[f]:h(u,"function")?u.bind(r||t):u;return!1}function f(n,t,i){var r=n.charAt(0).toUpperCase()+n.slice(1),u=(n+" "+ot.join(r+" ")+r).split(" ");return h(t,"string")||h(t,"undefined")?lt(u,t):(u=(n+" "+st.join(r+" ")+r).split(" "),yt(u,t,i))}function pt(){u.input=function(i){for(var r=0,u=i.length;r<u;r++)w[i[r]]=!!(i[r]in o);return w.list&&(w.list=!!(t.createElement("datalist")&&n.HTMLDataListElement)),w}("autocomplete autofocus list placeholder max min multiple pattern required step".split(" "));u.inputtypes=function(n){for(var u=0,r,f,e,h=n.length;u<h;u++)o.setAttribute("type",f=n[u]),r=o.type!=="text",r&&(o.value=g,o.style.cssText="position:absolute;visibility:hidden;",/^range$/.test(f)&&o.style.WebkitAppearance!==i?(s.appendChild(o),e=t.defaultView,r=e.getComputedStyle&&e.getComputedStyle(o,null).WebkitAppearance!=="textfield"&&o.offsetHeight!==0,s.removeChild(o)):/^(search|tel)$/.test(f)||(r=/^(url|email)$/.test(f)?o.checkValidity&&o.checkValidity()===!1:o.value!=g)),ht[n[u]]=!!r;return ht}("search tel url email datetime date month week time datetime-local number range color".split(" "))}var u={},d=!0,s=t.documentElement,e="modernizr",ut=t.createElement(e),c=ut.style,o=t.createElement("input"),g=":)",ft={}.toString,y=" -webkit- -moz- -o- -ms- ".split(" "),et="Webkit Moz O ms",ot=et.split(" "),st=et.toLowerCase().split(" "),p={svg:"http://www.w3.org/2000/svg"},r={},ht={},w={},nt=[],tt=nt.slice,b,l=function(n,i,r,u){var l,a,c,v,f=t.createElement("div"),h=t.body,o=h||t.createElement("body");if(parseInt(r,10))while(r--)c=t.createElement("div"),c.id=u?u[r]:e+(r+1),f.appendChild(c);return l=["&#173;",'<style id="s',e,'">',n,"<\/style>"].join(""),f.id=e,(h?f:o).innerHTML+=l,o.appendChild(f),h||(o.style.background="",o.style.overflow="hidden",v=s.style.overflow,s.style.overflow="hidden",s.appendChild(o)),a=i(f,n),h?f.parentNode.removeChild(f):(o.parentNode.removeChild(o),s.style.overflow=v),!!a},at=function(t){var i=n.matchMedia||n.msMatchMedia,r;return i?i(t).matches:(l("@media "+t+" { #"+e+" { position: absolute; } }",function(t){r=(n.getComputedStyle?getComputedStyle(t,null):t.currentStyle).position=="absolute"}),r)},ct=function(){function r(r,u){u=u||t.createElement(n[r]||"div");r="on"+r;var f=r in u;return f||(u.setAttribute||(u=t.createElement("div")),u.setAttribute&&u.removeAttribute&&(u.setAttribute(r,""),f=h(u[r],"function"),h(u[r],"undefined")||(u[r]=i),u.removeAttribute(r))),u=null,f}var n={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"};return r}(),it={}.hasOwnProperty,rt,k;rt=h(it,"undefined")||h(it.call,"undefined")?function(n,t){return t in n&&h(n.constructor.prototype[t],"undefined")}:function(n,t){return it.call(n,t)};Function.prototype.bind||(Function.prototype.bind=function(n){var t=this,i,r;if(typeof t!="function")throw new TypeError;return i=tt.call(arguments,1),r=function(){var f,e,u;return this instanceof r?(f=function(){},f.prototype=t.prototype,e=new f,u=t.apply(e,i.concat(tt.call(arguments))),Object(u)===u)?u:e:t.apply(n,i.concat(tt.call(arguments)))},r});r.flexbox=function(){return f("flexWrap")};r.flexboxlegacy=function(){return f("boxDirection")};r.canvas=function(){var n=t.createElement("canvas");return!!(n.getContext&&n.getContext("2d"))};r.canvastext=function(){return!!(u.canvas&&h(t.createElement("canvas").getContext("2d").fillText,"function"))};r.webgl=function(){return!!n.WebGLRenderingContext};r.touch=function(){var i;return"ontouchstart"in n||n.DocumentTouch&&t instanceof DocumentTouch?i=!0:l(["@media (",y.join("touch-enabled),("),e,")","{#modernizr{top:9px;position:absolute}}"].join(""),function(n){i=n.offsetTop===9}),i};r.geolocation=function(){return"geolocation"in navigator};r.postmessage=function(){return!!n.postMessage};r.websqldatabase=function(){return!!n.openDatabase};r.indexedDB=function(){return!!f("indexedDB",n)};r.hashchange=function(){return ct("hashchange",n)&&(t.documentMode===i||t.documentMode>7)};r.history=function(){return!!(n.history&&history.pushState)};r.draganddrop=function(){var n=t.createElement("div");return"draggable"in n||"ondragstart"in n&&"ondrop"in n};r.websockets=function(){return"WebSocket"in n||"MozWebSocket"in n};r.rgba=function(){return a("background-color:rgba(150,255,150,.5)"),v(c.backgroundColor,"rgba")};r.hsla=function(){return a("background-color:hsla(120,40%,100%,.5)"),v(c.backgroundColor,"rgba")||v(c.backgroundColor,"hsla")};r.multiplebgs=function(){return a("background:url(https://),url(https://),red url(https://)"),/(url\s*\(.*?){3}/.test(c.background)};r.backgroundsize=function(){return f("backgroundSize")};r.borderimage=function(){retuLine truncated
/*
//# sourceMappingURL=Core.min.js.map
*/
@@ -2,7 +2,7 @@
"version":3,
"file":"Core.min.js",
"lineCount":1,
"mappings":"AA23EkB,CAAE,GAAG,CAAE,GAAG,CAAE,GAAG,CAAE,GAAG,CAAE,GAAG,CAAE,GAAG,CAAE,GAAG,CAAE,GAAG,CAAE,GAAG,CAAE,GAAG,CAAE,GAAG,CAAE,GAAG,CAAE,IAAI,CAAE,GAAG,CAAE,GAAG,CAAE,GAA9E,CAC6BA,KAAK,CAAC,KAAD,CCp2EpDC,MAAMC,UAAW,CAAG,QAAQ,CAAED,CAAM,CAAEE,CAAQ,CAAEC,CAApB,CAAgC,CAwQxDC,SAASA,CAAM,CAAEC,CAAF,CAAQ,CACnBC,CAAMC,QAAS,CAAEF,CADE,CAOvBG,SAASA,EAAS,CAAEC,CAAI,CAAEC,CAAR,CAAe,CAC7B,OAAON,CAAM,CAACO,CAAQZ,KAAK,CAACU,CAAK,CAAE,GAAR,CAAa,CAAE,CAAEC,CAAK,EAAG,EAAV,CAA7B,CADgB,CAOjCE,SAASA,CAAE,CAAEC,CAAG,CAAEC,CAAP,CAAc,CACrB,OAAO,OAAOD,CAAI,GAAIC,CADD,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9B,EACIE,CAAQM,WAAW9B,YAAY,CAACwB,CAAD,CAAU,CACzC5B,CAAUH,MAAMoC,SAAU,CAAER,E,CAKzB,CAAC,CAACF,CAjD4D,EA0DvEY,GAAiB,QAAQ,CAAEC,CAAF,CAAO,CAE9B,IAAIC,EAAa3F,CAAM2F,WAAY,EAAG3F,CAAM4F,cAKxC/C,CALqD,CAazD,OAZK8C,CAAA,CACIA,CAAU,CAACD,CAAD,CAAIG,QADlB,EAMLrB,CAAuB,CAAC,SAAU,CAAEkB,CAAG,CAAE,MAAO,CAALine truncated
"sources":["/ClientSource/Scripts/Core/jquery.dataTables.js","/ClientSource/Scripts/Core/modernizr-2.6.2.js","/ClientSource/Scripts/Core/jquery-2.0.3.js","/ClientSource/Scripts/Core/jquery.validate.js","/ClientSource/Scripts/Core/jquery.validate.unobtrusive.js","/ClientSource/Scripts/Core/disco.unobtrusiveValidation.extensions.js","/ClientSource/Scripts/Core/jquery-ui-1.10.3.js","/ClientSource/Scripts/Core/jquery.watermark.js","/ClientSource/Scripts/Core/moment.js","/ClientSource/Scripts/Core/moment.en-au.js","/ClientSource/Scripts/Core/disco.moment.extensions.js","/ClientSource/Scripts/Core/disco.dataTables.extensions.js","/ClientSource/Scripts/Core/disco.uicore.js"],
"names":["join","window","Modernizr","document","undefined","setCss","str","mStyle","cssText","setCssAll","str1","str2","prefixes","is","obj","type","contains","substr","indexOf","testProps","props","prefixed","i","prop","testDOMProps","elem","item","bind","testPropsAll","ucProp","charAt","toUpperCase","slice","cssomPrefixes","split","domPrefixes","webforms","input","len","length","attrs","inputElem","list","createElement","HTMLDataListElement","inputtypes","bool","inputElemType","defaultView","setAttribute","value","smile","style","test","WebkitAppearance","docElement","appendChild","getComputedStyle","offsetHeight","removeChild","checkValidity","inputs","enableClasses","documentElement","mod","modElem","toString","omPrefixes","toLowerCase","ns","tests","classes","featureName","injectElementWithStyles","rule","callback","nodes","testnames","ret","node","docOverflow","div","body","fakeBody","parseInt","id","innerHTML","background","overflow","parentNode","testMediaQuery","mq","matchMedia","msMatchMedia","matches","currentStyle","position","isEventSupported","eventName","element","TAGNAMES","isSupported","removeAttribute","_hasOwnProperty","hasOwnProperty","hasOwnProp","feature","call","object","property","constructor","prototype","Function","Function.prototype.bind","that","target","args","bound","TypeError","arguments","F","self","result","apply","concat","Object","flexbox","tests.flexbox","flexboxlegacy","tests.flexboxlegacy","canvas","tests.canvas","getContext","canvastext","tests.canvastext","fillText","webgl","tests.webgl","WebGLRenderingContext","touch","tests.touch","DocumentTouch","offsetTop","geolocation","tests.geolocation","navigator","postmessage","tests.postmessage","postMessage","websqldatabase","tests.websqldatabase","openDatabase","indexedDB","tests.indexedDB","hashchange","tests.hashchange","documentMode","history","tests.history","pushState","draganddrop","tests.draganddrop","websockets","tests.websockets","rgba","tests.rgba","backgroundColor","hsla","tests.hsla","multiplebgs","tests.multiplebgs","backgroundsize","tests.backgroundsize","borderimage","tests.borderimage","borderradius","tests.borderradius","boxshadow","tests.boxshadow","textshadow","tests.textshadow","textShadow","opacity","tests.opacity","cssanimations","tests.cssanimations","csscolumns","tests.csscolumns","cssgradients","tests.cssgradients","backgroundImage","cssreflections","tests.cssreflections","csstransforms","tests.csstransforms","csstransforms3d","tests.csstransforms3d","offsetLeft","csstransitions","tests.csstransitions","fontface","tests.fontface","getElementById","sheet","styleSheet","cssRules","generatedcontent","tests.generatedcontent","video","tests.video","canPlayType","Boolean","ogg","replace","h264","webm","e","audio","tests.audio","mp3","wav","m4a","localstorage","tests.localstorage","localStorage","setItem","removeItem","sessionstorage","tests.sessionstorage","sessionStorage","webworkers","tests.webworkers","Worker","applicationcache","tests.applicationcache","applicationCache","svg","tests.svg","createElementNS","createSVGRect","inlinesvg","tests.inlinesvg","firstChild","namespaceURI","smil","tests.smil","svgclippaths","tests.svgclippaths","push","addTest","Modernizr.addTest","key","className","addStyleSheet","ownerDocument","p","parent","getElementsByTagName","insertBefore","lastChild","getElements","elements","html5","getExpandoData","data","expandoData","expando","expanID","nodeName","supportsUnknownElements","cache","cloneNode","saveClones","createElem","canHaveChildren","reSkip","frag","createDocumentFragment","clone","elems","l","shivMethods","createFrag","ownerDocument.createElement","shivDocument","shivCSS","supportsHtml5Styles","hasCSS","options","a","childNodes","_version","_prefixes","_domPrefixes","_cssomPrefixes","hasEvent","testProp","Modernizr.testProp","testAllProps","testStyles","Modernizr.prefixed","isArraylike","jQuery","isWindow","nodeType","createOptions","optionsCache","each","match","core_rnotwhite","_","flag","Data","defineProperty","get","Math","random","dataAttr","name","rmultiDash","getAttribute","rbrace","JSON","parse","data_user","set","returnTrue","returnFalse","safeActiveElement","activeElement","err","sibling","cur","dir","winnow","qualifier","not","isFunction","grep","isSimple","filter","core_indexOf","manipulationTarget","content","disableScript","restoreScript","rscriptTypeMasked","exec","setGlobalEval","refElements","data_priv","cloneCopyEvent","src","dest","pdataOld","pdataCur","udataOld","udataCur","events","hasData","access","handle","event","add","extend","getAll","context","tag","querySelectorAll","merge","fixInput","manipulation_rcheckableType","checked","defaultValue","vendorPropName","capName","origName","cssPrefixes","isHidden","el","css","getStyles","showHide","show","display","hidden","values","index","css_defaultDisplay","setPositiveNumber","subtract","rnumsplit","max","augmentWidthOrHeight","extra","isBorderBox","styles","val","cssExpand","getWidthOrHeightLine truncated
"mappings":"AA23EkB,CAAE,GAAG,CAAE,GAAG,CAAE,GAAG,CAAE,GAAG,CAAE,GAAG,CAAE,GAAG,CAAE,GAAG,CAAE,GAAG,CAAE,GAAG,CAAE,GAAG,CAAE,GAAG,CAAE,GAAG,CAAE,IAAI,CAAE,GAAG,CAAE,GAAG,CAAE,GAA9E,CAC6BA,KAAK,CAAC,KAAD,CCp2EpDC,MAAMC,UAAW,CAAG,QAAQ,CAAED,CAAM,CAAEE,CAAQ,CAAEC,CAApB,CAAgC,CAwQxDC,SAASA,CAAM,CAAEC,CAAF,CAAQ,CACnBC,CAAMC,QAAS,CAAEF,CADE,CAOvBG,SAASA,EAAS,CAAEC,CAAI,CAAEC,CAAR,CAAe,CAC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C,CAAUH,MAAMoC,SAAU,CAAE,QAAQ,CACpCjC,CAAUC,YAAY,CAAC2B,CAAD,EAAU,CAGpCL,CAAI,CAAEH,CAAQ,CAACM,CAAG,CAAEP,CAAN,CAAW,CAEnBQ,CAAN,CAIID,CAAGQ,WAAW9B,YAAY,CAACsB,CAAD,CAJ9B,EACIE,CAAQM,WAAW9B,YAAY,CAACwB,CAAD,CAAU,CACzC5B,CAAUH,MAAMoC,SAAU,CAAER,E,CAKzB,CAAC,CAACF,CAjD4D,EA0DvEY,GAAiB,QAAQ,CAAEC,CAAF,CAAO,CAE9B,IAAIC,EAAa3F,CAAM2F,WAAY,EAAG3F,CAAM4F,cAKxC/C,CALqD,CAazD,OAZK8C,CAAA,CACIA,CAAU,CAACD,CAAD,CAAIG,QADlB,EAMLrB,CAAuB,CAAC,SAAU,CAAEkB,CAAG,CAAE,MAAO,CAALine truncated
"sources":["/ClientSource/Scripts/Core/jquery.dataTables.js","/ClientSource/Scripts/Core/modernizr-2.6.2.js","/ClientSource/Scripts/Core/jquery-2.0.3.js","/ClientSource/Scripts/Core/jquery.validate.js","/ClientSource/Scripts/Core/jquery.validate.unobtrusive.js","/ClientSource/Scripts/Core/disco.unobtrusiveValidation.extensions.js","/ClientSource/Scripts/Core/jquery-ui-1.10.3.js","/ClientSource/Scripts/Core/jquery.watermark.js","/ClientSource/Scripts/Core/moment.js","/ClientSource/Scripts/Core/moment.en-au.js","/ClientSource/Scripts/Core/disco.moment.extensions.js","/ClientSource/Scripts/Core/livestamp.js","/ClientSource/Scripts/Core/disco.dataTables.extensions.js","/ClientSource/Scripts/Core/disco.uicore.js"],
"names":["join","window","Modernizr","document","undefined","setCss","str","mStyle","cssText","setCssAll","str1","str2","prefixes","is","obj","type","contains","substr","indexOf","testProps","props","prefixed","i","prop","testDOMProps","elem","item","bind","testPropsAll","ucProp","charAt","toUpperCase","slice","cssomPrefixes","split","domPrefixes","webforms","input","len","length","attrs","inputElem","list","createElement","HTMLDataListElement","inputtypes","bool","inputElemType","defaultView","setAttribute","value","smile","style","test","WebkitAppearance","docElement","appendChild","getComputedStyle","offsetHeight","removeChild","checkValidity","inputs","enableClasses","documentElement","mod","modElem","toString","omPrefixes","toLowerCase","ns","tests","classes","featureName","injectElementWithStyles","rule","callback","nodes","testnames","ret","node","docOverflow","div","body","fakeBody","parseInt","id","innerHTML","background","overflow","parentNode","testMediaQuery","mq","matchMedia","msMatchMedia","matches","currentStyle","position","isEventSupported","eventName","element","TAGNAMES","isSupported","removeAttribute","_hasOwnProperty","hasOwnProperty","hasOwnProp","feature","call","object","property","constructor","prototype","Function","Function.prototype.bind","that","target","args","bound","TypeError","arguments","F","self","result","apply","concat","Object","flexbox","tests.flexbox","flexboxlegacy","tests.flexboxlegacy","canvas","tests.canvas","getContext","canvastext","tests.canvastext","fillText","webgl","tests.webgl","WebGLRenderingContext","touch","tests.touch","DocumentTouch","offsetTop","geolocation","tests.geolocation","navigator","postmessage","tests.postmessage","postMessage","websqldatabase","tests.websqldatabase","openDatabase","indexedDB","tests.indexedDB","hashchange","tests.hashchange","documentMode","history","tests.history","pushState","draganddrop","tests.draganddrop","websockets","tests.websockets","rgba","tests.rgba","backgroundColor","hsla","tests.hsla","multiplebgs","tests.multiplebgs","backgroundsize","tests.backgroundsize","borderimage","tests.borderimage","borderradius","tests.borderradius","boxshadow","tests.boxshadow","textshadow","tests.textshadow","textShadow","opacity","tests.opacity","cssanimations","tests.cssanimations","csscolumns","tests.csscolumns","cssgradients","tests.cssgradients","backgroundImage","cssreflections","tests.cssreflections","csstransforms","tests.csstransforms","csstransforms3d","tests.csstransforms3d","offsetLeft","csstransitions","tests.csstransitions","fontface","tests.fontface","getElementById","sheet","styleSheet","cssRules","generatedcontent","tests.generatedcontent","video","tests.video","canPlayType","Boolean","ogg","replace","h264","webm","e","audio","tests.audio","mp3","wav","m4a","localstorage","tests.localstorage","localStorage","setItem","removeItem","sessionstorage","tests.sessionstorage","sessionStorage","webworkers","tests.webworkers","Worker","applicationcache","tests.applicationcache","applicationCache","svg","tests.svg","createElementNS","createSVGRect","inlinesvg","tests.inlinesvg","firstChild","namespaceURI","smil","tests.smil","svgclippaths","tests.svgclippaths","push","addTest","Modernizr.addTest","key","className","addStyleSheet","ownerDocument","p","parent","getElementsByTagName","insertBefore","lastChild","getElements","elements","html5","getExpandoData","data","expandoData","expando","expanID","nodeName","supportsUnknownElements","cache","cloneNode","saveClones","createElem","canHaveChildren","reSkip","frag","createDocumentFragment","clone","elems","l","shivMethods","createFrag","ownerDocument.createElement","shivDocument","shivCSS","supportsHtml5Styles","hasCSS","options","a","childNodes","_version","_prefixes","_domPrefixes","_cssomPrefixes","hasEvent","testProp","Modernizr.testProp","testAllProps","testStyles","Modernizr.prefixed","isArraylike","jQuery","isWindow","nodeType","createOptions","optionsCache","each","match","core_rnotwhite","_","flag","Data","defineProperty","get","Math","random","dataAttr","name","rmultiDash","getAttribute","rbrace","JSON","parse","data_user","set","returnTrue","returnFalse","safeActiveElement","activeElement","err","sibling","cur","dir","winnow","qualifier","not","isFunction","grep","isSimple","filter","core_indexOf","manipulationTarget","content","disableScript","restoreScript","rscriptTypeMasked","exec","setGlobalEval","refElements","data_priv","cloneCopyEvent","src","dest","pdataOld","pdataCur","udataOld","udataCur","events","hasData","access","handle","event","add","extend","getAll","context","tag","querySelectorAll","merge","fixInput","manipulation_rcheckableType","checked","defaultValue","vendorPropName","capName","origName","cssPrefixes","isHidden","el","css","getStyles","showHide","show","display","hidden","values","index","css_defaultDisplay","setPositiveNumber","subtract","rnumsplit","max","augmentWidthOrHeight","extra","isBorderBox","styles","val","cssExpand","getWidthOrHeightLine truncated
}
@@ -9,5 +9,6 @@
/// <reference path="moment.js" />
/// <reference path="moment.en-au.js" />
/// <reference path="disco.moment.extensions.js" />
/// <reference path="livestamp.js" />
/// <reference path="disco.dataTables.extensions.js" />
/// <reference path="disco.uicore.js" />
@@ -8,9 +8,15 @@
jQuery.fn.dataTableExt.afnSortData['disco_datetime'] = function (oSettings, iColumn) {
var aData = [];
$('td:eq(' + iColumn + ')', oSettings.oApi._fnGetTrNodes(oSettings)).each(function () {
var d = $(this).children('span.date[data-discodatetime]');
var d = $(this).children('span.date');
if (d.length > 0)
aData.push((d.attr('data-discodatetime')) * 1);
if (d.is('[data-livestamp]')){
aData.push((d.attr('data-livestamp')) * 1);
} else if (d.data('livestampdata') !== undefined) {
aData.push(d.data('livestampdata').moment.valueOf());
}else{
aData.push(-1);
}
else
aData.push(-1);
});
@@ -0,0 +1,143 @@
// Livestamp.js / v1.1.2 / (c) 2012 Matt Bradley / MIT License
(function (plugin) {
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
define(['jquery', 'moment'], plugin);
} else {
// Browser globals
plugin(jQuery, moment);
}
}(function ($, moment) {
// DISCO: Update Interval = 30 seconds (not 1 second)
var updateInterval = 30e3,
paused = false,
$livestamps = $([]),
init = function () {
livestampGlobal.resume();
},
prep = function ($el, timestamp) {
var oldData = $el.data('livestampdata');
// DISCO: Use milliseconds, not seconds
//if (typeof timestamp == 'number')
// timestamp *= 1e3;
$el.removeAttr('data-livestamp')
.removeData('livestamp');
timestamp = moment(timestamp);
if (moment.isMoment(timestamp) && !isNaN(+timestamp)) {
var newData = $.extend({}, { 'original': $el.contents() }, oldData);
newData.moment = moment(timestamp);
// DISCO: Add 'WithoutSuffix' support
newData.fromNowWithoutSuffix = $el.hasClass('noMomentSuffix');
$el.data('livestampdata', newData).empty();
$livestamps.push($el[0]);
}
},
run = function () {
if (paused) return;
livestampGlobal.update();
setTimeout(run, updateInterval);
},
livestampGlobal = {
update: function () {
$('[data-livestamp]').each(function () {
var $this = $(this);
prep($this, $this.data('livestamp'));
});
var toRemove = [];
$livestamps.each(function () {
var $this = $(this),
data = $this.data('livestampdata');
if (data === undefined)
toRemove.push(this);
else if (moment.isMoment(data.moment)) {
var from = $this.html(),
to = data.moment.fromNow(data.fromNowWithoutSuffix); // DISCO: Implement 'WithoutSuffix' support
if (from != to) {
var e = $.Event('change.livestamp');
$this.trigger(e, [from, to]);
if (!e.isDefaultPrevented())
$this.html(to);
}
}
});
$livestamps = $livestamps.not(toRemove);
delete $livestamps.prevObject
},
pause: function () {
paused = true;
},
resume: function () {
paused = false;
run();
},
interval: function (interval) {
if (interval === undefined)
return updateInterval;
updateInterval = interval;
}
},
livestampLocal = {
add: function ($el, timestamp) {
// DISCO: Use milliseconds, not seconds
//if (typeof timestamp == 'number')
// timestamp *= 1e3;
timestamp = moment(timestamp);
if (moment.isMoment(timestamp) && !isNaN(+timestamp)) {
$el.each(function () {
prep($(this), timestamp);
});
livestampGlobal.update();
}
return $el;
},
destroy: function ($el) {
$livestamps = $livestamps.not($el);
$el.each(function () {
var $this = $(this),
data = $this.data('livestampdata');
if (data === undefined)
return $el;
$this
.html(data.original ? data.original : '')
.removeData('livestampdata');
});
return $el;
},
isLivestamp: function ($el) {
return $el.data('livestampdata') !== undefined;
}
};
$.livestamp = livestampGlobal;
$(init);
$.fn.livestamp = function (method, options) {
if (!livestampLocal[method]) {
options = method;
method = 'add';
}
return livestampLocal[method](this, options);
};
}));
@@ -1,4 +1,4 @@
///#source 1 1 /ClientSource/Scripts/Modules/Disco-PropertyChangeHelpers/disco.propertychangehelpers.js
///#source 1 1 /ClientSource/Scripts/Modules/Disco-PropertyChangeHelpers/disco.propertychangehelpers.js
if (!document.DiscoFunctions) {
document.DiscoFunctions = {};
}
@@ -260,13 +260,13 @@ if (!document.DiscoFunctions.DateDialogCreateUpdater)
$ajaxLoading.hide();
} else {
if (response.DateTimeFull) {
$dateField.attr('data-datetimeformatted', response.DateTimeJavascript)
.attr('data-discodatetime', response.DateTimeSortable)
$dateField.attr('data-isodate', response.DateTimeISO8601)
.attr('data-livestamp', response.DateTimeUnixEpoc)
.attr('title', response.DateTimeFull)
.text(response.DateTimeFriendly);
} else {
$dateField.attr('data-datetimeformatted', '')
.attr('data-discodatetime', '-1')
$dateField.attr('data-isodate', '')
.attr('data-livestamp', '-1')
.attr('title', notSetDisplay)
.text(notSetDisplay);
}
@@ -301,7 +301,7 @@ if (!document.DiscoFunctions.DateDialogCreateUpdater)
d.dialog('option', 'title', friendlyName);
dialogHeader.text(friendlyName + ' Date');
var dfVal = $('#' + DateField).attr('data-datetimeformatted');
var dfVal = $('#' + DateField).attr('data-isodate');
if (dfVal)
dialogDateBox.datetimepicker('setDate', new Date(dfVal));
@@ -1,2 +1,4 @@
if(document.DiscoFunctions||(document.DiscoFunctions={}),document.DiscoFunctions.PropertyChangeHelper||(document.DiscoFunctions.PropertyValue=function(n){return n[0].nodeName.toLowerCase()=="input"&&n.attr("type")=="checkbox"?n.is(":checked"):n.val()},document.DiscoFunctions.PropertyChangeHelper=function(n,t,i,r){var e=document.DiscoFunctions.PropertyValue(n),u=null,f=n.nextAll(".ajaxSave").first(),o=n.nextAll(".ajaxLoading").first(),s=function(){f.hide();var t=document.DiscoFunctions.PropertyValue(n);e!=t&&(e=t,u&&window.clearTimeout(u),u=window.setTimeout(function(){o.show();var n={};n[r]=e,$.getJSON(i,n,function(n,t){t!="success"||n!="OK"?(alert('Unable to change property "'+r+'":\n'+n),o.hide()):o.hide().next(".ajaxOk").show().delay("fast").fadeOut("slow")}),u=null},500))};n[0].nodeName.toLowerCase()=="input"&&n.attr("type")=="checkbox"?n.click(s):n.change(s),n[0].nodeName.toLowerCase()=="input"&&n.attr("type")=="text"&&n.keydown(function(n){f.show(),n.which==13&&$(this).blur()}).watermark(t).blur(function(){f.hide()}).focus(function(){$(this).select()}),n[0].nodeName.toLowerCase()=="textarea"&&n.keydown(function(){f.show()})}),document.DiscoFunctions.DateChangeUserHelper||(document.DiscoFunctions.DateChangeUserHelper=function(n,t,i,r,u,f,e){var s=n.val(),o=null,h=t.next(".ajaxLoading");n.watermark(i).change(function(){var i=n.val();s.toLowerCase()!=i.toLowerCase()&&(s=i,o&&window.clearTimeout(o),o=window.setTimeout(function(){h.show();var n={};n[u]=s,$.getJSON(r,n,function(n,i){i!="success"||n.Result!="OK"?(alert("Unable to change Date:\n"+n),h.hide()):(t.text("by "+n.UserDescription),h.hide().next(".ajaxOk").show().delay("fast").fadeOut("slow"))}),o=null},500))}).focus(function(){$(this).select()}),e?n.datepicker({defaultDate:new Date,minDate:f,changeYear:!0,changeMonth:!0,dateFormat:"yy/mm/dd",beforeShow:function(n){$input=$(n),$input.val()||$input.datepicker("setDate",new Date)}}):n.datetimepicker({defaultDate:new Date,ampm:!0,minDate:f,changeYear:!0,changeMonth:!0,dateFormat:"yy/mm/dd",beforeShow:function(n){$input=$(n),$input.val()||$input.datetimepicker("setDate",new Date)}})}),document.DiscoFunctions.DateChangeHelper||(document.DiscoFunctions.DateChangeHelper=function(n,t,i,r,u,f){var o=n.val(),e=null,s=n.next(".ajaxLoading");n.watermark(t).change(function(){var t=n.val();o.toLowerCase()!=t.toLowerCase()&&(o=t,e&&window.clearTimeout(e),e=window.setTimeout(function(){s.show();var n={};n[r]=o,$.getJSON(i,n,function(n,t){t!="success"||n!="OK"?(alert("Unable to change Date:\n"+n),s.hide()):s.hide().next(".ajaxOk").show().delay("fast").fadeOut("slow")}),e=null},500))}).focus(function(){$(this).select()}),f?n.datepicker({defaultDate:new Date,minDate:u,changeYear:!0,changeMonth:!0,dateFormat:"yy/mm/dd",beforeShow:function(n){$input=$(n),$input.val()||$input.datepicker("setDate",new Date)}}):n.datetimepicker({defaultDate:new Date,ampm:!0,minDate:u,changeYear:!0,changeMonth:!0,dateFormat:"yy/mm/dd",beforeShow:function(n){$input=$(n),$input.val()||$input.datetimepicker("setDate",new Date)}})}),!document.DiscoFunctions.DateDialogCreateUpdater){var dialog,dialogForm,dialogHeader,dialogDateBox,dialogDatePropertyNameBox,updateUrl,friendlyName,dateField,userField,updatePropertyName,notSetDisplay,minDate,useAjax;function dateDialogGet(){if(!dialog){dialog=$("<div>").attr({"class":"dialog"}),dialogForm=$("<form>").attr({action:"/",method:"post"}).appendTo(dialog);var n=$("<p>").appendTo(dialogForm);dialogHeader=$("<h3>").attr("autofocus","autofocus").appendTo(n),dialogDatePropertyNameBox=$("<input>").attr({type:"hidden",name:"key"}).appendTo(n),dialogDateBox=$("<input>").attr({type:"datetime",name:"value"}).css({display:"block","margin-top":15,"margin-left":"auto","margin-right":"auto"}).appendTo(n),$("<input>").attr({type:"hidden",name:"redirect"}).val("true").appendTo(n),dialog.dialog({resizable:!1,modal:!0,autoOpen:!1,buttons:{Update:dateDialogUpdate,Cancel:function(){$(this).dialog("close")}},open:function(){dialog.dialog("widget").find(".ui-dialog-buttonpane :tabbable:first").focus()}}),dialogDateBox.datetimepicker({defaultDate:new Date,ampm:!0,changeYear:!0,changeMonth:!0,dateFormat:"yy/mm/dd"})}return dialog}function dateDialogUpdate(){var u=dialogDateBox.val(),t,n,i,r;useAjax?(t=$("#"+dateField),userField&&(n=$("#"+userField)),dialog.dialog("close"),i=(n?n.next(".ajaxLoading"):t.next(".ajaxLoading")).show(),r={key:updatePropertyName,value:u},$.getJSON(updateUrl,r,function(r,u){u!="success"||r.Result!="OK"?(alert("Unable to change "+friendlyName+" Date:\n"+r),i.hide()):(r.DateTimeFull?t.attr("data-datetimeformatted",r.DateTimeJavascript).attr("data-discodatetime",r.DateTimeSortable).attr("title",r.DateTimeFull).text(r.DateTimeFriendly):t.attr("data-datetimeformatted","").attr("data-discodatetime","-1").attr("title",notSetDisplay).text(notSetDisplay),n&&n.text("by "+r.UserDescription),i.hide().next(".ajaxOk").show().delay("fast").fadeOut("slow"))})):(dialog.dialog("disable"),dialog.dialog("option","butLine truncated
//@ sourceMappingURL=Disco-PropertyChangeHelpers.min.js.map
if(document.DiscoFunctions||(document.DiscoFunctions={}),document.DiscoFunctions.PropertyChangeHelper||(document.DiscoFunctions.PropertyValue=function(n){return n[0].nodeName.toLowerCase()=="input"&&n.attr("type")=="checkbox"?n.is(":checked"):n.val()},document.DiscoFunctions.PropertyChangeHelper=function(n,t,i,r){var e=document.DiscoFunctions.PropertyValue(n),u=null,f=n.nextAll(".ajaxSave").first(),o=n.nextAll(".ajaxLoading").first(),s=function(){f.hide();var t=document.DiscoFunctions.PropertyValue(n);e!=t&&(e=t,u&&window.clearTimeout(u),u=window.setTimeout(function(){o.show();var n={};n[r]=e;$.getJSON(i,n,function(n,t){t!="success"||n!="OK"?(alert('Unable to change property "'+r+'":\n'+n),o.hide()):o.hide().next(".ajaxOk").show().delay("fast").fadeOut("slow")});u=null},500))};n[0].nodeName.toLowerCase()=="input"&&n.attr("type")=="checkbox"?n.click(s):n.change(s);n[0].nodeName.toLowerCase()=="input"&&n.attr("type")=="text"&&n.keydown(function(n){f.show();n.which==13&&$(this).blur()}).watermark(t).blur(function(){f.hide()}).focus(function(){$(this).select()});n[0].nodeName.toLowerCase()=="textarea"&&n.keydown(function(){f.show()})}),document.DiscoFunctions.DateChangeUserHelper||(document.DiscoFunctions.DateChangeUserHelper=function(n,t,i,r,u,f,e){var s=n.val(),o=null,h=t.next(".ajaxLoading");n.watermark(i).change(function(){var i=n.val();s.toLowerCase()!=i.toLowerCase()&&(s=i,o&&window.clearTimeout(o),o=window.setTimeout(function(){h.show();var n={};n[u]=s;$.getJSON(r,n,function(n,i){i!="success"||n.Result!="OK"?(alert("Unable to change Date:\n"+n),h.hide()):(t.text("by "+n.UserDescription),h.hide().next(".ajaxOk").show().delay("fast").fadeOut("slow"))});o=null},500))}).focus(function(){$(this).select()});e?n.datepicker({defaultDate:new Date,minDate:f,changeYear:!0,changeMonth:!0,dateFormat:"yy/mm/dd",beforeShow:function(n){$input=$(n);$input.val()||$input.datepicker("setDate",new Date)}}):n.datetimepicker({defaultDate:new Date,ampm:!0,minDate:f,changeYear:!0,changeMonth:!0,dateFormat:"yy/mm/dd",beforeShow:function(n){$input=$(n);$input.val()||$input.datetimepicker("setDate",new Date)}})}),document.DiscoFunctions.DateChangeHelper||(document.DiscoFunctions.DateChangeHelper=function(n,t,i,r,u,f){var o=n.val(),e=null,s=n.next(".ajaxLoading");n.watermark(t).change(function(){var t=n.val();o.toLowerCase()!=t.toLowerCase()&&(o=t,e&&window.clearTimeout(e),e=window.setTimeout(function(){s.show();var n={};n[r]=o;$.getJSON(i,n,function(n,t){t!="success"||n!="OK"?(alert("Unable to change Date:\n"+n),s.hide()):s.hide().next(".ajaxOk").show().delay("fast").fadeOut("slow")});e=null},500))}).focus(function(){$(this).select()});f?n.datepicker({defaultDate:new Date,minDate:u,changeYear:!0,changeMonth:!0,dateFormat:"yy/mm/dd",beforeShow:function(n){$input=$(n);$input.val()||$input.datepicker("setDate",new Date)}}):n.datetimepicker({defaultDate:new Date,ampm:!0,minDate:u,changeYear:!0,changeMonth:!0,dateFormat:"yy/mm/dd",beforeShow:function(n){$input=$(n);$input.val()||$input.datetimepicker("setDate",new Date)}})}),!document.DiscoFunctions.DateDialogCreateUpdater){var dialog,dialogForm,dialogHeader,dialogDateBox,dialogDatePropertyNameBox,updateUrl,friendlyName,dateField,userField,updatePropertyName,notSetDisplay,minDate,useAjax;function dateDialogGet(){if(!dialog){dialog=$("<div>").attr({"class":"dialog"});dialogForm=$("<form>").attr({action:"/",method:"post"}).appendTo(dialog);var n=$("<p>").appendTo(dialogForm);dialogHeader=$("<h3>").attr("autofocus","autofocus").appendTo(n);dialogDatePropertyNameBox=$("<input>").attr({type:"hidden",name:"key"}).appendTo(n);dialogDateBox=$("<input>").attr({type:"datetime",name:"value"}).css({display:"block","margin-top":15,"margin-left":"auto","margin-right":"auto"}).appendTo(n);$("<input>").attr({type:"hidden",name:"redirect"}).val("true").appendTo(n);dialog.dialog({resizable:!1,modal:!0,autoOpen:!1,buttons:{Update:dateDialogUpdate,Cancel:function(){$(this).dialog("close")}},open:function(){dialog.dialog("widget").find(".ui-dialog-buttonpane :tabbable:first").focus()}});dialogDateBox.datetimepicker({defaultDate:new Date,ampm:!0,changeYear:!0,changeMonth:!0,dateFormat:"yy/mm/dd"})}return dialog}function dateDialogUpdate(){var u=dialogDateBox.val(),t,n,i,r;useAjax?(t=$("#"+dateField),userField&&(n=$("#"+userField)),dialog.dialog("close"),i=(n?n.next(".ajaxLoading"):t.next(".ajaxLoading")).show(),r={key:updatePropertyName,value:u},$.getJSON(updateUrl,r,function(r,u){u!="success"||r.Result!="OK"?(alert("Unable to change "+friendlyName+" Date:\n"+r),i.hide()):(r.DateTimeFull?t.attr("data-isodate",r.DateTimeISO8601).attr("data-livestamp",r.DateTimeUnixEpoc).attr("title",r.DateTimeFull).text(r.DateTimeFriendly):t.attr("data-isodate","").attr("data-livestamp","-1").attr("title",notSetDisplay).text(notSetDisplay),n&&n.text("by "+r.UserDescription),i.hide().next(".ajaxOk").show().delay("fast").fadeOut("slow"))})):(dialog.dialog("disable"),dialog.dialog("option","buttons",null),dialogDatePropertyNameLine truncated
/*
//# sourceMappingURL=Disco-PropertyChangeHelpers.min.js.map
*/
@@ -2,7 +2,7 @@
"version":3,
"file":"Disco-PropertyChangeHelpers.min.js",
"lineCount":1,
"mappings":"AAqMA,GArMKA,QAAQC,e,GACTD,QAAQC,eAAgB,CAAE,CAAA,EAAE,CAE3BD,QAAQC,eAAeC,qB,GACxBF,QAAQC,eAAeE,cAAe,CAAEC,QAAS,CAACC,CAAD,CAAgB,CAI7D,OAHIA,CAAc,CAAA,CAAA,CAAEC,SAASC,YAAY,CAAA,CAAG,EAAG,OAAQ,EAAGF,CAAaG,KAAK,CAAC,MAAD,CAAS,EAAG,U,CAC7EH,CAAaI,GAAG,CAAC,UAAD,C,CAEpBJ,CAAaK,IAAI,CAAA,CAJqC,CAKhE,CACDV,QAAQC,eAAeC,qBAAsB,CAAES,QAAS,CAACN,CAAa,CAAEO,CAAc,CAAEC,CAAS,CAAEC,CAA3C,CAA+D,CACnH,IAAIC,EAAaf,QAAQC,eAAeE,cAAc,CAACE,CAAD,EAClDW,EAAmB,KACnBC,EAAYZ,CAAaa,QAAQ,CAAC,WAAD,CAAaC,MAAM,CAAA,EACpDC,EAAef,CAAaa,QAAQ,CAAC,cAAD,CAAgBC,MAAM,CAAA,EAC1DE,EAAsBA,QAAS,CAAA,CAAG,CAClCJ,CAASK,KAAK,CAAA,CAAE,CACh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angehelpers.js"],
"names":["document","DiscoFunctions","PropertyChangeHelper","PropertyValue","document.DiscoFunctions.PropertyValue","PropertyField","nodeName","toLowerCase","attr","is","val","document.DiscoFunctions.PropertyChangeHelper","FieldWatermark","UpdateUrl","UpdatePropertyName","fieldValue","fieldChangeToken","$ajaxSave","nextAll","first","$ajaxLoading","fieldChangeFunction","hide","changedValue","window","clearTimeout","setTimeout","show","data","$","getJSON","response","result","alert","next","delay","fadeOut","click","change","keydown","e","which","blur","watermark","focus","select","DateChangeUserHelper","document.DiscoFunctions.DateChangeUserHelper","DateField","UserField","DateFieldWatermark","minDate","dateOnly","dateFieldValue","dateFieldChangeToken","dateText","Result","text","UserDescription","datepicker","Date","beforeShow","input","$input","datetimepicker","DateChangeHelper","document.DiscoFunctions.DateChangeHelper","DateDialogCreateUpdater","dialog","dialogForm","dialogHeader","dialogDateBox","dialogDatePropertyNameBox","updateUrl","friendlyName","dateField","userField","updatePropertyName","notSetDisplay","useAjax","dateDialogGet","appendTo","dialogBody","css","dateDialogUpdate","Cancel","open","find","dateValue","$dateField","$userField","DateTimeFull","DateTimeJavascript","DateTimeSortable","DateTimeFriendly","submit","dateDialogOpen","FriendlyName","NotSetDisplay","MinDate","UseAjax","d","dfVal","dateDialogCreateUpdater","event","preventDefault","insertBefore"]
"names":["document","DiscoFunctions","PropertyChangeHelper","PropertyValue","document.DiscoFunctions.PropertyValue","PropertyField","nodeName","toLowerCase","attr","is","val","document.DiscoFunctions.PropertyChangeHelper","FieldWatermark","UpdateUrl","UpdatePropertyName","fieldValue","fieldChangeToken","$ajaxSave","nextAll","first","$ajaxLoading","fieldChangeFunction","hide","changedValue","window","clearTimeout","setTimeout","show","data","$","getJSON","response","result","alert","next","delay","fadeOut","click","change","keydown","e","which","blur","watermark","focus","select","DateChangeUserHelper","document.DiscoFunctions.DateChangeUserHelper","DateField","UserField","DateFieldWatermark","minDate","dateOnly","dateFieldValue","dateFieldChangeToken","dateText","Result","text","UserDescription","datepicker","Date","beforeShow","input","$input","datetimepicker","DateChangeHelper","document.DiscoFunctions.DateChangeHelper","DateDialogCreateUpdater","dialog","dialogForm","dialogHeader","dialogDateBox","dialogDatePropertyNameBox","updateUrl","friendlyName","dateField","userField","updatePropertyName","notSetDisplay","useAjax","dateDialogGet","appendTo","dialogBody","css","dateDialogUpdate","Cancel","open","find","dateValue","$dateField","$userField","DateTimeFull","DateTimeISO8601","DateTimeUnixEpoc","DateTimeFriendly","submit","dateDialogOpen","FriendlyName","NotSetDisplay","MinDate","UseAjax","d","dfVal","dateDialogCreateUpdater","event","preventDefault","insertBefore"]
}
@@ -259,13 +259,13 @@ if (!document.DiscoFunctions.DateDialogCreateUpdater)
$ajaxLoading.hide();
} else {
if (response.DateTimeFull) {
$dateField.attr('data-datetimeformatted', response.DateTimeJavascript)
.attr('data-discodatetime', response.DateTimeSortable)
$dateField.attr('data-isodate', response.DateTimeISO8601)
.attr('data-livestamp', response.DateTimeUnixEpoc)
.attr('title', response.DateTimeFull)
.text(response.DateTimeFriendly);
} else {
$dateField.attr('data-datetimeformatted', '')
.attr('data-discodatetime', '-1')
$dateField.attr('data-isodate', '')
.attr('data-livestamp', '-1')
.attr('title', notSetDisplay)
.text(notSetDisplay);
}
@@ -300,7 +300,7 @@ if (!document.DiscoFunctions.DateDialogCreateUpdater)
d.dialog('option', 'title', friendlyName);
dialogHeader.text(friendlyName + ' Date');
var dfVal = $('#' + DateField).attr('data-datetimeformatted');
var dfVal = $('#' + DateField).attr('data-isodate');
if (dfVal)
dialogDateBox.datetimepicker('setDate', new Date(dfVal));
+2 -1
View File
@@ -974,6 +974,7 @@
<None Include="ClientSource\Scripts\Core\moment.en-au.js" />
<None Include="ClientSource\Scripts\Core\moment.js" />
<None Include="ClientSource\Scripts\Core\_references.js" />
<None Include="ClientSource\Scripts\Core\livestamp.js" />
<Content Include="ClientSource\Scripts\Modules\Disco-AjaxHelperIcons.min.js">
<DependentUpon>Disco-AjaxHelperIcons.js.bundle</DependentUpon>
</Content>
@@ -2013,7 +2014,7 @@
<SaveServerSettingsInUserFile>False</SaveServerSettingsInUserFile>
</WebProjectProperties>
</FlavorProperties>
<UserProperties BuildVersion_StartDate="2011/7/1" BuildVersion_BuildAction="Both" BuildVersion_UseGlobalSettings="False" BuildVersion_DetectChanges="False" BuildVersion_BuildVersioningStyle="None.DeltaBaseYear.MonthAndDayStamp.TimeStamp" BuildVersion_UpdateAssemblyVersion="True" BuildVersion_UpdateFileVersion="True" />
<UserProperties BuildVersion_UpdateFileVersion="True" BuildVersion_UpdateAssemblyVersion="True" BuildVersion_BuildVersioningStyle="None.DeltaBaseYear.MonthAndDayStamp.TimeStamp" BuildVersion_DetectChanges="False" BuildVersion_UseGlobalSettings="False" BuildVersion_BuildAction="Both" BuildVersion_StartDate="2011/7/1" />
</VisualStudio>
</ProjectExtensions>
<Import Project="$(SolutionDir)\.nuget\nuget.targets" />
@@ -32,7 +32,7 @@
else
{ @da.Comments }}
</span><span class="author">@da.TechUser.ToString()</span>@if (canRemoveAnyAttachments || (canRemoveOwnAttachments && da.TechUserId == CurrentUser.Id))
{<text><span class="remove fa fa-times-circle"></span></text>}<span class="timestamp" title="@da.Timestamp.ToFullDateTime()">@da.Timestamp.FromNow()</span>
{<text><span class="remove fa fa-times-circle"></span></text>}<span class="timestamp" title="@da.Timestamp.ToFullDateTime()" data-livestamp="@da.Timestamp.ToUnixEpoc()">@da.Timestamp.ToFullDateTime()</span>
</a>
}
}
@@ -153,7 +153,7 @@
e.find('.icon img').attr('src', '@(Url.Action(MVC.API.Device.AttachmentThumbnail()))/' + a.Id);
e.find('.comments').text(a.Comments);
e.find('.author').text(a.Author);
e.find('.timestamp').text(a.TimestampFuzzy).attr('title', a.TimestampFull);
e.find('.timestamp').text(a.TimestampFull).attr('title', a.TimestampFull).livestamp(a.TimestampUnixEpoc);
if (canRemove)
e.find('.remove').click(removeAttachment);
if (!quick)
@@ -199,6 +199,7 @@
var $this = $(this);
if ($this.attr('data-mimetype').toLowerCase().indexOf('image/') == 0)
Shadowbox.removeCache(this);
$this.find('.timestamp').livestamp('destroy');
$this.remove();
});
} else {
@@ -29,6 +29,7 @@ namespace Disco.Web.Views.Device.DeviceParts
using Disco;
using Disco.BI.Extensions;
using Disco.Models.Repository;
using Disco.Services;
using Disco.Services.Authorization;
using Disco.Services.Web;
using Disco.Web;
@@ -276,11 +277,22 @@ WriteAttribute("title", Tuple.Create(" title=\"", 2144), Tuple.Create("\"", 2182
, 2152), false)
);
WriteLiteral(" data-livestamp=\"");
#line 35 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
Write(da.Timestamp.ToUnixEpoc());
#line default
#line hidden
WriteLiteral("\"");
WriteLiteral(">");
#line 35 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
Write(da.Timestamp.FromNow());
Write(da.Timestamp.ToFullDateTime());
#line default
@@ -584,7 +596,7 @@ WriteLiteral("/\' + a.Id);\r\n e.find(\'.icon img\').
WriteLiteral(@"/' + a.Id);
e.find('.comments').text(a.Comments);
e.find('.author').text(a.Author);
e.find('.timestamp').text(a.TimestampFuzzy).attr('title', a.TimestampFull);
e.find('.timestamp').text(a.TimestampFull).attr('title', a.TimestampFull).livestamp(a.TimestampUnixEpoc);
if (canRemove)
e.find('.remove').click(removeAttachment);
if (!quick)
@@ -654,25 +666,26 @@ WriteLiteral("\',\r\n dataType: \'json\',
"= $(this);\r\n if ($this.attr(\'" +
"data-mimetype\').toLowerCase().indexOf(\'image/\') == 0)\r\n " +
" Shadowbox.removeCache(this);\r\n " +
" $this.remove();\r\n " +
" });\r\n } else {\r\n " +
" alert(\'Unable to remove attachment:" +
" \' + d);\r\n }\r\n " +
" $dialogRemoveAttachment.dialog(\"close\");\r\n " +
" },\r\n error: functi" +
"on (jqXHR, textStatus, errorThrown) {\r\n " +
" alert(\'Unable to remove attachment: \' + textStatus);\r\n " +
" $dialogRemoveAttachment.dialog(\"close\");\r\n " +
" }\r\n });\r\n " +
" },\r\n \"Cancel\": function () {\r\n" +
" $dialogRemoveAttachment.dialog(\"close\");\r\n " +
" }\r\n });\r\n\r\n " +
" $dialogRemoveAttachment.dialog(\'open\');\r\n\r\n " +
" return false;\r\n }\r\n //#endr" +
"egion\r\n ");
" $this.find(\'.timestamp\').livestamp(\'destroy\');\r" +
"\n $this.remove();\r\n " +
" });\r\n " +
" } else {\r\n alert(\'Unable t" +
"o remove attachment: \' + d);\r\n }\r\n " +
" $dialogRemoveAttachment.dialog(\"close\")" +
";\r\n },\r\n " +
" error: function (jqXHR, textStatus, errorThrown) {\r\n " +
" alert(\'Unable to remove attachment: \' + textStatus);\r\n " +
" $dialogRemoveAttachment.dialog(\"close\")" +
";\r\n }\r\n " +
" });\r\n },\r\n \"Canc" +
"el\": function () {\r\n $dialogRemoveAttachment." +
"dialog(\"close\");\r\n }\r\n " +
" });\r\n\r\n $dialogRemoveAttachment.dialog(\'open\');\r\n\r\n " +
" return false;\r\n }\r\n " +
" //#endregion\r\n ");
#line 225 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
#line 226 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
}
@@ -714,7 +727,7 @@ WriteLiteral("></i>&nbsp;Are you sure?\r\n </p>\r\n </div>\r\n <scr
"etailTab-ResourcesLink\">Attachments [");
#line 247 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
#line 248 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
Write(Model.Device.DeviceAttachments == null ? 0 : Model.Device.DeviceAttachments.Count);
@@ -143,7 +143,13 @@
alert('Unable to retrieve latest network logon date:\n' + response);
$('<span>').addClass('smallMessage').text('[may not be current]').appendTo(span);
} else {
span.attr('title', response.Formatted).text(response.Friendly);
var spanClasses = '',
diff = moment().valueOf() - response.UnixEpoc;
if (diff > 2592000000) // 30 Days
spanClasses = 'error';
else if (diff > 604800000) // 7 Days
spanClasses = 'alert';
span.removeClass('alert error').addClass(spanClasses).attr('title', response.Formatted).text(response.Formatted).livestamp(response.UnixEpoc);
}
});
window.setTimeout(function () {
@@ -372,7 +378,7 @@
@foreach (var db in Model.DeviceBatches.OrderBy(i => i.Name))
{
<li>
<input type="radio" data-devicebatchid="@db.Id" name="DeviceBatch" id="DeviceBatch_@(db.Id)" /><label for="DeviceBatch_@(db.Id)" title="Purchased: @(db.PurchaseDate.FromNow())">@db.Name</label></li>
<input type="radio" data-devicebatchid="@db.Id" name="DeviceBatch" id="DeviceBatch_@(db.Id)" /><label for="DeviceBatch_@(db.Id)" title="Purchased: @(db.PurchaseDate.ToLongDateString())">@db.Name</label></li>
}
</ul>
</div>
File diff suppressed because it is too large. Load diff
@@ -526,7 +526,7 @@
<script>
$(function () {
var updateUrl = '@(Url.Action(MVC.API.Job.Update(Model.Job.Id, null)))';
var jobOpenDate = '@(Model.Job.OpenedDate.ToJavaScript())';
var jobOpenDate = '@(Model.Job.OpenedDate.ToISO8601())';
document.DiscoFunctions.DateDialogCreateUpdater(updateUrl, 'Claim Form Sent Date', 'Job_JobMetaInsurance_ClaimFormSentDate', 'Job_JobMetaInsurance_ClaimFormSentUserId', 'InsuranceClaimFormSentDate', 'Not Sent', jobOpenDate, false);
});
@@ -29,6 +29,7 @@ namespace Disco.Web.Views.Job.JobParts
using Disco;
using Disco.BI.Extensions;
using Disco.Models.Repository;
using Disco.Services;
using Disco.Services.Authorization;
using Disco.Services.Web;
using Disco.Web;
@@ -1674,7 +1675,7 @@ WriteLiteral("\';\r\n var jobOpenDate = \'");
#line 529 "..\..\Views\Job\JobParts\Insurance.cshtml"
Write(Model.Job.OpenedDate.ToJavaScript());
Write(Model.Job.OpenedDate.ToISO8601());
#line default
@@ -125,7 +125,7 @@
<script>
$(function () {
var updateUrl = '@(Url.Action(MVC.API.Job.Update(Model.Job.Id, null)))';
var jobOpenDate = '@(Model.Job.OpenedDate.ToJavaScript())';
var jobOpenDate = '@(Model.Job.OpenedDate.ToISO8601())';
@if (Authorization.Has(Claims.Job.Properties.NonWarrantyProperties.AccountingChargeRequired))
{<text>document.DiscoFunctions.DateDialogCreateUpdater(updateUrl, 'Accounting Charge Required', 'Job_JobMetaNonWarranty_AccountingChargeRequiredDate', 'Job_JobMetaNonWarranty_AccountingChargeRequiredUser', 'NonWarrantyAccountingChargeRequired', 'Not Required', jobOpenDate, false);</text>}
@@ -29,6 +29,7 @@ namespace Disco.Web.Views.Job.JobParts
using Disco;
using Disco.BI.Extensions;
using Disco.Models.Repository;
using Disco.Services;
using Disco.Services.Authorization;
using Disco.Services.Web;
using Disco.Web;
@@ -460,7 +461,7 @@ WriteLiteral("\';\r\n var jobOpenDate = \'");
#line 128 "..\..\Views\Job\JobParts\NonWarrantyFinance.cshtml"
Write(Model.Job.OpenedDate.ToJavaScript());
Write(Model.Job.OpenedDate.ToISO8601());
#line default
+1 -1
View File
@@ -81,7 +81,7 @@
<script>
$(function () {
var updateUrl = '@(Url.Action(MVC.API.Job.Update(Model.Job.Id, null)))';
var jobOpenDate = '@(Model.Job.OpenedDate.ToJavaScript())';
var jobOpenDate = '@(Model.Job.OpenedDate.ToISO8601())';
@if (Authorization.Has(Claims.Job.Properties.NonWarrantyProperties.RepairerLoggedDate))
{<text>document.DiscoFunctions.DateDialogCreateUpdater(updateUrl, 'Repairer Name', 'Job_JobMetaNonWarranty_RepairerLoggedDate', null, 'NonWarrantyRepairerLoggedDate', 'Not Logged', jobOpenDate, false);</text>}
@@ -29,6 +29,7 @@ namespace Disco.Web.Views.Job.JobParts
using Disco;
using Disco.BI.Extensions;
using Disco.Models.Repository;
using Disco.Services;
using Disco.Services.Authorization;
using Disco.Services.Web;
using Disco.Web;
@@ -345,7 +346,7 @@ WriteLiteral("\';\r\n var jobOpenDate = \'");
#line 84 "..\..\Views\Job\JobParts\Repairs.cshtml"
Write(Model.Job.OpenedDate.ToJavaScript());
Write(Model.Job.OpenedDate.ToISO8601());
#line default
@@ -30,7 +30,7 @@
{
<div data-logid="@jl.Id">
<span class="author">@jl.TechUser.ToString()</span>@if (canRemoveAnyLogs || (canRemoveOwnLogs && jl.TechUserId == CurrentUser.Id))
{<text><span class="remove fa fa-times-circle"></span></text>}<span class="timestamp" title="@jl.Timestamp.ToFullDateTime()">@jl.Timestamp.FromNow()</span>
{<text><span class="remove fa fa-times-circle"></span></text>}<span class="timestamp" data-livestamp="@(jl.Timestamp.ToUnixEpoc())" title="@jl.Timestamp.ToFullDateTime()">@jl.Timestamp.ToFullDateTime()</span>
<span class="comment">@jl.Comments.ToMultilineJobRefString()</span>
</div>
}
@@ -59,7 +59,7 @@
else
{ @ja.Comments }}
</span><span class="author">@ja.TechUser.ToString()</span>@if (canRemoveAnyAttachments || (canRemoveOwnAttachments && ja.TechUserId == CurrentUser.Id))
{<text><span class="remove fa fa-times-circle"></span></text>}<span class="timestamp" title="@ja.Timestamp.ToFullDateTime()">@ja.Timestamp.FromNow()</span>
{<text><span class="remove fa fa-times-circle"></span></text>}<span class="timestamp" data-livestamp="@(ja.Timestamp.ToUnixEpoc())" title="@ja.Timestamp.ToFullDateTime()">@ja.Timestamp.ToFullDateTime()</span>
</a>
}
</div>
@@ -244,7 +244,9 @@
}
function liveRemoveComment(key) {
$CommentOutput.children('div[data-logid="' + key + '"]').slideUp(300).delay(300).queue(function () {
$(this).remove();
var $this = $(this);
$this.find('.timestamp').livestamp('destroy');
$this.remove();
});
}
function addComment(c, quick, canRemove) {
@@ -256,7 +258,7 @@
var e = $(t);
e.attr('data-logid', c.Id);
e.find('.author').text(c.Author);
e.find('.timestamp').text(c.TimestampFuzzy).attr('title', c.TimestampFull);
e.find('.timestamp').text(c.TimestampFull).attr('title', c.TimestampFull).livestamp(c.TimestampUnixEpoc);
if (canRemove)
e.find('.remove').click(removePost);
var eComment = e.find('.comment').text(c.Comments);
@@ -474,7 +476,7 @@
e.find('.icon img').attr('src', '@(Url.Action(MVC.API.Job.AttachmentThumbnail()))/' + a.Id);
e.find('.comments').text(a.Comments);
e.find('.author').text(a.Author);
e.find('.timestamp').text(a.TimestampFuzzy).attr('title', a.TimestampFull);
e.find('.timestamp').text(a.TimestampFull).attr('title', a.TimestampFull).livestamp(a.TimestampUnixEpoc);
if (canRemove)
e.find('.remove').click(removeLocalAttachment);
if (!quick)
@@ -194,21 +194,32 @@ WriteLiteral("<span");
WriteLiteral(" class=\"timestamp\"");
WriteAttribute("title", Tuple.Create(" title=\"", 1831), Tuple.Create("\"", 1869)
WriteLiteral(" data-livestamp=\"");
#line 33 "..\..\Views\Job\JobParts\Resources.cshtml"
, Tuple.Create(Tuple.Create("", 1839), Tuple.Create<System.Object, System.Int32>(jl.Timestamp.ToFullDateTime()
Write(jl.Timestamp.ToUnixEpoc());
#line default
#line hidden
, 1839), false)
WriteLiteral("\"");
WriteAttribute("title", Tuple.Create(" title=\"", 1877), Tuple.Create("\"", 1915)
#line 33 "..\..\Views\Job\JobParts\Resources.cshtml"
, Tuple.Create(Tuple.Create("", 1885), Tuple.Create<System.Object, System.Int32>(jl.Timestamp.ToFullDateTime()
#line default
#line hidden
, 1885), false)
);
WriteLiteral(">");
#line 33 "..\..\Views\Job\JobParts\Resources.cshtml"
Write(jl.Timestamp.FromNow());
Write(jl.Timestamp.ToFullDateTime());
#line default
@@ -301,14 +312,14 @@ WriteLiteral(" <td");
WriteLiteral(" id=\"Attachments\"");
WriteAttribute("class", Tuple.Create(" class=\"", 2567), Tuple.Create("\"", 2642)
WriteAttribute("class", Tuple.Create(" class=\"", 2620), Tuple.Create("\"", 2695)
#line 49 "..\..\Views\Job\JobParts\Resources.cshtml"
, Tuple.Create(Tuple.Create("", 2575), Tuple.Create<System.Object, System.Int32>(canAddAttachments ? "canAddAttachments" : "cannotAddAttachments"
, Tuple.Create(Tuple.Create("", 2628), Tuple.Create<System.Object, System.Int32>(canAddAttachments ? "canAddAttachments" : "cannotAddAttachments"
#line default
#line hidden
, 2575), false)
, 2628), false)
);
WriteLiteral(">\r\n <div");
@@ -333,14 +344,14 @@ WriteLiteral(">\r\n");
#line hidden
WriteLiteral(" <a");
WriteAttribute("href", Tuple.Create(" href=\"", 2810), Tuple.Create("\"", 2867)
WriteAttribute("href", Tuple.Create(" href=\"", 2863), Tuple.Create("\"", 2920)
#line 53 "..\..\Views\Job\JobParts\Resources.cshtml"
, Tuple.Create(Tuple.Create("", 2817), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.API.Job.AttachmentDownload(ja.Id))
, Tuple.Create(Tuple.Create("", 2870), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.API.Job.AttachmentDownload(ja.Id))
#line default
#line hidden
, 2817), false)
, 2870), false)
);
WriteLiteral(" data-attachmentid=\"");
@@ -369,42 +380,42 @@ WriteLiteral(">\r\n <span");
WriteLiteral(" class=\"icon\"");
WriteAttribute("title", Tuple.Create(" title=\"", 2973), Tuple.Create("\"", 2993)
WriteAttribute("title", Tuple.Create(" title=\"", 3026), Tuple.Create("\"", 3046)
#line 54 "..\..\Views\Job\JobParts\Resources.cshtml"
, Tuple.Create(Tuple.Create("", 2981), Tuple.Create<System.Object, System.Int32>(ja.Filename
, Tuple.Create(Tuple.Create("", 3034), Tuple.Create<System.Object, System.Int32>(ja.Filename
#line default
#line hidden
, 2981), false)
, 3034), false)
);
WriteLiteral(">\r\n <img");
WriteLiteral(" alt=\"Attachment Thumbnail\"");
WriteAttribute("src", Tuple.Create(" src=\"", 3060), Tuple.Create("\"", 3119)
WriteAttribute("src", Tuple.Create(" src=\"", 3113), Tuple.Create("\"", 3172)
#line 55 "..\..\Views\Job\JobParts\Resources.cshtml"
, Tuple.Create(Tuple.Create("", 3066), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.API.Job.AttachmentThumbnail(ja.Id))
, Tuple.Create(Tuple.Create("", 3119), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.API.Job.AttachmentThumbnail(ja.Id))
#line default
#line hidden
, 3066), false)
, 3119), false)
);
WriteLiteral(" /></span>\r\n <span");
WriteLiteral(" class=\"comments\"");
WriteAttribute("title", Tuple.Create(" title=\"", 3182), Tuple.Create("\"", 3202)
WriteAttribute("title", Tuple.Create(" title=\"", 3235), Tuple.Create("\"", 3255)
#line 56 "..\..\Views\Job\JobParts\Resources.cshtml"
, Tuple.Create(Tuple.Create("", 3190), Tuple.Create<System.Object, System.Int32>(ja.Comments
, Tuple.Create(Tuple.Create("", 3243), Tuple.Create<System.Object, System.Int32>(ja.Comments
#line default
#line hidden
, 3190), false)
, 3243), false)
);
WriteLiteral(">\r\n");
@@ -488,21 +499,32 @@ WriteLiteral("<span");
WriteLiteral(" class=\"timestamp\"");
WriteAttribute("title", Tuple.Create(" title=\"", 3807), Tuple.Create("\"", 3845)
WriteLiteral(" data-livestamp=\"");
#line 62 "..\..\Views\Job\JobParts\Resources.cshtml"
, Tuple.Create(Tuple.Create("", 3815), Tuple.Create<System.Object, System.Int32>(ja.Timestamp.ToFullDateTime()
Write(ja.Timestamp.ToUnixEpoc());
#line default
#line hidden
, 3815), false)
WriteLiteral("\"");
WriteAttribute("title", Tuple.Create(" title=\"", 3906), Tuple.Create("\"", 3944)
#line 62 "..\..\Views\Job\JobParts\Resources.cshtml"
, Tuple.Create(Tuple.Create("", 3914), Tuple.Create<System.Object, System.Int32>(ja.Timestamp.ToFullDateTime()
#line default
#line hidden
, 3914), false)
);
WriteLiteral(">");
#line 62 "..\..\Views\Job\JobParts\Resources.cshtml"
Write(ja.Timestamp.FromNow());
Write(ja.Timestamp.ToFullDateTime());
#line default
@@ -909,38 +931,29 @@ WriteLiteral("addComment(d, false, false);");
#line default
#line hidden
WriteLiteral(@"
}
},
error: function (jqXHR, textStatus, errorThrown) {
alert('Unable to load live comment ' + id + ': ' + textStatus);
}
});
}
}
function liveRemoveComment(key) {
$CommentOutput.children('div[data-logid=""' + key + '""]').slideUp(300).delay(300).queue(function () {
$(this).remove();
});
}
function addComment(c, quick, canRemove) {
var t = '<div><span class=""author"" />';
if (canRemove)
t += '<span class=""remove fa fa-times-circle"" />';
t += '<span class=""timestamp"" /><span class=""comment"" /></div>';
var e = $(t);
e.attr('data-logid', c.Id);
e.find('.author').text(c.Author);
e.find('.timestamp').text(c.TimestampFuzzy).attr('title', c.TimestampFull);
if (canRemove)
e.find('.remove').click(removePost);
var eComment = e.find('.comment').text(c.Comments);
var commentHtml = eComment.text().replace(/\r\n|\r|\n/g, '<br />');
commentHtml = commentHtml.replace(/\#(\d+)/g, '<a href=""");
WriteLiteral("\r\n }\r\n },\r\n " +
" error: function (jqXHR, textStatus, errorThrown) {\r\n " +
" alert(\'Unable to load live comment \' + id + \': \' + textStatus);\r\n " +
" }\r\n });\r\n }\r\n }\r\n " +
" function liveRemoveComment(key) {\r\n $CommentOutput.childre" +
"n(\'div[data-logid=\"\' + key + \'\"]\').slideUp(300).delay(300).queue(function () {\r\n" +
" var $this = $(this);\r\n $this.find(\'.times" +
"tamp\').livestamp(\'destroy\');\r\n $this.remove();\r\n " +
" });\r\n }\r\n function addComment(c, quick, canRemove) {\r\n " +
" var t = \'<div><span class=\"author\" />\';\r\n if (canR" +
"emove)\r\n t += \'<span class=\"remove fa fa-times-circle\" />\';\r\n" +
" t += \'<span class=\"timestamp\" /><span class=\"comment\" /></div>\';" +
"\r\n\r\n var e = $(t);\r\n e.attr(\'data-logid\', c.Id);\r\n" +
" e.find(\'.author\').text(c.Author);\r\n e.find(\'.time" +
"stamp\').text(c.TimestampFull).attr(\'title\', c.TimestampFull).livestamp(c.Timesta" +
"mpUnixEpoc);\r\n if (canRemove)\r\n e.find(\'.remov" +
"e\').click(removePost);\r\n var eComment = e.find(\'.comment\').text(c" +
".Comments);\r\n var commentHtml = eComment.text().replace(/\\r\\n|\\r|" +
"\\n/g, \'<br />\');\r\n commentHtml = commentHtml.replace(/\\#(\\d+)/g, " +
"\'<a href=\"");
#line 264 "..\..\Views\Job\JobParts\Resources.cshtml"
#line 266 "..\..\Views\Job\JobParts\Resources.cshtml"
Write(Url.Action(MVC.Job.Show(null)));
@@ -970,14 +983,14 @@ WriteLiteral(@"?id=$1"">#$1</a>');
");
#line 285 "..\..\Views\Job\JobParts\Resources.cshtml"
#line 287 "..\..\Views\Job\JobParts\Resources.cshtml"
}
#line default
#line hidden
#line 286 "..\..\Views\Job\JobParts\Resources.cshtml"
#line 288 "..\..\Views\Job\JobParts\Resources.cshtml"
if (canShowAttachments)
{
@@ -998,7 +1011,7 @@ WriteLiteral(@" <script>
var jobId = parseInt('");
#line 299 "..\..\Views\Job\JobParts\Resources.cshtml"
#line 301 "..\..\Views\Job\JobParts\Resources.cshtml"
Write(Model.Job.Id);
@@ -1009,13 +1022,13 @@ WriteLiteral("\');\r\n\r\n //#region Attachments\r\n var $
"tput\');\r\n\r\n");
#line 305 "..\..\Views\Job\JobParts\Resources.cshtml"
#line 307 "..\..\Views\Job\JobParts\Resources.cshtml"
#line default
#line hidden
#line 305 "..\..\Views\Job\JobParts\Resources.cshtml"
#line 307 "..\..\Views\Job\JobParts\Resources.cshtml"
if (canAddAttachments)
{
@@ -1046,7 +1059,7 @@ WriteLiteral(@"
'");
#line 328 "..\..\Views\Job\JobParts\Resources.cshtml"
#line 330 "..\..\Views\Job\JobParts\Resources.cshtml"
Write(Links.ClientBin.Disco_Silverlight_AttachmentUpload_xap);
@@ -1067,7 +1080,7 @@ WriteLiteral(@"',
'UploadUrl=");
#line 340 "..\..\Views\Job\JobParts\Resources.cshtml"
#line 342 "..\..\Views\Job\JobParts\Resources.cshtml"
Write(Url.Action(MVC.API.Job.AttachmentUpload(Model.Job.Id, null)));
@@ -1102,7 +1115,7 @@ WriteLiteral(@"');
");
#line 366 "..\..\Views\Job\JobParts\Resources.cshtml"
#line 368 "..\..\Views\Job\JobParts\Resources.cshtml"
}
@@ -1111,13 +1124,13 @@ WriteLiteral(@"');
WriteLiteral("\r\n");
#line 368 "..\..\Views\Job\JobParts\Resources.cshtml"
#line 370 "..\..\Views\Job\JobParts\Resources.cshtml"
#line default
#line hidden
#line 368 "..\..\Views\Job\JobParts\Resources.cshtml"
#line 370 "..\..\Views\Job\JobParts\Resources.cshtml"
if (canRemoveAnyAttachments || canRemoveOwnAttachments)
{
@@ -1152,7 +1165,7 @@ WriteLiteral(@"
url: '");
#line 395 "..\..\Views\Job\JobParts\Resources.cshtml"
#line 397 "..\..\Views\Job\JobParts\Resources.cshtml"
Write(Url.Action(MVC.API.Job.AttachmentRemove()));
@@ -1180,7 +1193,7 @@ WriteLiteral("\',\r\n dataType: \'json\',\r\n
" }\r\n\r\n //#endregion\r\n\r\n ");
#line 428 "..\..\Views\Job\JobParts\Resources.cshtml"
#line 430 "..\..\Views\Job\JobParts\Resources.cshtml"
}
@@ -1191,7 +1204,7 @@ WriteLiteral("\r\n function addAttachment(key, quick) {\r\n\r\n
" $.ajax({\r\n url: \'");
#line 436 "..\..\Views\Job\JobParts\Resources.cshtml"
#line 438 "..\..\Views\Job\JobParts\Resources.cshtml"
Write(Url.Action(MVC.API.Job.Attachment()));
@@ -1203,13 +1216,13 @@ WriteLiteral("\',\r\n dataType: \'json\',\r\n
"");
#line 442 "..\..\Views\Job\JobParts\Resources.cshtml"
#line 444 "..\..\Views\Job\JobParts\Resources.cshtml"
#line default
#line hidden
#line 442 "..\..\Views\Job\JobParts\Resources.cshtml"
#line 444 "..\..\Views\Job\JobParts\Resources.cshtml"
if (canRemoveAnyAttachments)
{
@@ -1223,7 +1236,7 @@ WriteLiteral("buildAttachment(a, true, quick);");
WriteLiteral("\r\n");
#line 445 "..\..\Views\Job\JobParts\Resources.cshtml"
#line 447 "..\..\Views\Job\JobParts\Resources.cshtml"
}
else if (canRemoveOwnAttachments)
{
@@ -1236,7 +1249,7 @@ WriteLiteral(" ");
WriteLiteral("buildAttachment(a, (a.AuthorId === \'");
#line 448 "..\..\Views\Job\JobParts\Resources.cshtml"
#line 450 "..\..\Views\Job\JobParts\Resources.cshtml"
Write(CurrentUser.Id);
@@ -1247,7 +1260,7 @@ WriteLiteral("\'), quick);");
WriteLiteral("\r\n");
#line 449 "..\..\Views\Job\JobParts\Resources.cshtml"
#line 451 "..\..\Views\Job\JobParts\Resources.cshtml"
}
else
{
@@ -1262,7 +1275,7 @@ WriteLiteral("buildAttachment(a, false, quick);");
WriteLiteral("\r\n");
#line 453 "..\..\Views\Job\JobParts\Resources.cshtml"
#line 455 "..\..\Views\Job\JobParts\Resources.cshtml"
}
@@ -1290,7 +1303,7 @@ WriteLiteral(@" } else {
e.attr('data-attachmentid', a.Id).attr('data-mimetype', a.MimeType).attr('href', '");
#line 473 "..\..\Views\Job\JobParts\Resources.cshtml"
#line 475 "..\..\Views\Job\JobParts\Resources.cshtml"
Write(Url.Action(MVC.API.Job.AttachmentDownload()));
@@ -1299,7 +1312,7 @@ WriteLiteral(@" } else {
WriteLiteral("/\' + a.Id);\r\n e.find(\'.icon img\').attr(\'src\', \'");
#line 474 "..\..\Views\Job\JobParts\Resources.cshtml"
#line 476 "..\..\Views\Job\JobParts\Resources.cshtml"
Write(Url.Action(MVC.API.Job.AttachmentThumbnail()));
@@ -1307,39 +1320,39 @@ WriteLiteral("/\' + a.Id);\r\n e.find(\'.icon img\').attr(\'s
#line hidden
WriteLiteral("/\' + a.Id);\r\n e.find(\'.comments\').text(a.Comments);\r\n " +
" e.find(\'.author\').text(a.Author);\r\n e.find(\'.times" +
"tamp\').text(a.TimestampFuzzy).attr(\'title\', a.TimestampFull);\r\n " +
" if (canRemove)\r\n e.find(\'.remove\').click(removeLocalAt" +
"tachment);\r\n if (!quick)\r\n e.hide();\r\n" +
" $attachmentOutput.append(e);\r\n if (!quick" +
")\r\n e.show(\'slow\');\r\n if (a.MimeType.t" +
"oLowerCase().indexOf(\'image/\') == 0)\r\n e.shadowbox({ gall" +
"ery: \'attachments\', player: \'img\', title: a.Comments });\r\n }\r\n " +
" }\r\n\r\n function removeAttachment(key) {\r\n if (" +
"key.JobId == jobId) {\r\n var $element = $attachmentOutput.find" +
"(\'a[data-attachmentid=\"\' + key.Id + \'\"]\');\r\n if ($element.len" +
"gth > 0) {\r\n $element.hide(300).delay(300).queue(function" +
" () {\r\n if ($element.attr(\'data-mimetype\').toLowerCas" +
"e().indexOf(\'image/\') == 0)\r\n Shadowbox.removeCac" +
"he(this);\r\n $element.remove();\r\n " +
" });\r\n }\r\n }\r\n }\r\n\r\n\r\n\r\n " +
" $attachmentOutput.children(\'a\').each(function () {\r\n $this = $" +
"(this);\r\n if ($this.attr(\'data-mimetype\').toLowerCase().indexOf(\'" +
"image/\') == 0)\r\n $this.shadowbox({ gallery: \'attachments\', pl" +
"ayer: \'img\', title: $this.find(\'.comments\').text() });\r\n });\r\n\r\n " +
" // Add Globally Available Functions\r\n document.DiscoFunctions." +
"liveAddAttachment = addAttachment;\r\n document.DiscoFunctions.liveRemo" +
"veAttachment = removeAttachment;\r\n\r\n //#endregion\r\n });\r\n\r\n\r\n " +
" </script>\r\n");
"tamp\').text(a.TimestampFull).attr(\'title\', a.TimestampFull).livestamp(a.Timestam" +
"pUnixEpoc);\r\n if (canRemove)\r\n e.find(" +
"\'.remove\').click(removeLocalAttachment);\r\n if (!quick)\r\n " +
" e.hide();\r\n $attachmentOutput.append(e);\r\n" +
" if (!quick)\r\n e.show(\'slow\');\r\n " +
" if (a.MimeType.toLowerCase().indexOf(\'image/\') == 0)\r\n " +
" e.shadowbox({ gallery: \'attachments\', player: \'img\', title: a.Commen" +
"ts });\r\n }\r\n }\r\n\r\n function removeAttachmen" +
"t(key) {\r\n if (key.JobId == jobId) {\r\n var $el" +
"ement = $attachmentOutput.find(\'a[data-attachmentid=\"\' + key.Id + \'\"]\');\r\n " +
" if ($element.length > 0) {\r\n $element.hide(" +
"300).delay(300).queue(function () {\r\n if ($element.at" +
"tr(\'data-mimetype\').toLowerCase().indexOf(\'image/\') == 0)\r\n " +
" Shadowbox.removeCache(this);\r\n $element.re" +
"move();\r\n });\r\n }\r\n }\r\n" +
" }\r\n\r\n\r\n\r\n $attachmentOutput.children(\'a\').each(function (" +
") {\r\n $this = $(this);\r\n if ($this.attr(\'data-mime" +
"type\').toLowerCase().indexOf(\'image/\') == 0)\r\n $this.shadowbo" +
"x({ gallery: \'attachments\', player: \'img\', title: $this.find(\'.comments\').text()" +
" });\r\n });\r\n\r\n // Add Globally Available Functions\r\n " +
" document.DiscoFunctions.liveAddAttachment = addAttachment;\r\n do" +
"cument.DiscoFunctions.liveRemoveAttachment = removeAttachment;\r\n\r\n //" +
"#endregion\r\n });\r\n\r\n\r\n </script>\r\n");
#line 520 "..\..\Views\Job\JobParts\Resources.cshtml"
#line 522 "..\..\Views\Job\JobParts\Resources.cshtml"
}
#line default
#line hidden
#line 521 "..\..\Views\Job\JobParts\Resources.cshtml"
#line 523 "..\..\Views\Job\JobParts\Resources.cshtml"
if (canShowLogs && canShowAttachments)
{
@@ -1349,7 +1362,7 @@ WriteLiteral("/\' + a.Id);\r\n e.find(\'.comments\').text(a.C
WriteLiteral(" <script>\r\n $(function () {\r\n var jobId = parseInt(\'");
#line 525 "..\..\Views\Job\JobParts\Resources.cshtml"
#line 527 "..\..\Views\Job\JobParts\Resources.cshtml"
Write(Model.Job.Id);
@@ -1378,7 +1391,7 @@ WriteLiteral("\');\r\n\r\n //#region LiveEvents\r\n functi
" var liveMessagesConnection = $.connection(\'");
#line 558 "..\..\Views\Job\JobParts\Resources.cshtml"
#line 560 "..\..\Views\Job\JobParts\Resources.cshtml"
Write(Url.Content("~/API/Repository/Notifications"));
@@ -1397,7 +1410,7 @@ WriteLiteral(@"', { addToGroups: 'JobLog,JobAttachment' })
");
#line 568 "..\..\Views\Job\JobParts\Resources.cshtml"
#line 570 "..\..\Views\Job\JobParts\Resources.cshtml"
}
else if (canShowLogs)
{
@@ -1408,7 +1421,7 @@ else if (canShowLogs)
WriteLiteral(" <script>\r\n $(function () {\r\n var jobId = parseInt(\'");
#line 573 "..\..\Views\Job\JobParts\Resources.cshtml"
#line 575 "..\..\Views\Job\JobParts\Resources.cshtml"
Write(Model.Job.Id);
@@ -1436,7 +1449,7 @@ WriteLiteral(@"');
var liveMessagesConnection = $.connection('");
#line 592 "..\..\Views\Job\JobParts\Resources.cshtml"
#line 594 "..\..\Views\Job\JobParts\Resources.cshtml"
Write(Url.Content("~/API/Repository/Notifications"));
@@ -1455,7 +1468,7 @@ WriteLiteral(@"', { addToGroups: 'JobLog' })
");
#line 602 "..\..\Views\Job\JobParts\Resources.cshtml"
#line 604 "..\..\Views\Job\JobParts\Resources.cshtml"
}
else if (canShowAttachments)
{
@@ -1466,7 +1479,7 @@ else if (canShowAttachments)
WriteLiteral(" <script>\r\n $(function () {\r\n var jobId = parseInt(\'");
#line 607 "..\..\Views\Job\JobParts\Resources.cshtml"
#line 609 "..\..\Views\Job\JobParts\Resources.cshtml"
Write(Model.Job.Id);
@@ -1492,7 +1505,7 @@ WriteLiteral(@"');
var liveMessagesConnection = $.connection('");
#line 624 "..\..\Views\Job\JobParts\Resources.cshtml"
#line 626 "..\..\Views\Job\JobParts\Resources.cshtml"
Write(Url.Content("~/API/Repository/Notifications"));
@@ -1511,7 +1524,7 @@ WriteLiteral(@"', { addToGroups: 'JobAttachment' })
");
#line 634 "..\..\Views\Job\JobParts\Resources.cshtml"
#line 636 "..\..\Views\Job\JobParts\Resources.cshtml"
}
+3 -3
View File
@@ -202,7 +202,7 @@
{
<div id="Job_Show_Device_Details_HWar">
<div>DEVICE WARRANTY</div>
<div>Until: <span id="Job_Show_Device_Details_HWar_ValidUntil">@Model.Job.Device.DeviceBatch.WarrantyValidUntil.FromNow("Unknown")</span></div>
<div>Until: <span id="Job_Show_Device_Details_HWar_ValidUntil" data-livestamp="@Model.Job.Device.DeviceBatch.WarrantyValidUntil.ToUnixEpoc()">@Model.Job.Device.DeviceBatch.WarrantyValidUntil.ToFullDateTime("Unknown")</span></div>
@if (!string.IsNullOrWhiteSpace(Model.Job.Device.DeviceBatch.WarrantyDetails))
{
<a id="Job_Show_Device_Details_HWar_Details_Button" href="#">Show Details</a>
@@ -232,7 +232,7 @@
<div id="Job_Show_Device_Details_HNWar">
<div>INSURANCE</div>
<div id="Job_Show_Device_Details_HNWar_InsuranceSupplier">@Model.Job.Device.DeviceBatch.InsuranceSupplier</div>
<div>Until: <span id="Job_Show_Device_Details_HNWar_ValidUntil">@Model.Job.Device.DeviceBatch.InsuredUntil.FromNow("Unknown")</span></div>
<div>Until: <span id="Job_Show_Device_Details_HNWar_ValidUntil" data-livestamp="@Model.Job.Device.DeviceBatch.InsuredUntil.ToUnixEpoc()">@Model.Job.Device.DeviceBatch.InsuredUntil.ToFullDateTime("Unknown")</span></div>
@if (!string.IsNullOrWhiteSpace(Model.Job.Device.DeviceBatch.InsuranceDetails))
{
<a id="Job_Show_Device_Details_HNWar_Details_Button" href="#">Show Details</a>
@@ -370,7 +370,7 @@
{
<div id="Job_Show_User_WaitingForUserAction" class="status">
<h4>Awaiting Action</h4>
Since: @Model.Job.WaitingForUserAction.FromNow()
Since: <span data-livestamp="@Model.Job.WaitingForUserAction.ToUnixEpoc()">@Model.Job.WaitingForUserAction.ToFullDateTime()</span>
</div>
}
</div>
@@ -840,11 +840,22 @@ WriteLiteral(">\r\n <div>DEVICE WARRANTY</div>\r\
WriteLiteral(" id=\"Job_Show_Device_Details_HWar_ValidUntil\"");
WriteLiteral(" data-livestamp=\"");
#line 205 "..\..\Views\Job\JobParts\_Subject.cshtml"
Write(Model.Job.Device.DeviceBatch.WarrantyValidUntil.ToUnixEpoc());
#line default
#line hidden
WriteLiteral("\"");
WriteLiteral(">");
#line 205 "..\..\Views\Job\JobParts\_Subject.cshtml"
Write(Model.Job.Device.DeviceBatch.WarrantyValidUntil.FromNow("Unknown"));
Write(Model.Job.Device.DeviceBatch.WarrantyValidUntil.ToFullDateTime("Unknown"));
#line default
@@ -879,17 +890,17 @@ WriteLiteral(" id=\"Job_Show_Device_Details_HWar_Details_Dialog\"");
WriteLiteral(" class=\"dialog\"");
WriteAttribute("title", Tuple.Create(" title=\"", 13905), Tuple.Create("\"", 13970)
, Tuple.Create(Tuple.Create("", 13913), Tuple.Create("Warranty", 13913), true)
, Tuple.Create(Tuple.Create(" ", 13921), Tuple.Create("Details", 13922), true)
, Tuple.Create(Tuple.Create(" ", 13929), Tuple.Create("for", 13930), true)
WriteAttribute("title", Tuple.Create(" title=\"", 13991), Tuple.Create("\"", 14056)
, Tuple.Create(Tuple.Create("", 13999), Tuple.Create("Warranty", 13999), true)
, Tuple.Create(Tuple.Create(" ", 14007), Tuple.Create("Details", 14008), true)
, Tuple.Create(Tuple.Create(" ", 14015), Tuple.Create("for", 14016), true)
#line 209 "..\..\Views\Job\JobParts\_Subject.cshtml"
, Tuple.Create(Tuple.Create(" ", 13933), Tuple.Create<System.Object, System.Int32>(Model.Job.Device.DeviceBatch.Name
, Tuple.Create(Tuple.Create(" ", 14019), Tuple.Create<System.Object, System.Int32>(Model.Job.Device.DeviceBatch.Name
#line default
#line hidden
, 13934), false)
, 14020), false)
);
WriteLiteral(">\r\n <div>");
@@ -964,11 +975,22 @@ WriteLiteral("</div>\r\n <div>Until: <span");
WriteLiteral(" id=\"Job_Show_Device_Details_HNWar_ValidUntil\"");
WriteLiteral(" data-livestamp=\"");
#line 235 "..\..\Views\Job\JobParts\_Subject.cshtml"
Write(Model.Job.Device.DeviceBatch.InsuredUntil.ToUnixEpoc());
#line default
#line hidden
WriteLiteral("\"");
WriteLiteral(">");
#line 235 "..\..\Views\Job\JobParts\_Subject.cshtml"
Write(Model.Job.Device.DeviceBatch.InsuredUntil.FromNow("Unknown"));
Write(Model.Job.Device.DeviceBatch.InsuredUntil.ToFullDateTime("Unknown"));
#line default
@@ -1003,17 +1025,17 @@ WriteLiteral(" id=\"Job_Show_Device_Details_HNWar_Details_Dialog\"");
WriteLiteral(" class=\"dialog\"");
WriteAttribute("title", Tuple.Create(" title=\"", 16153), Tuple.Create("\"", 16219)
, Tuple.Create(Tuple.Create("", 16161), Tuple.Create("Insurance", 16161), true)
, Tuple.Create(Tuple.Create(" ", 16170), Tuple.Create("Details", 16171), true)
, Tuple.Create(Tuple.Create(" ", 16178), Tuple.Create("for", 16179), true)
WriteAttribute("title", Tuple.Create(" title=\"", 16319), Tuple.Create("\"", 16385)
, Tuple.Create(Tuple.Create("", 16327), Tuple.Create("Insurance", 16327), true)
, Tuple.Create(Tuple.Create(" ", 16336), Tuple.Create("Details", 16337), true)
, Tuple.Create(Tuple.Create(" ", 16344), Tuple.Create("for", 16345), true)
#line 239 "..\..\Views\Job\JobParts\_Subject.cshtml"
, Tuple.Create(Tuple.Create(" ", 16182), Tuple.Create<System.Object, System.Int32>(Model.Job.Device.DeviceBatch.Name
, Tuple.Create(Tuple.Create(" ", 16348), Tuple.Create<System.Object, System.Int32>(Model.Job.Device.DeviceBatch.Name
#line default
#line hidden
, 16183), false)
, 16349), false)
);
WriteLiteral(">\r\n <div>");
@@ -1495,15 +1517,15 @@ WriteLiteral(" title=\"Email Address\"");
WriteLiteral(">Email: <a");
WriteAttribute("href", Tuple.Create(" href=\"", 24754), Tuple.Create("\"", 24798)
, Tuple.Create(Tuple.Create("", 24761), Tuple.Create("mailto:", 24761), true)
WriteAttribute("href", Tuple.Create(" href=\"", 24920), Tuple.Create("\"", 24964)
, Tuple.Create(Tuple.Create("", 24927), Tuple.Create("mailto:", 24927), true)
#line 367 "..\..\Views\Job\JobParts\_Subject.cshtml"
, Tuple.Create(Tuple.Create("", 24768), Tuple.Create<System.Object, System.Int32>(Model.Job.User.EmailAddress
, Tuple.Create(Tuple.Create("", 24934), Tuple.Create<System.Object, System.Int32>(Model.Job.User.EmailAddress
#line default
#line hidden
, 24768), false)
, 24934), false)
);
WriteLiteral(">");
@@ -1542,16 +1564,29 @@ WriteLiteral(" id=\"Job_Show_User_WaitingForUserAction\"");
WriteLiteral(" class=\"status\"");
WriteLiteral(">\r\n <h4>Awaiting Action</h4>\r\n " +
" Since: ");
" Since: <span");
WriteLiteral(" data-livestamp=\"");
#line 373 "..\..\Views\Job\JobParts\_Subject.cshtml"
Write(Model.Job.WaitingForUserAction.FromNow());
Write(Model.Job.WaitingForUserAction.ToUnixEpoc());
#line default
#line hidden
WriteLiteral("\r\n </div>\r\n");
WriteLiteral("\"");
WriteLiteral(">");
#line 373 "..\..\Views\Job\JobParts\_Subject.cshtml"
Write(Model.Job.WaitingForUserAction.ToFullDateTime());
#line default
#line hidden
WriteLiteral("</span>\r\n </div>\r\n");
#line 375 "..\..\Views\Job\JobParts\_Subject.cshtml"
@@ -1977,14 +2012,14 @@ WriteLiteral(" type=\"hidden\"");
WriteLiteral(" name=\"JobId\"");
WriteAttribute("value", Tuple.Create(" value=\"", 35345), Tuple.Create("\"", 35366)
WriteAttribute("value", Tuple.Create(" value=\"", 35593), Tuple.Create("\"", 35614)
#line 564 "..\..\Views\Job\JobParts\_Subject.cshtml"
, Tuple.Create(Tuple.Create("", 35353), Tuple.Create<System.Object, System.Int32>(Model.Job.Id
, Tuple.Create(Tuple.Create("", 35601), Tuple.Create<System.Object, System.Int32>(Model.Job.Id
#line default
#line hidden
, 35353), false)
, 35601), false)
);
WriteLiteral(" />\r\n");
@@ -2048,26 +2083,26 @@ WriteLiteral("\"");
WriteLiteral(">\r\n <i");
WriteAttribute("class", Tuple.Create(" class=\"", 35815), Tuple.Create("\"", 35882)
, Tuple.Create(Tuple.Create("", 35823), Tuple.Create("fa", 35823), true)
, Tuple.Create(Tuple.Create(" ", 35825), Tuple.Create("fa-", 35826), true)
WriteAttribute("class", Tuple.Create(" class=\"", 36063), Tuple.Create("\"", 36130)
, Tuple.Create(Tuple.Create("", 36071), Tuple.Create("fa", 36071), true)
, Tuple.Create(Tuple.Create(" ", 36073), Tuple.Create("fa-", 36074), true)
#line 569 "..\..\Views\Job\JobParts\_Subject.cshtml"
, Tuple.Create(Tuple.Create("", 35829), Tuple.Create<System.Object, System.Int32>(jobQueue.Icon
, Tuple.Create(Tuple.Create("", 36077), Tuple.Create<System.Object, System.Int32>(jobQueue.Icon
#line default
#line hidden
, 35829), false)
, Tuple.Create(Tuple.Create(" ", 35845), Tuple.Create("fa-fw", 35846), true)
, Tuple.Create(Tuple.Create(" ", 35851), Tuple.Create("fa-lg", 35852), true)
, Tuple.Create(Tuple.Create(" ", 35857), Tuple.Create("d-", 35858), true)
, 36077), false)
, Tuple.Create(Tuple.Create(" ", 36093), Tuple.Create("fa-fw", 36094), true)
, Tuple.Create(Tuple.Create(" ", 36099), Tuple.Create("fa-lg", 36100), true)
, Tuple.Create(Tuple.Create(" ", 36105), Tuple.Create("d-", 36106), true)
#line 569 "..\..\Views\Job\JobParts\_Subject.cshtml"
, Tuple.Create(Tuple.Create("", 35860), Tuple.Create<System.Object, System.Int32>(jobQueue.IconColour
, Tuple.Create(Tuple.Create("", 36108), Tuple.Create<System.Object, System.Int32>(jobQueue.IconColour
#line default
#line hidden
, 35860), false)
, 36108), false)
);
WriteLiteral("></i>");
@@ -2108,27 +2143,27 @@ WriteLiteral(" ");
#line hidden
WriteLiteral(" <i");
WriteAttribute("class", Tuple.Create(" class=\"", 36196), Tuple.Create("\"", 36244)
, Tuple.Create(Tuple.Create("", 36204), Tuple.Create("fa", 36204), true)
, Tuple.Create(Tuple.Create(" ", 36206), Tuple.Create("d-priority-", 36207), true)
WriteAttribute("class", Tuple.Create(" class=\"", 36444), Tuple.Create("\"", 36492)
, Tuple.Create(Tuple.Create("", 36452), Tuple.Create("fa", 36452), true)
, Tuple.Create(Tuple.Create(" ", 36454), Tuple.Create("d-priority-", 36455), true)
#line 576 "..\..\Views\Job\JobParts\_Subject.cshtml"
, Tuple.Create(Tuple.Create("", 36218), Tuple.Create<System.Object, System.Int32>(priorityValue.ToLower()
, Tuple.Create(Tuple.Create("", 36466), Tuple.Create<System.Object, System.Int32>(priorityValue.ToLower()
#line default
#line hidden
, 36218), false)
, 36466), false)
);
WriteAttribute("title", Tuple.Create(" title=\"", 36245), Tuple.Create("\"", 36278)
WriteAttribute("title", Tuple.Create(" title=\"", 36493), Tuple.Create("\"", 36526)
#line 576 "..\..\Views\Job\JobParts\_Subject.cshtml"
, Tuple.Create(Tuple.Create("", 36253), Tuple.Create<System.Object, System.Int32>(priorityValue
, Tuple.Create(Tuple.Create("", 36501), Tuple.Create<System.Object, System.Int32>(priorityValue
#line default
#line hidden
, 36253), false)
, Tuple.Create(Tuple.Create(" ", 36269), Tuple.Create("Priority", 36270), true)
, 36501), false)
, Tuple.Create(Tuple.Create(" ", 36517), Tuple.Create("Priority", 36518), true)
);
WriteLiteral("></i>\r\n </div>\r\n <div>\r\n " +
@@ -32,7 +32,7 @@
else
{ @ua.Comments }}
</span><span class="author">@ua.TechUser.ToString()</span>@if (canRemoveAnyAttachments || (canRemoveOwnAttachments && ua.TechUserId == CurrentUser.Id))
{<text><span class="remove fa fa-times-circle"></span></text>}<span class="timestamp" title="@ua.Timestamp.ToFullDateTime()">@ua.Timestamp.FromNow()</span>
{<text><span class="remove fa fa-times-circle"></span></text>}<span class="timestamp" data-livestamp="@(ua.Timestamp.ToUnixEpoc())" title="@ua.Timestamp.ToFullDateTime()">@ua.Timestamp.ToFullDateTime()</span>
</a>
}
}
@@ -149,7 +149,7 @@
e.find('.icon img').attr('src', '@(Url.Action(MVC.API.User.AttachmentThumbnail()))/' + a.Id);
e.find('.comments').text(a.Comments);
e.find('.author').text(a.Author);
e.find('.timestamp').text(a.TimestampFuzzy).attr('title', a.TimestampFull);
e.find('.timestamp').text(a.TimestampFull).attr('title', a.TimestampFull).livestamp(a.TimestampUnixEpoc);
if (canRemove)
e.find('.remove').click(removeAttachment);
if (!quick)
@@ -196,6 +196,7 @@
var $this = $(this);
if ($this.attr('data-mimetype').toLowerCase().indexOf('image/') == 0)
Shadowbox.removeCache(this);
$this.find('.timestamp').livestamp('destroy');
$this.remove();
});
} else {
@@ -29,6 +29,7 @@ namespace Disco.Web.Views.User.UserParts
using Disco;
using Disco.BI.Extensions;
using Disco.Models.Repository;
using Disco.Services;
using Disco.Services.Authorization;
using Disco.Services.Web;
using Disco.Web;
@@ -266,21 +267,32 @@ WriteLiteral("<span");
WriteLiteral(" class=\"timestamp\"");
WriteAttribute("title", Tuple.Create(" title=\"", 2114), Tuple.Create("\"", 2152)
WriteLiteral(" data-livestamp=\"");
#line 35 "..\..\Views\User\UserParts\_Resources.cshtml"
, Tuple.Create(Tuple.Create("", 2122), Tuple.Create<System.Object, System.Int32>(ua.Timestamp.ToFullDateTime()
Write(ua.Timestamp.ToUnixEpoc());
#line default
#line hidden
, 2122), false)
WriteLiteral("\"");
WriteAttribute("title", Tuple.Create(" title=\"", 2160), Tuple.Create("\"", 2198)
#line 35 "..\..\Views\User\UserParts\_Resources.cshtml"
, Tuple.Create(Tuple.Create("", 2168), Tuple.Create<System.Object, System.Int32>(ua.Timestamp.ToFullDateTime()
#line default
#line hidden
, 2168), false)
);
WriteLiteral(">");
#line 35 "..\..\Views\User\UserParts\_Resources.cshtml"
Write(ua.Timestamp.FromNow());
Write(ua.Timestamp.ToFullDateTime());
#line default
@@ -580,7 +592,7 @@ WriteLiteral("/\' + a.Id);\r\n e.find(\'.icon img\').
WriteLiteral(@"/' + a.Id);
e.find('.comments').text(a.Comments);
e.find('.author').text(a.Author);
e.find('.timestamp').text(a.TimestampFuzzy).attr('title', a.TimestampFull);
e.find('.timestamp').text(a.TimestampFull).attr('title', a.TimestampFull).livestamp(a.TimestampUnixEpoc);
if (canRemove)
e.find('.remove').click(removeAttachment);
if (!quick)
@@ -651,25 +663,26 @@ WriteLiteral("\',\r\n dataType: \'json\',
"= $(this);\r\n if ($this.attr(\'" +
"data-mimetype\').toLowerCase().indexOf(\'image/\') == 0)\r\n " +
" Shadowbox.removeCache(this);\r\n " +
" $this.remove();\r\n " +
" });\r\n } else {\r\n " +
" alert(\'Unable to remove attachment:" +
" \' + d);\r\n }\r\n " +
" $dialogRemoveAttachment.dialog(\"close\");\r\n " +
" },\r\n error: functi" +
"on (jqXHR, textStatus, errorThrown) {\r\n " +
" alert(\'Unable to remove attachment: \' + textStatus);\r\n " +
" $dialogRemoveAttachment.dialog(\"close\");\r\n " +
" }\r\n });\r\n " +
" },\r\n Cancel: function () {\r\n " +
" $dialogRemoveAttachment.dialog(\"close\");\r\n " +
" }\r\n });\r\n\r\n " +
" $dialogRemoveAttachment.dialog(\'open\');\r\n\r\n " +
" return false;\r\n }\r\n\r\n //#endr" +
"egion\r\n ");
" $this.find(\'.timestamp\').livestamp(\'destroy\');\r" +
"\n $this.remove();\r\n " +
" });\r\n " +
" } else {\r\n alert(\'Unable t" +
"o remove attachment: \' + d);\r\n }\r\n " +
" $dialogRemoveAttachment.dialog(\"close\")" +
";\r\n },\r\n " +
" error: function (jqXHR, textStatus, errorThrown) {\r\n " +
" alert(\'Unable to remove attachment: \' + textStatus);\r\n " +
" $dialogRemoveAttachment.dialog(\"close\")" +
";\r\n }\r\n " +
" });\r\n },\r\n Cance" +
"l: function () {\r\n $dialogRemoveAttachment.di" +
"alog(\"close\");\r\n }\r\n }" +
");\r\n\r\n $dialogRemoveAttachment.dialog(\'open\');\r\n\r\n " +
" return false;\r\n }\r\n\r\n " +
" //#endregion\r\n ");
#line 223 "..\..\Views\User\UserParts\_Resources.cshtml"
#line 224 "..\..\Views\User\UserParts\_Resources.cshtml"
}
@@ -689,13 +702,13 @@ WriteLiteral(@"
");
#line 235 "..\..\Views\User\UserParts\_Resources.cshtml"
#line 236 "..\..\Views\User\UserParts\_Resources.cshtml"
#line default
#line hidden
#line 235 "..\..\Views\User\UserParts\_Resources.cshtml"
#line 236 "..\..\Views\User\UserParts\_Resources.cshtml"
if (canAddAttachments)
{
@@ -715,7 +728,7 @@ WriteLiteral(" id=\"silverlightHostUploadAttachment\"");
WriteLiteral(">\r\n </div>\r\n </div>\r\n");
#line 241 "..\..\Views\User\UserParts\_Resources.cshtml"
#line 242 "..\..\Views\User\UserParts\_Resources.cshtml"
}
@@ -724,7 +737,7 @@ WriteLiteral(">\r\n </div>\r\n </div>\r\n");
WriteLiteral(" ");
#line 242 "..\..\Views\User\UserParts\_Resources.cshtml"
#line 243 "..\..\Views\User\UserParts\_Resources.cshtml"
if (canRemoveAnyAttachments || canRemoveOwnAttachments)
{
@@ -744,7 +757,7 @@ WriteLiteral(" class=\"fa fa-exclamation-triangle fa-lg\"");
WriteLiteral("></i>&nbsp;Are you sure?\r\n </p>\r\n </div>\r\n");
#line 249 "..\..\Views\User\UserParts\_Resources.cshtml"
#line 250 "..\..\Views\User\UserParts\_Resources.cshtml"
}
@@ -754,7 +767,7 @@ WriteLiteral(" <script>\r\n $(\'#UserDetailTabItems\').append(\'<li><a
"b-Resources\" id=\"UserDetailTab-ResourcesLink\">Attachments [");
#line 251 "..\..\Views\User\UserParts\_Resources.cshtml"
#line 252 "..\..\Views\User\UserParts\_Resources.cshtml"
Write(Model.User.UserAttachments == null ? 0 : Model.User.UserAttachments.Count);