bug: disable image (camera) attachment upload unless over HTTPS
Browser restriction: https://developer.mozilla.org/en-US/docs/Web/API/MediaDevices/getUserMedia#privacy_and_security
This commit is contained in:
@@ -112,8 +112,8 @@
|
|||||||
.getUserMedia({
|
.getUserMedia({
|
||||||
audio: false,
|
audio: false,
|
||||||
video: {
|
video: {
|
||||||
width: { ideal: 1080 },
|
width: { ideal: 1920 },
|
||||||
height: { ideal: 720 },
|
height: { ideal: 1080 },
|
||||||
facingMode: 'environment'
|
facingMode: 'environment'
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
(function(n,t,i){"use strict";var r=function(r,u,f){var e=this;if(e.uploadUrl=r,e.dropTarget=u,e.uploadProgressContainer=f,e._uploadFilesInput=null,e.uploadFiles=function(){!e._uploadFilesInput||e._uploadFilesInput.remove();e._uploadFilesInput=i("<input>");e._uploadFilesInput.attr({type:"file",multiple:"multiple",title:"Disco ICT File Uploading"}).hide().change(function(n){var t=n.target.files;!!t&&t.length>0&&e._uploadFiles(t);e._uploadFilesInput.remove()}).appendTo(e.uploadProgressContainer).click()},!!e.dropTarget){var h=i(t),o=!1,s=null;h.on("dragover",function(){e.dropTarget.addClass("dragHighlight");e.dropTarget.removeClass("dragHover");o=!1});h.on("dragleave",function(){!s||n.clearInterval(s);o=!0;n.setTimeout(function(){o&&e.dropTarget.removeClass("dragHighlight");s=null},200)});e.dropTarget.on("dragover",function(n){n.stopPropagation();n.preventDefault();e.dropTarget.addClass("dragHover");o=!1;n.originalEvent.dataTransfer.dropEffect="copy"});e.dropTarget.on("drop",function(n){n.stopPropagation();n.preventDefault();o=!0;e.dropTarget.removeClass("dragHighlight");var t=n.originalEvent.dataTransfer.files;e._uploadFiles(t)})}return e.uploadImage=function(){let f=null,o=!1;var u=i("<div><video><\/video><\/div>").attr({id:"Disco_AttachmentUpload_ImageDialog",title:"Upload Image","class":"dialog Disco-AttachmentUpload-ImageDialog"});u.dialog({autoOpen:!0,draggable:!1,modal:!0,resizable:!1,width:720,height:405,close:function(){f&&f.getTracks().forEach(n=>n.stop());n.setTimeout(function(){u.dialog("destroy")},1)}}).closest(".ui-dialog").children(".ui-dialog-titlebar").css("border-bottom","none");const r=u.find("video")[0];navigator.mediaDevices.getUserMedia({audio:!1,video:{width:{ideal:1080},height:{ideal:720},facingMode:"environment"}}).then(n=>{f=n,r.srcObject=n,r.play()}).catch(n=>{console.error(n),u.dialog("destroy")});r.addEventListener("canplay",()=>{if(!o){const i=720;let n=r.videoHeight/(r.videoWidth/i);isNaN(n)&&(n=405);r.setAttribute("width",i);r.setAttribute("height",n);o=!0;u.dialog("option","buttons",[{text:"Capture",click:()=>{const n=t.createElement("canvas");n.width=r.videoWidth;n.height=r.videoHeight;const i=n.getContext("2d");i.drawImage(r,0,0);n.toBlob(n=>{e._uploadImage(n)},"image/jpg")}}]);u.css("height","");u.closest(".ui-dialog").children(".ui-dialog-buttonpane").css("margin-top",0).find(".ui-button:first").focus()}})},e.getFileComments=function(t,r,u){var o=!1,f=i("<div>").attr({title:"Upload File","class":"dialog Disco-AttachmentUpload-CommentDialog"}),s,h,e;f.html('<table><tr><th>File Name:<\/th><td class="filename"><\/td><\/tr><tr><th>Comments:<\/th><td><input class="comments" type="text"><\/input><\/td><\/tr><tr><td class="thumbnail" colspan="2"><img /><\/td><\/tr><\/table>');!r||(s=f.find("td.thumbnail"),h=s.find("img"),r(h)&&s.show());f.find("td.filename").text(t).attr("title",t);e=f.find("input.comments").keypress(function(n){n.which===13&&(!e.val()||(o=!0,f.dialog("close")))});f.dialog({resizable:!1,width:400,modal:!0,autoOpen:!0,buttons:{Upload:function(){e.val()?(o=!0,f.dialog("close"),n.setTimeout(function(){e.focus()},1)):alert("Please provide a comment for this attachment.")},Cancel:function(){f.dialog("close")}},close:function(){var n=e.val();f.dialog("destroy").remove();u(o,n)}})},e._uploadImage=function(n){var t="CapturedImage-"+moment().format("YYYYMMDD-HHmmss")+".jpg";e.getFileComments(t,function(t){const i=URL.createObjectURL(n);return t.attr("src",i),!0},function(i,r){i&&e._uploadFile(n,t,r)})},e._uploadFiles=function(n){var t=i.makeArray(n),r=function(){if(t&&t.length!==0){var n=t.shift();e.getFileComments(n.name,function(t){if(!!n.type&&n.type.indexOf("image/")===0){var i=new FileReader;return i.onload=function(n){t.attr("src",n.target.result)},i.readAsDataURL(n),!0}return!1},function(t,i){t&&(e._uploadFile(n,n.name,i),r())})}};r()},e._uploadFile=function(n,t,r){var f=new FormData,u=new XMLHttpRequest,o=i("<div>").append(i("<i>").addClass("fa fa-cog fa-spin")).append(i("<span>").text("Uploading: "+t)).appendTo(e.uploadProgressContainer);f.append("Comments",r);f.append("File",n,t);u.open("POST",e.uploadUrl,!0);u.onreadystatechange=function(){u.readyState===4&&(u.status!==200&&alert("Error Uploading ["+t+"]: "+u.statusText),o.slideUp(400,function(){o.remove()}))};u.send(f)},e};t.Disco||(t.Disco={});t.Disco.AttachmentUploader=r})(this,document,$);
|
(function(n,t,i){"use strict";var r=function(r,u,f){var e=this;if(e.uploadUrl=r,e.dropTarget=u,e.uploadProgressContainer=f,e._uploadFilesInput=null,e.uploadFiles=function(){!e._uploadFilesInput||e._uploadFilesInput.remove();e._uploadFilesInput=i("<input>");e._uploadFilesInput.attr({type:"file",multiple:"multiple",title:"Disco ICT File Uploading"}).hide().change(function(n){var t=n.target.files;!!t&&t.length>0&&e._uploadFiles(t);e._uploadFilesInput.remove()}).appendTo(e.uploadProgressContainer).click()},!!e.dropTarget){var h=i(t),o=!1,s=null;h.on("dragover",function(){e.dropTarget.addClass("dragHighlight");e.dropTarget.removeClass("dragHover");o=!1});h.on("dragleave",function(){!s||n.clearInterval(s);o=!0;n.setTimeout(function(){o&&e.dropTarget.removeClass("dragHighlight");s=null},200)});e.dropTarget.on("dragover",function(n){n.stopPropagation();n.preventDefault();e.dropTarget.addClass("dragHover");o=!1;n.originalEvent.dataTransfer.dropEffect="copy"});e.dropTarget.on("drop",function(n){n.stopPropagation();n.preventDefault();o=!0;e.dropTarget.removeClass("dragHighlight");var t=n.originalEvent.dataTransfer.files;e._uploadFiles(t)})}return e.uploadImage=function(){let f=null,o=!1;var u=i("<div><video><\/video><\/div>").attr({id:"Disco_AttachmentUpload_ImageDialog",title:"Upload Image","class":"dialog Disco-AttachmentUpload-ImageDialog"});u.dialog({autoOpen:!0,draggable:!1,modal:!0,resizable:!1,width:720,height:405,close:function(){f&&f.getTracks().forEach(n=>n.stop());n.setTimeout(function(){u.dialog("destroy")},1)}}).closest(".ui-dialog").children(".ui-dialog-titlebar").css("border-bottom","none");const r=u.find("video")[0];navigator.mediaDevices.getUserMedia({audio:!1,video:{width:{ideal:1920},height:{ideal:1080},facingMode:"environment"}}).then(n=>{f=n,r.srcObject=n,r.play()}).catch(n=>{console.error(n),u.dialog("destroy")});r.addEventListener("canplay",()=>{if(!o){const i=720;let n=r.videoHeight/(r.videoWidth/i);isNaN(n)&&(n=405);r.setAttribute("width",i);r.setAttribute("height",n);o=!0;u.dialog("option","buttons",[{text:"Capture",click:()=>{const n=t.createElement("canvas");n.width=r.videoWidth;n.height=r.videoHeight;const i=n.getContext("2d");i.drawImage(r,0,0);n.toBlob(n=>{e._uploadImage(n)},"image/jpg")}}]);u.css("height","");u.closest(".ui-dialog").children(".ui-dialog-buttonpane").css("margin-top",0).find(".ui-button:first").focus()}})},e.getFileComments=function(t,r,u){var o=!1,f=i("<div>").attr({title:"Upload File","class":"dialog Disco-AttachmentUpload-CommentDialog"}),s,h,e;f.html('<table><tr><th>File Name:<\/th><td class="filename"><\/td><\/tr><tr><th>Comments:<\/th><td><input class="comments" type="text"><\/input><\/td><\/tr><tr><td class="thumbnail" colspan="2"><img /><\/td><\/tr><\/table>');!r||(s=f.find("td.thumbnail"),h=s.find("img"),r(h)&&s.show());f.find("td.filename").text(t).attr("title",t);e=f.find("input.comments").keypress(function(n){n.which===13&&(!e.val()||(o=!0,f.dialog("close")))});f.dialog({resizable:!1,width:400,modal:!0,autoOpen:!0,buttons:{Upload:function(){e.val()?(o=!0,f.dialog("close"),n.setTimeout(function(){e.focus()},1)):alert("Please provide a comment for this attachment.")},Cancel:function(){f.dialog("close")}},close:function(){var n=e.val();f.dialog("destroy").remove();u(o,n)}})},e._uploadImage=function(n){var t="CapturedImage-"+moment().format("YYYYMMDD-HHmmss")+".jpg";e.getFileComments(t,function(t){const i=URL.createObjectURL(n);return t.attr("src",i),!0},function(i,r){i&&e._uploadFile(n,t,r)})},e._uploadFiles=function(n){var t=i.makeArray(n),r=function(){if(t&&t.length!==0){var n=t.shift();e.getFileComments(n.name,function(t){if(!!n.type&&n.type.indexOf("image/")===0){var i=new FileReader;return i.onload=function(n){t.attr("src",n.target.result)},i.readAsDataURL(n),!0}return!1},function(t,i){t&&(e._uploadFile(n,n.name,i),r())})}};r()},e._uploadFile=function(n,t,r){var f=new FormData,u=new XMLHttpRequest,o=i("<div>").append(i("<i>").addClass("fa fa-cog fa-spin")).append(i("<span>").text("Uploading: "+t)).appendTo(e.uploadProgressContainer);f.append("Comments",r);f.append("File",n,t);u.open("POST",e.uploadUrl,!0);u.onreadystatechange=function(){u.readyState===4&&(u.status!==200&&alert("Error Uploading ["+t+"]: "+u.statusText),o.slideUp(400,function(){o.remove()}))};u.send(f)},e};t.Disco||(t.Disco={});t.Disco.AttachmentUploader=r})(this,document,$);
|
||||||
+2
-2
@@ -112,8 +112,8 @@
|
|||||||
.getUserMedia({
|
.getUserMedia({
|
||||||
audio: false,
|
audio: false,
|
||||||
video: {
|
video: {
|
||||||
width: { ideal: 1080 },
|
width: { ideal: 1920 },
|
||||||
height: { ideal: 720 },
|
height: { ideal: 1080 },
|
||||||
facingMode: 'environment'
|
facingMode: 'environment'
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -46,7 +46,7 @@
|
|||||||
{
|
{
|
||||||
<div class="Disco-AttachmentUpload-Progress"></div>
|
<div class="Disco-AttachmentUpload-Progress"></div>
|
||||||
<div class="attachmentInput clearfix">
|
<div class="attachmentInput clearfix">
|
||||||
<span class="action upload fa fa-upload disabled" title="Attach File"></span><span class="action 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>
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
@@ -73,20 +73,20 @@
|
|||||||
$.connection.hub.disconnected(onHubFailed);
|
$.connection.hub.disconnected(onHubFailed);
|
||||||
|
|
||||||
$.connection.hub.reconnecting(function () {
|
$.connection.hub.reconnecting(function () {
|
||||||
$('#AttachmentsContainer').find('span.action').addClass('disabled');
|
$('#AttachmentsContainer').find('span.action.enabled').addClass('disabled');
|
||||||
});
|
});
|
||||||
$.connection.hub.reconnected(function () {
|
$.connection.hub.reconnected(function () {
|
||||||
$('#AttachmentsContainer').find('span.action').removeClass('disabled');
|
$('#AttachmentsContainer').find('span.action.enabled').removeClass('disabled');
|
||||||
});
|
});
|
||||||
|
|
||||||
// Start Connection
|
// Start Connection
|
||||||
$.connection.hub.start(function () {
|
$.connection.hub.start(function () {
|
||||||
$('#AttachmentsContainer').find('span.action').removeClass('disabled');
|
$('#AttachmentsContainer').find('span.action.enabled').removeClass('disabled');
|
||||||
}).fail(onHubFailed);
|
}).fail(onHubFailed);
|
||||||
|
|
||||||
function onHubFailed(error) {
|
function onHubFailed(error) {
|
||||||
// Disable UI
|
// Disable UI
|
||||||
$('#AttachmentsContainer').find('span.action').addClass('disabled');
|
$('#AttachmentsContainer').find('span.action.enabled').addClass('disabled');
|
||||||
|
|
||||||
// Show Dialog Message
|
// Show Dialog Message
|
||||||
if ($('.disconnected-dialog').length == 0) {
|
if ($('.disconnected-dialog').length == 0) {
|
||||||
@@ -241,8 +241,16 @@
|
|||||||
$Attachments.find('.Disco-AttachmentUpload-Progress'));
|
$Attachments.find('.Disco-AttachmentUpload-Progress'));
|
||||||
|
|
||||||
var $attachmentInput = $Attachments.find('.attachmentInput');
|
var $attachmentInput = $Attachments.find('.attachmentInput');
|
||||||
|
if (window.location.protocol != 'https:') {
|
||||||
|
$attachmentInput.find('.photo')
|
||||||
|
.removeClass('enabled')
|
||||||
|
.addClass('disabled')
|
||||||
|
.attr('title', 'Capture Image: this functionality is only available over a HTTPS connection');
|
||||||
|
}
|
||||||
$attachmentInput.find('.photo').click(function () {
|
$attachmentInput.find('.photo').click(function () {
|
||||||
if ($(this).hasClass('disabled'))
|
if (!$(this).hasClass('enabled'))
|
||||||
|
alert('This functionality is only available over a HTTPS connection');
|
||||||
|
else if ($(this).hasClass('disabled'))
|
||||||
alert('Disconnected from the Disco ICT Server, please refresh this page and try again');
|
alert('Disconnected from the Disco ICT Server, please refresh this page and try again');
|
||||||
else
|
else
|
||||||
attachmentUploader.uploadImage();
|
attachmentUploader.uploadImage();
|
||||||
|
|||||||
@@ -344,13 +344,13 @@ WriteLiteral(" class=\"attachmentInput clearfix\"");
|
|||||||
|
|
||||||
WriteLiteral(">\r\n <span");
|
WriteLiteral(">\r\n <span");
|
||||||
|
|
||||||
WriteLiteral(" class=\"action upload fa fa-upload disabled\"");
|
WriteLiteral(" class=\"action enabled upload fa fa-upload disabled\"");
|
||||||
|
|
||||||
WriteLiteral(" title=\"Attach File\"");
|
WriteLiteral(" title=\"Attach File\"");
|
||||||
|
|
||||||
WriteLiteral("></span><span");
|
WriteLiteral("></span><span");
|
||||||
|
|
||||||
WriteLiteral(" class=\"action photo fa fa-camera disabled\"");
|
WriteLiteral(" class=\"action enabled photo fa fa-camera disabled\"");
|
||||||
|
|
||||||
WriteLiteral(" title=\"Capture Image\"");
|
WriteLiteral(" title=\"Capture Image\"");
|
||||||
|
|
||||||
@@ -398,40 +398,40 @@ WriteLiteral(@">
|
|||||||
WriteLiteral("\' };\r\n $.connection.hub.error(onHubFailed);\r\n " +
|
WriteLiteral("\' };\r\n $.connection.hub.error(onHubFailed);\r\n " +
|
||||||
" $.connection.hub.disconnected(onHubFailed);\r\n\r\n " +
|
" $.connection.hub.disconnected(onHubFailed);\r\n\r\n " +
|
||||||
" $.connection.hub.reconnecting(function () {\r\n " +
|
" $.connection.hub.reconnecting(function () {\r\n " +
|
||||||
" $(\'#AttachmentsContainer\').find(\'span.action\').addClass(\'disabled\');\r" +
|
" $(\'#AttachmentsContainer\').find(\'span.action.enabled\').addClass(\'disa" +
|
||||||
"\n });\r\n $.connection.hub.r" +
|
"bled\');\r\n });\r\n $.connecti" +
|
||||||
"econnected(function () {\r\n $(\'#AttachmentsContain" +
|
"on.hub.reconnected(function () {\r\n $(\'#Attachment" +
|
||||||
"er\').find(\'span.action\').removeClass(\'disabled\');\r\n }" +
|
"sContainer\').find(\'span.action.enabled\').removeClass(\'disabled\');\r\n " +
|
||||||
");\r\n\r\n // Start Connection\r\n " +
|
" });\r\n\r\n // Start Connection\r\n " +
|
||||||
" $.connection.hub.start(function () {\r\n $(\'#Att" +
|
" $.connection.hub.start(function () {\r\n " +
|
||||||
"achmentsContainer\').find(\'span.action\').removeClass(\'disabled\');\r\n " +
|
" $(\'#AttachmentsContainer\').find(\'span.action.enabled\').removeClass(\'dis" +
|
||||||
" }).fail(onHubFailed);\r\n\r\n function onHu" +
|
"abled\');\r\n }).fail(onHubFailed);\r\n\r\n " +
|
||||||
"bFailed(error) {\r\n // Disable UI\r\n " +
|
" function onHubFailed(error) {\r\n // Dis" +
|
||||||
" $(\'#AttachmentsContainer\').find(\'span.action\').addClass(\'disabl" +
|
"able UI\r\n $(\'#AttachmentsContainer\').find(\'span.a" +
|
||||||
"ed\');\r\n\r\n // Show Dialog Message\r\n " +
|
"ction.enabled\').addClass(\'disabled\');\r\n\r\n // Show" +
|
||||||
" if ($(\'.disconnected-dialog\').length == 0) {\r\n " +
|
" Dialog Message\r\n if ($(\'.disconnected-dialog\').l" +
|
||||||
" $(\'<div>\')\r\n .addClass" +
|
"ength == 0) {\r\n $(\'<div>\')\r\n " +
|
||||||
"(\'dialog disconnected-dialog\')\r\n .html(\'<" +
|
" .addClass(\'dialog disconnected-dialog\')\r\n " +
|
||||||
"h3><span class=\"fa-stack fa-lg\"><i class=\"fa fa-wifi fa-stack-1x\"></i><i class=\"" +
|
" .html(\'<h3><span class=\"fa-stack fa-lg\"><i class=\"fa fa-" +
|
||||||
"fa fa-ban fa-stack-2x error\"></i></span>Disconnected from the Disco ICT Server</" +
|
"wifi fa-stack-1x\"></i><i class=\"fa fa-ban fa-stack-2x error\"></i></span>Disconne" +
|
||||||
"h3><div>This page is not receiving live updates. Please ensure you are connected" +
|
"cted from the Disco ICT Server</h3><div>This page is not receiving live updates." +
|
||||||
" to the server, then refresh this page to enable features.</div>\')\r\n " +
|
" Please ensure you are connected to the server, then refresh this page to enable" +
|
||||||
" .dialog({\r\n " +
|
" features.</div>\')\r\n .dialog({\r\n " +
|
||||||
" resizable: false,\r\n title: \'Discon" +
|
" resizable: false,\r\n " +
|
||||||
"nected\',\r\n width: 400,\r\n " +
|
" title: \'Disconnected\',\r\n " +
|
||||||
" modal: true,\r\n " +
|
" width: 400,\r\n modal: true,\r\n " +
|
||||||
" buttons: {\r\n \'Refresh No" +
|
" buttons: {\r\n " +
|
||||||
"w\': function () {\r\n $(this).d" +
|
" \'Refresh Now\': function () {\r\n " +
|
||||||
"ialog(\'option\', \'buttons\', null);\r\n " +
|
" $(this).dialog(\'option\', \'buttons\', null);\r\n " +
|
||||||
" window.location.reload(true);\r\n " +
|
" window.location.reload(true);\r\n " +
|
||||||
" },\r\n \'Close\': function () {" +
|
" },\r\n " +
|
||||||
"\r\n $(this).dialog(\'destroy\');" +
|
" \'Close\': function () {\r\n " +
|
||||||
"\r\n }\r\n " +
|
" $(this).dialog(\'destroy\');\r\n " +
|
||||||
" }\r\n });\r\n " +
|
" }\r\n }\r\n " +
|
||||||
" }\r\n }\r\n\r\n " +
|
" });\r\n }\r\n " +
|
||||||
" function onAddAttachment(id, quick) {\r\n var data" +
|
"}\r\n\r\n function onAddAttachment(id, quick) {\r\n " +
|
||||||
" = { id: id };\r\n $.ajax({\r\n " +
|
" var data = { id: id };\r\n " +
|
||||||
" url: \'");
|
"$.ajax({\r\n url: \'");
|
||||||
|
|
||||||
|
|
||||||
#line 117 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
#line 117 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||||
@@ -644,33 +644,40 @@ WriteLiteral("\r\n //#region Add Attachments\r\n
|
|||||||
WriteLiteral("\',\r\n $Attachments.find(\'.Disco-AttachmentUpload-DropTa" +
|
WriteLiteral("\',\r\n $Attachments.find(\'.Disco-AttachmentUpload-DropTa" +
|
||||||
"rget\'),\r\n $Attachments.find(\'.Disco-AttachmentUpload-" +
|
"rget\'),\r\n $Attachments.find(\'.Disco-AttachmentUpload-" +
|
||||||
"Progress\'));\r\n\r\n var $attachmentInput = $Attachments." +
|
"Progress\'));\r\n\r\n var $attachmentInput = $Attachments." +
|
||||||
"find(\'.attachmentInput\');\r\n $attachmentInput.find(\'.p" +
|
"find(\'.attachmentInput\');\r\n if (window.location.proto" +
|
||||||
"hoto\').click(function () {\r\n if ($(this).hasClass" +
|
"col != \'https:\') {\r\n $attachmentInput.find(\'.phot" +
|
||||||
"(\'disabled\'))\r\n alert(\'Disconnected from the " +
|
"o\')\r\n .removeClass(\'enabled\')\r\n " +
|
||||||
"Disco ICT Server, please refresh this page and try again\');\r\n " +
|
" .addClass(\'disabled\')\r\n " +
|
||||||
" else\r\n attachmentUploader.upload" +
|
" .attr(\'title\', \'Capture Image: this functionality is only available over a HTTP" +
|
||||||
"Image();\r\n });\r\n $attachme" +
|
"S connection\');\r\n }\r\n $att" +
|
||||||
"ntInput.find(\'.upload\').click(function () {\r\n if " +
|
"achmentInput.find(\'.photo\').click(function () {\r\n " +
|
||||||
"($(this).hasClass(\'disabled\'))\r\n alert(\'Disco" +
|
" if (!$(this).hasClass(\'enabled\'))\r\n alert(\'T" +
|
||||||
"nnected from the Disco ICT Server, please refresh this page and try again\');\r\n " +
|
"his functionality is only available over a HTTPS connection\');\r\n " +
|
||||||
" else\r\n attachme" +
|
" else if ($(this).hasClass(\'disabled\'))\r\n " +
|
||||||
"ntUploader.uploadFiles();\r\n });\r\n\r\n " +
|
" alert(\'Disconnected from the Disco ICT Server, please refresh this p" +
|
||||||
" var resourcesTab;\r\n $(document).on(\'dragove" +
|
"age and try again\');\r\n else\r\n " +
|
||||||
"r\', function () {\r\n if (!resourcesTab) {\r\n " +
|
" attachmentUploader.uploadImage();\r\n }" +
|
||||||
" var tabs = $Attachments.closest(\'.ui-tabs\');\r\n " +
|
");\r\n $attachmentInput.find(\'.upload\').click(function " +
|
||||||
" resourcesTab = {\r\n " +
|
"() {\r\n if ($(this).hasClass(\'disabled\'))\r\n " +
|
||||||
" tabs: tabs,\r\n resourcesIndex: ta" +
|
" alert(\'Disconnected from the Disco ICT Server, plea" +
|
||||||
"bs.children(\'ul.ui-tabs-nav\').find(\'a[href=\"#DeviceDetailTab-Resources\"]\').close" +
|
"se refresh this page and try again\');\r\n else\r\n " +
|
||||||
"st(\'li\').index()\r\n };\r\n " +
|
" attachmentUploader.uploadFiles();\r\n " +
|
||||||
" }\r\n var selectedIndex = resourcesTab.ta" +
|
" });\r\n\r\n var resourcesTab;\r\n " +
|
||||||
"bs.tabs(\'option\', \'active\');\r\n if (resourcesTab.r" +
|
" $(document).on(\'dragover\', function () {\r\n " +
|
||||||
"esourcesIndex !== selectedIndex)\r\n resourcesT" +
|
" if (!resourcesTab) {\r\n var tabs =" +
|
||||||
"ab.tabs.tabs(\'option\', \'active\', resourcesTab.resourcesIndex);\r\n " +
|
" $Attachments.closest(\'.ui-tabs\');\r\n resource" +
|
||||||
" });\r\n //#endregion\r\n " +
|
"sTab = {\r\n tabs: tabs,\r\n " +
|
||||||
" ");
|
" resourcesIndex: tabs.children(\'ul.ui-tabs-nav\').find(\'a[h" +
|
||||||
|
"ref=\"#DeviceDetailTab-Resources\"]\').closest(\'li\').index()\r\n " +
|
||||||
|
" };\r\n }\r\n " +
|
||||||
|
" var selectedIndex = resourcesTab.tabs.tabs(\'option\', \'active\');\r\n " +
|
||||||
|
" if (resourcesTab.resourcesIndex !== selectedIndex)\r\n " +
|
||||||
|
" resourcesTab.tabs.tabs(\'option\', \'active\', resour" +
|
||||||
|
"cesTab.resourcesIndex);\r\n });\r\n " +
|
||||||
|
" //#endregion\r\n ");
|
||||||
|
|
||||||
|
|
||||||
#line 271 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
#line 279 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -679,7 +686,7 @@ WriteLiteral("\',\r\n $Attachments.find(\'.Disco-Atta
|
|||||||
WriteLiteral(" ");
|
WriteLiteral(" ");
|
||||||
|
|
||||||
|
|
||||||
#line 272 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
#line 280 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||||
if (canRemoveAnyAttachments || canRemoveOwnAttachments)
|
if (canRemoveAnyAttachments || canRemoveOwnAttachments)
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -712,7 +719,7 @@ WriteLiteral(@"
|
|||||||
url: '");
|
url: '");
|
||||||
|
|
||||||
|
|
||||||
#line 297 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
#line 305 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||||
Write(Url.Action(MVC.API.Device.AttachmentRemove()));
|
Write(Url.Action(MVC.API.Device.AttachmentRemove()));
|
||||||
|
|
||||||
|
|
||||||
@@ -740,7 +747,7 @@ WriteLiteral("\',\r\n dataType: \'jso
|
|||||||
"endregion\r\n ");
|
"endregion\r\n ");
|
||||||
|
|
||||||
|
|
||||||
#line 324 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
#line 332 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -777,7 +784,7 @@ WriteLiteral("></i> Are you sure?\r\n </p>\r\n </div>\r\n <scr
|
|||||||
"etailTab-ResourcesLink\">Attachments [");
|
"etailTab-ResourcesLink\">Attachments [");
|
||||||
|
|
||||||
|
|
||||||
#line 345 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
#line 353 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||||
Write(Model.Device.DeviceAttachments == null ? 0 : Model.Device.DeviceAttachments.Count);
|
Write(Model.Device.DeviceAttachments == null ? 0 : Model.Device.DeviceAttachments.Count);
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -77,7 +77,7 @@
|
|||||||
{
|
{
|
||||||
<div class="Disco-AttachmentUpload-Progress"></div>
|
<div class="Disco-AttachmentUpload-Progress"></div>
|
||||||
<div class="attachmentInput clearfix">
|
<div class="attachmentInput clearfix">
|
||||||
<span class="action upload fa fa-upload disabled" title="Attach File"></span><span class="action 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>
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
@@ -323,8 +323,16 @@
|
|||||||
$Attachments.find('.Disco-AttachmentUpload-Progress'));
|
$Attachments.find('.Disco-AttachmentUpload-Progress'));
|
||||||
|
|
||||||
var $attachmentInput = $Attachments.find('.attachmentInput');
|
var $attachmentInput = $Attachments.find('.attachmentInput');
|
||||||
|
if (window.location.protocol != 'https:') {
|
||||||
|
$attachmentInput.find('.photo')
|
||||||
|
.removeClass('enabled')
|
||||||
|
.addClass('disabled')
|
||||||
|
.attr('title', 'Capture Image: this functionality is only available over a HTTPS connection');
|
||||||
|
}
|
||||||
$attachmentInput.find('.photo').click(function () {
|
$attachmentInput.find('.photo').click(function () {
|
||||||
if ($(this).hasClass('disabled'))
|
if (!$(this).hasClass('enabled'))
|
||||||
|
alert('This functionality is only available over a HTTPS connection');
|
||||||
|
else if ($(this).hasClass('disabled'))
|
||||||
alert('Disconnected from the Disco ICT Server, please refresh this page and try again');
|
alert('Disconnected from the Disco ICT Server, please refresh this page and try again');
|
||||||
else
|
else
|
||||||
attachmentUploader.uploadImage();
|
attachmentUploader.uploadImage();
|
||||||
@@ -577,24 +585,24 @@
|
|||||||
|
|
||||||
$.connection.hub.reconnecting(function () {
|
$.connection.hub.reconnecting(function () {
|
||||||
$('#CommentsContainer').find('span.action').addClass('disabled');
|
$('#CommentsContainer').find('span.action').addClass('disabled');
|
||||||
$('#AttachmentsContainer').find('span.action').addClass('disabled');
|
$('#AttachmentsContainer').find('span.action.enabled').addClass('disabled');
|
||||||
});
|
});
|
||||||
$.connection.hub.reconnected(function () {
|
$.connection.hub.reconnected(function () {
|
||||||
$('#CommentsContainer').find('span.action').removeClass('disabled');
|
$('#CommentsContainer').find('span.action').removeClass('disabled');
|
||||||
$('#AttachmentsContainer').find('span.action').removeClass('disabled');
|
$('#AttachmentsContainer').find('span.action.enabled').removeClass('disabled');
|
||||||
});
|
});
|
||||||
|
|
||||||
// Start Connection
|
// Start Connection
|
||||||
$.connection.hub.start(function () {
|
$.connection.hub.start(function () {
|
||||||
$('#CommentsContainer').find('span.action').removeClass('disabled');
|
$('#CommentsContainer').find('span.action').removeClass('disabled');
|
||||||
$('#AttachmentsContainer').find('span.action').removeClass('disabled');
|
$('#AttachmentsContainer').find('span.action.enabled').removeClass('disabled');
|
||||||
}).fail(onHubFailed);
|
}).fail(onHubFailed);
|
||||||
|
|
||||||
function onHubFailed(error) {
|
function onHubFailed(error) {
|
||||||
// Disable UI
|
// Disable UI
|
||||||
$('#CommentsContainer').find('textarea.commentInput').attr('readonly', 'readonly');
|
$('#CommentsContainer').find('textarea.commentInput').attr('readonly', 'readonly');
|
||||||
$('#CommentsContainer').find('span.action').addClass('disabled');
|
$('#CommentsContainer').find('span.action').addClass('disabled');
|
||||||
$('#AttachmentsContainer').find('span.action').addClass('disabled');
|
$('#AttachmentsContainer').find('span.action.enabled').addClass('disabled');
|
||||||
|
|
||||||
// Show Dialog Message
|
// Show Dialog Message
|
||||||
if ($('.disconnected-dialog').length == 0) {
|
if ($('.disconnected-dialog').length == 0) {
|
||||||
|
|||||||
@@ -582,13 +582,13 @@ WriteLiteral(" class=\"attachmentInput clearfix\"");
|
|||||||
|
|
||||||
WriteLiteral(">\r\n <span");
|
WriteLiteral(">\r\n <span");
|
||||||
|
|
||||||
WriteLiteral(" class=\"action upload fa fa-upload disabled\"");
|
WriteLiteral(" class=\"action enabled upload fa fa-upload disabled\"");
|
||||||
|
|
||||||
WriteLiteral(" title=\"Attach File\"");
|
WriteLiteral(" title=\"Attach File\"");
|
||||||
|
|
||||||
WriteLiteral("></span><span");
|
WriteLiteral("></span><span");
|
||||||
|
|
||||||
WriteLiteral(" class=\"action photo fa fa-camera disabled\"");
|
WriteLiteral(" class=\"action enabled photo fa fa-camera disabled\"");
|
||||||
|
|
||||||
WriteLiteral(" title=\"Capture Image\"");
|
WriteLiteral(" title=\"Capture Image\"");
|
||||||
|
|
||||||
@@ -1025,28 +1025,34 @@ WriteLiteral("\r\n //#region Add Attachments\r\n var attac
|
|||||||
#line hidden
|
#line hidden
|
||||||
WriteLiteral("\',\r\n $Attachments.find(\'.Disco-AttachmentUpload-DropTarget\'),\r\n " +
|
WriteLiteral("\',\r\n $Attachments.find(\'.Disco-AttachmentUpload-DropTarget\'),\r\n " +
|
||||||
" $Attachments.find(\'.Disco-AttachmentUpload-Progress\'));\r\n\r\n " +
|
" $Attachments.find(\'.Disco-AttachmentUpload-Progress\'));\r\n\r\n " +
|
||||||
" var $attachmentInput = $Attachments.find(\'.attachmentInput\');\r\n $" +
|
" var $attachmentInput = $Attachments.find(\'.attachmentInput\');\r\n i" +
|
||||||
"attachmentInput.find(\'.photo\').click(function () {\r\n if ($(this)." +
|
"f (window.location.protocol != \'https:\') {\r\n $attachmentInput.fin" +
|
||||||
"hasClass(\'disabled\'))\r\n alert(\'Disconnected from the Disco IC" +
|
"d(\'.photo\')\r\n .removeClass(\'enabled\')\r\n .a" +
|
||||||
"T Server, please refresh this page and try again\');\r\n else\r\n " +
|
"ddClass(\'disabled\')\r\n .attr(\'title\', \'Capture Image: this fun" +
|
||||||
" attachmentUploader.uploadImage();\r\n });\r\n $" +
|
"ctionality is only available over a HTTPS connection\');\r\n }\r\n " +
|
||||||
"attachmentInput.find(\'.upload\').click(function () {\r\n if ($(this)" +
|
" $attachmentInput.find(\'.photo\').click(function () {\r\n if (!$(" +
|
||||||
".hasClass(\'disabled\'))\r\n alert(\'Disconnected from the Disco I" +
|
"this).hasClass(\'enabled\'))\r\n alert(\'This functionality is onl" +
|
||||||
"CT Server, please refresh this page and try again\');\r\n else\r\n " +
|
"y available over a HTTPS connection\');\r\n else if ($(this).hasClas" +
|
||||||
" attachmentUploader.uploadFiles();\r\n });\r\n\r\n " +
|
"s(\'disabled\'))\r\n alert(\'Disconnected from the Disco ICT Serve" +
|
||||||
" var resourcesTab;\r\n $(document).on(\'dragover\', function () {\r\n " +
|
"r, please refresh this page and try again\');\r\n else\r\n " +
|
||||||
" if (!resourcesTab) {\r\n var tabs = $Attachments.clo" +
|
" attachmentUploader.uploadImage();\r\n });\r\n $attachm" +
|
||||||
"sest(\'.ui-tabs\');\r\n resourcesTab = {\r\n " +
|
"entInput.find(\'.upload\').click(function () {\r\n if ($(this).hasCla" +
|
||||||
" tabs: tabs,\r\n resourcesIndex: tabs.children(\'ul.ui-tabs-" +
|
"ss(\'disabled\'))\r\n alert(\'Disconnected from the Disco ICT Serv" +
|
||||||
"nav\').find(\'a[href=\"#jobDetailTab-Resources\"]\').closest(\'li\').index()\r\n " +
|
"er, please refresh this page and try again\');\r\n else\r\n " +
|
||||||
" };\r\n }\r\n var selectedIndex = resourcesT" +
|
" attachmentUploader.uploadFiles();\r\n });\r\n\r\n var r" +
|
||||||
"ab.tabs.tabs(\'option\', \'active\');\r\n if (resourcesTab.resourcesInd" +
|
"esourcesTab;\r\n $(document).on(\'dragover\', function () {\r\n " +
|
||||||
"ex !== selectedIndex)\r\n resourcesTab.tabs.tabs(\'option\', \'act" +
|
" if (!resourcesTab) {\r\n var tabs = $Attachments.closest(\'." +
|
||||||
"ive\', resourcesTab.resourcesIndex);\r\n });\r\n //#endregion\r\n" +
|
"ui-tabs\');\r\n resourcesTab = {\r\n tabs: " +
|
||||||
" ");
|
"tabs,\r\n resourcesIndex: tabs.children(\'ul.ui-tabs-nav\').f" +
|
||||||
|
"ind(\'a[href=\"#jobDetailTab-Resources\"]\').closest(\'li\').index()\r\n " +
|
||||||
|
" };\r\n }\r\n var selectedIndex = resourcesTab.tabs" +
|
||||||
|
".tabs(\'option\', \'active\');\r\n if (resourcesTab.resourcesIndex !== " +
|
||||||
|
"selectedIndex)\r\n resourcesTab.tabs.tabs(\'option\', \'active\', r" +
|
||||||
|
"esourcesTab.resourcesIndex);\r\n });\r\n //#endregion\r\n " +
|
||||||
|
" ");
|
||||||
|
|
||||||
|
|
||||||
#line 353 "..\..\Views\Job\JobParts\Resources.cshtml"
|
#line 361 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -1055,13 +1061,13 @@ WriteLiteral("\',\r\n $Attachments.find(\'.Disco-AttachmentUpload
|
|||||||
WriteLiteral("\r\n");
|
WriteLiteral("\r\n");
|
||||||
|
|
||||||
|
|
||||||
#line 355 "..\..\Views\Job\JobParts\Resources.cshtml"
|
#line 363 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||||
|
|
||||||
|
|
||||||
#line default
|
#line default
|
||||||
#line hidden
|
#line hidden
|
||||||
|
|
||||||
#line 355 "..\..\Views\Job\JobParts\Resources.cshtml"
|
#line 363 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||||
if (canRemoveAnyAttachments || canRemoveOwnAttachments)
|
if (canRemoveAnyAttachments || canRemoveOwnAttachments)
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -1096,7 +1102,7 @@ WriteLiteral(@"
|
|||||||
url: '");
|
url: '");
|
||||||
|
|
||||||
|
|
||||||
#line 382 "..\..\Views\Job\JobParts\Resources.cshtml"
|
#line 390 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||||
Write(Url.Action(MVC.API.Job.AttachmentRemove()));
|
Write(Url.Action(MVC.API.Job.AttachmentRemove()));
|
||||||
|
|
||||||
|
|
||||||
@@ -1132,7 +1138,7 @@ WriteLiteral(@"',
|
|||||||
");
|
");
|
||||||
|
|
||||||
|
|
||||||
#line 409 "..\..\Views\Job\JobParts\Resources.cshtml"
|
#line 417 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -1142,7 +1148,7 @@ WriteLiteral("\r\n function addAttachment(key, quick) {\r\n
|
|||||||
"id: key };\r\n $.ajax({\r\n url: \'");
|
"id: key };\r\n $.ajax({\r\n url: \'");
|
||||||
|
|
||||||
|
|
||||||
#line 414 "..\..\Views\Job\JobParts\Resources.cshtml"
|
#line 422 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||||
Write(Url.Action(MVC.API.Job.Attachment()));
|
Write(Url.Action(MVC.API.Job.Attachment()));
|
||||||
|
|
||||||
|
|
||||||
@@ -1153,13 +1159,13 @@ WriteLiteral("\',\r\n dataType: \'json\',\r\n
|
|||||||
"\'OK\') {\r\n var a = d.Attachment;\r\n");
|
"\'OK\') {\r\n var a = d.Attachment;\r\n");
|
||||||
|
|
||||||
|
|
||||||
#line 420 "..\..\Views\Job\JobParts\Resources.cshtml"
|
#line 428 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||||
|
|
||||||
|
|
||||||
#line default
|
#line default
|
||||||
#line hidden
|
#line hidden
|
||||||
|
|
||||||
#line 420 "..\..\Views\Job\JobParts\Resources.cshtml"
|
#line 428 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||||
if (canRemoveAnyAttachments)
|
if (canRemoveAnyAttachments)
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -1173,7 +1179,7 @@ WriteLiteral("buildAttachment(a, true, quick);");
|
|||||||
WriteLiteral("\r\n");
|
WriteLiteral("\r\n");
|
||||||
|
|
||||||
|
|
||||||
#line 423 "..\..\Views\Job\JobParts\Resources.cshtml"
|
#line 431 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||||
}
|
}
|
||||||
else if (canRemoveOwnAttachments)
|
else if (canRemoveOwnAttachments)
|
||||||
{
|
{
|
||||||
@@ -1186,7 +1192,7 @@ WriteLiteral(" ");
|
|||||||
WriteLiteral("buildAttachment(a, (a.AuthorId === \'");
|
WriteLiteral("buildAttachment(a, (a.AuthorId === \'");
|
||||||
|
|
||||||
|
|
||||||
#line 426 "..\..\Views\Job\JobParts\Resources.cshtml"
|
#line 434 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||||
Write(CurrentUser.UserId);
|
Write(CurrentUser.UserId);
|
||||||
|
|
||||||
|
|
||||||
@@ -1197,7 +1203,7 @@ WriteLiteral("\'), quick);");
|
|||||||
WriteLiteral("\r\n");
|
WriteLiteral("\r\n");
|
||||||
|
|
||||||
|
|
||||||
#line 427 "..\..\Views\Job\JobParts\Resources.cshtml"
|
#line 435 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -1212,7 +1218,7 @@ WriteLiteral("buildAttachment(a, false, quick);");
|
|||||||
WriteLiteral("\r\n");
|
WriteLiteral("\r\n");
|
||||||
|
|
||||||
|
|
||||||
#line 431 "..\..\Views\Job\JobParts\Resources.cshtml"
|
#line 439 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -1239,7 +1245,7 @@ WriteLiteral(@" } else {
|
|||||||
e.attr('data-attachmentid', a.Id).attr('data-mimetype', a.MimeType).attr('href', '");
|
e.attr('data-attachmentid', a.Id).attr('data-mimetype', a.MimeType).attr('href', '");
|
||||||
|
|
||||||
|
|
||||||
#line 450 "..\..\Views\Job\JobParts\Resources.cshtml"
|
#line 458 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||||
Write(Url.Action(MVC.API.Job.AttachmentDownload()));
|
Write(Url.Action(MVC.API.Job.AttachmentDownload()));
|
||||||
|
|
||||||
|
|
||||||
@@ -1271,7 +1277,7 @@ WriteLiteral(@"/' + a.Id);
|
|||||||
img.attr('src', '");
|
img.attr('src', '");
|
||||||
|
|
||||||
|
|
||||||
#line 473 "..\..\Views\Job\JobParts\Resources.cshtml"
|
#line 481 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||||
Write(Url.Action(MVC.API.Job.AttachmentThumbnail()));
|
Write(Url.Action(MVC.API.Job.AttachmentThumbnail()));
|
||||||
|
|
||||||
|
|
||||||
@@ -1318,14 +1324,14 @@ WriteLiteral("/\' + a.Id + \'?v=\' + retryCount);\r\n };\
|
|||||||
"script>\r\n");
|
"script>\r\n");
|
||||||
|
|
||||||
|
|
||||||
#line 543 "..\..\Views\Job\JobParts\Resources.cshtml"
|
#line 551 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#line default
|
#line default
|
||||||
#line hidden
|
#line hidden
|
||||||
|
|
||||||
#line 544 "..\..\Views\Job\JobParts\Resources.cshtml"
|
#line 552 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||||
if (canShowLogs || canShowAttachments)
|
if (canShowLogs || canShowAttachments)
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -1335,7 +1341,7 @@ WriteLiteral("/\' + a.Id + \'?v=\' + retryCount);\r\n };\
|
|||||||
WriteLiteral(" <script>\r\n $(function () {\r\n var jobId = parseInt(\'");
|
WriteLiteral(" <script>\r\n $(function () {\r\n var jobId = parseInt(\'");
|
||||||
|
|
||||||
|
|
||||||
#line 548 "..\..\Views\Job\JobParts\Resources.cshtml"
|
#line 556 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||||
Write(Model.Job.Id);
|
Write(Model.Job.Id);
|
||||||
|
|
||||||
|
|
||||||
@@ -1345,7 +1351,7 @@ WriteLiteral("\');\r\n\r\n //#region LiveEvents\r\n var hu
|
|||||||
"dates;\r\n\r\n // Map Functions\r\n");
|
"dates;\r\n\r\n // Map Functions\r\n");
|
||||||
|
|
||||||
|
|
||||||
#line 554 "..\..\Views\Job\JobParts\Resources.cshtml"
|
#line 562 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||||
if (canShowLogs)
|
if (canShowLogs)
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -1356,14 +1362,14 @@ WriteLiteral("\r\n hub.client.addLog = document.DiscoFunctions.liveLo
|
|||||||
" ");
|
" ");
|
||||||
|
|
||||||
|
|
||||||
#line 558 "..\..\Views\Job\JobParts\Resources.cshtml"
|
#line 566 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#line default
|
#line default
|
||||||
#line hidden
|
#line hidden
|
||||||
|
|
||||||
#line 559 "..\..\Views\Job\JobParts\Resources.cshtml"
|
#line 567 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||||
if (canShowAttachments)
|
if (canShowAttachments)
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -1384,7 +1390,7 @@ WriteLiteral(@"
|
|||||||
");
|
");
|
||||||
|
|
||||||
|
|
||||||
#line 572 "..\..\Views\Job\JobParts\Resources.cshtml"
|
#line 580 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -1394,39 +1400,39 @@ WriteLiteral("\r\n $.connection.hub.qs = { JobId: jobId };\r\n
|
|||||||
"ub.error(onHubFailed);\r\n $.connection.hub.disconnected(onHubFailed);\r" +
|
"ub.error(onHubFailed);\r\n $.connection.hub.disconnected(onHubFailed);\r" +
|
||||||
"\n\r\n $.connection.hub.reconnecting(function () {\r\n $(\'#" +
|
"\n\r\n $.connection.hub.reconnecting(function () {\r\n $(\'#" +
|
||||||
"CommentsContainer\').find(\'span.action\').addClass(\'disabled\');\r\n $" +
|
"CommentsContainer\').find(\'span.action\').addClass(\'disabled\');\r\n $" +
|
||||||
"(\'#AttachmentsContainer\').find(\'span.action\').addClass(\'disabled\');\r\n " +
|
"(\'#AttachmentsContainer\').find(\'span.action.enabled\').addClass(\'disabled\');\r\n " +
|
||||||
" });\r\n $.connection.hub.reconnected(function () {\r\n $(" +
|
" });\r\n $.connection.hub.reconnected(function () {\r\n " +
|
||||||
"\'#CommentsContainer\').find(\'span.action\').removeClass(\'disabled\');\r\n " +
|
" $(\'#CommentsContainer\').find(\'span.action\').removeClass(\'disabled\');\r\n " +
|
||||||
" $(\'#AttachmentsContainer\').find(\'span.action\').removeClass(\'disabled\');\r\n " +
|
" $(\'#AttachmentsContainer\').find(\'span.action.enabled\').removeClass(\'" +
|
||||||
" });\r\n\r\n // Start Connection\r\n $.connection.hub.st" +
|
"disabled\');\r\n });\r\n\r\n // Start Connection\r\n $.c" +
|
||||||
"art(function () {\r\n $(\'#CommentsContainer\').find(\'span.action\').r" +
|
"onnection.hub.start(function () {\r\n $(\'#CommentsContainer\').find(" +
|
||||||
"emoveClass(\'disabled\');\r\n $(\'#AttachmentsContainer\').find(\'span.a" +
|
"\'span.action\').removeClass(\'disabled\');\r\n $(\'#AttachmentsContaine" +
|
||||||
"ction\').removeClass(\'disabled\');\r\n }).fail(onHubFailed);\r\n\r\n " +
|
"r\').find(\'span.action.enabled\').removeClass(\'disabled\');\r\n }).fail(on" +
|
||||||
" function onHubFailed(error) {\r\n // Disable UI\r\n " +
|
"HubFailed);\r\n\r\n function onHubFailed(error) {\r\n // Dis" +
|
||||||
" $(\'#CommentsContainer\').find(\'textarea.commentInput\').attr(\'readonly\', \'readonl" +
|
"able UI\r\n $(\'#CommentsContainer\').find(\'textarea.commentInput\').a" +
|
||||||
"y\');\r\n $(\'#CommentsContainer\').find(\'span.action\').addClass(\'disa" +
|
"ttr(\'readonly\', \'readonly\');\r\n $(\'#CommentsContainer\').find(\'span" +
|
||||||
"bled\');\r\n $(\'#AttachmentsContainer\').find(\'span.action\').addClass" +
|
".action\').addClass(\'disabled\');\r\n $(\'#AttachmentsContainer\').find" +
|
||||||
"(\'disabled\');\r\n\r\n // Show Dialog Message\r\n if ($(\'" +
|
"(\'span.action.enabled\').addClass(\'disabled\');\r\n\r\n // Show Dialog " +
|
||||||
".disconnected-dialog\').length == 0) {\r\n $(\'<div>\')\r\n " +
|
"Message\r\n if ($(\'.disconnected-dialog\').length == 0) {\r\n " +
|
||||||
" .addClass(\'dialog disconnected-dialog\')\r\n " +
|
" $(\'<div>\')\r\n .addClass(\'dialog disconnected-di" +
|
||||||
".html(\'<h3><span class=\"fa-stack fa-lg\"><i class=\"fa fa-wifi fa-stack-1x\"></i><i" +
|
"alog\')\r\n .html(\'<h3><span class=\"fa-stack fa-lg\"><i class" +
|
||||||
" class=\"fa fa-ban fa-stack-2x error\"></i></span>Disconnected from the Disco ICT " +
|
"=\"fa fa-wifi fa-stack-1x\"></i><i class=\"fa fa-ban fa-stack-2x error\"></i></span>" +
|
||||||
"Server</h3><div>This page is not receiving live updates. Please ensure you are c" +
|
"Disconnected from the Disco ICT Server</h3><div>This page is not receiving live " +
|
||||||
"onnected to the server, then refresh this page to enable features.</div>\')\r\n " +
|
"updates. Please ensure you are connected to the server, then refresh this page t" +
|
||||||
" .dialog({\r\n resizable: false,\r\n " +
|
"o enable features.</div>\')\r\n .dialog({\r\n " +
|
||||||
" title: \'Disconnected\',\r\n wi" +
|
" resizable: false,\r\n title: \'Disconnected\'," +
|
||||||
"dth: 400,\r\n modal: true,\r\n " +
|
"\r\n width: 400,\r\n modal: tr" +
|
||||||
" buttons: {\r\n \'Refresh Now\': function () {\r\n " +
|
"ue,\r\n buttons: {\r\n \'Re" +
|
||||||
" $(this).dialog(\'option\', \'buttons\', null);\r\n " +
|
"fresh Now\': function () {\r\n $(this).dialog(\'o" +
|
||||||
" window.location.reload(true);\r\n " +
|
"ption\', \'buttons\', null);\r\n window.location.r" +
|
||||||
" },\r\n \'Close\': function () {\r\n " +
|
"eload(true);\r\n },\r\n " +
|
||||||
" $(this).dialog(\'destroy\');\r\n " +
|
" \'Close\': function () {\r\n $(this).dialog(\'de" +
|
||||||
" }\r\n }\r\n });\r\n " +
|
"stroy\');\r\n }\r\n }\r\n " +
|
||||||
" }\r\n }\r\n\r\n //#endregion\r\n });\r\n </script" +
|
" });\r\n }\r\n }\r\n\r\n //#endr" +
|
||||||
">\r\n");
|
"egion\r\n });\r\n </script>\r\n");
|
||||||
|
|
||||||
|
|
||||||
#line 625 "..\..\Views\Job\JobParts\Resources.cshtml"
|
#line 633 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||||
}
|
}
|
||||||
|
|
||||||
#line default
|
#line default
|
||||||
|
|||||||
@@ -46,7 +46,7 @@
|
|||||||
{
|
{
|
||||||
<div class="Disco-AttachmentUpload-Progress"></div>
|
<div class="Disco-AttachmentUpload-Progress"></div>
|
||||||
<div class="attachmentInput clearfix">
|
<div class="attachmentInput clearfix">
|
||||||
<span class="action upload fa fa-upload disabled" title="Attach File"></span><span class="action 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>
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
@@ -71,20 +71,20 @@
|
|||||||
$.connection.hub.disconnected(onHubFailed);
|
$.connection.hub.disconnected(onHubFailed);
|
||||||
|
|
||||||
$.connection.hub.reconnecting(function () {
|
$.connection.hub.reconnecting(function () {
|
||||||
$('#AttachmentsContainer').find('span.action').addClass('disabled');
|
$('#AttachmentsContainer').find('span.action.enabled').addClass('disabled');
|
||||||
});
|
});
|
||||||
$.connection.hub.reconnected(function () {
|
$.connection.hub.reconnected(function () {
|
||||||
$('#AttachmentsContainer').find('span.action').removeClass('disabled');
|
$('#AttachmentsContainer').find('span.action.enabled').removeClass('disabled');
|
||||||
});
|
});
|
||||||
|
|
||||||
// Start Connection
|
// Start Connection
|
||||||
$.connection.hub.start(function () {
|
$.connection.hub.start(function () {
|
||||||
$('#AttachmentsContainer').find('span.action').removeClass('disabled');
|
$('#AttachmentsContainer').find('span.action.enabled').removeClass('disabled');
|
||||||
}).fail(onHubFailed);
|
}).fail(onHubFailed);
|
||||||
|
|
||||||
function onHubFailed(error) {
|
function onHubFailed(error) {
|
||||||
// Disable UI
|
// Disable UI
|
||||||
$('#AttachmentsContainer').find('span.action').addClass('disabled');
|
$('#AttachmentsContainer').find('span.action.enabled').addClass('disabled');
|
||||||
|
|
||||||
// Show Dialog Message
|
// Show Dialog Message
|
||||||
if ($('.disconnected-dialog').length == 0) {
|
if ($('.disconnected-dialog').length == 0) {
|
||||||
@@ -238,8 +238,16 @@
|
|||||||
$Attachments.find('.Disco-AttachmentUpload-Progress'));
|
$Attachments.find('.Disco-AttachmentUpload-Progress'));
|
||||||
|
|
||||||
var $attachmentInput = $Attachments.find('.attachmentInput');
|
var $attachmentInput = $Attachments.find('.attachmentInput');
|
||||||
|
if (window.location.protocol != 'https:') {
|
||||||
|
$attachmentInput.find('.photo')
|
||||||
|
.removeClass('enabled')
|
||||||
|
.addClass('disabled')
|
||||||
|
.attr('title', 'Capture Image: this functionality is only available over a HTTPS connection');
|
||||||
|
}
|
||||||
$attachmentInput.find('.photo').click(function () {
|
$attachmentInput.find('.photo').click(function () {
|
||||||
if ($(this).hasClass('disabled'))
|
if (!$(this).hasClass('enabled'))
|
||||||
|
alert('This functionality is only available over a HTTPS connection');
|
||||||
|
else if ($(this).hasClass('disabled'))
|
||||||
alert('Disconnected from the Disco ICT Server, please refresh this page and try again');
|
alert('Disconnected from the Disco ICT Server, please refresh this page and try again');
|
||||||
else
|
else
|
||||||
attachmentUploader.uploadImage();
|
attachmentUploader.uploadImage();
|
||||||
|
|||||||
@@ -344,13 +344,13 @@ WriteLiteral(" class=\"attachmentInput clearfix\"");
|
|||||||
|
|
||||||
WriteLiteral(">\r\n <span");
|
WriteLiteral(">\r\n <span");
|
||||||
|
|
||||||
WriteLiteral(" class=\"action upload fa fa-upload disabled\"");
|
WriteLiteral(" class=\"action enabled upload fa fa-upload disabled\"");
|
||||||
|
|
||||||
WriteLiteral(" title=\"Attach File\"");
|
WriteLiteral(" title=\"Attach File\"");
|
||||||
|
|
||||||
WriteLiteral("></span><span");
|
WriteLiteral("></span><span");
|
||||||
|
|
||||||
WriteLiteral(" class=\"action photo fa fa-camera disabled\"");
|
WriteLiteral(" class=\"action enabled photo fa fa-camera disabled\"");
|
||||||
|
|
||||||
WriteLiteral(" title=\"Capture Image\"");
|
WriteLiteral(" title=\"Capture Image\"");
|
||||||
|
|
||||||
@@ -396,40 +396,40 @@ WriteLiteral(@">
|
|||||||
WriteLiteral("\' };\r\n $.connection.hub.error(onHubFailed);\r\n " +
|
WriteLiteral("\' };\r\n $.connection.hub.error(onHubFailed);\r\n " +
|
||||||
" $.connection.hub.disconnected(onHubFailed);\r\n\r\n " +
|
" $.connection.hub.disconnected(onHubFailed);\r\n\r\n " +
|
||||||
" $.connection.hub.reconnecting(function () {\r\n " +
|
" $.connection.hub.reconnecting(function () {\r\n " +
|
||||||
" $(\'#AttachmentsContainer\').find(\'span.action\').addClass(\'disabled\');\r" +
|
" $(\'#AttachmentsContainer\').find(\'span.action.enabled\').addClass(\'disa" +
|
||||||
"\n });\r\n $.connection.hub.r" +
|
"bled\');\r\n });\r\n $.connecti" +
|
||||||
"econnected(function () {\r\n $(\'#AttachmentsContain" +
|
"on.hub.reconnected(function () {\r\n $(\'#Attachment" +
|
||||||
"er\').find(\'span.action\').removeClass(\'disabled\');\r\n }" +
|
"sContainer\').find(\'span.action.enabled\').removeClass(\'disabled\');\r\n " +
|
||||||
");\r\n\r\n // Start Connection\r\n " +
|
" });\r\n\r\n // Start Connection\r\n " +
|
||||||
" $.connection.hub.start(function () {\r\n $(\'#Att" +
|
" $.connection.hub.start(function () {\r\n " +
|
||||||
"achmentsContainer\').find(\'span.action\').removeClass(\'disabled\');\r\n " +
|
" $(\'#AttachmentsContainer\').find(\'span.action.enabled\').removeClass(\'dis" +
|
||||||
" }).fail(onHubFailed);\r\n\r\n function onHu" +
|
"abled\');\r\n }).fail(onHubFailed);\r\n\r\n " +
|
||||||
"bFailed(error) {\r\n // Disable UI\r\n " +
|
" function onHubFailed(error) {\r\n // Dis" +
|
||||||
" $(\'#AttachmentsContainer\').find(\'span.action\').addClass(\'disabl" +
|
"able UI\r\n $(\'#AttachmentsContainer\').find(\'span.a" +
|
||||||
"ed\');\r\n\r\n // Show Dialog Message\r\n " +
|
"ction.enabled\').addClass(\'disabled\');\r\n\r\n // Show" +
|
||||||
" if ($(\'.disconnected-dialog\').length == 0) {\r\n " +
|
" Dialog Message\r\n if ($(\'.disconnected-dialog\').l" +
|
||||||
" $(\'<div>\')\r\n .addClass" +
|
"ength == 0) {\r\n $(\'<div>\')\r\n " +
|
||||||
"(\'dialog disconnected-dialog\')\r\n .html(\'<" +
|
" .addClass(\'dialog disconnected-dialog\')\r\n " +
|
||||||
"h3><span class=\"fa-stack fa-lg\"><i class=\"fa fa-wifi fa-stack-1x\"></i><i class=\"" +
|
" .html(\'<h3><span class=\"fa-stack fa-lg\"><i class=\"fa fa-" +
|
||||||
"fa fa-ban fa-stack-2x error\"></i></span>Disconnected from the Disco ICT Server</" +
|
"wifi fa-stack-1x\"></i><i class=\"fa fa-ban fa-stack-2x error\"></i></span>Disconne" +
|
||||||
"h3><div>This page is not receiving live updates. Please ensure you are connected" +
|
"cted from the Disco ICT Server</h3><div>This page is not receiving live updates." +
|
||||||
" to the server, then refresh this page to enable features.</div>\')\r\n " +
|
" Please ensure you are connected to the server, then refresh this page to enable" +
|
||||||
" .dialog({\r\n " +
|
" features.</div>\')\r\n .dialog({\r\n " +
|
||||||
" resizable: false,\r\n title: \'Discon" +
|
" resizable: false,\r\n " +
|
||||||
"nected\',\r\n width: 400,\r\n " +
|
" title: \'Disconnected\',\r\n " +
|
||||||
" modal: true,\r\n " +
|
" width: 400,\r\n modal: true,\r\n " +
|
||||||
" buttons: {\r\n \'Refresh No" +
|
" buttons: {\r\n " +
|
||||||
"w\': function () {\r\n $(this).d" +
|
" \'Refresh Now\': function () {\r\n " +
|
||||||
"ialog(\'option\', \'buttons\', null);\r\n " +
|
" $(this).dialog(\'option\', \'buttons\', null);\r\n " +
|
||||||
" window.location.reload(true);\r\n " +
|
" window.location.reload(true);\r\n " +
|
||||||
" },\r\n \'Close\': function () {" +
|
" },\r\n " +
|
||||||
"\r\n $(this).dialog(\'destroy\');" +
|
" \'Close\': function () {\r\n " +
|
||||||
"\r\n }\r\n " +
|
" $(this).dialog(\'destroy\');\r\n " +
|
||||||
" }\r\n });\r\n " +
|
" }\r\n }\r\n " +
|
||||||
" }\r\n }\r\n\r\n " +
|
" });\r\n }\r\n " +
|
||||||
" function onAddAttachment(id, quick) {\r\n var data" +
|
"}\r\n\r\n function onAddAttachment(id, quick) {\r\n " +
|
||||||
" = { id: id };\r\n $.ajax({\r\n " +
|
" var data = { id: id };\r\n " +
|
||||||
" url: \'");
|
"$.ajax({\r\n url: \'");
|
||||||
|
|
||||||
|
|
||||||
#line 115 "..\..\Views\User\UserParts\_Resources.cshtml"
|
#line 115 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||||
@@ -641,33 +641,40 @@ WriteLiteral("\r\n //#region Add Attachments\r\n
|
|||||||
WriteLiteral("\',\r\n $Attachments.find(\'.Disco-AttachmentUpload-DropTa" +
|
WriteLiteral("\',\r\n $Attachments.find(\'.Disco-AttachmentUpload-DropTa" +
|
||||||
"rget\'),\r\n $Attachments.find(\'.Disco-AttachmentUpload-" +
|
"rget\'),\r\n $Attachments.find(\'.Disco-AttachmentUpload-" +
|
||||||
"Progress\'));\r\n\r\n var $attachmentInput = $Attachments." +
|
"Progress\'));\r\n\r\n var $attachmentInput = $Attachments." +
|
||||||
"find(\'.attachmentInput\');\r\n $attachmentInput.find(\'.p" +
|
"find(\'.attachmentInput\');\r\n if (window.location.proto" +
|
||||||
"hoto\').click(function () {\r\n if ($(this).hasClass" +
|
"col != \'https:\') {\r\n $attachmentInput.find(\'.phot" +
|
||||||
"(\'disabled\'))\r\n alert(\'Disconnected from the " +
|
"o\')\r\n .removeClass(\'enabled\')\r\n " +
|
||||||
"Disco ICT Server, please refresh this page and try again\');\r\n " +
|
" .addClass(\'disabled\')\r\n " +
|
||||||
" else\r\n attachmentUploader.upload" +
|
" .attr(\'title\', \'Capture Image: this functionality is only available over a HTTP" +
|
||||||
"Image();\r\n });\r\n $attachme" +
|
"S connection\');\r\n }\r\n $att" +
|
||||||
"ntInput.find(\'.upload\').click(function () {\r\n if " +
|
"achmentInput.find(\'.photo\').click(function () {\r\n " +
|
||||||
"($(this).hasClass(\'disabled\'))\r\n alert(\'Disco" +
|
" if (!$(this).hasClass(\'enabled\'))\r\n alert(\'T" +
|
||||||
"nnected from the Disco ICT Server, please refresh this page and try again\');\r\n " +
|
"his functionality is only available over a HTTPS connection\');\r\n " +
|
||||||
" else\r\n attachme" +
|
" else if ($(this).hasClass(\'disabled\'))\r\n " +
|
||||||
"ntUploader.uploadFiles();\r\n });\r\n\r\n " +
|
" alert(\'Disconnected from the Disco ICT Server, please refresh this p" +
|
||||||
" var resourcesTab;\r\n $(document).on(\'dragove" +
|
"age and try again\');\r\n else\r\n " +
|
||||||
"r\', function () {\r\n if (!resourcesTab) {\r\n " +
|
" attachmentUploader.uploadImage();\r\n }" +
|
||||||
" var tabs = $Attachments.closest(\'.ui-tabs\');\r\n " +
|
");\r\n $attachmentInput.find(\'.upload\').click(function " +
|
||||||
" resourcesTab = {\r\n " +
|
"() {\r\n if ($(this).hasClass(\'disabled\'))\r\n " +
|
||||||
" tabs: tabs,\r\n resourcesIndex: ta" +
|
" alert(\'Disconnected from the Disco ICT Server, plea" +
|
||||||
"bs.children(\'ul.ui-tabs-nav\').find(\'a[href=\"#UserDetailTab-Resources\"]\').closest" +
|
"se refresh this page and try again\');\r\n else\r\n " +
|
||||||
"(\'li\').index()\r\n };\r\n " +
|
" attachmentUploader.uploadFiles();\r\n " +
|
||||||
" }\r\n var selectedIndex = resourcesTab.tabs" +
|
" });\r\n\r\n var resourcesTab;\r\n " +
|
||||||
".tabs(\'option\', \'active\');\r\n if (resourcesTab.res" +
|
" $(document).on(\'dragover\', function () {\r\n " +
|
||||||
"ourcesIndex !== selectedIndex)\r\n resourcesTab" +
|
" if (!resourcesTab) {\r\n var tabs =" +
|
||||||
".tabs.tabs(\'option\', \'active\', resourcesTab.resourcesIndex);\r\n " +
|
" $Attachments.closest(\'.ui-tabs\');\r\n resource" +
|
||||||
" });\r\n //#endregion\r\n " +
|
"sTab = {\r\n tabs: tabs,\r\n " +
|
||||||
" ");
|
" resourcesIndex: tabs.children(\'ul.ui-tabs-nav\').find(\'a[h" +
|
||||||
|
"ref=\"#UserDetailTab-Resources\"]\').closest(\'li\').index()\r\n " +
|
||||||
|
" };\r\n }\r\n " +
|
||||||
|
" var selectedIndex = resourcesTab.tabs.tabs(\'option\', \'active\');\r\n " +
|
||||||
|
" if (resourcesTab.resourcesIndex !== selectedIndex)\r\n " +
|
||||||
|
" resourcesTab.tabs.tabs(\'option\', \'active\', resource" +
|
||||||
|
"sTab.resourcesIndex);\r\n });\r\n " +
|
||||||
|
" //#endregion\r\n ");
|
||||||
|
|
||||||
|
|
||||||
#line 268 "..\..\Views\User\UserParts\_Resources.cshtml"
|
#line 276 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -676,7 +683,7 @@ WriteLiteral("\',\r\n $Attachments.find(\'.Disco-Atta
|
|||||||
WriteLiteral(" ");
|
WriteLiteral(" ");
|
||||||
|
|
||||||
|
|
||||||
#line 269 "..\..\Views\User\UserParts\_Resources.cshtml"
|
#line 277 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||||
if (canRemoveAnyAttachments || canRemoveOwnAttachments)
|
if (canRemoveAnyAttachments || canRemoveOwnAttachments)
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -710,7 +717,7 @@ WriteLiteral(@"
|
|||||||
url: '");
|
url: '");
|
||||||
|
|
||||||
|
|
||||||
#line 295 "..\..\Views\User\UserParts\_Resources.cshtml"
|
#line 303 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||||
Write(Url.Action(MVC.API.User.AttachmentRemove()));
|
Write(Url.Action(MVC.API.User.AttachmentRemove()));
|
||||||
|
|
||||||
|
|
||||||
@@ -738,7 +745,7 @@ WriteLiteral("\',\r\n dataType: \'jso
|
|||||||
"/#endregion\r\n ");
|
"/#endregion\r\n ");
|
||||||
|
|
||||||
|
|
||||||
#line 323 "..\..\Views\User\UserParts\_Resources.cshtml"
|
#line 331 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -762,7 +769,7 @@ WriteLiteral(@"
|
|||||||
$('#UserDetailTabItems').append('<li><a href=""#UserDetailTab-Resources"" id=""UserDetailTab-ResourcesLink"">Attachments [");
|
$('#UserDetailTabItems').append('<li><a href=""#UserDetailTab-Resources"" id=""UserDetailTab-ResourcesLink"">Attachments [");
|
||||||
|
|
||||||
|
|
||||||
#line 339 "..\..\Views\User\UserParts\_Resources.cshtml"
|
#line 347 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||||
Write(Model.User.UserAttachments == null ? 0 : Model.User.UserAttachments.Count);
|
Write(Model.User.UserAttachments == null ? 0 : Model.User.UserAttachments.Count);
|
||||||
|
|
||||||
|
|
||||||
@@ -771,7 +778,7 @@ WriteLiteral(@"
|
|||||||
WriteLiteral("]</a></li>\');\r\n </script>\r\n</div>\r\n");
|
WriteLiteral("]</a></li>\');\r\n </script>\r\n</div>\r\n");
|
||||||
|
|
||||||
|
|
||||||
#line 342 "..\..\Views\User\UserParts\_Resources.cshtml"
|
#line 350 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||||
if (canRemoveAnyAttachments || canRemoveOwnAttachments)
|
if (canRemoveAnyAttachments || canRemoveOwnAttachments)
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -793,7 +800,7 @@ WriteLiteral(" class=\"fa fa-exclamation-triangle fa-lg\"");
|
|||||||
WriteLiteral("></i> Are you sure?\r\n </p>\r\n </div>\r\n");
|
WriteLiteral("></i> Are you sure?\r\n </p>\r\n </div>\r\n");
|
||||||
|
|
||||||
|
|
||||||
#line 349 "..\..\Views\User\UserParts\_Resources.cshtml"
|
#line 357 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||||
}
|
}
|
||||||
|
|
||||||
#line default
|
#line default
|
||||||
|
|||||||
Reference in New Issue
Block a user