mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-11 20:13:28 +00:00
Fix bootstrap conflict
This commit is contained in:
@@ -10,7 +10,7 @@
|
||||
|
||||
var $this = $(this), data = $(this).data('image_enhance');
|
||||
|
||||
if ( ! data )
|
||||
if ( ! data )
|
||||
{
|
||||
if ( options ) {
|
||||
$.extend( settings, options );
|
||||
@@ -22,18 +22,18 @@
|
||||
wrapper.css('position','relative');
|
||||
|
||||
reset_position($this);
|
||||
|
||||
|
||||
if(settings.display_full_screen)
|
||||
{
|
||||
$image.parent()
|
||||
.append('<div class="image_enhance_titlebar" style="display:none;">\n\
|
||||
<div class="image_enhance_title_options"><span class="full"><img src="/skins/icons/fullscreen.gif" /></span></div>\n\
|
||||
<div class="image_enhance_title_bg"></div></div>');
|
||||
|
||||
|
||||
var $titlebar = $('.image_enhance_titlebar',$this);
|
||||
|
||||
|
||||
$('.image_enhance_title_bg',$titlebar).css('opacity',0.5);
|
||||
|
||||
|
||||
$image.parent()
|
||||
.bind('mouseover.image_enhance', function(){
|
||||
$titlebar.stop().show().animate({
|
||||
@@ -47,7 +47,7 @@
|
||||
$titlebar.hide()
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
$('.image_enhance_titlebar .full', wrapper).bind('click.image_enhance', function(){
|
||||
$('body').append('<div class="image_enhance_theatre">\n\
|
||||
\n\
|
||||
@@ -88,17 +88,21 @@
|
||||
{
|
||||
if(typeof $image.draggable !== 'function' && window.console)
|
||||
console.error('zoomable require jquery UI\'s draggable');
|
||||
|
||||
|
||||
if($image.attr('ondragstart'))
|
||||
{
|
||||
$image.removeAttr('ondragstart');
|
||||
}
|
||||
$image.draggable();
|
||||
$image.css({
|
||||
'max-width':'none',
|
||||
'max-height':'none'
|
||||
});
|
||||
|
||||
var image_width = parseInt($('input[name="width"]', $this).val());
|
||||
var image_height = parseInt($('input[name="height"]', $this).val());
|
||||
var ratio = image_width / image_height;
|
||||
|
||||
|
||||
$this.bind('mousewheel',function(event, delta){
|
||||
$image.addClass('zoomed');
|
||||
if(delta > 0)
|
||||
@@ -147,17 +151,19 @@
|
||||
|
||||
if(bool)
|
||||
{
|
||||
if(w1 * 1.08 < 32767)
|
||||
if((w1 * 1.08) < 32767) {
|
||||
w2 = w1 * 1.08;
|
||||
else
|
||||
} else {
|
||||
w2 = w1;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if(w1 / 1.08 > 20)
|
||||
if((w1 / 1.08) > 20) {
|
||||
w2 = w1 / 1.08;
|
||||
else
|
||||
} else {
|
||||
w2 = w1;
|
||||
}
|
||||
}
|
||||
|
||||
var datas = $(this).data('image_enhance');
|
||||
@@ -184,7 +190,7 @@
|
||||
{
|
||||
if(typeof border !== 'number')
|
||||
border = 0;
|
||||
|
||||
|
||||
var width, height;
|
||||
var ratio_display = window_width / window_height;
|
||||
var ratio_image = image_width / image_height;
|
||||
@@ -210,7 +216,7 @@
|
||||
height:height
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
function reset_position($this)
|
||||
{
|
||||
var display_width = $this.width();
|
||||
@@ -220,10 +226,10 @@
|
||||
|
||||
var datas = calculate_sizes(display_width, display_height, image_width, image_height);
|
||||
var $image =$('img', $this);
|
||||
|
||||
|
||||
var top = Math.round((display_height - datas.height) / 2)+'px';
|
||||
var left = Math.round((display_width - datas.width) / 2)+'px';
|
||||
|
||||
|
||||
$image.width(datas.width).height(datas.height).css({top:top, left:left});
|
||||
return;
|
||||
}
|
||||
|
Reference in New Issue
Block a user