A bunch of small changes from scrutinizer-ci; some tidying, some actual bug fixes
This commit is contained in:
@ -15,26 +15,26 @@ $(function() {
|
||||
}
|
||||
});
|
||||
|
||||
function zoom(zoom) {
|
||||
function zoom(zoom_type) {
|
||||
var img = $('.shm-main-image');
|
||||
if(zoom == "full") {
|
||||
if(zoom_type == "full") {
|
||||
img.css('max-width', img.data('width') + 'px');
|
||||
img.css('max-height', img.data('height') + 'px');
|
||||
}
|
||||
if(zoom == "width") {
|
||||
if(zoom_type == "width") {
|
||||
img.css('max-width', '95%');
|
||||
img.css('max-height', img.data('height') + 'px');
|
||||
}
|
||||
if(zoom == "height") {
|
||||
if(zoom_type == "height") {
|
||||
img.css('max-width', img.data('width') + 'px');
|
||||
img.css('max-height', (window.innerHeight * 0.95) + 'px');
|
||||
}
|
||||
if(zoom == "both") {
|
||||
if(zoom_type == "both") {
|
||||
img.css('max-width', '95%');
|
||||
img.css('max-height', (window.innerHeight * 0.95) + 'px');
|
||||
}
|
||||
|
||||
$(".shm-zoomer").val(zoom);
|
||||
$(".shm-zoomer").val(zoom_type);
|
||||
|
||||
$.cookie("ui-image-zoom", zoom, {path: '/', expires: 365});
|
||||
$.cookie("ui-image-zoom", zoom_type, {path: '/', expires: 365});
|
||||
}
|
||||
|
Reference in New Issue
Block a user