Version Description
- 17/03/2021 =
- Fixed: After deleting/cloning a gallery the Gallery page is properly reloading.
- Fixed: Caption option on mobile.
- Fixed: Loading bar progress bug.
- Fixed: Presets for Loading and Hover effects.
Download this release
Release Info
| Developer | giucu91 |
| Plugin | |
| Version | 3.5.0 |
| Comparing to | |
| See all releases | |
Code changes from version 3.4.22 to 3.5.0
- FinalTilesGalleryLite.php +4 -4
- admin/include/edit-gallery.php +4 -2
- admin/include/fields.php +2 -0
- admin/overview.php +2 -1
- admin/scripts/final-tiles-gallery-admin.js +16 -46
- freemius/assets/img/final-tiles-grid-gallery-lite.jpg +0 -0
- lib/gallery-class.php +49 -22
- readme.txt +8 -2
- scripts/ftg.css +11 -6
- scripts/jquery.finalTilesGallery.js +37 -33
FinalTilesGalleryLite.php
CHANGED
|
@@ -3,7 +3,7 @@
|
|
| 3 |
/**
|
| 4 |
* Plugin Name: Final Tiles Grid Gallery - Image Gallery
|
| 5 |
* Description: Wordpress Plugin for creating responsive image galleries.
|
| 6 |
-
* Version: 3.
|
| 7 |
* Author: WPChill
|
| 8 |
* Author URI: https://wpchill.com
|
| 9 |
* Tested up to: 5.2
|
|
@@ -25,7 +25,7 @@
|
|
| 25 |
* Original Author: https://profiles.wordpress.org/greentreealbs/
|
| 26 |
*
|
| 27 |
*/
|
| 28 |
-
define( "FTGVERSION", "3.
|
| 29 |
// Create a helper function for easy SDK access.
|
| 30 |
|
| 31 |
if ( !function_exists( 'ftg_fs' ) ) {
|
|
@@ -571,7 +571,7 @@ if ( !class_exists( 'FinalTiles_Gallery' ) ) {
|
|
| 571 |
if ( check_admin_referer( 'FinalTiles_gallery', 'FinalTiles_gallery' ) ) {
|
| 572 |
$this->FinalTilesdb->deleteGallery( intval( $_POST['id'] ) );
|
| 573 |
}
|
| 574 |
-
|
| 575 |
}
|
| 576 |
|
| 577 |
public function update_configuration()
|
|
@@ -624,7 +624,7 @@ if ( !class_exists( 'FinalTiles_Gallery' ) ) {
|
|
| 624 |
$this->FinalTilesdb->addImages( $id, $images );
|
| 625 |
}
|
| 626 |
|
| 627 |
-
|
| 628 |
}
|
| 629 |
|
| 630 |
//Add gallery scripts
|
| 3 |
/**
|
| 4 |
* Plugin Name: Final Tiles Grid Gallery - Image Gallery
|
| 5 |
* Description: Wordpress Plugin for creating responsive image galleries.
|
| 6 |
+
* Version: 3.5.0
|
| 7 |
* Author: WPChill
|
| 8 |
* Author URI: https://wpchill.com
|
| 9 |
* Tested up to: 5.2
|
| 25 |
* Original Author: https://profiles.wordpress.org/greentreealbs/
|
| 26 |
*
|
| 27 |
*/
|
| 28 |
+
define( "FTGVERSION", "3.5.0" );
|
| 29 |
// Create a helper function for easy SDK access.
|
| 30 |
|
| 31 |
if ( !function_exists( 'ftg_fs' ) ) {
|
| 571 |
if ( check_admin_referer( 'FinalTiles_gallery', 'FinalTiles_gallery' ) ) {
|
| 572 |
$this->FinalTilesdb->deleteGallery( intval( $_POST['id'] ) );
|
| 573 |
}
|
| 574 |
+
return array();
|
| 575 |
}
|
| 576 |
|
| 577 |
public function update_configuration()
|
| 624 |
$this->FinalTilesdb->addImages( $id, $images );
|
| 625 |
}
|
| 626 |
|
| 627 |
+
return array();
|
| 628 |
}
|
| 629 |
|
| 630 |
//Add gallery scripts
|
admin/include/edit-gallery.php
CHANGED
|
@@ -495,9 +495,11 @@ foreach ( $ftg_fields as $section => $s ) {
|
|
| 495 |
if ( array_key_exists( "presets", $s ) ) {
|
| 496 |
?>
|
| 497 |
<select class="browser-default presets" data-field-idx="<?php
|
| 498 |
-
echo esc_attr( $idx ) ;
|
| 499 |
?>">
|
| 500 |
-
<option value=""
|
|
|
|
|
|
|
| 501 |
<?php
|
| 502 |
foreach ( $s["presets"] as $preset => $data ) {
|
| 503 |
?>
|
| 495 |
if ( array_key_exists( "presets", $s ) ) {
|
| 496 |
?>
|
| 497 |
<select class="browser-default presets" data-field-idx="<?php
|
| 498 |
+
echo esc_attr( $s['idx'] ) ;
|
| 499 |
?>">
|
| 500 |
+
<option value=""><?php
|
| 501 |
+
echo esc_html__( 'Select preset', 'final-tiles-grid-gallery-lite' ) ;
|
| 502 |
+
?></option>
|
| 503 |
<?php
|
| 504 |
foreach ( $s["presets"] as $preset => $data ) {
|
| 505 |
?>
|
admin/include/fields.php
CHANGED
|
@@ -15,6 +15,7 @@ $this->fields = array(
|
|
| 15 |
),
|
| 16 |
"Hover effects" => array(
|
| 17 |
"icon" => "fa fa-diamond",
|
|
|
|
| 18 |
"presets" => array(
|
| 19 |
"Slow zoom in" => array(
|
| 20 |
"hoverDuration" => 60000,
|
|
@@ -51,6 +52,7 @@ $this->fields = array(
|
|
| 51 |
),
|
| 52 |
"Image loaded effects" => array(
|
| 53 |
"icon" => "fa fa-star",
|
|
|
|
| 54 |
"presets" => array(
|
| 55 |
"Wobble" => array(
|
| 56 |
"loadedDuration" => 600,
|
| 15 |
),
|
| 16 |
"Hover effects" => array(
|
| 17 |
"icon" => "fa fa-diamond",
|
| 18 |
+
"idx" => 3,
|
| 19 |
"presets" => array(
|
| 20 |
"Slow zoom in" => array(
|
| 21 |
"hoverDuration" => 60000,
|
| 52 |
),
|
| 53 |
"Image loaded effects" => array(
|
| 54 |
"icon" => "fa fa-star",
|
| 55 |
+
"idx" => 4,
|
| 56 |
"presets" => array(
|
| 57 |
"Wobble" => array(
|
| 58 |
"loadedDuration" => 600,
|
admin/overview.php
CHANGED
|
@@ -187,6 +187,7 @@
|
|
| 187 |
e.preventDefault();
|
| 188 |
var id = $(this).data("gid");
|
| 189 |
FTG.show_loading();
|
|
|
|
| 190 |
$.ajax({
|
| 191 |
url: ajaxurl,
|
| 192 |
data: {
|
|
@@ -200,7 +201,7 @@
|
|
| 200 |
FTG.hide_loading();
|
| 201 |
},
|
| 202 |
success: function(r) {
|
| 203 |
-
|
| 204 |
}
|
| 205 |
});
|
| 206 |
});
|
| 187 |
e.preventDefault();
|
| 188 |
var id = $(this).data("gid");
|
| 189 |
FTG.show_loading();
|
| 190 |
+
|
| 191 |
$.ajax({
|
| 192 |
url: ajaxurl,
|
| 193 |
data: {
|
| 201 |
FTG.hide_loading();
|
| 202 |
},
|
| 203 |
success: function(r) {
|
| 204 |
+
location.href = "?page=ftg-lite-gallery-admin";
|
| 205 |
}
|
| 206 |
});
|
| 207 |
});
|
admin/scripts/final-tiles-gallery-admin.js
CHANGED
|
@@ -46,9 +46,7 @@ var FTG = function($) {
|
|
| 46 |
FinalTiles_gallery: $('#FinalTiles_gallery').val(),
|
| 47 |
gid: $("#gallery-id").val()
|
| 48 |
};
|
| 49 |
-
|
| 50 |
-
/* Premium Code Stripped by Freemius */
|
| 51 |
-
|
| 52 |
$.post(ajaxurl, data, function(html) {
|
| 53 |
$("#image-list").empty().append(html);
|
| 54 |
|
|
@@ -131,20 +129,14 @@ var FTG = function($) {
|
|
| 131 |
});
|
| 132 |
},
|
| 133 |
update_filters: function() {
|
| 134 |
-
|
| 135 |
-
/* Premium Code Stripped by Freemius */
|
| 136 |
-
|
| 137 |
},
|
| 138 |
update_custom_isf: function() {
|
| 139 |
var isf = [];
|
| 140 |
-
|
| 141 |
-
/* Premium Code Stripped by Freemius */
|
| 142 |
-
|
| 143 |
},
|
| 144 |
add_filter: function(value) {
|
| 145 |
-
|
| 146 |
-
/* Premium Code Stripped by Freemius */
|
| 147 |
-
|
| 148 |
},
|
| 149 |
add_isf: function(value) {
|
| 150 |
var $item = $("<tr><td class='del'></td><td></td><td></td></tr>");
|
|
@@ -167,19 +159,13 @@ var FTG = function($) {
|
|
| 167 |
|
| 168 |
var source = $('[name="ftg_source"]').val();
|
| 169 |
|
| 170 |
-
|
| 171 |
-
/* Premium Code Stripped by Freemius */
|
| 172 |
-
|
| 173 |
},
|
| 174 |
refresh_woocommerce: function() {
|
| 175 |
-
|
| 176 |
-
/* Premium Code Stripped by Freemius */
|
| 177 |
-
|
| 178 |
},
|
| 179 |
refresh_posts: function() {
|
| 180 |
-
|
| 181 |
-
/* Premium Code Stripped by Freemius */
|
| 182 |
-
|
| 183 |
},
|
| 184 |
save_gallery: function() {
|
| 185 |
// !gallery save
|
|
@@ -542,9 +528,7 @@ var FTG = function($) {
|
|
| 542 |
e.preventDefault();
|
| 543 |
FTG.save_gallery();
|
| 544 |
});
|
| 545 |
-
|
| 546 |
-
/* Premium Code Stripped by Freemius */
|
| 547 |
-
|
| 548 |
$("#image-list").on("click", ".item .thumb", function() {
|
| 549 |
$(this).parents(".item").toggleClass("selected");
|
| 550 |
$(this).parents(".item").find(".checkbox").toggleClass("checked");
|
|
@@ -622,9 +606,7 @@ var FTG = function($) {
|
|
| 622 |
else
|
| 623 |
$(".js-no-hidden").show();
|
| 624 |
|
| 625 |
-
|
| 626 |
-
/* Premium Code Stripped by Freemius */
|
| 627 |
-
|
| 628 |
|
| 629 |
var link = $item.find("[name=link]").val();
|
| 630 |
|
|
@@ -684,9 +666,7 @@ var FTG = function($) {
|
|
| 684 |
$("[data-action='remove']").show();
|
| 685 |
}
|
| 686 |
|
| 687 |
-
|
| 688 |
-
/* Premium Code Stripped by Freemius */
|
| 689 |
-
|
| 690 |
});
|
| 691 |
|
| 692 |
var refreshPostsTO = 0;
|
|
@@ -712,9 +692,7 @@ var FTG = function($) {
|
|
| 712 |
}, 500);
|
| 713 |
});
|
| 714 |
|
| 715 |
-
|
| 716 |
-
/* Premium Code Stripped by Freemius */
|
| 717 |
-
|
| 718 |
$("body").on("click", "[name=click_action]", function() {
|
| 719 |
if ($(this).val() == "url") {
|
| 720 |
$(this).siblings("[name=url]").get(0).disabled = false;
|
|
@@ -723,7 +701,7 @@ var FTG = function($) {
|
|
| 723 |
}
|
| 724 |
});
|
| 725 |
$("body").on("change", ".presets", function () {
|
| 726 |
-
var idx = $(this).data("field-idx");
|
| 727 |
for(p in presets["preset_" + idx + "_" + $(this).val()]) {
|
| 728 |
$('[name="ftg_'+ p +'"]').val(presets["preset_" + idx + "_" + $(this).val()][p]).change();
|
| 729 |
}
|
|
@@ -929,9 +907,7 @@ var FTG = function($) {
|
|
| 929 |
$("#shortcode-" + code).toggleClass("visible");
|
| 930 |
});
|
| 931 |
|
| 932 |
-
|
| 933 |
-
/* Premium Code Stripped by Freemius */
|
| 934 |
-
|
| 935 |
|
| 936 |
$(".open-media-panel").on("click", function(e) {
|
| 937 |
e.preventDefault();
|
|
@@ -1080,22 +1056,16 @@ var FTGWizard = function($) {
|
|
| 1080 |
$(this).text("Save");
|
| 1081 |
if (branch == 'images') {
|
| 1082 |
$(".select-images").show();
|
| 1083 |
-
|
| 1084 |
-
/* Premium Code Stripped by Freemius */
|
| 1085 |
-
|
| 1086 |
//$("[name=ftg_max_posts]").val(0);
|
| 1087 |
} else if (branch == 'posts') {
|
| 1088 |
$(".select-images").hide();
|
| 1089 |
$("[name=enc_images]").val("");
|
| 1090 |
-
|
| 1091 |
-
/* Premium Code Stripped by Freemius */
|
| 1092 |
-
|
| 1093 |
} else {
|
| 1094 |
$(".select-images").hide();
|
| 1095 |
$("[name=enc_images]").val("");
|
| 1096 |
-
|
| 1097 |
-
/* Premium Code Stripped by Freemius */
|
| 1098 |
-
|
| 1099 |
}
|
| 1100 |
} else {
|
| 1101 |
$(this).text("Next");
|
| 46 |
FinalTiles_gallery: $('#FinalTiles_gallery').val(),
|
| 47 |
gid: $("#gallery-id").val()
|
| 48 |
};
|
| 49 |
+
|
|
|
|
|
|
|
| 50 |
$.post(ajaxurl, data, function(html) {
|
| 51 |
$("#image-list").empty().append(html);
|
| 52 |
|
| 129 |
});
|
| 130 |
},
|
| 131 |
update_filters: function() {
|
| 132 |
+
|
|
|
|
|
|
|
| 133 |
},
|
| 134 |
update_custom_isf: function() {
|
| 135 |
var isf = [];
|
| 136 |
+
|
|
|
|
|
|
|
| 137 |
},
|
| 138 |
add_filter: function(value) {
|
| 139 |
+
|
|
|
|
|
|
|
| 140 |
},
|
| 141 |
add_isf: function(value) {
|
| 142 |
var $item = $("<tr><td class='del'></td><td></td><td></td></tr>");
|
| 159 |
|
| 160 |
var source = $('[name="ftg_source"]').val();
|
| 161 |
|
| 162 |
+
|
|
|
|
|
|
|
| 163 |
},
|
| 164 |
refresh_woocommerce: function() {
|
| 165 |
+
|
|
|
|
|
|
|
| 166 |
},
|
| 167 |
refresh_posts: function() {
|
| 168 |
+
|
|
|
|
|
|
|
| 169 |
},
|
| 170 |
save_gallery: function() {
|
| 171 |
// !gallery save
|
| 528 |
e.preventDefault();
|
| 529 |
FTG.save_gallery();
|
| 530 |
});
|
| 531 |
+
|
|
|
|
|
|
|
| 532 |
$("#image-list").on("click", ".item .thumb", function() {
|
| 533 |
$(this).parents(".item").toggleClass("selected");
|
| 534 |
$(this).parents(".item").find(".checkbox").toggleClass("checked");
|
| 606 |
else
|
| 607 |
$(".js-no-hidden").show();
|
| 608 |
|
| 609 |
+
|
|
|
|
|
|
|
| 610 |
|
| 611 |
var link = $item.find("[name=link]").val();
|
| 612 |
|
| 666 |
$("[data-action='remove']").show();
|
| 667 |
}
|
| 668 |
|
| 669 |
+
|
|
|
|
|
|
|
| 670 |
});
|
| 671 |
|
| 672 |
var refreshPostsTO = 0;
|
| 692 |
}, 500);
|
| 693 |
});
|
| 694 |
|
| 695 |
+
|
|
|
|
|
|
|
| 696 |
$("body").on("click", "[name=click_action]", function() {
|
| 697 |
if ($(this).val() == "url") {
|
| 698 |
$(this).siblings("[name=url]").get(0).disabled = false;
|
| 701 |
}
|
| 702 |
});
|
| 703 |
$("body").on("change", ".presets", function () {
|
| 704 |
+
var idx = $(this).data("field-idx");
|
| 705 |
for(p in presets["preset_" + idx + "_" + $(this).val()]) {
|
| 706 |
$('[name="ftg_'+ p +'"]').val(presets["preset_" + idx + "_" + $(this).val()][p]).change();
|
| 707 |
}
|
| 907 |
$("#shortcode-" + code).toggleClass("visible");
|
| 908 |
});
|
| 909 |
|
| 910 |
+
|
|
|
|
|
|
|
| 911 |
|
| 912 |
$(".open-media-panel").on("click", function(e) {
|
| 913 |
e.preventDefault();
|
| 1056 |
$(this).text("Save");
|
| 1057 |
if (branch == 'images') {
|
| 1058 |
$(".select-images").show();
|
| 1059 |
+
|
|
|
|
|
|
|
| 1060 |
//$("[name=ftg_max_posts]").val(0);
|
| 1061 |
} else if (branch == 'posts') {
|
| 1062 |
$(".select-images").hide();
|
| 1063 |
$("[name=enc_images]").val("");
|
| 1064 |
+
|
|
|
|
|
|
|
| 1065 |
} else {
|
| 1066 |
$(".select-images").hide();
|
| 1067 |
$("[name=enc_images]").val("");
|
| 1068 |
+
|
|
|
|
|
|
|
| 1069 |
}
|
| 1070 |
} else {
|
| 1071 |
$(this).text("Next");
|
freemius/assets/img/final-tiles-grid-gallery-lite.jpg
ADDED
|
Binary file
|
lib/gallery-class.php
CHANGED
|
@@ -343,12 +343,18 @@ if ( !class_exists( "FinalTilesGallery" ) ) {
|
|
| 343 |
$html .= "#ftg-" . absint( $this->id . $rid ) . " .tile .icon { margin: -" . absint( $gallery->captionIconSize ) / 2 . "px 0 0 -" . absint( $gallery->captionIconSize ) / 2 . "px; }\n";
|
| 344 |
}
|
| 345 |
|
|
|
|
| 346 |
if ( $gallery->captionFontSize ) {
|
| 347 |
$html .= "#ftg-" . absint( $this->id . $rid ) . " .tile .caption-block .text-wrapper span.text { font-size:" . absint( $gallery->captionFontSize ) . "px; }\n";
|
|
|
|
| 348 |
}
|
|
|
|
|
|
|
| 349 |
if ( $gallery->titleFontSize ) {
|
| 350 |
$html .= "#ftg-" . absint( $this->id . $rid ) . " .tile .caption-block .text-wrapper span.title { font-size:" . absint( $gallery->titleFontSize ) . "px; }\n";
|
|
|
|
| 351 |
}
|
|
|
|
| 352 |
if ( $gallery->backgroundColor ) {
|
| 353 |
$html .= "#ftg-" . absint( $this->id . $rid ) . " .tile { background-color: " . esc_attr( $gallery->backgroundColor ) . "; }\n";
|
| 354 |
}
|
|
@@ -356,6 +362,8 @@ if ( !class_exists( "FinalTilesGallery" ) ) {
|
|
| 356 |
if ( $gallery->captionColor ) {
|
| 357 |
$html .= "#ftg-" . absint( $this->id . $rid ) . " .tile .caption-block .text-wrapper span.text { color: " . esc_attr( $gallery->captionColor ) . "; }\n";
|
| 358 |
$html .= "#ftg-" . absint( $this->id . $rid ) . " .tile .caption-block .text-wrapper span.title { color: " . esc_attr( $gallery->captionColor ) . "; }\n";
|
|
|
|
|
|
|
| 359 |
}
|
| 360 |
|
| 361 |
if ( $gallery->socialIconColor ) {
|
|
@@ -379,7 +387,7 @@ if ( !class_exists( "FinalTilesGallery" ) ) {
|
|
| 379 |
$html .= "#ftg-" . absint( $this->id . $rid ) . " .tile .tile-inner .caption-block { background-color: rgba({$bgCaption[0]}, {$bgCaption[1]}, {$bgCaption[2]}, " . absint( $gallery->captionOpacity ) / 100 . "); }\n";
|
| 380 |
}
|
| 381 |
if ( $gallery->captionFrame == 'T' && $gallery->captionFrameColor ) {
|
| 382 |
-
$html .= "#ftg-" . absint( $this->id . $rid ) . " .tile .caption-block.
|
| 383 |
}
|
| 384 |
$loadedEasing = $gallery->loadedEasing;
|
| 385 |
if ( $gallery->loadedEasing == "ease-out-back" ) {
|
|
@@ -426,17 +434,29 @@ if ( !class_exists( "FinalTilesGallery" ) ) {
|
|
| 426 |
if ( $gallery->captionMobileBehavior == "desktop" ) {
|
| 427 |
$gallery->captionMobileBehavior = $gallery->captionBehavior;
|
| 428 |
}
|
| 429 |
-
$captionBehavior =
|
| 430 |
-
$hover = ( $captionBehavior == "never" ? "" : "ftg-hover-enabled" );
|
| 431 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 432 |
$captionBehavior = "none";
|
| 433 |
}
|
| 434 |
$socialClasses = "";
|
| 435 |
if ( $this->hasSocial() ) {
|
| 436 |
$socialClasses .= "social-icons-" . esc_attr( $gallery->socialIconPosition ) . " social-icons-" . esc_attr( $gallery->socialIconStyle );
|
| 437 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
| 438 |
$html .= "<a name='{$this->id}'></a>";
|
| 439 |
-
$html .= "<div class='final-tiles-gallery {$socialClasses} {$hover} " . (( $gallery->captionFrame == 'T' ? "caption-frame" : "" )) . " caption-{$captionBehavior} caption-" . esc_attr( $gallery->captionVerticalAlignment ) . " caption-" . esc_attr( $gallery->captionHorizontalAlignment ) . "' id='ftg-" . absint( $this->id . $rid ) . "' style='width:" . esc_attr( $gallery->width ) . "'>\n";
|
| 440 |
if ( strlen( $gallery->filters ) ) {
|
| 441 |
}
|
| 442 |
$html .= "<div class='ftg-items'>\n";
|
|
@@ -701,7 +721,7 @@ if ( !class_exists( "FinalTilesGallery" ) ) {
|
|
| 701 |
|
| 702 |
if ( !(empty($image->description) && empty($image->title)) && $this->useCaptions() || $gallery->captionEmpty == "show" || $this->hasCaptionIcon() ) {
|
| 703 |
if ( $this->hasCaptionIcon() ) {
|
| 704 |
-
$html .= "\t<span class='icon fa fa-" . $this->getCaptionIcon() . "'></span>\n";
|
| 705 |
}
|
| 706 |
$html .= "<div class='caption-block'>\n";
|
| 707 |
|
|
@@ -738,32 +758,39 @@ if ( !class_exists( "FinalTilesGallery" ) ) {
|
|
| 738 |
$html .= "</a>\n";
|
| 739 |
if ( $gallery->captionPosition == 'outside' ) {
|
| 740 |
|
| 741 |
-
if ( !(empty($image->description) && empty($image->title)) && $this->useCaptions() ) {
|
| 742 |
-
$
|
|
|
|
|
|
|
|
|
|
| 743 |
|
| 744 |
-
if ( $gallery->source == "images" ) {
|
| 745 |
-
$html .= "\t<
|
| 746 |
-
if ( !empty($image->title) && $
|
| 747 |
$html .= "<span class='title'>" . wp_kses_post( $image->title ) . "</span>\n";
|
| 748 |
}
|
| 749 |
-
if ( !empty($image->description) && $
|
| 750 |
$html .= "\t<span class='text'>" . wp_kses_post( $image->description ) . "</span>\n";
|
| 751 |
}
|
| 752 |
-
$html .= "\t</
|
| 753 |
}
|
| 754 |
|
| 755 |
-
if ( ($gallery->source == "posts" || $gallery->source == "woocommerce") && $this->useCaptions() ) {
|
| 756 |
-
$html .= "\t<span class='text'>" . wp_kses_post( $image->description ) . "</span>\n";
|
| 757 |
-
}
|
| 758 |
|
| 759 |
-
if ( $gallery->source == "woocommerce" ) {
|
| 760 |
-
$html .= "<div class='
|
| 761 |
-
$html .= "\t<span class='
|
| 762 |
-
|
| 763 |
-
$
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 764 |
}
|
| 765 |
|
| 766 |
-
$html .= "</
|
| 767 |
}
|
| 768 |
|
| 769 |
}
|
| 343 |
$html .= "#ftg-" . absint( $this->id . $rid ) . " .tile .icon { margin: -" . absint( $gallery->captionIconSize ) / 2 . "px 0 0 -" . absint( $gallery->captionIconSize ) / 2 . "px; }\n";
|
| 344 |
}
|
| 345 |
|
| 346 |
+
|
| 347 |
if ( $gallery->captionFontSize ) {
|
| 348 |
$html .= "#ftg-" . absint( $this->id . $rid ) . " .tile .caption-block .text-wrapper span.text { font-size:" . absint( $gallery->captionFontSize ) . "px; }\n";
|
| 349 |
+
$html .= "#ftg-" . absint( $this->id . $rid ) . " .tile .caption-outside .text-wrapper span.text { font-size:" . absint( $gallery->captionFontSize ) . "px; }\n";
|
| 350 |
}
|
| 351 |
+
|
| 352 |
+
|
| 353 |
if ( $gallery->titleFontSize ) {
|
| 354 |
$html .= "#ftg-" . absint( $this->id . $rid ) . " .tile .caption-block .text-wrapper span.title { font-size:" . absint( $gallery->titleFontSize ) . "px; }\n";
|
| 355 |
+
$html .= "#ftg-" . absint( $this->id . $rid ) . " .tile .caption-outside .text-wrapper span.title { font-size:" . absint( $gallery->titleFontSize ) . "px; }\n";
|
| 356 |
}
|
| 357 |
+
|
| 358 |
if ( $gallery->backgroundColor ) {
|
| 359 |
$html .= "#ftg-" . absint( $this->id . $rid ) . " .tile { background-color: " . esc_attr( $gallery->backgroundColor ) . "; }\n";
|
| 360 |
}
|
| 362 |
if ( $gallery->captionColor ) {
|
| 363 |
$html .= "#ftg-" . absint( $this->id . $rid ) . " .tile .caption-block .text-wrapper span.text { color: " . esc_attr( $gallery->captionColor ) . "; }\n";
|
| 364 |
$html .= "#ftg-" . absint( $this->id . $rid ) . " .tile .caption-block .text-wrapper span.title { color: " . esc_attr( $gallery->captionColor ) . "; }\n";
|
| 365 |
+
$html .= "#ftg-" . absint( $this->id . $rid ) . " .tile .caption-outside .text-wrapper span.text { color: " . esc_attr( $gallery->captionColor ) . "; }\n";
|
| 366 |
+
$html .= "#ftg-" . absint( $this->id . $rid ) . " .tile .caption-outside .text-wrapper span.title { color: " . esc_attr( $gallery->captionColor ) . "; }\n";
|
| 367 |
}
|
| 368 |
|
| 369 |
if ( $gallery->socialIconColor ) {
|
| 387 |
$html .= "#ftg-" . absint( $this->id . $rid ) . " .tile .tile-inner .caption-block { background-color: rgba({$bgCaption[0]}, {$bgCaption[1]}, {$bgCaption[2]}, " . absint( $gallery->captionOpacity ) / 100 . "); }\n";
|
| 388 |
}
|
| 389 |
if ( $gallery->captionFrame == 'T' && $gallery->captionFrameColor ) {
|
| 390 |
+
$html .= "#ftg-" . absint( $this->id . $rid ) . " .tile .caption-block, #ftg-" . absint( $this->id . $rid ) . " .tile .caption-outside { border-color: " . esc_attr( $gallery->captionFrameColor ) . "; }\n";
|
| 391 |
}
|
| 392 |
$loadedEasing = $gallery->loadedEasing;
|
| 393 |
if ( $gallery->loadedEasing == "ease-out-back" ) {
|
| 434 |
if ( $gallery->captionMobileBehavior == "desktop" ) {
|
| 435 |
$gallery->captionMobileBehavior = $gallery->captionBehavior;
|
| 436 |
}
|
| 437 |
+
$captionBehavior = $gallery->captionBehavior;
|
| 438 |
+
$hover = ( $gallery->captionBehavior == "never" ? "" : "ftg-hover-enabled" );
|
| 439 |
+
|
| 440 |
+
if ( $gallery->captionMobileBehavior && wp_is_mobile() ) {
|
| 441 |
+
if ( 'none' == $gallery->captionMobileBehavior ) {
|
| 442 |
+
$hover = "";
|
| 443 |
+
}
|
| 444 |
+
$captionBehavior = esc_attr( $gallery->captionMobileBehavior );
|
| 445 |
+
}
|
| 446 |
+
|
| 447 |
+
if ( $gallery->captionBehavior != "none" && !ftg_fs()->is_plan_or_trial( 'ultimate' ) ) {
|
| 448 |
$captionBehavior = "none";
|
| 449 |
}
|
| 450 |
$socialClasses = "";
|
| 451 |
if ( $this->hasSocial() ) {
|
| 452 |
$socialClasses .= "social-icons-" . esc_attr( $gallery->socialIconPosition ) . " social-icons-" . esc_attr( $gallery->socialIconStyle );
|
| 453 |
}
|
| 454 |
+
$captionClasses = '';
|
| 455 |
+
if ( isset( $gallery->captionPosition ) ) {
|
| 456 |
+
$captionClasses = 'caption-' . esc_attr( $gallery->captionPosition );
|
| 457 |
+
}
|
| 458 |
$html .= "<a name='{$this->id}'></a>";
|
| 459 |
+
$html .= "<div class='final-tiles-gallery {$socialClasses} {$hover} {$captionClasses} " . (( $gallery->captionFrame == 'T' ? "caption-frame" : "" )) . " caption-{$captionBehavior} caption-" . esc_attr( $gallery->captionVerticalAlignment ) . " caption-" . esc_attr( $gallery->captionHorizontalAlignment ) . "' id='ftg-" . absint( $this->id . $rid ) . "' style='width:" . esc_attr( $gallery->width ) . "'>\n";
|
| 460 |
if ( strlen( $gallery->filters ) ) {
|
| 461 |
}
|
| 462 |
$html .= "<div class='ftg-items'>\n";
|
| 721 |
|
| 722 |
if ( !(empty($image->description) && empty($image->title)) && $this->useCaptions() || $gallery->captionEmpty == "show" || $this->hasCaptionIcon() ) {
|
| 723 |
if ( $this->hasCaptionIcon() ) {
|
| 724 |
+
$html .= "\t<span class='icon fa fa-" . esc_attr( $this->getCaptionIcon() ) . "'></span>\n";
|
| 725 |
}
|
| 726 |
$html .= "<div class='caption-block'>\n";
|
| 727 |
|
| 758 |
$html .= "</a>\n";
|
| 759 |
if ( $gallery->captionPosition == 'outside' ) {
|
| 760 |
|
| 761 |
+
if ( !(empty($image->description) && empty($image->title)) && $this->useCaptions() || $gallery->captionEmpty == "show" || $this->hasCaptionIcon() ) {
|
| 762 |
+
if ( $this->hasCaptionIcon() ) {
|
| 763 |
+
$html .= "\t<span class='icon fa fa-" . $this->getCaptionIcon() . "'></span>\n";
|
| 764 |
+
}
|
| 765 |
+
$html .= "<div class='caption-outside'>\n";
|
| 766 |
|
| 767 |
+
if ( $gallery->source == "images" && $this->useCaptions() ) {
|
| 768 |
+
$html .= "\t<div class='text-wrapper'>\n";
|
| 769 |
+
if ( !empty($image->title) && $gallery->wp_field_title != "none" ) {
|
| 770 |
$html .= "<span class='title'>" . wp_kses_post( $image->title ) . "</span>\n";
|
| 771 |
}
|
| 772 |
+
if ( !empty($image->description) && $gallery->wp_field_caption != "none" ) {
|
| 773 |
$html .= "\t<span class='text'>" . wp_kses_post( $image->description ) . "</span>\n";
|
| 774 |
}
|
| 775 |
+
$html .= "\t</div>\n";
|
| 776 |
}
|
| 777 |
|
|
|
|
|
|
|
|
|
|
| 778 |
|
| 779 |
+
if ( ($gallery->source == "posts" || $gallery->source == "woocommerce") && $this->useCaptions() ) {
|
| 780 |
+
$html .= "\t<div class='text-wrapper'>\n";
|
| 781 |
+
$html .= "\t\t<span class='text'>" . wp_kses_post( $image->description ) . "</span>\n";
|
| 782 |
+
|
| 783 |
+
if ( $gallery->source == "woocommerce" ) {
|
| 784 |
+
$html .= "<div class='woo' data-href='" . get_site_url() . "/cart/?add-to-cart=" . absint( $image->postID ) . "'>";
|
| 785 |
+
$html .= "\t<span class='price'>" . esc_html( $image->price ) . get_woocommerce_currency_symbol() . "</span>\n";
|
| 786 |
+
$html .= "\t<span> <i class='fa fa-shopping-cart add-to-cart'></i></span>";
|
| 787 |
+
$html .= "</div>";
|
| 788 |
+
}
|
| 789 |
+
|
| 790 |
+
$html .= "\t</div>\n";
|
| 791 |
}
|
| 792 |
|
| 793 |
+
$html .= "</div>\n";
|
| 794 |
}
|
| 795 |
|
| 796 |
}
|
readme.txt
CHANGED
|
@@ -2,8 +2,8 @@
|
|
| 2 |
Contributors: wpchill, silkalns, freemius
|
| 3 |
Tags: gallery, grid gallery, best gallery plugin, free gallery, gallery plugin, gallery grid plugin, masonry, photo gallery, image gallery, social gallery, portfolio gallery, lightbox, justified gallery
|
| 4 |
Requires at least: 5.2
|
| 5 |
-
Tested up to: 5.
|
| 6 |
-
Stable tag: 3.
|
| 7 |
License: GPLv2 or later
|
| 8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
| 9 |
|
|
@@ -124,6 +124,12 @@ Currently galleries made with Envira, FooGallery, Instagram, NextGen, JetPack, M
|
|
| 124 |
6. 52 pages documentation
|
| 125 |
|
| 126 |
== Changelog ==
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 127 |
= 3.4.22 =
|
| 128 |
* Update freemius framework.
|
| 129 |
|
| 2 |
Contributors: wpchill, silkalns, freemius
|
| 3 |
Tags: gallery, grid gallery, best gallery plugin, free gallery, gallery plugin, gallery grid plugin, masonry, photo gallery, image gallery, social gallery, portfolio gallery, lightbox, justified gallery
|
| 4 |
Requires at least: 5.2
|
| 5 |
+
Tested up to: 5.5
|
| 6 |
+
Stable tag: 3.5.0
|
| 7 |
License: GPLv2 or later
|
| 8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
| 9 |
|
| 124 |
6. 52 pages documentation
|
| 125 |
|
| 126 |
== Changelog ==
|
| 127 |
+
= 3.5.0 - 17/03/2021 =
|
| 128 |
+
- Fixed: After deleting/cloning a gallery the Gallery page is properly reloading.
|
| 129 |
+
- Fixed: Caption option on mobile.
|
| 130 |
+
- Fixed: Loading bar progress bug.
|
| 131 |
+
- Fixed: Presets for Loading and Hover effects.
|
| 132 |
+
|
| 133 |
= 3.4.22 =
|
| 134 |
* Update freemius framework.
|
| 135 |
|
scripts/ftg.css
CHANGED
|
@@ -25,6 +25,8 @@
|
|
| 25 |
.final-tiles-gallery .loading-bar i {
|
| 26 |
width: 0%;
|
| 27 |
display: block;
|
|
|
|
|
|
|
| 28 |
}
|
| 29 |
.final-tiles-gallery .tile {
|
| 30 |
float: left;
|
|
@@ -37,7 +39,7 @@
|
|
| 37 |
transition-duration: .25s;
|
| 38 |
perspective: 1000px;
|
| 39 |
}
|
| 40 |
-
.final-tiles-gallery .tile.ftg-loaded {
|
| 41 |
opacity: 1;
|
| 42 |
display: block;
|
| 43 |
}
|
|
@@ -150,6 +152,11 @@
|
|
| 150 |
.final-tiles-gallery.caption-frame .tile .caption-block {
|
| 151 |
border:1px solid #fff;
|
| 152 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 153 |
.final-tiles-gallery.caption-frame.caption-middle .tile .caption-block {
|
| 154 |
top:10px;
|
| 155 |
bottom: 10px;
|
|
@@ -279,9 +286,9 @@
|
|
| 279 |
.final-tiles-gallery.effect-speed-fast .tile img { transition-duration: .2s; }
|
| 280 |
.final-tiles-gallery.effect-speed-very-fast .tile img { transition-duration: .1s; }
|
| 281 |
|
| 282 |
-
.final-tiles-gallery.caption-left .tile .caption-block { text-align: left; }
|
| 283 |
-
.final-tiles-gallery.caption-center .tile .caption-block { text-align: center; }
|
| 284 |
-
.final-tiles-gallery.caption-right .tile .caption-block { text-align: right; }
|
| 285 |
|
| 286 |
/* CAPTION TOP */
|
| 287 |
.final-tiles-gallery.caption-top .tile .caption-block {
|
|
@@ -423,8 +430,6 @@
|
|
| 423 |
-ms-transform: translateY(50px);
|
| 424 |
transform: translateY(50px);
|
| 425 |
}
|
| 426 |
-
|
| 427 |
-
/* Premium Code Stripped by Freemius */
|
| 428 |
|
| 429 |
/* EFFECT FRAME */
|
| 430 |
.final-tiles-gallery.effect-frame.ftg-hover-enabled .tile:hover .tile-inner:before {
|
| 25 |
.final-tiles-gallery .loading-bar i {
|
| 26 |
width: 0%;
|
| 27 |
display: block;
|
| 28 |
+
height: 2px;
|
| 29 |
+
transition: all 1s;
|
| 30 |
}
|
| 31 |
.final-tiles-gallery .tile {
|
| 32 |
float: left;
|
| 39 |
transition-duration: .25s;
|
| 40 |
perspective: 1000px;
|
| 41 |
}
|
| 42 |
+
html body .final-tiles-gallery .ftg-items .tile.ftg-loaded {
|
| 43 |
opacity: 1;
|
| 44 |
display: block;
|
| 45 |
}
|
| 152 |
.final-tiles-gallery.caption-frame .tile .caption-block {
|
| 153 |
border:1px solid #fff;
|
| 154 |
}
|
| 155 |
+
.final-tiles-gallery.caption-frame .tile .caption-outside {
|
| 156 |
+
border:1px solid #fff;
|
| 157 |
+
padding: 0 10px;
|
| 158 |
+
margin-top: 3px;
|
| 159 |
+
}
|
| 160 |
.final-tiles-gallery.caption-frame.caption-middle .tile .caption-block {
|
| 161 |
top:10px;
|
| 162 |
bottom: 10px;
|
| 286 |
.final-tiles-gallery.effect-speed-fast .tile img { transition-duration: .2s; }
|
| 287 |
.final-tiles-gallery.effect-speed-very-fast .tile img { transition-duration: .1s; }
|
| 288 |
|
| 289 |
+
.final-tiles-gallery.caption-left .tile .caption-block, .final-tiles-gallery.caption-left .tile .caption-outside { text-align: left; }
|
| 290 |
+
.final-tiles-gallery.caption-center .tile .caption-block, .final-tiles-gallery.caption-center .tile .caption-outside { text-align: center; }
|
| 291 |
+
.final-tiles-gallery.caption-right .tile .caption-block, .final-tiles-gallery.caption-right .tile .caption-outside { text-align: right; }
|
| 292 |
|
| 293 |
/* CAPTION TOP */
|
| 294 |
.final-tiles-gallery.caption-top .tile .caption-block {
|
| 430 |
-ms-transform: translateY(50px);
|
| 431 |
transform: translateY(50px);
|
| 432 |
}
|
|
|
|
|
|
|
| 433 |
|
| 434 |
/* EFFECT FRAME */
|
| 435 |
.final-tiles-gallery.effect-frame.ftg-hover-enabled .tile:hover .tile-inner:before {
|
scripts/jquery.finalTilesGallery.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
| 1 |
function ftg_getURLParameter(name) {
|
| 2 |
return decodeURIComponent((new RegExp('[?|&]' + name + '=' + '([^&;]+?)(&|#|;|$)').exec(location.search)||[,""])[1].replace(/\+/g, '%20'))||null
|
| 3 |
}
|
| 4 |
-
|
| 5 |
//credits James Padolsey http://james.padolsey.com/
|
| 6 |
var qualifyURL = function (url) {
|
| 7 |
var img = document.createElement('img');
|
|
@@ -59,9 +58,7 @@ var qualifyURL = function (url) {
|
|
| 59 |
autoLoadURL: null,
|
| 60 |
selectedFilter: '',
|
| 61 |
loadMethod: 'sequential',
|
| 62 |
-
|
| 63 |
-
/* Premium Code Stripped by Freemius */
|
| 64 |
-
|
| 65 |
onComplete: function () {},
|
| 66 |
onUpdate: function () {},
|
| 67 |
onLoading: function () {},
|
|
@@ -299,9 +296,7 @@ var qualifyURL = function (url) {
|
|
| 299 |
});
|
| 300 |
}
|
| 301 |
|
| 302 |
-
|
| 303 |
-
/* Premium Code Stripped by Freemius */
|
| 304 |
-
|
| 305 |
this.edges.push({ left: 0, top: 0, width: this.currentWidth, index: 0 });
|
| 306 |
|
| 307 |
this.isImageLoading = false;
|
|
@@ -325,9 +320,7 @@ var qualifyURL = function (url) {
|
|
| 325 |
this.$element.find(".ftg-items").height(0).empty();
|
| 326 |
this.refresh();
|
| 327 |
},
|
| 328 |
-
|
| 329 |
-
/* Premium Code Stripped by Freemius */
|
| 330 |
-
|
| 331 |
printEdges: function () {
|
| 332 |
this.$element.find(".edge").remove();
|
| 333 |
for (i = 0; i < this.edges.length; i++) {
|
|
@@ -658,8 +651,6 @@ var qualifyURL = function (url) {
|
|
| 658 |
var t_h = t_w * ratio;
|
| 659 |
var t_h_b = t_w * ratio;
|
| 660 |
|
| 661 |
-
//console.log("tw, th", t_w, t_h);
|
| 662 |
-
|
| 663 |
if(this.currentGridSize) {
|
| 664 |
var n = Math.floor(t_h / this.currentGridSize);
|
| 665 |
if(n > 0) {
|
|
@@ -693,15 +684,13 @@ var qualifyURL = function (url) {
|
|
| 693 |
top: 0 - (hdiff / 2)
|
| 694 |
});
|
| 695 |
}
|
| 696 |
-
|
| 697 |
var transition = $t.css('transition');
|
| 698 |
-
$
|
| 699 |
-
|
| 700 |
-
|
| 701 |
-
|
| 702 |
-
|
| 703 |
});
|
| 704 |
-
$t.addClass("ftg-loaded");
|
| 705 |
|
| 706 |
this.columns[slot.col].push(slot.top + t_h + this.settings.margin);
|
| 707 |
|
|
@@ -710,14 +699,18 @@ var qualifyURL = function (url) {
|
|
| 710 |
});
|
| 711 |
},
|
| 712 |
add_to_final: function (tileIndex) {
|
|
|
|
|
|
|
|
|
|
|
|
|
| 713 |
var $t = this.tiles.eq(tileIndex);
|
| 714 |
|
| 715 |
var $item = $t.find('.item');
|
| 716 |
var key = "tile" + tileIndex;
|
|
|
|
| 717 |
var w = this.imagesData[key].width;
|
| 718 |
var h = this.imagesData[key].height;
|
| 719 |
|
| 720 |
-
|
| 721 |
var hEdge = this.higherEdge();
|
| 722 |
this.print(hEdge);
|
| 723 |
hEdge.tileIndex = tileIndex;
|
|
@@ -728,6 +721,9 @@ var qualifyURL = function (url) {
|
|
| 728 |
if (hEdge.top > 0) {
|
| 729 |
hEdge.top += this.settings.margin;
|
| 730 |
}
|
|
|
|
|
|
|
|
|
|
| 731 |
|
| 732 |
$t.css({
|
| 733 |
left: hEdge.left,
|
|
@@ -844,21 +840,16 @@ var qualifyURL = function (url) {
|
|
| 844 |
this.print(w + "x" + h);
|
| 845 |
this.print("----");
|
| 846 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 847 |
$t.css({
|
| 848 |
width: w,
|
| 849 |
height: h
|
| 850 |
});
|
| 851 |
-
|
| 852 |
var transition = $t.css('transition');
|
| 853 |
-
$t.css({
|
| 854 |
-
display: 'block',
|
| 855 |
-
//opacity: 1,
|
| 856 |
-
transform: 'scale(1)'
|
| 857 |
-
//transition: 'none'
|
| 858 |
-
});
|
| 859 |
-
|
| 860 |
var ratio = w / this.imagesData[key].width;
|
| 861 |
-
|
| 862 |
var hdiff = (this.imagesData[key].height * ratio) - h;
|
| 863 |
|
| 864 |
if ($t.data("ftg-type") != "iframe")
|
|
@@ -869,6 +860,15 @@ var qualifyURL = function (url) {
|
|
| 869 |
top: 0 - (hdiff / 2)
|
| 870 |
});
|
| 871 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 872 |
$t.addClass("ftg-loaded");
|
| 873 |
}
|
| 874 |
});
|
|
@@ -884,11 +884,15 @@ var qualifyURL = function (url) {
|
|
| 884 |
return this;
|
| 885 |
};
|
| 886 |
|
| 887 |
-
$(function
|
| 888 |
-
|
| 889 |
-
|
|
|
|
|
|
|
| 890 |
|
| 891 |
-
|
|
|
|
|
|
|
| 892 |
|
| 893 |
e.preventDefault();
|
| 894 |
var social = $(this).data("social");
|
| 1 |
function ftg_getURLParameter(name) {
|
| 2 |
return decodeURIComponent((new RegExp('[?|&]' + name + '=' + '([^&;]+?)(&|#|;|$)').exec(location.search)||[,""])[1].replace(/\+/g, '%20'))||null
|
| 3 |
}
|
|
|
|
| 4 |
//credits James Padolsey http://james.padolsey.com/
|
| 5 |
var qualifyURL = function (url) {
|
| 6 |
var img = document.createElement('img');
|
| 58 |
autoLoadURL: null,
|
| 59 |
selectedFilter: '',
|
| 60 |
loadMethod: 'sequential',
|
| 61 |
+
|
|
|
|
|
|
|
| 62 |
onComplete: function () {},
|
| 63 |
onUpdate: function () {},
|
| 64 |
onLoading: function () {},
|
| 296 |
});
|
| 297 |
}
|
| 298 |
|
| 299 |
+
|
|
|
|
|
|
|
| 300 |
this.edges.push({ left: 0, top: 0, width: this.currentWidth, index: 0 });
|
| 301 |
|
| 302 |
this.isImageLoading = false;
|
| 320 |
this.$element.find(".ftg-items").height(0).empty();
|
| 321 |
this.refresh();
|
| 322 |
},
|
| 323 |
+
|
|
|
|
|
|
|
| 324 |
printEdges: function () {
|
| 325 |
this.$element.find(".edge").remove();
|
| 326 |
for (i = 0; i < this.edges.length; i++) {
|
| 651 |
var t_h = t_w * ratio;
|
| 652 |
var t_h_b = t_w * ratio;
|
| 653 |
|
|
|
|
|
|
|
| 654 |
if(this.currentGridSize) {
|
| 655 |
var n = Math.floor(t_h / this.currentGridSize);
|
| 656 |
if(n > 0) {
|
| 684 |
top: 0 - (hdiff / 2)
|
| 685 |
});
|
| 686 |
}
|
|
|
|
| 687 |
var transition = $t.css('transition');
|
| 688 |
+
$(window).on('load', function(){
|
| 689 |
+
$t.css({
|
| 690 |
+
display: 'block',
|
| 691 |
+
transform: 'scale(1)'
|
| 692 |
+
});
|
| 693 |
});
|
|
|
|
| 694 |
|
| 695 |
this.columns[slot.col].push(slot.top + t_h + this.settings.margin);
|
| 696 |
|
| 699 |
});
|
| 700 |
},
|
| 701 |
add_to_final: function (tileIndex) {
|
| 702 |
+
var outside = false;
|
| 703 |
+
if ($('.final-tiles-gallery').hasClass('caption-outside')) {
|
| 704 |
+
outside = true;
|
| 705 |
+
}
|
| 706 |
var $t = this.tiles.eq(tileIndex);
|
| 707 |
|
| 708 |
var $item = $t.find('.item');
|
| 709 |
var key = "tile" + tileIndex;
|
| 710 |
+
|
| 711 |
var w = this.imagesData[key].width;
|
| 712 |
var h = this.imagesData[key].height;
|
| 713 |
|
|
|
|
| 714 |
var hEdge = this.higherEdge();
|
| 715 |
this.print(hEdge);
|
| 716 |
hEdge.tileIndex = tileIndex;
|
| 721 |
if (hEdge.top > 0) {
|
| 722 |
hEdge.top += this.settings.margin;
|
| 723 |
}
|
| 724 |
+
if (outside === true) {
|
| 725 |
+
h += 30;
|
| 726 |
+
}
|
| 727 |
|
| 728 |
$t.css({
|
| 729 |
left: hEdge.left,
|
| 840 |
this.print(w + "x" + h);
|
| 841 |
this.print("----");
|
| 842 |
|
| 843 |
+
if (outside === true) {
|
| 844 |
+
h += 30;
|
| 845 |
+
}
|
| 846 |
+
|
| 847 |
$t.css({
|
| 848 |
width: w,
|
| 849 |
height: h
|
| 850 |
});
|
|
|
|
| 851 |
var transition = $t.css('transition');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 852 |
var ratio = w / this.imagesData[key].width;
|
|
|
|
| 853 |
var hdiff = (this.imagesData[key].height * ratio) - h;
|
| 854 |
|
| 855 |
if ($t.data("ftg-type") != "iframe")
|
| 860 |
top: 0 - (hdiff / 2)
|
| 861 |
});
|
| 862 |
}
|
| 863 |
+
|
| 864 |
+
// Set a minor timeout so that the function won't be triggered right away
|
| 865 |
+
setTimeout( function () {
|
| 866 |
+
$t.css( {
|
| 867 |
+
display : 'block',
|
| 868 |
+
transform: 'scale(1)'
|
| 869 |
+
} );
|
| 870 |
+
}, 1 );
|
| 871 |
+
|
| 872 |
$t.addClass("ftg-loaded");
|
| 873 |
}
|
| 874 |
});
|
| 884 |
return this;
|
| 885 |
};
|
| 886 |
|
| 887 |
+
$(window).on('loadl', function(){
|
| 888 |
+
$('.loading-bar i').css({
|
| 889 |
+
width: '100%'
|
| 890 |
+
});
|
| 891 |
+
});
|
| 892 |
|
| 893 |
+
$(function () {
|
| 894 |
+
|
| 895 |
+
$(".ftg-social a").on( 'click', function(e) {
|
| 896 |
|
| 897 |
e.preventDefault();
|
| 898 |
var social = $(this).data("social");
|
