primo commit
This commit is contained in:
1
media/com_phocagallery/js/masonry/index.html
Normal file
1
media/com_phocagallery/js/masonry/index.html
Normal file
@ -0,0 +1 @@
|
||||
<html><body bgcolor="#FFFFFF"></body></html>
|
||||
@ -0,0 +1,79 @@
|
||||
/*!
|
||||
* Masonry PACKAGED v4.1.1
|
||||
* Cascading grid layout library
|
||||
* http://masonry.desandro.com
|
||||
* MIT License
|
||||
* by David DeSandro
|
||||
*/
|
||||
|
||||
/*
|
||||
* Masonry initialize
|
||||
* https://www.phoca.cz
|
||||
*
|
||||
* Copyright (C) 2016 Jan Pavelka www.phoca.cz
|
||||
*
|
||||
* Licensed under the MIT license
|
||||
*/
|
||||
|
||||
function phMasGetMarginLeft(container, basePadding, columns) {
|
||||
|
||||
var wI = jQuery('.item').width();
|
||||
var mL = parseInt(jQuery('.item').css("margin-left"));
|
||||
var mR = parseInt(jQuery('.item').css("margin-right"));
|
||||
//var wC = jQuery('body').width();
|
||||
var wC = container.parent().width();
|
||||
var wCO = container.parent().outerWidth();
|
||||
|
||||
wN = (wCO - ((columns * wI) + (columns * mL) + (columns * mR))) / 2;
|
||||
wN = Math.round(wN);
|
||||
|
||||
|
||||
if (wN < 0) {
|
||||
wN = parseInt(basePadding);
|
||||
}
|
||||
|
||||
//var l = "Item: " + wI + ", Columns:" + columns + ", Container: " + wC + ", ContainerOuter: " + wCO + ", Margin: " + wN + ", Base Width: "+ basePadding;
|
||||
//console.log(l);
|
||||
wS = wN + 'px';
|
||||
|
||||
return wS;
|
||||
|
||||
}
|
||||
|
||||
jQuery(window).load(function() {
|
||||
|
||||
var $phMasContainer = jQuery('#pg-msnr-container');
|
||||
var $phMasBasePL = $phMasContainer.parent().css( "padding-left");
|
||||
|
||||
$phMasEvent = $phMasContainer.masonry({
|
||||
itemSelector: '.item',
|
||||
isAnimated: true,
|
||||
isFitWidth: false,
|
||||
columnWidth: '.pg-grid-sizer'
|
||||
});
|
||||
|
||||
jQuery.extend( Masonry.prototype, {
|
||||
phMasGetCols : function() {
|
||||
return this.cols;
|
||||
}
|
||||
});
|
||||
|
||||
$phMasCols = $phMasContainer.masonry('phMasGetCols');
|
||||
$phMasNewMargin = phMasGetMarginLeft($phMasContainer, $phMasBasePL, $phMasCols);
|
||||
$phMasContainer.parent().css( "padding-left", $phMasNewMargin);
|
||||
|
||||
|
||||
/*jQuery(window).resize(function() {
|
||||
|
||||
$phMasCols = $phMasContainer.masonry('phMasGetCols');
|
||||
$phMasNewMargin = phMasGetMarginLeft($phMasContainer, $phMasBasePL, $phMasCols);
|
||||
$phMasContainer.parent().css( "padding-left", $phMasNewMargin);
|
||||
|
||||
});*/
|
||||
|
||||
$phMasEvent.on( 'layoutComplete', function() {
|
||||
$phMasCols = $phMasContainer.masonry('phMasGetCols');
|
||||
$phMasNewMargin = phMasGetMarginLeft($phMasContainer, $phMasBasePL, $phMasCols);
|
||||
$phMasContainer.parent().css( "padding-left", $phMasNewMargin);
|
||||
});
|
||||
});
|
||||
80
media/com_phocagallery/js/masonry/masonry.initialize.js
Normal file
80
media/com_phocagallery/js/masonry/masonry.initialize.js
Normal file
@ -0,0 +1,80 @@
|
||||
/*!
|
||||
* Masonry PACKAGED v4.1.1
|
||||
* Cascading grid layout library
|
||||
* http://masonry.desandro.com
|
||||
* MIT License
|
||||
* by David DeSandro
|
||||
*/
|
||||
|
||||
/*
|
||||
* Masonry initialize
|
||||
* https://www.phoca.cz
|
||||
*
|
||||
* Copyright (C) 2016 Jan Pavelka www.phoca.cz
|
||||
*
|
||||
* Licensed under the MIT license
|
||||
*/
|
||||
|
||||
function phMasGetMarginLeft(container, basePadding, columns) {
|
||||
|
||||
var wI = jQuery('.item').width();
|
||||
var mL = parseInt(jQuery('.item').css("margin-left"));
|
||||
var mR = parseInt(jQuery('.item').css("margin-right"));
|
||||
//var wC = jQuery('body').width();
|
||||
var wC = container.parent().width();
|
||||
var wCO = container.parent().outerWidth();
|
||||
|
||||
wN = (wCO - ((columns * wI) + (columns * mL) + (columns * mR))) / 2;
|
||||
wN = Math.round(wN);
|
||||
|
||||
|
||||
if (wN < 0) {
|
||||
wN = parseInt(basePadding);
|
||||
}
|
||||
|
||||
//var l = "Item: " + wI + ", Columns:" + columns + ", Container: " + wC + ", ContainerOuter: " + wCO + ", Margin: " + wN + ", Base Width: "+ basePadding;
|
||||
//console.log(l);
|
||||
wS = wN + 'px';
|
||||
|
||||
return wS;
|
||||
|
||||
}
|
||||
|
||||
jQuery(window).load(function() {
|
||||
|
||||
var $phMasContainer = jQuery('#pg-msnr-container');
|
||||
var $phMasBasePL = $phMasContainer.parent().css( "padding-left");
|
||||
|
||||
$phMasEvent = $phMasContainer.masonry({
|
||||
itemSelector: '.item',
|
||||
isAnimated: true,
|
||||
isFitWidth: false,
|
||||
columnWidth: '.pg-grid-sizer'
|
||||
});
|
||||
|
||||
jQuery.extend( Masonry.prototype, {
|
||||
phMasGetCols : function() {
|
||||
return this.cols;
|
||||
}
|
||||
});
|
||||
|
||||
/*
|
||||
$phMasCols = $phMasContainer.masonry('phMasGetCols');
|
||||
$phMasNewMargin = phMasGetMarginLeft($phMasContainer, $phMasBasePL, $phMasCols);
|
||||
$phMasContainer.parent().css( "padding-left", $phMasNewMargin);
|
||||
*/
|
||||
|
||||
/*jQuery(window).resize(function() {
|
||||
|
||||
$phMasCols = $phMasContainer.masonry('phMasGetCols');
|
||||
$phMasNewMargin = phMasGetMarginLeft($phMasContainer, $phMasBasePL, $phMasCols);
|
||||
$phMasContainer.parent().css( "padding-left", $phMasNewMargin);
|
||||
|
||||
});*/
|
||||
|
||||
/* $phMasEvent.on( 'layoutComplete', function() {
|
||||
$phMasCols = $phMasContainer.masonry('phMasGetCols');
|
||||
$phMasNewMargin = phMasGetMarginLeft($phMasContainer, $phMasBasePL, $phMasCols);
|
||||
$phMasContainer.parent().css( "padding-left", $phMasNewMargin);
|
||||
}); */
|
||||
});
|
||||
9
media/com_phocagallery/js/masonry/masonry.min.js
vendored
Normal file
9
media/com_phocagallery/js/masonry/masonry.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user