719 lines
29 KiB
C#
719 lines
29 KiB
C#
#pragma warning disable 1591
|
|
//------------------------------------------------------------------------------
|
|
// <auto-generated>
|
|
// This code was generated by a tool.
|
|
// Runtime Version:4.0.30319.17929
|
|
//
|
|
// Changes to this file may cause incorrect behavior and will be lost if
|
|
// the code is regenerated.
|
|
// </auto-generated>
|
|
//------------------------------------------------------------------------------
|
|
|
|
namespace Disco.Web.Views.Job.JobParts
|
|
{
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.IO;
|
|
using System.Linq;
|
|
using System.Net;
|
|
using System.Text;
|
|
using System.Web;
|
|
using System.Web.Helpers;
|
|
using System.Web.Mvc;
|
|
using System.Web.Mvc.Ajax;
|
|
using System.Web.Mvc.Html;
|
|
using System.Web.Routing;
|
|
using System.Web.Security;
|
|
using System.Web.UI;
|
|
using System.Web.WebPages;
|
|
using Disco.BI.Extensions;
|
|
using Disco.Models.Repository;
|
|
using Disco.Web;
|
|
using Disco.Web.Extensions;
|
|
|
|
[System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "1.5.0.0")]
|
|
[System.Web.WebPages.PageVirtualPathAttribute("~/Views/Job/JobParts/Resources.cshtml")]
|
|
public class Resources : System.Web.Mvc.WebViewPage<Disco.Web.Models.Job.ShowModel>
|
|
{
|
|
public Resources()
|
|
{
|
|
}
|
|
public override void Execute()
|
|
{
|
|
|
|
#line 2 "..\..\Views\Job\JobParts\Resources.cshtml"
|
|
|
|
Html.BundleDeferred("~/Style/Shadowbox");
|
|
Html.BundleDeferred("~/ClientScripts/Modules/Shadowbox");
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\r\n<table");
|
|
|
|
WriteLiteral(" id=\"jobShowResources\"");
|
|
|
|
WriteLiteral(">\r\n <tr>\r\n <td");
|
|
|
|
WriteLiteral(" id=\"Comments\"");
|
|
|
|
WriteLiteral(">\r\n <div");
|
|
|
|
WriteLiteral(" class=\"commentOutput\"");
|
|
|
|
WriteLiteral(">\r\n");
|
|
|
|
|
|
#line 10 "..\..\Views\Job\JobParts\Resources.cshtml"
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 10 "..\..\Views\Job\JobParts\Resources.cshtml"
|
|
foreach (var jl in Model.Job.JobLogs.OrderBy(m => m.Timestamp))
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <div");
|
|
|
|
WriteLiteral(" data-logid=\"");
|
|
|
|
|
|
#line 12 "..\..\Views\Job\JobParts\Resources.cshtml"
|
|
Write(jl.Id);
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\"");
|
|
|
|
WriteLiteral(">\r\n <span");
|
|
|
|
WriteLiteral(" class=\"author\"");
|
|
|
|
WriteLiteral(">");
|
|
|
|
|
|
#line 13 "..\..\Views\Job\JobParts\Resources.cshtml"
|
|
Write(jl.TechUser.ToString());
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("</span><span");
|
|
|
|
WriteLiteral(" class=\"remove\"");
|
|
|
|
WriteLiteral("></span><span");
|
|
|
|
WriteLiteral(" class=\"timestamp\"");
|
|
|
|
WriteAttribute("title", Tuple.Create(" title=\"", 540), Tuple.Create("\"", 578)
|
|
|
|
#line 13 "..\..\Views\Job\JobParts\Resources.cshtml"
|
|
, Tuple.Create(Tuple.Create("", 548), Tuple.Create<System.Object, System.Int32>(jl.Timestamp.ToFullDateTime()
|
|
|
|
#line default
|
|
#line hidden
|
|
, 548), false)
|
|
);
|
|
|
|
WriteLiteral(">");
|
|
|
|
|
|
#line 13 "..\..\Views\Job\JobParts\Resources.cshtml"
|
|
Write(jl.Timestamp.ToFuzzy());
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("</span>\r\n <span");
|
|
|
|
WriteLiteral(" class=\"comment\"");
|
|
|
|
WriteLiteral(">");
|
|
|
|
|
|
#line 14 "..\..\Views\Job\JobParts\Resources.cshtml"
|
|
Write(jl.Comments.ToMultilineJobRefString());
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("</span>\r\n </div>\r\n");
|
|
|
|
|
|
#line 16 "..\..\Views\Job\JobParts\Resources.cshtml"
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" </div>\r\n <div");
|
|
|
|
WriteLiteral(" class=\"commentInput clearfix\"");
|
|
|
|
WriteLiteral(">\r\n <textarea");
|
|
|
|
WriteLiteral(" class=\"commentInput\"");
|
|
|
|
WriteLiteral(" accesskey=\"l\"");
|
|
|
|
WriteLiteral("></textarea>\r\n <span");
|
|
|
|
WriteLiteral(" class=\"action post commentInputPost\"");
|
|
|
|
WriteLiteral("></span>\r\n </div>\r\n <script");
|
|
|
|
WriteLiteral(" type=\"text/javascript\"");
|
|
|
|
WriteLiteral(">\r\n $(function () {\r\n $Comments = $(\'#Comments\'" +
|
|
");\r\n $CommentOutput = $Comments.find(\'.commentOutput\');\r\n " +
|
|
" $CommentOutputContainer = $Comments.find(\'.commentOutputContaine" +
|
|
"r\');\r\n $CommentInput = $Comments.find(\'textarea.commentInput\'" +
|
|
");\r\n\r\n window.setTimeout(function () {\r\n " +
|
|
" $CommentOutput[0].scrollTop = $CommentOutput[0].scrollHeight; // Scroll to Bo" +
|
|
"ttom\r\n }, 0);\r\n $(\'#jobDetailTabs\').on(\'ta" +
|
|
"bsactivate\', function (event, ui) {\r\n if (ui.newPanel && " +
|
|
"ui.newPanel.is(\'#jobDetailTab-Resources\')) {\r\n $Comme" +
|
|
"ntOutput[0].scrollTop = $CommentOutput[0].scrollHeight; // Scroll to Bottom\r\n " +
|
|
" }\r\n });\r\n\r\n $Comments" +
|
|
".find(\'.commentInputPost\').click(postComment);\r\n $CommentInpu" +
|
|
"t.keypress(function (e) {\r\n if (e.which == 13 && !e.shift" +
|
|
"Key) {\r\n postComment();\r\n " +
|
|
"return false;\r\n }\r\n });\r\n " +
|
|
" $CommentOutput.find(\'span.remove\').click(removePost);\r\n\r\n " +
|
|
" $dialogRemoveLog = $(\'#dialogRemoveLog\');\r\n $dialogRemove" +
|
|
"Log.dialog({\r\n resizable: false,\r\n " +
|
|
" height: 140,\r\n modal: true,\r\n aut" +
|
|
"oOpen: false\r\n });\r\n\r\n function postCommen" +
|
|
"t() {\r\n var comment = $CommentInput.val();\r\n " +
|
|
" if (comment != \'\') {\r\n var data = { commen" +
|
|
"t: comment }\r\n $.ajax({\r\n " +
|
|
" url: \'");
|
|
|
|
|
|
#line 60 "..\..\Views\Job\JobParts\Resources.cshtml"
|
|
Write(Url.Action(MVC.API.Job.CommentPost(Model.Job.Id, null)));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\',\r\n dataType: \'json\',\r\n " +
|
|
" data: data,\r\n success: function (d) {\r\n " +
|
|
" if (d.Result == \'OK\') {\r\n " +
|
|
" addComment(d.Comment, false);\r\n " +
|
|
" $CommentInput.val(\'\').attr(\'disabled\', false).focus();\r\n " +
|
|
" } else {\r\n alert(\'Una" +
|
|
"ble to post comment: \' + d.Result);\r\n $Co" +
|
|
"mmentInput.attr(\'disabled\', false);\r\n }\r\n " +
|
|
" },\r\n error: function " +
|
|
"(jqXHR, textStatus, errorThrown) {\r\n alert(\'U" +
|
|
"nable to post comment: \' + textStatus);\r\n $Co" +
|
|
"mmentInput.attr(\'disabled\', false);\r\n }\r\n " +
|
|
" });\r\n }\r\n }\r\n " +
|
|
" function removePost() {\r\n $this = $(this);" +
|
|
"\r\n var data = { id: $this.closest(\'div\').attr(\'data-logid" +
|
|
"\') };\r\n\r\n $dialogRemoveLog.dialog(\"enable\");\r\n " +
|
|
" $dialogRemoveLog.dialog(\'option\', \'buttons\', {\r\n " +
|
|
" \"Remove\": function () {\r\n $dialogRemoveL" +
|
|
"og.dialog(\"disable\");\r\n $dialogRemoveLog.dialog(\"" +
|
|
"option\", \"buttons\", null);\r\n $.ajax({\r\n " +
|
|
" url: \'");
|
|
|
|
|
|
#line 89 "..\..\Views\Job\JobParts\Resources.cshtml"
|
|
Write(Url.Action(MVC.API.Job.CommentRemove()));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\',\r\n dataType: \'json\',\r\n " +
|
|
" data: data,\r\n success: function" +
|
|
" (d) {\r\n if (d == \'OK\') {\r\n " +
|
|
" $this.closest(\'div\').slideUp(300).delay(300).queue" +
|
|
"(function () {\r\n $(this).remove()" +
|
|
";\r\n });\r\n " +
|
|
" } else {\r\n alert(\'Unable " +
|
|
"to remove comment: \' + d);\r\n }\r\n " +
|
|
" $dialogRemoveLog.dialog(\"close\");\r\n " +
|
|
" },\r\n error: function (j" +
|
|
"qXHR, textStatus, errorThrown) {\r\n alert(" +
|
|
"\'Unable to remove comment: \' + textStatus);\r\n " +
|
|
" $dialogRemoveLog.dialog(\"close\");\r\n }\r\n " +
|
|
" });\r\n },\r\n " +
|
|
" \"Cancel\": function () {\r\n $dialog" +
|
|
"RemoveLog.dialog(\"close\");\r\n }\r\n " +
|
|
" });\r\n\r\n $dialogRemoveLog.dialog(\'open\');\r\n\r\n " +
|
|
" return false;\r\n }\r\n function" +
|
|
" addComment(c, quick) {\r\n var e = $(\'<div><span class=\"au" +
|
|
"thor\" /><span class=\"remove\" /><span class=\"timestamp\" /><span class=\"comment\" /" +
|
|
"></div>\');\r\n e.attr(\'data-logid\', c.Id);\r\n " +
|
|
" e.find(\'.author\').text(c.Author);\r\n e.find(\'.tim" +
|
|
"estamp\').text(c.TimestampFuzzy).attr(\'title\', c.TimestampFull);\r\n " +
|
|
" e.find(\'.remove\').click(removePost);\r\n var eComm" +
|
|
"ent = e.find(\'.comment\').text(c.Comments);\r\n var commentH" +
|
|
"tml = eComment.text().replace(/\\r\\n|\\r|\\n/g, \'<br />\');\r\n " +
|
|
" commentHtml = commentHtml.replace(/\\#(\\d+)/g, \'<a href=\"");
|
|
|
|
|
|
#line 125 "..\..\Views\Job\JobParts\Resources.cshtml"
|
|
Write(Url.Action(MVC.Job.Show(null)));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(@"?id=$1"">#$1</a>');
|
|
eComment.html(commentHtml);
|
|
|
|
$CommentOutput.append(e);
|
|
|
|
if (!quick) {
|
|
e.animate({ backgroundColor: '#ffff99' }, 500, function () {
|
|
e.animate({ backgroundColor: '#f4f4f4' }, 500);
|
|
});
|
|
$CommentOutput.animate({ scrollTop: $CommentOutput[0].scrollHeight }, 250)
|
|
}
|
|
}
|
|
});
|
|
</script>
|
|
</td>
|
|
<td");
|
|
|
|
WriteLiteral(" id=\"Attachments\"");
|
|
|
|
WriteLiteral(">\r\n <div");
|
|
|
|
WriteLiteral(" class=\"attachmentOutput\"");
|
|
|
|
WriteLiteral(">\r\n");
|
|
|
|
|
|
#line 142 "..\..\Views\Job\JobParts\Resources.cshtml"
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 142 "..\..\Views\Job\JobParts\Resources.cshtml"
|
|
foreach (var ja in Model.Job.JobAttachments)
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <a");
|
|
|
|
WriteAttribute("href", Tuple.Create(" href=\"", 7537), Tuple.Create("\"", 7594)
|
|
|
|
#line 144 "..\..\Views\Job\JobParts\Resources.cshtml"
|
|
, Tuple.Create(Tuple.Create("", 7544), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.API.Job.AttachmentDownload(ja.Id))
|
|
|
|
#line default
|
|
#line hidden
|
|
, 7544), false)
|
|
);
|
|
|
|
WriteLiteral(" data-attachmentid=\"");
|
|
|
|
|
|
#line 144 "..\..\Views\Job\JobParts\Resources.cshtml"
|
|
Write(ja.Id);
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\"");
|
|
|
|
WriteLiteral(" data-mimetype=\"");
|
|
|
|
|
|
#line 144 "..\..\Views\Job\JobParts\Resources.cshtml"
|
|
Write(ja.MimeType);
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\"");
|
|
|
|
WriteLiteral(">\r\n <span");
|
|
|
|
WriteLiteral(" class=\"icon\"");
|
|
|
|
WriteAttribute("title", Tuple.Create(" title=\"", 7696), Tuple.Create("\"", 7716)
|
|
|
|
#line 145 "..\..\Views\Job\JobParts\Resources.cshtml"
|
|
, Tuple.Create(Tuple.Create("", 7704), Tuple.Create<System.Object, System.Int32>(ja.Filename
|
|
|
|
#line default
|
|
#line hidden
|
|
, 7704), false)
|
|
);
|
|
|
|
WriteLiteral(">\r\n <img");
|
|
|
|
WriteLiteral(" alt=\"Attachment Thumbnail\"");
|
|
|
|
WriteAttribute("src", Tuple.Create(" src=\"", 7779), Tuple.Create("\"", 7838)
|
|
|
|
#line 146 "..\..\Views\Job\JobParts\Resources.cshtml"
|
|
, Tuple.Create(Tuple.Create("", 7785), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.API.Job.AttachmentThumbnail(ja.Id))
|
|
|
|
#line default
|
|
#line hidden
|
|
, 7785), false)
|
|
);
|
|
|
|
WriteLiteral(" /></span>\r\n <span");
|
|
|
|
WriteLiteral(" class=\"comments\"");
|
|
|
|
WriteAttribute("title", Tuple.Create(" title=\"", 7897), Tuple.Create("\"", 7917)
|
|
|
|
#line 147 "..\..\Views\Job\JobParts\Resources.cshtml"
|
|
, Tuple.Create(Tuple.Create("", 7905), Tuple.Create<System.Object, System.Int32>(ja.Comments
|
|
|
|
#line default
|
|
#line hidden
|
|
, 7905), false)
|
|
);
|
|
|
|
WriteLiteral(">\r\n");
|
|
|
|
|
|
#line 148 "..\..\Views\Job\JobParts\Resources.cshtml"
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 148 "..\..\Views\Job\JobParts\Resources.cshtml"
|
|
if (!string.IsNullOrEmpty(ja.DocumentTemplateId))
|
|
{
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 149 "..\..\Views\Job\JobParts\Resources.cshtml"
|
|
Write(ja.DocumentTemplate.Description);
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 149 "..\..\Views\Job\JobParts\Resources.cshtml"
|
|
}
|
|
else
|
|
{
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 151 "..\..\Views\Job\JobParts\Resources.cshtml"
|
|
Write(ja.Comments);
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 151 "..\..\Views\Job\JobParts\Resources.cshtml"
|
|
}
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\r\n </span><span");
|
|
|
|
WriteLiteral(" class=\"author\"");
|
|
|
|
WriteLiteral(">");
|
|
|
|
|
|
#line 152 "..\..\Views\Job\JobParts\Resources.cshtml"
|
|
Write(ja.TechUser.ToString());
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("</span><span");
|
|
|
|
WriteLiteral(" class=\"remove\"");
|
|
|
|
WriteLiteral("></span><span");
|
|
|
|
WriteLiteral(" class=\"timestamp\"");
|
|
|
|
WriteAttribute("title", Tuple.Create(" title=\"", 8287), Tuple.Create("\"", 8325)
|
|
|
|
#line 152 "..\..\Views\Job\JobParts\Resources.cshtml"
|
|
, Tuple.Create(Tuple.Create("", 8295), Tuple.Create<System.Object, System.Int32>(ja.Timestamp.ToFullDateTime()
|
|
|
|
#line default
|
|
#line hidden
|
|
, 8295), false)
|
|
);
|
|
|
|
WriteLiteral(">");
|
|
|
|
|
|
#line 152 "..\..\Views\Job\JobParts\Resources.cshtml"
|
|
Write(ja.Timestamp.ToFuzzy());
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("</span>\r\n </a> \r\n");
|
|
|
|
|
|
#line 154 "..\..\Views\Job\JobParts\Resources.cshtml"
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" </div>\r\n <div");
|
|
|
|
WriteLiteral(" class=\"attachmentInput clearfix\"");
|
|
|
|
WriteLiteral(">\r\n <span");
|
|
|
|
WriteLiteral(" class=\"action upload\"");
|
|
|
|
WriteLiteral("></span><span");
|
|
|
|
WriteLiteral(" class=\"action photo\"");
|
|
|
|
WriteLiteral("></span>\r\n </div>\r\n <script");
|
|
|
|
WriteLiteral(" type=\"text/javascript\"");
|
|
|
|
WriteLiteral(@">
|
|
Shadowbox.init({
|
|
skipSetup: true,
|
|
modal: true
|
|
});
|
|
$(function () {
|
|
if (!document.DiscoFunctions) {
|
|
document.DiscoFunctions = {};
|
|
}
|
|
document.DiscoFunctions.addAttachment = addAttachment;
|
|
|
|
$Attachments = $('#Attachments');
|
|
$attachmentOutput = $Attachments.find('.attachmentOutput');
|
|
|
|
$attachmentOutput.find('span.remove').click(removeAttachment);
|
|
|
|
$('#dialogUpload').dialog({
|
|
autoOpen: false,
|
|
draggable: false,
|
|
modal: true,
|
|
resizable: false,
|
|
width: 860,
|
|
height: 550,
|
|
close: function () {
|
|
silverlightUploadAttachment.content.Navigator.Navigate('/Hidden');
|
|
}
|
|
});
|
|
|
|
$('#dialogRemoveAttachment').dialog({
|
|
resizable: false,
|
|
height: 140,
|
|
modal: true,
|
|
autoOpen: false
|
|
});
|
|
|
|
var onLoadNavigation = null;
|
|
var isLoaded = null;
|
|
Silverlight.createObject(
|
|
'");
|
|
|
|
|
|
#line 197 "..\..\Views\Job\JobParts\Resources.cshtml"
|
|
Write(Links.ClientBin.Disco_Silverlight_AttachmentUpload_xap);
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(@"',
|
|
$('#silverlightHostUploadAttachment').get(0),
|
|
'silverlightUploadAttachment',
|
|
{ width: '840px', height: '500px', background: 'white', version: '4.0.60310.0' },
|
|
{
|
|
onLoad: function () {
|
|
if (onLoadNavigation) {
|
|
silverlightUploadAttachment.content.Navigator.Navigate(onLoadNavigation);
|
|
isLoaded = true;
|
|
}
|
|
}
|
|
},
|
|
'UploadUrl=");
|
|
|
|
|
|
#line 209 "..\..\Views\Job\JobParts\Resources.cshtml"
|
|
Write(Url.Action(MVC.API.Job.AttachmentUpload(Model.Job.Id, null)));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(@"'
|
|
);
|
|
|
|
$attachmentInput = $Attachments.find('.attachmentInput');
|
|
$attachmentInput.find('.photo').click(function () {
|
|
showDialog('/WebCam');
|
|
});
|
|
$attachmentInput.find('.upload').click(function () {
|
|
showDialog('/File');
|
|
});
|
|
|
|
silverlightUploadAttachment = $('#silverlightUploadAttachment').get(0);
|
|
function showDialog(navigationPath) {
|
|
$('#dialogUpload').dialog('open');
|
|
if (isLoaded) {
|
|
silverlightUploadAttachment.content.Navigator.Navigate(navigationPath);
|
|
} else {
|
|
onLoadNavigation = navigationPath;
|
|
}
|
|
};
|
|
function addAttachment(id, quick) {
|
|
var data = { id: id };
|
|
$.ajax({
|
|
url: '");
|
|
|
|
|
|
#line 232 "..\..\Views\Job\JobParts\Resources.cshtml"
|
|
Write(Url.Action(MVC.API.Job.Attachment()));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(@"',
|
|
dataType: 'json',
|
|
data: data,
|
|
success: function (d) {
|
|
if (d.Result == 'OK') {
|
|
var a = d.Attachment;
|
|
|
|
var e = $('<a><span class=""icon""><img alt=""Attachment Thumbnail"" /></span><span class=""comments""></span><span class=""author""></span><span class=""remove""></span><span class=""timestamp""></span></a>');
|
|
|
|
e.attr('data-attachmentid', a.Id).attr('data-mimetype', a.MimeType).attr('href', '");
|
|
|
|
|
|
#line 241 "..\..\Views\Job\JobParts\Resources.cshtml"
|
|
Write(Url.Action(MVC.API.Job.AttachmentDownload()));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("/\' + a.Id);\r\n e.find(\'.icon img\').attr(\'src\', " +
|
|
"\'");
|
|
|
|
|
|
#line 242 "..\..\Views\Job\JobParts\Resources.cshtml"
|
|
Write(Url.Action(MVC.API.Job.AttachmentThumbnail()));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("/\' + a.Id);\r\n e.find(\'.comments\').text(a.Comme" +
|
|
"nts);\r\n e.find(\'.author\').text(a.Author);\r\n " +
|
|
" e.find(\'.timestamp\').text(a.TimestampFuzzy).at" +
|
|
"tr(\'title\', a.TimestampFull);\r\n e.find(\'.remo" +
|
|
"ve\').click(removeAttachment);\r\n if (!quick)\r\n" +
|
|
" e.hide();\r\n " +
|
|
" $attachmentOutput.append(e);\r\n if (!qu" +
|
|
"ick)\r\n e.show(\'slow\');\r\n " +
|
|
" if (a.MimeType.toLowerCase().indexOf(\'image/\') == 0)\r\n " +
|
|
" e.shadowbox({ gallery: \'attachments\', player: \'" +
|
|
"img\', title: a.Comments });\r\n } else {\r\n " +
|
|
" alert(\'Unable to add attachment: \' + d.Result);\r\n " +
|
|
" }\r\n },\r\n " +
|
|
" error: function (jqXHR, textStatus, errorThrown) {\r\n " +
|
|
" alert(\'Unable to add attachment: \' + textStatus);\r\n " +
|
|
" }\r\n });\r\n }\r\n " +
|
|
" function removeAttachment() {\r\n $this = $(this)." +
|
|
"closest(\'a\');\r\n\r\n var data = { id: $this.attr(\'data-attac" +
|
|
"hmentid\') };\r\n\r\n var $dialogRemoveAttachment = $(\'#dialog" +
|
|
"RemoveAttachment\');\r\n $dialogRemoveAttachment.dialog(\"ena" +
|
|
"ble\");\r\n $dialogRemoveAttachment.dialog(\'option\', \'button" +
|
|
"s\', {\r\n \"Remove\": function () {\r\n " +
|
|
" $dialogRemoveAttachment.dialog(\"disable\");\r\n " +
|
|
" $dialogRemoveAttachment.dialog(\"option\", \"buttons\", null);\r\n " +
|
|
" $.ajax({\r\n url: \'");
|
|
|
|
|
|
#line 275 "..\..\Views\Job\JobParts\Resources.cshtml"
|
|
Write(Url.Action(MVC.API.Job.AttachmentRemove()));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\',\r\n dataType: \'json\',\r\n " +
|
|
" data: data,\r\n success: function" +
|
|
" (d) {\r\n if (d == \'OK\') {\r\n " +
|
|
" $this.hide(300).delay(300).queue(function () {\r\n " +
|
|
" var $this = $(this);\r\n " +
|
|
" if ($this.attr(\'data-mimetype\').toLowerCase(" +
|
|
").indexOf(\'image/\') == 0)\r\n S" +
|
|
"hadowbox.removeCache(this);\r\n $th" +
|
|
"is.remove();\r\n });\r\n " +
|
|
" } else {\r\n ale" +
|
|
"rt(\'Unable to remove attachment: \' + d);\r\n " +
|
|
" }\r\n $dialogRemoveAttachment.dialog(\"clo" +
|
|
"se\");\r\n },\r\n " +
|
|
" error: function (jqXHR, textStatus, errorThrown) {\r\n " +
|
|
" alert(\'Unable to remove attachment: \' + textStatus);\r\n " +
|
|
" $dialogRemoveAttachment.dialog(\"close\");\r\n " +
|
|
" }\r\n });\r\n " +
|
|
" },\r\n \"Cancel\": function () {\r\n " +
|
|
" $dialogRemoveAttachment.dialog(\"close\");\r\n " +
|
|
" }\r\n });\r\n\r\n $dialogR" +
|
|
"emoveAttachment.dialog(\'open\');\r\n\r\n return false;\r\n " +
|
|
" }\r\n\r\n $attachmentOutput.children(\'a\').each(func" +
|
|
"tion () {\r\n $this = $(this);\r\n if " +
|
|
"($this.attr(\'data-mimetype\').toLowerCase().indexOf(\'image/\') == 0)\r\n " +
|
|
" $this.shadowbox({ gallery: \'attachments\', player: \'img\', title: " +
|
|
"$this.find(\'.comments\').text() });\r\n });\r\n });" +
|
|
"\r\n </script>\r\n </td>\r\n </tr>\r\n</table>\r\n<div");
|
|
|
|
WriteLiteral(" id=\"dialogUpload\"");
|
|
|
|
WriteLiteral(" title=\"Upload Attachment\"");
|
|
|
|
WriteLiteral(">\r\n <div");
|
|
|
|
WriteLiteral(" id=\"silverlightHostUploadAttachment\"");
|
|
|
|
WriteLiteral(">\r\n </div>\r\n</div>\r\n<div");
|
|
|
|
WriteLiteral(" id=\"dialogRemoveLog\"");
|
|
|
|
WriteLiteral(" title=\"Remove this Comment?\"");
|
|
|
|
WriteLiteral(">\r\n <p>\r\n <span");
|
|
|
|
WriteLiteral(" class=\"ui-icon ui-icon-alert\"");
|
|
|
|
WriteLiteral(" style=\"float: left; margin: 0 7px 20px 0;\"");
|
|
|
|
WriteLiteral("></span>\r\n Are you sure?\r\n </p>\r\n</div>\r\n<div");
|
|
|
|
WriteLiteral(" id=\"dialogRemoveAttachment\"");
|
|
|
|
WriteLiteral(" title=\"Remove this Attachment?\"");
|
|
|
|
WriteLiteral(">\r\n <p>\r\n <span");
|
|
|
|
WriteLiteral(" class=\"ui-icon ui-icon-alert\"");
|
|
|
|
WriteLiteral(" style=\"float: left; margin: 0 7px 20px 0;\"");
|
|
|
|
WriteLiteral("></span>\r\n Are you sure?\r\n </p>\r\n</div>\r\n");
|
|
|
|
}
|
|
}
|
|
}
|
|
#pragma warning restore 1591
|