Bug Fix: Webcam Attachment in <= Win 7

Flash video overlay was hiding the Comments model dialog. The flash
object is now hidden where <= Win 7 is detected (navigator.userAgent).
This commit is contained in:
Gary Sharp
2014-06-16 23:10:45 +10:00
parent a819d2722a
commit 34842012b7
15 changed files with 137 additions and 89 deletions
@@ -20,7 +20,7 @@
<tr>
<td id="AttachmentsContainer">
<div id="Attachments" class="@(canAddAttachments ? "canAddAttachments" : "cannotAddAttachments")">
<div class="disco-attachmentUpload-dropTarget">
<div class="Disco-AttachmentUpload-DropTarget">
<h2>Drop Attachments Here</h2>
</div>
<div class="attachmentOutput">
@@ -44,7 +44,7 @@
</div>
@if (canAddAttachments)
{
<div class="disco-attachmentUpload-progress"></div>
<div class="Disco-AttachmentUpload-Progress"></div>
<div class="attachmentInput clearfix">
<span class="action upload fa fa-upload" title="Attach File"></span><span class="action photo fa fa-camera" title="Capture Image"></span>
</div>
@@ -204,8 +204,8 @@
//#region Add Attachments
var attachmentUploader = new document.Disco.AttachmentUploader(
'@(Url.Action(MVC.API.Device.AttachmentUpload(Model.Device.SerialNumber, null)))',
$Attachments.find('.disco-attachmentUpload-dropTarget'),
$Attachments.find('.disco-attachmentUpload-progress'));
$Attachments.find('.Disco-AttachmentUpload-DropTarget'),
$Attachments.find('.Disco-AttachmentUpload-Progress'));
var $attachmentInput = $Attachments.find('.attachmentInput');
$attachmentInput.find('.photo').click(function () {
@@ -95,7 +95,7 @@ WriteAttribute("class", Tuple.Create(" class=\"", 888), Tuple.Create("\"", 963)
WriteLiteral(">\r\n <div");
WriteLiteral(" class=\"disco-attachmentUpload-dropTarget\"");
WriteLiteral(" class=\"Disco-AttachmentUpload-DropTarget\"");
WriteLiteral(">\r\n <h2>Drop Attachments Here</h2>\r\n </" +
"div>\r\n <div");
@@ -335,7 +335,7 @@ WriteLiteral(" </div>\r\n");
#line hidden
WriteLiteral(" <div");
WriteLiteral(" class=\"disco-attachmentUpload-progress\"");
WriteLiteral(" class=\"Disco-AttachmentUpload-Progress\"");
WriteLiteral("></div>\r\n");
@@ -619,9 +619,9 @@ WriteLiteral("\r\n //#region Add Attachments\r\n
#line default
#line hidden
WriteLiteral("\',\r\n $Attachments.find(\'.disco-attachmentUpload-dropTa" +
"rget\'),\r\n $Attachments.find(\'.disco-attachmentUpload-" +
"progress\'));\r\n\r\n var $attachmentInput = $Attachments." +
WriteLiteral("\',\r\n $Attachments.find(\'.Disco-AttachmentUpload-DropTa" +
"rget\'),\r\n $Attachments.find(\'.Disco-AttachmentUpload-" +
"Progress\'));\r\n\r\n var $attachmentInput = $Attachments." +
"find(\'.attachmentInput\');\r\n $attachmentInput.find(\'.p" +
"hoto\').click(function () {\r\n attachmentUploader.u" +
"ploadImage();\r\n });\r\n $att" +
@@ -54,7 +54,7 @@
{
<td id="AttachmentsContainer">
<div id="Attachments" class="@(canAddAttachments ? "canAddAttachments" : "cannotAddAttachments")">
<div class="disco-attachmentUpload-dropTarget">
<div class="Disco-AttachmentUpload-DropTarget">
<h2>Drop Attachments Here</h2>
</div>
<div class="attachmentOutput">
@@ -75,7 +75,7 @@
</div>
@if (canAddAttachments)
{
<div class="disco-attachmentUpload-progress"></div>
<div class="Disco-AttachmentUpload-Progress"></div>
<div class="attachmentInput clearfix">
<span class="action upload fa fa-upload" title="Attach File"></span><span class="action photo fa fa-camera" title="Capture Image"></span>
</div>
@@ -309,8 +309,8 @@
//#region Add Attachments
var attachmentUploader = new document.Disco.AttachmentUploader(
'@(Url.Action(MVC.API.Job.AttachmentUpload(Model.Job.Id, null)))',
$Attachments.find('.disco-attachmentUpload-dropTarget'),
$Attachments.find('.disco-attachmentUpload-progress'));
$Attachments.find('.Disco-AttachmentUpload-DropTarget'),
$Attachments.find('.Disco-AttachmentUpload-Progress'));
var $attachmentInput = $Attachments.find('.attachmentInput');
$attachmentInput.find('.photo').click(function () {
@@ -336,7 +336,7 @@ WriteAttribute("class", Tuple.Create(" class=\"", 2939), Tuple.Create("\"", 3014
WriteLiteral(">\r\n <div");
WriteLiteral(" class=\"disco-attachmentUpload-dropTarget\"");
WriteLiteral(" class=\"Disco-AttachmentUpload-DropTarget\"");
WriteLiteral(">\r\n <h2>Drop Attachments Here</h2>\r\n </" +
"div>\r\n <div");
@@ -573,7 +573,7 @@ WriteLiteral(" </div>\r\n");
#line hidden
WriteLiteral(" <div");
WriteLiteral(" class=\"disco-attachmentUpload-progress\"");
WriteLiteral(" class=\"Disco-AttachmentUpload-Progress\"");
WriteLiteral("></div>\r\n");
@@ -1015,8 +1015,8 @@ WriteLiteral("\r\n //#region Add Attachments\r\n var attac
#line default
#line hidden
WriteLiteral(@"',
$Attachments.find('.disco-attachmentUpload-dropTarget'),
$Attachments.find('.disco-attachmentUpload-progress'));
$Attachments.find('.Disco-AttachmentUpload-DropTarget'),
$Attachments.find('.Disco-AttachmentUpload-Progress'));
var $attachmentInput = $Attachments.find('.attachmentInput');
$attachmentInput.find('.photo').click(function () {
@@ -20,7 +20,7 @@
<tr>
<td id="AttachmentsContainer">
<div id="Attachments" class="@(canAddAttachments ? "canAddAttachments" : "cannotAddAttachments")">
<div class="disco-attachmentUpload-dropTarget">
<div class="Disco-AttachmentUpload-DropTarget">
<h2>Drop Attachments Here</h2>
</div>
<div class="attachmentOutput">
@@ -44,7 +44,7 @@
</div>
@if (canAddAttachments)
{
<div class="disco-attachmentUpload-progress"></div>
<div class="Disco-AttachmentUpload-Progress"></div>
<div class="attachmentInput clearfix">
<span class="action upload fa fa-upload" title="Attach File"></span><span class="action photo fa fa-camera" title="Capture Image"></span>
</div>
@@ -201,8 +201,8 @@
//#region Add Attachments
var attachmentUploader = new document.Disco.AttachmentUploader(
'@(Url.Action(MVC.API.User.AttachmentUpload(Model.User.UserId, null)))',
$Attachments.find('.disco-attachmentUpload-dropTarget'),
$Attachments.find('.disco-attachmentUpload-progress'));
$Attachments.find('.Disco-AttachmentUpload-DropTarget'),
$Attachments.find('.Disco-AttachmentUpload-Progress'));
var $attachmentInput = $Attachments.find('.attachmentInput');
$attachmentInput.find('.photo').click(function () {
@@ -95,7 +95,7 @@ WriteAttribute("class", Tuple.Create(" class=\"", 872), Tuple.Create("\"", 947)
WriteLiteral(">\r\n <div");
WriteLiteral(" class=\"disco-attachmentUpload-dropTarget\"");
WriteLiteral(" class=\"Disco-AttachmentUpload-DropTarget\"");
WriteLiteral(">\r\n <h2>Drop Attachments Here</h2>\r\n </" +
"div>\r\n <div");
@@ -335,7 +335,7 @@ WriteLiteral(" </div>\r\n");
#line hidden
WriteLiteral(" <div");
WriteLiteral(" class=\"disco-attachmentUpload-progress\"");
WriteLiteral(" class=\"Disco-AttachmentUpload-Progress\"");
WriteLiteral("></div>\r\n");
@@ -613,9 +613,9 @@ WriteLiteral("\r\n //#region Add Attachments\r\n
#line default
#line hidden
WriteLiteral("\',\r\n $Attachments.find(\'.disco-attachmentUpload-dropTa" +
"rget\'),\r\n $Attachments.find(\'.disco-attachmentUpload-" +
"progress\'));\r\n\r\n var $attachmentInput = $Attachments.find" +
WriteLiteral("\',\r\n $Attachments.find(\'.Disco-AttachmentUpload-DropTa" +
"rget\'),\r\n $Attachments.find(\'.Disco-AttachmentUpload-" +
"Progress\'));\r\n\r\n var $attachmentInput = $Attachments.find" +
"(\'.attachmentInput\');\r\n $attachmentInput.find(\'.photo\').c" +
"lick(function () {\r\n attachmentUploader.uploadImage()" +
";\r\n });\r\n $attachmentInput.find(\'." +