feature: Upload Online Attachments front end
This commit is contained in:
@@ -19,7 +19,7 @@
|
||||
<table id="deviceShowResources">
|
||||
<tr>
|
||||
<td id="AttachmentsContainer">
|
||||
<div id="Attachments" class="@(canAddAttachments ? "canAddAttachments" : "cannotAddAttachments")" data-uploadurl="@(Url.Action(MVC.API.Device.AttachmentUpload(Model.Device.SerialNumber, null)))">
|
||||
<div id="Attachments" class="@(canAddAttachments ? "canAddAttachments" : "cannotAddAttachments")" data-uploadurl="@(Url.Action(MVC.API.Device.AttachmentUpload(Model.Device.SerialNumber, null)))" data-onlineuploadurl="@(Url.Action(MVC.API.Device.AttachmentOnlineUploadSession(Model.Device.SerialNumber)))" data-qrcodeurl="@Url.Content("~/ClientSource/Scripts/Modules/qrcode.min.js")">
|
||||
@Html.AntiForgeryToken()
|
||||
<div class="Disco-AttachmentUpload-DropTarget">
|
||||
<h2>Drop Attachments Here</h2>
|
||||
@@ -47,7 +47,7 @@
|
||||
{
|
||||
<div class="Disco-AttachmentUpload-Progress"></div>
|
||||
<div class="attachmentInput clearfix">
|
||||
<span class="action enabled upload fa fa-upload disabled" title="Attach File"></span><span class="action enabled photo fa fa-camera disabled" title="Capture Image"></span>
|
||||
<span class="action enabled upload fa fa-upload disabled" title="Attach File"></span><span class="action enabled photo fa fa-camera disabled" title="Capture Image"></span><span class="action enabled online-upload fa fa-qrcode disabled" title="Upload with Online Services"></span>
|
||||
</div>
|
||||
}
|
||||
<script type="text/javascript">
|
||||
@@ -239,6 +239,12 @@
|
||||
var attachmentUploader = new document.Disco.AttachmentUploader($Attachments);
|
||||
|
||||
var $attachmentInput = $Attachments.find('.attachmentInput');
|
||||
$attachmentInput.find('.online-upload').on('click', function () {
|
||||
if ($(this).hasClass('disabled'))
|
||||
alert('Disconnected from the Disco ICT Server, please refresh this page and try again');
|
||||
else
|
||||
attachmentUploader.onlineUpload();
|
||||
});
|
||||
if (window.location.protocol != 'https:') {
|
||||
$attachmentInput.find('.photo')
|
||||
.removeClass('enabled')
|
||||
|
||||
@@ -103,6 +103,28 @@ WriteLiteral(" data-uploadurl=\"");
|
||||
#line hidden
|
||||
WriteLiteral("\"");
|
||||
|
||||
WriteLiteral(" data-onlineuploadurl=\"");
|
||||
|
||||
|
||||
#line 22 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
Write(Url.Action(MVC.API.Device.AttachmentOnlineUploadSession(Model.Device.SerialNumber)));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\"");
|
||||
|
||||
WriteLiteral(" data-qrcodeurl=\"");
|
||||
|
||||
|
||||
#line 22 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
Write(Url.Content("~/ClientSource/Scripts/Modules/qrcode.min.js"));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\"");
|
||||
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
@@ -143,14 +165,14 @@ WriteLiteral(">\r\n");
|
||||
#line hidden
|
||||
WriteLiteral(" <a");
|
||||
|
||||
WriteAttribute("href", Tuple.Create(" href=\"", 1582), Tuple.Create("\"", 1642)
|
||||
WriteAttribute("href", Tuple.Create(" href=\"", 1770), Tuple.Create("\"", 1830)
|
||||
|
||||
#line 32 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 1589), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.API.Device.AttachmentDownload(da.Id))
|
||||
, Tuple.Create(Tuple.Create("", 1777), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.API.Device.AttachmentDownload(da.Id))
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 1589), false)
|
||||
, 1777), false)
|
||||
);
|
||||
|
||||
WriteLiteral(" data-attachmentid=\"");
|
||||
@@ -179,42 +201,42 @@ WriteLiteral(">\r\n <span");
|
||||
|
||||
WriteLiteral(" class=\"icon\"");
|
||||
|
||||
WriteAttribute("title", Tuple.Create(" title=\"", 1752), Tuple.Create("\"", 1772)
|
||||
WriteAttribute("title", Tuple.Create(" title=\"", 1940), Tuple.Create("\"", 1960)
|
||||
|
||||
#line 33 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 1760), Tuple.Create<System.Object, System.Int32>(da.Filename
|
||||
, Tuple.Create(Tuple.Create("", 1948), Tuple.Create<System.Object, System.Int32>(da.Filename
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 1760), false)
|
||||
, 1948), false)
|
||||
);
|
||||
|
||||
WriteLiteral(">\r\n <img");
|
||||
|
||||
WriteLiteral(" alt=\"Attachment Thumbnail\"");
|
||||
|
||||
WriteAttribute("src", Tuple.Create(" src=\"", 1843), Tuple.Create("\"", 1905)
|
||||
WriteAttribute("src", Tuple.Create(" src=\"", 2031), Tuple.Create("\"", 2093)
|
||||
|
||||
#line 34 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 1849), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.API.Device.AttachmentThumbnail(da.Id))
|
||||
, Tuple.Create(Tuple.Create("", 2037), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.API.Device.AttachmentThumbnail(da.Id))
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 1849), false)
|
||||
, 2037), false)
|
||||
);
|
||||
|
||||
WriteLiteral(" /></span>\r\n <span");
|
||||
|
||||
WriteLiteral(" class=\"comments\"");
|
||||
|
||||
WriteAttribute("title", Tuple.Create(" title=\"", 1972), Tuple.Create("\"", 2009)
|
||||
WriteAttribute("title", Tuple.Create(" title=\"", 2160), Tuple.Create("\"", 2197)
|
||||
|
||||
#line 35 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 1980), Tuple.Create<System.Object, System.Int32>(da.Comments ?? da.Filename
|
||||
, Tuple.Create(Tuple.Create("", 2168), Tuple.Create<System.Object, System.Int32>(da.Comments ?? da.Filename
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 1980), false)
|
||||
, 2168), false)
|
||||
);
|
||||
|
||||
WriteLiteral(">\r\n");
|
||||
@@ -298,14 +320,14 @@ WriteLiteral("<span");
|
||||
|
||||
WriteLiteral(" class=\"timestamp\"");
|
||||
|
||||
WriteAttribute("title", Tuple.Create(" title=\"", 2700), Tuple.Create("\"", 2738)
|
||||
WriteAttribute("title", Tuple.Create(" title=\"", 2888), Tuple.Create("\"", 2926)
|
||||
|
||||
#line 41 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 2708), Tuple.Create<System.Object, System.Int32>(da.Timestamp.ToFullDateTime()
|
||||
, Tuple.Create(Tuple.Create("", 2896), Tuple.Create<System.Object, System.Int32>(da.Timestamp.ToFullDateTime()
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 2708), false)
|
||||
, 2896), false)
|
||||
);
|
||||
|
||||
WriteLiteral(" data-livestamp=\"");
|
||||
@@ -376,6 +398,12 @@ WriteLiteral(" class=\"action enabled photo fa fa-camera disabled\"");
|
||||
|
||||
WriteLiteral(" title=\"Capture Image\"");
|
||||
|
||||
WriteLiteral("></span><span");
|
||||
|
||||
WriteLiteral(" class=\"action enabled online-upload fa fa-qrcode disabled\"");
|
||||
|
||||
WriteLiteral(" title=\"Upload with Online Services\"");
|
||||
|
||||
WriteLiteral("></span>\r\n </div>\r\n");
|
||||
|
||||
|
||||
@@ -655,40 +683,45 @@ WriteLiteral("/\' + a.Id + \'?v=\' + retryCount);\r\n
|
||||
WriteLiteral("\r\n //#region Add Attachments\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 ");
|
||||
"chmentInput\');\r\n $attachmentInput.find(\'.online-uploa" +
|
||||
"d\').on(\'click\', function () {\r\n if ($(this).hasCl" +
|
||||
"ass(\'disabled\'))\r\n alert(\'Disconnected from t" +
|
||||
"he Disco ICT Server, please refresh this page and try again\');\r\n " +
|
||||
" else\r\n attachmentUploader.onl" +
|
||||
"ineUpload();\r\n });\r\n if (w" +
|
||||
"indow.location.protocol != \'https:\') {\r\n $attachm" +
|
||||
"entInput.find(\'.photo\')\r\n .removeClass(\'enabl" +
|
||||
"ed\')\r\n .addClass(\'disabled\')\r\n " +
|
||||
" .attr(\'title\', \'Capture Image: this functionality is only a" +
|
||||
"vailable 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 only available over a HTTPS connection\'" +
|
||||
");\r\n else if ($(this).hasClass(\'disabled\'))\r\n " +
|
||||
" alert(\'Disconnected from the Disco ICT Server, p" +
|
||||
"lease refresh this page and try again\');\r\n else\r\n" +
|
||||
" attachmentUploader.uploadImage();\r\n " +
|
||||
" });\r\n $attachmentInput.find(\'.uplo" +
|
||||
"ad\').click(function () {\r\n if ($(this).hasClass(\'" +
|
||||
"disabled\'))\r\n alert(\'Disconnected from the Di" +
|
||||
"sco ICT Server, please refresh this page and try again\');\r\n " +
|
||||
" else\r\n attachmentUploader.uploadFi" +
|
||||
"les();\r\n });\r\n\r\n var resou" +
|
||||
"rcesTab;\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\').find(\'a[href=\"#DeviceDetailTab-Resources\"]\').closest(\'li\').index()\r\n " +
|
||||
" };\r\n }\r\n " +
|
||||
" var selectedIndex = resourcesTab.tabs.tabs(\'option\', \'" +
|
||||
"active\');\r\n if (resourcesTab.resourcesIndex !== s" +
|
||||
"electedIndex)\r\n resourcesTab.tabs.tabs(\'optio" +
|
||||
"n\', \'active\', resourcesTab.resourcesIndex);\r\n });\r\n " +
|
||||
" //#endregion\r\n ");
|
||||
|
||||
|
||||
#line 277 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
#line 283 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -697,7 +730,7 @@ WriteLiteral("\r\n //#region Add Attachments\r\n
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 278 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
#line 284 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
if (canRemoveAnyAttachments || canRemoveOwnAttachments)
|
||||
{
|
||||
|
||||
@@ -730,7 +763,7 @@ WriteLiteral(@"
|
||||
url: '");
|
||||
|
||||
|
||||
#line 303 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
#line 309 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
Write(Url.Action(MVC.API.Device.AttachmentRemove()));
|
||||
|
||||
|
||||
@@ -758,7 +791,7 @@ WriteLiteral("\',\r\n dataType: \'jso
|
||||
"endregion\r\n ");
|
||||
|
||||
|
||||
#line 330 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
#line 336 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -795,7 +828,7 @@ WriteLiteral("></i> Are you sure?\r\n </p>\r\n </div>\r\n <scr
|
||||
"etailTab-ResourcesLink\">Attachments [");
|
||||
|
||||
|
||||
#line 351 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
#line 357 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
Write(Model.Device.DeviceAttachments == null ? 0 : Model.Device.DeviceAttachments.Count);
|
||||
|
||||
|
||||
|
||||
@@ -53,7 +53,7 @@
|
||||
@if (canShowAttachments)
|
||||
{
|
||||
<td id="AttachmentsContainer">
|
||||
<div id="Attachments" class="@(canAddAttachments ? "canAddAttachments" : "cannotAddAttachments")" data-uploadurl="@(Url.Action(MVC.API.Job.AttachmentUpload(Model.Job.Id, null)))">
|
||||
<div id="Attachments" class="@(canAddAttachments ? "canAddAttachments" : "cannotAddAttachments")" data-uploadurl="@(Url.Action(MVC.API.Job.AttachmentUpload(Model.Job.Id, null)))" data-onlineuploadurl="@(Url.Action(MVC.API.Job.AttachmentOnlineUploadSession(Model.Job.Id)))" data-qrcodeurl="@Url.Content("~/ClientSource/Scripts/Modules/qrcode.min.js")">
|
||||
@Html.AntiForgeryToken()
|
||||
<div class="Disco-AttachmentUpload-DropTarget">
|
||||
<h2>Drop Attachments Here</h2>
|
||||
@@ -79,7 +79,7 @@
|
||||
{
|
||||
<div class="Disco-AttachmentUpload-Progress"></div>
|
||||
<div class="attachmentInput clearfix">
|
||||
<span class="action enabled upload fa fa-upload disabled" title="Attach File"></span><span class="action enabled photo fa fa-camera disabled" title="Capture Image"></span>
|
||||
<span class="action enabled upload fa fa-upload disabled" title="Attach File"></span><span class="action enabled photo fa fa-camera disabled" title="Capture Image"></span><span class="action enabled online-upload fa fa-qrcode disabled" title="Upload with Online Services"></span>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
@@ -322,6 +322,12 @@
|
||||
var attachmentUploader = new document.Disco.AttachmentUploader($Attachments);
|
||||
|
||||
var $attachmentInput = $Attachments.find('.attachmentInput');
|
||||
$attachmentInput.find('.online-upload').on('click', function () {
|
||||
if ($(this).hasClass('disabled'))
|
||||
alert('Disconnected from the Disco ICT Server, please refresh this page and try again');
|
||||
else
|
||||
attachmentUploader.onlineUpload();
|
||||
});
|
||||
if (window.location.protocol != 'https:') {
|
||||
$attachmentInput.find('.photo')
|
||||
.removeClass('enabled')
|
||||
|
||||
@@ -344,6 +344,28 @@ WriteLiteral(" data-uploadurl=\"");
|
||||
#line hidden
|
||||
WriteLiteral("\"");
|
||||
|
||||
WriteLiteral(" data-onlineuploadurl=\"");
|
||||
|
||||
|
||||
#line 56 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||
Write(Url.Action(MVC.API.Job.AttachmentOnlineUploadSession(Model.Job.Id)));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\"");
|
||||
|
||||
WriteLiteral(" data-qrcodeurl=\"");
|
||||
|
||||
|
||||
#line 56 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||
Write(Url.Content("~/ClientSource/Scripts/Modules/qrcode.min.js"));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\"");
|
||||
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
@@ -382,14 +404,14 @@ WriteLiteral(">\r\n");
|
||||
#line hidden
|
||||
WriteLiteral(" <a");
|
||||
|
||||
WriteAttribute("href", Tuple.Create(" href=\"", 3557), Tuple.Create("\"", 3614)
|
||||
WriteAttribute("href", Tuple.Create(" href=\"", 3729), Tuple.Create("\"", 3786)
|
||||
|
||||
#line 64 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 3564), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.API.Job.AttachmentDownload(ja.Id))
|
||||
, Tuple.Create(Tuple.Create("", 3736), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.API.Job.AttachmentDownload(ja.Id))
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 3564), false)
|
||||
, 3736), false)
|
||||
);
|
||||
|
||||
WriteLiteral(" data-attachmentid=\"");
|
||||
@@ -418,28 +440,28 @@ WriteLiteral(">\r\n <span");
|
||||
|
||||
WriteLiteral(" class=\"icon\"");
|
||||
|
||||
WriteAttribute("title", Tuple.Create(" title=\"", 3724), Tuple.Create("\"", 3744)
|
||||
WriteAttribute("title", Tuple.Create(" title=\"", 3896), Tuple.Create("\"", 3916)
|
||||
|
||||
#line 65 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 3732), Tuple.Create<System.Object, System.Int32>(ja.Filename
|
||||
, Tuple.Create(Tuple.Create("", 3904), Tuple.Create<System.Object, System.Int32>(ja.Filename
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 3732), false)
|
||||
, 3904), false)
|
||||
);
|
||||
|
||||
WriteLiteral(">\r\n <img");
|
||||
|
||||
WriteLiteral(" alt=\"Attachment Thumbnail\"");
|
||||
|
||||
WriteAttribute("src", Tuple.Create(" src=\"", 3815), Tuple.Create("\"", 3874)
|
||||
WriteAttribute("src", Tuple.Create(" src=\"", 3987), Tuple.Create("\"", 4046)
|
||||
|
||||
#line 66 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 3821), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.API.Job.AttachmentThumbnail(ja.Id))
|
||||
, Tuple.Create(Tuple.Create("", 3993), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.API.Job.AttachmentThumbnail(ja.Id))
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 3821), false)
|
||||
, 3993), false)
|
||||
);
|
||||
|
||||
WriteLiteral(" />\r\n </span>\r\n <sp" +
|
||||
@@ -447,14 +469,14 @@ WriteLiteral(" />\r\n </span>\r\n
|
||||
|
||||
WriteLiteral(" class=\"comments\"");
|
||||
|
||||
WriteAttribute("title", Tuple.Create(" title=\"", 3975), Tuple.Create("\"", 3995)
|
||||
WriteAttribute("title", Tuple.Create(" title=\"", 4147), Tuple.Create("\"", 4167)
|
||||
|
||||
#line 68 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 3983), Tuple.Create<System.Object, System.Int32>(ja.Comments
|
||||
, Tuple.Create(Tuple.Create("", 4155), Tuple.Create<System.Object, System.Int32>(ja.Comments
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 3983), false)
|
||||
, 4155), false)
|
||||
);
|
||||
|
||||
WriteLiteral(">\r\n");
|
||||
@@ -549,14 +571,14 @@ WriteLiteral(" data-livestamp=\"");
|
||||
#line hidden
|
||||
WriteLiteral("\"");
|
||||
|
||||
WriteAttribute("title", Tuple.Create(" title=\"", 4680), Tuple.Create("\"", 4718)
|
||||
WriteAttribute("title", Tuple.Create(" title=\"", 4852), Tuple.Create("\"", 4890)
|
||||
|
||||
#line 74 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 4688), Tuple.Create<System.Object, System.Int32>(ja.Timestamp.ToFullDateTime()
|
||||
, Tuple.Create(Tuple.Create("", 4860), Tuple.Create<System.Object, System.Int32>(ja.Timestamp.ToFullDateTime()
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 4688), false)
|
||||
, 4860), false)
|
||||
);
|
||||
|
||||
WriteLiteral(">");
|
||||
@@ -615,6 +637,12 @@ WriteLiteral(" class=\"action enabled photo fa fa-camera disabled\"");
|
||||
|
||||
WriteLiteral(" title=\"Capture Image\"");
|
||||
|
||||
WriteLiteral("></span><span");
|
||||
|
||||
WriteLiteral(" class=\"action enabled online-upload fa fa-qrcode disabled\"");
|
||||
|
||||
WriteLiteral(" title=\"Upload with Online Services\"");
|
||||
|
||||
WriteLiteral("></span>\r\n </div>\r\n");
|
||||
|
||||
|
||||
@@ -1038,33 +1066,38 @@ WriteLiteral("\');\r\n\r\n //#region Attachments\r\n var $
|
||||
#line hidden
|
||||
WriteLiteral("\r\n //#region Add Attachments\r\n var attachmentUploader = new" +
|
||||
" 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 ");
|
||||
"Input = $Attachments.find(\'.attachmentInput\');\r\n $attachmentInput.fin" +
|
||||
"d(\'.online-upload\').on(\'click\', function () {\r\n if ($(this).hasCl" +
|
||||
"ass(\'disabled\'))\r\n alert(\'Disconnected from the Disco ICT Ser" +
|
||||
"ver, please refresh this page and try again\');\r\n else\r\n " +
|
||||
" attachmentUploader.onlineUpload();\r\n });\r\n if (w" +
|
||||
"indow.location.protocol != \'https:\') {\r\n $attachmentInput.find(\'." +
|
||||
"photo\')\r\n .removeClass(\'enabled\')\r\n .addCl" +
|
||||
"ass(\'disabled\')\r\n .attr(\'title\', \'Capture Image: this functio" +
|
||||
"nality 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 only av" +
|
||||
"ailable over a HTTPS connection\');\r\n else if ($(this).hasClass(\'d" +
|
||||
"isabled\'))\r\n alert(\'Disconnected from the Disco ICT Server, p" +
|
||||
"lease refresh this page and try again\');\r\n else\r\n " +
|
||||
" attachmentUploader.uploadImage();\r\n });\r\n $attachmentI" +
|
||||
"nput.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 resou" +
|
||||
"rcesTab;\r\n $(document).on(\'dragover\', function () {\r\n " +
|
||||
"if (!resourcesTab) {\r\n var tabs = $Attachments.closest(\'.ui-t" +
|
||||
"abs\');\r\n resourcesTab = {\r\n tabs: tabs" +
|
||||
",\r\n resourcesIndex: tabs.children(\'ul.ui-tabs-nav\').find(" +
|
||||
"\'a[href=\"#jobDetailTab-Resources\"]\').closest(\'li\').index()\r\n " +
|
||||
"};\r\n }\r\n var selectedIndex = resourcesTab.tabs.tab" +
|
||||
"s(\'option\', \'active\');\r\n if (resourcesTab.resourcesIndex !== sele" +
|
||||
"ctedIndex)\r\n resourcesTab.tabs.tabs(\'option\', \'active\', resou" +
|
||||
"rcesTab.resourcesIndex);\r\n });\r\n //#endregion\r\n " +
|
||||
" ");
|
||||
|
||||
|
||||
#line 360 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||
#line 366 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -1073,13 +1106,13 @@ WriteLiteral("\r\n //#region Add Attachments\r\n var attac
|
||||
WriteLiteral("\r\n");
|
||||
|
||||
|
||||
#line 362 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||
#line 368 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 362 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||
#line 368 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||
if (canRemoveAnyAttachments || canRemoveOwnAttachments)
|
||||
{
|
||||
|
||||
@@ -1114,7 +1147,7 @@ WriteLiteral(@"
|
||||
url: '");
|
||||
|
||||
|
||||
#line 389 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||
#line 395 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||
Write(Url.Action(MVC.API.Job.AttachmentRemove()));
|
||||
|
||||
|
||||
@@ -1150,7 +1183,7 @@ WriteLiteral(@"',
|
||||
");
|
||||
|
||||
|
||||
#line 416 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||
#line 422 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -1160,7 +1193,7 @@ WriteLiteral("\r\n function addAttachment(key, quick) {\r\n
|
||||
"id: key };\r\n $.ajax({\r\n url: \'");
|
||||
|
||||
|
||||
#line 421 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||
#line 427 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||
Write(Url.Action(MVC.API.Job.Attachment()));
|
||||
|
||||
|
||||
@@ -1171,13 +1204,13 @@ WriteLiteral("\',\r\n dataType: \'json\',\r\n
|
||||
"\'OK\') {\r\n var a = d.Attachment;\r\n");
|
||||
|
||||
|
||||
#line 427 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||
#line 433 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 427 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||
#line 433 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||
if (canRemoveAnyAttachments)
|
||||
{
|
||||
|
||||
@@ -1191,7 +1224,7 @@ WriteLiteral("buildAttachment(a, true, quick);");
|
||||
WriteLiteral("\r\n");
|
||||
|
||||
|
||||
#line 430 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||
#line 436 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||
}
|
||||
else if (canRemoveOwnAttachments)
|
||||
{
|
||||
@@ -1204,7 +1237,7 @@ WriteLiteral(" ");
|
||||
WriteLiteral("buildAttachment(a, (a.AuthorId === \'");
|
||||
|
||||
|
||||
#line 433 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||
#line 439 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||
Write(CurrentUser.UserId);
|
||||
|
||||
|
||||
@@ -1215,7 +1248,7 @@ WriteLiteral("\'), quick);");
|
||||
WriteLiteral("\r\n");
|
||||
|
||||
|
||||
#line 434 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||
#line 440 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1230,7 +1263,7 @@ WriteLiteral("buildAttachment(a, false, quick);");
|
||||
WriteLiteral("\r\n");
|
||||
|
||||
|
||||
#line 438 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||
#line 444 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -1257,7 +1290,7 @@ WriteLiteral(@" } else {
|
||||
e.attr('data-attachmentid', a.Id).attr('data-mimetype', a.MimeType).attr('href', '");
|
||||
|
||||
|
||||
#line 457 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||
#line 463 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||
Write(Url.Action(MVC.API.Job.AttachmentDownload()));
|
||||
|
||||
|
||||
@@ -1289,7 +1322,7 @@ WriteLiteral(@"/' + a.Id);
|
||||
img.attr('src', '");
|
||||
|
||||
|
||||
#line 480 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||
#line 486 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||
Write(Url.Action(MVC.API.Job.AttachmentThumbnail()));
|
||||
|
||||
|
||||
@@ -1336,14 +1369,14 @@ WriteLiteral("/\' + a.Id + \'?v=\' + retryCount);\r\n };\
|
||||
"script>\r\n");
|
||||
|
||||
|
||||
#line 550 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||
#line 556 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 551 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||
#line 557 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||
if (canShowLogs || canShowAttachments)
|
||||
{
|
||||
|
||||
@@ -1353,7 +1386,7 @@ WriteLiteral("/\' + a.Id + \'?v=\' + retryCount);\r\n };\
|
||||
WriteLiteral(" <script>\r\n $(function () {\r\n var jobId = parseInt(\'");
|
||||
|
||||
|
||||
#line 555 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||
#line 561 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||
Write(Model.Job.Id);
|
||||
|
||||
|
||||
@@ -1363,7 +1396,7 @@ WriteLiteral("\');\r\n\r\n //#region LiveEvents\r\n var hu
|
||||
"dates;\r\n\r\n // Map Functions\r\n");
|
||||
|
||||
|
||||
#line 561 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||
#line 567 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||
if (canShowLogs)
|
||||
{
|
||||
|
||||
@@ -1374,14 +1407,14 @@ WriteLiteral("\r\n hub.client.addLog = document.DiscoFunctions.liveLo
|
||||
" ");
|
||||
|
||||
|
||||
#line 565 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||
#line 571 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 566 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||
#line 572 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||
if (canShowAttachments)
|
||||
{
|
||||
|
||||
@@ -1402,7 +1435,7 @@ WriteLiteral(@"
|
||||
");
|
||||
|
||||
|
||||
#line 579 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||
#line 585 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -1444,7 +1477,7 @@ WriteLiteral("\r\n $.connection.hub.qs = { JobId: jobId };\r\n
|
||||
"egion\r\n });\r\n </script>\r\n");
|
||||
|
||||
|
||||
#line 632 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||
#line 638 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||
}
|
||||
|
||||
#line default
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
<table id="userShowResources">
|
||||
<tr>
|
||||
<td id="AttachmentsContainer">
|
||||
<div id="Attachments" class="@(canAddAttachments ? "canAddAttachments" : "cannotAddAttachments")" data-uploadurl="@(Url.Action(MVC.API.User.AttachmentUpload(Model.User.UserId, null)))">
|
||||
<div id="Attachments" class="@(canAddAttachments ? "canAddAttachments" : "cannotAddAttachments")" data-uploadurl="@(Url.Action(MVC.API.User.AttachmentUpload(Model.User.UserId, null)))" data-onlineuploadurl="@(Url.Action(MVC.API.User.AttachmentOnlineUploadSession(Model.User.UserId)))" data-qrcodeurl="@Url.Content("~/ClientSource/Scripts/Modules/qrcode.min.js")">
|
||||
@Html.AntiForgeryToken()
|
||||
<div class="Disco-AttachmentUpload-DropTarget">
|
||||
<h2>Drop Attachments Here</h2>
|
||||
@@ -48,7 +48,7 @@
|
||||
{
|
||||
<div class="Disco-AttachmentUpload-Progress"></div>
|
||||
<div class="attachmentInput clearfix">
|
||||
<span class="action enabled upload fa fa-upload disabled" title="Attach File"></span><span class="action enabled photo fa fa-camera disabled" title="Capture Image"></span>
|
||||
<span class="action enabled upload fa fa-upload disabled" title="Attach File"></span><span class="action enabled photo fa fa-camera disabled" title="Capture Image"></span><span class="action enabled online-upload fa fa-qrcode disabled" title="Upload with Online Services"></span>
|
||||
</div>
|
||||
}
|
||||
<script type="text/javascript">
|
||||
@@ -237,6 +237,12 @@
|
||||
var attachmentUploader = new document.Disco.AttachmentUploader($Attachments);
|
||||
|
||||
var $attachmentInput = $Attachments.find('.attachmentInput');
|
||||
$attachmentInput.find('.online-upload').on('click', function () {
|
||||
if ($(this).hasClass('disabled'))
|
||||
alert('Disconnected from the Disco ICT Server, please refresh this page and try again');
|
||||
else
|
||||
attachmentUploader.onlineUpload();
|
||||
});
|
||||
if (window.location.protocol != 'https:') {
|
||||
$attachmentInput.find('.photo')
|
||||
.removeClass('enabled')
|
||||
|
||||
@@ -103,6 +103,28 @@ WriteLiteral(" data-uploadurl=\"");
|
||||
#line hidden
|
||||
WriteLiteral("\"");
|
||||
|
||||
WriteLiteral(" data-onlineuploadurl=\"");
|
||||
|
||||
|
||||
#line 22 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
Write(Url.Action(MVC.API.User.AttachmentOnlineUploadSession(Model.User.UserId)));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\"");
|
||||
|
||||
WriteLiteral(" data-qrcodeurl=\"");
|
||||
|
||||
|
||||
#line 22 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
Write(Url.Content("~/ClientSource/Scripts/Modules/qrcode.min.js"));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\"");
|
||||
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
@@ -143,14 +165,14 @@ WriteLiteral(">\r\n");
|
||||
#line hidden
|
||||
WriteLiteral(" <a");
|
||||
|
||||
WriteAttribute("href", Tuple.Create(" href=\"", 1552), Tuple.Create("\"", 1610)
|
||||
WriteAttribute("href", Tuple.Create(" href=\"", 1730), Tuple.Create("\"", 1788)
|
||||
|
||||
#line 32 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 1559), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.API.User.AttachmentDownload(ua.Id))
|
||||
, Tuple.Create(Tuple.Create("", 1737), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.API.User.AttachmentDownload(ua.Id))
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 1559), false)
|
||||
, 1737), false)
|
||||
);
|
||||
|
||||
WriteLiteral(" data-attachmentid=\"");
|
||||
@@ -179,28 +201,28 @@ WriteLiteral(">\r\n <span");
|
||||
|
||||
WriteLiteral(" class=\"icon\"");
|
||||
|
||||
WriteAttribute("title", Tuple.Create(" title=\"", 1724), Tuple.Create("\"", 1744)
|
||||
WriteAttribute("title", Tuple.Create(" title=\"", 1902), Tuple.Create("\"", 1922)
|
||||
|
||||
#line 33 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 1732), Tuple.Create<System.Object, System.Int32>(ua.Filename
|
||||
, Tuple.Create(Tuple.Create("", 1910), Tuple.Create<System.Object, System.Int32>(ua.Filename
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 1732), false)
|
||||
, 1910), false)
|
||||
);
|
||||
|
||||
WriteLiteral(">\r\n <img");
|
||||
|
||||
WriteLiteral(" alt=\"Attachment Thumbnail\"");
|
||||
|
||||
WriteAttribute("src", Tuple.Create(" src=\"", 1819), Tuple.Create("\"", 1879)
|
||||
WriteAttribute("src", Tuple.Create(" src=\"", 1997), Tuple.Create("\"", 2057)
|
||||
|
||||
#line 34 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 1825), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.API.User.AttachmentThumbnail(ua.Id))
|
||||
, Tuple.Create(Tuple.Create("", 2003), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.API.User.AttachmentThumbnail(ua.Id))
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 1825), false)
|
||||
, 2003), false)
|
||||
);
|
||||
|
||||
WriteLiteral(" />\r\n </span>\r\n " +
|
||||
@@ -208,14 +230,14 @@ WriteLiteral(" />\r\n </span>\r\n
|
||||
|
||||
WriteLiteral(" class=\"comments\"");
|
||||
|
||||
WriteAttribute("title", Tuple.Create(" title=\"", 1988), Tuple.Create("\"", 2008)
|
||||
WriteAttribute("title", Tuple.Create(" title=\"", 2166), Tuple.Create("\"", 2186)
|
||||
|
||||
#line 36 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 1996), Tuple.Create<System.Object, System.Int32>(ua.Comments
|
||||
, Tuple.Create(Tuple.Create("", 2174), Tuple.Create<System.Object, System.Int32>(ua.Comments
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 1996), false)
|
||||
, 2174), false)
|
||||
);
|
||||
|
||||
WriteLiteral(">\r\n");
|
||||
@@ -310,14 +332,14 @@ WriteLiteral(" data-livestamp=\"");
|
||||
#line hidden
|
||||
WriteLiteral("\"");
|
||||
|
||||
WriteAttribute("title", Tuple.Create(" title=\"", 2717), Tuple.Create("\"", 2755)
|
||||
WriteAttribute("title", Tuple.Create(" title=\"", 2895), Tuple.Create("\"", 2933)
|
||||
|
||||
#line 42 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 2725), Tuple.Create<System.Object, System.Int32>(ua.Timestamp.ToFullDateTime()
|
||||
, Tuple.Create(Tuple.Create("", 2903), Tuple.Create<System.Object, System.Int32>(ua.Timestamp.ToFullDateTime()
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 2725), false)
|
||||
, 2903), false)
|
||||
);
|
||||
|
||||
WriteLiteral(">");
|
||||
@@ -377,6 +399,12 @@ WriteLiteral(" class=\"action enabled photo fa fa-camera disabled\"");
|
||||
|
||||
WriteLiteral(" title=\"Capture Image\"");
|
||||
|
||||
WriteLiteral("></span><span");
|
||||
|
||||
WriteLiteral(" class=\"action enabled online-upload fa fa-qrcode disabled\"");
|
||||
|
||||
WriteLiteral(" title=\"Upload with Online Services\"");
|
||||
|
||||
WriteLiteral("></span>\r\n </div>\r\n");
|
||||
|
||||
|
||||
@@ -653,40 +681,45 @@ WriteLiteral("/\' + a.Id + \'?v=\' + retryCount);\r\n
|
||||
WriteLiteral("\r\n //#region Add Attachments\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 ");
|
||||
"chmentInput\');\r\n $attachmentInput.find(\'.online-uploa" +
|
||||
"d\').on(\'click\', function () {\r\n if ($(this).hasCl" +
|
||||
"ass(\'disabled\'))\r\n alert(\'Disconnected from t" +
|
||||
"he Disco ICT Server, please refresh this page and try again\');\r\n " +
|
||||
" else\r\n attachmentUploader.onl" +
|
||||
"ineUpload();\r\n });\r\n if (w" +
|
||||
"indow.location.protocol != \'https:\') {\r\n $attachm" +
|
||||
"entInput.find(\'.photo\')\r\n .removeClass(\'enabl" +
|
||||
"ed\')\r\n .addClass(\'disabled\')\r\n " +
|
||||
" .attr(\'title\', \'Capture Image: this functionality is only a" +
|
||||
"vailable 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 only available over a HTTPS connection\'" +
|
||||
");\r\n else if ($(this).hasClass(\'disabled\'))\r\n " +
|
||||
" alert(\'Disconnected from the Disco ICT Server, p" +
|
||||
"lease refresh this page and try again\');\r\n else\r\n" +
|
||||
" attachmentUploader.uploadImage();\r\n " +
|
||||
" });\r\n $attachmentInput.find(\'.uplo" +
|
||||
"ad\').click(function () {\r\n if ($(this).hasClass(\'" +
|
||||
"disabled\'))\r\n alert(\'Disconnected from the Di" +
|
||||
"sco ICT Server, please refresh this page and try again\');\r\n " +
|
||||
" else\r\n attachmentUploader.uploadFi" +
|
||||
"les();\r\n });\r\n\r\n var resou" +
|
||||
"rcesTab;\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\').find(\'a[href=\"#UserDetailTab-Resources\"]\').closest(\'li\').index()\r\n " +
|
||||
" };\r\n }\r\n " +
|
||||
" var selectedIndex = resourcesTab.tabs.tabs(\'option\', \'ac" +
|
||||
"tive\');\r\n if (resourcesTab.resourcesIndex !== sel" +
|
||||
"ectedIndex)\r\n resourcesTab.tabs.tabs(\'option\'" +
|
||||
", \'active\', resourcesTab.resourcesIndex);\r\n });\r\n " +
|
||||
" //#endregion\r\n ");
|
||||
|
||||
|
||||
#line 275 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
#line 281 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -695,7 +728,7 @@ WriteLiteral("\r\n //#region Add Attachments\r\n
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 276 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
#line 282 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
if (canRemoveAnyAttachments || canRemoveOwnAttachments)
|
||||
{
|
||||
|
||||
@@ -729,7 +762,7 @@ WriteLiteral(@"
|
||||
url: '");
|
||||
|
||||
|
||||
#line 302 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
#line 308 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
Write(Url.Action(MVC.API.User.AttachmentRemove()));
|
||||
|
||||
|
||||
@@ -757,7 +790,7 @@ WriteLiteral("\',\r\n dataType: \'jso
|
||||
"/#endregion\r\n ");
|
||||
|
||||
|
||||
#line 330 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
#line 336 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -781,7 +814,7 @@ WriteLiteral(@"
|
||||
$('#UserDetailTabItems').append('<li><a href=""#UserDetailTab-Resources"" id=""UserDetailTab-ResourcesLink"">Attachments [");
|
||||
|
||||
|
||||
#line 346 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
#line 352 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
Write(Model.User.UserAttachments == null ? 0 : Model.User.UserAttachments.Count);
|
||||
|
||||
|
||||
@@ -790,7 +823,7 @@ WriteLiteral(@"
|
||||
WriteLiteral("]</a></li>\');\r\n </script>\r\n</div>\r\n");
|
||||
|
||||
|
||||
#line 349 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
#line 355 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
if (canRemoveAnyAttachments || canRemoveOwnAttachments)
|
||||
{
|
||||
|
||||
@@ -812,7 +845,7 @@ WriteLiteral(" class=\"fa fa-exclamation-triangle fa-lg\"");
|
||||
WriteLiteral("></i> Are you sure?\r\n </p>\r\n </div>\r\n");
|
||||
|
||||
|
||||
#line 356 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
#line 362 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
}
|
||||
|
||||
#line default
|
||||
|
||||
Reference in New Issue
Block a user