Bug Fix: Upload attachments required refresh
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.18051
|
||||
// Runtime Version:4.0.30319.34003
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
@@ -464,49 +464,63 @@ WriteLiteral(@"',
|
||||
#line 122 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
if (canRemoveAnyAttachments)
|
||||
{
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("buildAttachment(a, true);");
|
||||
|
||||
|
||||
#line 123 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
}
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" ");
|
||||
|
||||
WriteLiteral("buildAttachment(a, true, quick);");
|
||||
|
||||
WriteLiteral("\r\n");
|
||||
|
||||
|
||||
#line 125 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
}
|
||||
else if (canRemoveOwnAttachments)
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" ");
|
||||
|
||||
WriteLiteral("buildAttachment(a, (a.AuthorId === \'");
|
||||
|
||||
|
||||
#line 125 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
Write(CurrentUser.Id);
|
||||
#line 128 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
Write(CurrentUser.Id);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\'));");
|
||||
WriteLiteral("\'), quick);");
|
||||
|
||||
WriteLiteral("\r\n");
|
||||
|
||||
|
||||
#line 125 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
}
|
||||
#line 129 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("buildAttachment(a, false);");
|
||||
|
||||
|
||||
#line 127 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(@"
|
||||
} else {
|
||||
WriteLiteral(" ");
|
||||
|
||||
WriteLiteral("buildAttachment(a, false, quick);");
|
||||
|
||||
WriteLiteral("\r\n");
|
||||
|
||||
|
||||
#line 133 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(@" } else {
|
||||
alert('Unable to add attachment: ' + d.Result);
|
||||
}
|
||||
},
|
||||
@@ -516,7 +530,7 @@ WriteLiteral(@"
|
||||
});
|
||||
}
|
||||
|
||||
function buildAttachment(a, canRemove) {
|
||||
function buildAttachment(a, canRemove, quick) {
|
||||
var t = '<a><span");
|
||||
|
||||
WriteLiteral(" class=\"icon\"");
|
||||
@@ -547,7 +561,7 @@ WriteLiteral("></span></a>\';\r\n\r\n var e = $(t);\r
|
||||
"tr(\'href\', \'");
|
||||
|
||||
|
||||
#line 147 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
#line 152 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
Write(Url.Action(MVC.API.Device.AttachmentDownload()));
|
||||
|
||||
|
||||
@@ -556,7 +570,7 @@ WriteLiteral("></span></a>\';\r\n\r\n var e = $(t);\r
|
||||
WriteLiteral("/\' + a.Id);\r\n e.find(\'.icon img\').attr(\'src\', \'");
|
||||
|
||||
|
||||
#line 148 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
#line 153 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
Write(Url.Action(MVC.API.Device.AttachmentThumbnail()));
|
||||
|
||||
|
||||
@@ -581,7 +595,7 @@ WriteLiteral(@"/' + a.Id);
|
||||
");
|
||||
|
||||
|
||||
#line 164 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
#line 169 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -590,7 +604,7 @@ WriteLiteral(@"/' + a.Id);
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 165 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
#line 170 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
if (canRemoveAnyAttachments || canRemoveOwnAttachments)
|
||||
{
|
||||
|
||||
@@ -621,7 +635,7 @@ WriteLiteral(@"
|
||||
url: '");
|
||||
|
||||
|
||||
#line 188 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
#line 193 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
Write(Url.Action(MVC.API.Device.AttachmentRemove()));
|
||||
|
||||
|
||||
@@ -653,7 +667,7 @@ WriteLiteral("\',\r\n dataType: \'json\',
|
||||
"egion\r\n ");
|
||||
|
||||
|
||||
#line 220 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
#line 225 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -697,7 +711,7 @@ WriteLiteral("></span>\r\n Are you sure?\r\n </p>\r\n </div
|
||||
"id=\"DeviceDetailTab-ResourcesLink\">Attachments [");
|
||||
|
||||
|
||||
#line 243 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
#line 248 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
Write(Model.Device.DeviceAttachments == null ? 0 : Model.Device.DeviceAttachments.Count);
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user