CC-2908: Add "Live Stream" title to live stream popup window
-custom logo
This commit is contained in:
parent
7dd14efe27
commit
929e29182b
8 changed files with 79 additions and 50 deletions
|
@ -222,3 +222,41 @@ function audioPreview(filename, elemID){
|
|||
|
||||
$('#'+elemID+' div.list-item-container a span').attr("class", "ui-icon ui-icon-pause");
|
||||
}
|
||||
|
||||
function resizeImg(ele, targetWidth, targetHeight){
|
||||
var img = $(ele);
|
||||
|
||||
var width = ele.width;
|
||||
var height = ele.height;
|
||||
|
||||
// resize img proportionaly
|
||||
if( width > height && width > targetWidth){
|
||||
var ratio = targetWidth/width;
|
||||
img.css("width", targetHeight+"px");
|
||||
var newHeight = height * ratio;
|
||||
img.css("height", newHeight+"px");
|
||||
}else if( width < height && height > targetHeight){
|
||||
var ratio = targetHeight/height;
|
||||
img.css("height", targetHeight+"px");
|
||||
var newWidth = width * ratio;
|
||||
img.css("width", newWidth+"px");
|
||||
}else if( width == height && width > targetWidth){
|
||||
img.css("height", targetHeight+"px");
|
||||
img.css("width", targetWidth+"px" );
|
||||
}
|
||||
}
|
||||
|
||||
function resizeToMaxHeight(ele, targetHeight){
|
||||
var img = $(ele);
|
||||
|
||||
var width = ele.width;
|
||||
var height = ele.height;
|
||||
|
||||
// resize img proportionaly
|
||||
if( height > targetHeight){
|
||||
var ratio = targetHeight/height;
|
||||
img.css("height", targetHeight+"px");
|
||||
var newWidth = width * ratio;
|
||||
img.css("width", newWidth+"px");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -102,27 +102,25 @@ $(document).ready(function(){
|
|||
});
|
||||
});
|
||||
|
||||
function resizeImg(ele){
|
||||
|
||||
function resizeImg(ele, targetWidth, targetHeight){
|
||||
var img = $(ele);
|
||||
|
||||
var width = ele.width;
|
||||
var height = ele.height;
|
||||
|
||||
// resize img proportionaly
|
||||
if( width > height && width > 430){
|
||||
var ratio = 430/width;
|
||||
img.css("width", "430px");
|
||||
if( width > height && width > targetWidth){
|
||||
var ratio = targetWidth/width;
|
||||
img.css("width", targetHeight+"px");
|
||||
var newHeight = height * ratio;
|
||||
img.css("height", newHeight );
|
||||
|
||||
}else if( width < height && height > 430){
|
||||
var ratio = 430/height;
|
||||
img.css("height", "430px");
|
||||
img.css("height", newHeight);
|
||||
}else if( width < height && height > targetHeight){
|
||||
var ratio = targetHeight/height;
|
||||
img.css("height", targetHeight+"px");
|
||||
var newWidth = width * ratio;
|
||||
img.css("width", newWidth );
|
||||
}else if( width == height && width > 430){
|
||||
img.css("height", "430px");
|
||||
img.css("width", "430px" );
|
||||
}
|
||||
}
|
||||
img.css("width", newWidth);
|
||||
}else if( width == height && width > targetWidth){
|
||||
img.css("height", targetHeight+"px");
|
||||
img.css("width", targetWidth+"px" );
|
||||
}
|
||||
}
|
||||
|
|
|
@ -10,31 +10,6 @@ function showErrorSections() {
|
|||
}
|
||||
}
|
||||
|
||||
function resizeImg(ele){
|
||||
var img = $(ele);
|
||||
|
||||
var width = ele.width;
|
||||
var height = ele.height;
|
||||
|
||||
// resize img proportionaly
|
||||
if( width > height && width > 450){
|
||||
var ratio = 450/width;
|
||||
img.css("width", "450px");
|
||||
var newHeight = height * ratio;
|
||||
img.css("height", newHeight );
|
||||
|
||||
}else if( width < height && height > 450){
|
||||
var ratio = 450/height;
|
||||
img.css("height", "450px");
|
||||
var newWidth = width * ratio;
|
||||
img.css("width", newWidth );
|
||||
}else if( width == height && width > 450){
|
||||
img.css("height", "450px");
|
||||
img.css("width", "450px" );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
$(document).ready(function() {
|
||||
var form = $("form");
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue