first commit
This commit is contained in:
commit
4d332ef662
27586 changed files with 3281783 additions and 0 deletions
1
rus/admin/_V4/_lib/bootstrapMagnify/_notes/dwsync.xml
Normal file
1
rus/admin/_V4/_lib/bootstrapMagnify/_notes/dwsync.xml
Normal file
|
|
@ -0,0 +1 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
<dwsync>
<file name="bootstrap-magnify.js" server="SSD-500/Users/acolzi/Documents/webapps/fe5/" local="3574761759" remote="3574761759" Dst="-1" />
<file name="magnify.css" server="SSD-500/Users/acolzi/Documents/webapps/fe5/" local="3581591911" remote="3581591911" Dst="-1" />
<file name="bootstrap-magnify.js" server="mugello.fotoeventi.com:410//home/fotoeventi/www5A/" local="3574761759" remote="3581592089" Dst="-1" />
<file name="magnify.css" server="mugello.fotoeventi.com:410//home/fotoeventi/www5A/" local="3581593976" remote="3581593974" Dst="-1" />
<file name="bootstrap-magnify.js" server="10.10.0.102:410//home/fotoeventi/www5A/" local="3574761759" remote="3581592999" Dst="-1" />
<file name="magnify.css" server="10.10.0.102:410//home/fotoeventi/www5A/" local="3581593518" remote="3581594211" Dst="-1" />
</dwsync>
|
||||
126
rus/admin/_V4/_lib/bootstrapMagnify/bootstrap-magnify.js
vendored
Normal file
126
rus/admin/_V4/_lib/bootstrapMagnify/bootstrap-magnify.js
vendored
Normal file
|
|
@ -0,0 +1,126 @@
|
|||
/*
|
||||
Credits:
|
||||
https://github.com/marcaube/bootstrap-magnify
|
||||
*/
|
||||
|
||||
|
||||
!function ($) {
|
||||
|
||||
"use strict"; // jshint ;_;
|
||||
|
||||
|
||||
/* MAGNIFY PUBLIC CLASS DEFINITION
|
||||
* =============================== */
|
||||
|
||||
var Magnify = function (element, options) {
|
||||
this.init('magnify', element, options)
|
||||
}
|
||||
|
||||
Magnify.prototype = {
|
||||
|
||||
constructor: Magnify
|
||||
|
||||
, init: function (type, element, options) {
|
||||
var event = 'mousemove'
|
||||
, eventOut = 'mouseleave';
|
||||
|
||||
this.type = type
|
||||
this.$element = $(element)
|
||||
this.options = this.getOptions(options)
|
||||
this.nativeWidth = 0
|
||||
this.nativeHeight = 0
|
||||
|
||||
this.$element.wrap('<div class="magnify" \>');
|
||||
this.$element.parent('.magnify').append('<div class="magnify-large" \>');
|
||||
this.$element.siblings(".magnify-large").css("background","url('" + this.$element.attr("src") + "') no-repeat");
|
||||
|
||||
this.$element.parent('.magnify').on(event + '.' + this.type, $.proxy(this.check, this));
|
||||
this.$element.parent('.magnify').on(eventOut + '.' + this.type, $.proxy(this.check, this));
|
||||
}
|
||||
|
||||
, getOptions: function (options) {
|
||||
options = $.extend({}, $.fn[this.type].defaults, options, this.$element.data())
|
||||
|
||||
if (options.delay && typeof options.delay == 'number') {
|
||||
options.delay = {
|
||||
show: options.delay
|
||||
, hide: options.delay
|
||||
}
|
||||
}
|
||||
|
||||
return options
|
||||
}
|
||||
|
||||
, check: function (e) {
|
||||
var container = $(e.currentTarget);
|
||||
var self = container.children('img');
|
||||
var mag = container.children(".magnify-large");
|
||||
|
||||
// Get the native dimensions of the image
|
||||
if(!this.nativeWidth && !this.nativeHeight) {
|
||||
var image = new Image();
|
||||
image.src = self.attr("src");
|
||||
|
||||
this.nativeWidth = image.width;
|
||||
this.nativeHeight = image.height;
|
||||
|
||||
} else {
|
||||
|
||||
var magnifyOffset = container.offset();
|
||||
var mx = e.pageX - magnifyOffset.left;
|
||||
var my = e.pageY - magnifyOffset.top;
|
||||
|
||||
if (mx < container.width() && my < container.height() && mx > 0 && my > 0) {
|
||||
mag.fadeIn(100);
|
||||
} else {
|
||||
mag.fadeOut(100);
|
||||
}
|
||||
|
||||
if(mag.is(":visible"))
|
||||
{
|
||||
var rx = Math.round(mx/container.width()*this.nativeWidth - mag.width()/2)*-1;
|
||||
var ry = Math.round(my/container.height()*this.nativeHeight - mag.height()/2)*-1;
|
||||
var bgp = rx + "px " + ry + "px";
|
||||
|
||||
var px = mx - mag.width()/2;
|
||||
var py = my - mag.height()/2;
|
||||
|
||||
mag.css({left: px, top: py, backgroundPosition: bgp});
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* MAGNIFY PLUGIN DEFINITION
|
||||
* ========================= */
|
||||
|
||||
$.fn.magnify = function ( option ) {
|
||||
return this.each(function () {
|
||||
var $this = $(this)
|
||||
, data = $this.data('magnify')
|
||||
, options = typeof option == 'object' && option
|
||||
if (!data) $this.data('tooltip', (data = new Magnify(this, options)))
|
||||
if (typeof option == 'string') data[option]()
|
||||
})
|
||||
}
|
||||
|
||||
$.fn.magnify.Constructor = Magnify
|
||||
|
||||
$.fn.magnify.defaults = {
|
||||
delay: 0
|
||||
}
|
||||
|
||||
|
||||
/* MAGNIFY DATA-API
|
||||
* ================ */
|
||||
|
||||
$(window).on('load', function () {
|
||||
$('[data-toggle="magnify"]').each(function () {
|
||||
var $mag = $(this);
|
||||
$mag.magnify()
|
||||
})
|
||||
})
|
||||
|
||||
} ( window.jQuery );
|
||||
40
rus/admin/_V4/_lib/bootstrapMagnify/magnify.css
Normal file
40
rus/admin/_V4/_lib/bootstrapMagnify/magnify.css
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
/*
|
||||
|
||||
mettere l'immagine tra il div classe mag e aggiungere attibuto data-toggle="magnify" su src
|
||||
<div class="mag">
|
||||
<img data-toggle="magnify" src=".... ..... >
|
||||
</div>
|
||||
*/
|
||||
|
||||
|
||||
.mag {
|
||||
width:600px;
|
||||
margin: 0 auto;
|
||||
float: none;
|
||||
}
|
||||
|
||||
.mag img {
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
|
||||
|
||||
.magnify {
|
||||
position: relative;
|
||||
cursor: none
|
||||
}
|
||||
|
||||
.magnify-large {
|
||||
position: absolute;
|
||||
display: none;
|
||||
width: 475px;
|
||||
height: 475px;
|
||||
|
||||
-webkit-box-shadow: 0 0 0 7px rgba(255, 255, 255, 0.85), 0 0 7px 7px rgba(0, 0, 0, 0.25), inset 0 0 40px 2px rgba(0, 0, 0, 0.25);
|
||||
-moz-box-shadow: 0 0 0 7px rgba(255, 255, 255, 0.85), 0 0 7px 7px rgba(0, 0, 0, 0.25), inset 0 0 40px 2px rgba(0, 0, 0, 0.25);
|
||||
box-shadow: 0 0 0 7px rgba(255, 255, 255, 0.85), 0 0 7px 7px rgba(0, 0, 0, 0.25), inset 0 0 40px 2px rgba(0, 0, 0, 0.25);
|
||||
|
||||
-webkit-border-radius: 100%;
|
||||
-moz-border-radius: 100%;
|
||||
border-radius: 100%
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue