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