Feature #44: Image capture WebRTC & HTML5 FileIO
Silverlight was previously used to capture webcam pictures and upload file attachments. HTML5 FileIO is now used for all attachment uploading - including drag-drop support. WebRTC is used to capture webcam images - this falls back to a Flash polyfill when WebRTC isn't supported.
This commit is contained in:
1 parent
d040ab094c
commit
b64ac3b16f
40 files changed
+3221
-2444
No files matched your search
Binary file not shown.
@@ -0,0 +1,675 @@
|
||||
///#source 1 1 /ClientSource/Scripts/Modules/Disco-AttachmentUploader/webcam.js
|
||||
// WebcamJS v1.0
|
||||
// Webcam library for capturing JPEG/PNG images in JavaScript
|
||||
// Attempts getUserMedia, falls back to Flash
|
||||
// Author: Joseph Huckaby: http://github.com/jhuckaby
|
||||
// Based on JPEGCam: http://code.google.com/p/jpegcam/
|
||||
// Copyright (c) 2012 Joseph Huckaby
|
||||
// Licensed under the MIT License
|
||||
|
||||
/* Usage:
|
||||
<div id="my_camera" style="width:320px; height:240px;"></div>
|
||||
<div id="my_result"></div>
|
||||
|
||||
<script language="JavaScript">
|
||||
Webcam.attach( '#my_camera' );
|
||||
|
||||
function take_snapshot() {
|
||||
var data_uri = Webcam.snap();
|
||||
document.getElementById('my_result').innerHTML =
|
||||
'<img src="'+data_uri+'"/>';
|
||||
}
|
||||
</script>
|
||||
|
||||
<a href="javascript:void(take_snapshot())">Take Snapshot</a>
|
||||
*/
|
||||
|
||||
var Webcam = {
|
||||
version: '1.0.0',
|
||||
|
||||
// globals
|
||||
protocol: location.protocol.match(/https/i) ? 'https' : 'http',
|
||||
swfURL: '', // URI to webcam.swf movie (defaults to cwd)
|
||||
loaded: false, // true when webcam movie finishes loading
|
||||
live: false, // true when webcam is initialized and ready to snap
|
||||
userMedia: true, // true when getUserMedia is supported natively
|
||||
|
||||
params: {
|
||||
width: 0,
|
||||
height: 0,
|
||||
dest_width: 0, // size of captured image
|
||||
dest_height: 0, // these default to width/height
|
||||
image_format: 'jpeg', // image format (may be jpeg or png)
|
||||
jpeg_quality: 90, // jpeg image quality from 0 (worst) to 100 (best)
|
||||
force_flash: false // force flash mode
|
||||
},
|
||||
|
||||
hooks: {
|
||||
load: null,
|
||||
live: null,
|
||||
uploadcomplete: null,
|
||||
uploadprogress: null,
|
||||
error: function(msg) { alert("Webcam.js Error: " + msg); }
|
||||
}, // callback hook functions
|
||||
|
||||
init: function() {
|
||||
// initialize, check for getUserMedia support
|
||||
navigator.getUserMedia = navigator.getUserMedia || navigator.webkitGetUserMedia || navigator.mozGetUserMedia || navigator.msGetUserMedia;
|
||||
window.URL = window.URL || window.webkitURL || window.mozURL || window.msURL;
|
||||
|
||||
this.userMedia = this.userMedia && !!navigator.getUserMedia && !!window.URL;
|
||||
|
||||
// Older versions of firefox (< 21) apparently claim support but user media does not actually work
|
||||
if (navigator.userAgent.match(/Firefox\D+(\d+)/)) {
|
||||
if (parseInt(RegExp.$1, 10) < 21) this.userMedia = null;
|
||||
}
|
||||
},
|
||||
|
||||
attach: function(elem) {
|
||||
// create webcam preview and attach to DOM element
|
||||
// pass in actual DOM reference, ID, or CSS selector
|
||||
if (typeof(elem) == 'string') {
|
||||
elem = document.getElementById(elem) || document.querySelector(elem);
|
||||
}
|
||||
if (!elem) {
|
||||
return this.dispatch('error', "Could not locate DOM element to attach to.");
|
||||
}
|
||||
|
||||
this.container = elem;
|
||||
if (!this.params.width) this.params.width = elem.offsetWidth;
|
||||
if (!this.params.height) this.params.height = elem.offsetHeight;
|
||||
|
||||
// set defaults for dest_width / dest_height if not set
|
||||
if (!this.params.dest_width) this.params.dest_width = this.params.width;
|
||||
if (!this.params.dest_height) this.params.dest_height = this.params.height;
|
||||
|
||||
// if force_flash is set, disable userMedia
|
||||
if (this.params.force_flash) this.userMedia = null;
|
||||
|
||||
if (this.userMedia) {
|
||||
// setup webcam video container
|
||||
var video = document.createElement('video');
|
||||
video.setAttribute('autoplay', 'autoplay');
|
||||
video.style.width = '' + this.params.dest_width + 'px';
|
||||
video.style.height = '' + this.params.dest_height + 'px';
|
||||
|
||||
// adjust scale if dest_width or dest_height is different
|
||||
var scaleX = this.params.width / this.params.dest_width;
|
||||
var scaleY = this.params.height / this.params.dest_height;
|
||||
|
||||
if ((scaleX != 1.0) || (scaleY != 1.0)) {
|
||||
elem.style.overflow = 'visible';
|
||||
video.style.webkitTransformOrigin = '0px 0px';
|
||||
video.style.mozTransformOrigin = '0px 0px';
|
||||
video.style.msTransformOrigin = '0px 0px';
|
||||
video.style.oTransformOrigin = '0px 0px';
|
||||
video.style.transformOrigin = '0px 0px';
|
||||
video.style.webkitTransform = 'scaleX('+scaleX+') scaleY('+scaleY+')';
|
||||
video.style.mozTransform = 'scaleX('+scaleX+') scaleY('+scaleY+')';
|
||||
video.style.msTransform = 'scaleX('+scaleX+') scaleY('+scaleY+')';
|
||||
video.style.oTransform = 'scaleX('+scaleX+') scaleY('+scaleY+')';
|
||||
video.style.transform = 'scaleX('+scaleX+') scaleY('+scaleY+')';
|
||||
}
|
||||
|
||||
// add video element to dom
|
||||
elem.appendChild( video );
|
||||
this.video = video;
|
||||
|
||||
// create offscreen canvas element to hold pixels later on
|
||||
var canvas = document.createElement('canvas');
|
||||
canvas.width = this.params.dest_width;
|
||||
canvas.height = this.params.dest_height;
|
||||
var context = canvas.getContext('2d');
|
||||
this.context = context;
|
||||
this.canvas = canvas;
|
||||
|
||||
// ask user for access to their camera
|
||||
var self = this;
|
||||
navigator.getUserMedia({
|
||||
"audio": false,
|
||||
"video": true
|
||||
},
|
||||
function(stream) {
|
||||
// got access, attach stream to video
|
||||
video.src = window.URL.createObjectURL( stream ) || stream;
|
||||
Webcam.stream = stream;
|
||||
Webcam.loaded = true;
|
||||
Webcam.live = true;
|
||||
Webcam.dispatch('load');
|
||||
Webcam.dispatch('live');
|
||||
},
|
||||
function(err) {
|
||||
return self.dispatch('error', "Could not access webcam.");
|
||||
});
|
||||
}
|
||||
else {
|
||||
// flash fallback
|
||||
elem.innerHTML = this.getSWFHTML();
|
||||
}
|
||||
},
|
||||
|
||||
reset: function() {
|
||||
// shutdown camera, reset to potentially attach again
|
||||
if (this.userMedia) {
|
||||
try { this.stream.stop(); } catch (e) {;}
|
||||
delete this.stream;
|
||||
delete this.canvas;
|
||||
delete this.context;
|
||||
delete this.video;
|
||||
}
|
||||
|
||||
this.container.innerHTML = '';
|
||||
delete this.container;
|
||||
|
||||
this.loaded = false;
|
||||
this.live = false;
|
||||
},
|
||||
|
||||
set: function() {
|
||||
// set one or more params
|
||||
// variable argument list: 1 param = hash, 2 params = key, value
|
||||
if (arguments.length == 1) {
|
||||
for (var key in arguments[0]) {
|
||||
this.params[key] = arguments[0][key];
|
||||
}
|
||||
}
|
||||
else {
|
||||
this.params[ arguments[0] ] = arguments[1];
|
||||
}
|
||||
},
|
||||
|
||||
on: function(name, callback) {
|
||||
// set callback hook
|
||||
// supported hooks: onLoad, onError, onLive
|
||||
name = name.replace(/^on/i, '').toLowerCase();
|
||||
|
||||
if (typeof(this.hooks[name]) == 'undefined')
|
||||
throw "Event type not supported: " + name;
|
||||
|
||||
this.hooks[name] = callback;
|
||||
},
|
||||
|
||||
dispatch: function() {
|
||||
// fire hook callback, passing optional value to it
|
||||
var name = arguments[0].replace(/^on/i, '').toLowerCase();
|
||||
var args = Array.prototype.slice.call(arguments, 1);
|
||||
|
||||
if (this.hooks[name]) {
|
||||
if (typeof(this.hooks[name]) == 'function') {
|
||||
// callback is function reference, call directly
|
||||
this.hooks[name].apply(this, args);
|
||||
}
|
||||
else if (typeof(this.hooks[name]) == 'array') {
|
||||
// callback is PHP-style object instance method
|
||||
this.hooks[name][0][this.hooks[name][1]].apply(this.hooks[name][0], args);
|
||||
}
|
||||
else if (window[this.hooks[name]]) {
|
||||
// callback is global function name
|
||||
window[ this.hooks[name] ].apply(window, args);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false; // no hook defined
|
||||
},
|
||||
|
||||
setSWFLocation: function(url) {
|
||||
// set location of SWF movie (defaults to webcam.swf in cwd)
|
||||
this.swfURL = url;
|
||||
},
|
||||
|
||||
getSWFHTML: function() {
|
||||
// Return HTML for embedding flash based webcam capture movie
|
||||
var html = '';
|
||||
|
||||
// make sure we aren't running locally (flash doesn't work)
|
||||
if (location.protocol.match(/file/)) {
|
||||
return '<h1 style="color:red">Sorry, the Webcam.js Flash fallback does not work from local disk. Please upload it to a web server first.</h1>';
|
||||
}
|
||||
|
||||
// set default swfURL if not explicitly set
|
||||
if (!this.swfURL) {
|
||||
// find our script tag, and use that base URL
|
||||
var base_url = '';
|
||||
var scpts = document.getElementsByTagName('script');
|
||||
for (var idx = 0, len = scpts.length; idx < len; idx++) {
|
||||
var src = scpts[idx].getAttribute('src');
|
||||
if (src && src.match(/\/webcam(\.min)?\.js/)) {
|
||||
base_url = src.replace(/\/webcam(\.min)?\.js.*$/, '');
|
||||
idx = len;
|
||||
}
|
||||
}
|
||||
if (base_url) this.swfURL = base_url + '/webcam.swf';
|
||||
else this.swfURL = 'webcam.swf';
|
||||
}
|
||||
|
||||
// if this is the user's first visit, set flashvar so flash privacy settings panel is shown first
|
||||
if (window.localStorage && !localStorage.getItem('visited')) {
|
||||
this.params.new_user = 1;
|
||||
localStorage.setItem('visited', 1);
|
||||
}
|
||||
|
||||
// construct flashvars string
|
||||
var flashvars = '';
|
||||
for (var key in this.params) {
|
||||
if (flashvars) flashvars += '&';
|
||||
flashvars += key + '=' + escape(this.params[key]);
|
||||
}
|
||||
|
||||
html += '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="'+this.protocol+'://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="'+this.params.width+'" height="'+this.params.height+'" id="webcam_movie_obj" align="middle"><param name="allowScriptAccess" value="always" /><param name="allowFullScreen" value="false" /><param name="movie" value="'+this.swfURL+'" /><param name="loop" value="false" /><param name="menu" value="false" /><param name="quality" value="best" /><param name="bgcolor" value="#ffffff" /><param name="flashvars" value="'+flashvars+'"/><embed id="webcam_movie_embed" src="'+this.swfURL+'" loop="false" menu="false" quality="best" bgcolor="#ffffff" width="'+this.params.width+'" height="'+this.params.height+'" name="webcam_movie_embed" align="middle" allowScriptAccess="always" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" flashvars="'+flashvars+'"></embed></object>';
|
||||
|
||||
return html;
|
||||
},
|
||||
|
||||
getMovie: function() {
|
||||
// get reference to movie object/embed in DOM
|
||||
if (!this.loaded) return this.dispatch('error', "Flash Movie is not loaded yet");
|
||||
var movie = document.getElementById('webcam_movie_obj');
|
||||
if (!movie || !movie._snap) movie = document.getElementById('webcam_movie_embed');
|
||||
if (!movie) this.dispatch('error', "Cannot locate Flash movie in DOM");
|
||||
return movie;
|
||||
},
|
||||
|
||||
snap: function() {
|
||||
// take snapshot and return image data uri
|
||||
if (!this.loaded) return this.dispatch('error', "Webcam is not loaded yet");
|
||||
if (!this.live) return this.dispatch('error', "Webcam is not live yet");
|
||||
|
||||
if (this.userMedia) {
|
||||
// native implementation
|
||||
this.context.drawImage(this.video, 0, 0, this.params.dest_width, this.params.dest_height);
|
||||
return this.canvas.toDataURL('image/' + this.params.image_format, this.params.jpeg_quality / 100 );
|
||||
}
|
||||
else {
|
||||
// flash fallback
|
||||
var raw_data = this.getMovie()._snap();
|
||||
return 'data:image/'+this.params.image_format+';base64,' + raw_data;
|
||||
}
|
||||
},
|
||||
|
||||
configure: function(panel) {
|
||||
// open flash configuration panel -- specify tab name:
|
||||
// "camera", "privacy", "default", "localStorage", "microphone", "settingsManager"
|
||||
if (!panel) panel = "camera";
|
||||
this.getMovie()._configure(panel);
|
||||
},
|
||||
|
||||
flashNotify: function(type, msg) {
|
||||
// receive notification from flash about event
|
||||
switch (type) {
|
||||
case 'flashLoadComplete':
|
||||
// movie loaded successfully
|
||||
this.loaded = true;
|
||||
this.dispatch('load');
|
||||
break;
|
||||
|
||||
case 'cameraLive':
|
||||
// camera is live and ready to snap
|
||||
this.live = true;
|
||||
this.dispatch('live');
|
||||
break;
|
||||
|
||||
case 'error':
|
||||
// Flash error
|
||||
this.dispatch('error', msg);
|
||||
break;
|
||||
|
||||
default:
|
||||
// catch-all event, just in case
|
||||
// console.log("webcam flash_notify: " + type + ": " + msg);
|
||||
break;
|
||||
}
|
||||
},
|
||||
|
||||
b64ToUint6: function(nChr) {
|
||||
// convert base64 encoded character to 6-bit integer
|
||||
// from: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Base64_encoding_and_decoding
|
||||
return nChr > 64 && nChr < 91 ? nChr - 65
|
||||
: nChr > 96 && nChr < 123 ? nChr - 71
|
||||
: nChr > 47 && nChr < 58 ? nChr + 4
|
||||
: nChr === 43 ? 62 : nChr === 47 ? 63 : 0;
|
||||
},
|
||||
|
||||
base64DecToArr: function(sBase64, nBlocksSize) {
|
||||
// convert base64 encoded string to Uintarray
|
||||
// from: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Base64_encoding_and_decoding
|
||||
var sB64Enc = sBase64.replace(/[^A-Za-z0-9\+\/]/g, ""), nInLen = sB64Enc.length,
|
||||
nOutLen = nBlocksSize ? Math.ceil((nInLen * 3 + 1 >> 2) / nBlocksSize) * nBlocksSize : nInLen * 3 + 1 >> 2,
|
||||
taBytes = new Uint8Array(nOutLen);
|
||||
|
||||
for (var nMod3, nMod4, nUint24 = 0, nOutIdx = 0, nInIdx = 0; nInIdx < nInLen; nInIdx++) {
|
||||
nMod4 = nInIdx & 3;
|
||||
nUint24 |= this.b64ToUint6(sB64Enc.charCodeAt(nInIdx)) << 18 - 6 * nMod4;
|
||||
if (nMod4 === 3 || nInLen - nInIdx === 1) {
|
||||
for (nMod3 = 0; nMod3 < 3 && nOutIdx < nOutLen; nMod3++, nOutIdx++) {
|
||||
taBytes[nOutIdx] = nUint24 >>> (16 >>> nMod3 & 24) & 255;
|
||||
}
|
||||
nUint24 = 0;
|
||||
}
|
||||
}
|
||||
return taBytes;
|
||||
},
|
||||
|
||||
upload: function(image_data_uri, target_url, callback) {
|
||||
// submit image data to server using binary AJAX
|
||||
if (callback) Webcam.on('uploadComplete', callback);
|
||||
var form_elem_name = 'webcam';
|
||||
|
||||
// detect image format from within image_data_uri
|
||||
var image_fmt = '';
|
||||
if (image_data_uri.match(/^data\:image\/(\w+)/))
|
||||
image_fmt = RegExp.$1;
|
||||
else
|
||||
throw "Cannot locate image format in Data URI";
|
||||
|
||||
// extract raw base64 data from Data URI
|
||||
var raw_image_data = image_data_uri.replace(/^data\:image\/\w+\;base64\,/, '');
|
||||
|
||||
// contruct use AJAX object
|
||||
var http = new XMLHttpRequest();
|
||||
http.open("POST", target_url, true);
|
||||
|
||||
// setup progress events
|
||||
if (http.upload && http.upload.addEventListener) {
|
||||
http.upload.addEventListener( 'progress', function(e) {
|
||||
if (e.lengthComputable) {
|
||||
var progress = e.loaded / e.total;
|
||||
Webcam.dispatch('uploadProgress', progress, e);
|
||||
}
|
||||
}, false );
|
||||
}
|
||||
|
||||
// completion handler
|
||||
http.onload = function() {
|
||||
Webcam.dispatch('uploadComplete', http.status, http.responseText, http.statusText);
|
||||
};
|
||||
|
||||
// create a blob and decode our base64 to binary
|
||||
var blob = new Blob( [ this.base64DecToArr(raw_image_data) ], {type: 'image/'+image_fmt} );
|
||||
|
||||
// stuff into a form, so servers can easily receive it as a standard file upload
|
||||
var form = new FormData();
|
||||
form.append( form_elem_name, blob, form_elem_name+"."+image_fmt.replace(/e/, '') );
|
||||
|
||||
// send data to server
|
||||
http.send(form);
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
Webcam.init();
|
||||
|
||||
///#source 1 1 /ClientSource/Scripts/Modules/Disco-AttachmentUploader/disco-attachmentuploader.js
|
||||
/// <reference path="webcam.js" />
|
||||
|
||||
; (function (window, document, $, Webcam) {
|
||||
"use strict";
|
||||
|
||||
var attachmentUploader = function (uploadUrl, dropTarget, uploadProgressContainer) {
|
||||
var self = this;
|
||||
|
||||
self.uploadUrl = uploadUrl;
|
||||
self.dropTarget = dropTarget;
|
||||
self.uploadProgressContainer = uploadProgressContainer;
|
||||
|
||||
// #region File Selection Support
|
||||
self._uploadFilesInput = null;
|
||||
self.uploadFiles = function () {
|
||||
if (!!self._uploadFilesInput) {
|
||||
self._uploadFilesInput.remove();
|
||||
}
|
||||
self._uploadFilesInput = $('<input>');
|
||||
self._uploadFilesInput.attr({
|
||||
type: 'file',
|
||||
multiple: 'multiple',
|
||||
title: 'Disco File Uploading'
|
||||
})
|
||||
.hide()
|
||||
.change(function (e) {
|
||||
var files = e.target.files;
|
||||
if (!!files && files.length > 0) {
|
||||
self._uploadFiles(files);
|
||||
}
|
||||
self._uploadFilesInput.remove();
|
||||
}).appendTo(self.uploadProgressContainer)
|
||||
.click();
|
||||
};
|
||||
// #endregion
|
||||
|
||||
// #region File Drop Support
|
||||
if (!!self.dropTarget) {
|
||||
var $document = $(document);
|
||||
var dragFinished = false;
|
||||
var dragFinishedToken = null;
|
||||
$document.on('dragover', function () {
|
||||
self.dropTarget.addClass('dragHighlight');
|
||||
self.dropTarget.removeClass('dragHover');
|
||||
dragFinished = false;
|
||||
});
|
||||
$document.on('dragleave', function () {
|
||||
if (!!dragFinishedToken)
|
||||
window.clearInterval(dragFinishedToken);
|
||||
|
||||
dragFinished = true;
|
||||
window.setTimeout(function () {
|
||||
if (dragFinished)
|
||||
self.dropTarget.removeClass('dragHighlight');
|
||||
dragFinishedToken = null;
|
||||
}, 200);
|
||||
});
|
||||
|
||||
self.dropTarget.on('dragover', function (e) {
|
||||
e.stopPropagation();
|
||||
e.preventDefault();
|
||||
|
||||
self.dropTarget.addClass('dragHover');
|
||||
|
||||
dragFinished = false;
|
||||
|
||||
e.originalEvent.dataTransfer.dropEffect = 'copy';
|
||||
});
|
||||
|
||||
self.dropTarget.on('drop', function (e) {
|
||||
e.stopPropagation();
|
||||
e.preventDefault();
|
||||
|
||||
dragFinished = true;
|
||||
self.dropTarget.removeClass('dragHighlight');
|
||||
|
||||
var files = e.originalEvent.dataTransfer.files;
|
||||
self._uploadFiles(files);
|
||||
});
|
||||
}
|
||||
// #endregion
|
||||
|
||||
// #region Webcam Support
|
||||
self.uploadImage = function () {
|
||||
var mediaWidth = 720;
|
||||
var mediaHeight = 540;
|
||||
var mediaStream;
|
||||
|
||||
// Setup Dialog
|
||||
var dialog = $('<div>')
|
||||
.attr({
|
||||
id: 'disco_attachmentUpload_imageDialog',
|
||||
title: 'Upload Image',
|
||||
'class': 'dialog disco-attachmentUpload-imageDialog'
|
||||
});
|
||||
dialog.dialog({
|
||||
autoOpen: true,
|
||||
draggable: false,
|
||||
modal: true,
|
||||
resizable: false,
|
||||
width: mediaWidth,
|
||||
height: mediaHeight,
|
||||
close: function () {
|
||||
Webcam.reset();
|
||||
window.setTimeout(function () {
|
||||
dialog.dialog('destroy');
|
||||
}, 1);
|
||||
}
|
||||
}).closest('.ui-dialog').children('.ui-dialog-titlebar').css('border-bottom', 'none');
|
||||
|
||||
var dialogButtons = [{
|
||||
text: 'Capture',
|
||||
click: captureImage
|
||||
}];
|
||||
|
||||
// Capturing
|
||||
function captureImage() {
|
||||
var dataUri = Webcam.snap();
|
||||
self._uploadImage(dataUri);
|
||||
}
|
||||
Webcam.set({
|
||||
width: mediaWidth,
|
||||
height: mediaHeight,
|
||||
dest_width: mediaWidth * 1.5,
|
||||
dest_height: mediaHeight * 1.5,
|
||||
jpeg_quality: 95
|
||||
});
|
||||
Webcam.setSWFLocation('/ClientSource/Scripts/Modules/Disco-AttachmentUploader/webcam.swf');
|
||||
Webcam.on('error', function (error) {
|
||||
alert(error);
|
||||
dialog.dialog('close');
|
||||
});
|
||||
Webcam.on('live', function () {
|
||||
dialog.dialog('option', 'buttons', dialogButtons);
|
||||
dialog.closest('.ui-dialog')
|
||||
.children('.ui-dialog-buttonpane')
|
||||
.css('margin-top', 0)
|
||||
.find('.ui-button:first').focus();
|
||||
});
|
||||
Webcam.attach(dialog.attr('id'));
|
||||
};
|
||||
// #endregion
|
||||
|
||||
// #region Helpers
|
||||
self.getFileComments = function (fileName, thumbnailHandler, complete) {
|
||||
var result = false;
|
||||
var dialog = $('<div>')
|
||||
.attr({
|
||||
title: 'Upload File',
|
||||
'class': 'dialog disco-attachmentUpload-commentDialog'
|
||||
});
|
||||
dialog.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>');
|
||||
|
||||
if (!!thumbnailHandler) {
|
||||
var td = dialog.find('td.thumbnail');
|
||||
var img = td.find('img');
|
||||
if (thumbnailHandler(img))
|
||||
td.show();
|
||||
}
|
||||
|
||||
dialog.find('td.filename').text(fileName).attr('title', fileName);
|
||||
var comments = dialog.find('input.comments')
|
||||
.keypress(function (e) {
|
||||
if (e.which === 13) {
|
||||
result = true;
|
||||
dialog.dialog("close");
|
||||
}
|
||||
});
|
||||
|
||||
dialog.dialog({
|
||||
resizable: false,
|
||||
width: 400,
|
||||
modal: true,
|
||||
autoOpen: true,
|
||||
buttons: {
|
||||
"Upload": function () {
|
||||
result = true;
|
||||
dialog.dialog("close");
|
||||
},
|
||||
Cancel: function () {
|
||||
dialog.dialog("close");
|
||||
}
|
||||
},
|
||||
close: function () {
|
||||
var commentsVal = comments.val();
|
||||
dialog.dialog('destroy').remove();
|
||||
complete(result, commentsVal);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
self._uploadImage = function (dataUri) {
|
||||
var imageData = dataUri.replace(/^data\:image\/\w+\;base64\,/, '');
|
||||
|
||||
var imageBlob = new Blob([Webcam.base64DecToArr(imageData)], { type: 'image/jpeg' });
|
||||
|
||||
var fileName = 'CapturedImage-' + moment().format('YYYYMMDD-HHmmss') + '.jpg';
|
||||
|
||||
self.getFileComments(fileName, function (img) {
|
||||
img.attr('src', dataUri);
|
||||
return true;
|
||||
}, function (result, comments) {
|
||||
if (!result)
|
||||
return;
|
||||
|
||||
self._uploadFile(imageBlob, fileName, comments);
|
||||
});
|
||||
};
|
||||
|
||||
self._uploadFiles = function (fileList) {
|
||||
var files = $.makeArray(fileList);
|
||||
|
||||
var processNextFile = function () {
|
||||
if (!files || files.length === 0)
|
||||
return;
|
||||
|
||||
var file = files.shift();
|
||||
self.getFileComments(file.name, function (img) {
|
||||
if (!!file.type && file.type.indexOf('image/') === 0) {
|
||||
var reader = new FileReader();
|
||||
reader.onload = function (e) {
|
||||
img.attr('src', e.target.result);
|
||||
};
|
||||
reader.readAsDataURL(file);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}, function (result, comments) {
|
||||
if (!result)
|
||||
return;
|
||||
|
||||
self._uploadFile(file, file.name, comments);
|
||||
|
||||
processNextFile();
|
||||
});
|
||||
};
|
||||
processNextFile();
|
||||
};
|
||||
|
||||
self._uploadFile = function (fileData, fileName, comments) {
|
||||
var formData = new FormData();
|
||||
var xhr = new XMLHttpRequest();
|
||||
var progress = $('<div>')
|
||||
.append($('<i>').addClass('fa fa-cog fa-spin'))
|
||||
.append($('<span>').text('Uploading: ' + fileName))
|
||||
.appendTo(self.uploadProgressContainer);
|
||||
|
||||
formData.append('Comments', comments);
|
||||
formData.append('File', fileData, fileName);
|
||||
|
||||
xhr.open("POST", self.uploadUrl, true);
|
||||
xhr.onreadystatechange = function () {
|
||||
if (xhr.readyState === 4 && xhr.status === 200) {
|
||||
if (xhr.status !== 200) {
|
||||
alert('Error Uploading [' + fileName + ']: ' + xhr.responseText);
|
||||
}
|
||||
progress.slideUp(400, function () {
|
||||
progress.remove();
|
||||
});
|
||||
}
|
||||
};
|
||||
xhr.send(formData);
|
||||
};
|
||||
// #endregion
|
||||
|
||||
return self;
|
||||
};
|
||||
|
||||
if (!document.Disco) {
|
||||
document.Disco = {};
|
||||
}
|
||||
document.Disco.AttachmentUploader = attachmentUploader;
|
||||
|
||||
}(this, document, $, Webcam));
|
||||
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<bundle minify="true" runOnBuild="true" output="Disco-AttachmentUploader.js">
|
||||
<file>/ClientSource/Scripts/Modules/Disco-AttachmentUploader/webcam.js</file>
|
||||
<file>/ClientSource/Scripts/Modules/Disco-AttachmentUploader/disco-attachmentuploader.js</file>
|
||||
</bundle>
|
||||
@@ -0,0 +1,4 @@
|
||||
var Webcam={version:"1.0.0",protocol:location.protocol.match(/https/i)?"https":"http",swfURL:"",loaded:!1,live:!1,userMedia:!0,params:{width:0,height:0,dest_width:0,dest_height:0,image_format:"jpeg",jpeg_quality:90,force_flash:!1},hooks:{load:null,live:null,uploadcomplete:null,uploadprogress:null,error:function(n){alert("Webcam.js Error: "+n)}},init:function(){navigator.getUserMedia=navigator.getUserMedia||navigator.webkitGetUserMedia||navigator.mozGetUserMedia||navigator.msGetUserMedia;window.URL=window.URL||window.webkitURL||window.mozURL||window.msURL;this.userMedia=this.userMedia&&!!navigator.getUserMedia&&!!window.URL;navigator.userAgent.match(/Firefox\D+(\d+)/)&&parseInt(RegExp.$1,10)<21&&(this.userMedia=null)},attach:function(n){var t,i,r,u,f,e;if(typeof n=="string"&&(n=document.getElementById(n)||document.querySelector(n)),!n)return this.dispatch("error","Could not locate DOM element to attach to.");this.container=n;this.params.width||(this.params.width=n.offsetWidth);this.params.height||(this.params.height=n.offsetHeight);this.params.dest_width||(this.params.dest_width=this.params.width);this.params.dest_height||(this.params.dest_height=this.params.height);this.params.force_flash&&(this.userMedia=null);this.userMedia?(t=document.createElement("video"),t.setAttribute("autoplay","autoplay"),t.style.width=""+this.params.dest_width+"px",t.style.height=""+this.params.dest_height+"px",i=this.params.width/this.params.dest_width,r=this.params.height/this.params.dest_height,(i!=1||r!=1)&&(n.style.overflow="visible",t.style.webkitTransformOrigin="0px 0px",t.style.mozTransformOrigin="0px 0px",t.style.msTransformOrigin="0px 0px",t.style.oTransformOrigin="0px 0px",t.style.transformOrigin="0px 0px",t.style.webkitTransform="scaleX("+i+") scaleY("+r+")",t.style.mozTransform="scaleX("+i+") scaleY("+r+")",t.style.msTransform="scaleX("+i+") scaleY("+r+")",t.style.oTransform="scaleX("+i+") scaleY("+r+")",t.style.transform="scaleX("+i+") scaleY("+r+")"),n.appendChild(t),this.video=t,u=document.createElement("canvas"),u.width=this.params.dest_width,u.height=this.params.dest_height,f=u.getContext("2d"),this.context=f,this.canvas=u,e=this,navigator.getUserMedia({audio:!1,video:!0},function(n){t.src=window.URL.createObjectURL(n)||n;Webcam.stream=n;Webcam.loaded=!0;Webcam.live=!0;Webcam.dispatch("load");Webcam.dispatch("live")},function(){return e.dispatch("error","Could not access webcam.")})):n.innerHTML=this.getSWFHTML()},reset:function(){if(this.userMedia){try{this.stream.stop()}catch(n){}delete this.stream;delete this.canvas;delete this.context;delete this.video}this.container.innerHTML="";delete this.container;this.loaded=!1;this.live=!1},set:function(){if(arguments.length==1)for(var n in arguments[0])this.params[n]=arguments[0][n];else this.params[arguments[0]]=arguments[1]},on:function(n,t){if(n=n.replace(/^on/i,"").toLowerCase(),typeof this.hooks[n]=="undefined")throw"Event type not supported: "+n;this.hooks[n]=t},dispatch:function(){var n=arguments[0].replace(/^on/i,"").toLowerCase(),t=Array.prototype.slice.call(arguments,1);return this.hooks[n]?(typeof this.hooks[n]=="function"?this.hooks[n].apply(this,t):typeof this.hooks[n]=="array"?this.hooks[n][0][this.hooks[n][1]].apply(this.hooks[n][0],t):window[this.hooks[n]]&&window[this.hooks[n]].apply(window,t),!0):!1},setSWFLocation:function(n){this.swfURL=n},getSWFHTML:function(){var i,u,t,f,r,n,e;if(location.protocol.match(/file/))return'<h1 style="color:red">Sorry, the Webcam.js Flash fallback does not work from local disk. Please upload it to a web server first.<\/h1>';if(!this.swfURL){for(i="",u=document.getElementsByTagName("script"),t=0,f=u.length;t<f;t++)r=u[t].getAttribute("src"),r&&r.match(/\/webcam(\.min)?\.js/)&&(i=r.replace(/\/webcam(\.min)?\.js.*$/,""),t=f);this.swfURL=i?i+"/webcam.swf":"webcam.swf"}window.localStorage&&!localStorage.getItem("visited")&&(this.params.new_user=1,localStorage.setItem("visited",1));n="";for(e in this.params)n&&(n+="&"),n+=e+"="+escape(this.params[e]);return""+('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="'+this.protocol+'://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="'+this.params.width+'" height="'+this.params.height+'" id="webcam_movie_obj" align="middle"><param name="allowScriptAccess" value="always" /><param name="allowFullScreen" value="false" /><param name="movie" value="'+this.swfURL+'" /><param name="loop" value="false" /><param name="menu" value="false" /><param name="quality" value="best" /><param name="bgcolor" value="#ffffff" /><param name="flashvars" value="'+n+'"/><embed id="webcam_movie_embed" src="'+this.swfURL+'" loop="false" menu="false" quality="best" bgcolor="#ffffff" width="'+this.params.width+'" height="'+this.params.height+'" name="webcam_movie_embed" align="middle" allowScriptAccess="always" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" flashvars="'+n+'"><\/embeLine truncated
|
||||
/*
|
||||
//# sourceMappingURL=Disco-AttachmentUploader.min.js.map
|
||||
*/
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"version":3,
|
||||
"file":"Disco-AttachmentUploader.min.js",
|
||||
"lineCount":1,
|
||||
"mappings":"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 truncated
|
||||
"sources":["/ClientSource/Scripts/Modules/Disco-AttachmentUploader/webcam.js","/ClientSource/Scripts/Modules/Disco-AttachmentUploader/disco-attachmentuploader.js"],
|
||||
"names":["Webcam","location","protocol","match","error","msg","alert","init","navigator","getUserMedia","webkitGetUserMedia","mozGetUserMedia","msGetUserMedia","window","URL","webkitURL","mozURL","msURL","userMedia","userAgent","parseInt","RegExp","$1","attach","elem","video","scaleX","scaleY","canvas","context","self","document","getElementById","querySelector","dispatch","container","params","width","offsetWidth","height","offsetHeight","dest_width","dest_height","force_flash","createElement","setAttribute","style","overflow","webkitTransformOrigin","mozTransformOrigin","msTransformOrigin","oTransformOrigin","transformOrigin","webkitTransform","mozTransform","msTransform","oTransform","transform","appendChild","getContext","stream","src","createObjectURL","loaded","live","innerHTML","getSWFHTML","reset","stop","e","set","arguments","length","key","on","name","callback","replace","toLowerCase","hooks","args","Array","prototype","slice","call","apply","setSWFLocation","url","swfURL","base_url","scpts","idx","len","flashvars","getElementsByTagName","getAttribute","localStorage","getItem","new_user","setItem","escape","getMovie","movie","_snap","snap","drawImage","toDataURL","image_format","jpeg_quality","raw_data","configure","panel","_configure","flashNotify","type","b64ToUint6","nChr","base64DecToArr","sBase64","nBlocksSize","sB64Enc","nInLen","nOutLen","Math","ceil","taBytes","Uint8Array","nMod3","nMod4","nUint24","nOutIdx","nInIdx","charCodeAt","upload","image_data_uri","target_url","form_elem_name","image_fmt","raw_image_data","http","blob","form","XMLHttpRequest","open","addEventListener","lengthComputable","progress","total","onload","http.onload","status","responseText","statusText","Blob","FormData","append","send","$","attachmentUploader","uploadUrl","dropTarget","uploadProgressContainer","_uploadFilesInput","uploadFiles","self.uploadFiles","remove","attr","hide","change","files","target","_uploadFiles","appendTo","click","$document","dragFinished","dragFinishedToken","addClass","removeClass","clearInterval","setTimeout","stopPropagation","preventDefault","originalEvent","dataTransfer","dropEffect","uploadImage","self.uploadImage","captureImage","dataUri","_uploadImage","mediaWidth","mediaHeight","dialog","dialogButtons","close","closest","children","css","find","focus","getFileComments","self.getFileComments","fileName","thumbnailHandler","complete","result","td","img","comments","html","show","text","keypress","which","Upload","Cancel","commentsVal","val","self._uploadImage","imageData","imageBlob","moment","format","_uploadFile","self._uploadFiles","fileList","makeArray","processNextFile","file","shift","indexOf","reader","FileReader","reader.onload","readAsDataURL","self._uploadFile","fileData","formData","xhr","onreadystatechange","xhr.onreadystatechange","readyState","slideUp","Disco","AttachmentUploader"]
|
||||
}
|
||||
+274
@@ -0,0 +1,274 @@
|
||||
/// <reference path="webcam.js" />
|
||||
|
||||
; (function (window, document, $, Webcam) {
|
||||
"use strict";
|
||||
|
||||
var attachmentUploader = function (uploadUrl, dropTarget, uploadProgressContainer) {
|
||||
var self = this;
|
||||
|
||||
self.uploadUrl = uploadUrl;
|
||||
self.dropTarget = dropTarget;
|
||||
self.uploadProgressContainer = uploadProgressContainer;
|
||||
|
||||
// #region File Selection Support
|
||||
self._uploadFilesInput = null;
|
||||
self.uploadFiles = function () {
|
||||
if (!!self._uploadFilesInput) {
|
||||
self._uploadFilesInput.remove();
|
||||
}
|
||||
self._uploadFilesInput = $('<input>');
|
||||
self._uploadFilesInput.attr({
|
||||
type: 'file',
|
||||
multiple: 'multiple',
|
||||
title: 'Disco File Uploading'
|
||||
})
|
||||
.hide()
|
||||
.change(function (e) {
|
||||
var files = e.target.files;
|
||||
if (!!files && files.length > 0) {
|
||||
self._uploadFiles(files);
|
||||
}
|
||||
self._uploadFilesInput.remove();
|
||||
}).appendTo(self.uploadProgressContainer)
|
||||
.click();
|
||||
};
|
||||
// #endregion
|
||||
|
||||
// #region File Drop Support
|
||||
if (!!self.dropTarget) {
|
||||
var $document = $(document);
|
||||
var dragFinished = false;
|
||||
var dragFinishedToken = null;
|
||||
$document.on('dragover', function () {
|
||||
self.dropTarget.addClass('dragHighlight');
|
||||
self.dropTarget.removeClass('dragHover');
|
||||
dragFinished = false;
|
||||
});
|
||||
$document.on('dragleave', function () {
|
||||
if (!!dragFinishedToken)
|
||||
window.clearInterval(dragFinishedToken);
|
||||
|
||||
dragFinished = true;
|
||||
window.setTimeout(function () {
|
||||
if (dragFinished)
|
||||
self.dropTarget.removeClass('dragHighlight');
|
||||
dragFinishedToken = null;
|
||||
}, 200);
|
||||
});
|
||||
|
||||
self.dropTarget.on('dragover', function (e) {
|
||||
e.stopPropagation();
|
||||
e.preventDefault();
|
||||
|
||||
self.dropTarget.addClass('dragHover');
|
||||
|
||||
dragFinished = false;
|
||||
|
||||
e.originalEvent.dataTransfer.dropEffect = 'copy';
|
||||
});
|
||||
|
||||
self.dropTarget.on('drop', function (e) {
|
||||
e.stopPropagation();
|
||||
e.preventDefault();
|
||||
|
||||
dragFinished = true;
|
||||
self.dropTarget.removeClass('dragHighlight');
|
||||
|
||||
var files = e.originalEvent.dataTransfer.files;
|
||||
self._uploadFiles(files);
|
||||
});
|
||||
}
|
||||
// #endregion
|
||||
|
||||
// #region Webcam Support
|
||||
self.uploadImage = function () {
|
||||
var mediaWidth = 720;
|
||||
var mediaHeight = 540;
|
||||
var mediaStream;
|
||||
|
||||
// Setup Dialog
|
||||
var dialog = $('<div>')
|
||||
.attr({
|
||||
id: 'disco_attachmentUpload_imageDialog',
|
||||
title: 'Upload Image',
|
||||
'class': 'dialog disco-attachmentUpload-imageDialog'
|
||||
});
|
||||
dialog.dialog({
|
||||
autoOpen: true,
|
||||
draggable: false,
|
||||
modal: true,
|
||||
resizable: false,
|
||||
width: mediaWidth,
|
||||
height: mediaHeight,
|
||||
close: function () {
|
||||
Webcam.reset();
|
||||
window.setTimeout(function () {
|
||||
dialog.dialog('destroy');
|
||||
}, 1);
|
||||
}
|
||||
}).closest('.ui-dialog').children('.ui-dialog-titlebar').css('border-bottom', 'none');
|
||||
|
||||
var dialogButtons = [{
|
||||
text: 'Capture',
|
||||
click: captureImage
|
||||
}];
|
||||
|
||||
// Capturing
|
||||
function captureImage() {
|
||||
var dataUri = Webcam.snap();
|
||||
self._uploadImage(dataUri);
|
||||
}
|
||||
Webcam.set({
|
||||
width: mediaWidth,
|
||||
height: mediaHeight,
|
||||
dest_width: mediaWidth * 1.5,
|
||||
dest_height: mediaHeight * 1.5,
|
||||
jpeg_quality: 95
|
||||
});
|
||||
Webcam.setSWFLocation('/ClientSource/Scripts/Modules/Disco-AttachmentUploader/webcam.swf');
|
||||
Webcam.on('error', function (error) {
|
||||
alert(error);
|
||||
dialog.dialog('close');
|
||||
});
|
||||
Webcam.on('live', function () {
|
||||
dialog.dialog('option', 'buttons', dialogButtons);
|
||||
dialog.closest('.ui-dialog')
|
||||
.children('.ui-dialog-buttonpane')
|
||||
.css('margin-top', 0)
|
||||
.find('.ui-button:first').focus();
|
||||
});
|
||||
Webcam.attach(dialog.attr('id'));
|
||||
};
|
||||
// #endregion
|
||||
|
||||
// #region Helpers
|
||||
self.getFileComments = function (fileName, thumbnailHandler, complete) {
|
||||
var result = false;
|
||||
var dialog = $('<div>')
|
||||
.attr({
|
||||
title: 'Upload File',
|
||||
'class': 'dialog disco-attachmentUpload-commentDialog'
|
||||
});
|
||||
dialog.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>');
|
||||
|
||||
if (!!thumbnailHandler) {
|
||||
var td = dialog.find('td.thumbnail');
|
||||
var img = td.find('img');
|
||||
if (thumbnailHandler(img))
|
||||
td.show();
|
||||
}
|
||||
|
||||
dialog.find('td.filename').text(fileName).attr('title', fileName);
|
||||
var comments = dialog.find('input.comments')
|
||||
.keypress(function (e) {
|
||||
if (e.which === 13) {
|
||||
result = true;
|
||||
dialog.dialog("close");
|
||||
}
|
||||
});
|
||||
|
||||
dialog.dialog({
|
||||
resizable: false,
|
||||
width: 400,
|
||||
modal: true,
|
||||
autoOpen: true,
|
||||
buttons: {
|
||||
"Upload": function () {
|
||||
result = true;
|
||||
dialog.dialog("close");
|
||||
},
|
||||
Cancel: function () {
|
||||
dialog.dialog("close");
|
||||
}
|
||||
},
|
||||
close: function () {
|
||||
var commentsVal = comments.val();
|
||||
dialog.dialog('destroy').remove();
|
||||
complete(result, commentsVal);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
self._uploadImage = function (dataUri) {
|
||||
var imageData = dataUri.replace(/^data\:image\/\w+\;base64\,/, '');
|
||||
|
||||
var imageBlob = new Blob([Webcam.base64DecToArr(imageData)], { type: 'image/jpeg' });
|
||||
|
||||
var fileName = 'CapturedImage-' + moment().format('YYYYMMDD-HHmmss') + '.jpg';
|
||||
|
||||
self.getFileComments(fileName, function (img) {
|
||||
img.attr('src', dataUri);
|
||||
return true;
|
||||
}, function (result, comments) {
|
||||
if (!result)
|
||||
return;
|
||||
|
||||
self._uploadFile(imageBlob, fileName, comments);
|
||||
});
|
||||
};
|
||||
|
||||
self._uploadFiles = function (fileList) {
|
||||
var files = $.makeArray(fileList);
|
||||
|
||||
var processNextFile = function () {
|
||||
if (!files || files.length === 0)
|
||||
return;
|
||||
|
||||
var file = files.shift();
|
||||
self.getFileComments(file.name, function (img) {
|
||||
if (!!file.type && file.type.indexOf('image/') === 0) {
|
||||
var reader = new FileReader();
|
||||
reader.onload = function (e) {
|
||||
img.attr('src', e.target.result);
|
||||
};
|
||||
reader.readAsDataURL(file);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}, function (result, comments) {
|
||||
if (!result)
|
||||
return;
|
||||
|
||||
self._uploadFile(file, file.name, comments);
|
||||
|
||||
processNextFile();
|
||||
});
|
||||
};
|
||||
processNextFile();
|
||||
};
|
||||
|
||||
self._uploadFile = function (fileData, fileName, comments) {
|
||||
var formData = new FormData();
|
||||
var xhr = new XMLHttpRequest();
|
||||
var progress = $('<div>')
|
||||
.append($('<i>').addClass('fa fa-cog fa-spin'))
|
||||
.append($('<span>').text('Uploading: ' + fileName))
|
||||
.appendTo(self.uploadProgressContainer);
|
||||
|
||||
formData.append('Comments', comments);
|
||||
formData.append('File', fileData, fileName);
|
||||
|
||||
xhr.open("POST", self.uploadUrl, true);
|
||||
xhr.onreadystatechange = function () {
|
||||
if (xhr.readyState === 4 && xhr.status === 200) {
|
||||
if (xhr.status !== 200) {
|
||||
alert('Error Uploading [' + fileName + ']: ' + xhr.responseText);
|
||||
}
|
||||
progress.slideUp(400, function () {
|
||||
progress.remove();
|
||||
});
|
||||
}
|
||||
};
|
||||
xhr.send(formData);
|
||||
};
|
||||
// #endregion
|
||||
|
||||
return self;
|
||||
};
|
||||
|
||||
if (!document.Disco) {
|
||||
document.Disco = {};
|
||||
}
|
||||
document.Disco.AttachmentUploader = attachmentUploader;
|
||||
|
||||
}(this, document, $, Webcam));
|
||||
@@ -0,0 +1,398 @@
|
||||
// WebcamJS v1.0
|
||||
// Webcam library for capturing JPEG/PNG images in JavaScript
|
||||
// Attempts getUserMedia, falls back to Flash
|
||||
// Author: Joseph Huckaby: http://github.com/jhuckaby
|
||||
// Based on JPEGCam: http://code.google.com/p/jpegcam/
|
||||
// Copyright (c) 2012 Joseph Huckaby
|
||||
// Licensed under the MIT License
|
||||
|
||||
/* Usage:
|
||||
<div id="my_camera" style="width:320px; height:240px;"></div>
|
||||
<div id="my_result"></div>
|
||||
|
||||
<script language="JavaScript">
|
||||
Webcam.attach( '#my_camera' );
|
||||
|
||||
function take_snapshot() {
|
||||
var data_uri = Webcam.snap();
|
||||
document.getElementById('my_result').innerHTML =
|
||||
'<img src="'+data_uri+'"/>';
|
||||
}
|
||||
</script>
|
||||
|
||||
<a href="javascript:void(take_snapshot())">Take Snapshot</a>
|
||||
*/
|
||||
|
||||
var Webcam = {
|
||||
version: '1.0.0',
|
||||
|
||||
// globals
|
||||
protocol: location.protocol.match(/https/i) ? 'https' : 'http',
|
||||
swfURL: '', // URI to webcam.swf movie (defaults to cwd)
|
||||
loaded: false, // true when webcam movie finishes loading
|
||||
live: false, // true when webcam is initialized and ready to snap
|
||||
userMedia: true, // true when getUserMedia is supported natively
|
||||
|
||||
params: {
|
||||
width: 0,
|
||||
height: 0,
|
||||
dest_width: 0, // size of captured image
|
||||
dest_height: 0, // these default to width/height
|
||||
image_format: 'jpeg', // image format (may be jpeg or png)
|
||||
jpeg_quality: 90, // jpeg image quality from 0 (worst) to 100 (best)
|
||||
force_flash: false // force flash mode
|
||||
},
|
||||
|
||||
hooks: {
|
||||
load: null,
|
||||
live: null,
|
||||
uploadcomplete: null,
|
||||
uploadprogress: null,
|
||||
error: function(msg) { alert("Webcam.js Error: " + msg); }
|
||||
}, // callback hook functions
|
||||
|
||||
init: function() {
|
||||
// initialize, check for getUserMedia support
|
||||
navigator.getUserMedia = navigator.getUserMedia || navigator.webkitGetUserMedia || navigator.mozGetUserMedia || navigator.msGetUserMedia;
|
||||
window.URL = window.URL || window.webkitURL || window.mozURL || window.msURL;
|
||||
|
||||
this.userMedia = this.userMedia && !!navigator.getUserMedia && !!window.URL;
|
||||
|
||||
// Older versions of firefox (< 21) apparently claim support but user media does not actually work
|
||||
if (navigator.userAgent.match(/Firefox\D+(\d+)/)) {
|
||||
if (parseInt(RegExp.$1, 10) < 21) this.userMedia = null;
|
||||
}
|
||||
},
|
||||
|
||||
attach: function(elem) {
|
||||
// create webcam preview and attach to DOM element
|
||||
// pass in actual DOM reference, ID, or CSS selector
|
||||
if (typeof(elem) == 'string') {
|
||||
elem = document.getElementById(elem) || document.querySelector(elem);
|
||||
}
|
||||
if (!elem) {
|
||||
return this.dispatch('error', "Could not locate DOM element to attach to.");
|
||||
}
|
||||
|
||||
this.container = elem;
|
||||
if (!this.params.width) this.params.width = elem.offsetWidth;
|
||||
if (!this.params.height) this.params.height = elem.offsetHeight;
|
||||
|
||||
// set defaults for dest_width / dest_height if not set
|
||||
if (!this.params.dest_width) this.params.dest_width = this.params.width;
|
||||
if (!this.params.dest_height) this.params.dest_height = this.params.height;
|
||||
|
||||
// if force_flash is set, disable userMedia
|
||||
if (this.params.force_flash) this.userMedia = null;
|
||||
|
||||
if (this.userMedia) {
|
||||
// setup webcam video container
|
||||
var video = document.createElement('video');
|
||||
video.setAttribute('autoplay', 'autoplay');
|
||||
video.style.width = '' + this.params.dest_width + 'px';
|
||||
video.style.height = '' + this.params.dest_height + 'px';
|
||||
|
||||
// adjust scale if dest_width or dest_height is different
|
||||
var scaleX = this.params.width / this.params.dest_width;
|
||||
var scaleY = this.params.height / this.params.dest_height;
|
||||
|
||||
if ((scaleX != 1.0) || (scaleY != 1.0)) {
|
||||
elem.style.overflow = 'visible';
|
||||
video.style.webkitTransformOrigin = '0px 0px';
|
||||
video.style.mozTransformOrigin = '0px 0px';
|
||||
video.style.msTransformOrigin = '0px 0px';
|
||||
video.style.oTransformOrigin = '0px 0px';
|
||||
video.style.transformOrigin = '0px 0px';
|
||||
video.style.webkitTransform = 'scaleX('+scaleX+') scaleY('+scaleY+')';
|
||||
video.style.mozTransform = 'scaleX('+scaleX+') scaleY('+scaleY+')';
|
||||
video.style.msTransform = 'scaleX('+scaleX+') scaleY('+scaleY+')';
|
||||
video.style.oTransform = 'scaleX('+scaleX+') scaleY('+scaleY+')';
|
||||
video.style.transform = 'scaleX('+scaleX+') scaleY('+scaleY+')';
|
||||
}
|
||||
|
||||
// add video element to dom
|
||||
elem.appendChild( video );
|
||||
this.video = video;
|
||||
|
||||
// create offscreen canvas element to hold pixels later on
|
||||
var canvas = document.createElement('canvas');
|
||||
canvas.width = this.params.dest_width;
|
||||
canvas.height = this.params.dest_height;
|
||||
var context = canvas.getContext('2d');
|
||||
this.context = context;
|
||||
this.canvas = canvas;
|
||||
|
||||
// ask user for access to their camera
|
||||
var self = this;
|
||||
navigator.getUserMedia({
|
||||
"audio": false,
|
||||
"video": true
|
||||
},
|
||||
function(stream) {
|
||||
// got access, attach stream to video
|
||||
video.src = window.URL.createObjectURL( stream ) || stream;
|
||||
Webcam.stream = stream;
|
||||
Webcam.loaded = true;
|
||||
Webcam.live = true;
|
||||
Webcam.dispatch('load');
|
||||
Webcam.dispatch('live');
|
||||
},
|
||||
function(err) {
|
||||
return self.dispatch('error', "Could not access webcam.");
|
||||
});
|
||||
}
|
||||
else {
|
||||
// flash fallback
|
||||
elem.innerHTML = this.getSWFHTML();
|
||||
}
|
||||
},
|
||||
|
||||
reset: function() {
|
||||
// shutdown camera, reset to potentially attach again
|
||||
if (this.userMedia) {
|
||||
try { this.stream.stop(); } catch (e) {;}
|
||||
delete this.stream;
|
||||
delete this.canvas;
|
||||
delete this.context;
|
||||
delete this.video;
|
||||
}
|
||||
|
||||
this.container.innerHTML = '';
|
||||
delete this.container;
|
||||
|
||||
this.loaded = false;
|
||||
this.live = false;
|
||||
},
|
||||
|
||||
set: function() {
|
||||
// set one or more params
|
||||
// variable argument list: 1 param = hash, 2 params = key, value
|
||||
if (arguments.length == 1) {
|
||||
for (var key in arguments[0]) {
|
||||
this.params[key] = arguments[0][key];
|
||||
}
|
||||
}
|
||||
else {
|
||||
this.params[ arguments[0] ] = arguments[1];
|
||||
}
|
||||
},
|
||||
|
||||
on: function(name, callback) {
|
||||
// set callback hook
|
||||
// supported hooks: onLoad, onError, onLive
|
||||
name = name.replace(/^on/i, '').toLowerCase();
|
||||
|
||||
if (typeof(this.hooks[name]) == 'undefined')
|
||||
throw "Event type not supported: " + name;
|
||||
|
||||
this.hooks[name] = callback;
|
||||
},
|
||||
|
||||
dispatch: function() {
|
||||
// fire hook callback, passing optional value to it
|
||||
var name = arguments[0].replace(/^on/i, '').toLowerCase();
|
||||
var args = Array.prototype.slice.call(arguments, 1);
|
||||
|
||||
if (this.hooks[name]) {
|
||||
if (typeof(this.hooks[name]) == 'function') {
|
||||
// callback is function reference, call directly
|
||||
this.hooks[name].apply(this, args);
|
||||
}
|
||||
else if (typeof(this.hooks[name]) == 'array') {
|
||||
// callback is PHP-style object instance method
|
||||
this.hooks[name][0][this.hooks[name][1]].apply(this.hooks[name][0], args);
|
||||
}
|
||||
else if (window[this.hooks[name]]) {
|
||||
// callback is global function name
|
||||
window[ this.hooks[name] ].apply(window, args);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false; // no hook defined
|
||||
},
|
||||
|
||||
setSWFLocation: function(url) {
|
||||
// set location of SWF movie (defaults to webcam.swf in cwd)
|
||||
this.swfURL = url;
|
||||
},
|
||||
|
||||
getSWFHTML: function() {
|
||||
// Return HTML for embedding flash based webcam capture movie
|
||||
var html = '';
|
||||
|
||||
// make sure we aren't running locally (flash doesn't work)
|
||||
if (location.protocol.match(/file/)) {
|
||||
return '<h1 style="color:red">Sorry, the Webcam.js Flash fallback does not work from local disk. Please upload it to a web server first.</h1>';
|
||||
}
|
||||
|
||||
// set default swfURL if not explicitly set
|
||||
if (!this.swfURL) {
|
||||
// find our script tag, and use that base URL
|
||||
var base_url = '';
|
||||
var scpts = document.getElementsByTagName('script');
|
||||
for (var idx = 0, len = scpts.length; idx < len; idx++) {
|
||||
var src = scpts[idx].getAttribute('src');
|
||||
if (src && src.match(/\/webcam(\.min)?\.js/)) {
|
||||
base_url = src.replace(/\/webcam(\.min)?\.js.*$/, '');
|
||||
idx = len;
|
||||
}
|
||||
}
|
||||
if (base_url) this.swfURL = base_url + '/webcam.swf';
|
||||
else this.swfURL = 'webcam.swf';
|
||||
}
|
||||
|
||||
// if this is the user's first visit, set flashvar so flash privacy settings panel is shown first
|
||||
if (window.localStorage && !localStorage.getItem('visited')) {
|
||||
this.params.new_user = 1;
|
||||
localStorage.setItem('visited', 1);
|
||||
}
|
||||
|
||||
// construct flashvars string
|
||||
var flashvars = '';
|
||||
for (var key in this.params) {
|
||||
if (flashvars) flashvars += '&';
|
||||
flashvars += key + '=' + escape(this.params[key]);
|
||||
}
|
||||
|
||||
html += '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="'+this.protocol+'://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="'+this.params.width+'" height="'+this.params.height+'" id="webcam_movie_obj" align="middle"><param name="allowScriptAccess" value="always" /><param name="allowFullScreen" value="false" /><param name="movie" value="'+this.swfURL+'" /><param name="loop" value="false" /><param name="menu" value="false" /><param name="quality" value="best" /><param name="bgcolor" value="#ffffff" /><param name="flashvars" value="'+flashvars+'"/><embed id="webcam_movie_embed" src="'+this.swfURL+'" loop="false" menu="false" quality="best" bgcolor="#ffffff" width="'+this.params.width+'" height="'+this.params.height+'" name="webcam_movie_embed" align="middle" allowScriptAccess="always" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" flashvars="'+flashvars+'"></embed></object>';
|
||||
|
||||
return html;
|
||||
},
|
||||
|
||||
getMovie: function() {
|
||||
// get reference to movie object/embed in DOM
|
||||
if (!this.loaded) return this.dispatch('error', "Flash Movie is not loaded yet");
|
||||
var movie = document.getElementById('webcam_movie_obj');
|
||||
if (!movie || !movie._snap) movie = document.getElementById('webcam_movie_embed');
|
||||
if (!movie) this.dispatch('error', "Cannot locate Flash movie in DOM");
|
||||
return movie;
|
||||
},
|
||||
|
||||
snap: function() {
|
||||
// take snapshot and return image data uri
|
||||
if (!this.loaded) return this.dispatch('error', "Webcam is not loaded yet");
|
||||
if (!this.live) return this.dispatch('error', "Webcam is not live yet");
|
||||
|
||||
if (this.userMedia) {
|
||||
// native implementation
|
||||
this.context.drawImage(this.video, 0, 0, this.params.dest_width, this.params.dest_height);
|
||||
return this.canvas.toDataURL('image/' + this.params.image_format, this.params.jpeg_quality / 100 );
|
||||
}
|
||||
else {
|
||||
// flash fallback
|
||||
var raw_data = this.getMovie()._snap();
|
||||
return 'data:image/'+this.params.image_format+';base64,' + raw_data;
|
||||
}
|
||||
},
|
||||
|
||||
configure: function(panel) {
|
||||
// open flash configuration panel -- specify tab name:
|
||||
// "camera", "privacy", "default", "localStorage", "microphone", "settingsManager"
|
||||
if (!panel) panel = "camera";
|
||||
this.getMovie()._configure(panel);
|
||||
},
|
||||
|
||||
flashNotify: function(type, msg) {
|
||||
// receive notification from flash about event
|
||||
switch (type) {
|
||||
case 'flashLoadComplete':
|
||||
// movie loaded successfully
|
||||
this.loaded = true;
|
||||
this.dispatch('load');
|
||||
break;
|
||||
|
||||
case 'cameraLive':
|
||||
// camera is live and ready to snap
|
||||
this.live = true;
|
||||
this.dispatch('live');
|
||||
break;
|
||||
|
||||
case 'error':
|
||||
// Flash error
|
||||
this.dispatch('error', msg);
|
||||
break;
|
||||
|
||||
default:
|
||||
// catch-all event, just in case
|
||||
// console.log("webcam flash_notify: " + type + ": " + msg);
|
||||
break;
|
||||
}
|
||||
},
|
||||
|
||||
b64ToUint6: function(nChr) {
|
||||
// convert base64 encoded character to 6-bit integer
|
||||
// from: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Base64_encoding_and_decoding
|
||||
return nChr > 64 && nChr < 91 ? nChr - 65
|
||||
: nChr > 96 && nChr < 123 ? nChr - 71
|
||||
: nChr > 47 && nChr < 58 ? nChr + 4
|
||||
: nChr === 43 ? 62 : nChr === 47 ? 63 : 0;
|
||||
},
|
||||
|
||||
base64DecToArr: function(sBase64, nBlocksSize) {
|
||||
// convert base64 encoded string to Uintarray
|
||||
// from: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Base64_encoding_and_decoding
|
||||
var sB64Enc = sBase64.replace(/[^A-Za-z0-9\+\/]/g, ""), nInLen = sB64Enc.length,
|
||||
nOutLen = nBlocksSize ? Math.ceil((nInLen * 3 + 1 >> 2) / nBlocksSize) * nBlocksSize : nInLen * 3 + 1 >> 2,
|
||||
taBytes = new Uint8Array(nOutLen);
|
||||
|
||||
for (var nMod3, nMod4, nUint24 = 0, nOutIdx = 0, nInIdx = 0; nInIdx < nInLen; nInIdx++) {
|
||||
nMod4 = nInIdx & 3;
|
||||
nUint24 |= this.b64ToUint6(sB64Enc.charCodeAt(nInIdx)) << 18 - 6 * nMod4;
|
||||
if (nMod4 === 3 || nInLen - nInIdx === 1) {
|
||||
for (nMod3 = 0; nMod3 < 3 && nOutIdx < nOutLen; nMod3++, nOutIdx++) {
|
||||
taBytes[nOutIdx] = nUint24 >>> (16 >>> nMod3 & 24) & 255;
|
||||
}
|
||||
nUint24 = 0;
|
||||
}
|
||||
}
|
||||
return taBytes;
|
||||
},
|
||||
|
||||
upload: function(image_data_uri, target_url, callback) {
|
||||
// submit image data to server using binary AJAX
|
||||
if (callback) Webcam.on('uploadComplete', callback);
|
||||
var form_elem_name = 'webcam';
|
||||
|
||||
// detect image format from within image_data_uri
|
||||
var image_fmt = '';
|
||||
if (image_data_uri.match(/^data\:image\/(\w+)/))
|
||||
image_fmt = RegExp.$1;
|
||||
else
|
||||
throw "Cannot locate image format in Data URI";
|
||||
|
||||
// extract raw base64 data from Data URI
|
||||
var raw_image_data = image_data_uri.replace(/^data\:image\/\w+\;base64\,/, '');
|
||||
|
||||
// contruct use AJAX object
|
||||
var http = new XMLHttpRequest();
|
||||
http.open("POST", target_url, true);
|
||||
|
||||
// setup progress events
|
||||
if (http.upload && http.upload.addEventListener) {
|
||||
http.upload.addEventListener( 'progress', function(e) {
|
||||
if (e.lengthComputable) {
|
||||
var progress = e.loaded / e.total;
|
||||
Webcam.dispatch('uploadProgress', progress, e);
|
||||
}
|
||||
}, false );
|
||||
}
|
||||
|
||||
// completion handler
|
||||
http.onload = function() {
|
||||
Webcam.dispatch('uploadComplete', http.status, http.responseText, http.statusText);
|
||||
};
|
||||
|
||||
// create a blob and decode our base64 to binary
|
||||
var blob = new Blob( [ this.base64DecToArr(raw_image_data) ], {type: 'image/'+image_fmt} );
|
||||
|
||||
// stuff into a form, so servers can easily receive it as a standard file upload
|
||||
var form = new FormData();
|
||||
form.append( form_elem_name, blob, form_elem_name+"."+image_fmt.replace(/e/, '') );
|
||||
|
||||
// send data to server
|
||||
http.send(form);
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
Webcam.init();
|
||||
Binary file not shown.
@@ -1,414 +0,0 @@
|
||||
///#source 1 1 /ClientSource/Scripts/Modules/Silverlight/Silverlight.js
|
||||
if (!window.Silverlight) {
|
||||
window.Silverlight = {};
|
||||
}
|
||||
|
||||
// Silverlight control instance counter for memory mgt
|
||||
Silverlight._silverlightCount = 0;
|
||||
Silverlight.fwlinkRoot = 'http://go2.microsoft.com/fwlink/?LinkID=';
|
||||
Silverlight.onGetSilverlight = null;
|
||||
Silverlight.onSilverlightInstalled = function () { window.location.reload(false); };
|
||||
|
||||
//////////////////////////////////////////////////////////////////
|
||||
// isInstalled, checks to see if the correct version is installed
|
||||
//////////////////////////////////////////////////////////////////
|
||||
Silverlight.isInstalled = function (version) {
|
||||
var isVersionSupported = false;
|
||||
var container = null;
|
||||
|
||||
try {
|
||||
var control = null;
|
||||
|
||||
try {
|
||||
control = new ActiveXObject('AgControl.AgControl');
|
||||
if (version == null) {
|
||||
isVersionSupported = true;
|
||||
}
|
||||
else if (control.IsVersionSupported(version)) {
|
||||
isVersionSupported = true;
|
||||
}
|
||||
control = null;
|
||||
}
|
||||
catch (e) {
|
||||
var plugin = navigator.plugins["Silverlight Plug-In"];
|
||||
if (plugin) {
|
||||
if (version === null) {
|
||||
isVersionSupported = true;
|
||||
}
|
||||
else {
|
||||
var actualVer = plugin.description;
|
||||
if (actualVer === "1.0.30226.2")
|
||||
actualVer = "2.0.30226.2";
|
||||
var actualVerArray = actualVer.split(".");
|
||||
while (actualVerArray.length > 3) {
|
||||
actualVerArray.pop();
|
||||
}
|
||||
while (actualVerArray.length < 4) {
|
||||
actualVerArray.push(0);
|
||||
}
|
||||
var reqVerArray = version.split(".");
|
||||
while (reqVerArray.length > 4) {
|
||||
reqVerArray.pop();
|
||||
}
|
||||
|
||||
var requiredVersionPart;
|
||||
var actualVersionPart
|
||||
var index = 0;
|
||||
|
||||
|
||||
do {
|
||||
requiredVersionPart = parseInt(reqVerArray[index]);
|
||||
actualVersionPart = parseInt(actualVerArray[index]);
|
||||
index++;
|
||||
}
|
||||
while (index < reqVerArray.length && requiredVersionPart === actualVersionPart);
|
||||
|
||||
if (requiredVersionPart <= actualVersionPart && !isNaN(requiredVersionPart)) {
|
||||
isVersionSupported = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (e) {
|
||||
isVersionSupported = false;
|
||||
}
|
||||
if (container) {
|
||||
document.body.removeChild(container);
|
||||
}
|
||||
|
||||
return isVersionSupported;
|
||||
}
|
||||
Silverlight.WaitForInstallCompletion = function () {
|
||||
if (!Silverlight.isBrowserRestartRequired && Silverlight.onSilverlightInstalled) {
|
||||
try {
|
||||
navigator.plugins.refresh();
|
||||
}
|
||||
catch (e) {
|
||||
}
|
||||
if (Silverlight.isInstalled(null)) {
|
||||
Silverlight.onSilverlightInstalled();
|
||||
}
|
||||
else {
|
||||
setTimeout(Silverlight.WaitForInstallCompletion, 3000);
|
||||
}
|
||||
}
|
||||
}
|
||||
Silverlight.__startup = function () {
|
||||
Silverlight.isBrowserRestartRequired = Silverlight.isInstalled(null);//(!window.ActiveXObject || Silverlight.isInstalled(null));
|
||||
if (!Silverlight.isBrowserRestartRequired) {
|
||||
Silverlight.WaitForInstallCompletion();
|
||||
}
|
||||
if (window.removeEventListener) {
|
||||
window.removeEventListener('load', Silverlight.__startup, false);
|
||||
}
|
||||
else {
|
||||
window.detachEvent('onload', Silverlight.__startup);
|
||||
}
|
||||
}
|
||||
|
||||
if (window.addEventListener) {
|
||||
window.addEventListener('load', Silverlight.__startup, false);
|
||||
}
|
||||
else {
|
||||
window.attachEvent('onload', Silverlight.__startup);
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// createObject(); Params:
|
||||
// parentElement of type Element, the parent element of the Silverlight Control
|
||||
// source of type String
|
||||
// id of type string
|
||||
// properties of type String, object literal notation { name:value, name:value, name:value},
|
||||
// current properties are: width, height, background, framerate, isWindowless, enableHtmlAccess, inplaceInstallPrompt: all are of type string
|
||||
// events of type String, object literal notation { name:value, name:value, name:value},
|
||||
// current events are onLoad onError, both are type string
|
||||
// initParams of type Object or object literal notation { name:value, name:value, name:value}
|
||||
// userContext of type Object
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
Silverlight.createObject = function (source, parentElement, id, properties, events, initParams, userContext) {
|
||||
var slPluginHelper = new Object();
|
||||
var slProperties = properties;
|
||||
var slEvents = events;
|
||||
|
||||
slPluginHelper.version = slProperties.version;
|
||||
slProperties.source = source;
|
||||
slPluginHelper.alt = slProperties.alt;
|
||||
|
||||
//rename properties to their tag property names
|
||||
if (initParams)
|
||||
slProperties.initParams = initParams;
|
||||
if (slProperties.isWindowless && !slProperties.windowless)
|
||||
slProperties.windowless = slProperties.isWindowless;
|
||||
if (slProperties.framerate && !slProperties.maxFramerate)
|
||||
slProperties.maxFramerate = slProperties.framerate;
|
||||
if (id && !slProperties.id)
|
||||
slProperties.id = id;
|
||||
|
||||
// remove elements which are not to be added to the instantiation tag
|
||||
delete slProperties.ignoreBrowserVer;
|
||||
delete slProperties.inplaceInstallPrompt;
|
||||
delete slProperties.version;
|
||||
delete slProperties.isWindowless;
|
||||
delete slProperties.framerate;
|
||||
delete slProperties.data;
|
||||
delete slProperties.src;
|
||||
delete slProperties.alt;
|
||||
|
||||
|
||||
// detect that the correct version of Silverlight is installed, else display install
|
||||
|
||||
if (Silverlight.isInstalled(slPluginHelper.version)) {
|
||||
//move unknown events to the slProperties array
|
||||
for (var name in slEvents) {
|
||||
if (slEvents[name]) {
|
||||
if (name == "onLoad" && typeof slEvents[name] == "function" && slEvents[name].length != 1) {
|
||||
var onLoadHandler = slEvents[name];
|
||||
slEvents[name] = function (sender) { return onLoadHandler(document.getElementById(id), userContext, sender) };
|
||||
}
|
||||
var handlerName = Silverlight.__getHandlerName(slEvents[name]);
|
||||
if (handlerName != null) {
|
||||
slProperties[name] = handlerName;
|
||||
slEvents[name] = null;
|
||||
}
|
||||
else {
|
||||
throw "typeof events." + name + " must be 'function' or 'string'";
|
||||
}
|
||||
}
|
||||
}
|
||||
slPluginHTML = Silverlight.buildHTML(slProperties);
|
||||
}
|
||||
//The control could not be instantiated. Show the installation prompt
|
||||
else {
|
||||
slPluginHTML = Silverlight.buildPromptHTML(slPluginHelper);
|
||||
}
|
||||
|
||||
// insert or return the HTML
|
||||
if (parentElement) {
|
||||
parentElement.innerHTML = slPluginHTML;
|
||||
}
|
||||
else {
|
||||
return slPluginHTML;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// create HTML that instantiates the control
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
Silverlight.buildHTML = function (slProperties) {
|
||||
var htmlBuilder = [];
|
||||
|
||||
htmlBuilder.push('<object type=\"application/x-silverlight\" data="data:application/x-silverlight,"');
|
||||
if (slProperties.id != null) {
|
||||
htmlBuilder.push(' id="' + slProperties.id + '"');
|
||||
}
|
||||
if (slProperties.width != null) {
|
||||
htmlBuilder.push(' width="' + slProperties.width + '"');
|
||||
}
|
||||
if (slProperties.height != null) {
|
||||
htmlBuilder.push(' height="' + slProperties.height + '"');
|
||||
}
|
||||
htmlBuilder.push(' >');
|
||||
|
||||
delete slProperties.id;
|
||||
delete slProperties.width;
|
||||
delete slProperties.height;
|
||||
|
||||
for (var name in slProperties) {
|
||||
if (slProperties[name]) {
|
||||
htmlBuilder.push('<param name="' + Silverlight.HtmlAttributeEncode(name) + '" value="' + Silverlight.HtmlAttributeEncode(slProperties[name]) + '" />');
|
||||
}
|
||||
}
|
||||
htmlBuilder.push('<\/object>');
|
||||
return htmlBuilder.join('');
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
// createObjectEx, takes a single parameter of all createObject parameters enclosed in {}
|
||||
Silverlight.createObjectEx = function (params) {
|
||||
var parameters = params;
|
||||
var html = Silverlight.createObject(parameters.source, parameters.parentElement, parameters.id, parameters.properties, parameters.events, parameters.initParams, parameters.context);
|
||||
if (parameters.parentElement == null) {
|
||||
return html;
|
||||
}
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Builds the HTML to prompt the user to download and install Silverlight
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////
|
||||
Silverlight.buildPromptHTML = function (slPluginHelper) {
|
||||
var slPluginHTML = "";
|
||||
var urlRoot = Silverlight.fwlinkRoot;
|
||||
var shortVer = slPluginHelper.version;
|
||||
if (slPluginHelper.alt) {
|
||||
slPluginHTML = slPluginHelper.alt;
|
||||
}
|
||||
else {
|
||||
if (!shortVer) {
|
||||
shortVer = "";
|
||||
}
|
||||
slPluginHTML = "<a href='javascript:Silverlight.getSilverlight(\"{1}\");' style='text-decoration: none;'><img src='{2}' alt='Get Microsoft Silverlight' style='border-style: none'/></a>";
|
||||
slPluginHTML = slPluginHTML.replace('{1}', shortVer);
|
||||
slPluginHTML = slPluginHTML.replace('{2}', urlRoot + '108181');
|
||||
}
|
||||
|
||||
return slPluginHTML;
|
||||
}
|
||||
|
||||
|
||||
Silverlight.getSilverlight = function (version) {
|
||||
if (Silverlight.onGetSilverlight) {
|
||||
Silverlight.onGetSilverlight();
|
||||
}
|
||||
|
||||
var shortVer = "";
|
||||
var reqVerArray = String(version).split(".");
|
||||
if (reqVerArray.length > 1) {
|
||||
var majorNum = parseInt(reqVerArray[0]);
|
||||
if (isNaN(majorNum) || majorNum < 2) {
|
||||
shortVer = "1.0";
|
||||
}
|
||||
else {
|
||||
shortVer = reqVerArray[0] + '.' + reqVerArray[1];
|
||||
}
|
||||
}
|
||||
|
||||
var verArg = "";
|
||||
|
||||
if (shortVer.match(/^\d+\056\d+$/)) {
|
||||
verArg = "&v=" + shortVer;
|
||||
}
|
||||
|
||||
Silverlight.followFWLink("114576" + verArg);
|
||||
}
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////
|
||||
/// Navigates to a url based on fwlinkid
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////
|
||||
Silverlight.followFWLink = function (linkid) {
|
||||
top.location = Silverlight.fwlinkRoot + String(linkid);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////
|
||||
/// Encodes special characters in input strings as charcodes
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////
|
||||
Silverlight.HtmlAttributeEncode = function (strInput) {
|
||||
var c;
|
||||
var retVal = '';
|
||||
|
||||
if (strInput == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
for (var cnt = 0; cnt < strInput.length; cnt++) {
|
||||
c = strInput.charCodeAt(cnt);
|
||||
|
||||
if (((c > 96) && (c < 123)) ||
|
||||
((c > 64) && (c < 91)) ||
|
||||
((c > 43) && (c < 58) && (c != 47)) ||
|
||||
(c == 95)) {
|
||||
retVal = retVal + String.fromCharCode(c);
|
||||
}
|
||||
else {
|
||||
retVal = retVal + '&#' + c + ';';
|
||||
}
|
||||
}
|
||||
|
||||
return retVal;
|
||||
}
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Default error handling function to be used when a custom error handler is
|
||||
// not present
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
Silverlight.default_error_handler = function (sender, args) {
|
||||
var iErrorCode;
|
||||
var errorType = args.ErrorType;
|
||||
|
||||
iErrorCode = args.ErrorCode;
|
||||
|
||||
var errMsg = "\nSilverlight error message \n";
|
||||
|
||||
errMsg += "ErrorCode: " + iErrorCode + "\n";
|
||||
|
||||
|
||||
errMsg += "ErrorType: " + errorType + " \n";
|
||||
errMsg += "Message: " + args.ErrorMessage + " \n";
|
||||
|
||||
if (errorType == "ParserError") {
|
||||
errMsg += "XamlFile: " + args.xamlFile + " \n";
|
||||
errMsg += "Line: " + args.lineNumber + " \n";
|
||||
errMsg += "Position: " + args.charPosition + " \n";
|
||||
}
|
||||
else if (errorType == "RuntimeError") {
|
||||
if (args.lineNumber != 0) {
|
||||
errMsg += "Line: " + args.lineNumber + " \n";
|
||||
errMsg += "Position: " + args.charPosition + " \n";
|
||||
}
|
||||
errMsg += "MethodName: " + args.methodName + " \n";
|
||||
}
|
||||
alert(errMsg);
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////
|
||||
/// Releases event handler resources when the page is unloaded
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////
|
||||
Silverlight.__cleanup = function () {
|
||||
for (var i = Silverlight._silverlightCount - 1; i >= 0; i--) {
|
||||
window['__slEvent' + i] = null;
|
||||
}
|
||||
Silverlight._silverlightCount = 0;
|
||||
if (window.removeEventListener) {
|
||||
window.removeEventListener('unload', Silverlight.__cleanup, false);
|
||||
}
|
||||
else {
|
||||
window.detachEvent('onunload', Silverlight.__cleanup);
|
||||
}
|
||||
}
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////
|
||||
/// Releases event handler resources when the page is unloaded
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////
|
||||
Silverlight.__getHandlerName = function (handler) {
|
||||
var handlerName = "";
|
||||
if (typeof handler == "string") {
|
||||
handlerName = handler;
|
||||
}
|
||||
else if (typeof handler == "function") {
|
||||
if (Silverlight._silverlightCount == 0) {
|
||||
if (window.addEventListener) {
|
||||
window.addEventListener('onunload', Silverlight.__cleanup, false);
|
||||
}
|
||||
else {
|
||||
window.attachEvent('onunload', Silverlight.__cleanup);
|
||||
}
|
||||
}
|
||||
var count = Silverlight._silverlightCount++;
|
||||
handlerName = "__slEvent" + count;
|
||||
|
||||
window[handlerName] = handler;
|
||||
}
|
||||
else {
|
||||
handlerName = null;
|
||||
}
|
||||
return handlerName;
|
||||
}
|
||||
@@ -1,4 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<bundle minify="true" runOnBuild="true">
|
||||
<file>/ClientSource/Scripts/Modules/Silverlight/Silverlight.js</file>
|
||||
</bundle>
|
||||
@@ -1,2 +0,0 @@
|
||||
window.Silverlight||(window.Silverlight={}),Silverlight._silverlightCount=0,Silverlight.fwlinkRoot="http://go2.microsoft.com/fwlink/?LinkID=",Silverlight.onGetSilverlight=null,Silverlight.onSilverlightInstalled=function(){window.location.reload(!1)},Silverlight.isInstalled=function(n){var t=!1,c=null,f,s,e,i,r,o,h,u;try{f=null;try{f=new ActiveXObject("AgControl.AgControl"),n==null?t=!0:f.IsVersionSupported(n)&&(t=!0),f=null}catch(l){if(s=navigator.plugins["Silverlight Plug-In"],s)if(n===null)t=!0;else{for(e=s.description,e==="1.0.30226.2"&&(e="2.0.30226.2"),i=e.split(".");i.length>3;)i.pop();while(i.length<4)i.push(0);for(r=n.split(".");r.length>4;)r.pop();u=0;do o=parseInt(r[u]),h=parseInt(i[u]),u++;while(u<r.length&&o===h);o<=h&&!isNaN(o)&&(t=!0)}}}catch(l){t=!1}return c&&document.body.removeChild(c),t},Silverlight.WaitForInstallCompletion=function(){if(!Silverlight.isBrowserRestartRequired&&Silverlight.onSilverlightInstalled){try{navigator.plugins.refresh()}catch(n){}Silverlight.isInstalled(null)?Silverlight.onSilverlightInstalled():setTimeout(Silverlight.WaitForInstallCompletion,3e3)}},Silverlight.__startup=function(){Silverlight.isBrowserRestartRequired=Silverlight.isInstalled(null),Silverlight.isBrowserRestartRequired||Silverlight.WaitForInstallCompletion(),window.removeEventListener?window.removeEventListener("load",Silverlight.__startup,!1):window.detachEvent("onload",Silverlight.__startup)},window.addEventListener?window.addEventListener("load",Silverlight.__startup,!1):window.attachEvent("onload",Silverlight.__startup),Silverlight.createObject=function(n,t,i,r,u,f,e){var c={},o=r,h=u,s,a,l;if(c.version=o.version,o.source=n,c.alt=o.alt,f&&(o.initParams=f),o.isWindowless&&!o.windowless&&(o.windowless=o.isWindowless),o.framerate&&!o.maxFramerate&&(o.maxFramerate=o.framerate),i&&!o.id&&(o.id=i),delete o.ignoreBrowserVer,delete o.inplaceInstallPrompt,delete o.version,delete o.isWindowless,delete o.framerate,delete o.data,delete o.src,delete o.alt,Silverlight.isInstalled(c.version)){for(s in h)if(h[s])if(s=="onLoad"&&typeof h[s]=="function"&&h[s].length!=1&&(a=h[s],h[s]=function(n){return a(document.getElementById(i),e,n)}),l=Silverlight.__getHandlerName(h[s]),l!=null)o[s]=l,h[s]=null;else throw"typeof events."+s+" must be 'function' or 'string'";slPluginHTML=Silverlight.buildHTML(o)}else slPluginHTML=Silverlight.buildPromptHTML(c);if(t)t.innerHTML=slPluginHTML;else return slPluginHTML},Silverlight.buildHTML=function(n){var t=[],i;t.push('<object type="application/x-silverlight" data="data:application/x-silverlight,"'),n.id!=null&&t.push(' id="'+n.id+'"'),n.width!=null&&t.push(' width="'+n.width+'"'),n.height!=null&&t.push(' height="'+n.height+'"'),t.push(" >"),delete n.id,delete n.width,delete n.height;for(i in n)n[i]&&t.push('<param name="'+Silverlight.HtmlAttributeEncode(i)+'" value="'+Silverlight.HtmlAttributeEncode(n[i])+'" />');return t.push("<\/object>"),t.join("")},Silverlight.createObjectEx=function(n){var t=n,i=Silverlight.createObject(t.source,t.parentElement,t.id,t.properties,t.events,t.initParams,t.context);if(t.parentElement==null)return i},Silverlight.buildPromptHTML=function(n){var t="",r=Silverlight.fwlinkRoot,i=n.version;return n.alt?t=n.alt:(i||(i=""),t="<a href='javascript:Silverlight.getSilverlight(\"{1}\");' style='text-decoration: none;'><img src='{2}' alt='Get Microsoft Silverlight' style='border-style: none'/><\/a>",t=t.replace("{1}",i),t=t.replace("{2}",r+"108181")),t},Silverlight.getSilverlight=function(n){var i,t,r,u;Silverlight.onGetSilverlight&&Silverlight.onGetSilverlight(),i="",t=String(n).split("."),t.length>1&&(r=parseInt(t[0]),i=isNaN(r)||r<2?"1.0":t[0]+"."+t[1]),u="",i.match(/^\d+\056\d+$/)&&(u="&v="+i),Silverlight.followFWLink("114576"+u)},Silverlight.followFWLink=function(n){top.location=Silverlight.fwlinkRoot+String(n)},Silverlight.HtmlAttributeEncode=function(n){var t,i="",r;if(n==null)return null;for(r=0;r<n.length;r++)t=n.charCodeAt(r),i=t>96&&t<123||t>64&&t<91||t>43&&t<58&&t!=47||t==95?i+String.fromCharCode(t):i+"&#"+t+";";return i},Silverlight.default_error_handler=function(n,t){var u,r=t.ErrorType,i;u=t.ErrorCode,i="\nSilverlight error message \n",i+="ErrorCode: "+u+"\n",i+="ErrorType: "+r+" \n",i+="Message: "+t.ErrorMessage+" \n",r=="ParserError"?(i+="XamlFile: "+t.xamlFile+" \n",i+="Line: "+t.lineNumber+" \n",i+="Position: "+t.charPosition+" \n"):r=="RuntimeError"&&(t.lineNumber!=0&&(i+="Line: "+t.lineNumber+" \n",i+="Position: "+t.charPosition+" \n"),i+="MethodName: "+t.methodName+" \n"),alert(i)},Silverlight.__cleanup=function(){for(var n=Silverlight._silverlightCount-1;n>=0;n--)window["__slEvent"+n]=null;Silverlight._silverlightCount=0,window.removeEventListener?window.removeEventListener("unload",Silverlight.__cleanup,!1):window.detachEvent("onunload",Silverlight.__cleanup)},Silverlight.__getHandlerName=function(n){var t="",i;return typeof n=="string"?t=n:typeof n=="function"?(Silverlight._silverlightCount==0&&(Line truncated
|
||||
//# sourceMappingURL=Silverlight.min.js.map
|
||||
@@ -1,8 +0,0 @@
|
||||
{
|
||||
"version":3,
|
||||
"file":"Silverlight.min.js",
|
||||
"lineCount":1,
|
||||
"mappings":"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 truncated
|
||||
"sources":["/ClientSource/Scripts/Modules/Silverlight/Silverlight.js"],
|
||||
"names":["window","Silverlight","_silverlightCount","fwlinkRoot","onGetSilverlight","onSilverlightInstalled","Silverlight.onSilverlightInstalled","location","reload","isInstalled","Silverlight.isInstalled","version","isVersionSupported","container","control","plugin","actualVer","actualVerArray","reqVerArray","requiredVersionPart","actualVersionPart","index","ActiveXObject","IsVersionSupported","e","navigator","plugins","description","split","length","pop","push","parseInt","isNaN","document","body","removeChild","WaitForInstallCompletion","Silverlight.WaitForInstallCompletion","isBrowserRestartRequired","refresh","setTimeout","__startup","Silverlight.__startup","removeEventListener","detachEvent","addEventListener","attachEvent","createObject","Silverlight.createObject","source","parentElement","id","properties","events","initParams","userContext","slPluginHelper","slProperties","slEvents","name","onLoadHandler","handlerName","alt","isWindowless","windowless","framerate","maxFramerate","ignoreBrowserVer","inplaceInstallPrompt","data","src","sender","getElementById","__getHandlerName","slPluginHTML","buildHTML","buildPromptHTML","innerHTML","Silverlight.buildHTML","htmlBuilder","width","height","HtmlAttributeEncode","join","createObjectEx","Silverlight.createObjectEx","params","parameters","html","context","Silverlight.buildPromptHTML","urlRoot","shortVer","replace","getSilverlight","Silverlight.getSilverlight","majorNum","verArg","String","match","followFWLink","Silverlight.followFWLink","linkid","top","Silverlight.HtmlAttributeEncode","strInput","c","retVal","cnt","charCodeAt","fromCharCode","default_error_handler","Silverlight.default_error_handler","args","iErrorCode","errorType","ErrorType","errMsg","ErrorCode","ErrorMessage","xamlFile","lineNumber","charPosition","methodName","alert","__cleanup","Silverlight.__cleanup","i","Silverlight.__getHandlerName","handler","count"]
|
||||
}
|
||||
@@ -1,413 +0,0 @@
|
||||
if (!window.Silverlight) {
|
||||
window.Silverlight = {};
|
||||
}
|
||||
|
||||
// Silverlight control instance counter for memory mgt
|
||||
Silverlight._silverlightCount = 0;
|
||||
Silverlight.fwlinkRoot = 'http://go2.microsoft.com/fwlink/?LinkID=';
|
||||
Silverlight.onGetSilverlight = null;
|
||||
Silverlight.onSilverlightInstalled = function () { window.location.reload(false); };
|
||||
|
||||
//////////////////////////////////////////////////////////////////
|
||||
// isInstalled, checks to see if the correct version is installed
|
||||
//////////////////////////////////////////////////////////////////
|
||||
Silverlight.isInstalled = function (version) {
|
||||
var isVersionSupported = false;
|
||||
var container = null;
|
||||
|
||||
try {
|
||||
var control = null;
|
||||
|
||||
try {
|
||||
control = new ActiveXObject('AgControl.AgControl');
|
||||
if (version == null) {
|
||||
isVersionSupported = true;
|
||||
}
|
||||
else if (control.IsVersionSupported(version)) {
|
||||
isVersionSupported = true;
|
||||
}
|
||||
control = null;
|
||||
}
|
||||
catch (e) {
|
||||
var plugin = navigator.plugins["Silverlight Plug-In"];
|
||||
if (plugin) {
|
||||
if (version === null) {
|
||||
isVersionSupported = true;
|
||||
}
|
||||
else {
|
||||
var actualVer = plugin.description;
|
||||
if (actualVer === "1.0.30226.2")
|
||||
actualVer = "2.0.30226.2";
|
||||
var actualVerArray = actualVer.split(".");
|
||||
while (actualVerArray.length > 3) {
|
||||
actualVerArray.pop();
|
||||
}
|
||||
while (actualVerArray.length < 4) {
|
||||
actualVerArray.push(0);
|
||||
}
|
||||
var reqVerArray = version.split(".");
|
||||
while (reqVerArray.length > 4) {
|
||||
reqVerArray.pop();
|
||||
}
|
||||
|
||||
var requiredVersionPart;
|
||||
var actualVersionPart
|
||||
var index = 0;
|
||||
|
||||
|
||||
do {
|
||||
requiredVersionPart = parseInt(reqVerArray[index]);
|
||||
actualVersionPart = parseInt(actualVerArray[index]);
|
||||
index++;
|
||||
}
|
||||
while (index < reqVerArray.length && requiredVersionPart === actualVersionPart);
|
||||
|
||||
if (requiredVersionPart <= actualVersionPart && !isNaN(requiredVersionPart)) {
|
||||
isVersionSupported = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (e) {
|
||||
isVersionSupported = false;
|
||||
}
|
||||
if (container) {
|
||||
document.body.removeChild(container);
|
||||
}
|
||||
|
||||
return isVersionSupported;
|
||||
}
|
||||
Silverlight.WaitForInstallCompletion = function () {
|
||||
if (!Silverlight.isBrowserRestartRequired && Silverlight.onSilverlightInstalled) {
|
||||
try {
|
||||
navigator.plugins.refresh();
|
||||
}
|
||||
catch (e) {
|
||||
}
|
||||
if (Silverlight.isInstalled(null)) {
|
||||
Silverlight.onSilverlightInstalled();
|
||||
}
|
||||
else {
|
||||
setTimeout(Silverlight.WaitForInstallCompletion, 3000);
|
||||
}
|
||||
}
|
||||
}
|
||||
Silverlight.__startup = function () {
|
||||
Silverlight.isBrowserRestartRequired = Silverlight.isInstalled(null);//(!window.ActiveXObject || Silverlight.isInstalled(null));
|
||||
if (!Silverlight.isBrowserRestartRequired) {
|
||||
Silverlight.WaitForInstallCompletion();
|
||||
}
|
||||
if (window.removeEventListener) {
|
||||
window.removeEventListener('load', Silverlight.__startup, false);
|
||||
}
|
||||
else {
|
||||
window.detachEvent('onload', Silverlight.__startup);
|
||||
}
|
||||
}
|
||||
|
||||
if (window.addEventListener) {
|
||||
window.addEventListener('load', Silverlight.__startup, false);
|
||||
}
|
||||
else {
|
||||
window.attachEvent('onload', Silverlight.__startup);
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// createObject(); Params:
|
||||
// parentElement of type Element, the parent element of the Silverlight Control
|
||||
// source of type String
|
||||
// id of type string
|
||||
// properties of type String, object literal notation { name:value, name:value, name:value},
|
||||
// current properties are: width, height, background, framerate, isWindowless, enableHtmlAccess, inplaceInstallPrompt: all are of type string
|
||||
// events of type String, object literal notation { name:value, name:value, name:value},
|
||||
// current events are onLoad onError, both are type string
|
||||
// initParams of type Object or object literal notation { name:value, name:value, name:value}
|
||||
// userContext of type Object
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
Silverlight.createObject = function (source, parentElement, id, properties, events, initParams, userContext) {
|
||||
var slPluginHelper = new Object();
|
||||
var slProperties = properties;
|
||||
var slEvents = events;
|
||||
|
||||
slPluginHelper.version = slProperties.version;
|
||||
slProperties.source = source;
|
||||
slPluginHelper.alt = slProperties.alt;
|
||||
|
||||
//rename properties to their tag property names
|
||||
if (initParams)
|
||||
slProperties.initParams = initParams;
|
||||
if (slProperties.isWindowless && !slProperties.windowless)
|
||||
slProperties.windowless = slProperties.isWindowless;
|
||||
if (slProperties.framerate && !slProperties.maxFramerate)
|
||||
slProperties.maxFramerate = slProperties.framerate;
|
||||
if (id && !slProperties.id)
|
||||
slProperties.id = id;
|
||||
|
||||
// remove elements which are not to be added to the instantiation tag
|
||||
delete slProperties.ignoreBrowserVer;
|
||||
delete slProperties.inplaceInstallPrompt;
|
||||
delete slProperties.version;
|
||||
delete slProperties.isWindowless;
|
||||
delete slProperties.framerate;
|
||||
delete slProperties.data;
|
||||
delete slProperties.src;
|
||||
delete slProperties.alt;
|
||||
|
||||
|
||||
// detect that the correct version of Silverlight is installed, else display install
|
||||
|
||||
if (Silverlight.isInstalled(slPluginHelper.version)) {
|
||||
//move unknown events to the slProperties array
|
||||
for (var name in slEvents) {
|
||||
if (slEvents[name]) {
|
||||
if (name == "onLoad" && typeof slEvents[name] == "function" && slEvents[name].length != 1) {
|
||||
var onLoadHandler = slEvents[name];
|
||||
slEvents[name] = function (sender) { return onLoadHandler(document.getElementById(id), userContext, sender) };
|
||||
}
|
||||
var handlerName = Silverlight.__getHandlerName(slEvents[name]);
|
||||
if (handlerName != null) {
|
||||
slProperties[name] = handlerName;
|
||||
slEvents[name] = null;
|
||||
}
|
||||
else {
|
||||
throw "typeof events." + name + " must be 'function' or 'string'";
|
||||
}
|
||||
}
|
||||
}
|
||||
slPluginHTML = Silverlight.buildHTML(slProperties);
|
||||
}
|
||||
//The control could not be instantiated. Show the installation prompt
|
||||
else {
|
||||
slPluginHTML = Silverlight.buildPromptHTML(slPluginHelper);
|
||||
}
|
||||
|
||||
// insert or return the HTML
|
||||
if (parentElement) {
|
||||
parentElement.innerHTML = slPluginHTML;
|
||||
}
|
||||
else {
|
||||
return slPluginHTML;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// create HTML that instantiates the control
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
Silverlight.buildHTML = function (slProperties) {
|
||||
var htmlBuilder = [];
|
||||
|
||||
htmlBuilder.push('<object type=\"application/x-silverlight\" data="data:application/x-silverlight,"');
|
||||
if (slProperties.id != null) {
|
||||
htmlBuilder.push(' id="' + slProperties.id + '"');
|
||||
}
|
||||
if (slProperties.width != null) {
|
||||
htmlBuilder.push(' width="' + slProperties.width + '"');
|
||||
}
|
||||
if (slProperties.height != null) {
|
||||
htmlBuilder.push(' height="' + slProperties.height + '"');
|
||||
}
|
||||
htmlBuilder.push(' >');
|
||||
|
||||
delete slProperties.id;
|
||||
delete slProperties.width;
|
||||
delete slProperties.height;
|
||||
|
||||
for (var name in slProperties) {
|
||||
if (slProperties[name]) {
|
||||
htmlBuilder.push('<param name="' + Silverlight.HtmlAttributeEncode(name) + '" value="' + Silverlight.HtmlAttributeEncode(slProperties[name]) + '" />');
|
||||
}
|
||||
}
|
||||
htmlBuilder.push('<\/object>');
|
||||
return htmlBuilder.join('');
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
// createObjectEx, takes a single parameter of all createObject parameters enclosed in {}
|
||||
Silverlight.createObjectEx = function (params) {
|
||||
var parameters = params;
|
||||
var html = Silverlight.createObject(parameters.source, parameters.parentElement, parameters.id, parameters.properties, parameters.events, parameters.initParams, parameters.context);
|
||||
if (parameters.parentElement == null) {
|
||||
return html;
|
||||
}
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Builds the HTML to prompt the user to download and install Silverlight
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////
|
||||
Silverlight.buildPromptHTML = function (slPluginHelper) {
|
||||
var slPluginHTML = "";
|
||||
var urlRoot = Silverlight.fwlinkRoot;
|
||||
var shortVer = slPluginHelper.version;
|
||||
if (slPluginHelper.alt) {
|
||||
slPluginHTML = slPluginHelper.alt;
|
||||
}
|
||||
else {
|
||||
if (!shortVer) {
|
||||
shortVer = "";
|
||||
}
|
||||
slPluginHTML = "<a href='javascript:Silverlight.getSilverlight(\"{1}\");' style='text-decoration: none;'><img src='{2}' alt='Get Microsoft Silverlight' style='border-style: none'/></a>";
|
||||
slPluginHTML = slPluginHTML.replace('{1}', shortVer);
|
||||
slPluginHTML = slPluginHTML.replace('{2}', urlRoot + '108181');
|
||||
}
|
||||
|
||||
return slPluginHTML;
|
||||
}
|
||||
|
||||
|
||||
Silverlight.getSilverlight = function (version) {
|
||||
if (Silverlight.onGetSilverlight) {
|
||||
Silverlight.onGetSilverlight();
|
||||
}
|
||||
|
||||
var shortVer = "";
|
||||
var reqVerArray = String(version).split(".");
|
||||
if (reqVerArray.length > 1) {
|
||||
var majorNum = parseInt(reqVerArray[0]);
|
||||
if (isNaN(majorNum) || majorNum < 2) {
|
||||
shortVer = "1.0";
|
||||
}
|
||||
else {
|
||||
shortVer = reqVerArray[0] + '.' + reqVerArray[1];
|
||||
}
|
||||
}
|
||||
|
||||
var verArg = "";
|
||||
|
||||
if (shortVer.match(/^\d+\056\d+$/)) {
|
||||
verArg = "&v=" + shortVer;
|
||||
}
|
||||
|
||||
Silverlight.followFWLink("114576" + verArg);
|
||||
}
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////
|
||||
/// Navigates to a url based on fwlinkid
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////
|
||||
Silverlight.followFWLink = function (linkid) {
|
||||
top.location = Silverlight.fwlinkRoot + String(linkid);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////
|
||||
/// Encodes special characters in input strings as charcodes
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////
|
||||
Silverlight.HtmlAttributeEncode = function (strInput) {
|
||||
var c;
|
||||
var retVal = '';
|
||||
|
||||
if (strInput == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
for (var cnt = 0; cnt < strInput.length; cnt++) {
|
||||
c = strInput.charCodeAt(cnt);
|
||||
|
||||
if (((c > 96) && (c < 123)) ||
|
||||
((c > 64) && (c < 91)) ||
|
||||
((c > 43) && (c < 58) && (c != 47)) ||
|
||||
(c == 95)) {
|
||||
retVal = retVal + String.fromCharCode(c);
|
||||
}
|
||||
else {
|
||||
retVal = retVal + '&#' + c + ';';
|
||||
}
|
||||
}
|
||||
|
||||
return retVal;
|
||||
}
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Default error handling function to be used when a custom error handler is
|
||||
// not present
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
Silverlight.default_error_handler = function (sender, args) {
|
||||
var iErrorCode;
|
||||
var errorType = args.ErrorType;
|
||||
|
||||
iErrorCode = args.ErrorCode;
|
||||
|
||||
var errMsg = "\nSilverlight error message \n";
|
||||
|
||||
errMsg += "ErrorCode: " + iErrorCode + "\n";
|
||||
|
||||
|
||||
errMsg += "ErrorType: " + errorType + " \n";
|
||||
errMsg += "Message: " + args.ErrorMessage + " \n";
|
||||
|
||||
if (errorType == "ParserError") {
|
||||
errMsg += "XamlFile: " + args.xamlFile + " \n";
|
||||
errMsg += "Line: " + args.lineNumber + " \n";
|
||||
errMsg += "Position: " + args.charPosition + " \n";
|
||||
}
|
||||
else if (errorType == "RuntimeError") {
|
||||
if (args.lineNumber != 0) {
|
||||
errMsg += "Line: " + args.lineNumber + " \n";
|
||||
errMsg += "Position: " + args.charPosition + " \n";
|
||||
}
|
||||
errMsg += "MethodName: " + args.methodName + " \n";
|
||||
}
|
||||
alert(errMsg);
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////
|
||||
/// Releases event handler resources when the page is unloaded
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////
|
||||
Silverlight.__cleanup = function () {
|
||||
for (var i = Silverlight._silverlightCount - 1; i >= 0; i--) {
|
||||
window['__slEvent' + i] = null;
|
||||
}
|
||||
Silverlight._silverlightCount = 0;
|
||||
if (window.removeEventListener) {
|
||||
window.removeEventListener('unload', Silverlight.__cleanup, false);
|
||||
}
|
||||
else {
|
||||
window.detachEvent('onunload', Silverlight.__cleanup);
|
||||
}
|
||||
}
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////
|
||||
/// Releases event handler resources when the page is unloaded
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////
|
||||
Silverlight.__getHandlerName = function (handler) {
|
||||
var handlerName = "";
|
||||
if (typeof handler == "string") {
|
||||
handlerName = handler;
|
||||
}
|
||||
else if (typeof handler == "function") {
|
||||
if (Silverlight._silverlightCount == 0) {
|
||||
if (window.addEventListener) {
|
||||
window.addEventListener('onunload', Silverlight.__cleanup, false);
|
||||
}
|
||||
else {
|
||||
window.attachEvent('onunload', Silverlight.__cleanup);
|
||||
}
|
||||
}
|
||||
var count = Silverlight._silverlightCount++;
|
||||
handlerName = "__slEvent" + count;
|
||||
|
||||
window[handlerName] = handler;
|
||||
}
|
||||
else {
|
||||
handlerName = null;
|
||||
}
|
||||
return handlerName;
|
||||
}
|
||||
@@ -4743,6 +4743,106 @@ div.form > table table.sub > tbody > tr > th.name {
|
||||
border-right: none;
|
||||
padding-right: 0;
|
||||
}
|
||||
div.disco-attachmentUpload-dropTarget {
|
||||
display: none;
|
||||
}
|
||||
div.disco-attachmentUpload-dropTarget.dragHighlight {
|
||||
display: block;
|
||||
position: absolute;
|
||||
z-index: 1000;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: calc(100% - 6px);
|
||||
height: calc(100% - 6px);
|
||||
background-color: rgba(251, 218, 152, 0.5);
|
||||
border: 3px dashed #f0a30a;
|
||||
}
|
||||
div.disco-attachmentUpload-dropTarget.dragHighlight h2 {
|
||||
margin-top: 3em !important;
|
||||
color: #2c1e02;
|
||||
text-align: center;
|
||||
font-weight: bold;
|
||||
}
|
||||
div.disco-attachmentUpload-dropTarget.dragHighlight.dragHover {
|
||||
background-color: rgba(173, 235, 110, 0.5);
|
||||
border: 3px dashed #60a917;
|
||||
}
|
||||
div.disco-attachmentUpload-dropTarget.dragHighlight.dragHover h2 {
|
||||
color: #000000;
|
||||
}
|
||||
div.disco-attachmentUpload-progress {
|
||||
position: absolute;
|
||||
right: 0px;
|
||||
bottom: 48px;
|
||||
}
|
||||
div.disco-attachmentUpload-progress > div {
|
||||
background-color: #fafafa;
|
||||
padding: 4px 8px;
|
||||
}
|
||||
div.disco-attachmentUpload-progress > div i {
|
||||
color: #1e6dab;
|
||||
margin-right: 4px;
|
||||
}
|
||||
div.disco-attachmentUpload-commentDialog {
|
||||
padding: 0.25em 0.5em !important;
|
||||
}
|
||||
div.disco-attachmentUpload-commentDialog table {
|
||||
border: solid 1px #f4f4f4;
|
||||
border-collapse: collapse;
|
||||
table-layout: fixed;
|
||||
}
|
||||
div.disco-attachmentUpload-commentDialog table > tbody > tr > td {
|
||||
border: solid 1px #f4f4f4;
|
||||
background-color: #ffffff;
|
||||
}
|
||||
div.disco-attachmentUpload-commentDialog table > tbody > tr:nth-child(odd) > td {
|
||||
background-color: #fcfcfc;
|
||||
}
|
||||
div.disco-attachmentUpload-commentDialog table > thead > tr > th,
|
||||
div.disco-attachmentUpload-commentDialog table > tbody > tr > th {
|
||||
background-color: #f4f4f4;
|
||||
border: solid 1px #f4f4f4;
|
||||
}
|
||||
div.disco-attachmentUpload-commentDialog table > tbody > tr:hover > td {
|
||||
background-color: #fefefe;
|
||||
}
|
||||
div.disco-attachmentUpload-commentDialog table > tbody > tr:hover:nth-child(odd) > td {
|
||||
background-color: #fafafa;
|
||||
}
|
||||
div.disco-attachmentUpload-commentDialog table > tfoot > tr > th,
|
||||
div.disco-attachmentUpload-commentDialog table > tfoot > tr > td {
|
||||
background-color: #f4f4f4;
|
||||
}
|
||||
div.disco-attachmentUpload-commentDialog table th {
|
||||
width: 80px;
|
||||
}
|
||||
div.disco-attachmentUpload-commentDialog table td.filename {
|
||||
font-family: Consolas, "Courier New", monospace;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
-ms-text-overflow: ellipsis;
|
||||
-o-text-overflow: ellipsis;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
div.disco-attachmentUpload-commentDialog table input.comments {
|
||||
width: calc(100% - 5px);
|
||||
}
|
||||
div.disco-attachmentUpload-commentDialog table td.thumbnail {
|
||||
display: none;
|
||||
text-align: center;
|
||||
}
|
||||
div.disco-attachmentUpload-commentDialog table td.thumbnail img {
|
||||
border: 1px solid #9e9e9e;
|
||||
max-height: 250px;
|
||||
max-width: 374px;
|
||||
}
|
||||
div.disco-attachmentUpload-imageDialog {
|
||||
background-color: #000000 !important;
|
||||
padding: 0 !important;
|
||||
overflow: hidden !important;
|
||||
width: 720px !important;
|
||||
height: 540px !important;
|
||||
}
|
||||
.d-priority-high {
|
||||
color: #fa6800;
|
||||
width: 1.2857142857142858em;
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background:transparent}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:bold}dfn{font-style:italic}h1{font-size:2em;margin:.67em 0}mark{background:#ff0;color:#000}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{-moz-box-sizing:content-box;box-sizing:content-box;height:0}pre{overflow:auto}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}button,input,optgroup,select,textarea{color:inherit;font:inherit;margin:0}button{overflow:visible}button,select{text-transform:none}button,html input[type="button"],input[type="reset"],input[type="submit"]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}input{line-height:normal}input[type="checkbox"],input[type="radio"]{box-sizing:border-box;padding:0}input[type="number"]::-webkit-inner-spin-button,input[type="number"]::-webkit-outer-spin-button{height:auto}input[type="search"]{-webkit-appearance:textfield;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}input[type="search"]::-webkit-search-cancel-button,input[type="search"]::-webkit-search-decoration{-webkit-appearance:none}fieldset{border:1px solid silver;margin:0 2px;padding:.35em .625em .75em}legend{border:0;padding:0}textarea{overflow:auto}optgroup{font-weight:bold}table{border-collapse:collapse;border-spacing:0}td,th{padding:0}.ui-helper-hidden{display:none}.ui-helper-hidden-accessible{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.ui-helper-reset{margin:0;padding:0;border:0;outline:0;line-height:1.3;text-decoration:none;font-size:100%;list-style:none}.ui-helper-clearfix:before,.ui-helper-clearfix:after{content:"";display:table;border-collapse:collapse}.ui-helper-clearfix:after{clear:both}.ui-helper-clearfix{min-height:0}.ui-helper-zfix{width:100%;height:100%;top:0;left:0;position:absolute;opacity:0;filter:alpha(opacity=0)}.ui-front{z-index:100}.ui-state-disabled{cursor:default!important}.ui-icon{display:block;text-indent:-99999px;overflow:hidden;background-repeat:no-repeat}.ui-widget-overlay{position:fixed;top:0;left:0;width:100%;height:100%}.ui-accordion .ui-accordion-header{display:block;cursor:pointer;position:relative;margin-top:2px;padding:.5em .5em .5em .7em;min-height:0}.ui-accordion .ui-accordion-icons{padding-left:2.2em}.ui-accordion .ui-accordion-noicons{padding-left:.7em}.ui-accordion .ui-accordion-icons .ui-accordion-icons{padding-left:2.2em}.ui-accordion .ui-accordion-header .ui-accordion-header-icon{position:absolute;left:.5em;top:50%;margin-top:-8px}.ui-accordion .ui-accordion-content{padding:1em 2.2em;border-top:0;overflow:auto}.ui-autocomplete{position:absolute;top:0;left:0;cursor:default}.ui-button{display:inline-block;position:relative;padding:0;line-height:normal;margin-right:.1em;cursor:pointer;vertical-align:middle;text-align:center;overflow:visible}.ui-button,.ui-button:link,.ui-button:visited,.ui-button:hover,.ui-button:active{text-decoration:none}.ui-button-icon-only{width:2.2em}button.ui-button-icon-only{width:2.4em}.ui-button-icons-only{width:3.4em}button.ui-button-icons-only{width:3.7em}.ui-button .ui-button-text{display:block;line-height:normal}.ui-button-text-only .ui-button-text{padding:.4em 1em}.ui-button-icon-only .ui-button-text,.ui-button-icons-only .ui-button-text{padding:.4em;text-indent:-9999999px}.ui-button-text-icon-primary .ui-button-text,.ui-button-text-icons .ui-button-text{padding:.4em 1em .4em 2.1em}.ui-button-text-icon-secondary .ui-button-text,.ui-button-text-icons .ui-button-text{padding:.4em 2.1em .4em 1em}.ui-button-text-icons .ui-button-text{padding-left:2.1em;padding-right:2.1em}input.ui-button{padding:.4em 1em}.ui-button-icon-only .ui-icon,.ui-button-text-icon-primary .ui-icon,.ui-button-text-icon-secondary .ui-icon,.ui-button-text-icons .ui-icon,.ui-button-icons-only .ui-icon{position:absolute;top:50%;margin-top:-8px}.ui-button-icon-only .ui-icon{left:50%;margin-left:-8px}.ui-button-text-icon-primary .ui-button-icon-primary,.ui-button-text-icons .ui-button-icon-primary,.ui-button-icons-only .ui-button-icon-primary{left:.5em}.ui-button-text-icon-secondary .ui-button-icon-secondary,.ui-button-text-icons .ui-button-icon-secondary,.ui-button-icons-only .ui-button-icon-secondary{right:.5em}.ui-buttonset{margin-right:7px}.ui-buttonset .ui-button{margin-left:0;margin-right:-.3em}input.ui-button::-moz-focus-inner,button.ui-button:Line truncated
|
||||
html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background:transparent}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:bold}dfn{font-style:italic}h1{font-size:2em;margin:.67em 0}mark{background:#ff0;color:#000}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{-moz-box-sizing:content-box;box-sizing:content-box;height:0}pre{overflow:auto}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}button,input,optgroup,select,textarea{color:inherit;font:inherit;margin:0}button{overflow:visible}button,select{text-transform:none}button,html input[type="button"],input[type="reset"],input[type="submit"]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}input{line-height:normal}input[type="checkbox"],input[type="radio"]{box-sizing:border-box;padding:0}input[type="number"]::-webkit-inner-spin-button,input[type="number"]::-webkit-outer-spin-button{height:auto}input[type="search"]{-webkit-appearance:textfield;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}input[type="search"]::-webkit-search-cancel-button,input[type="search"]::-webkit-search-decoration{-webkit-appearance:none}fieldset{border:1px solid silver;margin:0 2px;padding:.35em .625em .75em}legend{border:0;padding:0}textarea{overflow:auto}optgroup{font-weight:bold}table{border-collapse:collapse;border-spacing:0}td,th{padding:0}.ui-helper-hidden{display:none}.ui-helper-hidden-accessible{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.ui-helper-reset{margin:0;padding:0;border:0;outline:0;line-height:1.3;text-decoration:none;font-size:100%;list-style:none}.ui-helper-clearfix:before,.ui-helper-clearfix:after{content:"";display:table;border-collapse:collapse}.ui-helper-clearfix:after{clear:both}.ui-helper-clearfix{min-height:0}.ui-helper-zfix{width:100%;height:100%;top:0;left:0;position:absolute;opacity:0;filter:alpha(opacity=0)}.ui-front{z-index:100}.ui-state-disabled{cursor:default!important}.ui-icon{display:block;text-indent:-99999px;overflow:hidden;background-repeat:no-repeat}.ui-widget-overlay{position:fixed;top:0;left:0;width:100%;height:100%}.ui-accordion .ui-accordion-header{display:block;cursor:pointer;position:relative;margin-top:2px;padding:.5em .5em .5em .7em;min-height:0}.ui-accordion .ui-accordion-icons{padding-left:2.2em}.ui-accordion .ui-accordion-noicons{padding-left:.7em}.ui-accordion .ui-accordion-icons .ui-accordion-icons{padding-left:2.2em}.ui-accordion .ui-accordion-header .ui-accordion-header-icon{position:absolute;left:.5em;top:50%;margin-top:-8px}.ui-accordion .ui-accordion-content{padding:1em 2.2em;border-top:0;overflow:auto}.ui-autocomplete{position:absolute;top:0;left:0;cursor:default}.ui-button{display:inline-block;position:relative;padding:0;line-height:normal;margin-right:.1em;cursor:pointer;vertical-align:middle;text-align:center;overflow:visible}.ui-button,.ui-button:link,.ui-button:visited,.ui-button:hover,.ui-button:active{text-decoration:none}.ui-button-icon-only{width:2.2em}button.ui-button-icon-only{width:2.4em}.ui-button-icons-only{width:3.4em}button.ui-button-icons-only{width:3.7em}.ui-button .ui-button-text{display:block;line-height:normal}.ui-button-text-only .ui-button-text{padding:.4em 1em}.ui-button-icon-only .ui-button-text,.ui-button-icons-only .ui-button-text{padding:.4em;text-indent:-9999999px}.ui-button-text-icon-primary .ui-button-text,.ui-button-text-icons .ui-button-text{padding:.4em 1em .4em 2.1em}.ui-button-text-icon-secondary .ui-button-text,.ui-button-text-icons .ui-button-text{padding:.4em 2.1em .4em 1em}.ui-button-text-icons .ui-button-text{padding-left:2.1em;padding-right:2.1em}input.ui-button{padding:.4em 1em}.ui-button-icon-only .ui-icon,.ui-button-text-icon-primary .ui-icon,.ui-button-text-icon-secondary .ui-icon,.ui-button-text-icons .ui-icon,.ui-button-icons-only .ui-icon{position:absolute;top:50%;margin-top:-8px}.ui-button-icon-only .ui-icon{left:50%;margin-left:-8px}.ui-button-text-icon-primary .ui-button-icon-primary,.ui-button-text-icons .ui-button-icon-primary,.ui-button-icons-only .ui-button-icon-primary{left:.5em}.ui-button-text-icon-secondary .ui-button-icon-secondary,.ui-button-text-icons .ui-button-icon-secondary,.ui-button-icons-only .ui-button-icon-secondary{right:.5em}.ui-buttonset{margin-right:7px}.ui-buttonset .ui-button{margin-left:0;margin-right:-.3em}input.ui-button::-moz-focus-inner,button.ui-button:Line truncated
|
||||
@@ -44,10 +44,10 @@
|
||||
|
||||
// Status
|
||||
@StatusUnknown: @HeaderBackgroundColour;
|
||||
@StatusSuccess: #60a917;
|
||||
@StatusSuccess: @ThemeGreen;
|
||||
@StatusInformation: @ButtonColour;
|
||||
@StatusWarning: #f0a30a;
|
||||
@StatusAlert: #fa6800;
|
||||
@StatusWarning: @ThemeAmber;
|
||||
@StatusAlert: @ThemeOrange;
|
||||
@StatusError: @ButtonAlertColour;
|
||||
@StatusRemove: @ButtonAlertColour;
|
||||
|
||||
|
||||
@@ -253,12 +253,16 @@
|
||||
#DeviceDetailTab-DetailsContainer > table > tbody > tr > td {
|
||||
padding: 10px 6px;
|
||||
}
|
||||
#deviceShowResources #Attachments {
|
||||
#deviceShowResources #AttachmentsContainer {
|
||||
padding: 0;
|
||||
}
|
||||
#deviceShowResources #Attachments {
|
||||
position: relative;
|
||||
border: 1px solid #cccccc;
|
||||
background-color: #ffffff;
|
||||
}
|
||||
#deviceShowResources #Attachments div.attachmentOutput {
|
||||
position: relative;
|
||||
height: 115px;
|
||||
overflow: auto;
|
||||
font-size: 0.95em;
|
||||
@@ -303,6 +307,9 @@
|
||||
height: 48px;
|
||||
width: 48px;
|
||||
}
|
||||
#deviceShowResources #Attachments div.attachmentOutput > a span.icon img.loading {
|
||||
display: none;
|
||||
}
|
||||
#deviceShowResources #Attachments div.attachmentOutput > a:hover {
|
||||
background-color: #ededed;
|
||||
border: 1px solid #cccccc;
|
||||
|
||||
@@ -210,12 +210,17 @@
|
||||
|
||||
|
||||
#deviceShowResources {
|
||||
#Attachments {
|
||||
#AttachmentsContainer {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
#Attachments {
|
||||
position: relative;
|
||||
border: 1px solid @SubtleBorderColour;
|
||||
background-color: @white;
|
||||
|
||||
div.attachmentOutput {
|
||||
position: relative;
|
||||
height: 115px;
|
||||
overflow: auto;
|
||||
font-size: 0.95em;
|
||||
@@ -260,6 +265,10 @@
|
||||
img {
|
||||
height: 48px;
|
||||
width: 48px;
|
||||
|
||||
&.loading {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -457,7 +466,6 @@
|
||||
color: @StatusInformation;
|
||||
}
|
||||
}
|
||||
|
||||
// Icons used within Devices_Import_Review
|
||||
@import "FontAwesome\variables.less";
|
||||
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
.tableData{border:solid 1px #f4f4f4;border-collapse:collapse}.tableData>tbody>tr>td{border:solid 1px #f4f4f4;background-color:#fff}.tableData>tbody>tr:nth-child(odd)>td{background-color:#fcfcfc}.tableData>thead>tr>th,.tableData>tbody>tr>th{background-color:#f4f4f4;border:solid 1px #f4f4f4}.tableData>tbody>tr:hover>td{background-color:#fefefe}.tableData>tbody>tr:hover:nth-child(odd)>td{background-color:#fafafa}.tableData>tfoot>tr>th,.tableData>tfoot>tr>td{background-color:#f4f4f4}.tableDataDark{border:solid 1px #d8d8d8;border-collapse:collapse}.tableDataDark td{border:solid 1px #d8d8d8;background-color:#fff}.tableDataDark th{background-color:#eee;border:solid 1px #d8d8d8}.tableDataContainer{background-color:#fff}.tableDataVertical{border:solid 1px #f4f4f4;border-collapse:collapse}.tableDataVertical>tbody>tr:nth-child(odd){background-color:#f4f4f4;margin:0;padding:0}.tableDataVertical>tbody>tr>th.name{width:170px;text-align:right}.tableDataVertical table.sub>tbody>tr:not(:first-child)>th,.tableDataVertical table.sub>tbody>tr:not(:first-child)>td{border-top:1px dashed #aaa}.tableDataVertical table.sub>tbody>tr>th{font-weight:normal;text-align:right}.tableDataVertical table.sub>tbody>tr>th.name{text-align:right}.icon16{display:inline-block;height:16px;width:16px;margin-left:2px;cursor:pointer}.subtleUntilHover{-moz-opacity:.3;opacity:.3}.subtleUntilHover:hover{-moz-opacity:1;opacity:1}#layout_PageHeading #Device_Show_Status{margin-left:20px;display:inline-block;height:50px;font-family:"Segoe UI",Arial,Verdana,Tahoma,sans-serif;font-weight:lighter;font-stretch:condensed;font-size:.7em;text-transform:uppercase}#layout_PageHeading #Device_Show_Status span.icon{margin-right:6px}#Device_Show #Device_Show_Subjects{table-layout:fixed}#Device_Show #Device_Show_Subjects>tbody>tr>td{padding-top:0;height:100%}#Device_Show #Device_Show_Subjects>tbody>tr>td>div{position:relative}#Device_Show #Device_Show_Subjects>tbody>tr>td>div div.status{margin-top:2px;padding-top:2px;border-top:1px dashed #ddd}#Device_Show #Device_Show_Subjects>tbody>tr>td>div input.discreet{margin-left:-2px}#Device_Show #Device_Show_Subjects>tbody>tr>td:not(:last-child){border-right:1px dashed #aaa}#Device_Show #Device_Show_Subjects #Device_Show_Details table.verticalHeadings>tbody>tr>td:first-child{width:104px;font-weight:bold}#Device_Show #Device_Show_Subjects #Device_Show_Details #Device_Show_Details_Asset_Name{font-weight:bold}#Device_Show #Device_Show_Subjects #Device_Show_Details #Device_Show_Details_Asset_Enrolled_Trusted{display:inline-block;height:16px;padding-left:16px;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAACWUlEQVQ4y6XRXWiSURgHcJsXa4WNNuuyiy6CoAupixERoXXhmljuxaJiFrVA1i72cVFCOSMt8rNt2YfGO5g5Z1NstWW+c4ZBq4QpqMkEbZDSCObAMprjdf90sIjxsgUdODd/zvmd5zwPCwDrf/aGB7q6utgmk8ngdruzVqt10eVyTWu1Wuk/AXK5vMpoNPpjsRgGbU8/9fbdH/J4PAuRSARKpfLKhoBYLG595nTCaDSZVjPp6TPbHQ5H0mAwfBeJRHXrAp0dna9JcqCguX2H/Xd+S625aLFYQBDE8XWBd+8/TI6Njc+vzcfGX4nLX4FOp5OuC0wGAlS53NzaPPAm2Gi32+H3+5tYJEl+pigKoVAIPp+PnpqaosPhMF1uHB2Px2mv14vya6VgMKhhHGN3d/dSMplENptFIpHA3NwcCoUCSqUSKqvScZVKBbPZHGQEFApFMZ1OI5PJIBqNrkD5fB40Ta8AlcrUajVsNpufEbh+42YxHEkh+/UbUqlZpGd/lAH8WTMzMzDd64d7NMAMDOobi/OpHqh6rqK9jcCvBQncQzK0Xm5DPn0BJ4lz6GgVIkedYAaamxqK0dEDePl4FziczehTsZGLs7BnNwdiwRac4lejvp6La83VzABv/8FF/qG9oD/WQS/fhNptHEw8rEJiuAo7ubXACAtH9m0Fu2YHxQzweEuEVIYnaiFmvQ04f1aItksi5KaP4ZFGjDB5GG/7j4LL5YYYgZYW2c/yiJbv6h/A0EvC4RjGiOsFnK4J+KgABmyjsDufL0skki8CgYCoXOLz+TWrwG+kXMkgQ6yv+QAAAABJRU5ErkJggg==);background-repeat:no-repeat}#Device_Show #Device_Show_Subjects #Device_Show_Details #Device_Show_GenerateDocument_Container{padding-top:4px}#Device_Show #Device_Show_Subjects #Device_Show_Details #Device_Show_GenerateDocument_Container #Device_Show_GenerateDocument{padding:0}#Device_Show #Device_Show_Subjects #Device_Show_Policies table.verticalHeadings>tbody>tr>td:first-child{width:120px;font-weight:bold}#Device_Show #Device_Show_Subjects #Device_Show_Aspects #Device_Show_Aspects_Model_Image{display:block;width:256px;height:256px;margin:0 auto}#Device_Show #Device_Show_Subjects #Device_Show_Subjects_Actions>td{padding-top:4px}#DeviceDetailTabs{margin-top:10px;border-radius:0;background-image:none;background-color:#fff;border:none;padding:0}#DeviceDetailTabs #DeviceDetailTabItems{border-radius:0;border-top:1px solid #ddd;border-right:1px solid #ddd;border-left:1px solid #ddd;border-bottom:none;padding:2px 0 0 4px;background-image:none;background-color:#eee;display:table}#DeviceDetailTabs #DeviceDetailTabItems>li{top:0;border-radius:0;margin:0 5px 0 0;padding:0;line-height:normal;margin-right:4px}#DeviceDetailTabs #DeviceDetailTabItems>li>a{padding:5px 8px}#DeviceDetailTabs div.ui-tabs-panel{border-radius:0;padding:4px;border-right:1px solid #ddd;border-bottom:1px solid #ddd;border-left:1px solid #ddd;border-top:none;background-color:#eee}#Device_Show_Policies_Profile_Actions_Update_Dialog ul li,#Device_Show_Policies_Batch_Actions_Update_Dialog ul li{background-color:#fffLine truncated
|
||||
.tableData{border:solid 1px #f4f4f4;border-collapse:collapse}.tableData>tbody>tr>td{border:solid 1px #f4f4f4;background-color:#fff}.tableData>tbody>tr:nth-child(odd)>td{background-color:#fcfcfc}.tableData>thead>tr>th,.tableData>tbody>tr>th{background-color:#f4f4f4;border:solid 1px #f4f4f4}.tableData>tbody>tr:hover>td{background-color:#fefefe}.tableData>tbody>tr:hover:nth-child(odd)>td{background-color:#fafafa}.tableData>tfoot>tr>th,.tableData>tfoot>tr>td{background-color:#f4f4f4}.tableDataDark{border:solid 1px #d8d8d8;border-collapse:collapse}.tableDataDark td{border:solid 1px #d8d8d8;background-color:#fff}.tableDataDark th{background-color:#eee;border:solid 1px #d8d8d8}.tableDataContainer{background-color:#fff}.tableDataVertical{border:solid 1px #f4f4f4;border-collapse:collapse}.tableDataVertical>tbody>tr:nth-child(odd){background-color:#f4f4f4;margin:0;padding:0}.tableDataVertical>tbody>tr>th.name{width:170px;text-align:right}.tableDataVertical table.sub>tbody>tr:not(:first-child)>th,.tableDataVertical table.sub>tbody>tr:not(:first-child)>td{border-top:1px dashed #aaa}.tableDataVertical table.sub>tbody>tr>th{font-weight:normal;text-align:right}.tableDataVertical table.sub>tbody>tr>th.name{text-align:right}.icon16{display:inline-block;height:16px;width:16px;margin-left:2px;cursor:pointer}.subtleUntilHover{-moz-opacity:.3;opacity:.3}.subtleUntilHover:hover{-moz-opacity:1;opacity:1}#layout_PageHeading #Device_Show_Status{margin-left:20px;display:inline-block;height:50px;font-family:"Segoe UI",Arial,Verdana,Tahoma,sans-serif;font-weight:lighter;font-stretch:condensed;font-size:.7em;text-transform:uppercase}#layout_PageHeading #Device_Show_Status span.icon{margin-right:6px}#Device_Show #Device_Show_Subjects{table-layout:fixed}#Device_Show #Device_Show_Subjects>tbody>tr>td{padding-top:0;height:100%}#Device_Show #Device_Show_Subjects>tbody>tr>td>div{position:relative}#Device_Show #Device_Show_Subjects>tbody>tr>td>div div.status{margin-top:2px;padding-top:2px;border-top:1px dashed #ddd}#Device_Show #Device_Show_Subjects>tbody>tr>td>div input.discreet{margin-left:-2px}#Device_Show #Device_Show_Subjects>tbody>tr>td:not(:last-child){border-right:1px dashed #aaa}#Device_Show #Device_Show_Subjects #Device_Show_Details table.verticalHeadings>tbody>tr>td:first-child{width:104px;font-weight:bold}#Device_Show #Device_Show_Subjects #Device_Show_Details #Device_Show_Details_Asset_Name{font-weight:bold}#Device_Show #Device_Show_Subjects #Device_Show_Details #Device_Show_Details_Asset_Enrolled_Trusted{display:inline-block;height:16px;padding-left:16px;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAACWUlEQVQ4y6XRXWiSURgHcJsXa4WNNuuyiy6CoAupixERoXXhmljuxaJiFrVA1i72cVFCOSMt8rNt2YfGO5g5Z1NstWW+c4ZBq4QpqMkEbZDSCObAMprjdf90sIjxsgUdODd/zvmd5zwPCwDrf/aGB7q6utgmk8ngdruzVqt10eVyTWu1Wuk/AXK5vMpoNPpjsRgGbU8/9fbdH/J4PAuRSARKpfLKhoBYLG595nTCaDSZVjPp6TPbHQ5H0mAwfBeJRHXrAp0dna9JcqCguX2H/Xd+S625aLFYQBDE8XWBd+8/TI6Njc+vzcfGX4nLX4FOp5OuC0wGAlS53NzaPPAm2Gi32+H3+5tYJEl+pigKoVAIPp+PnpqaosPhMF1uHB2Px2mv14vya6VgMKhhHGN3d/dSMplENptFIpHA3NwcCoUCSqUSKqvScZVKBbPZHGQEFApFMZ1OI5PJIBqNrkD5fB40Ta8AlcrUajVsNpufEbh+42YxHEkh+/UbUqlZpGd/lAH8WTMzMzDd64d7NMAMDOobi/OpHqh6rqK9jcCvBQncQzK0Xm5DPn0BJ4lz6GgVIkedYAaamxqK0dEDePl4FziczehTsZGLs7BnNwdiwRac4lejvp6La83VzABv/8FF/qG9oD/WQS/fhNptHEw8rEJiuAo7ubXACAtH9m0Fu2YHxQzweEuEVIYnaiFmvQ04f1aItksi5KaP4ZFGjDB5GG/7j4LL5YYYgZYW2c/yiJbv6h/A0EvC4RjGiOsFnK4J+KgABmyjsDufL0skki8CgYCoXOLz+TWrwG+kXMkgQ6yv+QAAAABJRU5ErkJggg==);background-repeat:no-repeat}#Device_Show #Device_Show_Subjects #Device_Show_Details #Device_Show_GenerateDocument_Container{padding-top:4px}#Device_Show #Device_Show_Subjects #Device_Show_Details #Device_Show_GenerateDocument_Container #Device_Show_GenerateDocument{padding:0}#Device_Show #Device_Show_Subjects #Device_Show_Policies table.verticalHeadings>tbody>tr>td:first-child{width:120px;font-weight:bold}#Device_Show #Device_Show_Subjects #Device_Show_Aspects #Device_Show_Aspects_Model_Image{display:block;width:256px;height:256px;margin:0 auto}#Device_Show #Device_Show_Subjects #Device_Show_Subjects_Actions>td{padding-top:4px}#DeviceDetailTabs{margin-top:10px;border-radius:0;background-image:none;background-color:#fff;border:none;padding:0}#DeviceDetailTabs #DeviceDetailTabItems{border-radius:0;border-top:1px solid #ddd;border-right:1px solid #ddd;border-left:1px solid #ddd;border-bottom:none;padding:2px 0 0 4px;background-image:none;background-color:#eee;display:table}#DeviceDetailTabs #DeviceDetailTabItems>li{top:0;border-radius:0;margin:0 5px 0 0;padding:0;line-height:normal;margin-right:4px}#DeviceDetailTabs #DeviceDetailTabItems>li>a{padding:5px 8px}#DeviceDetailTabs div.ui-tabs-panel{border-radius:0;padding:4px;border-right:1px solid #ddd;border-bottom:1px solid #ddd;border-left:1px solid #ddd;border-top:none;background-color:#eee}#Device_Show_Policies_Profile_Actions_Update_Dialog ul li,#Device_Show_Policies_Batch_Actions_Update_Dialog ul li{background-color:#fffLine truncated
|
||||
@@ -243,8 +243,11 @@
|
||||
border-top: none;
|
||||
background-color: #eee;
|
||||
}
|
||||
#jobShowResources #Comments {
|
||||
#jobShowResources #CommentsContainer {
|
||||
padding: 0;
|
||||
width: 375px;
|
||||
}
|
||||
#jobShowResources #Comments {
|
||||
height: 300px;
|
||||
padding: 0;
|
||||
border: 1px solid #cccccc;
|
||||
@@ -329,13 +332,19 @@
|
||||
background-color: #ededed;
|
||||
border: 1px solid #cccccc;
|
||||
}
|
||||
#jobShowResources #Attachments {
|
||||
height: 300px;
|
||||
#jobShowResources #AttachmentsContainer {
|
||||
padding: 0;
|
||||
border: 1px solid #cccccc;
|
||||
}
|
||||
#jobShowResources #Attachments {
|
||||
position: relative;
|
||||
height: 300px;
|
||||
border-top: 1px solid #cccccc;
|
||||
border-right: 1px solid #cccccc;
|
||||
border-bottom: 1px solid #cccccc;
|
||||
background-color: #ffffff;
|
||||
}
|
||||
#jobShowResources #Attachments div.attachmentOutput {
|
||||
position: relative;
|
||||
height: 249px;
|
||||
overflow: auto;
|
||||
}
|
||||
@@ -379,6 +388,9 @@
|
||||
height: 48px;
|
||||
width: 48px;
|
||||
}
|
||||
#jobShowResources #Attachments div.attachmentOutput > a span.icon img.loading {
|
||||
display: none;
|
||||
}
|
||||
#jobShowResources #Attachments div.attachmentOutput > a:hover {
|
||||
background-color: #ededed;
|
||||
border: 1px solid #cccccc;
|
||||
|
||||
@@ -215,8 +215,12 @@
|
||||
|
||||
|
||||
#jobShowResources {
|
||||
#Comments {
|
||||
#CommentsContainer {
|
||||
padding: 0;
|
||||
width: 375px;
|
||||
}
|
||||
|
||||
#Comments {
|
||||
height: 300px;
|
||||
padding: 0;
|
||||
border: 1px solid @SubtleBorderColour;
|
||||
@@ -318,13 +322,20 @@
|
||||
}
|
||||
}
|
||||
|
||||
#Attachments {
|
||||
height: 300px;
|
||||
#AttachmentsContainer {
|
||||
padding: 0;
|
||||
border: 1px solid @SubtleBorderColour;
|
||||
}
|
||||
|
||||
#Attachments {
|
||||
position: relative;
|
||||
height: 300px;
|
||||
border-top: 1px solid @SubtleBorderColour;
|
||||
border-right: 1px solid @SubtleBorderColour;
|
||||
border-bottom: 1px solid @SubtleBorderColour;
|
||||
background-color: @white;
|
||||
|
||||
div.attachmentOutput {
|
||||
position: relative;
|
||||
height: 249px;
|
||||
overflow: auto;
|
||||
|
||||
@@ -368,6 +379,10 @@
|
||||
img {
|
||||
height: 48px;
|
||||
width: 48px;
|
||||
|
||||
&.loading {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
.tableData{border:solid 1px #f4f4f4;border-collapse:collapse}.tableData>tbody>tr>td{border:solid 1px #f4f4f4;background-color:#fff}.tableData>tbody>tr:nth-child(odd)>td{background-color:#fcfcfc}.tableData>thead>tr>th,.tableData>tbody>tr>th{background-color:#f4f4f4;border:solid 1px #f4f4f4}.tableData>tbody>tr:hover>td{background-color:#fefefe}.tableData>tbody>tr:hover:nth-child(odd)>td{background-color:#fafafa}.tableData>tfoot>tr>th,.tableData>tfoot>tr>td{background-color:#f4f4f4}.tableDataDark{border:solid 1px #d8d8d8;border-collapse:collapse}.tableDataDark td{border:solid 1px #d8d8d8;background-color:#fff}.tableDataDark th{background-color:#eee;border:solid 1px #d8d8d8}.tableDataContainer{background-color:#fff}.tableDataVertical{border:solid 1px #f4f4f4;border-collapse:collapse}.tableDataVertical>tbody>tr:nth-child(odd){background-color:#f4f4f4;margin:0;padding:0}.tableDataVertical>tbody>tr>th.name{width:170px;text-align:right}.tableDataVertical table.sub>tbody>tr:not(:first-child)>th,.tableDataVertical table.sub>tbody>tr:not(:first-child)>td{border-top:1px dashed #aaa}.tableDataVertical table.sub>tbody>tr>th{font-weight:normal;text-align:right}.tableDataVertical table.sub>tbody>tr>th.name{text-align:right}.icon16{display:inline-block;height:16px;width:16px;margin-left:2px;cursor:pointer}.subtleUntilHover{-moz-opacity:.3;opacity:.3}.subtleUntilHover:hover{-moz-opacity:1;opacity:1}#layout_PageHeading #Job_Show_Status{margin-left:20px;display:inline-block;height:50px;font-family:"Segoe UI",Arial,Verdana,Tahoma,sans-serif;font-weight:lighter;font-stretch:condensed;font-size:.7em;text-transform:uppercase}#layout_PageHeading #Job_Show_Status span.icon{margin-right:6px}#layout_PageHeading #Job_Show_QueueStatus{display:inline-block;float:right;height:50px;font-size:.6em}#Job_List{padding-top:20px}#Job_List>.jobTable>h3{margin:30px 0 50px 20px!important}#Job_Show #Job_Show_Subjects{table-layout:fixed}#Job_Show #Job_Show_Subjects>tbody>tr>td{padding-top:0;height:100%}#Job_Show #Job_Show_Subjects>tbody>tr>td>div{position:relative}#Job_Show #Job_Show_Subjects>tbody>tr>td>div div.status{margin-top:2px;padding-top:2px;border-top:1px dashed #ddd}#Job_Show #Job_Show_Subjects>tbody>tr>td>div input.discreet{margin-left:-2px}#Job_Show #Job_Show_Subjects>tbody>tr>td:not(:last-child){border-right:1px dashed #aaa}#Job_Show #Job_Show_Subjects #Job_Show_Job #Job_Show_Job_Type>table{table-layout:fixed}#Job_Show #Job_Show_Subjects #Job_Show_Job #Job_Show_Job_SubTypes_1,#Job_Show #Job_Show_Subjects #Job_Show_Job #Job_Show_Job_SubTypes_2{padding-left:16px;font-weight:bold}#Job_Show #Job_Show_Subjects #Job_Show_Job #Job_Show_Job_SubTypes_Update{margin-left:16px;font-size:.9em}#Job_Show #Job_Show_Subjects #Job_Show_Job #Job_Show_Job_SubTypes_Update_Dialog{display:none}#Job_Show #Job_Show_Subjects #Job_Show_Job #Job_Show_Job_Dates{padding-bottom:6px}#Job_Show #Job_Show_Subjects #Job_Show_Job #Job_Show_Job_Dates table{table-layout:fixed}#Job_Show #Job_Show_Subjects #Job_Show_Job #Job_Show_Job_Dates table>tbody>tr>td{vertical-align:middle}#Job_Show #Job_Show_Subjects #Job_Show_Job #Job_Show_Job_Dates table>tbody>tr>td:first-child{font-weight:bold;width:60px}#Job_Show #Job_Show_Subjects #Job_Show_Job #Job_Show_GenerateDocument_Container{padding-top:4px}#Job_Show #Job_Show_Subjects #Job_Show_Job #Job_Show_GenerateDocument_Container #Job_Show_GenerateDocument{padding:0}#Job_Show #Job_Show_Subjects #Job_Show_Device>div{padding-left:102px;min-height:100px}#Job_Show #Job_Show_Subjects #Job_Show_Device #Job_Show_Device_Model_Image{position:absolute;left:0;top:0;height:96px;width:96px}#Job_Show #Job_Show_Subjects #Job_Show_Device #Job_Show_Device_Details{float:left}#Job_Show #Job_Show_Subjects #Job_Show_Device #Job_Show_Device_Details_HWar,#Job_Show #Job_Show_Subjects #Job_Show_Device #Job_Show_Device_Details_HNWar{float:right;border-left:1px dashed #ddd;padding-left:4px;margin-right:2px}#Job_Show #Job_Show_Subjects #Job_Show_Device #Job_Show_Device_Details_HWar_Details_Button,#Job_Show #Job_Show_Subjects #Job_Show_Device #Job_Show_Device_Details_HNWar_Details_Button{font-size:.9em}#Job_Show #Job_Show_Subjects #Job_Show_Device #Job_Show_Device_DeviceHeld table{table-layout:fixed}#Job_Show #Job_Show_Subjects #Job_Show_Device #Job_Show_Device_DeviceHeld table>tbody>tr>td:first-child{width:62px}#Job_Show #Job_Show_Subjects #Job_Show_Subjects_Actions>td{padding-top:4px}#Job_Show #Job_Show_Subjects #Job_Show_Subjects_Actions #Job_Show_Device_Actions{padding-left:111px}#jobDetailTabs{margin-top:10px;border-radius:0;background-image:none;background-color:#fff;border:none;padding:0}#jobDetailTabs #jobDetailTabItems{border-radius:0;border-top:1px solid #ddd;border-right:1px solid #ddd;border-left:1px solid #ddd;border-bottom:none;padding:2px 0 0 4px;background-image:none;background-color:#eee;display:table}#jobDetailTabs #jobDetailTabItems>li{top:0;border-radius:0;margin:0 5px 0 0;padding:0;line-height:normal;margin-right:4px}#jobDetailTabs #jobDetailTaLine truncated
|
||||
.tableData{border:solid 1px #f4f4f4;border-collapse:collapse}.tableData>tbody>tr>td{border:solid 1px #f4f4f4;background-color:#fff}.tableData>tbody>tr:nth-child(odd)>td{background-color:#fcfcfc}.tableData>thead>tr>th,.tableData>tbody>tr>th{background-color:#f4f4f4;border:solid 1px #f4f4f4}.tableData>tbody>tr:hover>td{background-color:#fefefe}.tableData>tbody>tr:hover:nth-child(odd)>td{background-color:#fafafa}.tableData>tfoot>tr>th,.tableData>tfoot>tr>td{background-color:#f4f4f4}.tableDataDark{border:solid 1px #d8d8d8;border-collapse:collapse}.tableDataDark td{border:solid 1px #d8d8d8;background-color:#fff}.tableDataDark th{background-color:#eee;border:solid 1px #d8d8d8}.tableDataContainer{background-color:#fff}.tableDataVertical{border:solid 1px #f4f4f4;border-collapse:collapse}.tableDataVertical>tbody>tr:nth-child(odd){background-color:#f4f4f4;margin:0;padding:0}.tableDataVertical>tbody>tr>th.name{width:170px;text-align:right}.tableDataVertical table.sub>tbody>tr:not(:first-child)>th,.tableDataVertical table.sub>tbody>tr:not(:first-child)>td{border-top:1px dashed #aaa}.tableDataVertical table.sub>tbody>tr>th{font-weight:normal;text-align:right}.tableDataVertical table.sub>tbody>tr>th.name{text-align:right}.icon16{display:inline-block;height:16px;width:16px;margin-left:2px;cursor:pointer}.subtleUntilHover{-moz-opacity:.3;opacity:.3}.subtleUntilHover:hover{-moz-opacity:1;opacity:1}#layout_PageHeading #Job_Show_Status{margin-left:20px;display:inline-block;height:50px;font-family:"Segoe UI",Arial,Verdana,Tahoma,sans-serif;font-weight:lighter;font-stretch:condensed;font-size:.7em;text-transform:uppercase}#layout_PageHeading #Job_Show_Status span.icon{margin-right:6px}#layout_PageHeading #Job_Show_QueueStatus{display:inline-block;float:right;height:50px;font-size:.6em}#Job_List{padding-top:20px}#Job_List>.jobTable>h3{margin:30px 0 50px 20px!important}#Job_Show #Job_Show_Subjects{table-layout:fixed}#Job_Show #Job_Show_Subjects>tbody>tr>td{padding-top:0;height:100%}#Job_Show #Job_Show_Subjects>tbody>tr>td>div{position:relative}#Job_Show #Job_Show_Subjects>tbody>tr>td>div div.status{margin-top:2px;padding-top:2px;border-top:1px dashed #ddd}#Job_Show #Job_Show_Subjects>tbody>tr>td>div input.discreet{margin-left:-2px}#Job_Show #Job_Show_Subjects>tbody>tr>td:not(:last-child){border-right:1px dashed #aaa}#Job_Show #Job_Show_Subjects #Job_Show_Job #Job_Show_Job_Type>table{table-layout:fixed}#Job_Show #Job_Show_Subjects #Job_Show_Job #Job_Show_Job_SubTypes_1,#Job_Show #Job_Show_Subjects #Job_Show_Job #Job_Show_Job_SubTypes_2{padding-left:16px;font-weight:bold}#Job_Show #Job_Show_Subjects #Job_Show_Job #Job_Show_Job_SubTypes_Update{margin-left:16px;font-size:.9em}#Job_Show #Job_Show_Subjects #Job_Show_Job #Job_Show_Job_SubTypes_Update_Dialog{display:none}#Job_Show #Job_Show_Subjects #Job_Show_Job #Job_Show_Job_Dates{padding-bottom:6px}#Job_Show #Job_Show_Subjects #Job_Show_Job #Job_Show_Job_Dates table{table-layout:fixed}#Job_Show #Job_Show_Subjects #Job_Show_Job #Job_Show_Job_Dates table>tbody>tr>td{vertical-align:middle}#Job_Show #Job_Show_Subjects #Job_Show_Job #Job_Show_Job_Dates table>tbody>tr>td:first-child{font-weight:bold;width:60px}#Job_Show #Job_Show_Subjects #Job_Show_Job #Job_Show_GenerateDocument_Container{padding-top:4px}#Job_Show #Job_Show_Subjects #Job_Show_Job #Job_Show_GenerateDocument_Container #Job_Show_GenerateDocument{padding:0}#Job_Show #Job_Show_Subjects #Job_Show_Device>div{padding-left:102px;min-height:100px}#Job_Show #Job_Show_Subjects #Job_Show_Device #Job_Show_Device_Model_Image{position:absolute;left:0;top:0;height:96px;width:96px}#Job_Show #Job_Show_Subjects #Job_Show_Device #Job_Show_Device_Details{float:left}#Job_Show #Job_Show_Subjects #Job_Show_Device #Job_Show_Device_Details_HWar,#Job_Show #Job_Show_Subjects #Job_Show_Device #Job_Show_Device_Details_HNWar{float:right;border-left:1px dashed #ddd;padding-left:4px;margin-right:2px}#Job_Show #Job_Show_Subjects #Job_Show_Device #Job_Show_Device_Details_HWar_Details_Button,#Job_Show #Job_Show_Subjects #Job_Show_Device #Job_Show_Device_Details_HNWar_Details_Button{font-size:.9em}#Job_Show #Job_Show_Subjects #Job_Show_Device #Job_Show_Device_DeviceHeld table{table-layout:fixed}#Job_Show #Job_Show_Subjects #Job_Show_Device #Job_Show_Device_DeviceHeld table>tbody>tr>td:first-child{width:62px}#Job_Show #Job_Show_Subjects #Job_Show_Subjects_Actions>td{padding-top:4px}#Job_Show #Job_Show_Subjects #Job_Show_Subjects_Actions #Job_Show_Device_Actions{padding-left:111px}#jobDetailTabs{margin-top:10px;border-radius:0;background-image:none;background-color:#fff;border:none;padding:0}#jobDetailTabs #jobDetailTabItems{border-radius:0;border-top:1px solid #ddd;border-right:1px solid #ddd;border-left:1px solid #ddd;border-bottom:none;padding:2px 0 0 4px;background-image:none;background-color:#eee;display:table}#jobDetailTabs #jobDetailTabItems>li{top:0;border-radius:0;margin:0 5px 0 0;padding:0;line-height:normal;margin-right:4px}#jobDetailTabs #jobDetailTaLine truncated
|
||||
@@ -1082,6 +1082,106 @@ div.form > table table.sub > tbody > tr > th.name {
|
||||
border-right: none;
|
||||
padding-right: 0;
|
||||
}
|
||||
div.disco-attachmentUpload-dropTarget {
|
||||
display: none;
|
||||
}
|
||||
div.disco-attachmentUpload-dropTarget.dragHighlight {
|
||||
display: block;
|
||||
position: absolute;
|
||||
z-index: 1000;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: calc(100% - 6px);
|
||||
height: calc(100% - 6px);
|
||||
background-color: rgba(251, 218, 152, 0.5);
|
||||
border: 3px dashed #f0a30a;
|
||||
}
|
||||
div.disco-attachmentUpload-dropTarget.dragHighlight h2 {
|
||||
margin-top: 3em !important;
|
||||
color: #2c1e02;
|
||||
text-align: center;
|
||||
font-weight: bold;
|
||||
}
|
||||
div.disco-attachmentUpload-dropTarget.dragHighlight.dragHover {
|
||||
background-color: rgba(173, 235, 110, 0.5);
|
||||
border: 3px dashed #60a917;
|
||||
}
|
||||
div.disco-attachmentUpload-dropTarget.dragHighlight.dragHover h2 {
|
||||
color: #000000;
|
||||
}
|
||||
div.disco-attachmentUpload-progress {
|
||||
position: absolute;
|
||||
right: 0px;
|
||||
bottom: 48px;
|
||||
}
|
||||
div.disco-attachmentUpload-progress > div {
|
||||
background-color: #fafafa;
|
||||
padding: 4px 8px;
|
||||
}
|
||||
div.disco-attachmentUpload-progress > div i {
|
||||
color: #1e6dab;
|
||||
margin-right: 4px;
|
||||
}
|
||||
div.disco-attachmentUpload-commentDialog {
|
||||
padding: 0.25em 0.5em !important;
|
||||
}
|
||||
div.disco-attachmentUpload-commentDialog table {
|
||||
border: solid 1px #f4f4f4;
|
||||
border-collapse: collapse;
|
||||
table-layout: fixed;
|
||||
}
|
||||
div.disco-attachmentUpload-commentDialog table > tbody > tr > td {
|
||||
border: solid 1px #f4f4f4;
|
||||
background-color: #ffffff;
|
||||
}
|
||||
div.disco-attachmentUpload-commentDialog table > tbody > tr:nth-child(odd) > td {
|
||||
background-color: #fcfcfc;
|
||||
}
|
||||
div.disco-attachmentUpload-commentDialog table > thead > tr > th,
|
||||
div.disco-attachmentUpload-commentDialog table > tbody > tr > th {
|
||||
background-color: #f4f4f4;
|
||||
border: solid 1px #f4f4f4;
|
||||
}
|
||||
div.disco-attachmentUpload-commentDialog table > tbody > tr:hover > td {
|
||||
background-color: #fefefe;
|
||||
}
|
||||
div.disco-attachmentUpload-commentDialog table > tbody > tr:hover:nth-child(odd) > td {
|
||||
background-color: #fafafa;
|
||||
}
|
||||
div.disco-attachmentUpload-commentDialog table > tfoot > tr > th,
|
||||
div.disco-attachmentUpload-commentDialog table > tfoot > tr > td {
|
||||
background-color: #f4f4f4;
|
||||
}
|
||||
div.disco-attachmentUpload-commentDialog table th {
|
||||
width: 80px;
|
||||
}
|
||||
div.disco-attachmentUpload-commentDialog table td.filename {
|
||||
font-family: Consolas, "Courier New", monospace;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
-ms-text-overflow: ellipsis;
|
||||
-o-text-overflow: ellipsis;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
div.disco-attachmentUpload-commentDialog table input.comments {
|
||||
width: calc(100% - 5px);
|
||||
}
|
||||
div.disco-attachmentUpload-commentDialog table td.thumbnail {
|
||||
display: none;
|
||||
text-align: center;
|
||||
}
|
||||
div.disco-attachmentUpload-commentDialog table td.thumbnail img {
|
||||
border: 1px solid #9e9e9e;
|
||||
max-height: 250px;
|
||||
max-width: 374px;
|
||||
}
|
||||
div.disco-attachmentUpload-imageDialog {
|
||||
background-color: #000000 !important;
|
||||
padding: 0 !important;
|
||||
overflow: hidden !important;
|
||||
width: 720px !important;
|
||||
height: 540px !important;
|
||||
}
|
||||
.d-priority-high {
|
||||
color: #fa6800;
|
||||
width: 1.2857142857142858em;
|
||||
|
||||
@@ -907,9 +907,9 @@ select {
|
||||
color: #444;
|
||||
}
|
||||
|
||||
select.small {
|
||||
padding: 0;
|
||||
}
|
||||
select.small {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
input[type="submit"], button {
|
||||
font-family: @FontFamilyBody;
|
||||
@@ -1075,6 +1075,100 @@ div.form {
|
||||
}
|
||||
}
|
||||
|
||||
// Attachment Uploader
|
||||
div.disco-attachmentUpload-dropTarget {
|
||||
display: none;
|
||||
|
||||
&.dragHighlight {
|
||||
display: block;
|
||||
position: absolute;
|
||||
z-index: 1000;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: calc(~"100% - 6px");
|
||||
height: calc(~"100% - 6px");
|
||||
background-color: fadeOut(lighten(@ThemeAmber, 30%), 50%);
|
||||
border: 3px dashed @ThemeAmber;
|
||||
|
||||
h2 {
|
||||
margin-top: 3em !important;
|
||||
color: darken(@ThemeAmber, 40%);
|
||||
text-align: center;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
&.dragHover {
|
||||
background-color: fadeOut(lighten(@ThemeGreen, 30%), 50%);
|
||||
border: 3px dashed @ThemeGreen;
|
||||
|
||||
h2 {
|
||||
color: darken(@ThemeGreen, 40%);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
div.disco-attachmentUpload-progress {
|
||||
position: absolute;
|
||||
right: 0px;
|
||||
bottom: 48px;
|
||||
|
||||
& > div {
|
||||
background-color: @BackgroundColourLight;
|
||||
padding: 4px 8px;
|
||||
|
||||
i {
|
||||
color: @StatusInformation;
|
||||
margin-right: 4px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
div.disco-attachmentUpload-commentDialog {
|
||||
padding: 0.25em 0.5em !important;
|
||||
|
||||
table {
|
||||
.tableData;
|
||||
table-layout: fixed;
|
||||
|
||||
th {
|
||||
width: 80px;
|
||||
}
|
||||
|
||||
td.filename {
|
||||
font-family: @FontFamilyMono;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
-ms-text-overflow: ellipsis;
|
||||
-o-text-overflow: ellipsis;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
input.comments {
|
||||
width: calc(~"100% - 5px");
|
||||
}
|
||||
|
||||
td.thumbnail {
|
||||
display: none;
|
||||
text-align: center;
|
||||
|
||||
img {
|
||||
border: 1px solid @ButtonHoverColour;
|
||||
max-height: 250px;
|
||||
max-width: 374px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
div.disco-attachmentUpload-imageDialog {
|
||||
background-color: @black !important;
|
||||
padding: 0 !important;
|
||||
overflow: hidden !important;
|
||||
width: 720px !important;
|
||||
height: 540px !important;
|
||||
}
|
||||
|
||||
// Priority Colours
|
||||
.d-priority-high {
|
||||
color: @PriorityHigh;
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
.tableData{border:solid 1px #f4f4f4;border-collapse:collapse}.tableData>tbody>tr>td{border:solid 1px #f4f4f4;background-color:#fff}.tableData>tbody>tr:nth-child(odd)>td{background-color:#fcfcfc}.tableData>thead>tr>th,.tableData>tbody>tr>th{background-color:#f4f4f4;border:solid 1px #f4f4f4}.tableData>tbody>tr:hover>td{background-color:#fefefe}.tableData>tbody>tr:hover:nth-child(odd)>td{background-color:#fafafa}.tableData>tfoot>tr>th,.tableData>tfoot>tr>td{background-color:#f4f4f4}.tableDataDark{border:solid 1px #d8d8d8;border-collapse:collapse}.tableDataDark td{border:solid 1px #d8d8d8;background-color:#fff}.tableDataDark th{background-color:#eee;border:solid 1px #d8d8d8}.tableDataContainer{background-color:#fff}.tableDataVertical{border:solid 1px #f4f4f4;border-collapse:collapse}.tableDataVertical>tbody>tr:nth-child(odd){background-color:#f4f4f4;margin:0;padding:0}.tableDataVertical>tbody>tr>th.name{width:170px;text-align:right}.tableDataVertical table.sub>tbody>tr:not(:first-child)>th,.tableDataVertical table.sub>tbody>tr:not(:first-child)>td{border-top:1px dashed #aaa}.tableDataVertical table.sub>tbody>tr>th{font-weight:normal;text-align:right}.tableDataVertical table.sub>tbody>tr>th.name{text-align:right}.icon16{display:inline-block;height:16px;width:16px;margin-left:2px;cursor:pointer}.subtleUntilHover{-moz-opacity:.3;opacity:.3}.subtleUntilHover:hover{-moz-opacity:1;opacity:1}body{font-size:12px;font-family:"Segoe UI",Arial,Verdana,Tahoma,sans-serif;margin:0;padding:0;color:#333}body.layout{background:url(data:image/png;base64,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) left top repeat-x #d1d1d1;background:linear-gradient(to bottom,#f2f2f2 0,#d1d1d1 370px) left top repeat-x #d1d1d1;min-height:370px}.page{max-width:1232px;min-width:768px;margin-left:auto;margin-right:auto}header,#header{position:relative;background-color:#333;margin:0;padding:0;height:34px}header #heading,#header #heading{float:left;height:34px}header #heading i,#header #headiLine truncated
|
||||
.tableData{border:solid 1px #f4f4f4;border-collapse:collapse}.tableData>tbody>tr>td{border:solid 1px #f4f4f4;background-color:#fff}.tableData>tbody>tr:nth-child(odd)>td{background-color:#fcfcfc}.tableData>thead>tr>th,.tableData>tbody>tr>th{background-color:#f4f4f4;border:solid 1px #f4f4f4}.tableData>tbody>tr:hover>td{background-color:#fefefe}.tableData>tbody>tr:hover:nth-child(odd)>td{background-color:#fafafa}.tableData>tfoot>tr>th,.tableData>tfoot>tr>td{background-color:#f4f4f4}.tableDataDark{border:solid 1px #d8d8d8;border-collapse:collapse}.tableDataDark td{border:solid 1px #d8d8d8;background-color:#fff}.tableDataDark th{background-color:#eee;border:solid 1px #d8d8d8}.tableDataContainer{background-color:#fff}.tableDataVertical{border:solid 1px #f4f4f4;border-collapse:collapse}.tableDataVertical>tbody>tr:nth-child(odd){background-color:#f4f4f4;margin:0;padding:0}.tableDataVertical>tbody>tr>th.name{width:170px;text-align:right}.tableDataVertical table.sub>tbody>tr:not(:first-child)>th,.tableDataVertical table.sub>tbody>tr:not(:first-child)>td{border-top:1px dashed #aaa}.tableDataVertical table.sub>tbody>tr>th{font-weight:normal;text-align:right}.tableDataVertical table.sub>tbody>tr>th.name{text-align:right}.icon16{display:inline-block;height:16px;width:16px;margin-left:2px;cursor:pointer}.subtleUntilHover{-moz-opacity:.3;opacity:.3}.subtleUntilHover:hover{-moz-opacity:1;opacity:1}body{font-size:12px;font-family:"Segoe UI",Arial,Verdana,Tahoma,sans-serif;margin:0;padding:0;color:#333}body.layout{background:url(data:image/png;base64,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) left top repeat-x #d1d1d1;background:linear-gradient(to bottom,#f2f2f2 0,#d1d1d1 370px) left top repeat-x #d1d1d1;min-height:370px}.page{max-width:1232px;min-width:768px;margin-left:auto;margin-right:auto}header,#header{position:relative;background-color:#333;margin:0;padding:0;height:34px}header #heading,#header #heading{float:left;height:34px}header #heading i,#header #headiLine truncated
|
||||
@@ -231,12 +231,16 @@
|
||||
#UserDetailTab-Authorization #UserDetailTab-Authorization_NoAccess h3 {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
#userShowResources #Attachments {
|
||||
#userShowResources #AttachmentsContainer {
|
||||
padding: 0;
|
||||
}
|
||||
#userShowResources #Attachments {
|
||||
position: relative;
|
||||
border: 1px solid #cccccc;
|
||||
background-color: #ffffff;
|
||||
}
|
||||
#userShowResources #Attachments div.attachmentOutput {
|
||||
position: relative;
|
||||
height: 115px;
|
||||
overflow: auto;
|
||||
font-size: 0.95em;
|
||||
@@ -281,6 +285,9 @@
|
||||
height: 48px;
|
||||
width: 48px;
|
||||
}
|
||||
#userShowResources #Attachments div.attachmentOutput > a span.icon img.loading {
|
||||
display: none;
|
||||
}
|
||||
#userShowResources #Attachments div.attachmentOutput > a:hover span.remove {
|
||||
opacity: .5;
|
||||
}
|
||||
|
||||
@@ -206,12 +206,17 @@
|
||||
|
||||
|
||||
#userShowResources {
|
||||
#Attachments {
|
||||
#AttachmentsContainer {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
#Attachments {
|
||||
position: relative;
|
||||
border: 1px solid @SubtleBorderColour;
|
||||
background-color: @white;
|
||||
|
||||
div.attachmentOutput {
|
||||
position: relative;
|
||||
height: 115px;
|
||||
overflow: auto;
|
||||
font-size: 0.95em;
|
||||
@@ -256,6 +261,10 @@
|
||||
img {
|
||||
height: 48px;
|
||||
width: 48px;
|
||||
|
||||
&.loading {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -272,8 +281,7 @@
|
||||
cursor: pointer;
|
||||
opacity: 0;
|
||||
|
||||
&:hover
|
||||
{
|
||||
&:hover {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
@@ -290,8 +298,7 @@
|
||||
background-color: @white;
|
||||
padding: 3px;
|
||||
|
||||
span.action
|
||||
{
|
||||
span.action {
|
||||
color: @HeaderBackgroundColour;
|
||||
display: block;
|
||||
margin: 0 4px 0 0;
|
||||
@@ -301,8 +308,7 @@
|
||||
border: 1px solid @white;
|
||||
padding: .5em;
|
||||
|
||||
&:hover
|
||||
{
|
||||
&:hover {
|
||||
color: @HyperLinkColour;
|
||||
background-color: @SubtleColour;
|
||||
border: 1px solid @SubtleBorderColour;
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
.tableData{border:solid 1px #f4f4f4;border-collapse:collapse}.tableData>tbody>tr>td{border:solid 1px #f4f4f4;background-color:#fff}.tableData>tbody>tr:nth-child(odd)>td{background-color:#fcfcfc}.tableData>thead>tr>th,.tableData>tbody>tr>th{background-color:#f4f4f4;border:solid 1px #f4f4f4}.tableData>tbody>tr:hover>td{background-color:#fefefe}.tableData>tbody>tr:hover:nth-child(odd)>td{background-color:#fafafa}.tableData>tfoot>tr>th,.tableData>tfoot>tr>td{background-color:#f4f4f4}.tableDataDark{border:solid 1px #d8d8d8;border-collapse:collapse}.tableDataDark td{border:solid 1px #d8d8d8;background-color:#fff}.tableDataDark th{background-color:#eee;border:solid 1px #d8d8d8}.tableDataContainer{background-color:#fff}.tableDataVertical{border:solid 1px #f4f4f4;border-collapse:collapse}.tableDataVertical>tbody>tr:nth-child(odd){background-color:#f4f4f4;margin:0;padding:0}.tableDataVertical>tbody>tr>th.name{width:170px;text-align:right}.tableDataVertical table.sub>tbody>tr:not(:first-child)>th,.tableDataVertical table.sub>tbody>tr:not(:first-child)>td{border-top:1px dashed #aaa}.tableDataVertical table.sub>tbody>tr>th{font-weight:normal;text-align:right}.tableDataVertical table.sub>tbody>tr>th.name{text-align:right}.icon16{display:inline-block;height:16px;width:16px;margin-left:2px;cursor:pointer}.subtleUntilHover{-moz-opacity:.3;opacity:.3}.subtleUntilHover:hover{-moz-opacity:1;opacity:1}#User_Show #User_Show_Subjects{table-layout:fixed}#User_Show #User_Show_Subjects>tbody>tr>td{padding-top:0;height:100%}#User_Show #User_Show_Subjects>tbody>tr>td>div{position:relative}#User_Show #User_Show_Subjects>tbody>tr>td>div div.status{margin-top:2px;padding-top:2px;border-top:1px dashed #ddd}#User_Show #User_Show_Subjects>tbody>tr>td>div input.discreet{margin-left:-2px}#User_Show #User_Show_Subjects>tbody>tr>td:not(:last-child){border-right:1px dashed #aaa}#User_Show #User_Show_Subjects #User_Show_Details{width:330px}#User_Show #User_Show_Subjects #User_Show_Details table.verticalHeadings>tbody>tr>td:first-child{width:104px;font-weight:bold}#User_Show #User_Show_Subjects #User_Show_Details #User_Show_Details_Identity_Id{font-weight:bold}#User_Show #User_Show_Subjects #User_Show_Details #User_Show_GenerateDocument_Container{padding-top:4px}#User_Show #User_Show_Subjects #User_Show_Details #User_Show_GenerateDocument_Container #User_Show_GenerateDocument{padding:0}#User_Show #User_Show_Subjects #User_Show_Details #User_Show_Details_Actions{margin-top:4px}#User_Show #User_Show_Subjects #User_Show_AssignedDevices .User_Show_AssignedDevices_CurrentAssignment{border-bottom:1px dashed #ddd;padding:4px}#User_Show #User_Show_Subjects #User_Show_AssignedDevices .User_Show_AssignedDevices_CurrentAssignment td:first-child{width:90px;font-weight:bold}#User_Show #User_Show_Subjects #User_Show_AssignedDevices .User_Show_AssignedDevices_CurrentAssignment img.User_Show_AssignedDevices_CurrentAssignment_Image{float:left;width:64px;height:64px;margin-right:6px}#User_Show #User_Show_Subjects #User_Show_AssignedDevices .User_Show_AssignedDevices_CurrentAssignment div.User_Show_AssignedDevices_CurrentAssignment_Details{float:left}#User_Show #User_Show_Subjects #User_Show_Subjects_Actions>td{padding-top:4px}#UserDetailTabs{margin-top:10px;border-radius:0;background-image:none;background-color:#fff;border:none;padding:0}#UserDetailTabs #UserDetailTabItems{border-radius:0;border-top:1px solid #ddd;border-right:1px solid #ddd;border-left:1px solid #ddd;border-bottom:none;padding:2px 0 0 4px;background-image:none;background-color:#eee;display:table}#UserDetailTabs #UserDetailTabItems>li{top:0;border-radius:0;margin:0 5px 0 0;padding:0;line-height:normal;margin-right:4px}#UserDetailTabs #UserDetailTabItems>li>a{padding:5px 8px}#UserDetailTabs div.ui-tabs-panel{border-radius:0;padding:4px;border-right:1px solid #ddd;border-bottom:1px solid #ddd;border-left:1px solid #ddd;border-top:none;background-color:#eee}#UserDetailTab-JobsContainer div.jobTable{margin:-1px;border:1px solid #ddd}#UserDetailTab-JobsContainer .dataTables_wrapper .dataTables_filter{margin-top:-24px;-moz-opacity:1;opacity:1}#UserDetailTab-JobsContainer .dataTables_wrapper .dataTables_length{margin-top:-24px;-moz-opacity:1;opacity:1}#UserDetailTab-JobsContainer .dataTables_wrapper .dataTables_showStatusClosed{right:220px;margin-top:-24px}#UserDetailTab-Authorization #UserDetailTab-AuthorizationContainer{background-color:#fff;border:1px solid #ccc}#UserDetailTab-Authorization #UserDetailTab-Authorization_ClaimsTree_Container{width:50%;float:left;padding:6px 10px 6px 4px}#UserDetailTab-Authorization #UserDetailTab-Authorization_ClaimsTree_Container>span.smallMessage:last-child{display:block;text-align:right}#UserDetailTab-Authorization #UserDetailTab-Authorization_Membership{width:40%;float:right;padding:6px 10px;border-left:1px dashed #ccc;border-bottom:1px dashed #ccc}#UserDetailTab-Authorization #UserDetailTab-Authorization_Membership #UserDetailTab-Authorization_Membership_Roles{margLine truncated
|
||||
.tableData{border:solid 1px #f4f4f4;border-collapse:collapse}.tableData>tbody>tr>td{border:solid 1px #f4f4f4;background-color:#fff}.tableData>tbody>tr:nth-child(odd)>td{background-color:#fcfcfc}.tableData>thead>tr>th,.tableData>tbody>tr>th{background-color:#f4f4f4;border:solid 1px #f4f4f4}.tableData>tbody>tr:hover>td{background-color:#fefefe}.tableData>tbody>tr:hover:nth-child(odd)>td{background-color:#fafafa}.tableData>tfoot>tr>th,.tableData>tfoot>tr>td{background-color:#f4f4f4}.tableDataDark{border:solid 1px #d8d8d8;border-collapse:collapse}.tableDataDark td{border:solid 1px #d8d8d8;background-color:#fff}.tableDataDark th{background-color:#eee;border:solid 1px #d8d8d8}.tableDataContainer{background-color:#fff}.tableDataVertical{border:solid 1px #f4f4f4;border-collapse:collapse}.tableDataVertical>tbody>tr:nth-child(odd){background-color:#f4f4f4;margin:0;padding:0}.tableDataVertical>tbody>tr>th.name{width:170px;text-align:right}.tableDataVertical table.sub>tbody>tr:not(:first-child)>th,.tableDataVertical table.sub>tbody>tr:not(:first-child)>td{border-top:1px dashed #aaa}.tableDataVertical table.sub>tbody>tr>th{font-weight:normal;text-align:right}.tableDataVertical table.sub>tbody>tr>th.name{text-align:right}.icon16{display:inline-block;height:16px;width:16px;margin-left:2px;cursor:pointer}.subtleUntilHover{-moz-opacity:.3;opacity:.3}.subtleUntilHover:hover{-moz-opacity:1;opacity:1}#User_Show #User_Show_Subjects{table-layout:fixed}#User_Show #User_Show_Subjects>tbody>tr>td{padding-top:0;height:100%}#User_Show #User_Show_Subjects>tbody>tr>td>div{position:relative}#User_Show #User_Show_Subjects>tbody>tr>td>div div.status{margin-top:2px;padding-top:2px;border-top:1px dashed #ddd}#User_Show #User_Show_Subjects>tbody>tr>td>div input.discreet{margin-left:-2px}#User_Show #User_Show_Subjects>tbody>tr>td:not(:last-child){border-right:1px dashed #aaa}#User_Show #User_Show_Subjects #User_Show_Details{width:330px}#User_Show #User_Show_Subjects #User_Show_Details table.verticalHeadings>tbody>tr>td:first-child{width:104px;font-weight:bold}#User_Show #User_Show_Subjects #User_Show_Details #User_Show_Details_Identity_Id{font-weight:bold}#User_Show #User_Show_Subjects #User_Show_Details #User_Show_GenerateDocument_Container{padding-top:4px}#User_Show #User_Show_Subjects #User_Show_Details #User_Show_GenerateDocument_Container #User_Show_GenerateDocument{padding:0}#User_Show #User_Show_Subjects #User_Show_Details #User_Show_Details_Actions{margin-top:4px}#User_Show #User_Show_Subjects #User_Show_AssignedDevices .User_Show_AssignedDevices_CurrentAssignment{border-bottom:1px dashed #ddd;padding:4px}#User_Show #User_Show_Subjects #User_Show_AssignedDevices .User_Show_AssignedDevices_CurrentAssignment td:first-child{width:90px;font-weight:bold}#User_Show #User_Show_Subjects #User_Show_AssignedDevices .User_Show_AssignedDevices_CurrentAssignment img.User_Show_AssignedDevices_CurrentAssignment_Image{float:left;width:64px;height:64px;margin-right:6px}#User_Show #User_Show_Subjects #User_Show_AssignedDevices .User_Show_AssignedDevices_CurrentAssignment div.User_Show_AssignedDevices_CurrentAssignment_Details{float:left}#User_Show #User_Show_Subjects #User_Show_Subjects_Actions>td{padding-top:4px}#UserDetailTabs{margin-top:10px;border-radius:0;background-image:none;background-color:#fff;border:none;padding:0}#UserDetailTabs #UserDetailTabItems{border-radius:0;border-top:1px solid #ddd;border-right:1px solid #ddd;border-left:1px solid #ddd;border-bottom:none;padding:2px 0 0 4px;background-image:none;background-color:#eee;display:table}#UserDetailTabs #UserDetailTabItems>li{top:0;border-radius:0;margin:0 5px 0 0;padding:0;line-height:normal;margin-right:4px}#UserDetailTabs #UserDetailTabItems>li>a{padding:5px 8px}#UserDetailTabs div.ui-tabs-panel{border-radius:0;padding:4px;border-right:1px solid #ddd;border-bottom:1px solid #ddd;border-left:1px solid #ddd;border-top:none;background-color:#eee}#UserDetailTab-JobsContainer div.jobTable{margin:-1px;border:1px solid #ddd}#UserDetailTab-JobsContainer .dataTables_wrapper .dataTables_filter{margin-top:-24px;-moz-opacity:1;opacity:1}#UserDetailTab-JobsContainer .dataTables_wrapper .dataTables_length{margin-top:-24px;-moz-opacity:1;opacity:1}#UserDetailTab-JobsContainer .dataTables_wrapper .dataTables_showStatusClosed{right:220px;margin-top:-24px}#UserDetailTab-Authorization #UserDetailTab-AuthorizationContainer{background-color:#fff;border:1px solid #ccc}#UserDetailTab-Authorization #UserDetailTab-Authorization_ClaimsTree_Container{width:50%;float:left;padding:6px 10px 6px 4px}#UserDetailTab-Authorization #UserDetailTab-Authorization_ClaimsTree_Container>span.smallMessage:last-child{display:block;text-align:right}#UserDetailTab-Authorization #UserDetailTab-Authorization_Membership{width:40%;float:right;padding:6px 10px;border-left:1px dashed #ccc;border-bottom:1px dashed #ccc}#UserDetailTab-Authorization #UserDetailTab-Authorization_Membership #UserDetailTab-Authorization_Membership_Roles{margLine truncated
|
||||
+14
-13
@@ -948,7 +948,6 @@
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="ClientBin\Disco.ClientBootstrapper.exe" />
|
||||
<Content Include="ClientBin\Disco.Silverlight.AttachmentUpload.xap" />
|
||||
<None Include="Areas\Config\Views\AuthorizationRole\Create.cshtml">
|
||||
<Generator>RazorGenerator</Generator>
|
||||
<LastGenOutput>Create.generated.cs</LastGenOutput>
|
||||
@@ -1015,6 +1014,16 @@
|
||||
<Content Include="ClientSource\Scripts\Core.min.js">
|
||||
<DependentUpon>Core.js.bundle</DependentUpon>
|
||||
</Content>
|
||||
<None Include="ClientSource\Scripts\Modules\Disco-AttachmentUploader.js">
|
||||
<DependentUpon>Disco-AttachmentUploader.js.bundle</DependentUpon>
|
||||
</None>
|
||||
<Content Include="ClientSource\Scripts\Modules\Disco-AttachmentUploader.min.js">
|
||||
<DependentUpon>Disco-AttachmentUploader.js.bundle</DependentUpon>
|
||||
</Content>
|
||||
<None Include="ClientSource\Scripts\Modules\Disco-AttachmentUploader.js.bundle" />
|
||||
<None Include="ClientSource\Scripts\Modules\Disco-AttachmentUploader.min.js.map">
|
||||
<DependentUpon>Disco-AttachmentUploader.js.bundle</DependentUpon>
|
||||
</None>
|
||||
<None Include="ClientSource\Scripts\Modules\jQuery-Fancytree.js">
|
||||
<DependentUpon>jQuery-Fancytree.js.bundle</DependentUpon>
|
||||
</None>
|
||||
@@ -1064,6 +1073,8 @@
|
||||
<None Include="ClientSource\Scripts\Modules\Disco-CreateJob.js">
|
||||
<DependentUpon>Disco-CreateJob.js.bundle</DependentUpon>
|
||||
</None>
|
||||
<None Include="ClientSource\Scripts\Modules\Disco-AttachmentUploader\webcam.js" />
|
||||
<Content Include="ClientSource\Scripts\Modules\Disco-AttachmentUploader\webcam.swf" />
|
||||
<Content Include="ClientSource\Scripts\Modules\Disco-CreateJob.min.js">
|
||||
<DependentUpon>Disco-CreateJob.js.bundle</DependentUpon>
|
||||
</Content>
|
||||
@@ -1082,6 +1093,7 @@
|
||||
<None Include="ClientSource\Scripts\Modules\Disco-jQueryExtensions.js">
|
||||
<DependentUpon>Disco-jQueryExtensions.js.bundle</DependentUpon>
|
||||
</None>
|
||||
<None Include="ClientSource\Scripts\Modules\Disco-AttachmentUploader\disco-attachmentuploader.js" />
|
||||
<Content Include="ClientSource\Scripts\Modules\Disco-jQueryExtensions.min.js">
|
||||
<DependentUpon>Disco-jQueryExtensions.js.bundle</DependentUpon>
|
||||
</Content>
|
||||
@@ -1136,10 +1148,6 @@
|
||||
<DependentUpon>Shadowbox.js.bundle</DependentUpon>
|
||||
</None>
|
||||
<None Include="ClientSource\Scripts\Modules\Shadowbox\shadowbox.js" />
|
||||
<None Include="ClientSource\Scripts\Modules\Silverlight.min.js.map">
|
||||
<DependentUpon>Silverlight.js.bundle</DependentUpon>
|
||||
</None>
|
||||
<None Include="ClientSource\Scripts\Modules\Silverlight\Silverlight.js" />
|
||||
<None Include="ClientSource\Scripts\Modules\jQuery-SignalR.js">
|
||||
<DependentUpon>jQuery-SignalR.js.bundle</DependentUpon>
|
||||
</None>
|
||||
@@ -1171,12 +1179,6 @@
|
||||
<Content Include="ClientSource\Scripts\Modules\Shadowbox.min.js">
|
||||
<DependentUpon>Shadowbox.js.bundle</DependentUpon>
|
||||
</Content>
|
||||
<None Include="ClientSource\Scripts\Modules\Silverlight.js">
|
||||
<DependentUpon>Silverlight.js.bundle</DependentUpon>
|
||||
</None>
|
||||
<Content Include="ClientSource\Scripts\Modules\Silverlight.min.js">
|
||||
<DependentUpon>Silverlight.js.bundle</DependentUpon>
|
||||
</Content>
|
||||
<None Include="ClientSource\Scripts\Modules\Timeline.min.js.map">
|
||||
<DependentUpon>Timeline.js.bundle</DependentUpon>
|
||||
</None>
|
||||
@@ -1506,7 +1508,6 @@
|
||||
<None Include="ClientSource\Scripts\Modules\Disco-CreateJob.js.bundle" />
|
||||
<None Include="ClientSource\Scripts\Modules\tinymce.js.bundle" />
|
||||
<None Include="ClientSource\Scripts\Modules\Timeline.js.bundle" />
|
||||
<None Include="ClientSource\Scripts\Modules\Silverlight.js.bundle" />
|
||||
<None Include="ClientSource\Scripts\Modules\Shadowbox.js.bundle" />
|
||||
<None Include="ClientSource\Scripts\Modules\Knockout.js.bundle" />
|
||||
<None Include="ClientSource\Scripts\Modules\jQueryUI-TimePicker.js.bundle" />
|
||||
@@ -2111,7 +2112,7 @@
|
||||
<SaveServerSettingsInUserFile>False</SaveServerSettingsInUserFile>
|
||||
</WebProjectProperties>
|
||||
</FlavorProperties>
|
||||
<UserProperties BuildVersion_UpdateFileVersion="True" BuildVersion_UpdateAssemblyVersion="True" BuildVersion_BuildVersioningStyle="None.DeltaBaseYear.MonthAndDayStamp.TimeStamp" BuildVersion_DetectChanges="False" BuildVersion_UseGlobalSettings="False" BuildVersion_BuildAction="Both" BuildVersion_StartDate="2011/7/1" />
|
||||
<UserProperties BuildVersion_StartDate="2011/7/1" BuildVersion_BuildAction="Both" BuildVersion_UseGlobalSettings="False" BuildVersion_DetectChanges="False" BuildVersion_BuildVersioningStyle="None.DeltaBaseYear.MonthAndDayStamp.TimeStamp" BuildVersion_UpdateAssemblyVersion="True" BuildVersion_UpdateFileVersion="True" />
|
||||
</VisualStudio>
|
||||
</ProjectExtensions>
|
||||
<Import Project="$(SolutionDir)\.nuget\nuget.targets" />
|
||||
|
||||
+14
-13
@@ -188,6 +188,20 @@ namespace Links
|
||||
public static readonly string Disco_AjaxHelperIcons_min_js = Url("Disco-AjaxHelperIcons.min.js");
|
||||
public static readonly string Disco_AjaxHelperIcons_min_js_map = Url("Disco-AjaxHelperIcons.min.js.map");
|
||||
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||
public static class Disco_AttachmentUploader {
|
||||
private const string URLPATH = "~/ClientSource/Scripts/Modules/Disco-AttachmentUploader";
|
||||
public static string Url() { return T4MVCHelpers.ProcessVirtualPath(URLPATH); }
|
||||
public static string Url(string fileName) { return T4MVCHelpers.ProcessVirtualPath(URLPATH + "/" + fileName); }
|
||||
public static readonly string disco_attachmentuploader_js = T4MVCHelpers.IsProduction() && T4Extensions.FileExists(URLPATH + "/disco-attachmentuploader.min.js") ? Url("disco-attachmentuploader.min.js") : Url("disco-attachmentuploader.js");
|
||||
public static readonly string webcam_js = T4MVCHelpers.IsProduction() && T4Extensions.FileExists(URLPATH + "/webcam.min.js") ? Url("webcam.min.js") : Url("webcam.js");
|
||||
public static readonly string webcam_swf = Url("webcam.swf");
|
||||
}
|
||||
|
||||
public static readonly string Disco_AttachmentUploader_js_bundle = Url("Disco-AttachmentUploader.js.bundle");
|
||||
public static readonly string Disco_AttachmentUploader_js = T4MVCHelpers.IsProduction() && T4Extensions.FileExists(URLPATH + "/Disco-AttachmentUploader.min.js") ? Url("Disco-AttachmentUploader.min.js") : Url("Disco-AttachmentUploader.js");
|
||||
public static readonly string Disco_AttachmentUploader_min_js = Url("Disco-AttachmentUploader.min.js");
|
||||
public static readonly string Disco_AttachmentUploader_min_js_map = Url("Disco-AttachmentUploader.min.js.map");
|
||||
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||
public static class Disco_CreateJob {
|
||||
private const string URLPATH = "~/ClientSource/Scripts/Modules/Disco-CreateJob";
|
||||
public static string Url() { return T4MVCHelpers.ProcessVirtualPath(URLPATH); }
|
||||
@@ -358,18 +372,6 @@ namespace Links
|
||||
public static readonly string Shadowbox_min_js = Url("Shadowbox.min.js");
|
||||
public static readonly string Shadowbox_min_js_map = Url("Shadowbox.min.js.map");
|
||||
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||
public static class Silverlight {
|
||||
private const string URLPATH = "~/ClientSource/Scripts/Modules/Silverlight";
|
||||
public static string Url() { return T4MVCHelpers.ProcessVirtualPath(URLPATH); }
|
||||
public static string Url(string fileName) { return T4MVCHelpers.ProcessVirtualPath(URLPATH + "/" + fileName); }
|
||||
public static readonly string Silverlight_js = T4MVCHelpers.IsProduction() && T4Extensions.FileExists(URLPATH + "/Silverlight.min.js") ? Url("Silverlight.min.js") : Url("Silverlight.js");
|
||||
}
|
||||
|
||||
public static readonly string Silverlight_js_bundle = Url("Silverlight.js.bundle");
|
||||
public static readonly string Silverlight_js = T4MVCHelpers.IsProduction() && T4Extensions.FileExists(URLPATH + "/Silverlight.min.js") ? Url("Silverlight.min.js") : Url("Silverlight.js");
|
||||
public static readonly string Silverlight_min_js = Url("Silverlight.min.js");
|
||||
public static readonly string Silverlight_min_js_map = Url("Silverlight.min.js.map");
|
||||
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||
public static class Timeline {
|
||||
private const string URLPATH = "~/ClientSource/Scripts/Modules/Timeline";
|
||||
public static string Url() { return T4MVCHelpers.ProcessVirtualPath(URLPATH); }
|
||||
@@ -838,7 +840,6 @@ namespace Links
|
||||
public static string Url() { return T4MVCHelpers.ProcessVirtualPath(URLPATH); }
|
||||
public static string Url(string fileName) { return T4MVCHelpers.ProcessVirtualPath(URLPATH + "/" + fileName); }
|
||||
public static readonly string Disco_ClientBootstrapper_exe = Url("Disco.ClientBootstrapper.exe");
|
||||
public static readonly string Disco_Silverlight_AttachmentUpload_xap = Url("Disco.Silverlight.AttachmentUpload.xap");
|
||||
public static readonly string PreparationClient_zip = Url("PreparationClient.zip");
|
||||
}
|
||||
|
||||
|
||||
@@ -12,77 +12,81 @@
|
||||
|
||||
if (canAddAttachments)
|
||||
{
|
||||
Html.BundleDeferred("~/ClientScripts/Modules/Silverlight");
|
||||
Html.BundleDeferred("~/ClientScripts/Modules/Disco-AttachmentUploader");
|
||||
}
|
||||
}
|
||||
<div id="DeviceDetailTab-Resources" class="DevicePart">
|
||||
<table id="deviceShowResources">
|
||||
<tr>
|
||||
<td id="Attachments" class="@(canAddAttachments ? "canAddAttachments" : "cannotAddAttachments")">
|
||||
<div class="attachmentOutput">
|
||||
@if (Model.Device.DeviceAttachments != null)
|
||||
{
|
||||
foreach (var da in Model.Device.DeviceAttachments)
|
||||
{
|
||||
<a href="@Url.Action(MVC.API.Device.AttachmentDownload(da.Id))" data-attachmentid="@da.Id" data-mimetype="@da.MimeType">
|
||||
<span class="icon" title="@da.Filename">
|
||||
<img alt="Attachment Thumbnail" src="@(Url.Action(MVC.API.Device.AttachmentThumbnail(da.Id)))" /></span>
|
||||
<span class="comments" title="@da.Comments">
|
||||
@{if (!string.IsNullOrEmpty(da.DocumentTemplateId))
|
||||
{ @da.DocumentTemplate.Description}
|
||||
else
|
||||
{ @da.Comments }}
|
||||
</span><span class="author">@da.TechUser.ToString()</span>@if (canRemoveAnyAttachments || (canRemoveOwnAttachments && da.TechUserId == CurrentUser.UserId))
|
||||
{<text><span class="remove fa fa-times-circle"></span></text>}<span class="timestamp" title="@da.Timestamp.ToFullDateTime()" data-livestamp="@da.Timestamp.ToUnixEpoc()">@da.Timestamp.ToFullDateTime()</span>
|
||||
</a>
|
||||
}
|
||||
}
|
||||
</div>
|
||||
@if (canAddAttachments)
|
||||
{
|
||||
<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>
|
||||
<td id="AttachmentsContainer">
|
||||
<div id="Attachments" class="@(canAddAttachments ? "canAddAttachments" : "cannotAddAttachments")">
|
||||
<div class="disco-attachmentUpload-dropTarget">
|
||||
<h2>Drop Attachments Here</h2>
|
||||
</div>
|
||||
}
|
||||
<script type="text/javascript">
|
||||
Shadowbox.init({
|
||||
skipSetup: true,
|
||||
modal: true
|
||||
});
|
||||
$(function () {
|
||||
var $Attachments = $('#Attachments');
|
||||
var $attachmentOutput = $Attachments.find('.attachmentOutput');
|
||||
var $attachmentDownloadHost;
|
||||
|
||||
var $dialogUpload = null;
|
||||
var $dialogRemoveAttachment = null;
|
||||
|
||||
// Connect to Hub
|
||||
var hub = $.connection.deviceUpdates;
|
||||
|
||||
// Map Functions
|
||||
hub.client.addAttachment = onAddAttachment;
|
||||
hub.client.removeAttachment = onRemoveAttachment;
|
||||
|
||||
$.connection.hub.qs = { DeviceSerialNumber: '@(Model.Device.SerialNumber)' };
|
||||
$.connection.hub.error(onHubError);
|
||||
|
||||
// Start Connection
|
||||
$.connection.hub.start().fail(onHubError);
|
||||
|
||||
function onHubError(error) {
|
||||
alert('Live-update Error: ' + error);
|
||||
<div class="attachmentOutput">
|
||||
@if (Model.Device.DeviceAttachments != null)
|
||||
{
|
||||
foreach (var da in Model.Device.DeviceAttachments)
|
||||
{
|
||||
<a href="@Url.Action(MVC.API.Device.AttachmentDownload(da.Id))" data-attachmentid="@da.Id" data-mimetype="@da.MimeType">
|
||||
<span class="icon" title="@da.Filename">
|
||||
<img alt="Attachment Thumbnail" src="@(Url.Action(MVC.API.Device.AttachmentThumbnail(da.Id)))" /></span>
|
||||
<span class="comments" title="@da.Comments">
|
||||
@{if (!string.IsNullOrEmpty(da.DocumentTemplateId))
|
||||
{ @da.DocumentTemplate.Description}
|
||||
else
|
||||
{ @da.Comments }}
|
||||
</span><span class="author">@da.TechUser.ToString()</span>@if (canRemoveAnyAttachments || (canRemoveOwnAttachments && da.TechUserId == CurrentUser.UserId))
|
||||
{<text><span class="remove fa fa-times-circle"></span></text>}<span class="timestamp" title="@da.Timestamp.ToFullDateTime()" data-livestamp="@da.Timestamp.ToUnixEpoc()">@da.Timestamp.ToFullDateTime()</span>
|
||||
</a>
|
||||
}
|
||||
}
|
||||
</div>
|
||||
@if (canAddAttachments)
|
||||
{
|
||||
<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>
|
||||
}
|
||||
<script type="text/javascript">
|
||||
Shadowbox.init({
|
||||
skipSetup: true,
|
||||
modal: true
|
||||
});
|
||||
$(function () {
|
||||
var $Attachments = $('#Attachments');
|
||||
var $attachmentOutput = $Attachments.find('.attachmentOutput');
|
||||
var $attachmentDownloadHost;
|
||||
|
||||
function onAddAttachment(id, quick) {
|
||||
var data = { id: id };
|
||||
$.ajax({
|
||||
url: '@Url.Action(MVC.API.Device.Attachment())',
|
||||
dataType: 'json',
|
||||
data: data,
|
||||
success: function (d) {
|
||||
if (d.Result == 'OK') {
|
||||
var a = d.Attachment;
|
||||
var $dialogRemoveAttachment = null;
|
||||
|
||||
// Connect to Hub
|
||||
var hub = $.connection.deviceUpdates;
|
||||
|
||||
// Map Functions
|
||||
hub.client.addAttachment = onAddAttachment;
|
||||
hub.client.removeAttachment = onRemoveAttachment;
|
||||
|
||||
$.connection.hub.qs = { DeviceSerialNumber: '@(Model.Device.SerialNumber)' };
|
||||
$.connection.hub.error(onHubError);
|
||||
|
||||
// Start Connection
|
||||
$.connection.hub.start().fail(onHubError);
|
||||
|
||||
function onHubError(error) {
|
||||
alert('Live-update Error: ' + error);
|
||||
}
|
||||
|
||||
function onAddAttachment(id, quick) {
|
||||
var data = { id: id };
|
||||
$.ajax({
|
||||
url: '@Url.Action(MVC.API.Device.Attachment())',
|
||||
dataType: 'json',
|
||||
data: data,
|
||||
success: function (d) {
|
||||
if (d.Result == 'OK') {
|
||||
var a = d.Attachment;
|
||||
@if (canRemoveAnyAttachments)
|
||||
{
|
||||
<text>buildAttachment(a, true, quick);</text>
|
||||
@@ -95,216 +99,204 @@
|
||||
{
|
||||
<text>buildAttachment(a, false, quick);</text>
|
||||
}
|
||||
} else {
|
||||
alert('Unable to add attachment: ' + d.Result);
|
||||
} else {
|
||||
alert('Unable to add attachment: ' + d.Result);
|
||||
}
|
||||
},
|
||||
error: function (jqXHR, textStatus, errorThrown) {
|
||||
alert('Unable to add attachment: ' + textStatus);
|
||||
}
|
||||
},
|
||||
error: function (jqXHR, textStatus, errorThrown) {
|
||||
alert('Unable to add attachment: ' + textStatus);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function buildAttachment(a, canRemove, quick) {
|
||||
var t = '<a><span class="icon"><img alt="Attachment Thumbnail" /></span><span class="comments"></span><span class="author"></span>';
|
||||
if (canRemove)
|
||||
t += '<span class="remove fa fa-times-circle"></span>';
|
||||
t += '<span class="timestamp"></span></a>';
|
||||
|
||||
var e = $(t);
|
||||
|
||||
e.attr('data-attachmentid', a.Id).attr('data-mimetype', a.MimeType).attr('href', '@(Url.Action(MVC.API.Device.AttachmentDownload()))/' + a.Id);
|
||||
e.find('.icon img').attr('src', '@(Url.Action(MVC.API.Device.AttachmentThumbnail()))/' + a.Id);
|
||||
e.find('.comments').text(a.Description);
|
||||
e.find('.author').text(a.Author);
|
||||
e.find('.timestamp').text(a.TimestampFull).attr('title', a.TimestampFull).livestamp(a.TimestampUnixEpoc);
|
||||
if (canRemove)
|
||||
e.find('.remove').click(removeAttachment);
|
||||
if (!quick)
|
||||
e.hide();
|
||||
$attachmentOutput.append(e);
|
||||
onUpdate();
|
||||
if (!quick)
|
||||
e.show('slow');
|
||||
if (a.MimeType.toLowerCase().indexOf('image/') == 0)
|
||||
e.shadowbox({ gallery: 'attachments', player: 'img', title: a.Description });
|
||||
else
|
||||
e.click(onDownload);
|
||||
}
|
||||
|
||||
function onRemoveAttachment(id) {
|
||||
var a = $attachmentOutput.find('a[data-attachmentid=' + id + ']');
|
||||
|
||||
a.hide(300).delay(300).queue(function () {
|
||||
var $this = $(this);
|
||||
if ($this.attr('data-mimetype').toLowerCase().indexOf('image/') == 0)
|
||||
Shadowbox.removeCache(this);
|
||||
$this.find('.timestamp').livestamp('destroy');
|
||||
$this.remove();
|
||||
onUpdate();
|
||||
});
|
||||
}
|
||||
|
||||
function onDownload() {
|
||||
var $this = $(this);
|
||||
var url = $this.attr('href');
|
||||
|
||||
if ($.connection && $.connection.hub && $.connection.hub.transport &&
|
||||
$.connection.hub.transport.name == 'foreverFrame') {
|
||||
// SignalR active with foreverFrame transport - use popup window
|
||||
window.open(url, '_blank', 'height=150,width=250,location=no,menubar=no,resizable=no,scrollbars=no,status=no,toolbar=no');
|
||||
} else {
|
||||
// use iFrame
|
||||
if (!$attachmentDownloadHost) {
|
||||
$attachmentDownloadHost = $('<iframe>')
|
||||
.attr({ 'src': url, 'title': 'Attachment Download Host' })
|
||||
.addClass('hidden')
|
||||
.appendTo('body')
|
||||
.contents();
|
||||
} else {
|
||||
$attachmentDownloadHost[0].location.href = url;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
function buildAttachment(a, canRemove, quick) {
|
||||
var t = '<a><span class="icon"><img alt="Attachment Thumbnail" /></span><span class="comments"></span><span class="author"></span>';
|
||||
if (canRemove)
|
||||
t += '<span class="remove fa fa-times-circle"></span>';
|
||||
t += '<span class="timestamp"></span></a>';
|
||||
|
||||
function onUpdate() {
|
||||
var attachmentCount = $attachmentOutput.children('a').length;
|
||||
var tabHeading = 'Attachments [' + attachmentCount + ']';
|
||||
$('#DeviceDetailTab-ResourcesLink').text(tabHeading);
|
||||
}
|
||||
var e = $(t);
|
||||
|
||||
e.attr('data-attachmentid', a.Id).attr('data-mimetype', a.MimeType).attr('href', '@(Url.Action(MVC.API.Device.AttachmentDownload()))/' + a.Id);
|
||||
e.find('.comments').text(a.Description);
|
||||
e.find('.author').text(a.Author);
|
||||
e.find('.timestamp').text(a.TimestampFull).attr('title', a.TimestampFull).livestamp(a.TimestampUnixEpoc);
|
||||
if (canRemove)
|
||||
e.find('.remove').click(removeAttachment);
|
||||
if (!quick)
|
||||
e.hide();
|
||||
$attachmentOutput.append(e);
|
||||
onUpdate();
|
||||
if (!quick)
|
||||
e.show('slow');
|
||||
if (a.MimeType.toLowerCase().indexOf('image/') == 0)
|
||||
e.shadowbox({ gallery: 'attachments', player: 'img', title: a.Description });
|
||||
else
|
||||
e.click(onDownload);
|
||||
|
||||
// Add Thumbnail
|
||||
var buildThumbnail = function () {
|
||||
var retryCount = 0;
|
||||
var img = e.find('.icon img');
|
||||
|
||||
var setThumbnailUrl = function () {
|
||||
img.attr('src', '@(Url.Action(MVC.API.Device.AttachmentThumbnail()))/' + a.Id + '?v=' + retryCount);
|
||||
};
|
||||
img.on('error', function () {
|
||||
img.addClass('loading');
|
||||
retryCount++;
|
||||
if (retryCount < 6)
|
||||
window.setTimeout(setThumbnailUrl, retryCount * 250);
|
||||
});
|
||||
img.on('load', function () {
|
||||
img.removeClass('loading');
|
||||
});
|
||||
window.setTimeout(setThumbnailUrl, 100);
|
||||
};
|
||||
buildThumbnail();
|
||||
}
|
||||
|
||||
function onRemoveAttachment(id) {
|
||||
var a = $attachmentOutput.find('a[data-attachmentid=' + id + ']');
|
||||
|
||||
a.hide(300).delay(300).queue(function () {
|
||||
var $this = $(this);
|
||||
if ($this.attr('data-mimetype').toLowerCase().indexOf('image/') == 0)
|
||||
Shadowbox.removeCache(this);
|
||||
$this.find('.timestamp').livestamp('destroy');
|
||||
$this.remove();
|
||||
onUpdate();
|
||||
});
|
||||
}
|
||||
|
||||
function onDownload() {
|
||||
var $this = $(this);
|
||||
var url = $this.attr('href');
|
||||
|
||||
if ($.connection && $.connection.hub && $.connection.hub.transport &&
|
||||
$.connection.hub.transport.name == 'foreverFrame') {
|
||||
// SignalR active with foreverFrame transport - use popup window
|
||||
window.open(url, '_blank', 'height=150,width=250,location=no,menubar=no,resizable=no,scrollbars=no,status=no,toolbar=no');
|
||||
} else {
|
||||
// use iFrame
|
||||
if (!$attachmentDownloadHost) {
|
||||
$attachmentDownloadHost = $('<iframe>')
|
||||
.attr({ 'src': url, 'title': 'Attachment Download Host' })
|
||||
.addClass('hidden')
|
||||
.appendTo('body')
|
||||
.contents();
|
||||
} else {
|
||||
$attachmentDownloadHost[0].location.href = url;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
function onUpdate() {
|
||||
var attachmentCount = $attachmentOutput.children('a').length;
|
||||
var tabHeading = 'Attachments [' + attachmentCount + ']';
|
||||
$('#DeviceDetailTab-ResourcesLink').text(tabHeading);
|
||||
}
|
||||
|
||||
@if (canAddAttachments)
|
||||
{<text>
|
||||
//#region Add Attachments
|
||||
if (!document.DiscoFunctions) {
|
||||
document.DiscoFunctions = {};
|
||||
}
|
||||
document.DiscoFunctions.addAttachment = function (Id) { return; /* Silverlight notification, do nothing use SignalR */ };
|
||||
//#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'));
|
||||
|
||||
var $attachmentInput = $Attachments.find('.attachmentInput');
|
||||
$attachmentInput.find('.photo').click(function () {
|
||||
showDialog('/WebCam');
|
||||
});
|
||||
$attachmentInput.find('.upload').click(function () {
|
||||
showDialog('/File');
|
||||
});
|
||||
var $attachmentInput = $Attachments.find('.attachmentInput');
|
||||
$attachmentInput.find('.photo').click(function () {
|
||||
attachmentUploader.uploadImage();
|
||||
});
|
||||
$attachmentInput.find('.upload').click(function () {
|
||||
attachmentUploader.uploadFiles();
|
||||
});
|
||||
|
||||
var silverlightOnLoadNavigation = null;
|
||||
var silverlightIsLoaded = null;
|
||||
var resourcesTab;
|
||||
$(document).on('dragover', function () {
|
||||
if (!resourcesTab) {
|
||||
var tabs = $Attachments.closest('.ui-tabs');
|
||||
resourcesTab = {
|
||||
tabs: tabs,
|
||||
resourcesIndex: tabs.children('ul.ui-tabs-nav').find('a[href="#DeviceDetailTab-Resources"]').closest('li').index()
|
||||
};
|
||||
}
|
||||
var selectedIndex = resourcesTab.tabs.tabs('option', 'active');
|
||||
if (resourcesTab.resourcesIndex !== selectedIndex)
|
||||
resourcesTab.tabs.tabs('option', 'active', resourcesTab.resourcesIndex);
|
||||
});
|
||||
//#endregion
|
||||
</text>}
|
||||
@if (canRemoveAnyAttachments || canRemoveOwnAttachments)
|
||||
{<text>
|
||||
//#region Remove Attachments
|
||||
$attachmentOutput.find('span.remove').click(removeAttachment);
|
||||
|
||||
function showDialog(navigationPath) {
|
||||
if (!$dialogUpload) {
|
||||
$dialogUpload = $('#dialogUpload').dialog({
|
||||
autoOpen: false,
|
||||
draggable: false,
|
||||
modal: true,
|
||||
resizable: false,
|
||||
width: 860,
|
||||
height: 550,
|
||||
close: function () {
|
||||
var sl = $('#silverlightUploadAttachment').get(0);
|
||||
if (sl.content)
|
||||
sl.content.Navigator.Navigate('/Hidden');
|
||||
function removeAttachment() {
|
||||
$this = $(this).closest('a');
|
||||
|
||||
var data = { id: $this.attr('data-attachmentid') };
|
||||
|
||||
if (!$dialogRemoveAttachment) {
|
||||
$dialogRemoveAttachment = $('#dialogRemoveAttachment').dialog({
|
||||
resizable: false,
|
||||
height: 140,
|
||||
modal: true,
|
||||
autoOpen: false
|
||||
});
|
||||
}
|
||||
|
||||
$dialogRemoveAttachment.dialog("enable");
|
||||
$dialogRemoveAttachment.dialog('option', 'buttons', {
|
||||
"Remove": function () {
|
||||
$dialogRemoveAttachment.dialog("disable");
|
||||
$dialogRemoveAttachment.dialog("option", "buttons", null);
|
||||
$.ajax({
|
||||
url: '@Url.Action(MVC.API.Device.AttachmentRemove())',
|
||||
dataType: 'json',
|
||||
data: data,
|
||||
success: function (d) {
|
||||
if (d == 'OK') {
|
||||
// Do nothing, await SignalR notification
|
||||
} else {
|
||||
alert('Unable to remove attachment: ' + d);
|
||||
}
|
||||
$dialogRemoveAttachment.dialog("close");
|
||||
},
|
||||
error: function (jqXHR, textStatus, errorThrown) {
|
||||
alert('Unable to remove attachment: ' + textStatus);
|
||||
$dialogRemoveAttachment.dialog("close");
|
||||
}
|
||||
});
|
||||
},
|
||||
Cancel: function () {
|
||||
$dialogRemoveAttachment.dialog("close");
|
||||
}
|
||||
});
|
||||
|
||||
Silverlight.createObject('@(Links.ClientBin.Disco_Silverlight_AttachmentUpload_xap)',
|
||||
$('#silverlightHostUploadAttachment').get(0),
|
||||
'silverlightUploadAttachment',
|
||||
{ width: '840px', height: '500px', background: 'white', version: '4.0.60310.0' },
|
||||
{
|
||||
onLoad: function () {
|
||||
if (silverlightOnLoadNavigation) {
|
||||
$('#silverlightUploadAttachment').get(0).content.Navigator.Navigate(silverlightOnLoadNavigation);
|
||||
silverlightIsLoaded = true;
|
||||
}
|
||||
}
|
||||
},
|
||||
'UploadUrl=@(Url.Action(MVC.API.Device.AttachmentUpload(Model.Device.SerialNumber, null)))');
|
||||
}
|
||||
$dialogRemoveAttachment.dialog('open');
|
||||
|
||||
$dialogUpload.dialog('open');
|
||||
if (silverlightIsLoaded) {
|
||||
$('#silverlightUploadAttachment').get(0).content.Navigator.Navigate(navigationPath);
|
||||
} else {
|
||||
silverlightOnLoadNavigation = navigationPath;
|
||||
}
|
||||
};
|
||||
|
||||
//#endregion
|
||||
</text>}
|
||||
@if (canRemoveAnyAttachments || canRemoveOwnAttachments)
|
||||
{<text>
|
||||
//#region Remove Attachments
|
||||
$attachmentOutput.find('span.remove').click(removeAttachment);
|
||||
|
||||
function removeAttachment() {
|
||||
$this = $(this).closest('a');
|
||||
|
||||
var data = { id: $this.attr('data-attachmentid') };
|
||||
|
||||
if (!$dialogRemoveAttachment) {
|
||||
$dialogRemoveAttachment = $('#dialogRemoveAttachment').dialog({
|
||||
resizable: false,
|
||||
height: 140,
|
||||
modal: true,
|
||||
autoOpen: false
|
||||
});
|
||||
return false;
|
||||
}
|
||||
|
||||
$dialogRemoveAttachment.dialog("enable");
|
||||
$dialogRemoveAttachment.dialog('option', 'buttons', {
|
||||
"Remove": function () {
|
||||
$dialogRemoveAttachment.dialog("disable");
|
||||
$dialogRemoveAttachment.dialog("option", "buttons", null);
|
||||
$.ajax({
|
||||
url: '@Url.Action(MVC.API.Device.AttachmentRemove())',
|
||||
dataType: 'json',
|
||||
data: data,
|
||||
success: function (d) {
|
||||
if (d == 'OK') {
|
||||
// Do nothing, await SignalR notification
|
||||
} else {
|
||||
alert('Unable to remove attachment: ' + d);
|
||||
}
|
||||
$dialogRemoveAttachment.dialog("close");
|
||||
},
|
||||
error: function (jqXHR, textStatus, errorThrown) {
|
||||
alert('Unable to remove attachment: ' + textStatus);
|
||||
$dialogRemoveAttachment.dialog("close");
|
||||
}
|
||||
});
|
||||
},
|
||||
Cancel: function () {
|
||||
$dialogRemoveAttachment.dialog("close");
|
||||
}
|
||||
});
|
||||
|
||||
$dialogRemoveAttachment.dialog('open');
|
||||
|
||||
return false;
|
||||
}
|
||||
//#endregion
|
||||
//#endregion
|
||||
</text>}
|
||||
|
||||
$attachmentOutput.children('a').each(function () {
|
||||
$this = $(this);
|
||||
if ($this.attr('data-mimetype').toLowerCase().indexOf('image/') == 0)
|
||||
$this.shadowbox({ gallery: 'attachments', player: 'img', title: $this.find('.comments').text() });
|
||||
else
|
||||
$this.click(onDownload);
|
||||
$attachmentOutput.children('a').each(function () {
|
||||
$this = $(this);
|
||||
if ($this.attr('data-mimetype').toLowerCase().indexOf('image/') == 0)
|
||||
$this.shadowbox({ gallery: 'attachments', player: 'img', title: $this.find('.comments').text() });
|
||||
else
|
||||
$this.click(onDownload);
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</script>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<div id="dialogUpload" class="dialog" title="Upload Attachment">
|
||||
<div id="silverlightHostUploadAttachment">
|
||||
</div>
|
||||
</div>
|
||||
<div id="dialogRemoveAttachment" class="dialog" title="Remove this Attachment?">
|
||||
<p>
|
||||
<i class="fa fa-exclamation-triangle fa-lg"></i> Are you sure?
|
||||
|
||||
@@ -59,7 +59,7 @@ namespace Disco.Web.Views.Device.DeviceParts
|
||||
|
||||
if (canAddAttachments)
|
||||
{
|
||||
Html.BundleDeferred("~/ClientScripts/Modules/Silverlight");
|
||||
Html.BundleDeferred("~/ClientScripts/Modules/Disco-AttachmentUploader");
|
||||
}
|
||||
|
||||
|
||||
@@ -77,57 +77,66 @@ WriteLiteral(" id=\"deviceShowResources\"");
|
||||
|
||||
WriteLiteral(">\r\n <tr>\r\n <td");
|
||||
|
||||
WriteLiteral(" id=\"AttachmentsContainer\"");
|
||||
|
||||
WriteLiteral(">\r\n <div");
|
||||
|
||||
WriteLiteral(" id=\"Attachments\"");
|
||||
|
||||
WriteAttribute("class", Tuple.Create(" class=\"", 826), Tuple.Create("\"", 901)
|
||||
WriteAttribute("class", Tuple.Create(" class=\"", 888), Tuple.Create("\"", 963)
|
||||
|
||||
#line 21 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 834), Tuple.Create<System.Object, System.Int32>(canAddAttachments ? "canAddAttachments" : "cannotAddAttachments"
|
||||
#line 22 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 896), Tuple.Create<System.Object, System.Int32>(canAddAttachments ? "canAddAttachments" : "cannotAddAttachments"
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 834), false)
|
||||
, 896), false)
|
||||
);
|
||||
|
||||
WriteLiteral(">\r\n <div");
|
||||
WriteLiteral(">\r\n <div");
|
||||
|
||||
WriteLiteral(" class=\"disco-attachmentUpload-dropTarget\"");
|
||||
|
||||
WriteLiteral(">\r\n <h2>Drop Attachments Here</h2>\r\n </" +
|
||||
"div>\r\n <div");
|
||||
|
||||
WriteLiteral(" class=\"attachmentOutput\"");
|
||||
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
|
||||
#line 23 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
|
||||
#line 27 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 23 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
if (Model.Device.DeviceAttachments != null)
|
||||
{
|
||||
foreach (var da in Model.Device.DeviceAttachments)
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <a");
|
||||
|
||||
WriteAttribute("href", Tuple.Create(" href=\"", 1171), Tuple.Create("\"", 1231)
|
||||
|
||||
#line 27 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 1178), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.API.Device.AttachmentDownload(da.Id))
|
||||
if (Model.Device.DeviceAttachments != null)
|
||||
{
|
||||
foreach (var da in Model.Device.DeviceAttachments)
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 1178), false)
|
||||
WriteLiteral(" <a");
|
||||
|
||||
WriteAttribute("href", Tuple.Create(" href=\"", 1410), Tuple.Create("\"", 1470)
|
||||
|
||||
#line 31 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 1417), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.API.Device.AttachmentDownload(da.Id))
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 1417), false)
|
||||
);
|
||||
|
||||
WriteLiteral(" data-attachmentid=\"");
|
||||
|
||||
|
||||
#line 27 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
Write(da.Id);
|
||||
#line 31 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
Write(da.Id);
|
||||
|
||||
|
||||
#line default
|
||||
@@ -137,108 +146,108 @@ WriteLiteral("\"");
|
||||
WriteLiteral(" data-mimetype=\"");
|
||||
|
||||
|
||||
#line 27 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
Write(da.MimeType);
|
||||
#line 31 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
Write(da.MimeType);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\"");
|
||||
|
||||
WriteLiteral(">\r\n <span");
|
||||
WriteLiteral(">\r\n <span");
|
||||
|
||||
WriteLiteral(" class=\"icon\"");
|
||||
|
||||
WriteAttribute("title", Tuple.Create(" title=\"", 1337), Tuple.Create("\"", 1357)
|
||||
WriteAttribute("title", Tuple.Create(" title=\"", 1580), Tuple.Create("\"", 1600)
|
||||
|
||||
#line 28 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 1345), Tuple.Create<System.Object, System.Int32>(da.Filename
|
||||
#line 32 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 1588), Tuple.Create<System.Object, System.Int32>(da.Filename
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 1345), false)
|
||||
, 1588), false)
|
||||
);
|
||||
|
||||
WriteLiteral(">\r\n <img");
|
||||
WriteLiteral(">\r\n <img");
|
||||
|
||||
WriteLiteral(" alt=\"Attachment Thumbnail\"");
|
||||
|
||||
WriteAttribute("src", Tuple.Create(" src=\"", 1424), Tuple.Create("\"", 1486)
|
||||
WriteAttribute("src", Tuple.Create(" src=\"", 1671), Tuple.Create("\"", 1733)
|
||||
|
||||
#line 29 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 1430), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.API.Device.AttachmentThumbnail(da.Id))
|
||||
#line 33 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 1677), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.API.Device.AttachmentThumbnail(da.Id))
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 1430), false)
|
||||
, 1677), false)
|
||||
);
|
||||
|
||||
WriteLiteral(" /></span>\r\n <span");
|
||||
WriteLiteral(" /></span>\r\n <span");
|
||||
|
||||
WriteLiteral(" class=\"comments\"");
|
||||
|
||||
WriteAttribute("title", Tuple.Create(" title=\"", 1549), Tuple.Create("\"", 1569)
|
||||
WriteAttribute("title", Tuple.Create(" title=\"", 1800), Tuple.Create("\"", 1820)
|
||||
|
||||
#line 30 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 1557), Tuple.Create<System.Object, System.Int32>(da.Comments
|
||||
#line 34 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 1808), Tuple.Create<System.Object, System.Int32>(da.Comments
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 1557), false)
|
||||
, 1808), false)
|
||||
);
|
||||
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
|
||||
#line 31 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
|
||||
#line 35 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 31 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
if (!string.IsNullOrEmpty(da.DocumentTemplateId))
|
||||
{
|
||||
#line 35 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
if (!string.IsNullOrEmpty(da.DocumentTemplateId))
|
||||
{
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 32 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
Write(da.DocumentTemplate.Description);
|
||||
#line 36 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
Write(da.DocumentTemplate.Description);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 32 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
}
|
||||
else
|
||||
{
|
||||
#line 36 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 34 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
Write(da.Comments);
|
||||
#line 38 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
Write(da.Comments);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 34 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
}
|
||||
#line 38 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
}
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n </span><span");
|
||||
WriteLiteral("\r\n </span><span");
|
||||
|
||||
WriteLiteral(" class=\"author\"");
|
||||
|
||||
WriteLiteral(">");
|
||||
|
||||
|
||||
#line 35 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
Write(da.TechUser.ToString());
|
||||
#line 39 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
Write(da.TechUser.ToString());
|
||||
|
||||
|
||||
#line default
|
||||
@@ -246,9 +255,9 @@ WriteLiteral(">");
|
||||
WriteLiteral("</span>");
|
||||
|
||||
|
||||
#line 35 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
if (canRemoveAnyAttachments || (canRemoveOwnAttachments && da.TechUserId == CurrentUser.UserId))
|
||||
{
|
||||
#line 39 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
if (canRemoveAnyAttachments || (canRemoveOwnAttachments && da.TechUserId == CurrentUser.UserId))
|
||||
{
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
@@ -259,8 +268,8 @@ WriteLiteral(" class=\"remove fa fa-times-circle\"");
|
||||
WriteLiteral("></span>");
|
||||
|
||||
|
||||
#line 36 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
}
|
||||
#line 40 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
}
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
@@ -268,21 +277,21 @@ WriteLiteral("<span");
|
||||
|
||||
WriteLiteral(" class=\"timestamp\"");
|
||||
|
||||
WriteAttribute("title", Tuple.Create(" title=\"", 2178), Tuple.Create("\"", 2216)
|
||||
WriteAttribute("title", Tuple.Create(" title=\"", 2453), Tuple.Create("\"", 2491)
|
||||
|
||||
#line 36 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 2186), Tuple.Create<System.Object, System.Int32>(da.Timestamp.ToFullDateTime()
|
||||
#line 40 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 2461), Tuple.Create<System.Object, System.Int32>(da.Timestamp.ToFullDateTime()
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 2186), false)
|
||||
, 2461), false)
|
||||
);
|
||||
|
||||
WriteLiteral(" data-livestamp=\"");
|
||||
|
||||
|
||||
#line 36 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
Write(da.Timestamp.ToUnixEpoc());
|
||||
#line 40 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
Write(da.Timestamp.ToUnixEpoc());
|
||||
|
||||
|
||||
#line default
|
||||
@@ -292,43 +301,49 @@ WriteLiteral("\"");
|
||||
WriteLiteral(">");
|
||||
|
||||
|
||||
#line 36 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
Write(da.Timestamp.ToFullDateTime());
|
||||
#line 40 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
Write(da.Timestamp.ToFullDateTime());
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("</span>\r\n </a> \r\n");
|
||||
WriteLiteral("</span>\r\n </a> \r\n");
|
||||
|
||||
|
||||
#line 38 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
#line 42 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" </div>\r\n");
|
||||
WriteLiteral(" </div>\r\n");
|
||||
|
||||
|
||||
#line 41 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
|
||||
#line 45 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 41 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
if (canAddAttachments)
|
||||
{
|
||||
#line 45 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
if (canAddAttachments)
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <div");
|
||||
WriteLiteral(" <div");
|
||||
|
||||
WriteLiteral(" class=\"disco-attachmentUpload-progress\"");
|
||||
|
||||
WriteLiteral("></div>\r\n");
|
||||
|
||||
WriteLiteral(" <div");
|
||||
|
||||
WriteLiteral(" class=\"attachmentInput clearfix\"");
|
||||
|
||||
WriteLiteral(">\r\n <span");
|
||||
WriteLiteral(">\r\n <span");
|
||||
|
||||
WriteLiteral(" class=\"action upload fa fa-upload\"");
|
||||
|
||||
@@ -340,86 +355,85 @@ WriteLiteral(" class=\"action photo fa fa-camera\"");
|
||||
|
||||
WriteLiteral(" title=\"Capture Image\"");
|
||||
|
||||
WriteLiteral("></span>\r\n </div>\r\n");
|
||||
WriteLiteral("></span>\r\n </div>\r\n");
|
||||
|
||||
|
||||
#line 46 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
}
|
||||
#line 51 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <script");
|
||||
WriteLiteral(" <script");
|
||||
|
||||
WriteLiteral(" type=\"text/javascript\"");
|
||||
|
||||
WriteLiteral(@">
|
||||
Shadowbox.init({
|
||||
skipSetup: true,
|
||||
modal: true
|
||||
});
|
||||
$(function () {
|
||||
var $Attachments = $('#Attachments');
|
||||
var $attachmentOutput = $Attachments.find('.attachmentOutput');
|
||||
var $attachmentDownloadHost;
|
||||
Shadowbox.init({
|
||||
skipSetup: true,
|
||||
modal: true
|
||||
});
|
||||
$(function () {
|
||||
var $Attachments = $('#Attachments');
|
||||
var $attachmentOutput = $Attachments.find('.attachmentOutput');
|
||||
var $attachmentDownloadHost;
|
||||
|
||||
var $dialogUpload = null;
|
||||
var $dialogRemoveAttachment = null;
|
||||
var $dialogRemoveAttachment = null;
|
||||
|
||||
// Connect to Hub
|
||||
var hub = $.connection.deviceUpdates;
|
||||
// Connect to Hub
|
||||
var hub = $.connection.deviceUpdates;
|
||||
|
||||
// Map Functions
|
||||
hub.client.addAttachment = onAddAttachment;
|
||||
hub.client.removeAttachment = onRemoveAttachment;
|
||||
// Map Functions
|
||||
hub.client.addAttachment = onAddAttachment;
|
||||
hub.client.removeAttachment = onRemoveAttachment;
|
||||
|
||||
$.connection.hub.qs = { DeviceSerialNumber: '");
|
||||
$.connection.hub.qs = { DeviceSerialNumber: '");
|
||||
|
||||
|
||||
#line 67 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
Write(Model.Device.SerialNumber);
|
||||
#line 71 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
Write(Model.Device.SerialNumber);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(@"' };
|
||||
$.connection.hub.error(onHubError);
|
||||
$.connection.hub.error(onHubError);
|
||||
|
||||
// Start Connection
|
||||
$.connection.hub.start().fail(onHubError);
|
||||
// Start Connection
|
||||
$.connection.hub.start().fail(onHubError);
|
||||
|
||||
function onHubError(error) {
|
||||
alert('Live-update Error: ' + error);
|
||||
}
|
||||
function onHubError(error) {
|
||||
alert('Live-update Error: ' + error);
|
||||
}
|
||||
|
||||
function onAddAttachment(id, quick) {
|
||||
var data = { id: id };
|
||||
$.ajax({
|
||||
url: '");
|
||||
function onAddAttachment(id, quick) {
|
||||
var data = { id: id };
|
||||
$.ajax({
|
||||
url: '");
|
||||
|
||||
|
||||
#line 80 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
Write(Url.Action(MVC.API.Device.Attachment()));
|
||||
#line 84 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
Write(Url.Action(MVC.API.Device.Attachment()));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(@"',
|
||||
dataType: 'json',
|
||||
data: data,
|
||||
success: function (d) {
|
||||
if (d.Result == 'OK') {
|
||||
var a = d.Attachment;
|
||||
dataType: 'json',
|
||||
data: data,
|
||||
success: function (d) {
|
||||
if (d.Result == 'OK') {
|
||||
var a = d.Attachment;
|
||||
");
|
||||
|
||||
|
||||
#line 86 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
#line 90 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 86 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
#line 90 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
if (canRemoveAnyAttachments)
|
||||
{
|
||||
|
||||
@@ -433,7 +447,7 @@ WriteLiteral("buildAttachment(a, true, quick);");
|
||||
WriteLiteral("\r\n");
|
||||
|
||||
|
||||
#line 89 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
#line 93 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
}
|
||||
else if (canRemoveOwnAttachments)
|
||||
{
|
||||
@@ -446,7 +460,7 @@ WriteLiteral(" ");
|
||||
WriteLiteral("buildAttachment(a, (a.AuthorId === \'");
|
||||
|
||||
|
||||
#line 92 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
#line 96 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
Write(CurrentUser.UserId);
|
||||
|
||||
|
||||
@@ -457,7 +471,7 @@ WriteLiteral("\'), quick);");
|
||||
WriteLiteral("\r\n");
|
||||
|
||||
|
||||
#line 93 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
#line 97 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -472,174 +486,164 @@ WriteLiteral("buildAttachment(a, false, quick);");
|
||||
WriteLiteral("\r\n");
|
||||
|
||||
|
||||
#line 97 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
#line 101 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(@" } else {
|
||||
alert('Unable to add attachment: ' + d.Result);
|
||||
WriteLiteral(@" } else {
|
||||
alert('Unable to add attachment: ' + d.Result);
|
||||
}
|
||||
},
|
||||
error: function (jqXHR, textStatus, errorThrown) {
|
||||
alert('Unable to add attachment: ' + textStatus);
|
||||
}
|
||||
},
|
||||
error: function (jqXHR, textStatus, errorThrown) {
|
||||
alert('Unable to add attachment: ' + textStatus);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function buildAttachment(a, canRemove, quick) {
|
||||
var t = '<a><span class=""icon""><img alt=""Attachment Thumbnail"" /></span><span class=""comments""></span><span class=""author""></span>';
|
||||
if (canRemove)
|
||||
t += '<span class=""remove fa fa-times-circle""></span>';
|
||||
t += '<span class=""timestamp""></span></a>';
|
||||
function buildAttachment(a, canRemove, quick) {
|
||||
var t = '<a><span class=""icon""><img alt=""Attachment Thumbnail"" /></span><span class=""comments""></span><span class=""author""></span>';
|
||||
if (canRemove)
|
||||
t += '<span class=""remove fa fa-times-circle""></span>';
|
||||
t += '<span class=""timestamp""></span></a>';
|
||||
|
||||
var e = $(t);
|
||||
var e = $(t);
|
||||
|
||||
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 116 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
Write(Url.Action(MVC.API.Device.AttachmentDownload()));
|
||||
#line 120 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
Write(Url.Action(MVC.API.Device.AttachmentDownload()));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("/\' + a.Id);\r\n e.find(\'.icon img\').attr(\'src\', \'");
|
||||
WriteLiteral(@"/' + a.Id);
|
||||
e.find('.comments').text(a.Description);
|
||||
e.find('.author').text(a.Author);
|
||||
e.find('.timestamp').text(a.TimestampFull).attr('title', a.TimestampFull).livestamp(a.TimestampUnixEpoc);
|
||||
if (canRemove)
|
||||
e.find('.remove').click(removeAttachment);
|
||||
if (!quick)
|
||||
e.hide();
|
||||
$attachmentOutput.append(e);
|
||||
onUpdate();
|
||||
if (!quick)
|
||||
e.show('slow');
|
||||
if (a.MimeType.toLowerCase().indexOf('image/') == 0)
|
||||
e.shadowbox({ gallery: 'attachments', player: 'img', title: a.Description });
|
||||
else
|
||||
e.click(onDownload);
|
||||
|
||||
// Add Thumbnail
|
||||
var buildThumbnail = function () {
|
||||
var retryCount = 0;
|
||||
var img = e.find('.icon img');
|
||||
|
||||
var setThumbnailUrl = function () {
|
||||
img.attr('src', '");
|
||||
|
||||
|
||||
#line 117 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
Write(Url.Action(MVC.API.Device.AttachmentThumbnail()));
|
||||
#line 143 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
Write(Url.Action(MVC.API.Device.AttachmentThumbnail()));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("/\' + a.Id);\r\n e.find(\'.comments\').text(a.Description);" +
|
||||
"\r\n e.find(\'.author\').text(a.Author);\r\n " +
|
||||
" e.find(\'.timestamp\').text(a.TimestampFull).attr(\'title\', a.Timestam" +
|
||||
"pFull).livestamp(a.TimestampUnixEpoc);\r\n if (canRemov" +
|
||||
"e)\r\n e.find(\'.remove\').click(removeAttachment);\r\n" +
|
||||
" if (!quick)\r\n e.hide(" +
|
||||
");\r\n $attachmentOutput.append(e);\r\n " +
|
||||
" onUpdate();\r\n if (!quick)\r\n " +
|
||||
" e.show(\'slow\');\r\n if (a.MimeType.toLo" +
|
||||
"werCase().indexOf(\'image/\') == 0)\r\n e.shadowbox({" +
|
||||
" gallery: \'attachments\', player: \'img\', title: a.Description });\r\n " +
|
||||
" else\r\n e.click(onDownload);\r\n " +
|
||||
" }\r\n\r\n function onRemoveAttachment(id) {" +
|
||||
"\r\n var a = $attachmentOutput.find(\'a[data-attachmenti" +
|
||||
"d=\' + id + \']\');\r\n\r\n a.hide(300).delay(300).queue(fun" +
|
||||
"ction () {\r\n var $this = $(this);\r\n " +
|
||||
" if ($this.attr(\'data-mimetype\').toLowerCase().indexOf(\'image/\'" +
|
||||
") == 0)\r\n Shadowbox.removeCache(this);\r\n " +
|
||||
" $this.find(\'.timestamp\').livestamp(\'destroy\');\r\n " +
|
||||
" $this.remove();\r\n onUp" +
|
||||
"date();\r\n });\r\n }\r\n\r\n " +
|
||||
" function onDownload() {\r\n var $this = " +
|
||||
"$(this);\r\n var url = $this.attr(\'href\');\r\n\r\n " +
|
||||
" if ($.connection && $.connection.hub && $.connection.hub.tran" +
|
||||
"sport &&\r\n $.connection.hub.trans" +
|
||||
"port.name == \'foreverFrame\') {\r\n // SignalR activ" +
|
||||
"e with foreverFrame transport - use popup window\r\n " +
|
||||
" window.open(url, \'_blank\', \'height=150,width=250,location=no,menubar=no,resiza" +
|
||||
"ble=no,scrollbars=no,status=no,toolbar=no\');\r\n } else" +
|
||||
" {\r\n // use iFrame\r\n " +
|
||||
" if (!$attachmentDownloadHost) {\r\n $attachm" +
|
||||
"entDownloadHost = $(\'<iframe>\')\r\n .attr({" +
|
||||
" \'src\': url, \'title\': \'Attachment Download Host\' })\r\n " +
|
||||
" .addClass(\'hidden\')\r\n .appen" +
|
||||
"dTo(\'body\')\r\n .contents();\r\n " +
|
||||
" } else {\r\n $attachmentDown" +
|
||||
"loadHost[0].location.href = url;\r\n }\r\n " +
|
||||
" }\r\n\r\n return false;\r\n " +
|
||||
" }\r\n\r\n function onUpdate() {\r\n " +
|
||||
" var attachmentCount = $attachmentOutput.children(\'a\').length;\r\n " +
|
||||
" var tabHeading = \'Attachments [\' + attachmentCount + \']\';\r\n " +
|
||||
" $(\'#DeviceDetailTab-ResourcesLink\').text(tabHeading);" +
|
||||
"\r\n }\r\n\r\n");
|
||||
WriteLiteral("/\' + a.Id + \'?v=\' + retryCount);\r\n };\r\n " +
|
||||
" img.on(\'error\', function () {\r\n " +
|
||||
" img.addClass(\'loading\');\r\n " +
|
||||
" retryCount++;\r\n if (retryCount < 6)" +
|
||||
"\r\n window.setTimeout(setThumbnailUrl," +
|
||||
" retryCount * 250);\r\n });\r\n " +
|
||||
" img.on(\'load\', function () {\r\n " +
|
||||
" img.removeClass(\'loading\');\r\n });\r\n " +
|
||||
" window.setTimeout(setThumbnailUrl, 100);\r\n " +
|
||||
" };\r\n buildThumbnail()" +
|
||||
";\r\n }\r\n\r\n function onRemov" +
|
||||
"eAttachment(id) {\r\n var a = $attachmentOutput.fin" +
|
||||
"d(\'a[data-attachmentid=\' + id + \']\');\r\n\r\n a.hide(" +
|
||||
"300).delay(300).queue(function () {\r\n var $th" +
|
||||
"is = $(this);\r\n if ($this.attr(\'data-mimetype" +
|
||||
"\').toLowerCase().indexOf(\'image/\') == 0)\r\n " +
|
||||
" Shadowbox.removeCache(this);\r\n $this.find(\'" +
|
||||
".timestamp\').livestamp(\'destroy\');\r\n $this.re" +
|
||||
"move();\r\n onUpdate();\r\n " +
|
||||
" });\r\n }\r\n\r\n func" +
|
||||
"tion onDownload() {\r\n var $this = $(this);\r\n " +
|
||||
" var url = $this.attr(\'href\');\r\n\r\n " +
|
||||
" if ($.connection && $.connection.hub && $.connection.hub.transport &" +
|
||||
"&\r\n $.connection.hub.transpor" +
|
||||
"t.name == \'foreverFrame\') {\r\n // SignalR acti" +
|
||||
"ve with foreverFrame transport - use popup window\r\n " +
|
||||
" window.open(url, \'_blank\', \'height=150,width=250,location=no,menubar=no,r" +
|
||||
"esizable=no,scrollbars=no,status=no,toolbar=no\');\r\n " +
|
||||
" } else {\r\n // use iFrame\r\n " +
|
||||
" if (!$attachmentDownloadHost) {\r\n " +
|
||||
" $attachmentDownloadHost = $(\'<iframe>\')\r\n " +
|
||||
" .attr({ \'src\': url, \'title\': \'Attachment Download Host\' })\r\n " +
|
||||
" .addClass(\'hidden\')\r\n " +
|
||||
" .appendTo(\'body\')\r\n " +
|
||||
" .contents();\r\n } else {\r\n " +
|
||||
" $attachmentDownloadHost[0].location.href = url;\r\n " +
|
||||
" }\r\n }\r\n\r\n " +
|
||||
" return false;\r\n }\r\n\r\n " +
|
||||
" function onUpdate() {\r\n va" +
|
||||
"r attachmentCount = $attachmentOutput.children(\'a\').length;\r\n " +
|
||||
" var tabHeading = \'Attachments [\' + attachmentCount + \']\';\r\n " +
|
||||
" $(\'#DeviceDetailTab-ResourcesLink\').text(tabHeading);\r\n " +
|
||||
" }\r\n\r\n");
|
||||
|
||||
|
||||
#line 178 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
#line 202 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 178 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
#line 202 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
if (canAddAttachments)
|
||||
{
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n //#region Add Attachments\r\n if (" +
|
||||
"!document.DiscoFunctions) {\r\n document.DiscoFunctions" +
|
||||
" = {};\r\n }\r\n document.DiscoFunctio" +
|
||||
"ns.addAttachment = function (Id) { return; /* Silverlight notification, do nothi" +
|
||||
"ng use SignalR */ };\r\n\r\n var $attachmentInput = $Attachme" +
|
||||
"nts.find(\'.attachmentInput\');\r\n $attachmentInput.find(\'.p" +
|
||||
"hoto\').click(function () {\r\n showDialog(\'/WebCam\');\r\n" +
|
||||
" });\r\n $attachmentInput.find(\'.upl" +
|
||||
"oad\').click(function () {\r\n showDialog(\'/File\');\r\n " +
|
||||
" });\r\n\r\n var silverlightOnLoadNavigat" +
|
||||
"ion = null;\r\n var silverlightIsLoaded = null;\r\n\r\n " +
|
||||
" function showDialog(navigationPath) {\r\n " +
|
||||
" if (!$dialogUpload) {\r\n $dialogUpload = $(\'#di" +
|
||||
"alogUpload\').dialog({\r\n autoOpen: false,\r\n " +
|
||||
" draggable: false,\r\n " +
|
||||
" modal: true,\r\n resizable: false,\r\n " +
|
||||
" width: 860,\r\n " +
|
||||
" height: 550,\r\n close: function () {\r\n " +
|
||||
" var sl = $(\'#silverlightUploadAttachment\').get" +
|
||||
"(0);\r\n if (sl.content)\r\n " +
|
||||
" sl.content.Navigator.Navigate(\'/Hidden\');\r\n " +
|
||||
" }\r\n });\r\n\r\n " +
|
||||
" Silverlight.createObject(\'");
|
||||
WriteLiteral("\r\n //#region Add Attachments\r\n " +
|
||||
" var attachmentUploader = new document.Disco.AttachmentUploader(\r\n " +
|
||||
" \'");
|
||||
|
||||
|
||||
#line 213 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
Write(Links.ClientBin.Disco_Silverlight_AttachmentUpload_xap);
|
||||
#line 206 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
Write(Url.Action(MVC.API.Device.AttachmentUpload(Model.Device.SerialNumber, null)));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(@"',
|
||||
$('#silverlightHostUploadAttachment').get(0),
|
||||
'silverlightUploadAttachment',
|
||||
{ width: '840px', height: '500px', background: 'white', version: '4.0.60310.0' },
|
||||
{
|
||||
onLoad: function () {
|
||||
if (silverlightOnLoadNavigation) {
|
||||
$('#silverlightUploadAttachment').get(0).content.Navigator.Navigate(silverlightOnLoadNavigation);
|
||||
silverlightIsLoaded = true;
|
||||
}
|
||||
}
|
||||
},
|
||||
'UploadUrl=");
|
||||
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" +
|
||||
"achmentInput.find(\'.upload\').click(function () {\r\n " +
|
||||
" attachmentUploader.uploadFiles();\r\n });\r\n\r\n " +
|
||||
" var resourcesTab;\r\n $(document).o" +
|
||||
"n(\'dragover\', function () {\r\n if (!resourcesTab) " +
|
||||
"{\r\n var tabs = $Attachments.closest(\'.ui-tabs" +
|
||||
"\');\r\n resourcesTab = {\r\n " +
|
||||
" tabs: tabs,\r\n resource" +
|
||||
"sIndex: tabs.children(\'ul.ui-tabs-nav\').find(\'a[href=\"#DeviceDetailTab-Resources" +
|
||||
"\"]\').closest(\'li\').index()\r\n };\r\n " +
|
||||
" }\r\n var selectedIndex = resou" +
|
||||
"rcesTab.tabs.tabs(\'option\', \'active\');\r\n if (reso" +
|
||||
"urcesTab.resourcesIndex !== selectedIndex)\r\n " +
|
||||
"resourcesTab.tabs.tabs(\'option\', \'active\', resourcesTab.resourcesIndex);\r\n " +
|
||||
" });\r\n //#endregion\r\n " +
|
||||
" ");
|
||||
|
||||
|
||||
#line 225 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
Write(Url.Action(MVC.API.Device.AttachmentUpload(Model.Device.SerialNumber, null)));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(@"');
|
||||
}
|
||||
|
||||
$dialogUpload.dialog('open');
|
||||
if (silverlightIsLoaded) {
|
||||
$('#silverlightUploadAttachment').get(0).content.Navigator.Navigate(navigationPath);
|
||||
} else {
|
||||
silverlightOnLoadNavigation = navigationPath;
|
||||
}
|
||||
};
|
||||
|
||||
//#endregion
|
||||
");
|
||||
|
||||
|
||||
#line 237 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
}
|
||||
#line 232 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
@@ -647,108 +651,89 @@ WriteLiteral(@"');
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 238 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
#line 233 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
if (canRemoveAnyAttachments || canRemoveOwnAttachments)
|
||||
{
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(@"
|
||||
//#region Remove Attachments
|
||||
$attachmentOutput.find('span.remove').click(removeAttachment);
|
||||
//#region Remove Attachments
|
||||
$attachmentOutput.find('span.remove').click(removeAttachment);
|
||||
|
||||
function removeAttachment() {
|
||||
$this = $(this).closest('a');
|
||||
function removeAttachment() {
|
||||
$this = $(this).closest('a');
|
||||
|
||||
var data = { id: $this.attr('data-attachmentid') };
|
||||
var data = { id: $this.attr('data-attachmentid') };
|
||||
|
||||
if (!$dialogRemoveAttachment) {
|
||||
$dialogRemoveAttachment = $('#dialogRemoveAttachment').dialog({
|
||||
resizable: false,
|
||||
height: 140,
|
||||
modal: true,
|
||||
autoOpen: false
|
||||
});
|
||||
}
|
||||
if (!$dialogRemoveAttachment) {
|
||||
$dialogRemoveAttachment = $('#dialogRemoveAttachment').dialog({
|
||||
resizable: false,
|
||||
height: 140,
|
||||
modal: true,
|
||||
autoOpen: false
|
||||
});
|
||||
}
|
||||
|
||||
$dialogRemoveAttachment.dialog(""enable"");
|
||||
$dialogRemoveAttachment.dialog('option', 'buttons', {
|
||||
""Remove"": function () {
|
||||
$dialogRemoveAttachment.dialog(""disable"");
|
||||
$dialogRemoveAttachment.dialog(""option"", ""buttons"", null);
|
||||
$.ajax({
|
||||
url: '");
|
||||
$dialogRemoveAttachment.dialog(""enable"");
|
||||
$dialogRemoveAttachment.dialog('option', 'buttons', {
|
||||
""Remove"": function () {
|
||||
$dialogRemoveAttachment.dialog(""disable"");
|
||||
$dialogRemoveAttachment.dialog(""option"", ""buttons"", null);
|
||||
$.ajax({
|
||||
url: '");
|
||||
|
||||
|
||||
#line 263 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
Write(Url.Action(MVC.API.Device.AttachmentRemove()));
|
||||
#line 258 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
Write(Url.Action(MVC.API.Device.AttachmentRemove()));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(@"',
|
||||
dataType: 'json',
|
||||
data: data,
|
||||
success: function (d) {
|
||||
if (d == 'OK') {
|
||||
// Do nothing, await SignalR notification
|
||||
} else {
|
||||
alert('Unable to remove attachment: ' + d);
|
||||
}
|
||||
$dialogRemoveAttachment.dialog(""close"");
|
||||
},
|
||||
error: function (jqXHR, textStatus, errorThrown) {
|
||||
alert('Unable to remove attachment: ' + textStatus);
|
||||
$dialogRemoveAttachment.dialog(""close"");
|
||||
}
|
||||
});
|
||||
},
|
||||
Cancel: function () {
|
||||
$dialogRemoveAttachment.dialog(""close"");
|
||||
}
|
||||
});
|
||||
|
||||
$dialogRemoveAttachment.dialog('open');
|
||||
|
||||
return false;
|
||||
}
|
||||
//#endregion
|
||||
");
|
||||
WriteLiteral("\',\r\n dataType: \'json\',\r\n " +
|
||||
" data: data,\r\n " +
|
||||
" success: function (d) {\r\n " +
|
||||
"if (d == \'OK\') {\r\n // Do noth" +
|
||||
"ing, await SignalR notification\r\n " +
|
||||
" } else {\r\n alert(\'Unable to " +
|
||||
"remove attachment: \' + d);\r\n }\r\n " +
|
||||
" $dialogRemoveAttachment.dialog(\"c" +
|
||||
"lose\");\r\n },\r\n " +
|
||||
" error: function (jqXHR, textStatus, errorThrown) {\r\n " +
|
||||
" alert(\'Unable to remove attachment: \' +" +
|
||||
" textStatus);\r\n $dialogRemoveAtta" +
|
||||
"chment.dialog(\"close\");\r\n }\r\n " +
|
||||
" });\r\n },\r\n " +
|
||||
" Cancel: function () {\r\n " +
|
||||
" $dialogRemoveAttachment.dialog(\"close\");\r\n " +
|
||||
" }\r\n });\r\n\r\n " +
|
||||
" $dialogRemoveAttachment.dialog(\'open\');\r\n\r\n " +
|
||||
" return false;\r\n }\r\n //#" +
|
||||
"endregion\r\n ");
|
||||
|
||||
|
||||
#line 290 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
#line 285 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(@"
|
||||
$attachmentOutput.children('a').each(function () {
|
||||
$this = $(this);
|
||||
if ($this.attr('data-mimetype').toLowerCase().indexOf('image/') == 0)
|
||||
$this.shadowbox({ gallery: 'attachments', player: 'img', title: $this.find('.comments').text() });
|
||||
else
|
||||
$this.click(onDownload);
|
||||
$attachmentOutput.children('a').each(function () {
|
||||
$this = $(this);
|
||||
if ($this.attr('data-mimetype').toLowerCase().indexOf('image/') == 0)
|
||||
$this.shadowbox({ gallery: 'attachments', player: 'img', title: $this.find('.comments').text() });
|
||||
else
|
||||
$this.click(onDownload);
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</script>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<div");
|
||||
|
||||
WriteLiteral(" id=\"dialogUpload\"");
|
||||
|
||||
WriteLiteral(" class=\"dialog\"");
|
||||
|
||||
WriteLiteral(" title=\"Upload Attachment\"");
|
||||
|
||||
WriteLiteral(">\r\n <div");
|
||||
|
||||
WriteLiteral(" id=\"silverlightHostUploadAttachment\"");
|
||||
|
||||
WriteLiteral(">\r\n </div>\r\n </div>\r\n <div");
|
||||
|
||||
WriteLiteral(" id=\"dialogRemoveAttachment\"");
|
||||
|
||||
WriteLiteral(" class=\"dialog\"");
|
||||
@@ -764,7 +749,7 @@ WriteLiteral("></i> Are you sure?\r\n </p>\r\n </div>\r\n <scr
|
||||
"etailTab-ResourcesLink\">Attachments [");
|
||||
|
||||
|
||||
#line 314 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
#line 306 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
Write(Model.Device.DeviceAttachments == null ? 0 : Model.Device.DeviceAttachments.Count);
|
||||
|
||||
|
||||
|
||||
@@ -600,7 +600,7 @@
|
||||
@if (Model.Device.CanUpdateTrustEnrol())
|
||||
{
|
||||
@Html.ActionLinkSmallButton("Trust Enrol", MVC.API.Device.UpdateAllowUnauthenticatedEnrol(Model.Device.SerialNumber, true.ToString(), true), "Device_Show_Device_Actions_TrustEnrol_Button")
|
||||
<div id="Device_Show_Device_Actions_TrustEnrol_Dialog" title="Trust this Device?">
|
||||
<div id="Device_Show_Device_Actions_TrustEnrol_Dialog" class="dialog" title="Trust this Device?">
|
||||
<div class="ui-widget">
|
||||
<div class="ui-state-highlight ui-corner-all" style="padding: 6px;">
|
||||
<div style="padding-bottom: 6px;">
|
||||
@@ -618,29 +618,33 @@
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
var button = $('#Device_Show_Device_Actions_TrustEnrol_Button');
|
||||
var buttonDialog = $('#Device_Show_Device_Actions_TrustEnrol_Dialog');
|
||||
var buttonLink = button.attr('href');
|
||||
button.attr('href', '#');
|
||||
var buttonDialog;
|
||||
button.click(function () {
|
||||
buttonDialog.dialog('open');
|
||||
return false;
|
||||
});
|
||||
buttonDialog.dialog({
|
||||
resizable: false,
|
||||
width: 400,
|
||||
modal: true,
|
||||
autoOpen: false,
|
||||
buttons: {
|
||||
"Trust": function () {
|
||||
var $this = $(this);
|
||||
$this.dialog("disable");
|
||||
$this.dialog("option", "buttons", null);
|
||||
window.location.href = buttonLink;
|
||||
},
|
||||
Cancel: function () {
|
||||
$(this).dialog("close");
|
||||
}
|
||||
if (!buttonDialog) {
|
||||
var buttonLink = button.attr('href');
|
||||
button.attr('href', '#');
|
||||
buttonDialog = $('#Device_Show_Device_Actions_TrustEnrol_Dialog').dialog({
|
||||
resizable: false,
|
||||
width: 400,
|
||||
modal: true,
|
||||
autoOpen: false,
|
||||
buttons: {
|
||||
"Trust": function () {
|
||||
var $this = $(this);
|
||||
$this.dialog("disable");
|
||||
$this.dialog("option", "buttons", null);
|
||||
window.location.href = buttonLink;
|
||||
},
|
||||
Cancel: function () {
|
||||
$(this).dialog("close");
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
buttonDialog.dialog('open');
|
||||
|
||||
return false;
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
@@ -2083,6 +2083,8 @@ WriteLiteral(" <div");
|
||||
|
||||
WriteLiteral(" id=\"Device_Show_Device_Actions_TrustEnrol_Dialog\"");
|
||||
|
||||
WriteLiteral(" class=\"dialog\"");
|
||||
|
||||
WriteLiteral(" title=\"Trust this Device?\"");
|
||||
|
||||
WriteLiteral(">\r\n <div");
|
||||
@@ -2135,39 +2137,30 @@ WriteLiteral(" <script");
|
||||
|
||||
WriteLiteral(" type=\"text/javascript\"");
|
||||
|
||||
WriteLiteral(@">
|
||||
$(function () {
|
||||
var button = $('#Device_Show_Device_Actions_TrustEnrol_Button');
|
||||
var buttonDialog = $('#Device_Show_Device_Actions_TrustEnrol_Dialog');
|
||||
var buttonLink = button.attr('href');
|
||||
button.attr('href', '#');
|
||||
button.click(function () {
|
||||
buttonDialog.dialog('open');
|
||||
return false;
|
||||
});
|
||||
buttonDialog.dialog({
|
||||
resizable: false,
|
||||
width: 400,
|
||||
modal: true,
|
||||
autoOpen: false,
|
||||
buttons: {
|
||||
""Trust"": function () {
|
||||
var $this = $(this);
|
||||
$this.dialog(""disable"");
|
||||
$this.dialog(""option"", ""buttons"", null);
|
||||
window.location.href = buttonLink;
|
||||
},
|
||||
Cancel: function () {
|
||||
$(this).dialog(""close"");
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
");
|
||||
WriteLiteral(">\r\n $(function () {\r\n var button = $(\'#" +
|
||||
"Device_Show_Device_Actions_TrustEnrol_Button\');\r\n var but" +
|
||||
"tonDialog;\r\n button.click(function () {\r\n " +
|
||||
" if (!buttonDialog) {\r\n var buttonLink" +
|
||||
" = button.attr(\'href\');\r\n button.attr(\'href\', \'#\'" +
|
||||
");\r\n buttonDialog = $(\'#Device_Show_Device_Action" +
|
||||
"s_TrustEnrol_Dialog\').dialog({\r\n resizable: f" +
|
||||
"alse,\r\n width: 400,\r\n " +
|
||||
" modal: true,\r\n autoOpen: false,\r\n" +
|
||||
" buttons: {\r\n " +
|
||||
" \"Trust\": function () {\r\n var " +
|
||||
"$this = $(this);\r\n $this.dialog(\"disa" +
|
||||
"ble\");\r\n $this.dialog(\"option\", \"butt" +
|
||||
"ons\", null);\r\n window.location.href =" +
|
||||
" buttonLink;\r\n },\r\n " +
|
||||
" Cancel: function () {\r\n " +
|
||||
" $(this).dialog(\"close\");\r\n }\r\n " +
|
||||
" }\r\n });\r\n " +
|
||||
" }\r\n\r\n buttonDialog.dialog(\'open\');\r" +
|
||||
"\n\r\n return false;\r\n });\r\n " +
|
||||
" });\r\n </script>\r\n");
|
||||
|
||||
|
||||
#line 647 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
#line 651 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -2176,7 +2169,7 @@ WriteLiteral(@">
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 648 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
#line 652 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
if (Model.Device.CanUpdateUntrustEnrol())
|
||||
{
|
||||
|
||||
@@ -2184,14 +2177,14 @@ WriteLiteral(" ");
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 650 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
#line 654 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
Write(Html.ActionLinkSmallButton("Untrust Enrol", MVC.API.Device.UpdateAllowUnauthenticatedEnrol(Model.Device.SerialNumber, false.ToString(), true), "Device_Show_Device_Actions_UntrustEnrol_Button"));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 650 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
#line 654 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
|
||||
|
||||
|
||||
@@ -2253,7 +2246,7 @@ WriteLiteral(@">
|
||||
");
|
||||
|
||||
|
||||
#line 686 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
#line 690 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -2262,7 +2255,7 @@ WriteLiteral(@">
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 687 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
#line 691 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
if (Model.Device.CanDecommission())
|
||||
{
|
||||
|
||||
@@ -2270,14 +2263,14 @@ WriteLiteral(" ");
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 689 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
#line 693 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
Write(Html.ActionLinkSmallButton("Decommission", MVC.API.Device.Decommission(), "Device_Show_Device_Actions_Decommission_Button"));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 689 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
#line 693 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
|
||||
|
||||
|
||||
@@ -2309,13 +2302,13 @@ WriteLiteral(" class=\"none\"");
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
|
||||
#line 696 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
#line 700 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 696 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
#line 700 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
foreach (DecommissionReasons decommissionReason in Enum.GetValues(typeof(DecommissionReasons)))
|
||||
{
|
||||
|
||||
@@ -2326,34 +2319,34 @@ WriteLiteral(" <li>\r\n
|
||||
|
||||
WriteLiteral(" type=\"radio\"");
|
||||
|
||||
WriteAttribute("id", Tuple.Create(" id=\"", 43281), Tuple.Create("\"", 43359)
|
||||
, Tuple.Create(Tuple.Create("", 43286), Tuple.Create("Device_Show_Device_Actions_Decommission_Reason_", 43286), true)
|
||||
WriteAttribute("id", Tuple.Create(" id=\"", 43533), Tuple.Create("\"", 43611)
|
||||
, Tuple.Create(Tuple.Create("", 43538), Tuple.Create("Device_Show_Device_Actions_Decommission_Reason_", 43538), true)
|
||||
|
||||
#line 699 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 43333), Tuple.Create<System.Object, System.Int32>((int)decommissionReason
|
||||
#line 703 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 43585), Tuple.Create<System.Object, System.Int32>((int)decommissionReason
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 43333), false)
|
||||
, 43585), false)
|
||||
);
|
||||
|
||||
WriteLiteral("\r\n name=\"Device_Show_Device_Actions_Decomm" +
|
||||
"ission_Reason\"");
|
||||
|
||||
WriteAttribute("value", Tuple.Create(" value=\"", 43455), Tuple.Create("\"", 43489)
|
||||
WriteAttribute("value", Tuple.Create(" value=\"", 43707), Tuple.Create("\"", 43741)
|
||||
|
||||
#line 700 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 43463), Tuple.Create<System.Object, System.Int32>((int)decommissionReason
|
||||
#line 704 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 43715), Tuple.Create<System.Object, System.Int32>((int)decommissionReason
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 43463), false)
|
||||
, 43715), false)
|
||||
);
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 700 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
#line 704 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
Write((decommissionReason == DecommissionReasons.EndOfLife) ? "checked=\"checked\"" : string.Empty);
|
||||
|
||||
|
||||
@@ -2361,21 +2354,21 @@ WriteLiteral(" ");
|
||||
#line hidden
|
||||
WriteLiteral("/>\r\n <label");
|
||||
|
||||
WriteAttribute("for", Tuple.Create(" for=\"", 43632), Tuple.Create("\"", 43711)
|
||||
, Tuple.Create(Tuple.Create("", 43638), Tuple.Create("Device_Show_Device_Actions_Decommission_Reason_", 43638), true)
|
||||
WriteAttribute("for", Tuple.Create(" for=\"", 43884), Tuple.Create("\"", 43963)
|
||||
, Tuple.Create(Tuple.Create("", 43890), Tuple.Create("Device_Show_Device_Actions_Decommission_Reason_", 43890), true)
|
||||
|
||||
#line 701 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 43685), Tuple.Create<System.Object, System.Int32>((int)decommissionReason
|
||||
#line 705 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 43937), Tuple.Create<System.Object, System.Int32>((int)decommissionReason
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 43685), false)
|
||||
, 43937), false)
|
||||
);
|
||||
|
||||
WriteLiteral(">");
|
||||
|
||||
|
||||
#line 701 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
#line 705 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
Write(decommissionReason.ReasonMessage());
|
||||
|
||||
|
||||
@@ -2384,7 +2377,7 @@ WriteLiteral(">");
|
||||
WriteLiteral("</label>\r\n </li>\r\n");
|
||||
|
||||
|
||||
#line 703 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
#line 707 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -2402,7 +2395,7 @@ WriteLiteral(">\r\n $(function () {\r\n
|
||||
"uttonDialog = null;\r\n var deviceSerialNumber = \'");
|
||||
|
||||
|
||||
#line 711 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
#line 715 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
Write(Model.Device.SerialNumber);
|
||||
|
||||
|
||||
@@ -2435,7 +2428,7 @@ WriteLiteral("\';\r\n\r\n button.click(function () {\r\n\
|
||||
" });\r\n </script>\r\n");
|
||||
|
||||
|
||||
#line 747 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
#line 751 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -2444,7 +2437,7 @@ WriteLiteral("\';\r\n\r\n button.click(function () {\r\n\
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 748 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
#line 752 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
if (Model.Device.CanRecommission())
|
||||
{
|
||||
|
||||
@@ -2452,14 +2445,14 @@ WriteLiteral(" ");
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 750 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
#line 754 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
Write(Html.ActionLinkSmallButton("Recommission", MVC.API.Device.Recommission(Model.Device.SerialNumber, true), "Device_Show_Device_Actions_Recommission_Button"));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 750 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
#line 754 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
|
||||
|
||||
|
||||
@@ -2513,7 +2506,7 @@ WriteLiteral(@">
|
||||
");
|
||||
|
||||
|
||||
#line 785 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
#line 789 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -2522,7 +2515,7 @@ WriteLiteral(@">
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 786 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
#line 790 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
if (Model.Device.CanDelete())
|
||||
{
|
||||
|
||||
@@ -2530,14 +2523,14 @@ WriteLiteral(" ");
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 788 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
#line 792 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
Write(Html.ActionLinkSmallButton("Delete Device", MVC.API.Device.Delete(Model.Device.SerialNumber, true), "Device_Show_Device_Actions_Delete_Button"));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 788 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
#line 792 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
|
||||
|
||||
|
||||
@@ -2597,7 +2590,7 @@ WriteLiteral(@">
|
||||
");
|
||||
|
||||
|
||||
#line 826 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
#line 830 "..\..\Views\Device\DeviceParts\_Subject.cshtml"
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -18,57 +18,69 @@
|
||||
Html.BundleDeferred("~/Style/Shadowbox");
|
||||
Html.BundleDeferred("~/ClientScripts/Modules/Shadowbox");
|
||||
}
|
||||
if (canAddAttachments)
|
||||
{
|
||||
Html.BundleDeferred("~/ClientScripts/Modules/Disco-AttachmentUploader");
|
||||
}
|
||||
Html.BundleDeferred("~/ClientScripts/Modules/jQuery-SignalR");
|
||||
}
|
||||
<table id="jobShowResources">
|
||||
<tr class="@(canShowLogs ? "canShowLogs" : "cannotShowLogs") @(canShowAttachments ? "canShowAttachments" : "cannotShowAttachments")">
|
||||
@if (canShowLogs)
|
||||
{
|
||||
<td id="Comments" class="@(canAddLogs ? "canAddLogs" : "cannotAddLogs")">
|
||||
<div class="commentOutput">
|
||||
@foreach (var jl in Model.Job.JobLogs.OrderBy(m => m.Timestamp))
|
||||
<td id="CommentsContainer">
|
||||
<div id="Comments" class="@(canAddLogs ? "canAddLogs" : "cannotAddLogs")">
|
||||
<div class="commentOutput">
|
||||
@foreach (var jl in Model.Job.JobLogs.OrderBy(m => m.Timestamp))
|
||||
{
|
||||
<div data-logid="@jl.Id">
|
||||
<span class="author">@jl.TechUser.ToStringFriendly()</span>@if (canRemoveAnyLogs || (canRemoveOwnLogs && jl.TechUserId == CurrentUser.UserId))
|
||||
{<text><span class="remove fa fa-times-circle"></span></text>}<span class="timestamp" data-livestamp="@(jl.Timestamp.ToUnixEpoc())" title="@jl.Timestamp.ToFullDateTime()">@jl.Timestamp.ToFullDateTime()</span>
|
||||
<span class="comment">@jl.Comments.ToMultilineJobRefString()</span>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
@if (canAddLogs)
|
||||
{
|
||||
<div data-logid="@jl.Id">
|
||||
<span class="author">@jl.TechUser.ToStringFriendly()</span>@if (canRemoveAnyLogs || (canRemoveOwnLogs && jl.TechUserId == CurrentUser.UserId))
|
||||
{<text><span class="remove fa fa-times-circle"></span></text>}<span class="timestamp" data-livestamp="@(jl.Timestamp.ToUnixEpoc())" title="@jl.Timestamp.ToFullDateTime()">@jl.Timestamp.ToFullDateTime()</span>
|
||||
<span class="comment">@jl.Comments.ToMultilineJobRefString()</span>
|
||||
<div class="commentInput clearfix">
|
||||
<textarea class="commentInput" placeholder="write comment..." accesskey="l"></textarea>
|
||||
<span class="action post commentInputPost fa fa-comment" title="Post Comment"></span>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
@if (canAddLogs)
|
||||
{
|
||||
<div class="commentInput clearfix">
|
||||
<textarea class="commentInput" placeholder="write comment..." accesskey="l"></textarea>
|
||||
<span class="action post commentInputPost fa fa-comment" title="Post Comment"></span>
|
||||
</div>
|
||||
}
|
||||
</td>
|
||||
}
|
||||
@if (canShowAttachments)
|
||||
{
|
||||
<td id="Attachments" class="@(canAddAttachments ? "canAddAttachments" : "cannotAddAttachments")">
|
||||
<div class="attachmentOutput">
|
||||
@foreach (var ja in Model.Job.JobAttachments)
|
||||
<td id="AttachmentsContainer">
|
||||
<div id="Attachments" class="@(canAddAttachments ? "canAddAttachments" : "cannotAddAttachments")">
|
||||
<div class="disco-attachmentUpload-dropTarget">
|
||||
<h2>Drop Attachments Here</h2>
|
||||
</div>
|
||||
<div class="attachmentOutput">
|
||||
@foreach (var ja in Model.Job.JobAttachments)
|
||||
{
|
||||
<a href="@Url.Action(MVC.API.Job.AttachmentDownload(ja.Id))" data-attachmentid="@ja.Id" data-mimetype="@ja.MimeType">
|
||||
<span class="icon" title="@ja.Filename">
|
||||
<img alt="Attachment Thumbnail" src="@(Url.Action(MVC.API.Job.AttachmentThumbnail(ja.Id)))" /></span>
|
||||
<span class="comments" title="@ja.Comments">
|
||||
@{if (!string.IsNullOrEmpty(ja.DocumentTemplateId))
|
||||
{ @ja.DocumentTemplate.Description}
|
||||
else
|
||||
{ @ja.Comments }}
|
||||
</span><span class="author">@ja.TechUser.ToStringFriendly()</span>@if (canRemoveAnyAttachments || (canRemoveOwnAttachments && ja.TechUserId == CurrentUser.UserId))
|
||||
{<text><span class="remove fa fa-times-circle"></span></text>}<span class="timestamp" data-livestamp="@(ja.Timestamp.ToUnixEpoc())" title="@ja.Timestamp.ToFullDateTime()">@ja.Timestamp.ToFullDateTime()</span>
|
||||
</a>
|
||||
}
|
||||
</div>
|
||||
@if (canAddAttachments)
|
||||
{
|
||||
<a href="@Url.Action(MVC.API.Job.AttachmentDownload(ja.Id))" data-attachmentid="@ja.Id" data-mimetype="@ja.MimeType">
|
||||
<span class="icon" title="@ja.Filename">
|
||||
<img alt="Attachment Thumbnail" src="@(Url.Action(MVC.API.Job.AttachmentThumbnail(ja.Id)))" /></span>
|
||||
<span class="comments" title="@ja.Comments">
|
||||
@{if (!string.IsNullOrEmpty(ja.DocumentTemplateId))
|
||||
{ @ja.DocumentTemplate.Description}
|
||||
else
|
||||
{ @ja.Comments }}
|
||||
</span><span class="author">@ja.TechUser.ToStringFriendly()</span>@if (canRemoveAnyAttachments || (canRemoveOwnAttachments && ja.TechUserId == CurrentUser.UserId))
|
||||
{<text><span class="remove fa fa-times-circle"></span></text>}<span class="timestamp" data-livestamp="@(ja.Timestamp.ToUnixEpoc())" title="@ja.Timestamp.ToFullDateTime()">@ja.Timestamp.ToFullDateTime()</span>
|
||||
</a>
|
||||
<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>
|
||||
}
|
||||
</div>
|
||||
@if (canAddAttachments)
|
||||
{
|
||||
<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>
|
||||
}
|
||||
</td>
|
||||
}
|
||||
</tr>
|
||||
@@ -81,13 +93,6 @@
|
||||
</p>
|
||||
</div>
|
||||
}
|
||||
@if (canShowAttachments && canAddAttachments)
|
||||
{
|
||||
<div id="dialogUpload" class="dialog" title="Upload Attachment">
|
||||
<div id="silverlightHostUploadAttachment">
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
@if (canShowAttachments && (canRemoveAnyAttachments || canRemoveOwnAttachments))
|
||||
{
|
||||
<div id="dialogRemoveAttachment" class="dialog" title="Remove this Attachment?">
|
||||
@@ -222,10 +227,10 @@
|
||||
function loadLiveComment(key) {
|
||||
$.ajax({
|
||||
url: '@Url.Action(MVC.API.Job.Comment())',
|
||||
dataType: 'json',
|
||||
data: { id: key },
|
||||
success: function (d) {
|
||||
if (d && d.JobId == jobId) {
|
||||
dataType: 'json',
|
||||
data: { id: key },
|
||||
success: function (d) {
|
||||
if (d && d.JobId == jobId) {
|
||||
@if (canRemoveAnyLogs)
|
||||
{<text>addComment(d, false, true);</text>}
|
||||
else if (canRemoveOwnLogs)
|
||||
@@ -233,13 +238,13 @@
|
||||
else
|
||||
{<text>addComment(d, false, false);</text>}
|
||||
|
||||
}
|
||||
},
|
||||
error: function (jqXHR, textStatus, errorThrown) {
|
||||
alert('Unable to load live comment ' + id + ': ' + textStatus);
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
error: function (jqXHR, textStatus, errorThrown) {
|
||||
alert('Unable to load live comment ' + id + ': ' + textStatus);
|
||||
}
|
||||
});
|
||||
}
|
||||
function liveRemoveComment(key) {
|
||||
$CommentOutput.children('div[data-logid="' + key + '"]').slideUp(300).delay(300).queue(function () {
|
||||
var $this = $(this);
|
||||
@@ -305,63 +310,32 @@
|
||||
@if (canAddAttachments)
|
||||
{<text>
|
||||
//#region Add Attachments
|
||||
|
||||
// For Silverlight Backwards-compatibility
|
||||
// - Repository notifications now handles this
|
||||
document.DiscoFunctions.addAttachment = function () { };
|
||||
|
||||
var $dialogUpload;
|
||||
var onLoadNavigation = null;
|
||||
var isLoaded = null;
|
||||
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'));
|
||||
|
||||
var $attachmentInput = $Attachments.find('.attachmentInput');
|
||||
$attachmentInput.find('.photo').click(function () {
|
||||
showDialog('/WebCam');
|
||||
attachmentUploader.uploadImage();
|
||||
});
|
||||
$attachmentInput.find('.upload').click(function () {
|
||||
showDialog('/File');
|
||||
attachmentUploader.uploadFiles();
|
||||
});
|
||||
|
||||
function showDialog(navigationPath) {
|
||||
if (!$dialogUpload) {
|
||||
Silverlight.createObject(
|
||||
'@(Links.ClientBin.Disco_Silverlight_AttachmentUpload_xap)',
|
||||
$('#silverlightHostUploadAttachment').get(0),
|
||||
'silverlightUploadAttachment',
|
||||
{ width: '840px', height: '500px', background: 'white', version: '4.0.60310.0' },
|
||||
{
|
||||
onLoad: function () {
|
||||
if (onLoadNavigation) {
|
||||
$('#silverlightUploadAttachment').get(0).content.Navigator.Navigate(onLoadNavigation);
|
||||
isLoaded = true;
|
||||
}
|
||||
}
|
||||
},
|
||||
'UploadUrl=@(Url.Action(MVC.API.Job.AttachmentUpload(Model.Job.Id, null)))');
|
||||
|
||||
$dialogUpload = $('#dialogUpload').dialog({
|
||||
autoOpen: false,
|
||||
draggable: false,
|
||||
modal: true,
|
||||
resizable: false,
|
||||
width: 860,
|
||||
height: 550,
|
||||
close: function () {
|
||||
var sl = $('#silverlightUploadAttachment').get(0);
|
||||
if (sl.content)
|
||||
sl.content.Navigator.Navigate('/Hidden');
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
$dialogUpload.dialog('open');
|
||||
if (isLoaded) {
|
||||
$('#silverlightUploadAttachment').get(0).content.Navigator.Navigate(navigationPath);
|
||||
} else {
|
||||
onLoadNavigation = navigationPath;
|
||||
}
|
||||
var resourcesTab;
|
||||
$(document).on('dragover', function () {
|
||||
if (!resourcesTab) {
|
||||
var tabs = $Attachments.closest('.ui-tabs');
|
||||
resourcesTab = {
|
||||
tabs: tabs,
|
||||
resourcesIndex: tabs.children('ul.ui-tabs-nav').find('a[href="#jobDetailTab-Resources"]').closest('li').index()
|
||||
};
|
||||
|
||||
}
|
||||
var selectedIndex = resourcesTab.tabs.tabs('option', 'active');
|
||||
if (resourcesTab.resourcesIndex !== selectedIndex)
|
||||
resourcesTab.tabs.tabs('option', 'active', resourcesTab.resourcesIndex);
|
||||
});
|
||||
//#endregion
|
||||
</text>}
|
||||
|
||||
@@ -442,15 +416,15 @@
|
||||
{
|
||||
<text>buildAttachment(a, false, quick);</text>
|
||||
}
|
||||
} else {
|
||||
alert('Unable to add attachment: ' + d.Result);
|
||||
}
|
||||
},
|
||||
} else {
|
||||
alert('Unable to add attachment: ' + d.Result);
|
||||
}
|
||||
},
|
||||
error: function (jqXHR, textStatus, errorThrown) {
|
||||
alert('Unable to add attachment: ' + textStatus);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
function buildAttachment(a, canRemove, quick) {
|
||||
if (parseInt(a.ParentId) == jobId) {
|
||||
var t = '<a><span class="icon"><img alt="Attachment Thumbnail" /></span><span class="comments"></span><span class="author"></span>';
|
||||
@@ -461,7 +435,6 @@
|
||||
var e = $(t);
|
||||
|
||||
e.attr('data-attachmentid', a.Id).attr('data-mimetype', a.MimeType).attr('href', '@(Url.Action(MVC.API.Job.AttachmentDownload()))/' + a.Id);
|
||||
e.find('.icon img').attr('src', '@(Url.Action(MVC.API.Job.AttachmentThumbnail()))/' + a.Id);
|
||||
e.find('.comments').text(a.Description);
|
||||
e.find('.author').text(a.Author);
|
||||
e.find('.timestamp').text(a.TimestampFull).attr('title', a.TimestampFull).livestamp(a.TimestampUnixEpoc);
|
||||
@@ -477,6 +450,27 @@
|
||||
e.shadowbox({ gallery: 'attachments', player: 'img', title: a.Description });
|
||||
else
|
||||
e.click(onDownload);
|
||||
|
||||
// Add Thumbnail
|
||||
var buildThumbnail = function () {
|
||||
var retryCount = 0;
|
||||
var img = e.find('.icon img');
|
||||
|
||||
var setThumbnailUrl = function () {
|
||||
img.attr('src', '@(Url.Action(MVC.API.Job.AttachmentThumbnail()))/' + a.Id + '?v=' + retryCount);
|
||||
};
|
||||
img.on('error', function () {
|
||||
img.addClass('loading');
|
||||
retryCount++;
|
||||
if (retryCount < 6)
|
||||
window.setTimeout(setThumbnailUrl, retryCount * 250);
|
||||
});
|
||||
img.on('load', function () {
|
||||
img.removeClass('loading');
|
||||
});
|
||||
window.setTimeout(setThumbnailUrl, 100);
|
||||
};
|
||||
buildThumbnail();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -557,7 +551,7 @@
|
||||
document.DiscoFunctions.liveAfterUpdate = function () {
|
||||
var tabLink = $('#jobDetailTab-ResourcesLink');
|
||||
var attachmentCount = $('#Attachments').find('.attachmentOutput').children('a').length;
|
||||
|
||||
|
||||
var tabHeading = tabLink.text();
|
||||
tabHeading = tabHeading.substr(0, tabHeading.indexOf('[') + 1) + attachmentCount + ']';
|
||||
tabLink.text(tabHeading);
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
@@ -2,11 +2,6 @@
|
||||
@{
|
||||
ViewBag.Title = Html.ToBreadcrumb("Jobs", MVC.Job.Index(), string.Format("Job: {0}", Model.Job.Id.ToString()));
|
||||
|
||||
if (Authorization.Has(Claims.Job.Actions.AddAttachments))
|
||||
{
|
||||
Html.BundleDeferred("~/ClientScripts/Modules/Silverlight");
|
||||
}
|
||||
|
||||
Html.BundleDeferred("~/ClientScripts/Modules/jQueryUI-TimePicker");
|
||||
|
||||
Authorization.Require(Claims.Job.Show);
|
||||
|
||||
@@ -49,11 +49,6 @@ namespace Disco.Web.Views.Job
|
||||
|
||||
ViewBag.Title = Html.ToBreadcrumb("Jobs", MVC.Job.Index(), string.Format("Job: {0}", Model.Job.Id.ToString()));
|
||||
|
||||
if (Authorization.Has(Claims.Job.Actions.AddAttachments))
|
||||
{
|
||||
Html.BundleDeferred("~/ClientScripts/Modules/Silverlight");
|
||||
}
|
||||
|
||||
Html.BundleDeferred("~/ClientScripts/Modules/jQueryUI-TimePicker");
|
||||
|
||||
Authorization.Require(Claims.Job.Show);
|
||||
@@ -72,36 +67,36 @@ WriteLiteral(" id=\"Job_Show_Status\"");
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
|
||||
#line 16 "..\..\Views\Job\Show.cshtml"
|
||||
#line 11 "..\..\Views\Job\Show.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 16 "..\..\Views\Job\Show.cshtml"
|
||||
#line 11 "..\..\Views\Job\Show.cshtml"
|
||||
var jobStatusInfo = Model.Job.Status();
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n <i");
|
||||
|
||||
WriteAttribute("class", Tuple.Create(" class=\"", 549), Tuple.Create("\"", 602)
|
||||
, Tuple.Create(Tuple.Create("", 557), Tuple.Create("fa", 557), true)
|
||||
, Tuple.Create(Tuple.Create(" ", 559), Tuple.Create("fa-square", 560), true)
|
||||
, Tuple.Create(Tuple.Create(" ", 569), Tuple.Create("jobStatus", 570), true)
|
||||
WriteAttribute("class", Tuple.Create(" class=\"", 401), Tuple.Create("\"", 454)
|
||||
, Tuple.Create(Tuple.Create("", 409), Tuple.Create("fa", 409), true)
|
||||
, Tuple.Create(Tuple.Create(" ", 411), Tuple.Create("fa-square", 412), true)
|
||||
, Tuple.Create(Tuple.Create(" ", 421), Tuple.Create("jobStatus", 422), true)
|
||||
|
||||
#line 17 "..\..\Views\Job\Show.cshtml"
|
||||
, Tuple.Create(Tuple.Create(" ", 579), Tuple.Create<System.Object, System.Int32>(jobStatusInfo.Item1
|
||||
#line 12 "..\..\Views\Job\Show.cshtml"
|
||||
, Tuple.Create(Tuple.Create(" ", 431), Tuple.Create<System.Object, System.Int32>(jobStatusInfo.Item1
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 580), false)
|
||||
, 432), false)
|
||||
);
|
||||
|
||||
WriteLiteral("></i> ");
|
||||
|
||||
|
||||
#line 17 "..\..\Views\Job\Show.cshtml"
|
||||
#line 12 "..\..\Views\Job\Show.cshtml"
|
||||
Write(jobStatusInfo.Item2);
|
||||
|
||||
|
||||
@@ -110,7 +105,7 @@ WriteLiteral("></i> ");
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 17 "..\..\Views\Job\Show.cshtml"
|
||||
#line 12 "..\..\Views\Job\Show.cshtml"
|
||||
if (Model.LongRunning.HasValue)
|
||||
{
|
||||
|
||||
@@ -123,7 +118,7 @@ WriteLiteral(" class=\"smallMessage\"");
|
||||
WriteLiteral(">(Long Running: ");
|
||||
|
||||
|
||||
#line 18 "..\..\Views\Job\Show.cshtml"
|
||||
#line 13 "..\..\Views\Job\Show.cshtml"
|
||||
Write(Model.LongRunning.Value.Humanize(false));
|
||||
|
||||
|
||||
@@ -132,7 +127,7 @@ WriteLiteral(">(Long Running: ");
|
||||
WriteLiteral(")</span>");
|
||||
|
||||
|
||||
#line 18 "..\..\Views\Job\Show.cshtml"
|
||||
#line 13 "..\..\Views\Job\Show.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -145,13 +140,13 @@ WriteLiteral(" id=\"Job_Show_QueueStatus\"");
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
|
||||
#line 21 "..\..\Views\Job\Show.cshtml"
|
||||
#line 16 "..\..\Views\Job\Show.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 21 "..\..\Views\Job\Show.cshtml"
|
||||
#line 16 "..\..\Views\Job\Show.cshtml"
|
||||
foreach (var jq in Model.Job.JobQueues.Where(q => !q.RemovedDate.HasValue).Select(q => Disco.Services.Jobs.JobQueues.JobQueueService.GetQueue(q.JobQueueId)))
|
||||
{
|
||||
|
||||
@@ -160,42 +155,42 @@ WriteLiteral(">\r\n");
|
||||
#line hidden
|
||||
WriteLiteral(" <i");
|
||||
|
||||
WriteAttribute("class", Tuple.Create(" class=\"", 1101), Tuple.Create("\"", 1174)
|
||||
, Tuple.Create(Tuple.Create("", 1109), Tuple.Create("fa", 1109), true)
|
||||
, Tuple.Create(Tuple.Create(" ", 1111), Tuple.Create("fa-", 1112), true)
|
||||
WriteAttribute("class", Tuple.Create(" class=\"", 953), Tuple.Create("\"", 1026)
|
||||
, Tuple.Create(Tuple.Create("", 961), Tuple.Create("fa", 961), true)
|
||||
, Tuple.Create(Tuple.Create(" ", 963), Tuple.Create("fa-", 964), true)
|
||||
|
||||
#line 23 "..\..\Views\Job\Show.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 1115), Tuple.Create<System.Object, System.Int32>(jq.JobQueue.Icon
|
||||
#line 18 "..\..\Views\Job\Show.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 967), Tuple.Create<System.Object, System.Int32>(jq.JobQueue.Icon
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 1115), false)
|
||||
, Tuple.Create(Tuple.Create(" ", 1134), Tuple.Create("fa-fw", 1135), true)
|
||||
, Tuple.Create(Tuple.Create(" ", 1140), Tuple.Create("fa-lg", 1141), true)
|
||||
, Tuple.Create(Tuple.Create(" ", 1146), Tuple.Create("d-", 1147), true)
|
||||
, 967), false)
|
||||
, Tuple.Create(Tuple.Create(" ", 986), Tuple.Create("fa-fw", 987), true)
|
||||
, Tuple.Create(Tuple.Create(" ", 992), Tuple.Create("fa-lg", 993), true)
|
||||
, Tuple.Create(Tuple.Create(" ", 998), Tuple.Create("d-", 999), true)
|
||||
|
||||
#line 23 "..\..\Views\Job\Show.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 1149), Tuple.Create<System.Object, System.Int32>(jq.JobQueue.IconColour
|
||||
#line 18 "..\..\Views\Job\Show.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 1001), Tuple.Create<System.Object, System.Int32>(jq.JobQueue.IconColour
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 1149), false)
|
||||
, 1001), false)
|
||||
);
|
||||
|
||||
WriteAttribute("title", Tuple.Create(" title=\"", 1175), Tuple.Create("\"", 1202)
|
||||
WriteAttribute("title", Tuple.Create(" title=\"", 1027), Tuple.Create("\"", 1054)
|
||||
|
||||
#line 23 "..\..\Views\Job\Show.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 1183), Tuple.Create<System.Object, System.Int32>(jq.JobQueue.Name
|
||||
#line 18 "..\..\Views\Job\Show.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 1035), Tuple.Create<System.Object, System.Int32>(jq.JobQueue.Name
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 1183), false)
|
||||
, 1035), false)
|
||||
);
|
||||
|
||||
WriteLiteral("></i>\r\n");
|
||||
|
||||
|
||||
#line 24 "..\..\Views\Job\Show.cshtml"
|
||||
#line 19 "..\..\Views\Job\Show.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -212,7 +207,7 @@ WriteLiteral(">\r\n $(function () {\r\n $(\'#Job_Show_Status\'
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 32 "..\..\Views\Job\Show.cshtml"
|
||||
#line 27 "..\..\Views\Job\Show.cshtml"
|
||||
Write(Html.Partial(MVC.Job.Views.JobParts._Subject, Model));
|
||||
|
||||
|
||||
@@ -252,13 +247,13 @@ WriteLiteral(" id=\"jobDetailTabItems\"");
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
|
||||
#line 68 "..\..\Views\Job\Show.cshtml"
|
||||
#line 63 "..\..\Views\Job\Show.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 68 "..\..\Views\Job\Show.cshtml"
|
||||
#line 63 "..\..\Views\Job\Show.cshtml"
|
||||
if (Authorization.HasAll(Claims.Job.ShowLogs, Claims.Job.ShowAttachments))
|
||||
{
|
||||
|
||||
@@ -274,7 +269,7 @@ WriteLiteral(" href=\"#jobDetailTab-Resources\"");
|
||||
WriteLiteral(">Log and Attachments [");
|
||||
|
||||
|
||||
#line 70 "..\..\Views\Job\Show.cshtml"
|
||||
#line 65 "..\..\Views\Job\Show.cshtml"
|
||||
Write(Model.Job.JobAttachments.Count);
|
||||
|
||||
|
||||
@@ -283,7 +278,7 @@ WriteLiteral(">Log and Attachments [");
|
||||
WriteLiteral("]</a></li>\r\n");
|
||||
|
||||
|
||||
#line 71 "..\..\Views\Job\Show.cshtml"
|
||||
#line 66 "..\..\Views\Job\Show.cshtml"
|
||||
}
|
||||
else if (Authorization.Has(Claims.Job.ShowLogs))
|
||||
{
|
||||
@@ -300,7 +295,7 @@ WriteLiteral(" href=\"#jobDetailTab-Resources\"");
|
||||
WriteLiteral(">Log</a></li>\r\n");
|
||||
|
||||
|
||||
#line 75 "..\..\Views\Job\Show.cshtml"
|
||||
#line 70 "..\..\Views\Job\Show.cshtml"
|
||||
}
|
||||
else if (Authorization.Has(Claims.Job.ShowAttachments))
|
||||
{
|
||||
@@ -317,7 +312,7 @@ WriteLiteral(" href=\"#jobDetailTab-Resources\"");
|
||||
WriteLiteral(">Attachments [");
|
||||
|
||||
|
||||
#line 78 "..\..\Views\Job\Show.cshtml"
|
||||
#line 73 "..\..\Views\Job\Show.cshtml"
|
||||
Write(Model.Job.JobAttachments.Count);
|
||||
|
||||
|
||||
@@ -326,7 +321,7 @@ WriteLiteral(">Attachments [");
|
||||
WriteLiteral("]</a></li>\r\n");
|
||||
|
||||
|
||||
#line 79 "..\..\Views\Job\Show.cshtml"
|
||||
#line 74 "..\..\Views\Job\Show.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -335,7 +330,7 @@ WriteLiteral("]</a></li>\r\n");
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 80 "..\..\Views\Job\Show.cshtml"
|
||||
#line 75 "..\..\Views\Job\Show.cshtml"
|
||||
if (Authorization.Has(Claims.Job.ShowJobsQueues))
|
||||
{
|
||||
|
||||
@@ -351,7 +346,7 @@ WriteLiteral(" href=\"#jobDetailTab-Queues\"");
|
||||
WriteLiteral(">Queues [");
|
||||
|
||||
|
||||
#line 82 "..\..\Views\Job\Show.cshtml"
|
||||
#line 77 "..\..\Views\Job\Show.cshtml"
|
||||
Write(Model.Job.JobQueues.Count(jq => !jq.RemovedDate.HasValue));
|
||||
|
||||
|
||||
@@ -360,7 +355,7 @@ WriteLiteral(">Queues [");
|
||||
WriteLiteral("]</a></li>\r\n");
|
||||
|
||||
|
||||
#line 83 "..\..\Views\Job\Show.cshtml"
|
||||
#line 78 "..\..\Views\Job\Show.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -369,13 +364,13 @@ WriteLiteral("]</a></li>\r\n");
|
||||
WriteLiteral(" </ul>\r\n");
|
||||
|
||||
|
||||
#line 85 "..\..\Views\Job\Show.cshtml"
|
||||
#line 80 "..\..\Views\Job\Show.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 85 "..\..\Views\Job\Show.cshtml"
|
||||
#line 80 "..\..\Views\Job\Show.cshtml"
|
||||
if (Authorization.HasAny(Claims.Job.ShowLogs, Claims.Job.ShowAttachments))
|
||||
{
|
||||
|
||||
@@ -393,7 +388,7 @@ WriteLiteral(">\r\n");
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 88 "..\..\Views\Job\Show.cshtml"
|
||||
#line 83 "..\..\Views\Job\Show.cshtml"
|
||||
Write(Html.Partial(MVC.Job.Views.JobParts.Resources, Model));
|
||||
|
||||
|
||||
@@ -402,7 +397,7 @@ WriteLiteral(" ");
|
||||
WriteLiteral("\r\n </div>\r\n");
|
||||
|
||||
|
||||
#line 90 "..\..\Views\Job\Show.cshtml"
|
||||
#line 85 "..\..\Views\Job\Show.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -411,7 +406,7 @@ WriteLiteral("\r\n </div>\r\n");
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 91 "..\..\Views\Job\Show.cshtml"
|
||||
#line 86 "..\..\Views\Job\Show.cshtml"
|
||||
if (Authorization.Has(Claims.Job.ShowJobsQueues))
|
||||
{
|
||||
|
||||
@@ -429,7 +424,7 @@ WriteLiteral(">\r\n");
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 94 "..\..\Views\Job\Show.cshtml"
|
||||
#line 89 "..\..\Views\Job\Show.cshtml"
|
||||
Write(Html.Partial(MVC.Job.Views.JobParts.Queues, Model));
|
||||
|
||||
|
||||
@@ -438,7 +433,7 @@ WriteLiteral(" ");
|
||||
WriteLiteral("\r\n </div>\r\n");
|
||||
|
||||
|
||||
#line 96 "..\..\Views\Job\Show.cshtml"
|
||||
#line 91 "..\..\Views\Job\Show.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -447,7 +442,7 @@ WriteLiteral("\r\n </div>\r\n");
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 97 "..\..\Views\Job\Show.cshtml"
|
||||
#line 92 "..\..\Views\Job\Show.cshtml"
|
||||
Write(Html.Partial(MVC.Job.Views.JobParts.JobMetaAdditions, Model));
|
||||
|
||||
|
||||
|
||||
@@ -12,57 +12,61 @@
|
||||
|
||||
if (canAddAttachments)
|
||||
{
|
||||
Html.BundleDeferred("~/ClientScripts/Modules/Silverlight");
|
||||
Html.BundleDeferred("~/ClientScripts/Modules/Disco-AttachmentUploader");
|
||||
}
|
||||
}
|
||||
<div id="UserDetailTab-Resources" class="UserPart">
|
||||
<table id="userShowResources">
|
||||
<tr>
|
||||
<td id="Attachments" class="@(canAddAttachments ? "canAddAttachments" : "cannotAddAttachments")">
|
||||
<div class="attachmentOutput">
|
||||
@if (Model.User.UserAttachments != null)
|
||||
{
|
||||
foreach (var ua in Model.User.UserAttachments)
|
||||
{
|
||||
<a href="@Url.Action(MVC.API.User.AttachmentDownload(ua.Id))" data-attachmentid="@ua.Id" data-mimetype="@ua.MimeType">
|
||||
<span class="icon" title="@ua.Filename">
|
||||
<img alt="Attachment Thumbnail" src="@(Url.Action(MVC.API.User.AttachmentThumbnail(ua.Id)))" /></span>
|
||||
<span class="comments" title="@ua.Comments">
|
||||
@{if (!string.IsNullOrEmpty(ua.DocumentTemplateId))
|
||||
{ @ua.DocumentTemplate.Description}
|
||||
else
|
||||
{ @ua.Comments }}
|
||||
</span><span class="author">@ua.TechUser.ToStringFriendly()</span>@if (canRemoveAnyAttachments || (canRemoveOwnAttachments && ua.TechUserId == CurrentUser.UserId))
|
||||
{<text><span class="remove fa fa-times-circle"></span></text>}<span class="timestamp" data-livestamp="@(ua.Timestamp.ToUnixEpoc())" title="@ua.Timestamp.ToFullDateTime()">@ua.Timestamp.ToFullDateTime()</span>
|
||||
</a>
|
||||
}
|
||||
}
|
||||
</div>
|
||||
@if (canAddAttachments)
|
||||
{
|
||||
<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>
|
||||
<td id="AttachmentsContainer">
|
||||
<div id="Attachments" class="@(canAddAttachments ? "canAddAttachments" : "cannotAddAttachments")">
|
||||
<div class="disco-attachmentUpload-dropTarget">
|
||||
<h2>Drop Attachments Here</h2>
|
||||
</div>
|
||||
}
|
||||
<script type="text/javascript">
|
||||
Shadowbox.init({
|
||||
skipSetup: true,
|
||||
modal: true
|
||||
});
|
||||
$(function () {
|
||||
var $Attachments = $('#Attachments');
|
||||
var $attachmentOutput = $Attachments.find('.attachmentOutput');
|
||||
var $dialogUpload = null;
|
||||
var $dialogRemoveAttachment = null;
|
||||
<div class="attachmentOutput">
|
||||
@if (Model.User.UserAttachments != null)
|
||||
{
|
||||
foreach (var ua in Model.User.UserAttachments)
|
||||
{
|
||||
<a href="@Url.Action(MVC.API.User.AttachmentDownload(ua.Id))" data-attachmentid="@ua.Id" data-mimetype="@ua.MimeType">
|
||||
<span class="icon" title="@ua.Filename">
|
||||
<img alt="Attachment Thumbnail" src="@(Url.Action(MVC.API.User.AttachmentThumbnail(ua.Id)))" /></span>
|
||||
<span class="comments" title="@ua.Comments">
|
||||
@{if (!string.IsNullOrEmpty(ua.DocumentTemplateId))
|
||||
{ @ua.DocumentTemplate.Description}
|
||||
else
|
||||
{ @ua.Comments }}
|
||||
</span><span class="author">@ua.TechUser.ToStringFriendly()</span>@if (canRemoveAnyAttachments || (canRemoveOwnAttachments && ua.TechUserId == CurrentUser.UserId))
|
||||
{<text><span class="remove fa fa-times-circle"></span></text>}<span class="timestamp" data-livestamp="@(ua.Timestamp.ToUnixEpoc())" title="@ua.Timestamp.ToFullDateTime()">@ua.Timestamp.ToFullDateTime()</span>
|
||||
</a>
|
||||
}
|
||||
}
|
||||
</div>
|
||||
@if (canAddAttachments)
|
||||
{
|
||||
<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>
|
||||
}
|
||||
<script type="text/javascript">
|
||||
Shadowbox.init({
|
||||
skipSetup: true,
|
||||
modal: true
|
||||
});
|
||||
$(function () {
|
||||
var $Attachments = $('#Attachments');
|
||||
var $attachmentOutput = $Attachments.find('.attachmentOutput');
|
||||
var $dialogRemoveAttachment = null;
|
||||
|
||||
// Connect to Hub
|
||||
var hub = $.connection.userUpdates;
|
||||
// Connect to Hub
|
||||
var hub = $.connection.userUpdates;
|
||||
|
||||
// Map Functions
|
||||
hub.client.addAttachment = onAddAttachment;
|
||||
hub.client.removeAttachment = onRemoveAttachment;
|
||||
// Map Functions
|
||||
hub.client.addAttachment = onAddAttachment;
|
||||
hub.client.removeAttachment = onRemoveAttachment;
|
||||
|
||||
$.connection.hub.qs = { UserId: '@(Model.User.UserId.Replace(@"\", @"\\"))' };
|
||||
$.connection.hub.qs = { UserId: '@(Model.User.UserId.Replace(@"\", @"\\"))' };
|
||||
$.connection.hub.error(onHubError);
|
||||
|
||||
// Start Connection
|
||||
@@ -111,7 +115,6 @@
|
||||
var e = $(t);
|
||||
|
||||
e.attr('data-attachmentid', a.Id).attr('data-mimetype', a.MimeType).attr('href', '@(Url.Action(MVC.API.User.AttachmentDownload()))/' + a.Id);
|
||||
e.find('.icon img').attr('src', '@(Url.Action(MVC.API.User.AttachmentThumbnail()))/' + a.Id);
|
||||
e.find('.comments').text(a.Description);
|
||||
e.find('.author').text(a.Author);
|
||||
e.find('.timestamp').text(a.TimestampFull).attr('title', a.TimestampFull).livestamp(a.TimestampUnixEpoc);
|
||||
@@ -127,6 +130,27 @@
|
||||
e.shadowbox({ gallery: 'attachments', player: 'img', title: a.Description });
|
||||
else
|
||||
e.click(onDownload);
|
||||
|
||||
// Add Thumbnail
|
||||
var buildThumbnail = function () {
|
||||
var retryCount = 0;
|
||||
var img = e.find('.icon img');
|
||||
|
||||
var setThumbnailUrl = function () {
|
||||
img.attr('src', '@(Url.Action(MVC.API.User.AttachmentThumbnail()))/' + a.Id + '?v=' + retryCount);
|
||||
};
|
||||
img.on('error', function () {
|
||||
img.addClass('loading');
|
||||
retryCount++;
|
||||
if (retryCount < 6)
|
||||
window.setTimeout(setThumbnailUrl, retryCount * 250);
|
||||
});
|
||||
img.on('load', function () {
|
||||
img.removeClass('loading');
|
||||
});
|
||||
window.setTimeout(setThumbnailUrl, 100);
|
||||
};
|
||||
buildThumbnail();
|
||||
}
|
||||
|
||||
function onDownload() {
|
||||
@@ -175,61 +199,32 @@
|
||||
@if (canAddAttachments)
|
||||
{<text>
|
||||
//#region Add Attachments
|
||||
if (!document.DiscoFunctions) {
|
||||
document.DiscoFunctions = {};
|
||||
}
|
||||
document.DiscoFunctions.addAttachment = function (Id) { return; /* Silverlight notification, do nothing use SignalR */ };
|
||||
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'));
|
||||
|
||||
var $attachmentInput = $Attachments.find('.attachmentInput');
|
||||
$attachmentInput.find('.photo').click(function () {
|
||||
showDialog('/WebCam');
|
||||
attachmentUploader.uploadImage();
|
||||
});
|
||||
$attachmentInput.find('.upload').click(function () {
|
||||
showDialog('/File');
|
||||
attachmentUploader.uploadFiles();
|
||||
});
|
||||
|
||||
var silverlightOnLoadNavigation = null;
|
||||
var silverlightIsLoaded = null;
|
||||
|
||||
function showDialog(navigationPath) {
|
||||
if (!$dialogUpload) {
|
||||
$dialogUpload = $('#dialogUpload').dialog({
|
||||
autoOpen: false,
|
||||
draggable: false,
|
||||
modal: true,
|
||||
resizable: false,
|
||||
width: 860,
|
||||
height: 550,
|
||||
close: function () {
|
||||
var sl = $('#silverlightUploadAttachment').get(0);
|
||||
if (sl.content)
|
||||
sl.content.Navigator.Navigate('/Hidden');
|
||||
}
|
||||
});
|
||||
|
||||
Silverlight.createObject('@(Links.ClientBin.Disco_Silverlight_AttachmentUpload_xap)',
|
||||
$('#silverlightHostUploadAttachment').get(0),
|
||||
'silverlightUploadAttachment',
|
||||
{ width: '840px', height: '500px', background: 'white', version: '4.0.60310.0' },
|
||||
{
|
||||
onLoad: function () {
|
||||
if (silverlightOnLoadNavigation) {
|
||||
$('#silverlightUploadAttachment').get(0).content.Navigator.Navigate(silverlightOnLoadNavigation);
|
||||
silverlightIsLoaded = true;
|
||||
}
|
||||
}
|
||||
},
|
||||
'UploadUrl=@(Url.Action(MVC.API.User.AttachmentUpload(Model.User.UserId, null)))');
|
||||
var resourcesTab;
|
||||
$(document).on('dragover', function () {
|
||||
if (!resourcesTab) {
|
||||
var tabs = $Attachments.closest('.ui-tabs');
|
||||
resourcesTab = {
|
||||
tabs: tabs,
|
||||
resourcesIndex: tabs.children('ul.ui-tabs-nav').find('a[href="#UserDetailTab-Resources"]').closest('li').index()
|
||||
};
|
||||
}
|
||||
|
||||
$dialogUpload.dialog('open');
|
||||
if (silverlightIsLoaded) {
|
||||
$('#silverlightUploadAttachment').get(0).content.Navigator.Navigate(navigationPath);
|
||||
} else {
|
||||
silverlightOnLoadNavigation = navigationPath;
|
||||
}
|
||||
};
|
||||
|
||||
var selectedIndex = resourcesTab.tabs.tabs('option', 'active');
|
||||
if (resourcesTab.resourcesIndex !== selectedIndex)
|
||||
resourcesTab.tabs.tabs('option', 'active', resourcesTab.resourcesIndex);
|
||||
});
|
||||
//#endregion
|
||||
</text>}
|
||||
@if (canRemoveAnyAttachments || canRemoveOwnAttachments)
|
||||
@@ -296,7 +291,8 @@
|
||||
$this.click(onDownload);
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</script>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@@ -304,13 +300,6 @@
|
||||
$('#UserDetailTabItems').append('<li><a href="#UserDetailTab-Resources" id="UserDetailTab-ResourcesLink">Attachments [@(Model.User.UserAttachments == null ? 0 : Model.User.UserAttachments.Count)]</a></li>');
|
||||
</script>
|
||||
</div>
|
||||
@if (canAddAttachments)
|
||||
{
|
||||
<div id="dialogUpload" class="dialog" title="Upload Attachment">
|
||||
<div id="silverlightHostUploadAttachment">
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
@if (canRemoveAnyAttachments || canRemoveOwnAttachments)
|
||||
{
|
||||
<div id="dialogRemoveAttachment" class="dialog" title="Remove this Attachment?">
|
||||
|
||||
@@ -59,7 +59,7 @@ namespace Disco.Web.Views.User.UserParts
|
||||
|
||||
if (canAddAttachments)
|
||||
{
|
||||
Html.BundleDeferred("~/ClientScripts/Modules/Silverlight");
|
||||
Html.BundleDeferred("~/ClientScripts/Modules/Disco-AttachmentUploader");
|
||||
}
|
||||
|
||||
|
||||
@@ -77,57 +77,66 @@ WriteLiteral(" id=\"userShowResources\"");
|
||||
|
||||
WriteLiteral(">\r\n <tr>\r\n <td");
|
||||
|
||||
WriteLiteral(" id=\"AttachmentsContainer\"");
|
||||
|
||||
WriteLiteral(">\r\n <div");
|
||||
|
||||
WriteLiteral(" id=\"Attachments\"");
|
||||
|
||||
WriteAttribute("class", Tuple.Create(" class=\"", 810), Tuple.Create("\"", 885)
|
||||
WriteAttribute("class", Tuple.Create(" class=\"", 872), Tuple.Create("\"", 947)
|
||||
|
||||
#line 21 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 818), Tuple.Create<System.Object, System.Int32>(canAddAttachments ? "canAddAttachments" : "cannotAddAttachments"
|
||||
#line 22 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 880), Tuple.Create<System.Object, System.Int32>(canAddAttachments ? "canAddAttachments" : "cannotAddAttachments"
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 818), false)
|
||||
, 880), false)
|
||||
);
|
||||
|
||||
WriteLiteral(">\r\n <div");
|
||||
WriteLiteral(">\r\n <div");
|
||||
|
||||
WriteLiteral(" class=\"disco-attachmentUpload-dropTarget\"");
|
||||
|
||||
WriteLiteral(">\r\n <h2>Drop Attachments Here</h2>\r\n </" +
|
||||
"div>\r\n <div");
|
||||
|
||||
WriteLiteral(" class=\"attachmentOutput\"");
|
||||
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
|
||||
#line 23 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
|
||||
#line 27 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 23 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
if (Model.User.UserAttachments != null)
|
||||
{
|
||||
foreach (var ua in Model.User.UserAttachments)
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <a");
|
||||
|
||||
WriteAttribute("href", Tuple.Create(" href=\"", 1147), Tuple.Create("\"", 1205)
|
||||
|
||||
#line 27 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 1154), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.API.User.AttachmentDownload(ua.Id))
|
||||
if (Model.User.UserAttachments != null)
|
||||
{
|
||||
foreach (var ua in Model.User.UserAttachments)
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 1154), false)
|
||||
WriteLiteral(" <a");
|
||||
|
||||
WriteAttribute("href", Tuple.Create(" href=\"", 1386), Tuple.Create("\"", 1444)
|
||||
|
||||
#line 31 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 1393), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.API.User.AttachmentDownload(ua.Id))
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 1393), false)
|
||||
);
|
||||
|
||||
WriteLiteral(" data-attachmentid=\"");
|
||||
|
||||
|
||||
#line 27 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
Write(ua.Id);
|
||||
#line 31 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
Write(ua.Id);
|
||||
|
||||
|
||||
#line default
|
||||
@@ -137,108 +146,108 @@ WriteLiteral("\"");
|
||||
WriteLiteral(" data-mimetype=\"");
|
||||
|
||||
|
||||
#line 27 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
Write(ua.MimeType);
|
||||
#line 31 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
Write(ua.MimeType);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\"");
|
||||
|
||||
WriteLiteral(">\r\n <span");
|
||||
WriteLiteral(">\r\n <span");
|
||||
|
||||
WriteLiteral(" class=\"icon\"");
|
||||
|
||||
WriteAttribute("title", Tuple.Create(" title=\"", 1311), Tuple.Create("\"", 1331)
|
||||
WriteAttribute("title", Tuple.Create(" title=\"", 1554), Tuple.Create("\"", 1574)
|
||||
|
||||
#line 28 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 1319), Tuple.Create<System.Object, System.Int32>(ua.Filename
|
||||
#line 32 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 1562), Tuple.Create<System.Object, System.Int32>(ua.Filename
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 1319), false)
|
||||
, 1562), false)
|
||||
);
|
||||
|
||||
WriteLiteral(">\r\n <img");
|
||||
WriteLiteral(">\r\n <img");
|
||||
|
||||
WriteLiteral(" alt=\"Attachment Thumbnail\"");
|
||||
|
||||
WriteAttribute("src", Tuple.Create(" src=\"", 1398), Tuple.Create("\"", 1458)
|
||||
WriteAttribute("src", Tuple.Create(" src=\"", 1645), Tuple.Create("\"", 1705)
|
||||
|
||||
#line 29 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 1404), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.API.User.AttachmentThumbnail(ua.Id))
|
||||
#line 33 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 1651), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.API.User.AttachmentThumbnail(ua.Id))
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 1404), false)
|
||||
, 1651), false)
|
||||
);
|
||||
|
||||
WriteLiteral(" /></span>\r\n <span");
|
||||
WriteLiteral(" /></span>\r\n <span");
|
||||
|
||||
WriteLiteral(" class=\"comments\"");
|
||||
|
||||
WriteAttribute("title", Tuple.Create(" title=\"", 1521), Tuple.Create("\"", 1541)
|
||||
WriteAttribute("title", Tuple.Create(" title=\"", 1772), Tuple.Create("\"", 1792)
|
||||
|
||||
#line 30 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 1529), Tuple.Create<System.Object, System.Int32>(ua.Comments
|
||||
#line 34 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 1780), Tuple.Create<System.Object, System.Int32>(ua.Comments
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 1529), false)
|
||||
, 1780), false)
|
||||
);
|
||||
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
|
||||
#line 31 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
|
||||
#line 35 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 31 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
if (!string.IsNullOrEmpty(ua.DocumentTemplateId))
|
||||
{
|
||||
#line 35 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
if (!string.IsNullOrEmpty(ua.DocumentTemplateId))
|
||||
{
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 32 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
Write(ua.DocumentTemplate.Description);
|
||||
#line 36 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
Write(ua.DocumentTemplate.Description);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 32 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
}
|
||||
else
|
||||
{
|
||||
#line 36 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 34 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
Write(ua.Comments);
|
||||
#line 38 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
Write(ua.Comments);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 34 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
}
|
||||
#line 38 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
}
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n </span><span");
|
||||
WriteLiteral("\r\n </span><span");
|
||||
|
||||
WriteLiteral(" class=\"author\"");
|
||||
|
||||
WriteLiteral(">");
|
||||
|
||||
|
||||
#line 35 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
Write(ua.TechUser.ToStringFriendly());
|
||||
#line 39 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
Write(ua.TechUser.ToStringFriendly());
|
||||
|
||||
|
||||
#line default
|
||||
@@ -246,9 +255,9 @@ WriteLiteral(">");
|
||||
WriteLiteral("</span>");
|
||||
|
||||
|
||||
#line 35 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
if (canRemoveAnyAttachments || (canRemoveOwnAttachments && ua.TechUserId == CurrentUser.UserId))
|
||||
{
|
||||
#line 39 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
if (canRemoveAnyAttachments || (canRemoveOwnAttachments && ua.TechUserId == CurrentUser.UserId))
|
||||
{
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
@@ -259,8 +268,8 @@ WriteLiteral(" class=\"remove fa fa-times-circle\"");
|
||||
WriteLiteral("></span>");
|
||||
|
||||
|
||||
#line 36 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
}
|
||||
#line 40 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
}
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
@@ -271,64 +280,70 @@ WriteLiteral(" class=\"timestamp\"");
|
||||
WriteLiteral(" data-livestamp=\"");
|
||||
|
||||
|
||||
#line 36 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
Write(ua.Timestamp.ToUnixEpoc());
|
||||
#line 40 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
Write(ua.Timestamp.ToUnixEpoc());
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\"");
|
||||
|
||||
WriteAttribute("title", Tuple.Create(" title=\"", 2212), Tuple.Create("\"", 2250)
|
||||
WriteAttribute("title", Tuple.Create(" title=\"", 2487), Tuple.Create("\"", 2525)
|
||||
|
||||
#line 36 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 2220), Tuple.Create<System.Object, System.Int32>(ua.Timestamp.ToFullDateTime()
|
||||
#line 40 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 2495), Tuple.Create<System.Object, System.Int32>(ua.Timestamp.ToFullDateTime()
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 2220), false)
|
||||
, 2495), false)
|
||||
);
|
||||
|
||||
WriteLiteral(">");
|
||||
|
||||
|
||||
#line 36 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
Write(ua.Timestamp.ToFullDateTime());
|
||||
#line 40 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
Write(ua.Timestamp.ToFullDateTime());
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("</span>\r\n </a> \r\n");
|
||||
WriteLiteral("</span>\r\n </a> \r\n");
|
||||
|
||||
|
||||
#line 38 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
#line 42 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" </div>\r\n");
|
||||
WriteLiteral(" </div>\r\n");
|
||||
|
||||
|
||||
#line 41 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
|
||||
#line 45 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 41 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
if (canAddAttachments)
|
||||
{
|
||||
#line 45 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
if (canAddAttachments)
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <div");
|
||||
WriteLiteral(" <div");
|
||||
|
||||
WriteLiteral(" class=\"disco-attachmentUpload-progress\"");
|
||||
|
||||
WriteLiteral("></div>\r\n");
|
||||
|
||||
WriteLiteral(" <div");
|
||||
|
||||
WriteLiteral(" class=\"attachmentInput clearfix\"");
|
||||
|
||||
WriteLiteral(">\r\n <span");
|
||||
WriteLiteral(">\r\n <span");
|
||||
|
||||
WriteLiteral(" class=\"action upload fa fa-upload\"");
|
||||
|
||||
@@ -340,42 +355,41 @@ WriteLiteral(" class=\"action photo fa fa-camera\"");
|
||||
|
||||
WriteLiteral(" title=\"Capture Image\"");
|
||||
|
||||
WriteLiteral("></span>\r\n </div>\r\n");
|
||||
WriteLiteral("></span>\r\n </div>\r\n");
|
||||
|
||||
|
||||
#line 46 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
}
|
||||
#line 51 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <script");
|
||||
WriteLiteral(" <script");
|
||||
|
||||
WriteLiteral(" type=\"text/javascript\"");
|
||||
|
||||
WriteLiteral(@">
|
||||
Shadowbox.init({
|
||||
skipSetup: true,
|
||||
modal: true
|
||||
});
|
||||
$(function () {
|
||||
var $Attachments = $('#Attachments');
|
||||
var $attachmentOutput = $Attachments.find('.attachmentOutput');
|
||||
var $dialogUpload = null;
|
||||
var $dialogRemoveAttachment = null;
|
||||
Shadowbox.init({
|
||||
skipSetup: true,
|
||||
modal: true
|
||||
});
|
||||
$(function () {
|
||||
var $Attachments = $('#Attachments');
|
||||
var $attachmentOutput = $Attachments.find('.attachmentOutput');
|
||||
var $dialogRemoveAttachment = null;
|
||||
|
||||
// Connect to Hub
|
||||
var hub = $.connection.userUpdates;
|
||||
// Connect to Hub
|
||||
var hub = $.connection.userUpdates;
|
||||
|
||||
// Map Functions
|
||||
hub.client.addAttachment = onAddAttachment;
|
||||
hub.client.removeAttachment = onRemoveAttachment;
|
||||
// Map Functions
|
||||
hub.client.addAttachment = onAddAttachment;
|
||||
hub.client.removeAttachment = onRemoveAttachment;
|
||||
|
||||
$.connection.hub.qs = { UserId: '");
|
||||
$.connection.hub.qs = { UserId: '");
|
||||
|
||||
|
||||
#line 65 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
Write(Model.User.UserId.Replace(@"\", @"\\"));
|
||||
#line 69 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
Write(Model.User.UserId.Replace(@"\", @"\\"));
|
||||
|
||||
|
||||
#line default
|
||||
@@ -396,7 +410,7 @@ WriteLiteral(@"' };
|
||||
url: '");
|
||||
|
||||
|
||||
#line 78 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
#line 82 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
Write(Url.Action(MVC.API.User.Attachment()));
|
||||
|
||||
|
||||
@@ -411,13 +425,13 @@ WriteLiteral(@"',
|
||||
");
|
||||
|
||||
|
||||
#line 84 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
#line 88 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 84 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
#line 88 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
if (canRemoveAnyAttachments)
|
||||
{
|
||||
|
||||
@@ -431,7 +445,7 @@ WriteLiteral("buildAttachment(a, true, quick);");
|
||||
WriteLiteral("\r\n");
|
||||
|
||||
|
||||
#line 87 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
#line 91 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
}
|
||||
else if (canRemoveOwnAttachments)
|
||||
{
|
||||
@@ -444,7 +458,7 @@ WriteLiteral(" ");
|
||||
WriteLiteral("buildAttachment(a, (a.AuthorId === \'");
|
||||
|
||||
|
||||
#line 90 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
#line 94 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
Write(CurrentUser.UserId);
|
||||
|
||||
|
||||
@@ -455,7 +469,7 @@ WriteLiteral("\'), quick);");
|
||||
WriteLiteral("\r\n");
|
||||
|
||||
|
||||
#line 91 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
#line 95 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -470,7 +484,7 @@ WriteLiteral("buildAttachment(a, false, quick);");
|
||||
WriteLiteral("\r\n");
|
||||
|
||||
|
||||
#line 95 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
#line 99 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -496,146 +510,132 @@ WriteLiteral(@" } else {
|
||||
e.attr('data-attachmentid', a.Id).attr('data-mimetype', a.MimeType).attr('href', '");
|
||||
|
||||
|
||||
#line 113 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
#line 117 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
Write(Url.Action(MVC.API.User.AttachmentDownload()));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("/\' + a.Id);\r\n e.find(\'.icon img\').attr(\'src\', \'");
|
||||
WriteLiteral(@"/' + a.Id);
|
||||
e.find('.comments').text(a.Description);
|
||||
e.find('.author').text(a.Author);
|
||||
e.find('.timestamp').text(a.TimestampFull).attr('title', a.TimestampFull).livestamp(a.TimestampUnixEpoc);
|
||||
if (canRemove)
|
||||
e.find('.remove').click(removeAttachment);
|
||||
if (!quick)
|
||||
e.hide();
|
||||
$attachmentOutput.append(e);
|
||||
onUpdate();
|
||||
if (!quick)
|
||||
e.show('slow');
|
||||
if (a.MimeType.toLowerCase().indexOf('image/') == 0)
|
||||
e.shadowbox({ gallery: 'attachments', player: 'img', title: a.Description });
|
||||
else
|
||||
e.click(onDownload);
|
||||
|
||||
// Add Thumbnail
|
||||
var buildThumbnail = function () {
|
||||
var retryCount = 0;
|
||||
var img = e.find('.icon img');
|
||||
|
||||
var setThumbnailUrl = function () {
|
||||
img.attr('src', '");
|
||||
|
||||
|
||||
#line 114 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
Write(Url.Action(MVC.API.User.AttachmentThumbnail()));
|
||||
#line 140 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
Write(Url.Action(MVC.API.User.AttachmentThumbnail()));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("/\' + a.Id);\r\n e.find(\'.comments\').text(a.Description);" +
|
||||
"\r\n e.find(\'.author\').text(a.Author);\r\n " +
|
||||
" e.find(\'.timestamp\').text(a.TimestampFull).attr(\'title\', a.Timestam" +
|
||||
"pFull).livestamp(a.TimestampUnixEpoc);\r\n if (canRemov" +
|
||||
"e)\r\n e.find(\'.remove\').click(removeAttachment);\r\n" +
|
||||
" if (!quick)\r\n e.hide(" +
|
||||
");\r\n $attachmentOutput.append(e);\r\n " +
|
||||
" onUpdate();\r\n if (!quick)\r\n " +
|
||||
" e.show(\'slow\');\r\n if (a.MimeType.toLo" +
|
||||
"werCase().indexOf(\'image/\') == 0)\r\n e.shadowbox({" +
|
||||
" gallery: \'attachments\', player: \'img\', title: a.Description });\r\n " +
|
||||
" else\r\n e.click(onDownload);\r\n " +
|
||||
" }\r\n\r\n function onDownload() {\r\n " +
|
||||
" var $this = $(this);\r\n var url = " +
|
||||
"$this.attr(\'href\');\r\n\r\n if ($.connection && $.connect" +
|
||||
"ion.hub && $.connection.hub.transport &&\r\n " +
|
||||
" $.connection.hub.transport.name == \'foreverFrame\') {\r\n " +
|
||||
" // SignalR active with foreverFrame transport - use popup window" +
|
||||
"\r\n window.open(url, \'_blank\', \'height=150,width=2" +
|
||||
"50,location=no,menubar=no,resizable=no,scrollbars=no,status=no,toolbar=no\');\r\n " +
|
||||
" } else {\r\n // use iFram" +
|
||||
"e\r\n if (!$attachmentDownloadHost) {\r\n " +
|
||||
" $attachmentDownloadHost = $(\'<iframe>\')\r\n " +
|
||||
" .attr({ \'src\': url, \'title\': \'Attachment Download Host\'" +
|
||||
" })\r\n .addClass(\'hidden\')\r\n " +
|
||||
" .appendTo(\'body\')\r\n " +
|
||||
" .contents();\r\n } else {\r\n " +
|
||||
" $attachmentDownloadHost[0].location.href = url;\r\n " +
|
||||
" }\r\n }\r\n\r\n " +
|
||||
" return false;\r\n }\r\n\r\n function o" +
|
||||
"nRemoveAttachment(id) {\r\n var a = $attachmentOutput.f" +
|
||||
"ind(\'a[data-attachmentid=\' + id + \']\');\r\n\r\n a.hide(30" +
|
||||
"0).delay(300).queue(function () {\r\n var $this = $" +
|
||||
"(this);\r\n if ($this.attr(\'data-mimetype\').toLower" +
|
||||
"Case().indexOf(\'image/\') == 0)\r\n Shadowbox.re" +
|
||||
"moveCache(this);\r\n $this.find(\'.timestamp\').lives" +
|
||||
"tamp(\'destroy\');\r\n $this.remove();\r\n " +
|
||||
" onUpdate();\r\n });\r\n " +
|
||||
" }\r\n\r\n function onUpdate() {\r\n " +
|
||||
" var attachmentCount = $attachmentOutput.children(\'a\').length;\r\n " +
|
||||
" var tabHeading = \'Attachments [\' + attachmentCount + \']\';\r\n " +
|
||||
" $(\'#UserDetailTab-ResourcesLink\').text(tabHeading);\r\n" +
|
||||
" }\r\n\r\n");
|
||||
WriteLiteral("/\' + a.Id + \'?v=\' + retryCount);\r\n };\r\n " +
|
||||
" img.on(\'error\', function () {\r\n " +
|
||||
" img.addClass(\'loading\');\r\n retryCount" +
|
||||
"++;\r\n if (retryCount < 6)\r\n " +
|
||||
" window.setTimeout(setThumbnailUrl, retryCount * 250);\r\n " +
|
||||
" });\r\n img.on(\'load\'," +
|
||||
" function () {\r\n img.removeClass(\'loading\');\r" +
|
||||
"\n });\r\n window.set" +
|
||||
"Timeout(setThumbnailUrl, 100);\r\n };\r\n " +
|
||||
" buildThumbnail();\r\n }\r\n\r\n " +
|
||||
" function onDownload() {\r\n var $this = $(this);\r\n " +
|
||||
" var url = $this.attr(\'href\');\r\n\r\n " +
|
||||
" if ($.connection && $.connection.hub && $.connection.hub.transport &&\r\n " +
|
||||
" $.connection.hub.transport.name =" +
|
||||
"= \'foreverFrame\') {\r\n // SignalR active with fore" +
|
||||
"verFrame transport - use popup window\r\n window.op" +
|
||||
"en(url, \'_blank\', \'height=150,width=250,location=no,menubar=no,resizable=no,scro" +
|
||||
"llbars=no,status=no,toolbar=no\');\r\n } else {\r\n " +
|
||||
" // use iFrame\r\n if (!$at" +
|
||||
"tachmentDownloadHost) {\r\n $attachmentDownload" +
|
||||
"Host = $(\'<iframe>\')\r\n .attr({ \'src\': url" +
|
||||
", \'title\': \'Attachment Download Host\' })\r\n " +
|
||||
" .addClass(\'hidden\')\r\n .appendTo(\'body\')" +
|
||||
"\r\n .contents();\r\n " +
|
||||
" } else {\r\n $attachmentDownloadHost[0]" +
|
||||
".location.href = url;\r\n }\r\n " +
|
||||
" }\r\n\r\n return false;\r\n }\r" +
|
||||
"\n\r\n function onRemoveAttachment(id) {\r\n " +
|
||||
" var a = $attachmentOutput.find(\'a[data-attachmentid=\' + id + \']\');\r\n\r\n" +
|
||||
" a.hide(300).delay(300).queue(function () {\r\n " +
|
||||
" var $this = $(this);\r\n if" +
|
||||
" ($this.attr(\'data-mimetype\').toLowerCase().indexOf(\'image/\') == 0)\r\n " +
|
||||
" Shadowbox.removeCache(this);\r\n " +
|
||||
" $this.find(\'.timestamp\').livestamp(\'destroy\');\r\n " +
|
||||
" $this.remove();\r\n onUpdate();\r\n " +
|
||||
" });\r\n }\r\n\r\n funct" +
|
||||
"ion onUpdate() {\r\n var attachmentCount = $attachmentO" +
|
||||
"utput.children(\'a\').length;\r\n var tabHeading = \'Attac" +
|
||||
"hments [\' + attachmentCount + \']\';\r\n $(\'#UserDetailTa" +
|
||||
"b-ResourcesLink\').text(tabHeading);\r\n }\r\n\r\n");
|
||||
|
||||
|
||||
#line 175 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
#line 199 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 175 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
#line 199 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
if (canAddAttachments)
|
||||
{
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n //#region Add Attachments\r\n if (" +
|
||||
"!document.DiscoFunctions) {\r\n document.DiscoFunctions" +
|
||||
" = {};\r\n }\r\n document.DiscoFunctio" +
|
||||
"ns.addAttachment = function (Id) { return; /* Silverlight notification, do nothi" +
|
||||
"ng use SignalR */ };\r\n\r\n var $attachmentInput = $Attachme" +
|
||||
"nts.find(\'.attachmentInput\');\r\n $attachmentInput.find(\'.p" +
|
||||
"hoto\').click(function () {\r\n showDialog(\'/WebCam\');\r\n" +
|
||||
" });\r\n $attachmentInput.find(\'.upl" +
|
||||
"oad\').click(function () {\r\n showDialog(\'/File\');\r\n " +
|
||||
" });\r\n\r\n var silverlightOnLoadNavigat" +
|
||||
"ion = null;\r\n var silverlightIsLoaded = null;\r\n\r\n " +
|
||||
" function showDialog(navigationPath) {\r\n " +
|
||||
" if (!$dialogUpload) {\r\n $dialogUpload = $(\'#di" +
|
||||
"alogUpload\').dialog({\r\n autoOpen: false,\r\n " +
|
||||
" draggable: false,\r\n " +
|
||||
" modal: true,\r\n resizable: false,\r\n " +
|
||||
" width: 860,\r\n " +
|
||||
" height: 550,\r\n close: function () {\r\n " +
|
||||
" var sl = $(\'#silverlightUploadAttachment\').get" +
|
||||
"(0);\r\n if (sl.content)\r\n " +
|
||||
" sl.content.Navigator.Navigate(\'/Hidden\');\r\n " +
|
||||
" }\r\n });\r\n\r\n " +
|
||||
" Silverlight.createObject(\'");
|
||||
WriteLiteral("\r\n //#region Add Attachments\r\n var " +
|
||||
"attachmentUploader = new document.Disco.AttachmentUploader(\r\n " +
|
||||
" \'");
|
||||
|
||||
|
||||
#line 210 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
Write(Links.ClientBin.Disco_Silverlight_AttachmentUpload_xap);
|
||||
#line 203 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
Write(Url.Action(MVC.API.User.AttachmentUpload(Model.User.UserId, null)));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(@"',
|
||||
$('#silverlightHostUploadAttachment').get(0),
|
||||
'silverlightUploadAttachment',
|
||||
{ width: '840px', height: '500px', background: 'white', version: '4.0.60310.0' },
|
||||
{
|
||||
onLoad: function () {
|
||||
if (silverlightOnLoadNavigation) {
|
||||
$('#silverlightUploadAttachment').get(0).content.Navigator.Navigate(silverlightOnLoadNavigation);
|
||||
silverlightIsLoaded = true;
|
||||
}
|
||||
}
|
||||
},
|
||||
'UploadUrl=");
|
||||
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(\'." +
|
||||
"upload\').click(function () {\r\n attachmentUploader.upl" +
|
||||
"oadFiles();\r\n });\r\n\r\n var resource" +
|
||||
"sTab;\r\n $(document).on(\'dragover\', function () {\r\n " +
|
||||
" if (!resourcesTab) {\r\n var t" +
|
||||
"abs = $Attachments.closest(\'.ui-tabs\');\r\n resourc" +
|
||||
"esTab = {\r\n tabs: tabs,\r\n " +
|
||||
" resourcesIndex: tabs.children(\'ul.ui-tabs-nav\').find(\'a[href=\"#U" +
|
||||
"serDetailTab-Resources\"]\').closest(\'li\').index()\r\n " +
|
||||
" };\r\n }\r\n var selectedInd" +
|
||||
"ex = resourcesTab.tabs.tabs(\'option\', \'active\');\r\n if" +
|
||||
" (resourcesTab.resourcesIndex !== selectedIndex)\r\n " +
|
||||
" resourcesTab.tabs.tabs(\'option\', \'active\', resourcesTab.resourcesIndex);\r\n " +
|
||||
" });\r\n //#endregion\r\n " +
|
||||
" ");
|
||||
|
||||
|
||||
#line 222 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
Write(Url.Action(MVC.API.User.AttachmentUpload(Model.User.UserId, null)));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(@"');
|
||||
}
|
||||
|
||||
$dialogUpload.dialog('open');
|
||||
if (silverlightIsLoaded) {
|
||||
$('#silverlightUploadAttachment').get(0).content.Navigator.Navigate(navigationPath);
|
||||
} else {
|
||||
silverlightOnLoadNavigation = navigationPath;
|
||||
}
|
||||
};
|
||||
|
||||
//#endregion
|
||||
");
|
||||
|
||||
|
||||
#line 234 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
#line 229 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -644,7 +644,7 @@ WriteLiteral(@"');
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 235 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
#line 230 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
if (canRemoveAnyAttachments || canRemoveOwnAttachments)
|
||||
{
|
||||
|
||||
@@ -678,7 +678,7 @@ WriteLiteral(@"
|
||||
url: '");
|
||||
|
||||
|
||||
#line 261 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
#line 256 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
Write(Url.Action(MVC.API.User.AttachmentRemove()));
|
||||
|
||||
|
||||
@@ -715,7 +715,7 @@ WriteLiteral(@"',
|
||||
");
|
||||
|
||||
|
||||
#line 289 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
#line 284 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -730,7 +730,8 @@ WriteLiteral(@"
|
||||
$this.click(onDownload);
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</script>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@@ -738,7 +739,7 @@ WriteLiteral(@"
|
||||
$('#UserDetailTabItems').append('<li><a href=""#UserDetailTab-Resources"" id=""UserDetailTab-ResourcesLink"">Attachments [");
|
||||
|
||||
|
||||
#line 304 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
#line 300 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
Write(Model.User.UserAttachments == null ? 0 : Model.User.UserAttachments.Count);
|
||||
|
||||
|
||||
@@ -747,36 +748,7 @@ WriteLiteral(@"
|
||||
WriteLiteral("]</a></li>\');\r\n </script>\r\n</div>\r\n");
|
||||
|
||||
|
||||
#line 307 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
if (canAddAttachments)
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <div");
|
||||
|
||||
WriteLiteral(" id=\"dialogUpload\"");
|
||||
|
||||
WriteLiteral(" class=\"dialog\"");
|
||||
|
||||
WriteLiteral(" title=\"Upload Attachment\"");
|
||||
|
||||
WriteLiteral(">\r\n <div");
|
||||
|
||||
WriteLiteral(" id=\"silverlightHostUploadAttachment\"");
|
||||
|
||||
WriteLiteral(">\r\n </div>\r\n </div>\r\n");
|
||||
|
||||
|
||||
#line 313 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 314 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
#line 303 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
if (canRemoveAnyAttachments || canRemoveOwnAttachments)
|
||||
{
|
||||
|
||||
@@ -798,7 +770,7 @@ WriteLiteral(" class=\"fa fa-exclamation-triangle fa-lg\"");
|
||||
WriteLiteral("></i> Are you sure?\r\n </p>\r\n </div>\r\n");
|
||||
|
||||
|
||||
#line 321 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
#line 310 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
}
|
||||
|
||||
#line default
|
||||
|
||||
Reference in new issue
Block a user