Feature: Repository Monitor

Cached Job Index, Live Job Message Update
This commit is contained in:
Gary Sharp
2013-04-11 19:10:38 +10:00
parent b5531e64bd
commit b79723d432
34 changed files with 803 additions and 262 deletions
@@ -2,7 +2,7 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.17929
// Runtime Version:4.0.30319.18033
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
@@ -31,9 +31,9 @@ namespace Disco.Web.Views.Job.JobParts
using Disco.Web;
using Disco.Web.Extensions;
[System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "1.5.0.0")]
[System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "1.5.4.0")]
[System.Web.WebPages.PageVirtualPathAttribute("~/Views/Job/JobParts/Components.cshtml")]
public class Components : System.Web.Mvc.WebViewPage<Disco.Web.Models.Job.ShowModel>
public partial class Components : System.Web.Mvc.WebViewPage<Disco.Web.Models.Job.ShowModel>
{
public Components()
{
+48 -4
View File
@@ -2,6 +2,7 @@
@{
Html.BundleDeferred("~/Style/Shadowbox");
Html.BundleDeferred("~/ClientScripts/Modules/Shadowbox");
Html.BundleDeferred("~/ClientScripts/Modules/jQuery-SignalR");
}
<table id="jobShowResources">
<tr>
@@ -21,6 +22,7 @@
</div>
<script type="text/javascript">
$(function () {
var jobId = parseInt('@(Model.Job.Id)');
$Comments = $('#Comments');
$CommentOutput = $Comments.find('.commentOutput');
$CommentOutputContainer = $Comments.find('.commentOutputContainer');
@@ -62,7 +64,8 @@
data: data,
success: function (d) {
if (d.Result == 'OK') {
addComment(d.Comment, false);
// Should be added via Repository Notifications
// addComment(d.Comment, false);
$CommentInput.val('').attr('disabled', false).focus();
} else {
alert('Unable to post comment: ' + d.Result);
@@ -91,9 +94,10 @@
data: data,
success: function (d) {
if (d == 'OK') {
$this.closest('div').slideUp(300).delay(300).queue(function () {
$(this).remove();
});
// Should be removed via Repository Notifications
//$this.closest('div').slideUp(300).delay(300).queue(function () {
// $(this).remove();
//});
} else {
alert('Unable to remove comment: ' + d);
}
@@ -114,6 +118,21 @@
return false;
}
function loadLiveComment(id) {
$.ajax({
url: '@Url.Action(MVC.API.Job.Comment())',
dataType: 'json',
data: { id: id },
success: function (d) {
if (d && d.JobId == jobId) {
addComment(d, false);
}
},
error: function (jqXHR, textStatus, errorThrown) {
alert('Unable to load live comment ' + id + ': ' + textStatus);
}
});
}
function addComment(c, quick) {
var e = $('<div><span class="author" /><span class="remove" /><span class="timestamp" /><span class="comment" /></div>');
e.attr('data-logid', c.Id);
@@ -134,6 +153,31 @@
$CommentOutput.animate({ scrollTop: $CommentOutput[0].scrollHeight }, 250)
}
}
// Sign up for Live Events
function liveMessageRecieved(d) {
if (d) {
switch (d.EventType) {
case 0: // Added
loadLiveComment(d.EntityKey[0]);
break;
case 1: // Removed
$CommentOutput.children('div[data-logid="' + d.EntityKey[0] + '"]').slideUp(300).delay(300).queue(function () {
$(this).remove();
});
break;
}
}
}
var liveMessagesConnection = $.connection('@(Url.Content("~/API/Repository/Notifications"))')
liveMessagesConnection.received(liveMessageRecieved);
liveMessagesConnection.error(function (e) {
alert('Error: ' + JSON.stringify(e));
});
liveMessagesConnection.start(function () {
liveMessagesConnection.send('/addToGroups:JobLog');
});
});
</script>
</td>
@@ -2,7 +2,7 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.17929
// Runtime Version:4.0.30319.18033
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
@@ -31,9 +31,9 @@ namespace Disco.Web.Views.Job.JobParts
using Disco.Web;
using Disco.Web.Extensions;
[System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "1.5.0.0")]
[System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "1.5.4.0")]
[System.Web.WebPages.PageVirtualPathAttribute("~/Views/Job/JobParts/Resources.cshtml")]
public class Resources : System.Web.Mvc.WebViewPage<Disco.Web.Models.Job.ShowModel>
public partial class Resources : System.Web.Mvc.WebViewPage<Disco.Web.Models.Job.ShowModel>
{
public Resources()
{
@@ -45,6 +45,7 @@ namespace Disco.Web.Views.Job.JobParts
Html.BundleDeferred("~/Style/Shadowbox");
Html.BundleDeferred("~/ClientScripts/Modules/Shadowbox");
Html.BundleDeferred("~/ClientScripts/Modules/jQuery-SignalR");
#line default
@@ -64,13 +65,13 @@ WriteLiteral(" class=\"commentOutput\"");
WriteLiteral(">\r\n");
#line 10 "..\..\Views\Job\JobParts\Resources.cshtml"
#line 11 "..\..\Views\Job\JobParts\Resources.cshtml"
#line default
#line hidden
#line 10 "..\..\Views\Job\JobParts\Resources.cshtml"
#line 11 "..\..\Views\Job\JobParts\Resources.cshtml"
foreach (var jl in Model.Job.JobLogs.OrderBy(m => m.Timestamp))
{
@@ -82,7 +83,7 @@ WriteLiteral(" <div");
WriteLiteral(" data-logid=\"");
#line 12 "..\..\Views\Job\JobParts\Resources.cshtml"
#line 13 "..\..\Views\Job\JobParts\Resources.cshtml"
Write(jl.Id);
@@ -97,7 +98,7 @@ WriteLiteral(" class=\"author\"");
WriteLiteral(">");
#line 13 "..\..\Views\Job\JobParts\Resources.cshtml"
#line 14 "..\..\Views\Job\JobParts\Resources.cshtml"
Write(jl.TechUser.ToString());
@@ -111,20 +112,20 @@ WriteLiteral("></span><span");
WriteLiteral(" class=\"timestamp\"");
WriteAttribute("title", Tuple.Create(" title=\"", 540), Tuple.Create("\"", 578)
WriteAttribute("title", Tuple.Create(" title=\"", 608), Tuple.Create("\"", 646)
#line 13 "..\..\Views\Job\JobParts\Resources.cshtml"
, Tuple.Create(Tuple.Create("", 548), Tuple.Create<System.Object, System.Int32>(jl.Timestamp.ToFullDateTime()
#line 14 "..\..\Views\Job\JobParts\Resources.cshtml"
, Tuple.Create(Tuple.Create("", 616), Tuple.Create<System.Object, System.Int32>(jl.Timestamp.ToFullDateTime()
#line default
#line hidden
, 548), false)
, 616), false)
);
WriteLiteral(">");
#line 13 "..\..\Views\Job\JobParts\Resources.cshtml"
#line 14 "..\..\Views\Job\JobParts\Resources.cshtml"
Write(jl.Timestamp.ToFuzzy());
@@ -137,7 +138,7 @@ WriteLiteral(" class=\"comment\"");
WriteLiteral(">");
#line 14 "..\..\Views\Job\JobParts\Resources.cshtml"
#line 15 "..\..\Views\Job\JobParts\Resources.cshtml"
Write(jl.Comments.ToMultilineJobRefString());
@@ -146,7 +147,7 @@ WriteLiteral(">");
WriteLiteral("</span>\r\n </div>\r\n");
#line 16 "..\..\Views\Job\JobParts\Resources.cshtml"
#line 17 "..\..\Views\Job\JobParts\Resources.cshtml"
}
@@ -170,33 +171,41 @@ 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: \'");
WriteLiteral(">\r\n $(function () {\r\n var jobId = parseInt(\'");
#line 60 "..\..\Views\Job\JobParts\Resources.cshtml"
#line 25 "..\..\Views\Job\JobParts\Resources.cshtml"
Write(Model.Job.Id);
#line default
#line hidden
WriteLiteral("\');\r\n $Comments = $(\'#Comments\');\r\n $Commen" +
"tOutput = $Comments.find(\'.commentOutput\');\r\n $CommentOutputC" +
"ontainer = $Comments.find(\'.commentOutputContainer\');\r\n $Comm" +
"entInput = $Comments.find(\'textarea.commentInput\');\r\n\r\n windo" +
"w.setTimeout(function () {\r\n $CommentOutput[0].scrollTop " +
"= $CommentOutput[0].scrollHeight; // Scroll to Bottom\r\n }, 0)" +
";\r\n $(\'#jobDetailTabs\').on(\'tabsactivate\', function (event, u" +
"i) {\r\n if (ui.newPanel && ui.newPanel.is(\'#jobDetailTab-R" +
"esources\')) {\r\n $CommentOutput[0].scrollTop = $Commen" +
"tOutput[0].scrollHeight; // Scroll to Bottom\r\n }\r\n " +
" });\r\n\r\n $Comments.find(\'.commentInputPost\').clic" +
"k(postComment);\r\n $CommentInput.keypress(function (e) {\r\n " +
" if (e.which == 13 && !e.shiftKey) {\r\n " +
" postComment();\r\n return false;\r\n " +
" }\r\n });\r\n $CommentOutput.find(\'spa" +
"n.remove\').click(removePost);\r\n\r\n $dialogRemoveLog = $(\'#dial" +
"ogRemoveLog\');\r\n $dialogRemoveLog.dialog({\r\n " +
" resizable: false,\r\n height: 140,\r\n " +
" modal: true,\r\n autoOpen: false\r\n " +
" });\r\n\r\n function postComment() {\r\n " +
"var comment = $CommentInput.val();\r\n if (comment != \'\') {" +
"\r\n var data = { comment: comment }\r\n " +
" $.ajax({\r\n url: \'");
#line 62 "..\..\Views\Job\JobParts\Resources.cshtml"
Write(Url.Action(MVC.API.Job.CommentPost(Model.Job.Id, null)));
@@ -205,27 +214,28 @@ WriteLiteral(">\r\n $(function () {\r\n $Comme
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: \'");
" // Should be added via Repository Notifications\r\n " +
" // addComment(d.Comment, false);\r\n " +
" $CommentInput.val(\'\').attr(\'disabled\', false).focus();\r\n " +
" } else {\r\n " +
" alert(\'Unable to post comment: \' + d.Result);\r\n " +
" $CommentInput.attr(\'disabled\', false);\r\n " +
" }\r\n },\r\n erro" +
"r: function (jqXHR, textStatus, errorThrown) {\r\n " +
" alert(\'Unable to post comment: \' + textStatus);\r\n " +
" $CommentInput.attr(\'disabled\', false);\r\n " +
" }\r\n });\r\n }\r\n " +
" }\r\n function removePost() {\r\n $thi" +
"s = $(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 $d" +
"ialogRemoveLog.dialog(\"disable\");\r\n $dialogRemove" +
"Log.dialog(\"option\", \"buttons\", null);\r\n $.ajax({" +
"\r\n url: \'");
#line 89 "..\..\Views\Job\JobParts\Resources.cshtml"
#line 92 "..\..\Views\Job\JobParts\Resources.cshtml"
Write(Url.Action(MVC.API.Job.CommentRemove()));
@@ -234,33 +244,57 @@ WriteLiteral("\',\r\n dataType: \'json\',\r\n
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=\"");
" // Should be removed via Repository Notifications\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(\"clo" +
"se\");\r\n },\r\n " +
" error: function (jqXHR, 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 " +
" $dialogRemoveLog.dialog(\"close\");\r\n }\r\n" +
" });\r\n\r\n $dialogRemoveLog.dialog(\'" +
"open\');\r\n\r\n return false;\r\n }\r\n " +
" function loadLiveComment(id) {\r\n $.ajax({\r\n " +
" url: \'");
#line 125 "..\..\Views\Job\JobParts\Resources.cshtml"
#line 123 "..\..\Views\Job\JobParts\Resources.cshtml"
Write(Url.Action(MVC.API.Job.Comment()));
#line default
#line hidden
WriteLiteral(@"',
dataType: 'json',
data: { id: id },
success: function (d) {
if (d && d.JobId == jobId) {
addComment(d, false);
}
},
error: function (jqXHR, textStatus, errorThrown) {
alert('Unable to load live comment ' + id + ': ' + textStatus);
}
});
}
function addComment(c, quick) {
var e = $('<div><span class=""author"" /><span class=""remove"" /><span class=""timestamp"" /><span class=""comment"" /></div>');
e.attr('data-logid', c.Id);
e.find('.author').text(c.Author);
e.find('.timestamp').text(c.TimestampFuzzy).attr('title', c.TimestampFull);
e.find('.remove').click(removePost);
var eComment = e.find('.comment').text(c.Comments);
var commentHtml = eComment.text().replace(/\r\n|\r|\n/g, '<br />');
commentHtml = commentHtml.replace(/\#(\d+)/g, '<a href=""");
#line 144 "..\..\Views\Job\JobParts\Resources.cshtml"
Write(Url.Action(MVC.Job.Show(null)));
@@ -278,6 +312,40 @@ WriteLiteral(@"?id=$1"">#$1</a>');
$CommentOutput.animate({ scrollTop: $CommentOutput[0].scrollHeight }, 250)
}
}
// Sign up for Live Events
function liveMessageRecieved(d) {
if (d) {
switch (d.EventType) {
case 0: // Added
loadLiveComment(d.EntityKey[0]);
break;
case 1: // Removed
$CommentOutput.children('div[data-logid=""' + d.EntityKey[0] + '""]').slideUp(300).delay(300).queue(function () {
$(this).remove();
});
break;
}
}
}
var liveMessagesConnection = $.connection('");
#line 172 "..\..\Views\Job\JobParts\Resources.cshtml"
Write(Url.Content("~/API/Repository/Notifications"));
#line default
#line hidden
WriteLiteral(@"')
liveMessagesConnection.received(liveMessageRecieved);
liveMessagesConnection.error(function (e) {
alert('Error: ' + JSON.stringify(e));
});
liveMessagesConnection.start(function () {
liveMessagesConnection.send('/addToGroups:JobLog');
});
});
</script>
</td>
@@ -292,13 +360,13 @@ WriteLiteral(" class=\"attachmentOutput\"");
WriteLiteral(">\r\n");
#line 142 "..\..\Views\Job\JobParts\Resources.cshtml"
#line 186 "..\..\Views\Job\JobParts\Resources.cshtml"
#line default
#line hidden
#line 142 "..\..\Views\Job\JobParts\Resources.cshtml"
#line 186 "..\..\Views\Job\JobParts\Resources.cshtml"
foreach (var ja in Model.Job.JobAttachments)
{
@@ -307,20 +375,20 @@ WriteLiteral(">\r\n");
#line hidden
WriteLiteral(" <a");
WriteAttribute("href", Tuple.Create(" href=\"", 7537), Tuple.Create("\"", 7594)
WriteAttribute("href", Tuple.Create(" href=\"", 9905), Tuple.Create("\"", 9962)
#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 188 "..\..\Views\Job\JobParts\Resources.cshtml"
, Tuple.Create(Tuple.Create("", 9912), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.API.Job.AttachmentDownload(ja.Id))
#line default
#line hidden
, 7544), false)
, 9912), false)
);
WriteLiteral(" data-attachmentid=\"");
#line 144 "..\..\Views\Job\JobParts\Resources.cshtml"
#line 188 "..\..\Views\Job\JobParts\Resources.cshtml"
Write(ja.Id);
@@ -331,7 +399,7 @@ WriteLiteral("\"");
WriteLiteral(" data-mimetype=\"");
#line 144 "..\..\Views\Job\JobParts\Resources.cshtml"
#line 188 "..\..\Views\Job\JobParts\Resources.cshtml"
Write(ja.MimeType);
@@ -343,68 +411,68 @@ WriteLiteral(">\r\n <span");
WriteLiteral(" class=\"icon\"");
WriteAttribute("title", Tuple.Create(" title=\"", 7696), Tuple.Create("\"", 7716)
WriteAttribute("title", Tuple.Create(" title=\"", 10064), Tuple.Create("\"", 10084)
#line 145 "..\..\Views\Job\JobParts\Resources.cshtml"
, Tuple.Create(Tuple.Create("", 7704), Tuple.Create<System.Object, System.Int32>(ja.Filename
#line 189 "..\..\Views\Job\JobParts\Resources.cshtml"
, Tuple.Create(Tuple.Create("", 10072), Tuple.Create<System.Object, System.Int32>(ja.Filename
#line default
#line hidden
, 7704), false)
, 10072), false)
);
WriteLiteral(">\r\n <img");
WriteLiteral(" alt=\"Attachment Thumbnail\"");
WriteAttribute("src", Tuple.Create(" src=\"", 7779), Tuple.Create("\"", 7838)
WriteAttribute("src", Tuple.Create(" src=\"", 10147), Tuple.Create("\"", 10206)
#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 190 "..\..\Views\Job\JobParts\Resources.cshtml"
, Tuple.Create(Tuple.Create("", 10153), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.API.Job.AttachmentThumbnail(ja.Id))
#line default
#line hidden
, 7785), false)
, 10153), false)
);
WriteLiteral(" /></span>\r\n <span");
WriteLiteral(" class=\"comments\"");
WriteAttribute("title", Tuple.Create(" title=\"", 7897), Tuple.Create("\"", 7917)
WriteAttribute("title", Tuple.Create(" title=\"", 10265), Tuple.Create("\"", 10285)
#line 147 "..\..\Views\Job\JobParts\Resources.cshtml"
, Tuple.Create(Tuple.Create("", 7905), Tuple.Create<System.Object, System.Int32>(ja.Comments
#line 191 "..\..\Views\Job\JobParts\Resources.cshtml"
, Tuple.Create(Tuple.Create("", 10273), Tuple.Create<System.Object, System.Int32>(ja.Comments
#line default
#line hidden
, 7905), false)
, 10273), false)
);
WriteLiteral(">\r\n");
#line 148 "..\..\Views\Job\JobParts\Resources.cshtml"
#line 192 "..\..\Views\Job\JobParts\Resources.cshtml"
#line default
#line hidden
#line 148 "..\..\Views\Job\JobParts\Resources.cshtml"
#line 192 "..\..\Views\Job\JobParts\Resources.cshtml"
if (!string.IsNullOrEmpty(ja.DocumentTemplateId))
{
#line default
#line hidden
#line 149 "..\..\Views\Job\JobParts\Resources.cshtml"
#line 193 "..\..\Views\Job\JobParts\Resources.cshtml"
Write(ja.DocumentTemplate.Description);
#line default
#line hidden
#line 149 "..\..\Views\Job\JobParts\Resources.cshtml"
#line 193 "..\..\Views\Job\JobParts\Resources.cshtml"
}
else
{
@@ -412,14 +480,14 @@ WriteLiteral(">\r\n");
#line default
#line hidden
#line 151 "..\..\Views\Job\JobParts\Resources.cshtml"
#line 195 "..\..\Views\Job\JobParts\Resources.cshtml"
Write(ja.Comments);
#line default
#line hidden
#line 151 "..\..\Views\Job\JobParts\Resources.cshtml"
#line 195 "..\..\Views\Job\JobParts\Resources.cshtml"
}
#line default
@@ -431,7 +499,7 @@ WriteLiteral(" class=\"author\"");
WriteLiteral(">");
#line 152 "..\..\Views\Job\JobParts\Resources.cshtml"
#line 196 "..\..\Views\Job\JobParts\Resources.cshtml"
Write(ja.TechUser.ToString());
@@ -445,20 +513,20 @@ WriteLiteral("></span><span");
WriteLiteral(" class=\"timestamp\"");
WriteAttribute("title", Tuple.Create(" title=\"", 8287), Tuple.Create("\"", 8325)
WriteAttribute("title", Tuple.Create(" title=\"", 10655), Tuple.Create("\"", 10693)
#line 152 "..\..\Views\Job\JobParts\Resources.cshtml"
, Tuple.Create(Tuple.Create("", 8295), Tuple.Create<System.Object, System.Int32>(ja.Timestamp.ToFullDateTime()
#line 196 "..\..\Views\Job\JobParts\Resources.cshtml"
, Tuple.Create(Tuple.Create("", 10663), Tuple.Create<System.Object, System.Int32>(ja.Timestamp.ToFullDateTime()
#line default
#line hidden
, 8295), false)
, 10663), false)
);
WriteLiteral(">");
#line 152 "..\..\Views\Job\JobParts\Resources.cshtml"
#line 196 "..\..\Views\Job\JobParts\Resources.cshtml"
Write(ja.Timestamp.ToFuzzy());
@@ -467,7 +535,7 @@ WriteLiteral(">");
WriteLiteral("</span>\r\n </a> \r\n");
#line 154 "..\..\Views\Job\JobParts\Resources.cshtml"
#line 198 "..\..\Views\Job\JobParts\Resources.cshtml"
}
@@ -530,7 +598,7 @@ WriteLiteral(@">
'");
#line 197 "..\..\Views\Job\JobParts\Resources.cshtml"
#line 241 "..\..\Views\Job\JobParts\Resources.cshtml"
Write(Links.ClientBin.Disco_Silverlight_AttachmentUpload_xap);
@@ -551,7 +619,7 @@ WriteLiteral(@"',
'UploadUrl=");
#line 209 "..\..\Views\Job\JobParts\Resources.cshtml"
#line 253 "..\..\Views\Job\JobParts\Resources.cshtml"
Write(Url.Action(MVC.API.Job.AttachmentUpload(Model.Job.Id, null)));
@@ -583,7 +651,7 @@ WriteLiteral(@"'
url: '");
#line 232 "..\..\Views\Job\JobParts\Resources.cshtml"
#line 276 "..\..\Views\Job\JobParts\Resources.cshtml"
Write(Url.Action(MVC.API.Job.Attachment()));
@@ -601,7 +669,7 @@ WriteLiteral(@"',
e.attr('data-attachmentid', a.Id).attr('data-mimetype', a.MimeType).attr('href', '");
#line 241 "..\..\Views\Job\JobParts\Resources.cshtml"
#line 285 "..\..\Views\Job\JobParts\Resources.cshtml"
Write(Url.Action(MVC.API.Job.AttachmentDownload()));
@@ -611,7 +679,7 @@ WriteLiteral("/\' + a.Id);\r\n e.find(\'.icon
"\'");
#line 242 "..\..\Views\Job\JobParts\Resources.cshtml"
#line 286 "..\..\Views\Job\JobParts\Resources.cshtml"
Write(Url.Action(MVC.API.Job.AttachmentThumbnail()));
@@ -644,7 +712,7 @@ WriteLiteral("/\' + a.Id);\r\n e.find(\'.comm
" $.ajax({\r\n url: \'");
#line 275 "..\..\Views\Job\JobParts\Resources.cshtml"
#line 319 "..\..\Views\Job\JobParts\Resources.cshtml"
Write(Url.Action(MVC.API.Job.AttachmentRemove()));