qol: make attachment comments optional
This commit is contained in:
@@ -127,30 +127,20 @@ namespace Disco.BI.Extensions
|
|||||||
public static void Delete(this DocumentTemplate dt, DiscoDataContext Database)
|
public static void Delete(this DocumentTemplate dt, DiscoDataContext Database)
|
||||||
{
|
{
|
||||||
// Find & Rename all references
|
// Find & Rename all references
|
||||||
foreach (DeviceAttachment a in Database.DeviceAttachments.Where(a => a.DocumentTemplateId == dt.Id))
|
void updateAttachment(IAttachment a)
|
||||||
{
|
{
|
||||||
a.Comments = string.Format("{0} - {1}", dt.Description, a.Comments);
|
var comments = $"{dt.Description} - {a.Comments}";
|
||||||
if (a.Comments.Length > 500)
|
if (comments.Length > 500)
|
||||||
a.Comments = a.Comments.Substring(0, 500);
|
comments = comments.Substring(0, 500);
|
||||||
|
a.Comments = comments;
|
||||||
a.DocumentTemplateId = null;
|
a.DocumentTemplateId = null;
|
||||||
a.DocumentTemplate = null;
|
|
||||||
}
|
|
||||||
foreach (JobAttachment a in Database.JobAttachments.Where(a => a.DocumentTemplateId == dt.Id))
|
|
||||||
{
|
|
||||||
a.Comments = string.Format("{0} - {1}", dt.Description, a.Comments);
|
|
||||||
if (a.Comments.Length > 500)
|
|
||||||
a.Comments = a.Comments.Substring(0, 500);
|
|
||||||
a.DocumentTemplateId = null;
|
|
||||||
a.DocumentTemplate = null;
|
|
||||||
}
|
}
|
||||||
|
foreach (var a in Database.DeviceAttachments.Where(a => a.DocumentTemplateId == dt.Id))
|
||||||
|
updateAttachment(a);
|
||||||
|
foreach (var a in Database.JobAttachments.Where(a => a.DocumentTemplateId == dt.Id))
|
||||||
|
updateAttachment(a);
|
||||||
foreach (UserAttachment a in Database.UserAttachments.Where(a => a.DocumentTemplateId == dt.Id))
|
foreach (UserAttachment a in Database.UserAttachments.Where(a => a.DocumentTemplateId == dt.Id))
|
||||||
{
|
updateAttachment(a);
|
||||||
a.Comments = string.Format("{0} - {1}", dt.Description, a.Comments);
|
|
||||||
if (a.Comments.Length > 500)
|
|
||||||
a.Comments = a.Comments.Substring(0, 500);
|
|
||||||
a.DocumentTemplateId = null;
|
|
||||||
a.DocumentTemplate = null;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Remove Linked Group
|
// Remove Linked Group
|
||||||
ActiveDirectory.Context.ManagedGroups.Remove(DocumentTemplateDevicesManagedGroup.GetKey(dt));
|
ActiveDirectory.Context.ManagedGroups.Remove(DocumentTemplateDevicesManagedGroup.GetKey(dt));
|
||||||
@@ -161,8 +151,8 @@ namespace Disco.BI.Extensions
|
|||||||
|
|
||||||
// Delete Template
|
// Delete Template
|
||||||
string templateRepositoryFilename = dt.RepositoryFilename(Database);
|
string templateRepositoryFilename = dt.RepositoryFilename(Database);
|
||||||
if (System.IO.File.Exists(templateRepositoryFilename))
|
if (File.Exists(templateRepositoryFilename))
|
||||||
System.IO.File.Delete(templateRepositoryFilename);
|
File.Delete(templateRepositoryFilename);
|
||||||
|
|
||||||
// Remove from Cache
|
// Remove from Cache
|
||||||
dt.FilterExpressionInvalidateCache();
|
dt.FilterExpressionInvalidateCache();
|
||||||
|
|||||||
@@ -183,6 +183,10 @@
|
|||||||
<Compile Include="Migrations\202403030134280_DBv24.Designer.cs">
|
<Compile Include="Migrations\202403030134280_DBv24.Designer.cs">
|
||||||
<DependentUpon>202403030134280_DBv24.cs</DependentUpon>
|
<DependentUpon>202403030134280_DBv24.cs</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
<Compile Include="Migrations\202412180604170_DBv25.cs" />
|
||||||
|
<Compile Include="Migrations\202412180604170_DBv25.Designer.cs">
|
||||||
|
<DependentUpon>202412180604170_DBv25.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
<Compile Include="Migrations\Configuration.cs" />
|
<Compile Include="Migrations\Configuration.cs" />
|
||||||
<Compile Include="Migrations\DiscoDataMigrator.cs" />
|
<Compile Include="Migrations\DiscoDataMigrator.cs" />
|
||||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||||
@@ -270,6 +274,9 @@
|
|||||||
<EmbeddedResource Include="Migrations\202403030134280_DBv24.resx">
|
<EmbeddedResource Include="Migrations\202403030134280_DBv24.resx">
|
||||||
<DependentUpon>202403030134280_DBv24.cs</DependentUpon>
|
<DependentUpon>202403030134280_DBv24.cs</DependentUpon>
|
||||||
</EmbeddedResource>
|
</EmbeddedResource>
|
||||||
|
<EmbeddedResource Include="Migrations\202412180604170_DBv25.resx">
|
||||||
|
<DependentUpon>202412180604170_DBv25.cs</DependentUpon>
|
||||||
|
</EmbeddedResource>
|
||||||
<EmbeddedResource Include="Properties\Resources.resx">
|
<EmbeddedResource Include="Properties\Resources.resx">
|
||||||
<Generator>ResXFileCodeGenerator</Generator>
|
<Generator>ResXFileCodeGenerator</Generator>
|
||||||
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
||||||
|
|||||||
@@ -0,0 +1,27 @@
|
|||||||
|
// <auto-generated />
|
||||||
|
namespace Disco.Data.Migrations
|
||||||
|
{
|
||||||
|
using System.Data.Entity.Migrations;
|
||||||
|
using System.Data.Entity.Migrations.Infrastructure;
|
||||||
|
using System.Resources;
|
||||||
|
|
||||||
|
public sealed partial class DBv25 : IMigrationMetadata
|
||||||
|
{
|
||||||
|
private readonly ResourceManager Resources = new ResourceManager(typeof(DBv25));
|
||||||
|
|
||||||
|
string IMigrationMetadata.Id
|
||||||
|
{
|
||||||
|
get { return "202412180604170_DBv25"; }
|
||||||
|
}
|
||||||
|
|
||||||
|
string IMigrationMetadata.Source
|
||||||
|
{
|
||||||
|
get { return null; }
|
||||||
|
}
|
||||||
|
|
||||||
|
string IMigrationMetadata.Target
|
||||||
|
{
|
||||||
|
get { return Resources.GetString("Target"); }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
namespace Disco.Data.Migrations
|
||||||
|
{
|
||||||
|
using System;
|
||||||
|
using System.Data.Entity.Migrations;
|
||||||
|
|
||||||
|
public partial class DBv25 : DbMigration
|
||||||
|
{
|
||||||
|
public override void Up()
|
||||||
|
{
|
||||||
|
AlterColumn("dbo.UserAttachments", "Comments", c => c.String(maxLength: 500));
|
||||||
|
AlterColumn("dbo.JobAttachments", "Comments", c => c.String(maxLength: 500));
|
||||||
|
AlterColumn("dbo.DeviceAttachments", "Comments", c => c.String(maxLength: 500));
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void Down()
|
||||||
|
{
|
||||||
|
AlterColumn("dbo.DeviceAttachments", "Comments", c => c.String(nullable: false, maxLength: 500));
|
||||||
|
AlterColumn("dbo.JobAttachments", "Comments", c => c.String(nullable: false, maxLength: 500));
|
||||||
|
AlterColumn("dbo.UserAttachments", "Comments", c => c.String(nullable: false, maxLength: 500));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
File diff suppressed because one or more lines are too long
@@ -16,7 +16,7 @@ namespace Disco.Models.Repository
|
|||||||
[Required, StringLength(500)]
|
[Required, StringLength(500)]
|
||||||
public string MimeType { get; set; }
|
public string MimeType { get; set; }
|
||||||
public DateTime Timestamp { get; set; }
|
public DateTime Timestamp { get; set; }
|
||||||
[Required, StringLength(500)]
|
[StringLength(500)]
|
||||||
public string Comments { get; set; }
|
public string Comments { get; set; }
|
||||||
|
|
||||||
public string DocumentTemplateId { get; set; }
|
public string DocumentTemplateId { get; set; }
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ namespace Disco.Models.Repository
|
|||||||
[Required, StringLength(500)]
|
[Required, StringLength(500)]
|
||||||
public string MimeType { get; set; }
|
public string MimeType { get; set; }
|
||||||
public DateTime Timestamp { get; set; }
|
public DateTime Timestamp { get; set; }
|
||||||
[StringLength(500), Required]
|
[StringLength(500)]
|
||||||
public string Comments { get; set; }
|
public string Comments { get; set; }
|
||||||
|
|
||||||
public string DocumentTemplateId { get; set; }
|
public string DocumentTemplateId { get; set; }
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ namespace Disco.Models.Repository
|
|||||||
[StringLength(500), Required]
|
[StringLength(500), Required]
|
||||||
public string MimeType { get; set; }
|
public string MimeType { get; set; }
|
||||||
public DateTime Timestamp { get; set; }
|
public DateTime Timestamp { get; set; }
|
||||||
[Required, StringLength(500)]
|
[StringLength(500)]
|
||||||
public string Comments { get; set; }
|
public string Comments { get; set; }
|
||||||
|
|
||||||
public string DocumentTemplateId { get; set; }
|
public string DocumentTemplateId { get; set; }
|
||||||
|
|||||||
@@ -512,8 +512,8 @@ namespace Disco.Web.Areas.API.Controllers
|
|||||||
return HttpNotFound("Invalid Attachment Number");
|
return HttpNotFound("Invalid Attachment Number");
|
||||||
}
|
}
|
||||||
|
|
||||||
[DiscoAuthorize(Claims.Device.Actions.AddAttachments)]
|
[DiscoAuthorize(Claims.Device.Actions.AddAttachments), ValidateAntiForgeryToken]
|
||||||
public virtual ActionResult AttachmentUpload(string id, string Comments)
|
public virtual ActionResult AttachmentUpload(string id, string comments)
|
||||||
{
|
{
|
||||||
var d = Database.Devices.Find(id);
|
var d = Database.Devices.Find(id);
|
||||||
if (d != null)
|
if (d != null)
|
||||||
@@ -527,6 +527,9 @@ namespace Disco.Web.Areas.API.Controllers
|
|||||||
if (string.IsNullOrEmpty(contentType) || contentType.Equals("unknown/unknown", StringComparison.OrdinalIgnoreCase))
|
if (string.IsNullOrEmpty(contentType) || contentType.Equals("unknown/unknown", StringComparison.OrdinalIgnoreCase))
|
||||||
contentType = MimeTypes.ResolveMimeType(file.FileName);
|
contentType = MimeTypes.ResolveMimeType(file.FileName);
|
||||||
|
|
||||||
|
if (string.IsNullOrWhiteSpace(comments))
|
||||||
|
comments = null;
|
||||||
|
|
||||||
var da = new DeviceAttachment()
|
var da = new DeviceAttachment()
|
||||||
{
|
{
|
||||||
DeviceSerialNumber = d.SerialNumber,
|
DeviceSerialNumber = d.SerialNumber,
|
||||||
@@ -534,7 +537,7 @@ namespace Disco.Web.Areas.API.Controllers
|
|||||||
Filename = file.FileName,
|
Filename = file.FileName,
|
||||||
MimeType = contentType,
|
MimeType = contentType,
|
||||||
Timestamp = DateTime.Now,
|
Timestamp = DateTime.Now,
|
||||||
Comments = Comments
|
Comments = comments
|
||||||
};
|
};
|
||||||
Database.DeviceAttachments.Add(da);
|
Database.DeviceAttachments.Add(da);
|
||||||
Database.SaveChanges();
|
Database.SaveChanges();
|
||||||
@@ -554,10 +557,12 @@ namespace Disco.Web.Areas.API.Controllers
|
|||||||
[DiscoAuthorize(Claims.Device.ShowAttachments)]
|
[DiscoAuthorize(Claims.Device.ShowAttachments)]
|
||||||
public virtual ActionResult Attachment(int id)
|
public virtual ActionResult Attachment(int id)
|
||||||
{
|
{
|
||||||
var da = Database.DeviceAttachments.Include("DocumentTemplate").Include("TechUser").Where(m => m.Id == id).FirstOrDefault();
|
var da = Database.DeviceAttachments
|
||||||
|
.Include(a => a.DocumentTemplate)
|
||||||
|
.Include(a => a.TechUser)
|
||||||
|
.Where(m => m.Id == id).FirstOrDefault();
|
||||||
if (da != null)
|
if (da != null)
|
||||||
{
|
{
|
||||||
|
|
||||||
var m = new Models.Attachment.AttachmentModel()
|
var m = new Models.Attachment.AttachmentModel()
|
||||||
{
|
{
|
||||||
Attachment = Models.Attachment._AttachmentModel.FromAttachment(da),
|
Attachment = Models.Attachment._AttachmentModel.FromAttachment(da),
|
||||||
|
|||||||
@@ -1919,8 +1919,8 @@ namespace Disco.Web.Areas.API.Controllers
|
|||||||
return HttpNotFound("Invalid Attachment Number");
|
return HttpNotFound("Invalid Attachment Number");
|
||||||
}
|
}
|
||||||
|
|
||||||
[DiscoAuthorize(Claims.Job.Actions.AddAttachments)]
|
[DiscoAuthorize(Claims.Job.Actions.AddAttachments), ValidateAntiForgeryToken]
|
||||||
public virtual ActionResult AttachmentUpload(int id, string Comments)
|
public virtual ActionResult AttachmentUpload(int id, string comments)
|
||||||
{
|
{
|
||||||
var j = Database.Jobs.Find(id);
|
var j = Database.Jobs.Find(id);
|
||||||
if (j != null)
|
if (j != null)
|
||||||
@@ -1934,6 +1934,9 @@ namespace Disco.Web.Areas.API.Controllers
|
|||||||
if (string.IsNullOrEmpty(contentType) || contentType.Equals("unknown/unknown", StringComparison.OrdinalIgnoreCase))
|
if (string.IsNullOrEmpty(contentType) || contentType.Equals("unknown/unknown", StringComparison.OrdinalIgnoreCase))
|
||||||
contentType = MimeTypes.ResolveMimeType(file.FileName);
|
contentType = MimeTypes.ResolveMimeType(file.FileName);
|
||||||
|
|
||||||
|
if (string.IsNullOrWhiteSpace(comments))
|
||||||
|
comments = null;
|
||||||
|
|
||||||
var ja = new JobAttachment()
|
var ja = new JobAttachment()
|
||||||
{
|
{
|
||||||
JobId = j.Id,
|
JobId = j.Id,
|
||||||
@@ -1941,7 +1944,7 @@ namespace Disco.Web.Areas.API.Controllers
|
|||||||
Filename = file.FileName,
|
Filename = file.FileName,
|
||||||
MimeType = contentType,
|
MimeType = contentType,
|
||||||
Timestamp = DateTime.Now,
|
Timestamp = DateTime.Now,
|
||||||
Comments = Comments
|
Comments = comments
|
||||||
};
|
};
|
||||||
Database.JobAttachments.Add(ja);
|
Database.JobAttachments.Add(ja);
|
||||||
Database.SaveChanges();
|
Database.SaveChanges();
|
||||||
@@ -1961,10 +1964,12 @@ namespace Disco.Web.Areas.API.Controllers
|
|||||||
[DiscoAuthorize(Claims.Job.ShowAttachments)]
|
[DiscoAuthorize(Claims.Job.ShowAttachments)]
|
||||||
public virtual ActionResult Attachment(int id)
|
public virtual ActionResult Attachment(int id)
|
||||||
{
|
{
|
||||||
var ja = Database.JobAttachments.Include("DocumentTemplate").Include("TechUser").Where(m => m.Id == id).FirstOrDefault();
|
var ja = Database.JobAttachments
|
||||||
|
.Include(a => a.DocumentTemplate)
|
||||||
|
.Include(a => a.TechUser)
|
||||||
|
.Where(m => m.Id == id).FirstOrDefault();
|
||||||
if (ja != null)
|
if (ja != null)
|
||||||
{
|
{
|
||||||
|
|
||||||
var m = new Models.Attachment.AttachmentModel()
|
var m = new Models.Attachment.AttachmentModel()
|
||||||
{
|
{
|
||||||
Attachment = Models.Attachment._AttachmentModel.FromAttachment(ja),
|
Attachment = Models.Attachment._AttachmentModel.FromAttachment(ja),
|
||||||
|
|||||||
@@ -56,8 +56,8 @@ namespace Disco.Web.Areas.API.Controllers
|
|||||||
return HttpNotFound("Invalid Attachment Number");
|
return HttpNotFound("Invalid Attachment Number");
|
||||||
}
|
}
|
||||||
|
|
||||||
[DiscoAuthorize(Claims.User.Actions.AddAttachments)]
|
[DiscoAuthorize(Claims.User.Actions.AddAttachments), ValidateAntiForgeryToken]
|
||||||
public virtual ActionResult AttachmentUpload(string id, string Domain, string Comments)
|
public virtual ActionResult AttachmentUpload(string id, string Domain, string comments)
|
||||||
{
|
{
|
||||||
id = ActiveDirectory.ParseDomainAccountId(id, Domain);
|
id = ActiveDirectory.ParseDomainAccountId(id, Domain);
|
||||||
|
|
||||||
@@ -73,6 +73,9 @@ namespace Disco.Web.Areas.API.Controllers
|
|||||||
if (string.IsNullOrEmpty(contentType) || contentType.Equals("unknown/unknown", StringComparison.OrdinalIgnoreCase))
|
if (string.IsNullOrEmpty(contentType) || contentType.Equals("unknown/unknown", StringComparison.OrdinalIgnoreCase))
|
||||||
contentType = MimeTypes.ResolveMimeType(file.FileName);
|
contentType = MimeTypes.ResolveMimeType(file.FileName);
|
||||||
|
|
||||||
|
if (string.IsNullOrWhiteSpace(comments))
|
||||||
|
comments = null;
|
||||||
|
|
||||||
var ua = new Disco.Models.Repository.UserAttachment()
|
var ua = new Disco.Models.Repository.UserAttachment()
|
||||||
{
|
{
|
||||||
UserId = u.UserId,
|
UserId = u.UserId,
|
||||||
@@ -80,7 +83,7 @@ namespace Disco.Web.Areas.API.Controllers
|
|||||||
Filename = file.FileName,
|
Filename = file.FileName,
|
||||||
MimeType = contentType,
|
MimeType = contentType,
|
||||||
Timestamp = DateTime.Now,
|
Timestamp = DateTime.Now,
|
||||||
Comments = Comments
|
Comments = comments
|
||||||
};
|
};
|
||||||
Database.UserAttachments.Add(ua);
|
Database.UserAttachments.Add(ua);
|
||||||
Database.SaveChanges();
|
Database.SaveChanges();
|
||||||
@@ -100,7 +103,10 @@ namespace Disco.Web.Areas.API.Controllers
|
|||||||
[DiscoAuthorize(Claims.User.ShowAttachments)]
|
[DiscoAuthorize(Claims.User.ShowAttachments)]
|
||||||
public virtual ActionResult Attachment(int id)
|
public virtual ActionResult Attachment(int id)
|
||||||
{
|
{
|
||||||
var ua = Database.UserAttachments.Include("DocumentTemplate").Include("TechUser").Where(m => m.Id == id).FirstOrDefault();
|
var ua = Database.UserAttachments
|
||||||
|
.Include(a => a.DocumentTemplate)
|
||||||
|
.Include(a => a.TechUser)
|
||||||
|
.Where(m => m.Id == id).FirstOrDefault();
|
||||||
if (ua != null)
|
if (ua != null)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ namespace Disco.Web.Areas.API.Models.Attachment
|
|||||||
if (DocumentTemplateId != null && DocumentTemplateDescription != null)
|
if (DocumentTemplateId != null && DocumentTemplateDescription != null)
|
||||||
return DocumentTemplateDescription;
|
return DocumentTemplateDescription;
|
||||||
else
|
else
|
||||||
return Comments;
|
return Comments ?? Filename;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public string Filename { get; set; }
|
public string Filename { get; set; }
|
||||||
|
|||||||
@@ -1,12 +1,13 @@
|
|||||||
(function (window, document, $) {
|
(function (window, document, $) {
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
var attachmentUploader = function (uploadUrl, dropTarget, uploadProgressContainer) {
|
var attachmentUploader = function ($host) {
|
||||||
var self = this;
|
var self = this;
|
||||||
|
|
||||||
self.uploadUrl = uploadUrl;
|
self.$host = $host;
|
||||||
self.dropTarget = dropTarget;
|
self.uploadUrl = $host.attr('data-uploadurl');
|
||||||
self.uploadProgressContainer = uploadProgressContainer;
|
self.dropTarget = $host.find('.Disco-AttachmentUpload-DropTarget');
|
||||||
|
self.uploadProgressContainer = $host.find('.Disco-AttachmentUpload-Progress');
|
||||||
|
|
||||||
// #region File Selection Support
|
// #region File Selection Support
|
||||||
self._uploadFilesInput = null;
|
self._uploadFilesInput = null;
|
||||||
@@ -168,7 +169,7 @@
|
|||||||
title: 'Upload File',
|
title: 'Upload File',
|
||||||
'class': 'dialog Disco-AttachmentUpload-CommentDialog'
|
'class': 'dialog Disco-AttachmentUpload-CommentDialog'
|
||||||
});
|
});
|
||||||
dialog.html('<table><tr><th>File Name:</th><td class="filename"></td></tr><tr><th>Comments:</th><td><input class="comments" type="text"></input></td></tr><tr><td class="thumbnail" colspan="2"><img /></td></tr></table>');
|
dialog.html('<table><tr><th>File Name:</th><td class="filename"></td></tr><tr><th>Comments:</th><td><input class="comments" type="text" placeholder="optional" /></td></tr><tr><td class="thumbnail" colspan="2"><img /></td></tr></table>');
|
||||||
|
|
||||||
if (!!thumbnailHandler) {
|
if (!!thumbnailHandler) {
|
||||||
var td = dialog.find('td.thumbnail');
|
var td = dialog.find('td.thumbnail');
|
||||||
@@ -181,10 +182,8 @@
|
|||||||
var comments = dialog.find('input.comments')
|
var comments = dialog.find('input.comments')
|
||||||
.keypress(function (e) {
|
.keypress(function (e) {
|
||||||
if (e.which === 13) {
|
if (e.which === 13) {
|
||||||
if (!!comments.val()) {
|
result = true;
|
||||||
result = true;
|
dialog.dialog("close");
|
||||||
dialog.dialog("close");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -195,15 +194,11 @@
|
|||||||
autoOpen: true,
|
autoOpen: true,
|
||||||
buttons: {
|
buttons: {
|
||||||
"Upload": function () {
|
"Upload": function () {
|
||||||
if (!!comments.val()) {
|
result = true;
|
||||||
result = true;
|
dialog.dialog("close");
|
||||||
dialog.dialog("close");
|
window.setTimeout(function () {
|
||||||
window.setTimeout(function () {
|
comments.focus();
|
||||||
comments.focus();
|
}, 1);
|
||||||
}, 1);
|
|
||||||
} else {
|
|
||||||
alert('Please provide a comment for this attachment.');
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
Cancel: function () {
|
Cancel: function () {
|
||||||
dialog.dialog("close");
|
dialog.dialog("close");
|
||||||
@@ -262,29 +257,33 @@
|
|||||||
processNextFile();
|
processNextFile();
|
||||||
};
|
};
|
||||||
|
|
||||||
self._uploadFile = function (fileData, fileName, comments) {
|
self._uploadFile = async function (fileData, fileName, comments) {
|
||||||
var formData = new FormData();
|
const formData = new FormData();
|
||||||
var xhr = new XMLHttpRequest();
|
|
||||||
var progress = $('<div>')
|
const progress = $('<div>')
|
||||||
.append($('<i>').addClass('fa fa-cog fa-spin'))
|
.append($('<i>').addClass('fa fa-cog fa-spin'))
|
||||||
.append($('<span>').text('Uploading: ' + fileName))
|
.append($('<span>').text('Uploading: ' + fileName))
|
||||||
.appendTo(self.uploadProgressContainer);
|
.appendTo(self.uploadProgressContainer);
|
||||||
|
|
||||||
formData.append('Comments', comments);
|
formData.append('__RequestVerificationToken', self.$host.find('input[name="__RequestVerificationToken"]').val());
|
||||||
formData.append('File', fileData, fileName);
|
formData.append('comments', comments);
|
||||||
|
formData.append('file', fileData, fileName);
|
||||||
|
|
||||||
xhr.open("POST", self.uploadUrl, true);
|
const result = await fetch(self.uploadUrl, {
|
||||||
xhr.onreadystatechange = function () {
|
method: 'POST',
|
||||||
if (xhr.readyState === 4) {
|
body: formData
|
||||||
if (xhr.status !== 200) {
|
});
|
||||||
alert('Error Uploading [' + fileName + ']: ' + xhr.statusText);
|
|
||||||
}
|
progress.slideUp(400, function () {
|
||||||
progress.slideUp(400, function () {
|
progress.remove();
|
||||||
progress.remove();
|
});
|
||||||
});
|
|
||||||
}
|
if (!result.ok) {
|
||||||
};
|
alert('Error Uploading [' + fileName + ']: ' + result.statusText);
|
||||||
xhr.send(formData);
|
|
||||||
|
const errorText = await result.text();
|
||||||
|
console.error('Failed to upload file [' + fileName + ']: ' + errorText);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
// #endregion
|
// #endregion
|
||||||
|
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
(function(n,t,i){"use strict";var r=function(r,u,f){var e=this;if(e.uploadUrl=r,e.dropTarget=u,e.uploadProgressContainer=f,e._uploadFilesInput=null,e.uploadFiles=function(){!e._uploadFilesInput||e._uploadFilesInput.remove();e._uploadFilesInput=i("<input>");e._uploadFilesInput.attr({type:"file",multiple:"multiple",title:"Disco ICT File Uploading"}).hide().change(function(n){var t=n.target.files;!!t&&t.length>0&&e._uploadFiles(t);e._uploadFilesInput.remove()}).appendTo(e.uploadProgressContainer).click()},!!e.dropTarget){var h=i(t),o=!1,s=null;h.on("dragover",function(){e.dropTarget.addClass("dragHighlight");e.dropTarget.removeClass("dragHover");o=!1});h.on("dragleave",function(){!s||n.clearInterval(s);o=!0;n.setTimeout(function(){o&&e.dropTarget.removeClass("dragHighlight");s=null},200)});e.dropTarget.on("dragover",function(n){n.stopPropagation();n.preventDefault();e.dropTarget.addClass("dragHover");o=!1;n.originalEvent.dataTransfer.dropEffect="copy"});e.dropTarget.on("drop",function(n){n.stopPropagation();n.preventDefault();o=!0;e.dropTarget.removeClass("dragHighlight");var t=n.originalEvent.dataTransfer.files;e._uploadFiles(t)})}return e.uploadImage=function(){let f=null,o=!1;var u=i("<div><video><\/video><\/div>").attr({id:"Disco_AttachmentUpload_ImageDialog",title:"Upload Image","class":"dialog Disco-AttachmentUpload-ImageDialog"});u.dialog({autoOpen:!0,draggable:!1,modal:!0,resizable:!1,width:720,height:405,close:function(){f&&f.getTracks().forEach(n=>n.stop());n.setTimeout(function(){u.dialog("destroy")},1)}}).closest(".ui-dialog").children(".ui-dialog-titlebar").css("border-bottom","none");const r=u.find("video")[0];navigator.mediaDevices.getUserMedia({audio:!1,video:{width:{ideal:1920},height:{ideal:1080},facingMode:"environment"}}).then(n=>{f=n,r.srcObject=n,r.play()}).catch(n=>{console.error(n),u.dialog("destroy")});r.addEventListener("canplay",()=>{if(!o){const i=720;let n=r.videoHeight/(r.videoWidth/i);isNaN(n)&&(n=405);r.setAttribute("width",i);r.setAttribute("height",n);o=!0;u.dialog("option","buttons",[{text:"Capture",click:()=>{const n=t.createElement("canvas");n.width=r.videoWidth;n.height=r.videoHeight;const i=n.getContext("2d");i.drawImage(r,0,0);n.toBlob(n=>{e._uploadImage(n)},"image/jpg")}}]);u.css("height","");u.closest(".ui-dialog").children(".ui-dialog-buttonpane").css("margin-top",0).find(".ui-button:first").focus()}})},e.getFileComments=function(t,r,u){var o=!1,f=i("<div>").attr({title:"Upload File","class":"dialog Disco-AttachmentUpload-CommentDialog"}),s,h,e;f.html('<table><tr><th>File Name:<\/th><td class="filename"><\/td><\/tr><tr><th>Comments:<\/th><td><input class="comments" type="text"><\/input><\/td><\/tr><tr><td class="thumbnail" colspan="2"><img /><\/td><\/tr><\/table>');!r||(s=f.find("td.thumbnail"),h=s.find("img"),r(h)&&s.show());f.find("td.filename").text(t).attr("title",t);e=f.find("input.comments").keypress(function(n){n.which===13&&(!e.val()||(o=!0,f.dialog("close")))});f.dialog({resizable:!1,width:400,modal:!0,autoOpen:!0,buttons:{Upload:function(){e.val()?(o=!0,f.dialog("close"),n.setTimeout(function(){e.focus()},1)):alert("Please provide a comment for this attachment.")},Cancel:function(){f.dialog("close")}},close:function(){var n=e.val();f.dialog("destroy").remove();u(o,n)}})},e._uploadImage=function(n){var t="CapturedImage-"+moment().format("YYYYMMDD-HHmmss")+".jpg";e.getFileComments(t,function(t){const i=URL.createObjectURL(n);return t.attr("src",i),!0},function(i,r){i&&e._uploadFile(n,t,r)})},e._uploadFiles=function(n){var t=i.makeArray(n),r=function(){if(t&&t.length!==0){var n=t.shift();e.getFileComments(n.name,function(t){if(!!n.type&&n.type.indexOf("image/")===0){var i=new FileReader;return i.onload=function(n){t.attr("src",n.target.result)},i.readAsDataURL(n),!0}return!1},function(t,i){t&&(e._uploadFile(n,n.name,i),r())})}};r()},e._uploadFile=function(n,t,r){var f=new FormData,u=new XMLHttpRequest,o=i("<div>").append(i("<i>").addClass("fa fa-cog fa-spin")).append(i("<span>").text("Uploading: "+t)).appendTo(e.uploadProgressContainer);f.append("Comments",r);f.append("File",n,t);u.open("POST",e.uploadUrl,!0);u.onreadystatechange=function(){u.readyState===4&&(u.status!==200&&alert("Error Uploading ["+t+"]: "+u.statusText),o.slideUp(400,function(){o.remove()}))};u.send(f)},e};t.Disco||(t.Disco={});t.Disco.AttachmentUploader=r})(this,document,$);
|
(function(n,t,i){"use strict";var r=function(r){var u=this;if(u.$host=r,u.uploadUrl=r.attr("data-uploadurl"),u.dropTarget=r.find(".Disco-AttachmentUpload-DropTarget"),u.uploadProgressContainer=r.find(".Disco-AttachmentUpload-Progress"),u._uploadFilesInput=null,u.uploadFiles=function(){!u._uploadFilesInput||u._uploadFilesInput.remove();u._uploadFilesInput=i("<input>");u._uploadFilesInput.attr({type:"file",multiple:"multiple",title:"Disco ICT File Uploading"}).hide().change(function(n){var t=n.target.files;!!t&&t.length>0&&u._uploadFiles(t);u._uploadFilesInput.remove()}).appendTo(u.uploadProgressContainer).click()},!!u.dropTarget){var o=i(t),f=!1,e=null;o.on("dragover",function(){u.dropTarget.addClass("dragHighlight");u.dropTarget.removeClass("dragHover");f=!1});o.on("dragleave",function(){!e||n.clearInterval(e);f=!0;n.setTimeout(function(){f&&u.dropTarget.removeClass("dragHighlight");e=null},200)});u.dropTarget.on("dragover",function(n){n.stopPropagation();n.preventDefault();u.dropTarget.addClass("dragHover");f=!1;n.originalEvent.dataTransfer.dropEffect="copy"});u.dropTarget.on("drop",function(n){n.stopPropagation();n.preventDefault();f=!0;u.dropTarget.removeClass("dragHighlight");var t=n.originalEvent.dataTransfer.files;u._uploadFiles(t)})}return u.uploadImage=function(){let e=null,o=!1;var f=i("<div><video><\/video><\/div>").attr({id:"Disco_AttachmentUpload_ImageDialog",title:"Upload Image","class":"dialog Disco-AttachmentUpload-ImageDialog"});f.dialog({autoOpen:!0,draggable:!1,modal:!0,resizable:!1,width:720,height:405,close:function(){e&&e.getTracks().forEach(n=>n.stop());n.setTimeout(function(){f.dialog("destroy")},1)}}).closest(".ui-dialog").children(".ui-dialog-titlebar").css("border-bottom","none");const r=f.find("video")[0];navigator.mediaDevices.getUserMedia({audio:!1,video:{width:{ideal:1920},height:{ideal:1080},facingMode:"environment"}}).then(n=>{e=n,r.srcObject=n,r.play()}).catch(n=>{console.error(n),f.dialog("destroy")});r.addEventListener("canplay",()=>{if(!o){const i=720;let n=r.videoHeight/(r.videoWidth/i);isNaN(n)&&(n=405);r.setAttribute("width",i);r.setAttribute("height",n);o=!0;f.dialog("option","buttons",[{text:"Capture",click:()=>{const n=t.createElement("canvas");n.width=r.videoWidth;n.height=r.videoHeight;const i=n.getContext("2d");i.drawImage(r,0,0);n.toBlob(n=>{u._uploadImage(n)},"image/jpg")}}]);f.css("height","");f.closest(".ui-dialog").children(".ui-dialog-buttonpane").css("margin-top",0).find(".ui-button:first").focus()}})},u.getFileComments=function(t,r,u){var e=!1,f=i("<div>").attr({title:"Upload File","class":"dialog Disco-AttachmentUpload-CommentDialog"}),o,h,s;f.html('<table><tr><th>File Name:<\/th><td class="filename"><\/td><\/tr><tr><th>Comments:<\/th><td><input class="comments" type="text" placeholder="optional" /><\/td><\/tr><tr><td class="thumbnail" colspan="2"><img /><\/td><\/tr><\/table>');!r||(o=f.find("td.thumbnail"),h=o.find("img"),r(h)&&o.show());f.find("td.filename").text(t).attr("title",t);s=f.find("input.comments").keypress(function(n){n.which===13&&(e=!0,f.dialog("close"))});f.dialog({resizable:!1,width:400,modal:!0,autoOpen:!0,buttons:{Upload:function(){e=!0;f.dialog("close");n.setTimeout(function(){s.focus()},1)},Cancel:function(){f.dialog("close")}},close:function(){var n=s.val();f.dialog("destroy").remove();u(e,n)}})},u._uploadImage=function(n){var t="CapturedImage-"+moment().format("YYYYMMDD-HHmmss")+".jpg";u.getFileComments(t,function(t){const i=URL.createObjectURL(n);return t.attr("src",i),!0},function(i,r){i&&u._uploadFile(n,t,r)})},u._uploadFiles=function(n){var t=i.makeArray(n),r=function(){if(t&&t.length!==0){var n=t.shift();u.getFileComments(n.name,function(t){if(!!n.type&&n.type.indexOf("image/")===0){var i=new FileReader;return i.onload=function(n){t.attr("src",n.target.result)},i.readAsDataURL(n),!0}return!1},function(t,i){t&&(u._uploadFile(n,n.name,i),r())})}};r()},u._uploadFile=async function(n,t,r){const f=new FormData,o=i("<div>").append(i("<i>").addClass("fa fa-cog fa-spin")).append(i("<span>").text("Uploading: "+t)).appendTo(u.uploadProgressContainer);f.append("__RequestVerificationToken",u.$host.find('input[name="__RequestVerificationToken"]').val());f.append("comments",r);f.append("file",n,t);const e=await fetch(u.uploadUrl,{method:"POST",body:f});if(o.slideUp(400,function(){o.remove()}),!e.ok){alert("Error Uploading ["+t+"]: "+e.statusText);const n=await e.text();console.error("Failed to upload file ["+t+"]: "+n)}},u};t.Disco||(t.Disco={});t.Disco.AttachmentUploader=r})(this,document,$);
|
||||||
+35
-36
@@ -1,12 +1,13 @@
|
|||||||
(function (window, document, $) {
|
(function (window, document, $) {
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
var attachmentUploader = function (uploadUrl, dropTarget, uploadProgressContainer) {
|
var attachmentUploader = function ($host) {
|
||||||
var self = this;
|
var self = this;
|
||||||
|
|
||||||
self.uploadUrl = uploadUrl;
|
self.$host = $host;
|
||||||
self.dropTarget = dropTarget;
|
self.uploadUrl = $host.attr('data-uploadurl');
|
||||||
self.uploadProgressContainer = uploadProgressContainer;
|
self.dropTarget = $host.find('.Disco-AttachmentUpload-DropTarget');
|
||||||
|
self.uploadProgressContainer = $host.find('.Disco-AttachmentUpload-Progress');
|
||||||
|
|
||||||
// #region File Selection Support
|
// #region File Selection Support
|
||||||
self._uploadFilesInput = null;
|
self._uploadFilesInput = null;
|
||||||
@@ -168,7 +169,7 @@
|
|||||||
title: 'Upload File',
|
title: 'Upload File',
|
||||||
'class': 'dialog Disco-AttachmentUpload-CommentDialog'
|
'class': 'dialog Disco-AttachmentUpload-CommentDialog'
|
||||||
});
|
});
|
||||||
dialog.html('<table><tr><th>File Name:</th><td class="filename"></td></tr><tr><th>Comments:</th><td><input class="comments" type="text"></input></td></tr><tr><td class="thumbnail" colspan="2"><img /></td></tr></table>');
|
dialog.html('<table><tr><th>File Name:</th><td class="filename"></td></tr><tr><th>Comments:</th><td><input class="comments" type="text" placeholder="optional" /></td></tr><tr><td class="thumbnail" colspan="2"><img /></td></tr></table>');
|
||||||
|
|
||||||
if (!!thumbnailHandler) {
|
if (!!thumbnailHandler) {
|
||||||
var td = dialog.find('td.thumbnail');
|
var td = dialog.find('td.thumbnail');
|
||||||
@@ -181,10 +182,8 @@
|
|||||||
var comments = dialog.find('input.comments')
|
var comments = dialog.find('input.comments')
|
||||||
.keypress(function (e) {
|
.keypress(function (e) {
|
||||||
if (e.which === 13) {
|
if (e.which === 13) {
|
||||||
if (!!comments.val()) {
|
result = true;
|
||||||
result = true;
|
dialog.dialog("close");
|
||||||
dialog.dialog("close");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -195,15 +194,11 @@
|
|||||||
autoOpen: true,
|
autoOpen: true,
|
||||||
buttons: {
|
buttons: {
|
||||||
"Upload": function () {
|
"Upload": function () {
|
||||||
if (!!comments.val()) {
|
result = true;
|
||||||
result = true;
|
dialog.dialog("close");
|
||||||
dialog.dialog("close");
|
window.setTimeout(function () {
|
||||||
window.setTimeout(function () {
|
comments.focus();
|
||||||
comments.focus();
|
}, 1);
|
||||||
}, 1);
|
|
||||||
} else {
|
|
||||||
alert('Please provide a comment for this attachment.');
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
Cancel: function () {
|
Cancel: function () {
|
||||||
dialog.dialog("close");
|
dialog.dialog("close");
|
||||||
@@ -262,29 +257,33 @@
|
|||||||
processNextFile();
|
processNextFile();
|
||||||
};
|
};
|
||||||
|
|
||||||
self._uploadFile = function (fileData, fileName, comments) {
|
self._uploadFile = async function (fileData, fileName, comments) {
|
||||||
var formData = new FormData();
|
const formData = new FormData();
|
||||||
var xhr = new XMLHttpRequest();
|
|
||||||
var progress = $('<div>')
|
const progress = $('<div>')
|
||||||
.append($('<i>').addClass('fa fa-cog fa-spin'))
|
.append($('<i>').addClass('fa fa-cog fa-spin'))
|
||||||
.append($('<span>').text('Uploading: ' + fileName))
|
.append($('<span>').text('Uploading: ' + fileName))
|
||||||
.appendTo(self.uploadProgressContainer);
|
.appendTo(self.uploadProgressContainer);
|
||||||
|
|
||||||
formData.append('Comments', comments);
|
formData.append('__RequestVerificationToken', self.$host.find('input[name="__RequestVerificationToken"]').val());
|
||||||
formData.append('File', fileData, fileName);
|
formData.append('comments', comments);
|
||||||
|
formData.append('file', fileData, fileName);
|
||||||
|
|
||||||
xhr.open("POST", self.uploadUrl, true);
|
const result = await fetch(self.uploadUrl, {
|
||||||
xhr.onreadystatechange = function () {
|
method: 'POST',
|
||||||
if (xhr.readyState === 4) {
|
body: formData
|
||||||
if (xhr.status !== 200) {
|
});
|
||||||
alert('Error Uploading [' + fileName + ']: ' + xhr.statusText);
|
|
||||||
}
|
progress.slideUp(400, function () {
|
||||||
progress.slideUp(400, function () {
|
progress.remove();
|
||||||
progress.remove();
|
});
|
||||||
});
|
|
||||||
}
|
if (!result.ok) {
|
||||||
};
|
alert('Error Uploading [' + fileName + ']: ' + result.statusText);
|
||||||
xhr.send(formData);
|
|
||||||
|
const errorText = await result.text();
|
||||||
|
console.error('Failed to upload file [' + fileName + ']: ' + errorText);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
// #endregion
|
// #endregion
|
||||||
|
|
||||||
|
|||||||
@@ -19,7 +19,8 @@
|
|||||||
<table id="deviceShowResources">
|
<table id="deviceShowResources">
|
||||||
<tr>
|
<tr>
|
||||||
<td id="AttachmentsContainer">
|
<td id="AttachmentsContainer">
|
||||||
<div id="Attachments" class="@(canAddAttachments ? "canAddAttachments" : "cannotAddAttachments")">
|
<div id="Attachments" class="@(canAddAttachments ? "canAddAttachments" : "cannotAddAttachments")" data-uploadurl="@(Url.Action(MVC.API.Device.AttachmentUpload(Model.Device.SerialNumber, null)))">
|
||||||
|
@Html.AntiForgeryToken()
|
||||||
<div class="Disco-AttachmentUpload-DropTarget">
|
<div class="Disco-AttachmentUpload-DropTarget">
|
||||||
<h2>Drop Attachments Here</h2>
|
<h2>Drop Attachments Here</h2>
|
||||||
</div>
|
</div>
|
||||||
@@ -31,11 +32,11 @@
|
|||||||
<a href="@Url.Action(MVC.API.Device.AttachmentDownload(da.Id))" data-attachmentid="@da.Id" data-mimetype="@da.MimeType">
|
<a href="@Url.Action(MVC.API.Device.AttachmentDownload(da.Id))" data-attachmentid="@da.Id" data-mimetype="@da.MimeType">
|
||||||
<span class="icon" title="@da.Filename">
|
<span class="icon" title="@da.Filename">
|
||||||
<img alt="Attachment Thumbnail" src="@(Url.Action(MVC.API.Device.AttachmentThumbnail(da.Id)))" /></span>
|
<img alt="Attachment Thumbnail" src="@(Url.Action(MVC.API.Device.AttachmentThumbnail(da.Id)))" /></span>
|
||||||
<span class="comments" title="@da.Comments">
|
<span class="comments" title="@(da.Comments ?? da.Filename)">
|
||||||
@{if (!string.IsNullOrEmpty(da.DocumentTemplateId))
|
@{if (!string.IsNullOrEmpty(da.DocumentTemplateId))
|
||||||
{ @da.DocumentTemplate.Description}
|
{ @da.DocumentTemplate.Description}
|
||||||
else
|
else
|
||||||
{ @da.Comments }}
|
{ @(da.Comments ?? da.Filename) }}
|
||||||
</span><span class="author">@da.TechUser.ToString()</span>@if (canRemoveAnyAttachments || (canRemoveOwnAttachments && da.TechUserId.Equals(CurrentUser.UserId, StringComparison.OrdinalIgnoreCase)))
|
</span><span class="author">@da.TechUser.ToString()</span>@if (canRemoveAnyAttachments || (canRemoveOwnAttachments && da.TechUserId.Equals(CurrentUser.UserId, StringComparison.OrdinalIgnoreCase)))
|
||||||
{<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>
|
{<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>
|
</a>
|
||||||
@@ -235,10 +236,7 @@
|
|||||||
@if (canAddAttachments)
|
@if (canAddAttachments)
|
||||||
{<text>
|
{<text>
|
||||||
//#region Add Attachments
|
//#region Add Attachments
|
||||||
var attachmentUploader = new document.Disco.AttachmentUploader(
|
var attachmentUploader = new document.Disco.AttachmentUploader($Attachments);
|
||||||
'@(Url.Action(MVC.API.Device.AttachmentUpload(Model.Device.SerialNumber, null)))',
|
|
||||||
$Attachments.find('.Disco-AttachmentUpload-DropTarget'),
|
|
||||||
$Attachments.find('.Disco-AttachmentUpload-Progress'));
|
|
||||||
|
|
||||||
var $attachmentInput = $Attachments.find('.attachmentInput');
|
var $attachmentInput = $Attachments.find('.attachmentInput');
|
||||||
if (window.location.protocol != 'https:') {
|
if (window.location.protocol != 'https:') {
|
||||||
|
|||||||
@@ -92,7 +92,29 @@ WriteAttribute("class", Tuple.Create(" class=\"", 888), Tuple.Create("\"", 963)
|
|||||||
, 896), false)
|
, 896), false)
|
||||||
);
|
);
|
||||||
|
|
||||||
WriteLiteral(">\r\n <div");
|
WriteLiteral(" data-uploadurl=\"");
|
||||||
|
|
||||||
|
|
||||||
|
#line 22 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||||
|
Write(Url.Action(MVC.API.Device.AttachmentUpload(Model.Device.SerialNumber, null)));
|
||||||
|
|
||||||
|
|
||||||
|
#line default
|
||||||
|
#line hidden
|
||||||
|
WriteLiteral("\"");
|
||||||
|
|
||||||
|
WriteLiteral(">\r\n");
|
||||||
|
|
||||||
|
WriteLiteral(" ");
|
||||||
|
|
||||||
|
|
||||||
|
#line 23 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||||
|
Write(Html.AntiForgeryToken());
|
||||||
|
|
||||||
|
|
||||||
|
#line default
|
||||||
|
#line hidden
|
||||||
|
WriteLiteral("\r\n <div");
|
||||||
|
|
||||||
WriteLiteral(" class=\"Disco-AttachmentUpload-DropTarget\"");
|
WriteLiteral(" class=\"Disco-AttachmentUpload-DropTarget\"");
|
||||||
|
|
||||||
@@ -104,13 +126,13 @@ WriteLiteral(" class=\"attachmentOutput\"");
|
|||||||
WriteLiteral(">\r\n");
|
WriteLiteral(">\r\n");
|
||||||
|
|
||||||
|
|
||||||
#line 27 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
#line 28 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||||
|
|
||||||
|
|
||||||
#line default
|
#line default
|
||||||
#line hidden
|
#line hidden
|
||||||
|
|
||||||
#line 27 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
#line 28 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||||
if (Model.Device.DeviceAttachments != null)
|
if (Model.Device.DeviceAttachments != null)
|
||||||
{
|
{
|
||||||
foreach (var da in Model.Device.DeviceAttachments)
|
foreach (var da in Model.Device.DeviceAttachments)
|
||||||
@@ -121,20 +143,20 @@ WriteLiteral(">\r\n");
|
|||||||
#line hidden
|
#line hidden
|
||||||
WriteLiteral(" <a");
|
WriteLiteral(" <a");
|
||||||
|
|
||||||
WriteAttribute("href", Tuple.Create(" href=\"", 1410), Tuple.Create("\"", 1470)
|
WriteAttribute("href", Tuple.Create(" href=\"", 1553), Tuple.Create("\"", 1613)
|
||||||
|
|
||||||
#line 31 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
#line 32 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||||
, Tuple.Create(Tuple.Create("", 1417), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.API.Device.AttachmentDownload(da.Id))
|
, Tuple.Create(Tuple.Create("", 1560), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.API.Device.AttachmentDownload(da.Id))
|
||||||
|
|
||||||
#line default
|
#line default
|
||||||
#line hidden
|
#line hidden
|
||||||
, 1417), false)
|
, 1560), false)
|
||||||
);
|
);
|
||||||
|
|
||||||
WriteLiteral(" data-attachmentid=\"");
|
WriteLiteral(" data-attachmentid=\"");
|
||||||
|
|
||||||
|
|
||||||
#line 31 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
#line 32 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||||
Write(da.Id);
|
Write(da.Id);
|
||||||
|
|
||||||
|
|
||||||
@@ -145,7 +167,7 @@ WriteLiteral("\"");
|
|||||||
WriteLiteral(" data-mimetype=\"");
|
WriteLiteral(" data-mimetype=\"");
|
||||||
|
|
||||||
|
|
||||||
#line 31 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
#line 32 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||||
Write(da.MimeType);
|
Write(da.MimeType);
|
||||||
|
|
||||||
|
|
||||||
@@ -157,68 +179,68 @@ WriteLiteral(">\r\n <span");
|
|||||||
|
|
||||||
WriteLiteral(" class=\"icon\"");
|
WriteLiteral(" class=\"icon\"");
|
||||||
|
|
||||||
WriteAttribute("title", Tuple.Create(" title=\"", 1580), Tuple.Create("\"", 1600)
|
WriteAttribute("title", Tuple.Create(" title=\"", 1723), Tuple.Create("\"", 1743)
|
||||||
|
|
||||||
#line 32 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
#line 33 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||||
, Tuple.Create(Tuple.Create("", 1588), Tuple.Create<System.Object, System.Int32>(da.Filename
|
, Tuple.Create(Tuple.Create("", 1731), Tuple.Create<System.Object, System.Int32>(da.Filename
|
||||||
|
|
||||||
#line default
|
#line default
|
||||||
#line hidden
|
#line hidden
|
||||||
, 1588), false)
|
, 1731), false)
|
||||||
);
|
);
|
||||||
|
|
||||||
WriteLiteral(">\r\n <img");
|
WriteLiteral(">\r\n <img");
|
||||||
|
|
||||||
WriteLiteral(" alt=\"Attachment Thumbnail\"");
|
WriteLiteral(" alt=\"Attachment Thumbnail\"");
|
||||||
|
|
||||||
WriteAttribute("src", Tuple.Create(" src=\"", 1671), Tuple.Create("\"", 1733)
|
WriteAttribute("src", Tuple.Create(" src=\"", 1814), Tuple.Create("\"", 1876)
|
||||||
|
|
||||||
#line 33 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
#line 34 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||||
, Tuple.Create(Tuple.Create("", 1677), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.API.Device.AttachmentThumbnail(da.Id))
|
, Tuple.Create(Tuple.Create("", 1820), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.API.Device.AttachmentThumbnail(da.Id))
|
||||||
|
|
||||||
#line default
|
#line default
|
||||||
#line hidden
|
#line hidden
|
||||||
, 1677), false)
|
, 1820), false)
|
||||||
);
|
);
|
||||||
|
|
||||||
WriteLiteral(" /></span>\r\n <span");
|
WriteLiteral(" /></span>\r\n <span");
|
||||||
|
|
||||||
WriteLiteral(" class=\"comments\"");
|
WriteLiteral(" class=\"comments\"");
|
||||||
|
|
||||||
WriteAttribute("title", Tuple.Create(" title=\"", 1800), Tuple.Create("\"", 1820)
|
WriteAttribute("title", Tuple.Create(" title=\"", 1943), Tuple.Create("\"", 1980)
|
||||||
|
|
||||||
#line 34 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
#line 35 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||||
, Tuple.Create(Tuple.Create("", 1808), Tuple.Create<System.Object, System.Int32>(da.Comments
|
, Tuple.Create(Tuple.Create("", 1951), Tuple.Create<System.Object, System.Int32>(da.Comments ?? da.Filename
|
||||||
|
|
||||||
#line default
|
#line default
|
||||||
#line hidden
|
#line hidden
|
||||||
, 1808), false)
|
, 1951), false)
|
||||||
);
|
);
|
||||||
|
|
||||||
WriteLiteral(">\r\n");
|
WriteLiteral(">\r\n");
|
||||||
|
|
||||||
|
|
||||||
#line 35 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
#line 36 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||||
|
|
||||||
|
|
||||||
#line default
|
#line default
|
||||||
#line hidden
|
#line hidden
|
||||||
|
|
||||||
#line 35 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
#line 36 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||||
if (!string.IsNullOrEmpty(da.DocumentTemplateId))
|
if (!string.IsNullOrEmpty(da.DocumentTemplateId))
|
||||||
{
|
{
|
||||||
|
|
||||||
#line default
|
#line default
|
||||||
#line hidden
|
#line hidden
|
||||||
|
|
||||||
#line 36 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
#line 37 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||||
Write(da.DocumentTemplate.Description);
|
Write(da.DocumentTemplate.Description);
|
||||||
|
|
||||||
|
|
||||||
#line default
|
#line default
|
||||||
#line hidden
|
#line hidden
|
||||||
|
|
||||||
#line 36 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
#line 37 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -226,15 +248,15 @@ WriteLiteral(">\r\n");
|
|||||||
#line default
|
#line default
|
||||||
#line hidden
|
#line hidden
|
||||||
|
|
||||||
#line 38 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
#line 39 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||||
Write(da.Comments);
|
Write(da.Comments ?? da.Filename);
|
||||||
|
|
||||||
|
|
||||||
#line default
|
#line default
|
||||||
#line hidden
|
#line hidden
|
||||||
|
|
||||||
#line 38 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
#line 39 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||||
}
|
}
|
||||||
|
|
||||||
#line default
|
#line default
|
||||||
#line hidden
|
#line hidden
|
||||||
@@ -245,7 +267,7 @@ WriteLiteral(" class=\"author\"");
|
|||||||
WriteLiteral(">");
|
WriteLiteral(">");
|
||||||
|
|
||||||
|
|
||||||
#line 39 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
#line 40 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||||
Write(da.TechUser.ToString());
|
Write(da.TechUser.ToString());
|
||||||
|
|
||||||
|
|
||||||
@@ -254,7 +276,7 @@ WriteLiteral(">");
|
|||||||
WriteLiteral("</span>");
|
WriteLiteral("</span>");
|
||||||
|
|
||||||
|
|
||||||
#line 39 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
#line 40 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||||
if (canRemoveAnyAttachments || (canRemoveOwnAttachments && da.TechUserId.Equals(CurrentUser.UserId, StringComparison.OrdinalIgnoreCase)))
|
if (canRemoveAnyAttachments || (canRemoveOwnAttachments && da.TechUserId.Equals(CurrentUser.UserId, StringComparison.OrdinalIgnoreCase)))
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -267,7 +289,7 @@ WriteLiteral(" class=\"remove fa fa-times-circle\"");
|
|||||||
WriteLiteral("></span>");
|
WriteLiteral("></span>");
|
||||||
|
|
||||||
|
|
||||||
#line 40 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
#line 41 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||||
}
|
}
|
||||||
|
|
||||||
#line default
|
#line default
|
||||||
@@ -276,20 +298,20 @@ WriteLiteral("<span");
|
|||||||
|
|
||||||
WriteLiteral(" class=\"timestamp\"");
|
WriteLiteral(" class=\"timestamp\"");
|
||||||
|
|
||||||
WriteAttribute("title", Tuple.Create(" title=\"", 2494), Tuple.Create("\"", 2532)
|
WriteAttribute("title", Tuple.Create(" title=\"", 2671), Tuple.Create("\"", 2709)
|
||||||
|
|
||||||
#line 40 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
#line 41 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||||
, Tuple.Create(Tuple.Create("", 2502), Tuple.Create<System.Object, System.Int32>(da.Timestamp.ToFullDateTime()
|
, Tuple.Create(Tuple.Create("", 2679), Tuple.Create<System.Object, System.Int32>(da.Timestamp.ToFullDateTime()
|
||||||
|
|
||||||
#line default
|
#line default
|
||||||
#line hidden
|
#line hidden
|
||||||
, 2502), false)
|
, 2679), false)
|
||||||
);
|
);
|
||||||
|
|
||||||
WriteLiteral(" data-livestamp=\"");
|
WriteLiteral(" data-livestamp=\"");
|
||||||
|
|
||||||
|
|
||||||
#line 40 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
#line 41 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||||
Write(da.Timestamp.ToUnixEpoc());
|
Write(da.Timestamp.ToUnixEpoc());
|
||||||
|
|
||||||
|
|
||||||
@@ -300,7 +322,7 @@ WriteLiteral("\"");
|
|||||||
WriteLiteral(">");
|
WriteLiteral(">");
|
||||||
|
|
||||||
|
|
||||||
#line 40 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
#line 41 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||||
Write(da.Timestamp.ToFullDateTime());
|
Write(da.Timestamp.ToFullDateTime());
|
||||||
|
|
||||||
|
|
||||||
@@ -309,7 +331,7 @@ WriteLiteral(">");
|
|||||||
WriteLiteral("</span>\r\n </a> \r\n");
|
WriteLiteral("</span>\r\n </a> \r\n");
|
||||||
|
|
||||||
|
|
||||||
#line 42 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
#line 43 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -319,13 +341,13 @@ WriteLiteral("</span>\r\n </a> \r\n");
|
|||||||
WriteLiteral(" </div>\r\n");
|
WriteLiteral(" </div>\r\n");
|
||||||
|
|
||||||
|
|
||||||
#line 45 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
#line 46 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||||
|
|
||||||
|
|
||||||
#line default
|
#line default
|
||||||
#line hidden
|
#line hidden
|
||||||
|
|
||||||
#line 45 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
#line 46 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||||
if (canAddAttachments)
|
if (canAddAttachments)
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -357,7 +379,7 @@ WriteLiteral(" title=\"Capture Image\"");
|
|||||||
WriteLiteral("></span>\r\n </div>\r\n");
|
WriteLiteral("></span>\r\n </div>\r\n");
|
||||||
|
|
||||||
|
|
||||||
#line 51 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
#line 52 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -389,7 +411,7 @@ WriteLiteral(@">
|
|||||||
$.connection.hub.qs = { DeviceSerialNumber: '");
|
$.connection.hub.qs = { DeviceSerialNumber: '");
|
||||||
|
|
||||||
|
|
||||||
#line 71 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
#line 72 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||||
Write(Model.Device.SerialNumber);
|
Write(Model.Device.SerialNumber);
|
||||||
|
|
||||||
|
|
||||||
@@ -434,7 +456,7 @@ WriteLiteral("\' };\r\n $.connection.hub.error(onHubF
|
|||||||
"$.ajax({\r\n url: \'");
|
"$.ajax({\r\n url: \'");
|
||||||
|
|
||||||
|
|
||||||
#line 117 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
#line 118 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||||
Write(Url.Action(MVC.API.Device.Attachment()));
|
Write(Url.Action(MVC.API.Device.Attachment()));
|
||||||
|
|
||||||
|
|
||||||
@@ -449,13 +471,13 @@ WriteLiteral(@"',
|
|||||||
");
|
");
|
||||||
|
|
||||||
|
|
||||||
#line 123 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
#line 124 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||||
|
|
||||||
|
|
||||||
#line default
|
#line default
|
||||||
#line hidden
|
#line hidden
|
||||||
|
|
||||||
#line 123 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
#line 124 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||||
if (canRemoveAnyAttachments)
|
if (canRemoveAnyAttachments)
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -469,7 +491,7 @@ WriteLiteral("buildAttachment(a, true, quick);");
|
|||||||
WriteLiteral("\r\n");
|
WriteLiteral("\r\n");
|
||||||
|
|
||||||
|
|
||||||
#line 126 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
#line 127 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||||
}
|
}
|
||||||
else if (canRemoveOwnAttachments)
|
else if (canRemoveOwnAttachments)
|
||||||
{
|
{
|
||||||
@@ -482,7 +504,7 @@ WriteLiteral(" ");
|
|||||||
WriteLiteral("buildAttachment(a, (a.AuthorId === \'");
|
WriteLiteral("buildAttachment(a, (a.AuthorId === \'");
|
||||||
|
|
||||||
|
|
||||||
#line 129 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
#line 130 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||||
Write(CurrentUser.UserId);
|
Write(CurrentUser.UserId);
|
||||||
|
|
||||||
|
|
||||||
@@ -493,7 +515,7 @@ WriteLiteral("\'), quick);");
|
|||||||
WriteLiteral("\r\n");
|
WriteLiteral("\r\n");
|
||||||
|
|
||||||
|
|
||||||
#line 130 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
#line 131 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -508,7 +530,7 @@ WriteLiteral("buildAttachment(a, false, quick);");
|
|||||||
WriteLiteral("\r\n");
|
WriteLiteral("\r\n");
|
||||||
|
|
||||||
|
|
||||||
#line 134 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
#line 135 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -535,7 +557,7 @@ WriteLiteral(@" } else {
|
|||||||
e.attr('data-attachmentid', a.Id).attr('data-mimetype', a.MimeType).attr('href', '");
|
e.attr('data-attachmentid', a.Id).attr('data-mimetype', a.MimeType).attr('href', '");
|
||||||
|
|
||||||
|
|
||||||
#line 153 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
#line 154 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||||
Write(Url.Action(MVC.API.Device.AttachmentDownload()));
|
Write(Url.Action(MVC.API.Device.AttachmentDownload()));
|
||||||
|
|
||||||
|
|
||||||
@@ -567,7 +589,7 @@ WriteLiteral(@"/' + a.Id);
|
|||||||
img.attr('src', '");
|
img.attr('src', '");
|
||||||
|
|
||||||
|
|
||||||
#line 176 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
#line 177 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||||
Write(Url.Action(MVC.API.Device.AttachmentThumbnail()));
|
Write(Url.Action(MVC.API.Device.AttachmentThumbnail()));
|
||||||
|
|
||||||
|
|
||||||
@@ -618,66 +640,55 @@ WriteLiteral("/\' + a.Id + \'?v=\' + retryCount);\r\n
|
|||||||
" }\r\n\r\n");
|
" }\r\n\r\n");
|
||||||
|
|
||||||
|
|
||||||
#line 235 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
#line 236 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||||
|
|
||||||
|
|
||||||
#line default
|
#line default
|
||||||
#line hidden
|
#line hidden
|
||||||
|
|
||||||
#line 235 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
#line 236 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||||
if (canAddAttachments)
|
if (canAddAttachments)
|
||||||
{
|
{
|
||||||
|
|
||||||
#line default
|
#line default
|
||||||
#line hidden
|
#line hidden
|
||||||
WriteLiteral("\r\n //#region Add Attachments\r\n " +
|
WriteLiteral("\r\n //#region Add Attachments\r\n " +
|
||||||
" var attachmentUploader = new document.Disco.AttachmentUploader(\r\n " +
|
" var attachmentUploader = new document.Disco.AttachmentUploader($Attachments)" +
|
||||||
" \'");
|
";\r\n\r\n var $attachmentInput = $Attachments.find(\'.atta" +
|
||||||
|
"chmentInput\');\r\n if (window.location.protocol != \'htt" +
|
||||||
|
"ps:\') {\r\n $attachmentInput.find(\'.photo\')\r\n " +
|
||||||
|
" .removeClass(\'enabled\')\r\n " +
|
||||||
|
" .addClass(\'disabled\')\r\n .attr(\'tit" +
|
||||||
|
"le\', \'Capture Image: this functionality is only available over a HTTPS connectio" +
|
||||||
|
"n\');\r\n }\r\n $attachmentInpu" +
|
||||||
|
"t.find(\'.photo\').click(function () {\r\n if (!$(thi" +
|
||||||
|
"s).hasClass(\'enabled\'))\r\n alert(\'This functio" +
|
||||||
|
"nality is only available over a HTTPS connection\');\r\n " +
|
||||||
|
" else if ($(this).hasClass(\'disabled\'))\r\n " +
|
||||||
|
" alert(\'Disconnected from the Disco ICT Server, please refresh this page and try" +
|
||||||
|
" again\');\r\n else\r\n " +
|
||||||
|
" attachmentUploader.uploadImage();\r\n });\r\n " +
|
||||||
|
" $attachmentInput.find(\'.upload\').click(function () {\r\n " +
|
||||||
|
" if ($(this).hasClass(\'disabled\'))\r\n " +
|
||||||
|
" alert(\'Disconnected from the Disco ICT Server, please refresh " +
|
||||||
|
"this page and try again\');\r\n else\r\n " +
|
||||||
|
" attachmentUploader.uploadFiles();\r\n " +
|
||||||
|
" });\r\n\r\n var resourcesTab;\r\n " +
|
||||||
|
" $(document).on(\'dragover\', function () {\r\n " +
|
||||||
|
" if (!resourcesTab) {\r\n var tabs = $Attachmen" +
|
||||||
|
"ts.closest(\'.ui-tabs\');\r\n resourcesTab = {\r\n " +
|
||||||
|
" tabs: tabs,\r\n " +
|
||||||
|
" resourcesIndex: tabs.children(\'ul.ui-tabs-nav\').find(\'a[href=\"#Devic" +
|
||||||
|
"eDetailTab-Resources\"]\').closest(\'li\').index()\r\n " +
|
||||||
|
" };\r\n }\r\n var s" +
|
||||||
|
"electedIndex = resourcesTab.tabs.tabs(\'option\', \'active\');\r\n " +
|
||||||
|
" if (resourcesTab.resourcesIndex !== selectedIndex)\r\n " +
|
||||||
|
" resourcesTab.tabs.tabs(\'option\', \'active\', resourcesTab.reso" +
|
||||||
|
"urcesIndex);\r\n });\r\n //#en" +
|
||||||
|
"dregion\r\n ");
|
||||||
|
|
||||||
|
|
||||||
#line 239 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
#line 277 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||||
Write(Url.Action(MVC.API.Device.AttachmentUpload(Model.Device.SerialNumber, null)));
|
|
||||||
|
|
||||||
|
|
||||||
#line default
|
|
||||||
#line hidden
|
|
||||||
WriteLiteral("\',\r\n $Attachments.find(\'.Disco-AttachmentUpload-DropTa" +
|
|
||||||
"rget\'),\r\n $Attachments.find(\'.Disco-AttachmentUpload-" +
|
|
||||||
"Progress\'));\r\n\r\n var $attachmentInput = $Attachments." +
|
|
||||||
"find(\'.attachmentInput\');\r\n if (window.location.proto" +
|
|
||||||
"col != \'https:\') {\r\n $attachmentInput.find(\'.phot" +
|
|
||||||
"o\')\r\n .removeClass(\'enabled\')\r\n " +
|
|
||||||
" .addClass(\'disabled\')\r\n " +
|
|
||||||
" .attr(\'title\', \'Capture Image: this functionality is only available over a HTTP" +
|
|
||||||
"S connection\');\r\n }\r\n $att" +
|
|
||||||
"achmentInput.find(\'.photo\').click(function () {\r\n " +
|
|
||||||
" if (!$(this).hasClass(\'enabled\'))\r\n alert(\'T" +
|
|
||||||
"his functionality is only available over a HTTPS connection\');\r\n " +
|
|
||||||
" else if ($(this).hasClass(\'disabled\'))\r\n " +
|
|
||||||
" alert(\'Disconnected from the Disco ICT Server, please refresh this p" +
|
|
||||||
"age and try again\');\r\n else\r\n " +
|
|
||||||
" attachmentUploader.uploadImage();\r\n }" +
|
|
||||||
");\r\n $attachmentInput.find(\'.upload\').click(function " +
|
|
||||||
"() {\r\n if ($(this).hasClass(\'disabled\'))\r\n " +
|
|
||||||
" alert(\'Disconnected from the Disco ICT Server, plea" +
|
|
||||||
"se refresh this page and try again\');\r\n else\r\n " +
|
|
||||||
" attachmentUploader.uploadFiles();\r\n " +
|
|
||||||
" });\r\n\r\n var resourcesTab;\r\n " +
|
|
||||||
" $(document).on(\'dragover\', function () {\r\n " +
|
|
||||||
" if (!resourcesTab) {\r\n var tabs =" +
|
|
||||||
" $Attachments.closest(\'.ui-tabs\');\r\n resource" +
|
|
||||||
"sTab = {\r\n tabs: tabs,\r\n " +
|
|
||||||
" resourcesIndex: tabs.children(\'ul.ui-tabs-nav\').find(\'a[h" +
|
|
||||||
"ref=\"#DeviceDetailTab-Resources\"]\').closest(\'li\').index()\r\n " +
|
|
||||||
" };\r\n }\r\n " +
|
|
||||||
" var selectedIndex = resourcesTab.tabs.tabs(\'option\', \'active\');\r\n " +
|
|
||||||
" if (resourcesTab.resourcesIndex !== selectedIndex)\r\n " +
|
|
||||||
" resourcesTab.tabs.tabs(\'option\', \'active\', resour" +
|
|
||||||
"cesTab.resourcesIndex);\r\n });\r\n " +
|
|
||||||
" //#endregion\r\n ");
|
|
||||||
|
|
||||||
|
|
||||||
#line 279 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -686,7 +697,7 @@ WriteLiteral("\',\r\n $Attachments.find(\'.Disco-Atta
|
|||||||
WriteLiteral(" ");
|
WriteLiteral(" ");
|
||||||
|
|
||||||
|
|
||||||
#line 280 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
#line 278 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||||
if (canRemoveAnyAttachments || canRemoveOwnAttachments)
|
if (canRemoveAnyAttachments || canRemoveOwnAttachments)
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -719,7 +730,7 @@ WriteLiteral(@"
|
|||||||
url: '");
|
url: '");
|
||||||
|
|
||||||
|
|
||||||
#line 305 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
#line 303 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||||
Write(Url.Action(MVC.API.Device.AttachmentRemove()));
|
Write(Url.Action(MVC.API.Device.AttachmentRemove()));
|
||||||
|
|
||||||
|
|
||||||
@@ -747,7 +758,7 @@ WriteLiteral("\',\r\n dataType: \'jso
|
|||||||
"endregion\r\n ");
|
"endregion\r\n ");
|
||||||
|
|
||||||
|
|
||||||
#line 332 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
#line 330 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -784,7 +795,7 @@ WriteLiteral("></i> Are you sure?\r\n </p>\r\n </div>\r\n <scr
|
|||||||
"etailTab-ResourcesLink\">Attachments [");
|
"etailTab-ResourcesLink\">Attachments [");
|
||||||
|
|
||||||
|
|
||||||
#line 353 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
#line 351 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||||
Write(Model.Device.DeviceAttachments == null ? 0 : Model.Device.DeviceAttachments.Count);
|
Write(Model.Device.DeviceAttachments == null ? 0 : Model.Device.DeviceAttachments.Count);
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -53,7 +53,8 @@
|
|||||||
@if (canShowAttachments)
|
@if (canShowAttachments)
|
||||||
{
|
{
|
||||||
<td id="AttachmentsContainer">
|
<td id="AttachmentsContainer">
|
||||||
<div id="Attachments" class="@(canAddAttachments ? "canAddAttachments" : "cannotAddAttachments")">
|
<div id="Attachments" class="@(canAddAttachments ? "canAddAttachments" : "cannotAddAttachments")" data-uploadurl="@(Url.Action(MVC.API.Job.AttachmentUpload(Model.Job.Id, null)))">
|
||||||
|
@Html.AntiForgeryToken()
|
||||||
<div class="Disco-AttachmentUpload-DropTarget">
|
<div class="Disco-AttachmentUpload-DropTarget">
|
||||||
<h2>Drop Attachments Here</h2>
|
<h2>Drop Attachments Here</h2>
|
||||||
</div>
|
</div>
|
||||||
@@ -62,15 +63,16 @@
|
|||||||
{
|
{
|
||||||
<a href="@Url.Action(MVC.API.Job.AttachmentDownload(ja.Id))" data-attachmentid="@ja.Id" data-mimetype="@ja.MimeType">
|
<a href="@Url.Action(MVC.API.Job.AttachmentDownload(ja.Id))" data-attachmentid="@ja.Id" data-mimetype="@ja.MimeType">
|
||||||
<span class="icon" title="@ja.Filename">
|
<span class="icon" title="@ja.Filename">
|
||||||
<img alt="Attachment Thumbnail" src="@(Url.Action(MVC.API.Job.AttachmentThumbnail(ja.Id)))" /></span>
|
<img alt="Attachment Thumbnail" src="@(Url.Action(MVC.API.Job.AttachmentThumbnail(ja.Id)))" />
|
||||||
|
</span>
|
||||||
<span class="comments" title="@ja.Comments">
|
<span class="comments" title="@ja.Comments">
|
||||||
@{if (!string.IsNullOrEmpty(ja.DocumentTemplateId))
|
@{if (!string.IsNullOrEmpty(ja.DocumentTemplateId))
|
||||||
{ @ja.DocumentTemplate.Description}
|
{ @ja.DocumentTemplate.Description}
|
||||||
else
|
else
|
||||||
{ @ja.Comments }}
|
{ @ja.Comments }}
|
||||||
</span><span class="author">@ja.TechUser.ToStringFriendly()</span>@if (canRemoveAnyAttachments || (canRemoveOwnAttachments && ja.TechUserId.Equals(CurrentUser.UserId, StringComparison.OrdinalIgnoreCase)))
|
</span><span class="author">@ja.TechUser.ToStringFriendly()</span>@if (canRemoveAnyAttachments || (canRemoveOwnAttachments && ja.TechUserId.Equals(CurrentUser.UserId, StringComparison.OrdinalIgnoreCase)))
|
||||||
{<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>
|
{<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>
|
</a>
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
@if (canAddAttachments)
|
@if (canAddAttachments)
|
||||||
@@ -317,10 +319,7 @@
|
|||||||
@if (canAddAttachments)
|
@if (canAddAttachments)
|
||||||
{<text>
|
{<text>
|
||||||
//#region Add Attachments
|
//#region Add Attachments
|
||||||
var attachmentUploader = new document.Disco.AttachmentUploader(
|
var attachmentUploader = new document.Disco.AttachmentUploader($Attachments);
|
||||||
'@(Url.Action(MVC.API.Job.AttachmentUpload(Model.Job.Id, null)))',
|
|
||||||
$Attachments.find('.Disco-AttachmentUpload-DropTarget'),
|
|
||||||
$Attachments.find('.Disco-AttachmentUpload-Progress'));
|
|
||||||
|
|
||||||
var $attachmentInput = $Attachments.find('.attachmentInput');
|
var $attachmentInput = $Attachments.find('.attachmentInput');
|
||||||
if (window.location.protocol != 'https:') {
|
if (window.location.protocol != 'https:') {
|
||||||
|
|||||||
@@ -333,7 +333,29 @@ WriteAttribute("class", Tuple.Create(" class=\"", 2989), Tuple.Create("\"", 3064
|
|||||||
, 2997), false)
|
, 2997), false)
|
||||||
);
|
);
|
||||||
|
|
||||||
WriteLiteral(">\r\n <div");
|
WriteLiteral(" data-uploadurl=\"");
|
||||||
|
|
||||||
|
|
||||||
|
#line 56 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||||
|
Write(Url.Action(MVC.API.Job.AttachmentUpload(Model.Job.Id, null)));
|
||||||
|
|
||||||
|
|
||||||
|
#line default
|
||||||
|
#line hidden
|
||||||
|
WriteLiteral("\"");
|
||||||
|
|
||||||
|
WriteLiteral(">\r\n");
|
||||||
|
|
||||||
|
WriteLiteral(" ");
|
||||||
|
|
||||||
|
|
||||||
|
#line 57 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||||
|
Write(Html.AntiForgeryToken());
|
||||||
|
|
||||||
|
|
||||||
|
#line default
|
||||||
|
#line hidden
|
||||||
|
WriteLiteral("\r\n <div");
|
||||||
|
|
||||||
WriteLiteral(" class=\"Disco-AttachmentUpload-DropTarget\"");
|
WriteLiteral(" class=\"Disco-AttachmentUpload-DropTarget\"");
|
||||||
|
|
||||||
@@ -345,13 +367,13 @@ WriteLiteral(" class=\"attachmentOutput\"");
|
|||||||
WriteLiteral(">\r\n");
|
WriteLiteral(">\r\n");
|
||||||
|
|
||||||
|
|
||||||
#line 61 "..\..\Views\Job\JobParts\Resources.cshtml"
|
#line 62 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||||
|
|
||||||
|
|
||||||
#line default
|
#line default
|
||||||
#line hidden
|
#line hidden
|
||||||
|
|
||||||
#line 61 "..\..\Views\Job\JobParts\Resources.cshtml"
|
#line 62 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||||
foreach (var ja in Model.Job.JobAttachments)
|
foreach (var ja in Model.Job.JobAttachments)
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -360,20 +382,20 @@ WriteLiteral(">\r\n");
|
|||||||
#line hidden
|
#line hidden
|
||||||
WriteLiteral(" <a");
|
WriteLiteral(" <a");
|
||||||
|
|
||||||
WriteAttribute("href", Tuple.Create(" href=\"", 3401), Tuple.Create("\"", 3458)
|
WriteAttribute("href", Tuple.Create(" href=\"", 3528), Tuple.Create("\"", 3585)
|
||||||
|
|
||||||
#line 63 "..\..\Views\Job\JobParts\Resources.cshtml"
|
#line 64 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||||
, Tuple.Create(Tuple.Create("", 3408), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.API.Job.AttachmentDownload(ja.Id))
|
, Tuple.Create(Tuple.Create("", 3535), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.API.Job.AttachmentDownload(ja.Id))
|
||||||
|
|
||||||
#line default
|
#line default
|
||||||
#line hidden
|
#line hidden
|
||||||
, 3408), false)
|
, 3535), false)
|
||||||
);
|
);
|
||||||
|
|
||||||
WriteLiteral(" data-attachmentid=\"");
|
WriteLiteral(" data-attachmentid=\"");
|
||||||
|
|
||||||
|
|
||||||
#line 63 "..\..\Views\Job\JobParts\Resources.cshtml"
|
#line 64 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||||
Write(ja.Id);
|
Write(ja.Id);
|
||||||
|
|
||||||
|
|
||||||
@@ -384,7 +406,7 @@ WriteLiteral("\"");
|
|||||||
WriteLiteral(" data-mimetype=\"");
|
WriteLiteral(" data-mimetype=\"");
|
||||||
|
|
||||||
|
|
||||||
#line 63 "..\..\Views\Job\JobParts\Resources.cshtml"
|
#line 64 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||||
Write(ja.MimeType);
|
Write(ja.MimeType);
|
||||||
|
|
||||||
|
|
||||||
@@ -396,84 +418,85 @@ WriteLiteral(">\r\n <span");
|
|||||||
|
|
||||||
WriteLiteral(" class=\"icon\"");
|
WriteLiteral(" class=\"icon\"");
|
||||||
|
|
||||||
WriteAttribute("title", Tuple.Create(" title=\"", 3568), Tuple.Create("\"", 3588)
|
WriteAttribute("title", Tuple.Create(" title=\"", 3695), Tuple.Create("\"", 3715)
|
||||||
|
|
||||||
#line 64 "..\..\Views\Job\JobParts\Resources.cshtml"
|
#line 65 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||||
, Tuple.Create(Tuple.Create("", 3576), Tuple.Create<System.Object, System.Int32>(ja.Filename
|
, Tuple.Create(Tuple.Create("", 3703), Tuple.Create<System.Object, System.Int32>(ja.Filename
|
||||||
|
|
||||||
#line default
|
#line default
|
||||||
#line hidden
|
#line hidden
|
||||||
, 3576), false)
|
, 3703), false)
|
||||||
);
|
);
|
||||||
|
|
||||||
WriteLiteral(">\r\n <img");
|
WriteLiteral(">\r\n <img");
|
||||||
|
|
||||||
WriteLiteral(" alt=\"Attachment Thumbnail\"");
|
WriteLiteral(" alt=\"Attachment Thumbnail\"");
|
||||||
|
|
||||||
WriteAttribute("src", Tuple.Create(" src=\"", 3659), Tuple.Create("\"", 3718)
|
WriteAttribute("src", Tuple.Create(" src=\"", 3786), Tuple.Create("\"", 3845)
|
||||||
|
|
||||||
#line 65 "..\..\Views\Job\JobParts\Resources.cshtml"
|
#line 66 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||||
, Tuple.Create(Tuple.Create("", 3665), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.API.Job.AttachmentThumbnail(ja.Id))
|
, Tuple.Create(Tuple.Create("", 3792), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.API.Job.AttachmentThumbnail(ja.Id))
|
||||||
|
|
||||||
#line default
|
#line default
|
||||||
#line hidden
|
#line hidden
|
||||||
, 3665), false)
|
, 3792), false)
|
||||||
);
|
);
|
||||||
|
|
||||||
WriteLiteral(" /></span>\r\n <span");
|
WriteLiteral(" />\r\n </span>\r\n <sp" +
|
||||||
|
"an");
|
||||||
|
|
||||||
WriteLiteral(" class=\"comments\"");
|
WriteLiteral(" class=\"comments\"");
|
||||||
|
|
||||||
WriteAttribute("title", Tuple.Create(" title=\"", 3785), Tuple.Create("\"", 3805)
|
WriteAttribute("title", Tuple.Create(" title=\"", 3946), Tuple.Create("\"", 3966)
|
||||||
|
|
||||||
#line 66 "..\..\Views\Job\JobParts\Resources.cshtml"
|
#line 68 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||||
, Tuple.Create(Tuple.Create("", 3793), Tuple.Create<System.Object, System.Int32>(ja.Comments
|
, Tuple.Create(Tuple.Create("", 3954), Tuple.Create<System.Object, System.Int32>(ja.Comments
|
||||||
|
|
||||||
#line default
|
#line default
|
||||||
#line hidden
|
#line hidden
|
||||||
, 3793), false)
|
, 3954), false)
|
||||||
);
|
);
|
||||||
|
|
||||||
WriteLiteral(">\r\n");
|
WriteLiteral(">\r\n");
|
||||||
|
|
||||||
|
|
||||||
#line 67 "..\..\Views\Job\JobParts\Resources.cshtml"
|
#line 69 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||||
|
|
||||||
|
|
||||||
#line default
|
#line default
|
||||||
#line hidden
|
#line hidden
|
||||||
|
|
||||||
#line 67 "..\..\Views\Job\JobParts\Resources.cshtml"
|
#line 69 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||||
if (!string.IsNullOrEmpty(ja.DocumentTemplateId))
|
if (!string.IsNullOrEmpty(ja.DocumentTemplateId))
|
||||||
{
|
{
|
||||||
|
|
||||||
#line default
|
|
||||||
#line hidden
|
|
||||||
|
|
||||||
#line 68 "..\..\Views\Job\JobParts\Resources.cshtml"
|
|
||||||
Write(ja.DocumentTemplate.Description);
|
|
||||||
|
|
||||||
|
|
||||||
#line default
|
|
||||||
#line hidden
|
|
||||||
|
|
||||||
#line 68 "..\..\Views\Job\JobParts\Resources.cshtml"
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
|
|
||||||
#line default
|
#line default
|
||||||
#line hidden
|
#line hidden
|
||||||
|
|
||||||
#line 70 "..\..\Views\Job\JobParts\Resources.cshtml"
|
#line 70 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||||
Write(ja.Comments);
|
Write(ja.DocumentTemplate.Description);
|
||||||
|
|
||||||
|
|
||||||
#line default
|
#line default
|
||||||
#line hidden
|
#line hidden
|
||||||
|
|
||||||
#line 70 "..\..\Views\Job\JobParts\Resources.cshtml"
|
#line 70 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
|
||||||
|
#line default
|
||||||
|
#line hidden
|
||||||
|
|
||||||
|
#line 72 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||||
|
Write(ja.Comments);
|
||||||
|
|
||||||
|
|
||||||
|
#line default
|
||||||
|
#line hidden
|
||||||
|
|
||||||
|
#line 72 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||||
|
}
|
||||||
|
|
||||||
#line default
|
#line default
|
||||||
#line hidden
|
#line hidden
|
||||||
@@ -484,7 +507,7 @@ WriteLiteral(" class=\"author\"");
|
|||||||
WriteLiteral(">");
|
WriteLiteral(">");
|
||||||
|
|
||||||
|
|
||||||
#line 71 "..\..\Views\Job\JobParts\Resources.cshtml"
|
#line 73 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||||
Write(ja.TechUser.ToStringFriendly());
|
Write(ja.TechUser.ToStringFriendly());
|
||||||
|
|
||||||
|
|
||||||
@@ -493,9 +516,9 @@ WriteLiteral(">");
|
|||||||
WriteLiteral("</span>");
|
WriteLiteral("</span>");
|
||||||
|
|
||||||
|
|
||||||
#line 71 "..\..\Views\Job\JobParts\Resources.cshtml"
|
#line 73 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||||
if (canRemoveAnyAttachments || (canRemoveOwnAttachments && ja.TechUserId.Equals(CurrentUser.UserId, StringComparison.OrdinalIgnoreCase)))
|
if (canRemoveAnyAttachments || (canRemoveOwnAttachments && ja.TechUserId.Equals(CurrentUser.UserId, StringComparison.OrdinalIgnoreCase)))
|
||||||
{
|
{
|
||||||
|
|
||||||
#line default
|
#line default
|
||||||
#line hidden
|
#line hidden
|
||||||
@@ -506,8 +529,8 @@ WriteLiteral(" class=\"remove fa fa-times-circle\"");
|
|||||||
WriteLiteral("></span>");
|
WriteLiteral("></span>");
|
||||||
|
|
||||||
|
|
||||||
#line 72 "..\..\Views\Job\JobParts\Resources.cshtml"
|
#line 74 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||||
}
|
}
|
||||||
|
|
||||||
#line default
|
#line default
|
||||||
#line hidden
|
#line hidden
|
||||||
@@ -518,37 +541,37 @@ WriteLiteral(" class=\"timestamp\"");
|
|||||||
WriteLiteral(" data-livestamp=\"");
|
WriteLiteral(" data-livestamp=\"");
|
||||||
|
|
||||||
|
|
||||||
#line 72 "..\..\Views\Job\JobParts\Resources.cshtml"
|
#line 74 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||||
Write(ja.Timestamp.ToUnixEpoc());
|
Write(ja.Timestamp.ToUnixEpoc());
|
||||||
|
|
||||||
|
|
||||||
#line default
|
#line default
|
||||||
#line hidden
|
#line hidden
|
||||||
WriteLiteral("\"");
|
WriteLiteral("\"");
|
||||||
|
|
||||||
WriteAttribute("title", Tuple.Create(" title=\"", 4541), Tuple.Create("\"", 4579)
|
WriteAttribute("title", Tuple.Create(" title=\"", 4634), Tuple.Create("\"", 4672)
|
||||||
|
|
||||||
#line 72 "..\..\Views\Job\JobParts\Resources.cshtml"
|
#line 74 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||||
, Tuple.Create(Tuple.Create("", 4549), Tuple.Create<System.Object, System.Int32>(ja.Timestamp.ToFullDateTime()
|
, Tuple.Create(Tuple.Create("", 4642), Tuple.Create<System.Object, System.Int32>(ja.Timestamp.ToFullDateTime()
|
||||||
|
|
||||||
#line default
|
#line default
|
||||||
#line hidden
|
#line hidden
|
||||||
, 4549), false)
|
, 4642), false)
|
||||||
);
|
);
|
||||||
|
|
||||||
WriteLiteral(">");
|
WriteLiteral(">");
|
||||||
|
|
||||||
|
|
||||||
#line 72 "..\..\Views\Job\JobParts\Resources.cshtml"
|
#line 74 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||||
Write(ja.Timestamp.ToFullDateTime());
|
Write(ja.Timestamp.ToFullDateTime());
|
||||||
|
|
||||||
|
|
||||||
#line default
|
#line default
|
||||||
#line hidden
|
#line hidden
|
||||||
WriteLiteral("</span>\r\n </a> \r\n");
|
WriteLiteral("</span>\r\n </a>\r\n");
|
||||||
|
|
||||||
|
|
||||||
#line 74 "..\..\Views\Job\JobParts\Resources.cshtml"
|
#line 76 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -557,13 +580,13 @@ WriteLiteral("</span>\r\n </a> \r\n");
|
|||||||
WriteLiteral(" </div>\r\n");
|
WriteLiteral(" </div>\r\n");
|
||||||
|
|
||||||
|
|
||||||
#line 76 "..\..\Views\Job\JobParts\Resources.cshtml"
|
#line 78 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||||
|
|
||||||
|
|
||||||
#line default
|
#line default
|
||||||
#line hidden
|
#line hidden
|
||||||
|
|
||||||
#line 76 "..\..\Views\Job\JobParts\Resources.cshtml"
|
#line 78 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||||
if (canAddAttachments)
|
if (canAddAttachments)
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -595,7 +618,7 @@ WriteLiteral(" title=\"Capture Image\"");
|
|||||||
WriteLiteral("></span>\r\n </div>\r\n");
|
WriteLiteral("></span>\r\n </div>\r\n");
|
||||||
|
|
||||||
|
|
||||||
#line 82 "..\..\Views\Job\JobParts\Resources.cshtml"
|
#line 84 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -604,7 +627,7 @@ WriteLiteral("></span>\r\n </div>\r\n");
|
|||||||
WriteLiteral(" </div>\r\n </td>\r\n");
|
WriteLiteral(" </div>\r\n </td>\r\n");
|
||||||
|
|
||||||
|
|
||||||
#line 85 "..\..\Views\Job\JobParts\Resources.cshtml"
|
#line 87 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -613,7 +636,7 @@ WriteLiteral(" </div>\r\n </td>\r\n");
|
|||||||
WriteLiteral(" </tr>\r\n</table>\r\n");
|
WriteLiteral(" </tr>\r\n</table>\r\n");
|
||||||
|
|
||||||
|
|
||||||
#line 88 "..\..\Views\Job\JobParts\Resources.cshtml"
|
#line 90 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||||
if (canShowLogs && (canRemoveAnyLogs || canRemoveOwnLogs))
|
if (canShowLogs && (canRemoveAnyLogs || canRemoveOwnLogs))
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -635,14 +658,14 @@ WriteLiteral(" class=\"fa fa-exclamation-triangle fa-lg\"");
|
|||||||
WriteLiteral("></i> Are you sure?\r\n </p>\r\n </div>\r\n");
|
WriteLiteral("></i> Are you sure?\r\n </p>\r\n </div>\r\n");
|
||||||
|
|
||||||
|
|
||||||
#line 95 "..\..\Views\Job\JobParts\Resources.cshtml"
|
#line 97 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#line default
|
#line default
|
||||||
#line hidden
|
#line hidden
|
||||||
|
|
||||||
#line 96 "..\..\Views\Job\JobParts\Resources.cshtml"
|
#line 98 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||||
if (canShowAttachments && (canRemoveAnyAttachments || canRemoveOwnAttachments))
|
if (canShowAttachments && (canRemoveAnyAttachments || canRemoveOwnAttachments))
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -664,14 +687,14 @@ WriteLiteral(" class=\"fa fa-exclamation-triangle fa-lg\"");
|
|||||||
WriteLiteral("></i> Are you sure?\r\n </p>\r\n </div>\r\n");
|
WriteLiteral("></i> Are you sure?\r\n </p>\r\n </div>\r\n");
|
||||||
|
|
||||||
|
|
||||||
#line 103 "..\..\Views\Job\JobParts\Resources.cshtml"
|
#line 105 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#line default
|
#line default
|
||||||
#line hidden
|
#line hidden
|
||||||
|
|
||||||
#line 104 "..\..\Views\Job\JobParts\Resources.cshtml"
|
#line 106 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||||
if (canShowLogs)
|
if (canShowLogs)
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -683,7 +706,7 @@ WriteLiteral(" <script>\r\n if (!document.DiscoFunctions) {\r\n
|
|||||||
"arseInt(\'");
|
"arseInt(\'");
|
||||||
|
|
||||||
|
|
||||||
#line 112 "..\..\Views\Job\JobParts\Resources.cshtml"
|
#line 114 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||||
Write(Model.Job.Id);
|
Write(Model.Job.Id);
|
||||||
|
|
||||||
|
|
||||||
@@ -708,13 +731,13 @@ WriteLiteral(@"');
|
|||||||
");
|
");
|
||||||
|
|
||||||
|
|
||||||
#line 128 "..\..\Views\Job\JobParts\Resources.cshtml"
|
#line 130 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||||
|
|
||||||
|
|
||||||
#line default
|
#line default
|
||||||
#line hidden
|
#line hidden
|
||||||
|
|
||||||
#line 128 "..\..\Views\Job\JobParts\Resources.cshtml"
|
#line 130 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||||
if (canAddLogs)
|
if (canAddLogs)
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -752,7 +775,7 @@ WriteLiteral(@"
|
|||||||
url: '");
|
url: '");
|
||||||
|
|
||||||
|
|
||||||
#line 158 "..\..\Views\Job\JobParts\Resources.cshtml"
|
#line 160 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||||
Write(Url.Action(MVC.API.Job.CommentPost(Model.Job.Id, null)));
|
Write(Url.Action(MVC.API.Job.CommentPost(Model.Job.Id, null)));
|
||||||
|
|
||||||
|
|
||||||
@@ -782,7 +805,7 @@ WriteLiteral(@"',
|
|||||||
");
|
");
|
||||||
|
|
||||||
|
|
||||||
#line 179 "..\..\Views\Job\JobParts\Resources.cshtml"
|
#line 181 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -791,7 +814,7 @@ WriteLiteral(@"',
|
|||||||
WriteLiteral(" ");
|
WriteLiteral(" ");
|
||||||
|
|
||||||
|
|
||||||
#line 180 "..\..\Views\Job\JobParts\Resources.cshtml"
|
#line 182 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||||
if (canRemoveAnyLogs || canRemoveOwnLogs)
|
if (canRemoveAnyLogs || canRemoveOwnLogs)
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -825,7 +848,7 @@ WriteLiteral(@"
|
|||||||
url: '");
|
url: '");
|
||||||
|
|
||||||
|
|
||||||
#line 206 "..\..\Views\Job\JobParts\Resources.cshtml"
|
#line 208 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||||
Write(Url.Action(MVC.API.Job.CommentRemove()));
|
Write(Url.Action(MVC.API.Job.CommentRemove()));
|
||||||
|
|
||||||
|
|
||||||
@@ -863,7 +886,7 @@ WriteLiteral(@"',
|
|||||||
");
|
");
|
||||||
|
|
||||||
|
|
||||||
#line 235 "..\..\Views\Job\JobParts\Resources.cshtml"
|
#line 237 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -873,7 +896,7 @@ WriteLiteral("\r\n function loadLiveComment(key) {\r\n
|
|||||||
" url: \'");
|
" url: \'");
|
||||||
|
|
||||||
|
|
||||||
#line 239 "..\..\Views\Job\JobParts\Resources.cshtml"
|
#line 241 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||||
Write(Url.Action(MVC.API.Job.Comment()));
|
Write(Url.Action(MVC.API.Job.Comment()));
|
||||||
|
|
||||||
|
|
||||||
@@ -884,13 +907,13 @@ WriteLiteral("\',\r\n dataType: \'json\',\r\n
|
|||||||
"d.JobId == jobId) {\r\n");
|
"d.JobId == jobId) {\r\n");
|
||||||
|
|
||||||
|
|
||||||
#line 244 "..\..\Views\Job\JobParts\Resources.cshtml"
|
#line 246 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||||
|
|
||||||
|
|
||||||
#line default
|
#line default
|
||||||
#line hidden
|
#line hidden
|
||||||
|
|
||||||
#line 244 "..\..\Views\Job\JobParts\Resources.cshtml"
|
#line 246 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||||
if (canRemoveAnyLogs)
|
if (canRemoveAnyLogs)
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -899,7 +922,7 @@ WriteLiteral("\',\r\n dataType: \'json\',\r\n
|
|||||||
WriteLiteral("addComment(d, false, true);");
|
WriteLiteral("addComment(d, false, true);");
|
||||||
|
|
||||||
|
|
||||||
#line 245 "..\..\Views\Job\JobParts\Resources.cshtml"
|
#line 247 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||||
}
|
}
|
||||||
else if (canRemoveOwnLogs)
|
else if (canRemoveOwnLogs)
|
||||||
{
|
{
|
||||||
@@ -909,7 +932,7 @@ WriteLiteral("addComment(d, false, true);");
|
|||||||
WriteLiteral("addComment(d, false, (d.AuthorId === \'");
|
WriteLiteral("addComment(d, false, (d.AuthorId === \'");
|
||||||
|
|
||||||
|
|
||||||
#line 247 "..\..\Views\Job\JobParts\Resources.cshtml"
|
#line 249 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||||
Write(CurrentUser.UserId);
|
Write(CurrentUser.UserId);
|
||||||
|
|
||||||
|
|
||||||
@@ -918,7 +941,7 @@ WriteLiteral("addComment(d, false, (d.AuthorId === \'");
|
|||||||
WriteLiteral("\'));");
|
WriteLiteral("\'));");
|
||||||
|
|
||||||
|
|
||||||
#line 247 "..\..\Views\Job\JobParts\Resources.cshtml"
|
#line 249 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -928,7 +951,7 @@ WriteLiteral("\'));");
|
|||||||
WriteLiteral("addComment(d, false, false);");
|
WriteLiteral("addComment(d, false, false);");
|
||||||
|
|
||||||
|
|
||||||
#line 249 "..\..\Views\Job\JobParts\Resources.cshtml"
|
#line 251 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -962,14 +985,14 @@ WriteLiteral("\r\n }\r\n },\r\n
|
|||||||
"= liveRemoveComment;\r\n //#endregion\r\n });\r\n </script>\r\n");
|
"= liveRemoveComment;\r\n //#endregion\r\n });\r\n </script>\r\n");
|
||||||
|
|
||||||
|
|
||||||
#line 297 "..\..\Views\Job\JobParts\Resources.cshtml"
|
#line 299 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#line default
|
#line default
|
||||||
#line hidden
|
#line hidden
|
||||||
|
|
||||||
#line 298 "..\..\Views\Job\JobParts\Resources.cshtml"
|
#line 300 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||||
if (canShowAttachments)
|
if (canShowAttachments)
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -990,7 +1013,7 @@ WriteLiteral(@" <script>
|
|||||||
var jobId = parseInt('");
|
var jobId = parseInt('");
|
||||||
|
|
||||||
|
|
||||||
#line 311 "..\..\Views\Job\JobParts\Resources.cshtml"
|
#line 313 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||||
Write(Model.Job.Id);
|
Write(Model.Job.Id);
|
||||||
|
|
||||||
|
|
||||||
@@ -1001,58 +1024,47 @@ WriteLiteral("\');\r\n\r\n //#region Attachments\r\n var $
|
|||||||
"tput\');\r\n\r\n");
|
"tput\');\r\n\r\n");
|
||||||
|
|
||||||
|
|
||||||
#line 317 "..\..\Views\Job\JobParts\Resources.cshtml"
|
#line 319 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||||
|
|
||||||
|
|
||||||
#line default
|
#line default
|
||||||
#line hidden
|
#line hidden
|
||||||
|
|
||||||
#line 317 "..\..\Views\Job\JobParts\Resources.cshtml"
|
#line 319 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||||
if (canAddAttachments)
|
if (canAddAttachments)
|
||||||
{
|
{
|
||||||
|
|
||||||
#line default
|
#line default
|
||||||
#line hidden
|
#line hidden
|
||||||
WriteLiteral("\r\n //#region Add Attachments\r\n var attachmentUploader = new" +
|
WriteLiteral("\r\n //#region Add Attachments\r\n var attachmentUploader = new" +
|
||||||
" document.Disco.AttachmentUploader(\r\n \'");
|
" document.Disco.AttachmentUploader($Attachments);\r\n\r\n var $attachment" +
|
||||||
|
"Input = $Attachments.find(\'.attachmentInput\');\r\n if (window.location." +
|
||||||
|
"protocol != \'https:\') {\r\n $attachmentInput.find(\'.photo\')\r\n " +
|
||||||
|
" .removeClass(\'enabled\')\r\n .addClass(\'disabled\')" +
|
||||||
|
"\r\n .attr(\'title\', \'Capture Image: this functionality is only " +
|
||||||
|
"available over a HTTPS connection\');\r\n }\r\n $attachmentInpu" +
|
||||||
|
"t.find(\'.photo\').click(function () {\r\n if (!$(this).hasClass(\'ena" +
|
||||||
|
"bled\'))\r\n alert(\'This functionality is only available over a " +
|
||||||
|
"HTTPS connection\');\r\n else if ($(this).hasClass(\'disabled\'))\r\n " +
|
||||||
|
" alert(\'Disconnected from the Disco ICT Server, please refresh t" +
|
||||||
|
"his page and try again\');\r\n else\r\n attachmentU" +
|
||||||
|
"ploader.uploadImage();\r\n });\r\n $attachmentInput.find(\'.upl" +
|
||||||
|
"oad\').click(function () {\r\n if ($(this).hasClass(\'disabled\'))\r\n " +
|
||||||
|
" alert(\'Disconnected from the Disco ICT Server, please refresh " +
|
||||||
|
"this page and try again\');\r\n else\r\n attachment" +
|
||||||
|
"Uploader.uploadFiles();\r\n });\r\n\r\n var resourcesTab;\r\n " +
|
||||||
|
" $(document).on(\'dragover\', function () {\r\n if (!resourcesT" +
|
||||||
|
"ab) {\r\n var tabs = $Attachments.closest(\'.ui-tabs\');\r\n " +
|
||||||
|
" resourcesTab = {\r\n tabs: tabs,\r\n " +
|
||||||
|
" resourcesIndex: tabs.children(\'ul.ui-tabs-nav\').find(\'a[href=\"#jobDe" +
|
||||||
|
"tailTab-Resources\"]\').closest(\'li\').index()\r\n };\r\n " +
|
||||||
|
" }\r\n var selectedIndex = resourcesTab.tabs.tabs(\'option\', \'ac" +
|
||||||
|
"tive\');\r\n if (resourcesTab.resourcesIndex !== selectedIndex)\r\n " +
|
||||||
|
" resourcesTab.tabs.tabs(\'option\', \'active\', resourcesTab.resourc" +
|
||||||
|
"esIndex);\r\n });\r\n //#endregion\r\n ");
|
||||||
|
|
||||||
|
|
||||||
#line 321 "..\..\Views\Job\JobParts\Resources.cshtml"
|
#line 360 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||||
Write(Url.Action(MVC.API.Job.AttachmentUpload(Model.Job.Id, null)));
|
|
||||||
|
|
||||||
|
|
||||||
#line default
|
|
||||||
#line hidden
|
|
||||||
WriteLiteral("\',\r\n $Attachments.find(\'.Disco-AttachmentUpload-DropTarget\'),\r\n " +
|
|
||||||
" $Attachments.find(\'.Disco-AttachmentUpload-Progress\'));\r\n\r\n " +
|
|
||||||
" var $attachmentInput = $Attachments.find(\'.attachmentInput\');\r\n i" +
|
|
||||||
"f (window.location.protocol != \'https:\') {\r\n $attachmentInput.fin" +
|
|
||||||
"d(\'.photo\')\r\n .removeClass(\'enabled\')\r\n .a" +
|
|
||||||
"ddClass(\'disabled\')\r\n .attr(\'title\', \'Capture Image: this fun" +
|
|
||||||
"ctionality is only available over a HTTPS connection\');\r\n }\r\n " +
|
|
||||||
" $attachmentInput.find(\'.photo\').click(function () {\r\n if (!$(" +
|
|
||||||
"this).hasClass(\'enabled\'))\r\n alert(\'This functionality is onl" +
|
|
||||||
"y available over a HTTPS connection\');\r\n else if ($(this).hasClas" +
|
|
||||||
"s(\'disabled\'))\r\n alert(\'Disconnected from the Disco ICT Serve" +
|
|
||||||
"r, please refresh this page and try again\');\r\n else\r\n " +
|
|
||||||
" attachmentUploader.uploadImage();\r\n });\r\n $attachm" +
|
|
||||||
"entInput.find(\'.upload\').click(function () {\r\n if ($(this).hasCla" +
|
|
||||||
"ss(\'disabled\'))\r\n alert(\'Disconnected from the Disco ICT Serv" +
|
|
||||||
"er, please refresh this page and try again\');\r\n else\r\n " +
|
|
||||||
" attachmentUploader.uploadFiles();\r\n });\r\n\r\n var r" +
|
|
||||||
"esourcesTab;\r\n $(document).on(\'dragover\', function () {\r\n " +
|
|
||||||
" if (!resourcesTab) {\r\n var tabs = $Attachments.closest(\'." +
|
|
||||||
"ui-tabs\');\r\n resourcesTab = {\r\n tabs: " +
|
|
||||||
"tabs,\r\n resourcesIndex: tabs.children(\'ul.ui-tabs-nav\').f" +
|
|
||||||
"ind(\'a[href=\"#jobDetailTab-Resources\"]\').closest(\'li\').index()\r\n " +
|
|
||||||
" };\r\n }\r\n var selectedIndex = resourcesTab.tabs" +
|
|
||||||
".tabs(\'option\', \'active\');\r\n if (resourcesTab.resourcesIndex !== " +
|
|
||||||
"selectedIndex)\r\n resourcesTab.tabs.tabs(\'option\', \'active\', r" +
|
|
||||||
"esourcesTab.resourcesIndex);\r\n });\r\n //#endregion\r\n " +
|
|
||||||
" ");
|
|
||||||
|
|
||||||
|
|
||||||
#line 361 "..\..\Views\Job\JobParts\Resources.cshtml"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -1061,13 +1073,13 @@ WriteLiteral("\',\r\n $Attachments.find(\'.Disco-AttachmentUpload
|
|||||||
WriteLiteral("\r\n");
|
WriteLiteral("\r\n");
|
||||||
|
|
||||||
|
|
||||||
#line 363 "..\..\Views\Job\JobParts\Resources.cshtml"
|
#line 362 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||||
|
|
||||||
|
|
||||||
#line default
|
#line default
|
||||||
#line hidden
|
#line hidden
|
||||||
|
|
||||||
#line 363 "..\..\Views\Job\JobParts\Resources.cshtml"
|
#line 362 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||||
if (canRemoveAnyAttachments || canRemoveOwnAttachments)
|
if (canRemoveAnyAttachments || canRemoveOwnAttachments)
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -1102,7 +1114,7 @@ WriteLiteral(@"
|
|||||||
url: '");
|
url: '");
|
||||||
|
|
||||||
|
|
||||||
#line 390 "..\..\Views\Job\JobParts\Resources.cshtml"
|
#line 389 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||||
Write(Url.Action(MVC.API.Job.AttachmentRemove()));
|
Write(Url.Action(MVC.API.Job.AttachmentRemove()));
|
||||||
|
|
||||||
|
|
||||||
@@ -1138,7 +1150,7 @@ WriteLiteral(@"',
|
|||||||
");
|
");
|
||||||
|
|
||||||
|
|
||||||
#line 417 "..\..\Views\Job\JobParts\Resources.cshtml"
|
#line 416 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -1148,7 +1160,7 @@ WriteLiteral("\r\n function addAttachment(key, quick) {\r\n
|
|||||||
"id: key };\r\n $.ajax({\r\n url: \'");
|
"id: key };\r\n $.ajax({\r\n url: \'");
|
||||||
|
|
||||||
|
|
||||||
#line 422 "..\..\Views\Job\JobParts\Resources.cshtml"
|
#line 421 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||||
Write(Url.Action(MVC.API.Job.Attachment()));
|
Write(Url.Action(MVC.API.Job.Attachment()));
|
||||||
|
|
||||||
|
|
||||||
@@ -1159,13 +1171,13 @@ WriteLiteral("\',\r\n dataType: \'json\',\r\n
|
|||||||
"\'OK\') {\r\n var a = d.Attachment;\r\n");
|
"\'OK\') {\r\n var a = d.Attachment;\r\n");
|
||||||
|
|
||||||
|
|
||||||
#line 428 "..\..\Views\Job\JobParts\Resources.cshtml"
|
#line 427 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||||
|
|
||||||
|
|
||||||
#line default
|
#line default
|
||||||
#line hidden
|
#line hidden
|
||||||
|
|
||||||
#line 428 "..\..\Views\Job\JobParts\Resources.cshtml"
|
#line 427 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||||
if (canRemoveAnyAttachments)
|
if (canRemoveAnyAttachments)
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -1179,7 +1191,7 @@ WriteLiteral("buildAttachment(a, true, quick);");
|
|||||||
WriteLiteral("\r\n");
|
WriteLiteral("\r\n");
|
||||||
|
|
||||||
|
|
||||||
#line 431 "..\..\Views\Job\JobParts\Resources.cshtml"
|
#line 430 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||||
}
|
}
|
||||||
else if (canRemoveOwnAttachments)
|
else if (canRemoveOwnAttachments)
|
||||||
{
|
{
|
||||||
@@ -1192,7 +1204,7 @@ WriteLiteral(" ");
|
|||||||
WriteLiteral("buildAttachment(a, (a.AuthorId === \'");
|
WriteLiteral("buildAttachment(a, (a.AuthorId === \'");
|
||||||
|
|
||||||
|
|
||||||
#line 434 "..\..\Views\Job\JobParts\Resources.cshtml"
|
#line 433 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||||
Write(CurrentUser.UserId);
|
Write(CurrentUser.UserId);
|
||||||
|
|
||||||
|
|
||||||
@@ -1203,7 +1215,7 @@ WriteLiteral("\'), quick);");
|
|||||||
WriteLiteral("\r\n");
|
WriteLiteral("\r\n");
|
||||||
|
|
||||||
|
|
||||||
#line 435 "..\..\Views\Job\JobParts\Resources.cshtml"
|
#line 434 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -1218,7 +1230,7 @@ WriteLiteral("buildAttachment(a, false, quick);");
|
|||||||
WriteLiteral("\r\n");
|
WriteLiteral("\r\n");
|
||||||
|
|
||||||
|
|
||||||
#line 439 "..\..\Views\Job\JobParts\Resources.cshtml"
|
#line 438 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -1245,7 +1257,7 @@ WriteLiteral(@" } else {
|
|||||||
e.attr('data-attachmentid', a.Id).attr('data-mimetype', a.MimeType).attr('href', '");
|
e.attr('data-attachmentid', a.Id).attr('data-mimetype', a.MimeType).attr('href', '");
|
||||||
|
|
||||||
|
|
||||||
#line 458 "..\..\Views\Job\JobParts\Resources.cshtml"
|
#line 457 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||||
Write(Url.Action(MVC.API.Job.AttachmentDownload()));
|
Write(Url.Action(MVC.API.Job.AttachmentDownload()));
|
||||||
|
|
||||||
|
|
||||||
@@ -1277,7 +1289,7 @@ WriteLiteral(@"/' + a.Id);
|
|||||||
img.attr('src', '");
|
img.attr('src', '");
|
||||||
|
|
||||||
|
|
||||||
#line 481 "..\..\Views\Job\JobParts\Resources.cshtml"
|
#line 480 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||||
Write(Url.Action(MVC.API.Job.AttachmentThumbnail()));
|
Write(Url.Action(MVC.API.Job.AttachmentThumbnail()));
|
||||||
|
|
||||||
|
|
||||||
@@ -1324,14 +1336,14 @@ WriteLiteral("/\' + a.Id + \'?v=\' + retryCount);\r\n };\
|
|||||||
"script>\r\n");
|
"script>\r\n");
|
||||||
|
|
||||||
|
|
||||||
#line 551 "..\..\Views\Job\JobParts\Resources.cshtml"
|
#line 550 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#line default
|
#line default
|
||||||
#line hidden
|
#line hidden
|
||||||
|
|
||||||
#line 552 "..\..\Views\Job\JobParts\Resources.cshtml"
|
#line 551 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||||
if (canShowLogs || canShowAttachments)
|
if (canShowLogs || canShowAttachments)
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -1341,7 +1353,7 @@ WriteLiteral("/\' + a.Id + \'?v=\' + retryCount);\r\n };\
|
|||||||
WriteLiteral(" <script>\r\n $(function () {\r\n var jobId = parseInt(\'");
|
WriteLiteral(" <script>\r\n $(function () {\r\n var jobId = parseInt(\'");
|
||||||
|
|
||||||
|
|
||||||
#line 556 "..\..\Views\Job\JobParts\Resources.cshtml"
|
#line 555 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||||
Write(Model.Job.Id);
|
Write(Model.Job.Id);
|
||||||
|
|
||||||
|
|
||||||
@@ -1351,7 +1363,7 @@ WriteLiteral("\');\r\n\r\n //#region LiveEvents\r\n var hu
|
|||||||
"dates;\r\n\r\n // Map Functions\r\n");
|
"dates;\r\n\r\n // Map Functions\r\n");
|
||||||
|
|
||||||
|
|
||||||
#line 562 "..\..\Views\Job\JobParts\Resources.cshtml"
|
#line 561 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||||
if (canShowLogs)
|
if (canShowLogs)
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -1362,14 +1374,14 @@ WriteLiteral("\r\n hub.client.addLog = document.DiscoFunctions.liveLo
|
|||||||
" ");
|
" ");
|
||||||
|
|
||||||
|
|
||||||
#line 566 "..\..\Views\Job\JobParts\Resources.cshtml"
|
#line 565 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#line default
|
#line default
|
||||||
#line hidden
|
#line hidden
|
||||||
|
|
||||||
#line 567 "..\..\Views\Job\JobParts\Resources.cshtml"
|
#line 566 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||||
if (canShowAttachments)
|
if (canShowAttachments)
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -1390,7 +1402,7 @@ WriteLiteral(@"
|
|||||||
");
|
");
|
||||||
|
|
||||||
|
|
||||||
#line 580 "..\..\Views\Job\JobParts\Resources.cshtml"
|
#line 579 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -1432,7 +1444,7 @@ WriteLiteral("\r\n $.connection.hub.qs = { JobId: jobId };\r\n
|
|||||||
"egion\r\n });\r\n </script>\r\n");
|
"egion\r\n });\r\n </script>\r\n");
|
||||||
|
|
||||||
|
|
||||||
#line 633 "..\..\Views\Job\JobParts\Resources.cshtml"
|
#line 632 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||||
}
|
}
|
||||||
|
|
||||||
#line default
|
#line default
|
||||||
|
|||||||
@@ -19,7 +19,8 @@
|
|||||||
<table id="userShowResources">
|
<table id="userShowResources">
|
||||||
<tr>
|
<tr>
|
||||||
<td id="AttachmentsContainer">
|
<td id="AttachmentsContainer">
|
||||||
<div id="Attachments" class="@(canAddAttachments ? "canAddAttachments" : "cannotAddAttachments")">
|
<div id="Attachments" class="@(canAddAttachments ? "canAddAttachments" : "cannotAddAttachments")" data-uploadurl="@(Url.Action(MVC.API.User.AttachmentUpload(Model.User.UserId, null)))">
|
||||||
|
@Html.AntiForgeryToken()
|
||||||
<div class="Disco-AttachmentUpload-DropTarget">
|
<div class="Disco-AttachmentUpload-DropTarget">
|
||||||
<h2>Drop Attachments Here</h2>
|
<h2>Drop Attachments Here</h2>
|
||||||
</div>
|
</div>
|
||||||
@@ -28,17 +29,18 @@
|
|||||||
{
|
{
|
||||||
foreach (var ua in Model.User.UserAttachments)
|
foreach (var ua in Model.User.UserAttachments)
|
||||||
{
|
{
|
||||||
<a href="@Url.Action(MVC.API.User.AttachmentDownload(ua.Id))" data-attachmentid="@ua.Id" data-mimetype="@ua.MimeType">
|
<a href="@Url.Action(MVC.API.User.AttachmentDownload(ua.Id))" data-attachmentid="@ua.Id" data-mimetype="@ua.MimeType">
|
||||||
<span class="icon" title="@ua.Filename">
|
<span class="icon" title="@ua.Filename">
|
||||||
<img alt="Attachment Thumbnail" src="@(Url.Action(MVC.API.User.AttachmentThumbnail(ua.Id)))" /></span>
|
<img alt="Attachment Thumbnail" src="@(Url.Action(MVC.API.User.AttachmentThumbnail(ua.Id)))" />
|
||||||
<span class="comments" title="@ua.Comments">
|
</span>
|
||||||
@{if (!string.IsNullOrEmpty(ua.DocumentTemplateId))
|
<span class="comments" title="@ua.Comments">
|
||||||
{ @ua.DocumentTemplate.Description}
|
@{if (!string.IsNullOrEmpty(ua.DocumentTemplateId))
|
||||||
else
|
{ @ua.DocumentTemplate.Description}
|
||||||
{ @ua.Comments }}
|
else
|
||||||
</span><span class="author">@ua.TechUser.ToStringFriendly()</span>@if (canRemoveAnyAttachments || (canRemoveOwnAttachments && ua.TechUserId.Equals(CurrentUser.UserId, StringComparison.OrdinalIgnoreCase)))
|
{ @ua.Comments }}
|
||||||
{<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>
|
</span><span class="author">@ua.TechUser.ToStringFriendly()</span>@if (canRemoveAnyAttachments || (canRemoveOwnAttachments && ua.TechUserId.Equals(CurrentUser.UserId, StringComparison.OrdinalIgnoreCase)))
|
||||||
</a>
|
{<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>
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
@@ -232,10 +234,7 @@
|
|||||||
@if (canAddAttachments)
|
@if (canAddAttachments)
|
||||||
{<text>
|
{<text>
|
||||||
//#region Add Attachments
|
//#region Add Attachments
|
||||||
var attachmentUploader = new document.Disco.AttachmentUploader(
|
var attachmentUploader = new document.Disco.AttachmentUploader($Attachments);
|
||||||
'@(Url.Action(MVC.API.User.AttachmentUpload(Model.User.UserId, null)))',
|
|
||||||
$Attachments.find('.Disco-AttachmentUpload-DropTarget'),
|
|
||||||
$Attachments.find('.Disco-AttachmentUpload-Progress'));
|
|
||||||
|
|
||||||
var $attachmentInput = $Attachments.find('.attachmentInput');
|
var $attachmentInput = $Attachments.find('.attachmentInput');
|
||||||
if (window.location.protocol != 'https:') {
|
if (window.location.protocol != 'https:') {
|
||||||
|
|||||||
@@ -92,7 +92,29 @@ WriteAttribute("class", Tuple.Create(" class=\"", 872), Tuple.Create("\"", 947)
|
|||||||
, 880), false)
|
, 880), false)
|
||||||
);
|
);
|
||||||
|
|
||||||
WriteLiteral(">\r\n <div");
|
WriteLiteral(" data-uploadurl=\"");
|
||||||
|
|
||||||
|
|
||||||
|
#line 22 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||||
|
Write(Url.Action(MVC.API.User.AttachmentUpload(Model.User.UserId, null)));
|
||||||
|
|
||||||
|
|
||||||
|
#line default
|
||||||
|
#line hidden
|
||||||
|
WriteLiteral("\"");
|
||||||
|
|
||||||
|
WriteLiteral(">\r\n");
|
||||||
|
|
||||||
|
WriteLiteral(" ");
|
||||||
|
|
||||||
|
|
||||||
|
#line 23 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||||
|
Write(Html.AntiForgeryToken());
|
||||||
|
|
||||||
|
|
||||||
|
#line default
|
||||||
|
#line hidden
|
||||||
|
WriteLiteral("\r\n <div");
|
||||||
|
|
||||||
WriteLiteral(" class=\"Disco-AttachmentUpload-DropTarget\"");
|
WriteLiteral(" class=\"Disco-AttachmentUpload-DropTarget\"");
|
||||||
|
|
||||||
@@ -104,13 +126,13 @@ WriteLiteral(" class=\"attachmentOutput\"");
|
|||||||
WriteLiteral(">\r\n");
|
WriteLiteral(">\r\n");
|
||||||
|
|
||||||
|
|
||||||
#line 27 "..\..\Views\User\UserParts\_Resources.cshtml"
|
#line 28 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||||
|
|
||||||
|
|
||||||
#line default
|
#line default
|
||||||
#line hidden
|
#line hidden
|
||||||
|
|
||||||
#line 27 "..\..\Views\User\UserParts\_Resources.cshtml"
|
#line 28 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||||
if (Model.User.UserAttachments != null)
|
if (Model.User.UserAttachments != null)
|
||||||
{
|
{
|
||||||
foreach (var ua in Model.User.UserAttachments)
|
foreach (var ua in Model.User.UserAttachments)
|
||||||
@@ -119,23 +141,23 @@ WriteLiteral(">\r\n");
|
|||||||
|
|
||||||
#line default
|
#line default
|
||||||
#line hidden
|
#line hidden
|
||||||
WriteLiteral(" <a");
|
WriteLiteral(" <a");
|
||||||
|
|
||||||
WriteAttribute("href", Tuple.Create(" href=\"", 1386), Tuple.Create("\"", 1444)
|
WriteAttribute("href", Tuple.Create(" href=\"", 1523), Tuple.Create("\"", 1581)
|
||||||
|
|
||||||
#line 31 "..\..\Views\User\UserParts\_Resources.cshtml"
|
#line 32 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||||
, Tuple.Create(Tuple.Create("", 1393), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.API.User.AttachmentDownload(ua.Id))
|
, Tuple.Create(Tuple.Create("", 1530), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.API.User.AttachmentDownload(ua.Id))
|
||||||
|
|
||||||
#line default
|
#line default
|
||||||
#line hidden
|
#line hidden
|
||||||
, 1393), false)
|
, 1530), false)
|
||||||
);
|
);
|
||||||
|
|
||||||
WriteLiteral(" data-attachmentid=\"");
|
WriteLiteral(" data-attachmentid=\"");
|
||||||
|
|
||||||
|
|
||||||
#line 31 "..\..\Views\User\UserParts\_Resources.cshtml"
|
#line 32 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||||
Write(ua.Id);
|
Write(ua.Id);
|
||||||
|
|
||||||
|
|
||||||
#line default
|
#line default
|
||||||
@@ -145,108 +167,109 @@ WriteLiteral("\"");
|
|||||||
WriteLiteral(" data-mimetype=\"");
|
WriteLiteral(" data-mimetype=\"");
|
||||||
|
|
||||||
|
|
||||||
#line 31 "..\..\Views\User\UserParts\_Resources.cshtml"
|
#line 32 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||||
Write(ua.MimeType);
|
Write(ua.MimeType);
|
||||||
|
|
||||||
|
|
||||||
#line default
|
#line default
|
||||||
#line hidden
|
#line hidden
|
||||||
WriteLiteral("\"");
|
WriteLiteral("\"");
|
||||||
|
|
||||||
WriteLiteral(">\r\n <span");
|
WriteLiteral(">\r\n <span");
|
||||||
|
|
||||||
WriteLiteral(" class=\"icon\"");
|
WriteLiteral(" class=\"icon\"");
|
||||||
|
|
||||||
WriteAttribute("title", Tuple.Create(" title=\"", 1554), Tuple.Create("\"", 1574)
|
WriteAttribute("title", Tuple.Create(" title=\"", 1695), Tuple.Create("\"", 1715)
|
||||||
|
|
||||||
#line 32 "..\..\Views\User\UserParts\_Resources.cshtml"
|
#line 33 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||||
, Tuple.Create(Tuple.Create("", 1562), Tuple.Create<System.Object, System.Int32>(ua.Filename
|
, Tuple.Create(Tuple.Create("", 1703), Tuple.Create<System.Object, System.Int32>(ua.Filename
|
||||||
|
|
||||||
#line default
|
#line default
|
||||||
#line hidden
|
#line hidden
|
||||||
, 1562), false)
|
, 1703), false)
|
||||||
);
|
);
|
||||||
|
|
||||||
WriteLiteral(">\r\n <img");
|
WriteLiteral(">\r\n <img");
|
||||||
|
|
||||||
WriteLiteral(" alt=\"Attachment Thumbnail\"");
|
WriteLiteral(" alt=\"Attachment Thumbnail\"");
|
||||||
|
|
||||||
WriteAttribute("src", Tuple.Create(" src=\"", 1645), Tuple.Create("\"", 1705)
|
WriteAttribute("src", Tuple.Create(" src=\"", 1790), Tuple.Create("\"", 1850)
|
||||||
|
|
||||||
#line 33 "..\..\Views\User\UserParts\_Resources.cshtml"
|
#line 34 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||||
, Tuple.Create(Tuple.Create("", 1651), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.API.User.AttachmentThumbnail(ua.Id))
|
, Tuple.Create(Tuple.Create("", 1796), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.API.User.AttachmentThumbnail(ua.Id))
|
||||||
|
|
||||||
#line default
|
#line default
|
||||||
#line hidden
|
#line hidden
|
||||||
, 1651), false)
|
, 1796), false)
|
||||||
);
|
);
|
||||||
|
|
||||||
WriteLiteral(" /></span>\r\n <span");
|
WriteLiteral(" />\r\n </span>\r\n " +
|
||||||
|
" <span");
|
||||||
|
|
||||||
WriteLiteral(" class=\"comments\"");
|
WriteLiteral(" class=\"comments\"");
|
||||||
|
|
||||||
WriteAttribute("title", Tuple.Create(" title=\"", 1772), Tuple.Create("\"", 1792)
|
WriteAttribute("title", Tuple.Create(" title=\"", 1959), Tuple.Create("\"", 1979)
|
||||||
|
|
||||||
#line 34 "..\..\Views\User\UserParts\_Resources.cshtml"
|
#line 36 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||||
, Tuple.Create(Tuple.Create("", 1780), Tuple.Create<System.Object, System.Int32>(ua.Comments
|
, Tuple.Create(Tuple.Create("", 1967), Tuple.Create<System.Object, System.Int32>(ua.Comments
|
||||||
|
|
||||||
#line default
|
#line default
|
||||||
#line hidden
|
#line hidden
|
||||||
, 1780), false)
|
, 1967), false)
|
||||||
);
|
);
|
||||||
|
|
||||||
WriteLiteral(">\r\n");
|
WriteLiteral(">\r\n");
|
||||||
|
|
||||||
|
|
||||||
#line 35 "..\..\Views\User\UserParts\_Resources.cshtml"
|
#line 37 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||||
|
|
||||||
|
|
||||||
#line default
|
#line default
|
||||||
#line hidden
|
#line hidden
|
||||||
|
|
||||||
#line 35 "..\..\Views\User\UserParts\_Resources.cshtml"
|
#line 37 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||||
if (!string.IsNullOrEmpty(ua.DocumentTemplateId))
|
if (!string.IsNullOrEmpty(ua.DocumentTemplateId))
|
||||||
{
|
{
|
||||||
|
|
||||||
#line default
|
|
||||||
#line hidden
|
|
||||||
|
|
||||||
#line 36 "..\..\Views\User\UserParts\_Resources.cshtml"
|
|
||||||
Write(ua.DocumentTemplate.Description);
|
|
||||||
|
|
||||||
|
|
||||||
#line default
|
|
||||||
#line hidden
|
|
||||||
|
|
||||||
#line 36 "..\..\Views\User\UserParts\_Resources.cshtml"
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
|
|
||||||
#line default
|
#line default
|
||||||
#line hidden
|
#line hidden
|
||||||
|
|
||||||
#line 38 "..\..\Views\User\UserParts\_Resources.cshtml"
|
#line 38 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||||
Write(ua.Comments);
|
Write(ua.DocumentTemplate.Description);
|
||||||
|
|
||||||
|
|
||||||
#line default
|
#line default
|
||||||
#line hidden
|
#line hidden
|
||||||
|
|
||||||
#line 38 "..\..\Views\User\UserParts\_Resources.cshtml"
|
#line 38 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
|
||||||
#line default
|
#line default
|
||||||
#line hidden
|
#line hidden
|
||||||
WriteLiteral("\r\n </span><span");
|
|
||||||
|
#line 40 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||||
|
Write(ua.Comments);
|
||||||
|
|
||||||
|
|
||||||
|
#line default
|
||||||
|
#line hidden
|
||||||
|
|
||||||
|
#line 40 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||||
|
}
|
||||||
|
|
||||||
|
#line default
|
||||||
|
#line hidden
|
||||||
|
WriteLiteral("\r\n </span><span");
|
||||||
|
|
||||||
WriteLiteral(" class=\"author\"");
|
WriteLiteral(" class=\"author\"");
|
||||||
|
|
||||||
WriteLiteral(">");
|
WriteLiteral(">");
|
||||||
|
|
||||||
|
|
||||||
#line 39 "..\..\Views\User\UserParts\_Resources.cshtml"
|
#line 41 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||||
Write(ua.TechUser.ToStringFriendly());
|
Write(ua.TechUser.ToStringFriendly());
|
||||||
|
|
||||||
|
|
||||||
#line default
|
#line default
|
||||||
@@ -254,9 +277,9 @@ WriteLiteral(">");
|
|||||||
WriteLiteral("</span>");
|
WriteLiteral("</span>");
|
||||||
|
|
||||||
|
|
||||||
#line 39 "..\..\Views\User\UserParts\_Resources.cshtml"
|
#line 41 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||||
if (canRemoveAnyAttachments || (canRemoveOwnAttachments && ua.TechUserId.Equals(CurrentUser.UserId, StringComparison.OrdinalIgnoreCase)))
|
if (canRemoveAnyAttachments || (canRemoveOwnAttachments && ua.TechUserId.Equals(CurrentUser.UserId, StringComparison.OrdinalIgnoreCase)))
|
||||||
{
|
{
|
||||||
|
|
||||||
#line default
|
#line default
|
||||||
#line hidden
|
#line hidden
|
||||||
@@ -267,8 +290,8 @@ WriteLiteral(" class=\"remove fa fa-times-circle\"");
|
|||||||
WriteLiteral("></span>");
|
WriteLiteral("></span>");
|
||||||
|
|
||||||
|
|
||||||
#line 40 "..\..\Views\User\UserParts\_Resources.cshtml"
|
#line 42 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||||
}
|
}
|
||||||
|
|
||||||
#line default
|
#line default
|
||||||
#line hidden
|
#line hidden
|
||||||
@@ -279,37 +302,37 @@ WriteLiteral(" class=\"timestamp\"");
|
|||||||
WriteLiteral(" data-livestamp=\"");
|
WriteLiteral(" data-livestamp=\"");
|
||||||
|
|
||||||
|
|
||||||
#line 40 "..\..\Views\User\UserParts\_Resources.cshtml"
|
#line 42 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||||
Write(ua.Timestamp.ToUnixEpoc());
|
Write(ua.Timestamp.ToUnixEpoc());
|
||||||
|
|
||||||
|
|
||||||
#line default
|
#line default
|
||||||
#line hidden
|
#line hidden
|
||||||
WriteLiteral("\"");
|
WriteLiteral("\"");
|
||||||
|
|
||||||
WriteAttribute("title", Tuple.Create(" title=\"", 2528), Tuple.Create("\"", 2566)
|
WriteAttribute("title", Tuple.Create(" title=\"", 2671), Tuple.Create("\"", 2709)
|
||||||
|
|
||||||
#line 40 "..\..\Views\User\UserParts\_Resources.cshtml"
|
#line 42 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||||
, Tuple.Create(Tuple.Create("", 2536), Tuple.Create<System.Object, System.Int32>(ua.Timestamp.ToFullDateTime()
|
, Tuple.Create(Tuple.Create("", 2679), Tuple.Create<System.Object, System.Int32>(ua.Timestamp.ToFullDateTime()
|
||||||
|
|
||||||
#line default
|
#line default
|
||||||
#line hidden
|
#line hidden
|
||||||
, 2536), false)
|
, 2679), false)
|
||||||
);
|
);
|
||||||
|
|
||||||
WriteLiteral(">");
|
WriteLiteral(">");
|
||||||
|
|
||||||
|
|
||||||
#line 40 "..\..\Views\User\UserParts\_Resources.cshtml"
|
#line 42 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||||
Write(ua.Timestamp.ToFullDateTime());
|
Write(ua.Timestamp.ToFullDateTime());
|
||||||
|
|
||||||
|
|
||||||
#line default
|
#line default
|
||||||
#line hidden
|
#line hidden
|
||||||
WriteLiteral("</span>\r\n </a> \r\n");
|
WriteLiteral("</span>\r\n </a>\r\n");
|
||||||
|
|
||||||
|
|
||||||
#line 42 "..\..\Views\User\UserParts\_Resources.cshtml"
|
#line 44 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -319,13 +342,13 @@ WriteLiteral("</span>\r\n </a> \r\n");
|
|||||||
WriteLiteral(" </div>\r\n");
|
WriteLiteral(" </div>\r\n");
|
||||||
|
|
||||||
|
|
||||||
#line 45 "..\..\Views\User\UserParts\_Resources.cshtml"
|
#line 47 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||||
|
|
||||||
|
|
||||||
#line default
|
#line default
|
||||||
#line hidden
|
#line hidden
|
||||||
|
|
||||||
#line 45 "..\..\Views\User\UserParts\_Resources.cshtml"
|
#line 47 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||||
if (canAddAttachments)
|
if (canAddAttachments)
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -357,7 +380,7 @@ WriteLiteral(" title=\"Capture Image\"");
|
|||||||
WriteLiteral("></span>\r\n </div>\r\n");
|
WriteLiteral("></span>\r\n </div>\r\n");
|
||||||
|
|
||||||
|
|
||||||
#line 51 "..\..\Views\User\UserParts\_Resources.cshtml"
|
#line 53 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -387,7 +410,7 @@ WriteLiteral(@">
|
|||||||
$.connection.hub.qs = { UserId: '");
|
$.connection.hub.qs = { UserId: '");
|
||||||
|
|
||||||
|
|
||||||
#line 69 "..\..\Views\User\UserParts\_Resources.cshtml"
|
#line 71 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||||
Write(Model.User.UserId.Replace(@"\", @"\\"));
|
Write(Model.User.UserId.Replace(@"\", @"\\"));
|
||||||
|
|
||||||
|
|
||||||
@@ -432,7 +455,7 @@ WriteLiteral("\' };\r\n $.connection.hub.error(onHubF
|
|||||||
"$.ajax({\r\n url: \'");
|
"$.ajax({\r\n url: \'");
|
||||||
|
|
||||||
|
|
||||||
#line 115 "..\..\Views\User\UserParts\_Resources.cshtml"
|
#line 117 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||||
Write(Url.Action(MVC.API.User.Attachment()));
|
Write(Url.Action(MVC.API.User.Attachment()));
|
||||||
|
|
||||||
|
|
||||||
@@ -447,13 +470,13 @@ WriteLiteral(@"',
|
|||||||
");
|
");
|
||||||
|
|
||||||
|
|
||||||
#line 121 "..\..\Views\User\UserParts\_Resources.cshtml"
|
#line 123 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||||
|
|
||||||
|
|
||||||
#line default
|
#line default
|
||||||
#line hidden
|
#line hidden
|
||||||
|
|
||||||
#line 121 "..\..\Views\User\UserParts\_Resources.cshtml"
|
#line 123 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||||
if (canRemoveAnyAttachments)
|
if (canRemoveAnyAttachments)
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -467,7 +490,7 @@ WriteLiteral("buildAttachment(a, true, quick);");
|
|||||||
WriteLiteral("\r\n");
|
WriteLiteral("\r\n");
|
||||||
|
|
||||||
|
|
||||||
#line 124 "..\..\Views\User\UserParts\_Resources.cshtml"
|
#line 126 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||||
}
|
}
|
||||||
else if (canRemoveOwnAttachments)
|
else if (canRemoveOwnAttachments)
|
||||||
{
|
{
|
||||||
@@ -480,7 +503,7 @@ WriteLiteral(" ");
|
|||||||
WriteLiteral("buildAttachment(a, (a.AuthorId === \'");
|
WriteLiteral("buildAttachment(a, (a.AuthorId === \'");
|
||||||
|
|
||||||
|
|
||||||
#line 127 "..\..\Views\User\UserParts\_Resources.cshtml"
|
#line 129 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||||
Write(CurrentUser.UserId);
|
Write(CurrentUser.UserId);
|
||||||
|
|
||||||
|
|
||||||
@@ -491,7 +514,7 @@ WriteLiteral("\'), quick);");
|
|||||||
WriteLiteral("\r\n");
|
WriteLiteral("\r\n");
|
||||||
|
|
||||||
|
|
||||||
#line 128 "..\..\Views\User\UserParts\_Resources.cshtml"
|
#line 130 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -506,7 +529,7 @@ WriteLiteral("buildAttachment(a, false, quick);");
|
|||||||
WriteLiteral("\r\n");
|
WriteLiteral("\r\n");
|
||||||
|
|
||||||
|
|
||||||
#line 132 "..\..\Views\User\UserParts\_Resources.cshtml"
|
#line 134 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -532,7 +555,7 @@ WriteLiteral(@" } else {
|
|||||||
e.attr('data-attachmentid', a.Id).attr('data-mimetype', a.MimeType).attr('href', '");
|
e.attr('data-attachmentid', a.Id).attr('data-mimetype', a.MimeType).attr('href', '");
|
||||||
|
|
||||||
|
|
||||||
#line 150 "..\..\Views\User\UserParts\_Resources.cshtml"
|
#line 152 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||||
Write(Url.Action(MVC.API.User.AttachmentDownload()));
|
Write(Url.Action(MVC.API.User.AttachmentDownload()));
|
||||||
|
|
||||||
|
|
||||||
@@ -564,7 +587,7 @@ WriteLiteral(@"/' + a.Id);
|
|||||||
img.attr('src', '");
|
img.attr('src', '");
|
||||||
|
|
||||||
|
|
||||||
#line 173 "..\..\Views\User\UserParts\_Resources.cshtml"
|
#line 175 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||||
Write(Url.Action(MVC.API.User.AttachmentThumbnail()));
|
Write(Url.Action(MVC.API.User.AttachmentThumbnail()));
|
||||||
|
|
||||||
|
|
||||||
@@ -615,66 +638,55 @@ WriteLiteral("/\' + a.Id + \'?v=\' + retryCount);\r\n
|
|||||||
" }\r\n\r\n");
|
" }\r\n\r\n");
|
||||||
|
|
||||||
|
|
||||||
#line 232 "..\..\Views\User\UserParts\_Resources.cshtml"
|
#line 234 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||||
|
|
||||||
|
|
||||||
#line default
|
#line default
|
||||||
#line hidden
|
#line hidden
|
||||||
|
|
||||||
#line 232 "..\..\Views\User\UserParts\_Resources.cshtml"
|
#line 234 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||||
if (canAddAttachments)
|
if (canAddAttachments)
|
||||||
{
|
{
|
||||||
|
|
||||||
#line default
|
#line default
|
||||||
#line hidden
|
#line hidden
|
||||||
WriteLiteral("\r\n //#region Add Attachments\r\n " +
|
WriteLiteral("\r\n //#region Add Attachments\r\n " +
|
||||||
" var attachmentUploader = new document.Disco.AttachmentUploader(\r\n " +
|
" var attachmentUploader = new document.Disco.AttachmentUploader($Attachments)" +
|
||||||
" \'");
|
";\r\n\r\n var $attachmentInput = $Attachments.find(\'.atta" +
|
||||||
|
"chmentInput\');\r\n if (window.location.protocol != \'htt" +
|
||||||
|
"ps:\') {\r\n $attachmentInput.find(\'.photo\')\r\n " +
|
||||||
|
" .removeClass(\'enabled\')\r\n " +
|
||||||
|
" .addClass(\'disabled\')\r\n .attr(\'tit" +
|
||||||
|
"le\', \'Capture Image: this functionality is only available over a HTTPS connectio" +
|
||||||
|
"n\');\r\n }\r\n $attachmentInpu" +
|
||||||
|
"t.find(\'.photo\').click(function () {\r\n if (!$(thi" +
|
||||||
|
"s).hasClass(\'enabled\'))\r\n alert(\'This functio" +
|
||||||
|
"nality is only available over a HTTPS connection\');\r\n " +
|
||||||
|
" else if ($(this).hasClass(\'disabled\'))\r\n " +
|
||||||
|
" alert(\'Disconnected from the Disco ICT Server, please refresh this page and try" +
|
||||||
|
" again\');\r\n else\r\n " +
|
||||||
|
" attachmentUploader.uploadImage();\r\n });\r\n " +
|
||||||
|
" $attachmentInput.find(\'.upload\').click(function () {\r\n " +
|
||||||
|
" if ($(this).hasClass(\'disabled\'))\r\n " +
|
||||||
|
" alert(\'Disconnected from the Disco ICT Server, please refresh " +
|
||||||
|
"this page and try again\');\r\n else\r\n " +
|
||||||
|
" attachmentUploader.uploadFiles();\r\n " +
|
||||||
|
" });\r\n\r\n var resourcesTab;\r\n " +
|
||||||
|
" $(document).on(\'dragover\', function () {\r\n " +
|
||||||
|
" if (!resourcesTab) {\r\n var tabs = $Attachmen" +
|
||||||
|
"ts.closest(\'.ui-tabs\');\r\n resourcesTab = {\r\n " +
|
||||||
|
" tabs: tabs,\r\n " +
|
||||||
|
" resourcesIndex: tabs.children(\'ul.ui-tabs-nav\').find(\'a[href=\"#UserD" +
|
||||||
|
"etailTab-Resources\"]\').closest(\'li\').index()\r\n " +
|
||||||
|
" };\r\n }\r\n var sel" +
|
||||||
|
"ectedIndex = resourcesTab.tabs.tabs(\'option\', \'active\');\r\n " +
|
||||||
|
" if (resourcesTab.resourcesIndex !== selectedIndex)\r\n " +
|
||||||
|
" resourcesTab.tabs.tabs(\'option\', \'active\', resourcesTab.resour" +
|
||||||
|
"cesIndex);\r\n });\r\n //#endr" +
|
||||||
|
"egion\r\n ");
|
||||||
|
|
||||||
|
|
||||||
#line 236 "..\..\Views\User\UserParts\_Resources.cshtml"
|
#line 275 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||||
Write(Url.Action(MVC.API.User.AttachmentUpload(Model.User.UserId, null)));
|
|
||||||
|
|
||||||
|
|
||||||
#line default
|
|
||||||
#line hidden
|
|
||||||
WriteLiteral("\',\r\n $Attachments.find(\'.Disco-AttachmentUpload-DropTa" +
|
|
||||||
"rget\'),\r\n $Attachments.find(\'.Disco-AttachmentUpload-" +
|
|
||||||
"Progress\'));\r\n\r\n var $attachmentInput = $Attachments." +
|
|
||||||
"find(\'.attachmentInput\');\r\n if (window.location.proto" +
|
|
||||||
"col != \'https:\') {\r\n $attachmentInput.find(\'.phot" +
|
|
||||||
"o\')\r\n .removeClass(\'enabled\')\r\n " +
|
|
||||||
" .addClass(\'disabled\')\r\n " +
|
|
||||||
" .attr(\'title\', \'Capture Image: this functionality is only available over a HTTP" +
|
|
||||||
"S connection\');\r\n }\r\n $att" +
|
|
||||||
"achmentInput.find(\'.photo\').click(function () {\r\n " +
|
|
||||||
" if (!$(this).hasClass(\'enabled\'))\r\n alert(\'T" +
|
|
||||||
"his functionality is only available over a HTTPS connection\');\r\n " +
|
|
||||||
" else if ($(this).hasClass(\'disabled\'))\r\n " +
|
|
||||||
" alert(\'Disconnected from the Disco ICT Server, please refresh this p" +
|
|
||||||
"age and try again\');\r\n else\r\n " +
|
|
||||||
" attachmentUploader.uploadImage();\r\n }" +
|
|
||||||
");\r\n $attachmentInput.find(\'.upload\').click(function " +
|
|
||||||
"() {\r\n if ($(this).hasClass(\'disabled\'))\r\n " +
|
|
||||||
" alert(\'Disconnected from the Disco ICT Server, plea" +
|
|
||||||
"se refresh this page and try again\');\r\n else\r\n " +
|
|
||||||
" attachmentUploader.uploadFiles();\r\n " +
|
|
||||||
" });\r\n\r\n var resourcesTab;\r\n " +
|
|
||||||
" $(document).on(\'dragover\', function () {\r\n " +
|
|
||||||
" if (!resourcesTab) {\r\n var tabs =" +
|
|
||||||
" $Attachments.closest(\'.ui-tabs\');\r\n resource" +
|
|
||||||
"sTab = {\r\n tabs: tabs,\r\n " +
|
|
||||||
" resourcesIndex: tabs.children(\'ul.ui-tabs-nav\').find(\'a[h" +
|
|
||||||
"ref=\"#UserDetailTab-Resources\"]\').closest(\'li\').index()\r\n " +
|
|
||||||
" };\r\n }\r\n " +
|
|
||||||
" var selectedIndex = resourcesTab.tabs.tabs(\'option\', \'active\');\r\n " +
|
|
||||||
" if (resourcesTab.resourcesIndex !== selectedIndex)\r\n " +
|
|
||||||
" resourcesTab.tabs.tabs(\'option\', \'active\', resource" +
|
|
||||||
"sTab.resourcesIndex);\r\n });\r\n " +
|
|
||||||
" //#endregion\r\n ");
|
|
||||||
|
|
||||||
|
|
||||||
#line 276 "..\..\Views\User\UserParts\_Resources.cshtml"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -683,7 +695,7 @@ WriteLiteral("\',\r\n $Attachments.find(\'.Disco-Atta
|
|||||||
WriteLiteral(" ");
|
WriteLiteral(" ");
|
||||||
|
|
||||||
|
|
||||||
#line 277 "..\..\Views\User\UserParts\_Resources.cshtml"
|
#line 276 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||||
if (canRemoveAnyAttachments || canRemoveOwnAttachments)
|
if (canRemoveAnyAttachments || canRemoveOwnAttachments)
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -717,7 +729,7 @@ WriteLiteral(@"
|
|||||||
url: '");
|
url: '");
|
||||||
|
|
||||||
|
|
||||||
#line 303 "..\..\Views\User\UserParts\_Resources.cshtml"
|
#line 302 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||||
Write(Url.Action(MVC.API.User.AttachmentRemove()));
|
Write(Url.Action(MVC.API.User.AttachmentRemove()));
|
||||||
|
|
||||||
|
|
||||||
@@ -745,7 +757,7 @@ WriteLiteral("\',\r\n dataType: \'jso
|
|||||||
"/#endregion\r\n ");
|
"/#endregion\r\n ");
|
||||||
|
|
||||||
|
|
||||||
#line 331 "..\..\Views\User\UserParts\_Resources.cshtml"
|
#line 330 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -769,7 +781,7 @@ WriteLiteral(@"
|
|||||||
$('#UserDetailTabItems').append('<li><a href=""#UserDetailTab-Resources"" id=""UserDetailTab-ResourcesLink"">Attachments [");
|
$('#UserDetailTabItems').append('<li><a href=""#UserDetailTab-Resources"" id=""UserDetailTab-ResourcesLink"">Attachments [");
|
||||||
|
|
||||||
|
|
||||||
#line 347 "..\..\Views\User\UserParts\_Resources.cshtml"
|
#line 346 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||||
Write(Model.User.UserAttachments == null ? 0 : Model.User.UserAttachments.Count);
|
Write(Model.User.UserAttachments == null ? 0 : Model.User.UserAttachments.Count);
|
||||||
|
|
||||||
|
|
||||||
@@ -778,7 +790,7 @@ WriteLiteral(@"
|
|||||||
WriteLiteral("]</a></li>\');\r\n </script>\r\n</div>\r\n");
|
WriteLiteral("]</a></li>\');\r\n </script>\r\n</div>\r\n");
|
||||||
|
|
||||||
|
|
||||||
#line 350 "..\..\Views\User\UserParts\_Resources.cshtml"
|
#line 349 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||||
if (canRemoveAnyAttachments || canRemoveOwnAttachments)
|
if (canRemoveAnyAttachments || canRemoveOwnAttachments)
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -800,7 +812,7 @@ WriteLiteral(" class=\"fa fa-exclamation-triangle fa-lg\"");
|
|||||||
WriteLiteral("></i> Are you sure?\r\n </p>\r\n </div>\r\n");
|
WriteLiteral("></i> Are you sure?\r\n </p>\r\n </div>\r\n");
|
||||||
|
|
||||||
|
|
||||||
#line 357 "..\..\Views\User\UserParts\_Resources.cshtml"
|
#line 356 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||||
}
|
}
|
||||||
|
|
||||||
#line default
|
#line default
|
||||||
|
|||||||
Reference in New Issue
Block a user