Version Description
Download this release
Release Info
| Developer | GreenTreeLabs |
| Plugin | |
| Version | 3.3.26 |
| Comparing to | |
| See all releases | |
Code changes from version 3.3.24 to 3.3.26
- FinalTilesGalleryLite.php +16 -9
- admin/add-gallery.php +1 -2
- admin/css/style.css +8 -1
- admin/header.php +2 -2
- admin/include/edit-gallery.php +93 -95
- admin/include/fields.php +3 -1
- admin/scripts/final-tiles-gallery-admin.js +26 -64
- lib/db-class.php +3 -3
- lib/gallery-class.php +59 -3
- lightbox/lightbox2/css/style.css +1 -203
- lightbox/lightbox2/js/script.js +12 -1
- readme.txt +4 -0
- scripts/ftg.css +53 -12
- scripts/jquery.finalTilesGallery.js +144 -17
FinalTilesGalleryLite.php
CHANGED
|
@@ -5,15 +5,19 @@
|
|
| 5 |
* Plugin URI: https://www.final-tiles-gallery.com
|
| 6 |
* Description: Wordpress Plugin for creating responsive image galleries. By: GreenTreeLabs
|
| 7 |
* Author: Green Tree Labs
|
| 8 |
-
* Version: 3.3.
|
| 9 |
* Author URI: https://www.greentreelabs.net
|
| 10 |
*
|
| 11 |
* @fs_premium_only /lightbox-pro/
|
| 12 |
*
|
| 13 |
*/
|
| 14 |
-
define( "FTGVERSION", "3.3.
|
| 15 |
/*
|
| 16 |
Changelog:
|
|
|
|
|
|
|
|
|
|
|
|
|
| 17 |
3.3.24
|
| 18 |
Fixed missing captions on mobile
|
| 19 |
3.3.23
|
|
@@ -271,7 +275,7 @@ if ( !function_exists( 'ftg_fs' ) ) {
|
|
| 271 |
'menu' => array(
|
| 272 |
'slug' => 'ftg-lite-gallery-admin',
|
| 273 |
'contact' => false,
|
| 274 |
-
'support' =>
|
| 275 |
),
|
| 276 |
'is_live' => true,
|
| 277 |
) );
|
|
@@ -285,6 +289,7 @@ if ( !function_exists( 'ftg_fs' ) ) {
|
|
| 285 |
ftg_fs();
|
| 286 |
// Signal that SDK was initiated.
|
| 287 |
do_action( 'ftg_fs_loaded' );
|
|
|
|
| 288 |
if ( !class_exists( 'FinalTiles_Gallery' ) ) {
|
| 289 |
class FinalTiles_Gallery
|
| 290 |
{
|
|
@@ -302,6 +307,7 @@ if ( !class_exists( 'FinalTiles_Gallery' ) ) {
|
|
| 302 |
'captionBackgroundColor' => '#000000',
|
| 303 |
'captionBehavior' => 'none',
|
| 304 |
'captionColor' => '#ffffff',
|
|
|
|
| 305 |
'captionEasing' => 'linear',
|
| 306 |
'captionEffect' => 'slide-from-bottom',
|
| 307 |
'captionEffectDuration' => 250,
|
|
@@ -368,6 +374,7 @@ if ( !class_exists( 'FinalTiles_Gallery' ) ) {
|
|
| 368 |
'minTileWidth' => '250',
|
| 369 |
'mobileLightbox' => 'lightbox',
|
| 370 |
'post_types' => '',
|
|
|
|
| 371 |
'recentPostsCaption' => 'title',
|
| 372 |
'recentPostsCaptionAutoExcerptLength' => 20,
|
| 373 |
'rel' => '',
|
|
@@ -382,6 +389,7 @@ if ( !class_exists( 'FinalTiles_Gallery' ) ) {
|
|
| 382 |
'style' => '',
|
| 383 |
'support' => 'F',
|
| 384 |
'supportText' => 'Powered by Final Tiles Grid Gallery',
|
|
|
|
| 385 |
'tilesPerPage' => 0,
|
| 386 |
'titleFontSize' => 14,
|
| 387 |
'width' => '100%',
|
|
@@ -847,8 +855,6 @@ if ( !class_exists( 'FinalTiles_Gallery' ) ) {
|
|
| 847 |
wp_enqueue_style( 'wp-color-picker' );
|
| 848 |
wp_enqueue_script( 'media-upload' );
|
| 849 |
wp_enqueue_script( 'thickbox' );
|
| 850 |
-
//wp_register_script('futurico', plugins_url().'/final-tiles-grid-gallery-lite/admin/scripts/SCF.ui.js', array('jquery', 'chosen'));
|
| 851 |
-
//wp_enqueue_script('futurico');
|
| 852 |
wp_register_style( 'google-fonts', '//fonts.googleapis.com/css?family=Roboto:400,700,500,300,900' );
|
| 853 |
wp_enqueue_style( 'google-fonts' );
|
| 854 |
wp_register_style( 'google-icons', '//cdn.materialdesignicons.com/1.9.32/css/materialdesignicons.min.css', array() );
|
|
@@ -878,7 +884,7 @@ if ( !class_exists( 'FinalTiles_Gallery' ) ) {
|
|
| 878 |
'edit_posts',
|
| 879 |
'ftg-lite-gallery-admin',
|
| 880 |
array( $this, 'add_overview' ),
|
| 881 |
-
plugins_url(
|
| 882 |
);
|
| 883 |
$add_gallery = add_submenu_page(
|
| 884 |
'ftg-lite-gallery-admin',
|
|
@@ -1268,8 +1274,7 @@ if ( !class_exists( 'FinalTiles_Gallery' ) ) {
|
|
| 1268 |
$data["wp_field_caption"] = $_POST['ftg_wp_field_caption'];
|
| 1269 |
$data["wp_field_title"] = $_POST['ftg_wp_field_title'];
|
| 1270 |
$data["captionEffect"] = $_POST['ftg_captionEffect'];
|
| 1271 |
-
$data["
|
| 1272 |
-
$data["post_tags"] = $_POST["post_tags"];
|
| 1273 |
$data["layout"] = $_POST["layout"];
|
| 1274 |
$data["defaultWooImageSize"] = $_POST['def_imgsize'];
|
| 1275 |
$data["defaultPostImageSize"] = $_POST['def_imgsize'];
|
|
@@ -1385,6 +1390,7 @@ if ( !class_exists( 'FinalTiles_Gallery' ) ) {
|
|
| 1385 |
'captionEmpty' => $captionEmpty,
|
| 1386 |
'captionBackgroundColor' => $captionBackgroundColor,
|
| 1387 |
'captionColor' => $captionColor,
|
|
|
|
| 1388 |
'captionFrameColor' => $_POST['ftg_captionFrameColor'],
|
| 1389 |
'captionEffectDuration' => $captionEffectDuration,
|
| 1390 |
'captionEasing' => $captionEasing,
|
|
@@ -1429,7 +1435,8 @@ if ( !class_exists( 'FinalTiles_Gallery' ) ) {
|
|
| 1429 |
'shadowColor' => $shadowColor,
|
| 1430 |
'source' => $_POST['ftg_source'],
|
| 1431 |
'post_types' => $_POST['ftg_post_types'],
|
| 1432 |
-
'
|
|
|
|
| 1433 |
'post_tags' => $_POST['ftg_post_tags'],
|
| 1434 |
'tilesPerPage' => intval( $_POST['ftg_tilesPerPage'] ),
|
| 1435 |
'woo_categories' => ( isset( $_POST['ftg_woo_categories'] ) ? $_POST['ftg_woo_categories'] : '' ),
|
| 5 |
* Plugin URI: https://www.final-tiles-gallery.com
|
| 6 |
* Description: Wordpress Plugin for creating responsive image galleries. By: GreenTreeLabs
|
| 7 |
* Author: Green Tree Labs
|
| 8 |
+
* Version: 3.3.26
|
| 9 |
* Author URI: https://www.greentreelabs.net
|
| 10 |
*
|
| 11 |
* @fs_premium_only /lightbox-pro/
|
| 12 |
*
|
| 13 |
*/
|
| 14 |
+
define( "FTGVERSION", "3.3.26" );
|
| 15 |
/*
|
| 16 |
Changelog:
|
| 17 |
+
3.3.26
|
| 18 |
+
New feature: use custom fields as captions
|
| 19 |
+
3.3.25
|
| 20 |
+
Fixed recent posts galleries
|
| 21 |
3.3.24
|
| 22 |
Fixed missing captions on mobile
|
| 23 |
3.3.23
|
| 275 |
'menu' => array(
|
| 276 |
'slug' => 'ftg-lite-gallery-admin',
|
| 277 |
'contact' => false,
|
| 278 |
+
'support' => true,
|
| 279 |
),
|
| 280 |
'is_live' => true,
|
| 281 |
) );
|
| 289 |
ftg_fs();
|
| 290 |
// Signal that SDK was initiated.
|
| 291 |
do_action( 'ftg_fs_loaded' );
|
| 292 |
+
define( "FTG_PLAN", "free" );
|
| 293 |
if ( !class_exists( 'FinalTiles_Gallery' ) ) {
|
| 294 |
class FinalTiles_Gallery
|
| 295 |
{
|
| 307 |
'captionBackgroundColor' => '#000000',
|
| 308 |
'captionBehavior' => 'none',
|
| 309 |
'captionColor' => '#ffffff',
|
| 310 |
+
'captionCustomFields' => '',
|
| 311 |
'captionEasing' => 'linear',
|
| 312 |
'captionEffect' => 'slide-from-bottom',
|
| 313 |
'captionEffectDuration' => 250,
|
| 374 |
'minTileWidth' => '250',
|
| 375 |
'mobileLightbox' => 'lightbox',
|
| 376 |
'post_types' => '',
|
| 377 |
+
'post_taxonomies' => '',
|
| 378 |
'recentPostsCaption' => 'title',
|
| 379 |
'recentPostsCaptionAutoExcerptLength' => 20,
|
| 380 |
'rel' => '',
|
| 389 |
'style' => '',
|
| 390 |
'support' => 'F',
|
| 391 |
'supportText' => 'Powered by Final Tiles Grid Gallery',
|
| 392 |
+
'taxonomyOperator' => 'OR',
|
| 393 |
'tilesPerPage' => 0,
|
| 394 |
'titleFontSize' => 14,
|
| 395 |
'width' => '100%',
|
| 855 |
wp_enqueue_style( 'wp-color-picker' );
|
| 856 |
wp_enqueue_script( 'media-upload' );
|
| 857 |
wp_enqueue_script( 'thickbox' );
|
|
|
|
|
|
|
| 858 |
wp_register_style( 'google-fonts', '//fonts.googleapis.com/css?family=Roboto:400,700,500,300,900' );
|
| 859 |
wp_enqueue_style( 'google-fonts' );
|
| 860 |
wp_register_style( 'google-icons', '//cdn.materialdesignicons.com/1.9.32/css/materialdesignicons.min.css', array() );
|
| 884 |
'edit_posts',
|
| 885 |
'ftg-lite-gallery-admin',
|
| 886 |
array( $this, 'add_overview' ),
|
| 887 |
+
plugins_url( 'admin/icon.png', __FILE__ )
|
| 888 |
);
|
| 889 |
$add_gallery = add_submenu_page(
|
| 890 |
'ftg-lite-gallery-admin',
|
| 1274 |
$data["wp_field_caption"] = $_POST['ftg_wp_field_caption'];
|
| 1275 |
$data["wp_field_title"] = $_POST['ftg_wp_field_title'];
|
| 1276 |
$data["captionEffect"] = $_POST['ftg_captionEffect'];
|
| 1277 |
+
$data["post_types"] = $_POST["post_types"];
|
|
|
|
| 1278 |
$data["layout"] = $_POST["layout"];
|
| 1279 |
$data["defaultWooImageSize"] = $_POST['def_imgsize'];
|
| 1280 |
$data["defaultPostImageSize"] = $_POST['def_imgsize'];
|
| 1390 |
'captionEmpty' => $captionEmpty,
|
| 1391 |
'captionBackgroundColor' => $captionBackgroundColor,
|
| 1392 |
'captionColor' => $captionColor,
|
| 1393 |
+
'captionCustomFields' => $_POST['ftg_captionCustomFields'],
|
| 1394 |
'captionFrameColor' => $_POST['ftg_captionFrameColor'],
|
| 1395 |
'captionEffectDuration' => $captionEffectDuration,
|
| 1396 |
'captionEasing' => $captionEasing,
|
| 1435 |
'shadowColor' => $shadowColor,
|
| 1436 |
'source' => $_POST['ftg_source'],
|
| 1437 |
'post_types' => $_POST['ftg_post_types'],
|
| 1438 |
+
'post_taxonomies' => $_POST['ftg_post_taxonomies'],
|
| 1439 |
+
'taxonomyOperator' => $_POST['ftg_taxonomyOperator'],
|
| 1440 |
'post_tags' => $_POST['ftg_post_tags'],
|
| 1441 |
'tilesPerPage' => intval( $_POST['ftg_tilesPerPage'] ),
|
| 1442 |
'woo_categories' => ( isset( $_POST['ftg_woo_categories'] ) ? $_POST['ftg_woo_categories'] : '' ),
|
admin/add-gallery.php
CHANGED
|
@@ -26,8 +26,7 @@ wp_nonce_field( 'FinalTiles_gallery', 'FinalTiles_gallery' );
|
|
| 26 |
?>
|
| 27 |
<input type="hidden" name="action" value="add_new_gallery" />
|
| 28 |
<input type="hidden" name="enc_images" value="" />
|
| 29 |
-
<input type="hidden" name="
|
| 30 |
-
<input type="hidden" name="post_tags" value="" />
|
| 31 |
<input type="hidden" name="woo_categories" value="" />
|
| 32 |
<input type="hidden" name="gridSize" value="5" />
|
| 33 |
<fieldset data-step="1">
|
| 26 |
?>
|
| 27 |
<input type="hidden" name="action" value="add_new_gallery" />
|
| 28 |
<input type="hidden" name="enc_images" value="" />
|
| 29 |
+
<input type="hidden" name="post_types" value="" />
|
|
|
|
| 30 |
<input type="hidden" name="woo_categories" value="" />
|
| 31 |
<input type="hidden" name="gridSize" value="5" />
|
| 32 |
<fieldset data-step="1">
|
admin/css/style.css
CHANGED
|
@@ -541,7 +541,14 @@
|
|
| 541 |
font-weight: bold;
|
| 542 |
cursor: default;
|
| 543 |
display: block;
|
| 544 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 545 |
}
|
| 546 |
#images .actions label span {
|
| 547 |
font-weight: normal;
|
| 541 |
font-weight: bold;
|
| 542 |
cursor: default;
|
| 543 |
display: block;
|
| 544 |
+
}
|
| 545 |
+
#images span.tax-item {
|
| 546 |
+
display: inline-block;
|
| 547 |
+
background: #fff;
|
| 548 |
+
padding: 5px;
|
| 549 |
+
margin: 0 10px 10px 0;
|
| 550 |
+
border-radius: 4px;
|
| 551 |
+
border: 1px solid #ccc;
|
| 552 |
}
|
| 553 |
#images .actions label span {
|
| 554 |
font-weight: normal;
|
admin/header.php
CHANGED
|
@@ -4,8 +4,8 @@
|
|
| 4 |
|
| 5 |
?>
|
| 6 |
<header id="top">
|
| 7 |
-
|
| 8 |
-
|
| 9 |
</header>
|
| 10 |
<?php
|
| 11 |
if ( ftg_fs()->is_not_paying() ) {
|
| 4 |
|
| 5 |
?>
|
| 6 |
<header id="top">
|
| 7 |
+
<h1 class="header center-on-small-only">Final Tiles Grid Gallery <small><?php print FTGVERSION ?> <?php print FTG_PLAN ?></small></h1>
|
| 8 |
+
<h4 class="center-on-small-only"><?php print $ftg_subtitle ?></h4>
|
| 9 |
</header>
|
| 10 |
<?php
|
| 11 |
if ( ftg_fs()->is_not_paying() ) {
|
admin/include/edit-gallery.php
CHANGED
|
@@ -665,6 +665,17 @@ _e( 'How to get a better grid? Watch the', 'final-tiles-gallery' );
|
|
| 665 |
_e( 'video tutorial', 'final-tiles-gallery' );
|
| 666 |
?></a>.
|
| 667 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 668 |
<div class="row checkboxes">
|
| 669 |
<strong class="label"><?php
|
| 670 |
_e( 'Post type:', 'final-tiles-gallery' );
|
|
@@ -676,10 +687,11 @@ $idx = 0;
|
|
| 676 |
<?php
|
| 677 |
foreach ( get_post_types( '', 'names' ) as $t ) {
|
| 678 |
?>
|
| 679 |
-
|
| 680 |
|
| 681 |
if ( !in_array( $t, $excluded_post_types ) ) {
|
| 682 |
?>
|
|
|
|
| 683 |
<input id="post-type-<?php
|
| 684 |
_e( $idx );
|
| 685 |
?>" type="checkbox" name="post_types" value="<?php
|
|
@@ -690,10 +702,11 @@ foreach ( get_post_types( '', 'names' ) as $t ) {
|
|
| 690 |
?>"><?php
|
| 691 |
_e( $t );
|
| 692 |
?></label>
|
| 693 |
-
|
|
|
|
| 694 |
$idx++;
|
| 695 |
?>
|
| 696 |
-
|
| 697 |
}
|
| 698 |
|
| 699 |
?>
|
|
@@ -705,85 +718,75 @@ _e( $gallery->post_types );
|
|
| 705 |
?>" />
|
| 706 |
</span>
|
| 707 |
</div>
|
| 708 |
-
|
| 709 |
-
|
| 710 |
-
_e( 'Categories:', 'final-tiles-gallery' );
|
| 711 |
-
?></strong>
|
| 712 |
-
<span>
|
| 713 |
-
<?php
|
| 714 |
-
$idx = 0;
|
| 715 |
-
?>
|
| 716 |
-
<?php
|
| 717 |
-
foreach ( get_categories() as $c ) {
|
| 718 |
-
?>
|
| 719 |
-
<input id="post-cat-<?php
|
| 720 |
-
_e( $idx );
|
| 721 |
-
?>" type="checkbox" name="post_categories" value="<?php
|
| 722 |
-
_e( $c->cat_ID );
|
| 723 |
-
?>">
|
| 724 |
-
<label for="post-cat-<?php
|
| 725 |
-
_e( $idx );
|
| 726 |
-
?>"><?php
|
| 727 |
-
_e( $c->name );
|
| 728 |
-
?></label>
|
| 729 |
-
<?php
|
| 730 |
-
$idx++;
|
| 731 |
-
?>
|
| 732 |
-
<?php
|
| 733 |
-
}
|
| 734 |
-
?>
|
| 735 |
-
<input type="hidden" name="ftg_post_categories" value="<?php
|
| 736 |
-
_e( $gallery->post_categories );
|
| 737 |
-
?>" />
|
| 738 |
-
</span>
|
| 739 |
-
</div>
|
| 740 |
-
<div class="row checkboxes">
|
| 741 |
-
<strong class="label"><?php
|
| 742 |
-
_e( 'Tags:', 'final-tiles-gallery' );
|
| 743 |
-
?></strong>
|
| 744 |
-
<span>
|
| 745 |
-
<?php
|
| 746 |
-
$tags = get_tags();
|
| 747 |
-
?>
|
| 748 |
-
<?php
|
| 749 |
-
$idx = 0;
|
| 750 |
-
?>
|
| 751 |
-
<?php
|
| 752 |
-
foreach ( $tags as $c ) {
|
| 753 |
-
?>
|
| 754 |
-
|
| 755 |
-
<input id="post-tag-<?php
|
| 756 |
-
_e( $idx );
|
| 757 |
-
?>" type="checkbox" name="post_tags" value="<?php
|
| 758 |
-
_e( $c->term_id );
|
| 759 |
-
?>">
|
| 760 |
-
<label for="post-tag-<?php
|
| 761 |
-
_e( $idx );
|
| 762 |
-
?>"><?php
|
| 763 |
-
_e( $c->name );
|
| 764 |
-
?></label>
|
| 765 |
-
<?php
|
| 766 |
-
$idx++;
|
| 767 |
-
?>
|
| 768 |
-
<?php
|
| 769 |
-
}
|
| 770 |
?>
|
| 771 |
-
|
| 772 |
-
|
| 773 |
-
if ( count( $tags ) == 0 ) {
|
| 774 |
?>
|
| 775 |
-
|
| 776 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 777 |
?>
|
| 778 |
-
|
| 779 |
}
|
| 780 |
-
|
| 781 |
-
|
| 782 |
-
|
| 783 |
-
|
| 784 |
-
?>" />
|
| 785 |
-
</span>
|
| 786 |
-
</div>
|
| 787 |
<div class="row checkboxes">
|
| 788 |
<strong class="label"><?php
|
| 789 |
_e( 'Max posts:', 'final-tiles-gallery' );
|
|
@@ -843,9 +846,10 @@ if ( in_array( 'woocommerce/woocommerce.php', apply_filters( 'active_plugins', g
|
|
| 843 |
_e( 'video tutorial', 'final-tiles-gallery' );
|
| 844 |
?></a>.
|
| 845 |
</div>
|
|
|
|
| 846 |
<div class="row checkboxes">
|
| 847 |
<strong class="label"><?php
|
| 848 |
-
|
| 849 |
?></strong>
|
| 850 |
<span>
|
| 851 |
<?php
|
|
@@ -853,11 +857,12 @@ if ( in_array( 'woocommerce/woocommerce.php', apply_filters( 'active_plugins', g
|
|
| 853 |
?>
|
| 854 |
<?php
|
| 855 |
foreach ( $woo_categories as $c ) {
|
|
|
|
| 856 |
?>
|
| 857 |
<input id="woo-cat-<?php
|
| 858 |
_e( $idx );
|
| 859 |
?>" type="checkbox" name="woo_cat" value="<?php
|
| 860 |
-
_e( $c->
|
| 861 |
?>">
|
| 862 |
<label for="woo-cat-<?php
|
| 863 |
_e( $idx );
|
|
@@ -880,7 +885,7 @@ if ( in_array( 'woocommerce/woocommerce.php', apply_filters( 'active_plugins', g
|
|
| 880 |
}
|
| 881 |
|
| 882 |
?>
|
| 883 |
-
</div>
|
| 884 |
<div class="actions">
|
| 885 |
<div class="bulk row">
|
| 886 |
<label><?php
|
|
@@ -1177,27 +1182,20 @@ ftg_p( $gallery, "wp_field_caption" );
|
|
| 1177 |
|
| 1178 |
var post_types = $("[name=ftg_post_types]").val().split(',');
|
| 1179 |
$.each(post_types, function () {
|
| 1180 |
-
if(this.length)
|
| 1181 |
$("[name=post_types][value="+ this +"]").get(0).checked = true;
|
| 1182 |
});
|
| 1183 |
|
| 1184 |
-
var
|
| 1185 |
-
$.each(
|
| 1186 |
-
if(this.length) {
|
| 1187 |
-
var el = $("[name=post_categories][value="+ this +"]");
|
| 1188 |
-
if(el.length)
|
| 1189 |
-
el.get(0).checked = true;
|
| 1190 |
-
}
|
| 1191 |
-
});
|
| 1192 |
-
|
| 1193 |
-
var post_tags = $("[name=ftg_post_tags]").val().split(',');
|
| 1194 |
-
$.each(post_tags, function () {
|
| 1195 |
if(this.length) {
|
| 1196 |
-
var
|
|
|
|
|
|
|
| 1197 |
if(el.length)
|
| 1198 |
el.get(0).checked = true;
|
| 1199 |
}
|
| 1200 |
-
});
|
| 1201 |
|
| 1202 |
var woo_categories = [];
|
| 1203 |
if($("[name=ftg_woo_categories]").val())
|
| 665 |
_e( 'video tutorial', 'final-tiles-gallery' );
|
| 666 |
?></a>.
|
| 667 |
</div>
|
| 668 |
+
<div class="row">
|
| 669 |
+
<label>Taxonomy operator</label>
|
| 670 |
+
<select name="ftg_taxonomyOperator" class="browser-default js-ajax-loading-control">
|
| 671 |
+
<option <?php
|
| 672 |
+
ftg_sel( $gallery, "taxonomyOperator", "OR" );
|
| 673 |
+
?> value="OR">OR: all posts matching 1 ore more selected taxonomies</option>
|
| 674 |
+
<option <?php
|
| 675 |
+
ftg_sel( $gallery, "taxonomyOperator", "AND" );
|
| 676 |
+
?> value="AND">AND: all posts matching all the selected taxonomies</option>
|
| 677 |
+
</select>
|
| 678 |
+
</div>
|
| 679 |
<div class="row checkboxes">
|
| 680 |
<strong class="label"><?php
|
| 681 |
_e( 'Post type:', 'final-tiles-gallery' );
|
| 687 |
<?php
|
| 688 |
foreach ( get_post_types( '', 'names' ) as $t ) {
|
| 689 |
?>
|
| 690 |
+
<?php
|
| 691 |
|
| 692 |
if ( !in_array( $t, $excluded_post_types ) ) {
|
| 693 |
?>
|
| 694 |
+
<span class="tax-item">
|
| 695 |
<input id="post-type-<?php
|
| 696 |
_e( $idx );
|
| 697 |
?>" type="checkbox" name="post_types" value="<?php
|
| 702 |
?>"><?php
|
| 703 |
_e( $t );
|
| 704 |
?></label>
|
| 705 |
+
</span>
|
| 706 |
+
<?php
|
| 707 |
$idx++;
|
| 708 |
?>
|
| 709 |
+
<?php
|
| 710 |
}
|
| 711 |
|
| 712 |
?>
|
| 718 |
?>" />
|
| 719 |
</span>
|
| 720 |
</div>
|
| 721 |
+
<?php
|
| 722 |
+
//print_r(get_taxonomies(array(), "objects")); exit();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 723 |
?>
|
| 724 |
+
<?php
|
| 725 |
+
foreach ( get_taxonomies( array(), "objects" ) as $taxonomy => $t ) {
|
|
|
|
| 726 |
?>
|
| 727 |
+
<?php
|
| 728 |
+
|
| 729 |
+
if ( $t->publicly_queryable ) {
|
| 730 |
+
?>
|
| 731 |
+
<?php
|
| 732 |
+
$items = get_terms( $taxonomy, array(
|
| 733 |
+
"hide_empty" => false,
|
| 734 |
+
) );
|
| 735 |
+
?>
|
| 736 |
+
<?php
|
| 737 |
+
|
| 738 |
+
if ( count( $items ) > 0 ) {
|
| 739 |
+
?>
|
| 740 |
+
<?php
|
| 741 |
+
//print_r($items);
|
| 742 |
+
?>
|
| 743 |
+
<div class="row checkboxes">
|
| 744 |
+
<strong class="label"><?php
|
| 745 |
+
echo $t->label ;
|
| 746 |
+
?></strong>
|
| 747 |
+
<span>
|
| 748 |
+
<?php
|
| 749 |
+
$idx = 0;
|
| 750 |
+
?>
|
| 751 |
+
<?php
|
| 752 |
+
foreach ( $items as $c ) {
|
| 753 |
+
?>
|
| 754 |
+
<span class="tax-item">
|
| 755 |
+
<input id="post-tax-<?php
|
| 756 |
+
_e( $c->term_id );
|
| 757 |
+
?>" type="checkbox" name="post_taxonomy" data-taxonomy="<?php
|
| 758 |
+
_e( $t->name );
|
| 759 |
+
?>" value="<?php
|
| 760 |
+
_e( $c->term_id );
|
| 761 |
+
?>">
|
| 762 |
+
<label for="post-tax-<?php
|
| 763 |
+
_e( $c->term_id );
|
| 764 |
+
?>"><?php
|
| 765 |
+
_e( $c->name );
|
| 766 |
+
?></label>
|
| 767 |
+
</span>
|
| 768 |
+
<?php
|
| 769 |
+
$idx++;
|
| 770 |
+
?>
|
| 771 |
+
<?php
|
| 772 |
+
}
|
| 773 |
+
?>
|
| 774 |
+
</span>
|
| 775 |
+
</div>
|
| 776 |
+
<?php
|
| 777 |
+
}
|
| 778 |
+
|
| 779 |
+
?>
|
| 780 |
+
<?php
|
| 781 |
+
}
|
| 782 |
+
|
| 783 |
?>
|
| 784 |
+
<?php
|
| 785 |
}
|
| 786 |
+
?>
|
| 787 |
+
<input type="hidden" name="ftg_post_taxonomies" value="<?php
|
| 788 |
+
_e( $gallery->post_taxonomies );
|
| 789 |
+
?>" />
|
|
|
|
|
|
|
|
|
|
| 790 |
<div class="row checkboxes">
|
| 791 |
<strong class="label"><?php
|
| 792 |
_e( 'Max posts:', 'final-tiles-gallery' );
|
| 846 |
_e( 'video tutorial', 'final-tiles-gallery' );
|
| 847 |
?></a>.
|
| 848 |
</div>
|
| 849 |
+
|
| 850 |
<div class="row checkboxes">
|
| 851 |
<strong class="label"><?php
|
| 852 |
+
print_r( $t );
|
| 853 |
?></strong>
|
| 854 |
<span>
|
| 855 |
<?php
|
| 857 |
?>
|
| 858 |
<?php
|
| 859 |
foreach ( $woo_categories as $c ) {
|
| 860 |
+
print_r( $c );
|
| 861 |
?>
|
| 862 |
<input id="woo-cat-<?php
|
| 863 |
_e( $idx );
|
| 864 |
?>" type="checkbox" name="woo_cat" value="<?php
|
| 865 |
+
_e( $c->term_id );
|
| 866 |
?>">
|
| 867 |
<label for="woo-cat-<?php
|
| 868 |
_e( $idx );
|
| 885 |
}
|
| 886 |
|
| 887 |
?>
|
| 888 |
+
</div>
|
| 889 |
<div class="actions">
|
| 890 |
<div class="bulk row">
|
| 891 |
<label><?php
|
| 1182 |
|
| 1183 |
var post_types = $("[name=ftg_post_types]").val().split(',');
|
| 1184 |
$.each(post_types, function () {
|
| 1185 |
+
if(this.length && $("[name=post_types][value="+ this +"]").length)
|
| 1186 |
$("[name=post_types][value="+ this +"]").get(0).checked = true;
|
| 1187 |
});
|
| 1188 |
|
| 1189 |
+
var post_taxonomy = $("[name=ftg_post_taxonomies]").val().split(',');
|
| 1190 |
+
$.each(post_taxonomy, function () {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1191 |
if(this.length) {
|
| 1192 |
+
var t = this.split('|');
|
| 1193 |
+
console.log(t[0], t[1]);
|
| 1194 |
+
var el = $('[data-taxonomy="' + t[0] + '"][value=\"' + t[1] + '\"]');
|
| 1195 |
if(el.length)
|
| 1196 |
el.get(0).checked = true;
|
| 1197 |
}
|
| 1198 |
+
});
|
| 1199 |
|
| 1200 |
var woo_categories = [];
|
| 1201 |
if($("[name=ftg_woo_categories]").val())
|
admin/include/fields.php
CHANGED
|
@@ -518,7 +518,8 @@ $this->addField( "Captions", "captionBehavior", array(
|
|
| 518 |
"fixed-then-hidden|Fixed, hidden on mouse hover|disabled",
|
| 519 |
"fixed-bottom|Fixed at bottom|disabled",
|
| 520 |
"slide-from-top|Slide from top|disabled",
|
| 521 |
-
"slide-from-bottom|Slide from bottom|disabled"
|
|
|
|
| 522 |
),
|
| 523 |
),
|
| 524 |
"proCall" => true,
|
|
@@ -732,6 +733,7 @@ $this->addField( "Captions", "recentPostsCaption", array(
|
|
| 732 |
"values" => array(
|
| 733 |
"Field" => array(
|
| 734 |
"none|Don't use captions",
|
|
|
|
| 735 |
"title|Title",
|
| 736 |
"excerpt|Excerpt",
|
| 737 |
"auto-excerpt|Auto excerpt"
|
| 518 |
"fixed-then-hidden|Fixed, hidden on mouse hover|disabled",
|
| 519 |
"fixed-bottom|Fixed at bottom|disabled",
|
| 520 |
"slide-from-top|Slide from top|disabled",
|
| 521 |
+
"slide-from-bottom|Slide from bottom|disabled",
|
| 522 |
+
"flip-h|Flip horizontally|disabled"
|
| 523 |
),
|
| 524 |
),
|
| 525 |
"proCall" => true,
|
| 733 |
"values" => array(
|
| 734 |
"Field" => array(
|
| 735 |
"none|Don't use captions",
|
| 736 |
+
"custom|Use custom fields",
|
| 737 |
"title|Title",
|
| 738 |
"excerpt|Excerpt",
|
| 739 |
"auto-excerpt|Auto excerpt"
|
admin/scripts/final-tiles-gallery-admin.js
CHANGED
|
@@ -46,27 +46,8 @@ var FTG = function($) {
|
|
| 46 |
FinalTiles_gallery: $('#FinalTiles_gallery').val(),
|
| 47 |
gid: $("#gallery-id").val()
|
| 48 |
};
|
| 49 |
-
|
| 50 |
-
|
| 51 |
-
data.woo_categories = $("[name=woo_cat]:checked").map(function() {
|
| 52 |
-
return this.value;
|
| 53 |
-
}).get().join();
|
| 54 |
-
}
|
| 55 |
-
if (source == "posts") {
|
| 56 |
-
data.post_categories = $("[name=post_categories]:checked").map(function() {
|
| 57 |
-
return this.value;
|
| 58 |
-
}).get().join();
|
| 59 |
-
|
| 60 |
-
data.post_types = $("[name=post_types]:checked").map(function() {
|
| 61 |
-
return this.value;
|
| 62 |
-
}).get().join();
|
| 63 |
-
|
| 64 |
-
data.post_tags = $("[name=post_tags]:checked").map(function() {
|
| 65 |
-
return this.value;
|
| 66 |
-
}).get().join();
|
| 67 |
-
|
| 68 |
-
data.ftg_max_posts = $("[name=ftg_max_posts]").val();
|
| 69 |
-
}
|
| 70 |
|
| 71 |
$.post(ajaxurl, data, function(html) {
|
| 72 |
$("#image-list").empty().append(html);
|
|
@@ -430,7 +411,7 @@ var FTG = function($) {
|
|
| 430 |
$(".row-imageSizeFactor" + this).hide();
|
| 431 |
$(".row-columns" + this).show();
|
| 432 |
});
|
| 433 |
-
|
| 434 |
}
|
| 435 |
}).change();
|
| 436 |
|
|
@@ -641,45 +622,38 @@ var FTG = function($) {
|
|
| 641 |
FTG.load_images();
|
| 642 |
$(".bulk [data-action='remove']").show();
|
| 643 |
}
|
| 644 |
-
if (source == 'posts') {
|
| 645 |
|
| 646 |
-
|
| 647 |
-
|
| 648 |
-
if (source == 'woocommerce') {
|
| 649 |
-
FTG.refresh_woocommerce();
|
| 650 |
-
}
|
| 651 |
|
| 652 |
});
|
| 653 |
|
| 654 |
var refreshPostsTO = 0;
|
| 655 |
-
|
| 656 |
-
|
| 657 |
-
|
| 658 |
-
|
| 659 |
-
|
| 660 |
-
$(
|
| 661 |
-
return this.value;
|
| 662 |
-
}).get().join());
|
| 663 |
|
| 664 |
-
$(
|
| 665 |
return this.value;
|
| 666 |
}).get().join());
|
| 667 |
|
| 668 |
FTG.refresh_posts();
|
| 669 |
-
}
|
| 670 |
-
$("body").on("
|
|
|
|
|
|
|
| 671 |
var delay = setTimeout(function() {
|
| 672 |
clearTimeout(delay);
|
| 673 |
FTG.refresh_posts();
|
| 674 |
}, 500);
|
| 675 |
});
|
| 676 |
-
$("body").on("click", "[name=woo_cat]", function() {
|
| 677 |
-
$("[name=ftg_woo_categories]").val($("[name=woo_cat]:checked").map(function() {
|
| 678 |
-
return this.value;
|
| 679 |
-
}).get().join());
|
| 680 |
|
| 681 |
-
|
| 682 |
-
|
|
|
|
| 683 |
$("body").on("click", "[name=click_action]", function() {
|
| 684 |
if ($(this).val() == "url") {
|
| 685 |
$(this).siblings("[name=url]").get(0).disabled = false;
|
|
@@ -1076,34 +1050,22 @@ var FTGWizard = function($) {
|
|
| 1076 |
$(this).text("Save");
|
| 1077 |
if (branch == 'images') {
|
| 1078 |
$(".select-images").show();
|
| 1079 |
-
|
| 1080 |
-
|
| 1081 |
-
|
| 1082 |
//$("[name=ftg_max_posts]").val(0);
|
| 1083 |
} else if (branch == 'posts') {
|
| 1084 |
$(".select-images").hide();
|
| 1085 |
$("[name=enc_images]").val("");
|
|
|
|
|
|
|
| 1086 |
|
| 1087 |
-
var categories = [];
|
| 1088 |
-
$("[name=_post_categories]:checked").each(function() {
|
| 1089 |
-
categories.push(this.value);
|
| 1090 |
-
});
|
| 1091 |
-
$("[name=post_categories]").val(categories.join(','));
|
| 1092 |
-
|
| 1093 |
-
var tags = [];
|
| 1094 |
-
$("[name=_post_tags]:checked").each(function() {
|
| 1095 |
-
tags.push(this.value);
|
| 1096 |
-
});
|
| 1097 |
-
$("[name=post_tags]").val(tags.join(','));
|
| 1098 |
} else {
|
| 1099 |
$(".select-images").hide();
|
| 1100 |
$("[name=enc_images]").val("");
|
|
|
|
|
|
|
| 1101 |
|
| 1102 |
-
var categories = [];
|
| 1103 |
-
$("[name=_woo_categories]:checked").each(function() {
|
| 1104 |
-
categories.push(this.value);
|
| 1105 |
-
});
|
| 1106 |
-
$("[name=woo_categories]").val(categories.join(','));
|
| 1107 |
}
|
| 1108 |
} else {
|
| 1109 |
$(this).text("Next");
|
| 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);
|
| 411 |
$(".row-imageSizeFactor" + this).hide();
|
| 412 |
$(".row-columns" + this).show();
|
| 413 |
});
|
| 414 |
+
//$("[name=ftg_gridCellSize]").val(0);
|
| 415 |
}
|
| 416 |
}).change();
|
| 417 |
|
| 622 |
FTG.load_images();
|
| 623 |
$(".bulk [data-action='remove']").show();
|
| 624 |
}
|
|
|
|
| 625 |
|
| 626 |
+
|
| 627 |
+
/* Premium Code Stripped by Freemius */
|
|
|
|
|
|
|
|
|
|
| 628 |
|
| 629 |
});
|
| 630 |
|
| 631 |
var refreshPostsTO = 0;
|
| 632 |
+
function refresh() {
|
| 633 |
+
var post_taxonomy = [];
|
| 634 |
+
$('[name="post_taxonomy"]:checked').each(function () {
|
| 635 |
+
post_taxonomy.push($(this).data("taxonomy") + "|" + $(this).val());
|
| 636 |
+
});
|
| 637 |
+
$('[name="ftg_post_taxonomies"]').val(post_taxonomy.join());
|
|
|
|
|
|
|
| 638 |
|
| 639 |
+
$('[name="ftg_post_types"]').val($('[name="post_types"]:checked').map(function() {
|
| 640 |
return this.value;
|
| 641 |
}).get().join());
|
| 642 |
|
| 643 |
FTG.refresh_posts();
|
| 644 |
+
}
|
| 645 |
+
$("body").on("click", '[name="post_types"],[name="post_taxonomy"],[name="post_tags"]', refresh);
|
| 646 |
+
$("body").on("change", '[name="ftg_taxonomyOperator"]', refresh);
|
| 647 |
+
$("body").on("keyup", '[name="ftg_max_posts"]', function() {
|
| 648 |
var delay = setTimeout(function() {
|
| 649 |
clearTimeout(delay);
|
| 650 |
FTG.refresh_posts();
|
| 651 |
}, 500);
|
| 652 |
});
|
|
|
|
|
|
|
|
|
|
|
|
|
| 653 |
|
| 654 |
+
|
| 655 |
+
/* Premium Code Stripped by Freemius */
|
| 656 |
+
|
| 657 |
$("body").on("click", "[name=click_action]", function() {
|
| 658 |
if ($(this).val() == "url") {
|
| 659 |
$(this).siblings("[name=url]").get(0).disabled = false;
|
| 1050 |
$(this).text("Save");
|
| 1051 |
if (branch == 'images') {
|
| 1052 |
$(".select-images").show();
|
| 1053 |
+
|
| 1054 |
+
/* Premium Code Stripped by Freemius */
|
| 1055 |
+
|
| 1056 |
//$("[name=ftg_max_posts]").val(0);
|
| 1057 |
} else if (branch == 'posts') {
|
| 1058 |
$(".select-images").hide();
|
| 1059 |
$("[name=enc_images]").val("");
|
| 1060 |
+
|
| 1061 |
+
/* Premium Code Stripped by Freemius */
|
| 1062 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1063 |
} else {
|
| 1064 |
$(".select-images").hide();
|
| 1065 |
$("[name=enc_images]").val("");
|
| 1066 |
+
|
| 1067 |
+
/* Premium Code Stripped by Freemius */
|
| 1068 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1069 |
}
|
| 1070 |
} else {
|
| 1071 |
$(this).text("Next");
|
lib/db-class.php
CHANGED
|
@@ -230,11 +230,11 @@ if(! class_exists('FinalTilesDB'))
|
|
| 230 |
{
|
| 231 |
global $wpdb;
|
| 232 |
|
| 233 |
-
$
|
| 234 |
if($size > 0)
|
| 235 |
-
$
|
| 236 |
|
| 237 |
-
$imageResults = $wpdb->get_results($
|
| 238 |
|
| 239 |
foreach($imageResults as &$image)
|
| 240 |
{
|
| 230 |
{
|
| 231 |
global $wpdb;
|
| 232 |
|
| 233 |
+
$q = $wpdb->prepare("SELECT * FROM $wpdb->FinalTilesImages WHERE gid = %d ORDER BY sortOrder ASC", $gid);
|
| 234 |
if($size > 0)
|
| 235 |
+
$q = $wpdb->prepare("SELECT * FROM $wpdb->FinalTilesImages WHERE gid = %d ORDER BY sortOrder ASC LIMIT %d, %d", $gid, $skip, $size);
|
| 236 |
|
| 237 |
+
$imageResults = $wpdb->get_results($q);
|
| 238 |
|
| 239 |
foreach($imageResults as &$image)
|
| 240 |
{
|
lib/gallery-class.php
CHANGED
|
@@ -399,6 +399,10 @@ if (!class_exists("FinalTilesGallery"))
|
|
| 399 |
|
| 400 |
$html .= "#ftg-$this->id$rid .tile .tile-inner:before { background-color: rgba($bgCaption[0], $bgCaption[1], $bgCaption[2], ". ($gallery->captionOpacity/100) . "); }\n";
|
| 401 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 402 |
if($gallery->captionFrame == 'T' && $gallery->captionFrameColor)
|
| 403 |
$html .= "#ftg-$this->id$rid .tile .caption-block.frame .text { border-color: ". $gallery->captionFrameColor ."; }\n";
|
| 404 |
|
|
@@ -463,7 +467,7 @@ if (!class_exists("FinalTilesGallery"))
|
|
| 463 |
$gallery->captionMobileBehavior = $gallery->captionBehavior;
|
| 464 |
|
| 465 |
$captionBehavior = wp_is_mobile() ? $gallery->captionMobileBehavior : $gallery->captionBehavior;
|
| 466 |
-
|
| 467 |
$socialClasses = "";
|
| 468 |
if($this->hasSocial())
|
| 469 |
{
|
|
@@ -471,7 +475,7 @@ if (!class_exists("FinalTilesGallery"))
|
|
| 471 |
}
|
| 472 |
|
| 473 |
$html .= "<a name='$this->id'></a>";
|
| 474 |
-
$html .= "<div class='final-tiles-gallery $socialClasses ".($gallery->captionFrame == 'T' ? "caption-frame" : "")." caption-$captionBehavior caption-$gallery->captionVerticalAlignment caption-$gallery->captionHorizontalAlignment' id='ftg-$this->id$rid' style='width:$gallery->width'>\n";
|
| 475 |
if(strlen($gallery->filters))
|
| 476 |
{
|
| 477 |
$filters = explode("|", $gallery->filters);
|
|
@@ -593,6 +597,13 @@ if (!class_exists("FinalTilesGallery"))
|
|
| 593 |
}
|
| 594 |
|
| 595 |
$html .= "\t(function () {\n";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 596 |
$html .= "\t\tvar rel = '';\n";
|
| 597 |
$html .= "\t\tjQuery('#ftg-$this->id$rid .ftg-lightbox').click(function (e) {\n";
|
| 598 |
$html .= "\t\t\trel = jQuery(this).attr('rel');\n";
|
|
@@ -733,6 +744,10 @@ if (!class_exists("FinalTilesGallery"))
|
|
| 733 |
$src = "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7";
|
| 734 |
$description = (isset($image->title) && !empty($image->title)) ? $image->title : $image->description;
|
| 735 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 736 |
$title_text = htmlspecialchars($description, ENT_QUOTES);
|
| 737 |
if($lightbox == 'lightgallery' && $this->useCaptions())
|
| 738 |
$title_text = "<span class='title'>$image->title</span><span class='text'>$image->description</span>";
|
|
@@ -971,8 +986,31 @@ if (!class_exists("FinalTilesGallery"))
|
|
| 971 |
$args['post_type'] = explode(",", $this->gallery->post_types);
|
| 972 |
|
| 973 |
|
| 974 |
-
if($this->gallery->post_categories)
|
| 975 |
$args['category__in'] = $this->gallery->post_categories;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 976 |
|
| 977 |
$posts = get_posts($args);
|
| 978 |
$imageResults = array();
|
|
@@ -1000,6 +1038,24 @@ if (!class_exists("FinalTilesGallery"))
|
|
| 1000 |
case "auto-excerpt":
|
| 1001 |
$item->description = $this->auto_excerpt($post, $this->gallery->recentPostsCaptionAutoExcerptLength, "...");
|
| 1002 |
break;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1003 |
}
|
| 1004 |
|
| 1005 |
if(empty($item->imagePath))
|
| 399 |
|
| 400 |
$html .= "#ftg-$this->id$rid .tile .tile-inner:before { background-color: rgba($bgCaption[0], $bgCaption[1], $bgCaption[2], ". ($gallery->captionOpacity/100) . "); }\n";
|
| 401 |
|
| 402 |
+
if($gallery->captionBehavior == "flip-h") {
|
| 403 |
+
$html .= "#ftg-$this->id$rid .tile .tile-inner .caption-block { background-color: rgba($bgCaption[0], $bgCaption[1], $bgCaption[2], ". ($gallery->captionOpacity/100) . "); }\n";
|
| 404 |
+
}
|
| 405 |
+
|
| 406 |
if($gallery->captionFrame == 'T' && $gallery->captionFrameColor)
|
| 407 |
$html .= "#ftg-$this->id$rid .tile .caption-block.frame .text { border-color: ". $gallery->captionFrameColor ."; }\n";
|
| 408 |
|
| 467 |
$gallery->captionMobileBehavior = $gallery->captionBehavior;
|
| 468 |
|
| 469 |
$captionBehavior = wp_is_mobile() ? $gallery->captionMobileBehavior : $gallery->captionBehavior;
|
| 470 |
+
$hover = $captionBehavior == "never" ? "" : "ftg-hover-enabled";
|
| 471 |
$socialClasses = "";
|
| 472 |
if($this->hasSocial())
|
| 473 |
{
|
| 475 |
}
|
| 476 |
|
| 477 |
$html .= "<a name='$this->id'></a>";
|
| 478 |
+
$html .= "<div class='final-tiles-gallery $socialClasses $hover ".($gallery->captionFrame == 'T' ? "caption-frame" : "")." caption-$captionBehavior caption-$gallery->captionVerticalAlignment caption-$gallery->captionHorizontalAlignment' id='ftg-$this->id$rid' style='width:$gallery->width'>\n";
|
| 479 |
if(strlen($gallery->filters))
|
| 480 |
{
|
| 481 |
$filters = explode("|", $gallery->filters);
|
| 597 |
}
|
| 598 |
|
| 599 |
$html .= "\t(function () {\n";
|
| 600 |
+
/*if(wp_is_mobile())
|
| 601 |
+
{
|
| 602 |
+
$html .= "\t\tjQuery('#ftg-$this->id$rid .tile').on('touchstart', function (e) {\n";
|
| 603 |
+
$html .= "\t\t\tjQuery(this).addClass('hover');\n";
|
| 604 |
+
$html .= "\t\t});\n";
|
| 605 |
+
}*/
|
| 606 |
+
|
| 607 |
$html .= "\t\tvar rel = '';\n";
|
| 608 |
$html .= "\t\tjQuery('#ftg-$this->id$rid .ftg-lightbox').click(function (e) {\n";
|
| 609 |
$html .= "\t\t\trel = jQuery(this).attr('rel');\n";
|
| 744 |
$src = "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7";
|
| 745 |
$description = (isset($image->title) && !empty($image->title)) ? $image->title : $image->description;
|
| 746 |
|
| 747 |
+
$title_text = $description;
|
| 748 |
+
if($title == "title")
|
| 749 |
+
$title_text = strip_tags($title_text);
|
| 750 |
+
|
| 751 |
$title_text = htmlspecialchars($description, ENT_QUOTES);
|
| 752 |
if($lightbox == 'lightgallery' && $this->useCaptions())
|
| 753 |
$title_text = "<span class='title'>$image->title</span><span class='text'>$image->description</span>";
|
| 986 |
$args['post_type'] = explode(",", $this->gallery->post_types);
|
| 987 |
|
| 988 |
|
| 989 |
+
if(isset($this->gallery->post_categories) && !empty($this->gallery->post_categories))
|
| 990 |
$args['category__in'] = $this->gallery->post_categories;
|
| 991 |
+
|
| 992 |
+
$relation = "OR";
|
| 993 |
+
if(isset($this->gallery->taxonomyOperator))
|
| 994 |
+
$relation = $this->gallery->taxonomyOperator;
|
| 995 |
+
|
| 996 |
+
$args['tax_query'] = array("relation" => $relation);
|
| 997 |
+
|
| 998 |
+
if (isset($this->gallery->post_taxonomies))
|
| 999 |
+
{
|
| 1000 |
+
|
| 1001 |
+
foreach(explode(",", $this->gallery->post_taxonomies) as $taxonomy_raw)
|
| 1002 |
+
{
|
| 1003 |
+
$t = explode("|", $taxonomy_raw);
|
| 1004 |
+
$args['tax_query'] []= array(
|
| 1005 |
+
array(
|
| 1006 |
+
'taxonomy' => $t[0],
|
| 1007 |
+
'field' => 'term_id',
|
| 1008 |
+
'terms' => $t[1]
|
| 1009 |
+
)
|
| 1010 |
+
);
|
| 1011 |
+
}
|
| 1012 |
+
}
|
| 1013 |
+
|
| 1014 |
|
| 1015 |
$posts = get_posts($args);
|
| 1016 |
$imageResults = array();
|
| 1038 |
case "auto-excerpt":
|
| 1039 |
$item->description = $this->auto_excerpt($post, $this->gallery->recentPostsCaptionAutoExcerptLength, "...");
|
| 1040 |
break;
|
| 1041 |
+
case "custom":
|
| 1042 |
+
$fields = explode("\n", $this->gallery->captionCustomFields);
|
| 1043 |
+
$item->description = "";
|
| 1044 |
+
foreach($fields as $field)
|
| 1045 |
+
{
|
| 1046 |
+
$field = trim($field);
|
| 1047 |
+
if(! empty($field))
|
| 1048 |
+
{
|
| 1049 |
+
$f = explode(" ", $field);
|
| 1050 |
+
$code = array_shift($f);
|
| 1051 |
+
$label = implode(" ", $f);
|
| 1052 |
+
|
| 1053 |
+
if(strlen($label) > 0)
|
| 1054 |
+
$label .= " ";
|
| 1055 |
+
|
| 1056 |
+
$item->description .= "<span class='ftg-meta ftg-meta-". $code ."'>$label" . get_post_meta( $post->ID, $code, true) . "</span>";
|
| 1057 |
+
}
|
| 1058 |
+
}
|
| 1059 |
}
|
| 1060 |
|
| 1061 |
if(empty($item->imagePath))
|
lightbox/lightbox2/css/style.css
CHANGED
|
@@ -1,203 +1 @@
|
|
| 1 |
-
|
| 2 |
-
body:after {
|
| 3 |
-
content: url(../img/close.png) url(../img/loading.gif) url(../img/prev.png) url(../img/next.png);
|
| 4 |
-
display: none;
|
| 5 |
-
}
|
| 6 |
-
|
| 7 |
-
/* line 11, ../sass/lightbox.sass */
|
| 8 |
-
.lightboxOverlay {
|
| 9 |
-
position: absolute;
|
| 10 |
-
top: 0;
|
| 11 |
-
left: 0;
|
| 12 |
-
z-index: 9999;
|
| 13 |
-
background-color: black;
|
| 14 |
-
filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=80);
|
| 15 |
-
opacity: 0.8;
|
| 16 |
-
display: none;
|
| 17 |
-
}
|
| 18 |
-
|
| 19 |
-
/* line 20, ../sass/lightbox.sass */
|
| 20 |
-
.lightbox {
|
| 21 |
-
position: absolute;
|
| 22 |
-
left: 0;
|
| 23 |
-
width: 100%;
|
| 24 |
-
z-index: 10000;
|
| 25 |
-
text-align: center;
|
| 26 |
-
line-height: 0;
|
| 27 |
-
font-weight: normal;
|
| 28 |
-
}
|
| 29 |
-
/* line 28, ../sass/lightbox.sass */
|
| 30 |
-
.lightbox .lb-image {
|
| 31 |
-
display: block;
|
| 32 |
-
height: auto;
|
| 33 |
-
-webkit-border-radius: 3px;
|
| 34 |
-
-moz-border-radius: 3px;
|
| 35 |
-
-ms-border-radius: 3px;
|
| 36 |
-
-o-border-radius: 3px;
|
| 37 |
-
border-radius: 3px;
|
| 38 |
-
max-width: 999em;
|
| 39 |
-
}
|
| 40 |
-
/* line 32, ../sass/lightbox.sass */
|
| 41 |
-
.lightbox a img {
|
| 42 |
-
border: none;
|
| 43 |
-
}
|
| 44 |
-
|
| 45 |
-
/* line 35, ../sass/lightbox.sass */
|
| 46 |
-
.lb-outerContainer {
|
| 47 |
-
position: relative;
|
| 48 |
-
background-color: white;
|
| 49 |
-
*zoom: 1;
|
| 50 |
-
width: 250px;
|
| 51 |
-
height: 250px;
|
| 52 |
-
margin: 0 auto;
|
| 53 |
-
-webkit-border-radius: 4px;
|
| 54 |
-
-moz-border-radius: 4px;
|
| 55 |
-
-ms-border-radius: 4px;
|
| 56 |
-
-o-border-radius: 4px;
|
| 57 |
-
border-radius: 4px;
|
| 58 |
-
}
|
| 59 |
-
/* line 38, ../../../../.rvm/gems/ruby-1.9.3-p392/gems/compass-0.12.2/frameworks/compass/stylesheets/compass/utilities/general/_clearfix.scss */
|
| 60 |
-
.lb-outerContainer:after {
|
| 61 |
-
content: "";
|
| 62 |
-
display: table;
|
| 63 |
-
clear: both;
|
| 64 |
-
}
|
| 65 |
-
|
| 66 |
-
/* line 44, ../sass/lightbox.sass */
|
| 67 |
-
.lb-container {
|
| 68 |
-
padding: 4px;
|
| 69 |
-
}
|
| 70 |
-
|
| 71 |
-
/* line 47, ../sass/lightbox.sass */
|
| 72 |
-
.lb-loader {
|
| 73 |
-
position: absolute;
|
| 74 |
-
top: 43%;
|
| 75 |
-
left: 0%;
|
| 76 |
-
height: 25%;
|
| 77 |
-
width: 100%;
|
| 78 |
-
text-align: center;
|
| 79 |
-
line-height: 0;
|
| 80 |
-
}
|
| 81 |
-
|
| 82 |
-
/* line 56, ../sass/lightbox.sass */
|
| 83 |
-
.lb-cancel {
|
| 84 |
-
display: block;
|
| 85 |
-
width: 32px;
|
| 86 |
-
height: 32px;
|
| 87 |
-
margin: 0 auto;
|
| 88 |
-
background: url(../img/loading.gif) no-repeat;
|
| 89 |
-
}
|
| 90 |
-
|
| 91 |
-
/* line 63, ../sass/lightbox.sass */
|
| 92 |
-
.lb-nav {
|
| 93 |
-
position: absolute;
|
| 94 |
-
top: 0;
|
| 95 |
-
left: 0;
|
| 96 |
-
height: 100%;
|
| 97 |
-
width: 100%;
|
| 98 |
-
z-index: 10;
|
| 99 |
-
}
|
| 100 |
-
|
| 101 |
-
/* line 71, ../sass/lightbox.sass */
|
| 102 |
-
.lb-container > .nav {
|
| 103 |
-
left: 0;
|
| 104 |
-
}
|
| 105 |
-
|
| 106 |
-
/* line 74, ../sass/lightbox.sass */
|
| 107 |
-
.lb-nav a {
|
| 108 |
-
outline: none;
|
| 109 |
-
}
|
| 110 |
-
|
| 111 |
-
/* line 77, ../sass/lightbox.sass */
|
| 112 |
-
.lb-prev, .lb-next {
|
| 113 |
-
width: 49%;
|
| 114 |
-
height: 100%;
|
| 115 |
-
cursor: pointer;
|
| 116 |
-
/* Trick IE into showing hover */
|
| 117 |
-
display: block;
|
| 118 |
-
}
|
| 119 |
-
|
| 120 |
-
/* line 84, ../sass/lightbox.sass */
|
| 121 |
-
.lb-prev {
|
| 122 |
-
left: 0;
|
| 123 |
-
float: left;
|
| 124 |
-
}
|
| 125 |
-
/* line 87, ../sass/lightbox.sass */
|
| 126 |
-
.lb-prev:hover {
|
| 127 |
-
background: url(../img/prev.png) left 48% no-repeat;
|
| 128 |
-
}
|
| 129 |
-
|
| 130 |
-
/* line 90, ../sass/lightbox.sass */
|
| 131 |
-
.lb-next {
|
| 132 |
-
right: 0;
|
| 133 |
-
float: right;
|
| 134 |
-
}
|
| 135 |
-
/* line 93, ../sass/lightbox.sass */
|
| 136 |
-
.lb-next:hover {
|
| 137 |
-
background: url(../img/next.png) right 48% no-repeat;
|
| 138 |
-
}
|
| 139 |
-
|
| 140 |
-
/* line 96, ../sass/lightbox.sass */
|
| 141 |
-
.lb-dataContainer {
|
| 142 |
-
margin: 0 auto;
|
| 143 |
-
padding-top: 5px;
|
| 144 |
-
*zoom: 1;
|
| 145 |
-
width: 100%;
|
| 146 |
-
-moz-border-radius-bottomleft: 4px;
|
| 147 |
-
-webkit-border-bottom-left-radius: 4px;
|
| 148 |
-
border-bottom-left-radius: 4px;
|
| 149 |
-
-moz-border-radius-bottomright: 4px;
|
| 150 |
-
-webkit-border-bottom-right-radius: 4px;
|
| 151 |
-
border-bottom-right-radius: 4px;
|
| 152 |
-
}
|
| 153 |
-
/* line 38, ../../../../.rvm/gems/ruby-1.9.3-p392/gems/compass-0.12.2/frameworks/compass/stylesheets/compass/utilities/general/_clearfix.scss */
|
| 154 |
-
.lb-dataContainer:after {
|
| 155 |
-
content: "";
|
| 156 |
-
display: table;
|
| 157 |
-
clear: both;
|
| 158 |
-
}
|
| 159 |
-
|
| 160 |
-
/* line 103, ../sass/lightbox.sass */
|
| 161 |
-
.lb-data {
|
| 162 |
-
padding: 0 4px;
|
| 163 |
-
color: #bbbbbb;
|
| 164 |
-
}
|
| 165 |
-
/* line 106, ../sass/lightbox.sass */
|
| 166 |
-
.lb-data .lb-details {
|
| 167 |
-
width: 85%;
|
| 168 |
-
float: left;
|
| 169 |
-
text-align: left;
|
| 170 |
-
line-height: 1.1em;
|
| 171 |
-
}
|
| 172 |
-
/* line 111, ../sass/lightbox.sass */
|
| 173 |
-
.lb-data .lb-caption {
|
| 174 |
-
font-size: 13px;
|
| 175 |
-
font-weight: bold;
|
| 176 |
-
line-height: 1em;
|
| 177 |
-
}
|
| 178 |
-
/* line 115, ../sass/lightbox.sass */
|
| 179 |
-
.lb-data .lb-number {
|
| 180 |
-
display: block;
|
| 181 |
-
clear: left;
|
| 182 |
-
padding-bottom: 1em;
|
| 183 |
-
font-size: 12px;
|
| 184 |
-
color: #999999;
|
| 185 |
-
}
|
| 186 |
-
/* line 121, ../sass/lightbox.sass */
|
| 187 |
-
.lb-data .lb-close {
|
| 188 |
-
display: block;
|
| 189 |
-
float: right;
|
| 190 |
-
width: 30px;
|
| 191 |
-
height: 30px;
|
| 192 |
-
background: url(../img/close.png) top right no-repeat;
|
| 193 |
-
text-align: right;
|
| 194 |
-
outline: none;
|
| 195 |
-
filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=70);
|
| 196 |
-
opacity: 0.7;
|
| 197 |
-
}
|
| 198 |
-
/* line 130, ../sass/lightbox.sass */
|
| 199 |
-
.lb-data .lb-close:hover {
|
| 200 |
-
cursor: pointer;
|
| 201 |
-
filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=100);
|
| 202 |
-
opacity: 1;
|
| 203 |
-
}
|
| 1 |
+
.lb-loader,.lightbox{text-align:center;line-height:0}body:after{content:url(../img/close.png) url(../img/loading.gif) url(../img/prev.png) url(../img/next.png);display:none}.lb-dataContainer:after,.lb-outerContainer:after{content:"";clear:both}body.lb-disable-scrolling{overflow:hidden}.lightboxOverlay{position:absolute;top:0;left:0;z-index:9999;background-color:#000;filter:alpha(Opacity=80);opacity:.8;display:none}.lightbox{position:absolute;left:0;width:100%;z-index:10000;font-weight:400}.lightbox .lb-image{display:block;height:auto;max-width:inherit;max-height:none;border-radius:3px;border:4px solid #fff}.lightbox a img{border:none}.lb-outerContainer{position:relative;width:250px;height:250px;margin:0 auto;border-radius:4px;background-color:#fff}.lb-loader,.lb-nav{position:absolute;left:0}.lb-outerContainer:after{display:table}.lb-loader{top:43%;height:25%;width:100%}.lb-cancel{display:block;width:32px;height:32px;margin:0 auto;background:url(../img/loading.gif) no-repeat}.lb-nav{top:0;height:100%;width:100%;z-index:10}.lb-container>.nav{left:0}.lb-nav a{outline:0;background-image:url(data:image/gif;base64,R0lGODlhAQABAPAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==)}.lb-next,.lb-prev{height:100%;cursor:pointer;display:block}.lb-nav a.lb-prev{width:34%;left:0;float:left;background:url(../img/prev.png) left 48% no-repeat;filter:alpha(Opacity=0);opacity:0;-webkit-transition:opacity .6s;-moz-transition:opacity .6s;-o-transition:opacity .6s;transition:opacity .6s}.lb-nav a.lb-prev:hover{filter:alpha(Opacity=100);opacity:1}.lb-nav a.lb-next{width:64%;right:0;float:right;background:url(../img/next.png) right 48% no-repeat;filter:alpha(Opacity=0);opacity:0;-webkit-transition:opacity .6s;-moz-transition:opacity .6s;-o-transition:opacity .6s;transition:opacity .6s}.lb-nav a.lb-next:hover{filter:alpha(Opacity=100);opacity:1}.lb-dataContainer{margin:0 auto;padding-top:5px;width:100%;-moz-border-radius-bottomleft:4px;-webkit-border-bottom-left-radius:4px;border-bottom-left-radius:4px;-moz-border-radius-bottomright:4px;-webkit-border-bottom-right-radius:4px;border-bottom-right-radius:4px}.lb-dataContainer:after{display:table}.lb-data{padding:0 4px;color:#ccc}.lb-data .lb-details{width:85%;float:left;text-align:left;line-height:1.1em}.lb-data .lb-caption{font-size:13px;font-weight:700;line-height:1em}.lb-data .lb-caption a{color:#4ae}.lb-data .lb-number{display:block;clear:left;padding-bottom:1em;font-size:12px;color:#999}.lb-data .lb-close{display:block;float:right;width:30px;height:30px;background:url(../img/close.png) top right no-repeat;text-align:right;outline:0;filter:alpha(Opacity=70);opacity:.7;-webkit-transition:opacity .2s;-moz-transition:opacity .2s;-o-transition:opacity .2s;transition:opacity .2s}.lb-data .lb-close:hover{cursor:pointer;filter:alpha(Opacity=100);opacity:1}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
lightbox/lightbox2/js/script.js
CHANGED
|
@@ -1 +1,12 @@
|
|
| 1 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*!
|
| 2 |
+
* Lightbox v2.9.0
|
| 3 |
+
* by Lokesh Dhakar
|
| 4 |
+
*
|
| 5 |
+
* More info:
|
| 6 |
+
* http://lokeshdhakar.com/projects/lightbox2/
|
| 7 |
+
*
|
| 8 |
+
* Copyright 2007, 2015 Lokesh Dhakar
|
| 9 |
+
* Released under the MIT license
|
| 10 |
+
* https://github.com/lokesh/lightbox2/blob/master/LICENSE
|
| 11 |
+
*/
|
| 12 |
+
!function(a,b){"function"==typeof define&&define.amd?define(["jquery"],b):"object"==typeof exports?module.exports=b(require("jquery")):a.lightbox=b(a.jQuery)}(this,function(a){function b(b){this.album=[],this.currentImageIndex=void 0,this.init(),this.options=a.extend({},this.constructor.defaults),this.option(b)}return b.defaults={albumLabel:"Image %1 of %2",alwaysShowNavOnTouchDevices:!1,fadeDuration:600,fitImagesInViewport:!0,imageFadeDuration:600,positionFromTop:50,resizeDuration:700,showImageNumberLabel:!0,wrapAround:!1,disableScrolling:!1,sanitizeTitle:!1},b.prototype.option=function(b){a.extend(this.options,b)},b.prototype.imageCountLabel=function(a,b){return this.options.albumLabel.replace(/%1/g,a).replace(/%2/g,b)},b.prototype.init=function(){var b=this;a(document).ready(function(){b.enable(),b.build()})},b.prototype.enable=function(){var b=this;a("body").on("click","a[rel^=lightbox], area[rel^=lightbox], a[data-lightbox], area[data-lightbox]",function(c){return b.start(a(c.currentTarget)),!1})},b.prototype.build=function(){var b=this;a('<div id="lightboxOverlay" class="lightboxOverlay"></div><div id="lightbox" class="lightbox"><div class="lb-outerContainer"><div class="lb-container"><img class="lb-image" src="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==" /><div class="lb-nav"><a class="lb-prev" href="" ></a><a class="lb-next" href="" ></a></div><div class="lb-loader"><a class="lb-cancel"></a></div></div></div><div class="lb-dataContainer"><div class="lb-data"><div class="lb-details"><span class="lb-caption"></span><span class="lb-number"></span></div><div class="lb-closeContainer"><a class="lb-close"></a></div></div></div></div>').appendTo(a("body")),this.$lightbox=a("#lightbox"),this.$overlay=a("#lightboxOverlay"),this.$outerContainer=this.$lightbox.find(".lb-outerContainer"),this.$container=this.$lightbox.find(".lb-container"),this.$image=this.$lightbox.find(".lb-image"),this.$nav=this.$lightbox.find(".lb-nav"),this.containerPadding={top:parseInt(this.$container.css("padding-top"),10),right:parseInt(this.$container.css("padding-right"),10),bottom:parseInt(this.$container.css("padding-bottom"),10),left:parseInt(this.$container.css("padding-left"),10)},this.imageBorderWidth={top:parseInt(this.$image.css("border-top-width"),10),right:parseInt(this.$image.css("border-right-width"),10),bottom:parseInt(this.$image.css("border-bottom-width"),10),left:parseInt(this.$image.css("border-left-width"),10)},this.$overlay.hide().on("click",function(){return b.end(),!1}),this.$lightbox.hide().on("click",function(c){return"lightbox"===a(c.target).attr("id")&&b.end(),!1}),this.$outerContainer.on("click",function(c){return"lightbox"===a(c.target).attr("id")&&b.end(),!1}),this.$lightbox.find(".lb-prev").on("click",function(){return 0===b.currentImageIndex?b.changeImage(b.album.length-1):b.changeImage(b.currentImageIndex-1),!1}),this.$lightbox.find(".lb-next").on("click",function(){return b.currentImageIndex===b.album.length-1?b.changeImage(0):b.changeImage(b.currentImageIndex+1),!1}),this.$nav.on("mousedown",function(a){3===a.which&&(b.$nav.css("pointer-events","none"),b.$lightbox.one("contextmenu",function(){setTimeout(function(){this.$nav.css("pointer-events","auto")}.bind(b),0)}))}),this.$lightbox.find(".lb-loader, .lb-close").on("click",function(){return b.end(),!1})},b.prototype.start=function(b){function c(a){d.album.push({link:a.attr("href"),title:a.attr("data-title")||a.attr("title")})}var d=this,e=a(window);e.on("resize",a.proxy(this.sizeOverlay,this)),a("select, object, embed").css({visibility:"hidden"}),this.sizeOverlay(),this.album=[];var f,g=0,h=b.attr("data-lightbox");if(h){f=a(b.prop("tagName")+'[data-lightbox="'+h+'"]');for(var i=0;i<f.length;i=++i)c(a(f[i])),f[i]===b[0]&&(g=i)}else if("lightbox"===b.attr("rel"))c(b);else{f=a(b.prop("tagName")+'[rel="'+b.attr("rel")+'"]');for(var j=0;j<f.length;j=++j)c(a(f[j])),f[j]===b[0]&&(g=j)}var k=e.scrollTop()+this.options.positionFromTop,l=e.scrollLeft();this.$lightbox.css({top:k+"px",left:l+"px"}).fadeIn(this.options.fadeDuration),this.options.disableScrolling&&a("body").addClass("lb-disable-scrolling"),this.changeImage(g)},b.prototype.changeImage=function(b){var c=this;this.disableKeyboardNav();var d=this.$lightbox.find(".lb-image");this.$overlay.fadeIn(this.options.fadeDuration),a(".lb-loader").fadeIn("slow"),this.$lightbox.find(".lb-image, .lb-nav, .lb-prev, .lb-next, .lb-dataContainer, .lb-numbers, .lb-caption").hide(),this.$outerContainer.addClass("animating");var e=new Image;e.onload=function(){var f,g,h,i,j,k,l;d.attr("src",c.album[b].link),f=a(e),d.width(e.width),d.height(e.height),c.options.fitImagesInViewport&&(l=a(window).width(),k=a(window).height(),j=l-c.containerPadding.left-c.containerPadding.right-c.imageBorderWidth.left-c.imageBorderWidth.right-20,i=k-c.containerPadding.top-c.containerPadding.bottom-c.imageBorderWidth.top-c.imageBorderWidth.bottom-120,c.options.maxWidth&&c.options.maxWidth<j&&(j=c.options.maxWidth),c.options.maxHeight&&c.options.maxHeight<j&&(i=c.options.maxHeight),(e.width>j||e.height>i)&&(e.width/j>e.height/i?(h=j,g=parseInt(e.height/(e.width/h),10),d.width(h),d.height(g)):(g=i,h=parseInt(e.width/(e.height/g),10),d.width(h),d.height(g)))),c.sizeContainer(d.width(),d.height())},e.src=this.album[b].link,this.currentImageIndex=b},b.prototype.sizeOverlay=function(){this.$overlay.width(a(document).width()).height(a(document).height())},b.prototype.sizeContainer=function(a,b){function c(){d.$lightbox.find(".lb-dataContainer").width(g),d.$lightbox.find(".lb-prevLink").height(h),d.$lightbox.find(".lb-nextLink").height(h),d.showImage()}var d=this,e=this.$outerContainer.outerWidth(),f=this.$outerContainer.outerHeight(),g=a+this.containerPadding.left+this.containerPadding.right+this.imageBorderWidth.left+this.imageBorderWidth.right,h=b+this.containerPadding.top+this.containerPadding.bottom+this.imageBorderWidth.top+this.imageBorderWidth.bottom;e!==g||f!==h?this.$outerContainer.animate({width:g,height:h},this.options.resizeDuration,"swing",function(){c()}):c()},b.prototype.showImage=function(){this.$lightbox.find(".lb-loader").stop(!0).hide(),this.$lightbox.find(".lb-image").fadeIn(this.options.imageFadeDuration),this.updateNav(),this.updateDetails(),this.preloadNeighboringImages(),this.enableKeyboardNav()},b.prototype.updateNav=function(){var a=!1;try{document.createEvent("TouchEvent"),a=this.options.alwaysShowNavOnTouchDevices?!0:!1}catch(b){}this.$lightbox.find(".lb-nav").show(),this.album.length>1&&(this.options.wrapAround?(a&&this.$lightbox.find(".lb-prev, .lb-next").css("opacity","1"),this.$lightbox.find(".lb-prev, .lb-next").show()):(this.currentImageIndex>0&&(this.$lightbox.find(".lb-prev").show(),a&&this.$lightbox.find(".lb-prev").css("opacity","1")),this.currentImageIndex<this.album.length-1&&(this.$lightbox.find(".lb-next").show(),a&&this.$lightbox.find(".lb-next").css("opacity","1"))))},b.prototype.updateDetails=function(){var b=this;if("undefined"!=typeof this.album[this.currentImageIndex].title&&""!==this.album[this.currentImageIndex].title){var c=this.$lightbox.find(".lb-caption");this.options.sanitizeTitle?c.text(this.album[this.currentImageIndex].title):c.html(this.album[this.currentImageIndex].title),c.fadeIn("fast").find("a").on("click",function(b){void 0!==a(this).attr("target")?window.open(a(this).attr("href"),a(this).attr("target")):location.href=a(this).attr("href")})}if(this.album.length>1&&this.options.showImageNumberLabel){var d=this.imageCountLabel(this.currentImageIndex+1,this.album.length);this.$lightbox.find(".lb-number").text(d).fadeIn("fast")}else this.$lightbox.find(".lb-number").hide();this.$outerContainer.removeClass("animating"),this.$lightbox.find(".lb-dataContainer").fadeIn(this.options.resizeDuration,function(){return b.sizeOverlay()})},b.prototype.preloadNeighboringImages=function(){if(this.album.length>this.currentImageIndex+1){var a=new Image;a.src=this.album[this.currentImageIndex+1].link}if(this.currentImageIndex>0){var b=new Image;b.src=this.album[this.currentImageIndex-1].link}},b.prototype.enableKeyboardNav=function(){a(document).on("keyup.keyboard",a.proxy(this.keyboardAction,this))},b.prototype.disableKeyboardNav=function(){a(document).off(".keyboard")},b.prototype.keyboardAction=function(a){var b=27,c=37,d=39,e=a.keyCode,f=String.fromCharCode(e).toLowerCase();e===b||f.match(/x|o|c/)?this.end():"p"===f||e===c?0!==this.currentImageIndex?this.changeImage(this.currentImageIndex-1):this.options.wrapAround&&this.album.length>1&&this.changeImage(this.album.length-1):("n"===f||e===d)&&(this.currentImageIndex!==this.album.length-1?this.changeImage(this.currentImageIndex+1):this.options.wrapAround&&this.album.length>1&&this.changeImage(0))},b.prototype.end=function(){this.disableKeyboardNav(),a(window).off("resize",this.sizeOverlay),this.$lightbox.fadeOut(this.options.fadeDuration),this.$overlay.fadeOut(this.options.fadeDuration),a("select, object, embed").css({visibility:"visible"}),this.options.disableScrolling&&a("body").removeClass("lb-disable-scrolling")},new b});
|
readme.txt
CHANGED
|
@@ -135,6 +135,10 @@ Currently galleries made with Envira, FooGallery, Instagram, NextGen, JetPack, M
|
|
| 135 |
|
| 136 |
== Changelog ==
|
| 137 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 138 |
= 3.3.24
|
| 139 |
* [Fix] Fixed missing captions on mobile
|
| 140 |
* [Fix] Fixed skipped images when using columns layout
|
| 135 |
|
| 136 |
== Changelog ==
|
| 137 |
|
| 138 |
+
= 3.3.26
|
| 139 |
+
* [Add] New feature: use custom fields as captions in recent posts galleries
|
| 140 |
+
* [Fix] Columns (masonry) layout completely rewritten, fixed bug causing wrong image sizes or hidden images
|
| 141 |
+
|
| 142 |
= 3.3.24
|
| 143 |
* [Fix] Fixed missing captions on mobile
|
| 144 |
* [Fix] Fixed skipped images when using columns layout
|
scripts/ftg.css
CHANGED
|
@@ -34,6 +34,7 @@
|
|
| 34 |
transition-property: all;
|
| 35 |
transform-origin:50% 50% 50px;
|
| 36 |
transition-duration: .25s;
|
|
|
|
| 37 |
}
|
| 38 |
.final-tiles-gallery .tile.ftg-loaded {
|
| 39 |
opacity: 1;
|
|
@@ -158,7 +159,8 @@
|
|
| 158 |
z-index: 10;
|
| 159 |
}
|
| 160 |
.final-tiles-gallery .tile .caption-block .text-wrapper span.title,
|
| 161 |
-
.final-tiles-gallery .tile .caption-block .text-wrapper span.text
|
|
|
|
| 162 |
display: block;
|
| 163 |
}
|
| 164 |
.final-tiles-gallery .tile span.icon {
|
|
@@ -183,7 +185,8 @@
|
|
| 183 |
.final-tiles-gallery.caption-color-light .tile-inner:before {
|
| 184 |
background: rgba(255, 255, 255, 0.7);
|
| 185 |
}
|
| 186 |
-
.final-tiles-gallery .tile
|
|
|
|
| 187 |
opacity: 1;
|
| 188 |
}
|
| 189 |
.final-tiles-gallery .tile .caption-block span.title {
|
|
@@ -208,7 +211,8 @@
|
|
| 208 |
transition: all 0.5s;
|
| 209 |
opacity: 1;
|
| 210 |
}
|
| 211 |
-
.final-tiles-gallery.effect-fade-out .tile
|
|
|
|
| 212 |
opacity: .5;
|
| 213 |
}
|
| 214 |
/* EFFECT: DEEP ZOOM IN */
|
|
@@ -228,7 +232,7 @@
|
|
| 228 |
position: relative;
|
| 229 |
display: block;
|
| 230 |
}
|
| 231 |
-
.final-tiles-gallery.effect-zoom-in .tile:hover img {
|
| 232 |
-moz-transform: perspective(1000px) translate3d(0px, 0px, 200px);
|
| 233 |
-webkit-transform: perspective(1000px) translate3d(0, 0, 200px);
|
| 234 |
-ms-transform: perspective(1000px) translate3d(0px, 0px, 200px);
|
|
@@ -242,8 +246,8 @@
|
|
| 242 |
-ms-transform: scale(1.12);
|
| 243 |
transform: scale(1.12);
|
| 244 |
}
|
| 245 |
-
.final-tiles-gallery.effect-deep-zoom-out .tile:hover img,
|
| 246 |
-
.final-tiles-gallery.effect-zoom-out .tile:hover img {
|
| 247 |
-moz-transform: scale(1);
|
| 248 |
-webkit-transform: scale(1);
|
| 249 |
-ms-transform: scale(1);
|
|
@@ -285,13 +289,50 @@
|
|
| 285 |
display: flex;
|
| 286 |
align-items: center;
|
| 287 |
}
|
| 288 |
-
.final-tiles-gallery .tile
|
|
|
|
| 289 |
opacity: 1;
|
| 290 |
}
|
| 291 |
/* CAPTION FIXED */
|
| 292 |
.final-tiles-gallery.caption-fixed .tile .caption-block {
|
| 293 |
opacity: 1;
|
| 294 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 295 |
/* CAPTION FIXED WITH BACKGROUND */
|
| 296 |
.final-tiles-gallery.caption-fixed-bg .tile .caption-block {
|
| 297 |
opacity: 1;
|
|
@@ -304,12 +345,12 @@
|
|
| 304 |
.final-tiles-gallery.caption-fixed-then-hidden .tile .tile-inner:before {
|
| 305 |
opacity: 1;
|
| 306 |
}
|
| 307 |
-
.final-tiles-gallery.caption-fixed-then-hidden .tile:hover .caption-block,
|
| 308 |
-
.final-tiles-gallery.caption-fixed-then-hidden .tile:hover .tile-inner:before {
|
| 309 |
opacity: 0;
|
| 310 |
}
|
| 311 |
/* CAPTION SLIDE TOP */
|
| 312 |
-
.final-tiles-gallery.caption-slide-from-top .tile:hover .caption-block {
|
| 313 |
opacity: 1;
|
| 314 |
-moz-transform: translateY(0);
|
| 315 |
-webkit-transform: translateY(0);
|
|
@@ -356,7 +397,7 @@
|
|
| 356 |
}
|
| 357 |
|
| 358 |
/* CAPTION SLIDE FROM BOTTOM */
|
| 359 |
-
.final-tiles-gallery.caption-slide-from-bottom .tile:hover .caption-block {
|
| 360 |
opacity: 1;
|
| 361 |
-moz-transform: translateY(0);
|
| 362 |
-webkit-transform: translateY(0);
|
|
@@ -375,7 +416,7 @@
|
|
| 375 |
/* Premium Code Stripped by Freemius */
|
| 376 |
|
| 377 |
/* EFFECT FRAME */
|
| 378 |
-
.final-tiles-gallery.effect-frame .tile:hover .tile-inner:before {
|
| 379 |
opacity: 1;
|
| 380 |
-moz-transform: scale(1);
|
| 381 |
-webkit-transform: scale(1);
|
| 34 |
transition-property: all;
|
| 35 |
transform-origin:50% 50% 50px;
|
| 36 |
transition-duration: .25s;
|
| 37 |
+
perspective: 1000px;
|
| 38 |
}
|
| 39 |
.final-tiles-gallery .tile.ftg-loaded {
|
| 40 |
opacity: 1;
|
| 159 |
z-index: 10;
|
| 160 |
}
|
| 161 |
.final-tiles-gallery .tile .caption-block .text-wrapper span.title,
|
| 162 |
+
.final-tiles-gallery .tile .caption-block .text-wrapper span.text,
|
| 163 |
+
.final-tiles-gallery .tile .caption-block .text-wrapper span.text .ftg-meta {
|
| 164 |
display: block;
|
| 165 |
}
|
| 166 |
.final-tiles-gallery .tile span.icon {
|
| 185 |
.final-tiles-gallery.caption-color-light .tile-inner:before {
|
| 186 |
background: rgba(255, 255, 255, 0.7);
|
| 187 |
}
|
| 188 |
+
.final-tiles-gallery.ftg-hover-enabled .tile.hover .tile-inner:before,
|
| 189 |
+
.final-tiles-gallery.ftg-hover-enabled .tile:hover .tile-inner:before {
|
| 190 |
opacity: 1;
|
| 191 |
}
|
| 192 |
.final-tiles-gallery .tile .caption-block span.title {
|
| 211 |
transition: all 0.5s;
|
| 212 |
opacity: 1;
|
| 213 |
}
|
| 214 |
+
.final-tiles-gallery.effect-fade-out.ftg-hover-enabled .tile.hover img,
|
| 215 |
+
.final-tiles-gallery.effect-fade-out.ftg-hover-enabled .tile:hover img {
|
| 216 |
opacity: .5;
|
| 217 |
}
|
| 218 |
/* EFFECT: DEEP ZOOM IN */
|
| 232 |
position: relative;
|
| 233 |
display: block;
|
| 234 |
}
|
| 235 |
+
.final-tiles-gallery.effect-zoom-in.ftg-hover-enabled .tile:hover img {
|
| 236 |
-moz-transform: perspective(1000px) translate3d(0px, 0px, 200px);
|
| 237 |
-webkit-transform: perspective(1000px) translate3d(0, 0, 200px);
|
| 238 |
-ms-transform: perspective(1000px) translate3d(0px, 0px, 200px);
|
| 246 |
-ms-transform: scale(1.12);
|
| 247 |
transform: scale(1.12);
|
| 248 |
}
|
| 249 |
+
.final-tiles-gallery.effect-deep-zoom-out.ftg-hover-enabled .tile:hover img,
|
| 250 |
+
.final-tiles-gallery.effect-zoom-out.ftg-hover-enabled .tile:hover img {
|
| 251 |
-moz-transform: scale(1);
|
| 252 |
-webkit-transform: scale(1);
|
| 253 |
-ms-transform: scale(1);
|
| 289 |
display: flex;
|
| 290 |
align-items: center;
|
| 291 |
}
|
| 292 |
+
.final-tiles-gallery.ftg-hover-enabled .tile.hover .caption-block,
|
| 293 |
+
.final-tiles-gallery.ftg-hover-enabled .tile:hover .caption-block {
|
| 294 |
opacity: 1;
|
| 295 |
}
|
| 296 |
/* CAPTION FIXED */
|
| 297 |
.final-tiles-gallery.caption-fixed .tile .caption-block {
|
| 298 |
opacity: 1;
|
| 299 |
}
|
| 300 |
+
/* CAPTION FLIP HORIZ */
|
| 301 |
+
.final-tiles-gallery.caption-flip-h .tile {
|
| 302 |
+
perspective: 1000px;
|
| 303 |
+
}
|
| 304 |
+
.final-tiles-gallery.caption-flip-h .tile .tile-inner {
|
| 305 |
+
position: static;
|
| 306 |
+
}
|
| 307 |
+
.final-tiles-gallery.caption-flip-h.ftg-hover-enabled .tile:hover .tile-inner {
|
| 308 |
+
transform: rotateY(180deg);
|
| 309 |
+
}
|
| 310 |
+
.final-tiles-gallery.caption-flip-h .tile .tile-inner {
|
| 311 |
+
transition: 0.6s;
|
| 312 |
+
transform-style: preserve-3d;
|
| 313 |
+
position: static;
|
| 314 |
+
display: block;
|
| 315 |
+
}
|
| 316 |
+
.final-tiles-gallery.caption-flip-h .tile:hover .tile-inner:before {
|
| 317 |
+
display: none;
|
| 318 |
+
}
|
| 319 |
+
.final-tiles-gallery.caption-flip-h .tile .tile-inner .item,
|
| 320 |
+
.final-tiles-gallery.caption-flip-h .tile .tile-inner .caption-block {
|
| 321 |
+
-webkit-backface-visibility: hidden;
|
| 322 |
+
backface-visibility: hidden;
|
| 323 |
+
}
|
| 324 |
+
.final-tiles-gallery.caption-flip-h .tile .tile-inner .item {
|
| 325 |
+
z-index: 2;
|
| 326 |
+
/* for firefox 31 */
|
| 327 |
+
transform: rotateY(0deg);
|
| 328 |
+
}
|
| 329 |
+
.final-tiles-gallery.caption-flip-h .tile .tile-inner .caption-block {
|
| 330 |
+
transform: rotateY(180deg);
|
| 331 |
+
left: 0;
|
| 332 |
+
right: 0;
|
| 333 |
+
padding-left: 20px;
|
| 334 |
+
padding-right: 20px;
|
| 335 |
+
}
|
| 336 |
/* CAPTION FIXED WITH BACKGROUND */
|
| 337 |
.final-tiles-gallery.caption-fixed-bg .tile .caption-block {
|
| 338 |
opacity: 1;
|
| 345 |
.final-tiles-gallery.caption-fixed-then-hidden .tile .tile-inner:before {
|
| 346 |
opacity: 1;
|
| 347 |
}
|
| 348 |
+
.final-tiles-gallery.caption-fixed-then-hidden.ftg-hover-enabled .tile:hover .caption-block,
|
| 349 |
+
.final-tiles-gallery.caption-fixed-then-hidden.ftg-hover-enabled .tile:hover .tile-inner:before {
|
| 350 |
opacity: 0;
|
| 351 |
}
|
| 352 |
/* CAPTION SLIDE TOP */
|
| 353 |
+
.final-tiles-gallery.caption-slide-from-top.ftg-hover-enabled .tile:hover .caption-block {
|
| 354 |
opacity: 1;
|
| 355 |
-moz-transform: translateY(0);
|
| 356 |
-webkit-transform: translateY(0);
|
| 397 |
}
|
| 398 |
|
| 399 |
/* CAPTION SLIDE FROM BOTTOM */
|
| 400 |
+
.final-tiles-gallery.caption-slide-from-bottom.ftg-hover-enabled .tile:hover .caption-block {
|
| 401 |
opacity: 1;
|
| 402 |
-moz-transform: translateY(0);
|
| 403 |
-webkit-transform: translateY(0);
|
| 416 |
/* Premium Code Stripped by Freemius */
|
| 417 |
|
| 418 |
/* EFFECT FRAME */
|
| 419 |
+
.final-tiles-gallery.effect-frame.ftg-hover-enabled .tile:hover .tile-inner:before {
|
| 420 |
opacity: 1;
|
| 421 |
-moz-transform: scale(1);
|
| 422 |
-webkit-transform: scale(1);
|
scripts/jquery.finalTilesGallery.js
CHANGED
|
@@ -73,6 +73,7 @@ var qualifyURL = function (url) {
|
|
| 73 |
this.$element = $(element);
|
| 74 |
this.settings = $.extend({}, defaults, options);
|
| 75 |
this._columnSize = 0;
|
|
|
|
| 76 |
this._defaults = defaults;
|
| 77 |
this._name = pluginName;
|
| 78 |
this.tiles = [];
|
|
@@ -112,8 +113,14 @@ var qualifyURL = function (url) {
|
|
| 112 |
setCurrentColumnSize: function () {
|
| 113 |
var ww = $(window).width();
|
| 114 |
for (var i = 0; i < this.settings.columns.length; i++) {
|
| 115 |
-
if (this.settings.columns[i][0] >= ww)
|
| 116 |
this.currentColumnsCount = this.settings.columns[i][1];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 117 |
}
|
| 118 |
|
| 119 |
this._columnSize = (this.currentWidth - (this.settings.margin * (this.currentColumnsCount - 1))) / this.currentColumnsCount;
|
|
@@ -121,12 +128,19 @@ var qualifyURL = function (url) {
|
|
| 121 |
this.print(this.currentWidth, this._columnSize);
|
| 122 |
},
|
| 123 |
setCurrentGridSize: function () {
|
|
|
|
| 124 |
if(this.currentWidth < this.settings.disableGridSizeBelow)
|
| 125 |
-
|
| 126 |
-
|
| 127 |
-
|
| 128 |
-
|
| 129 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 130 |
},
|
| 131 |
init: function () {
|
| 132 |
var instance = this;
|
|
@@ -361,6 +375,7 @@ var qualifyURL = function (url) {
|
|
| 361 |
this.$element.append($e);
|
| 362 |
},
|
| 363 |
refresh: function () {
|
|
|
|
| 364 |
this.$element.find(".edge").remove();
|
| 365 |
this.edges = [
|
| 366 |
{ left: 0, top: 0, width: this.currentWidth }
|
|
@@ -414,7 +429,7 @@ var qualifyURL = function (url) {
|
|
| 414 |
} else {
|
| 415 |
var height = instance.lowerEdgeTop();
|
| 416 |
instance.print("lower edge top: " + height);
|
| 417 |
-
instance.$element.find(".ftg-items").height(height);
|
| 418 |
instance.isLoading = false;
|
| 419 |
instance.settings.onComplete();
|
| 420 |
}
|
|
@@ -579,7 +594,128 @@ var qualifyURL = function (url) {
|
|
| 579 |
}
|
| 580 |
this.edges = tmp;
|
| 581 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 582 |
add: function (tileIndex) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 583 |
var $t = this.tiles.eq(tileIndex);
|
| 584 |
|
| 585 |
var $item = $t.find('.item');
|
|
@@ -772,16 +908,7 @@ var qualifyURL = function (url) {
|
|
| 772 |
if(! desc.length)
|
| 773 |
desc = document.title;
|
| 774 |
|
| 775 |
-
if(social == "facebook") {
|
| 776 |
-
/*if(FB) {
|
| 777 |
-
FB.ui(
|
| 778 |
-
{
|
| 779 |
-
method: 'share',
|
| 780 |
-
href: location.href
|
| 781 |
-
}, function(response){
|
| 782 |
-
console.log(response);
|
| 783 |
-
});
|
| 784 |
-
}*/
|
| 785 |
var url = "https://www.facebook.com/dialog/feed?app_id=1447224948871585&"+
|
| 786 |
"link="+encodeURIComponent(location.href)+"&" +
|
| 787 |
"display=popup&"+
|
| 73 |
this.$element = $(element);
|
| 74 |
this.settings = $.extend({}, defaults, options);
|
| 75 |
this._columnSize = 0;
|
| 76 |
+
this.columns;
|
| 77 |
this._defaults = defaults;
|
| 78 |
this._name = pluginName;
|
| 79 |
this.tiles = [];
|
| 113 |
setCurrentColumnSize: function () {
|
| 114 |
var ww = $(window).width();
|
| 115 |
for (var i = 0; i < this.settings.columns.length; i++) {
|
| 116 |
+
if (this.settings.columns[i][0] >= ww) {
|
| 117 |
this.currentColumnsCount = this.settings.columns[i][1];
|
| 118 |
+
this.print("columns count: " + this.currentColumnsCount);
|
| 119 |
+
this.columns = [];
|
| 120 |
+
for(var j=0; j<this.currentColumnsCount; j++) {
|
| 121 |
+
this.columns.push([]);
|
| 122 |
+
}
|
| 123 |
+
}
|
| 124 |
}
|
| 125 |
|
| 126 |
this._columnSize = (this.currentWidth - (this.settings.margin * (this.currentColumnsCount - 1))) / this.currentColumnsCount;
|
| 128 |
this.print(this.currentWidth, this._columnSize);
|
| 129 |
},
|
| 130 |
setCurrentGridSize: function () {
|
| 131 |
+
|
| 132 |
if(this.currentWidth < this.settings.disableGridSizeBelow)
|
| 133 |
+
{
|
| 134 |
+
this.currentGridSize = 0;
|
| 135 |
+
}
|
| 136 |
+
else
|
| 137 |
+
{
|
| 138 |
+
if(this.settings.layout == "final")
|
| 139 |
+
this.currentGridSize = this.settings.gridSize * this.currentImageSizeFactor
|
| 140 |
+
else
|
| 141 |
+
this.currentGridSize = this.settings.gridSize;
|
| 142 |
+
}
|
| 143 |
+
this.print("currentGridSize : " + this.currentGridSize);
|
| 144 |
},
|
| 145 |
init: function () {
|
| 146 |
var instance = this;
|
| 375 |
this.$element.append($e);
|
| 376 |
},
|
| 377 |
refresh: function () {
|
| 378 |
+
this.setCurrentColumnSize();
|
| 379 |
this.$element.find(".edge").remove();
|
| 380 |
this.edges = [
|
| 381 |
{ left: 0, top: 0, width: this.currentWidth }
|
| 429 |
} else {
|
| 430 |
var height = instance.lowerEdgeTop();
|
| 431 |
instance.print("lower edge top: " + height);
|
| 432 |
+
//instance.$element.find(".ftg-items").height(height);
|
| 433 |
instance.isLoading = false;
|
| 434 |
instance.settings.onComplete();
|
| 435 |
}
|
| 594 |
}
|
| 595 |
this.edges = tmp;
|
| 596 |
},
|
| 597 |
+
get_highest_col: function () {
|
| 598 |
+
var h = 0;
|
| 599 |
+
for(var i=0; i<this.columns.length; i++) {
|
| 600 |
+
for(var j=0; j<this.columns[i].length; j++) {
|
| 601 |
+
if(this.columns[i][j] > h)
|
| 602 |
+
h = this.columns[i][j];
|
| 603 |
+
}
|
| 604 |
+
}
|
| 605 |
+
return h;
|
| 606 |
+
},
|
| 607 |
+
get_shortest_col: function () {
|
| 608 |
+
for(var i=0; i<this.columns.length; i++) {
|
| 609 |
+
var col = this.columns[i];
|
| 610 |
+
if(col.length == 0) {
|
| 611 |
+
return {
|
| 612 |
+
col: i,
|
| 613 |
+
top: 0
|
| 614 |
+
}
|
| 615 |
+
}
|
| 616 |
+
}
|
| 617 |
+
|
| 618 |
+
var ret = {
|
| 619 |
+
col: 0,
|
| 620 |
+
top: 100000000
|
| 621 |
+
};
|
| 622 |
+
for(var i=0; i<this.columns.length; i++) {
|
| 623 |
+
var col = this.columns[i];
|
| 624 |
+
var last = col[col.length - 1];
|
| 625 |
+
|
| 626 |
+
//console.log(i, "last", last);
|
| 627 |
+
|
| 628 |
+
if(last <= ret.top) {
|
| 629 |
+
//console.log("shortest is ", i, last);
|
| 630 |
+
ret.top = last;
|
| 631 |
+
ret.col = i;
|
| 632 |
+
}
|
| 633 |
+
}
|
| 634 |
+
|
| 635 |
+
if(ret.top == 0)
|
| 636 |
+
console.warn("col ret 0");
|
| 637 |
+
|
| 638 |
+
return ret;
|
| 639 |
+
},
|
| 640 |
add: function (tileIndex) {
|
| 641 |
+
if(this.settings.layout == "columns") {
|
| 642 |
+
this.add_to_column(tileIndex);
|
| 643 |
+
} else {
|
| 644 |
+
this.add_to_final(tileIndex);
|
| 645 |
+
}
|
| 646 |
+
},
|
| 647 |
+
add_to_column: function (tileIndex) {
|
| 648 |
+
var $t = this.tiles.eq(tileIndex);
|
| 649 |
+
|
| 650 |
+
var $item = $t.find('.item');
|
| 651 |
+
var key = "tile" + tileIndex;
|
| 652 |
+
var w = this.imagesData[key].width;
|
| 653 |
+
var h = this.imagesData[key].height;
|
| 654 |
+
|
| 655 |
+
var slot = this.get_shortest_col();
|
| 656 |
+
|
| 657 |
+
var ratio = h / w;
|
| 658 |
+
|
| 659 |
+
var t_w = this._columnSize;
|
| 660 |
+
var t_h = t_w * ratio;
|
| 661 |
+
var t_h_b = t_w * ratio;
|
| 662 |
+
|
| 663 |
+
console.log("tw, th", t_w, t_h);
|
| 664 |
+
|
| 665 |
+
if(this.currentGridSize) {
|
| 666 |
+
console.log("old t_h", t_h);
|
| 667 |
+
var n = Math.floor(t_h / this.currentGridSize);
|
| 668 |
+
if(n > 0) {
|
| 669 |
+
t_h = this.currentGridSize * n;
|
| 670 |
+
console.log("new t_h", t_h);
|
| 671 |
+
}
|
| 672 |
+
}
|
| 673 |
+
|
| 674 |
+
/*if(this.currentGridSize) {
|
| 675 |
+
console.log("this.currentGridSize", this.currentGridSize);
|
| 676 |
+
var diff = h % this.currentGridSize;
|
| 677 |
+
console.log("diff", diff);
|
| 678 |
+
slot.top -= diff;
|
| 679 |
+
h -= diff;
|
| 680 |
+
}*/
|
| 681 |
+
|
| 682 |
+
$t.css({
|
| 683 |
+
position: 'absolute',
|
| 684 |
+
width: t_w,
|
| 685 |
+
height: t_h,
|
| 686 |
+
top: slot.top + this.settings.margin,
|
| 687 |
+
left: (slot.col * this._columnSize) + (this.settings.margin * slot.col)
|
| 688 |
+
});
|
| 689 |
+
|
| 690 |
+
var hdiff = t_h_b - t_h;
|
| 691 |
+
|
| 692 |
+
if ($t.data("ftg-type") != "iframe")
|
| 693 |
+
$item.css({ height: "auto" });
|
| 694 |
+
console.log("hdiff", hdiff);
|
| 695 |
+
if(hdiff > 0) {
|
| 696 |
+
$item.css({
|
| 697 |
+
top: 0 - (hdiff / 2)
|
| 698 |
+
});
|
| 699 |
+
}
|
| 700 |
+
|
| 701 |
+
var transition = $t.css('transition');
|
| 702 |
+
$t.css({
|
| 703 |
+
display: 'block',
|
| 704 |
+
//opacity: 1,
|
| 705 |
+
transform: 'scale(1)'
|
| 706 |
+
//transition: 'none'
|
| 707 |
+
});
|
| 708 |
+
$t.addClass("ftg-loaded");
|
| 709 |
+
|
| 710 |
+
this.columns[slot.col].push(slot.top + t_h + this.settings.margin);
|
| 711 |
+
|
| 712 |
+
this.$element.find(".ftg-items").css({
|
| 713 |
+
height: this.get_highest_col() + "px"
|
| 714 |
+
});
|
| 715 |
+
|
| 716 |
+
console.log("");
|
| 717 |
+
},
|
| 718 |
+
add_to_final: function (tileIndex) {
|
| 719 |
var $t = this.tiles.eq(tileIndex);
|
| 720 |
|
| 721 |
var $item = $t.find('.item');
|
| 908 |
if(! desc.length)
|
| 909 |
desc = document.title;
|
| 910 |
|
| 911 |
+
if(social == "facebook") {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 912 |
var url = "https://www.facebook.com/dialog/feed?app_id=1447224948871585&"+
|
| 913 |
"link="+encodeURIComponent(location.href)+"&" +
|
| 914 |
"display=popup&"+
|
