Version Description
- Has been added separate menu for the plugin
- Fix: Link to larger images
Download this release
Release Info
Developer | devrix |
Plugin | Easy Image Gallery |
Version | 1.5 |
Comparing to | |
See all releases |
Code changes from version 1.4.3 to 1.5
- easy-image-gallery.php +31 -25
- includes/admin-page.php +14 -110
- includes/gutenberg-block/dist/blocks.build.js +3 -3
- includes/gutenberg-block/dist/blocks.script.js +7 -0
- includes/gutenberg-block/src/block/block.js +1 -1
- includes/lib/fancybox/blank.gif +0 -0
- includes/lib/fancybox/fancy_close.png +0 -0
- includes/lib/fancybox/fancy_loading.png +0 -0
- includes/lib/fancybox/fancy_nav_left.png +0 -0
- includes/lib/fancybox/fancy_nav_right.png +0 -0
- includes/lib/fancybox/fancy_shadow_e.png +0 -0
- includes/lib/fancybox/fancy_shadow_n.png +0 -0
- includes/lib/fancybox/fancy_shadow_ne.png +0 -0
- includes/lib/fancybox/fancy_shadow_nw.png +0 -0
- includes/lib/fancybox/fancy_shadow_s.png +0 -0
- includes/lib/fancybox/fancy_shadow_se.png +0 -0
- includes/lib/fancybox/fancy_shadow_sw.png +0 -0
- includes/lib/fancybox/fancy_shadow_w.png +0 -0
- includes/lib/fancybox/fancy_title_left.png +0 -0
- includes/lib/fancybox/fancy_title_main.png +0 -0
- includes/lib/fancybox/fancy_title_over.png +0 -0
- includes/lib/fancybox/fancy_title_right.png +0 -0
- includes/lib/fancybox/fancybox-x.png +0 -0
- includes/lib/fancybox/fancybox-y.png +0 -0
- includes/lib/fancybox/fancybox.png +0 -0
- includes/lib/fancybox/fancybox_loading.gif +0 -0
- includes/lib/fancybox/fancybox_loading@2x.gif +0 -0
- includes/lib/fancybox/fancybox_overlay.png +0 -0
- includes/lib/fancybox/fancybox_sprite.png +0 -0
- includes/lib/fancybox/fancybox_sprite@2x.png +0 -0
- includes/lib/fancybox/helpers/fancybox_buttons.png +0 -0
- includes/lib/fancybox/helpers/jquery.fancybox-buttons.css +97 -0
- includes/lib/fancybox/helpers/jquery.fancybox-buttons.js +122 -0
- includes/lib/fancybox/helpers/jquery.fancybox-media.js +199 -0
- includes/lib/fancybox/helpers/jquery.fancybox-thumbs.css +55 -0
- includes/lib/fancybox/helpers/jquery.fancybox-thumbs.js +162 -0
- includes/lib/fancybox/jquery.fancybox-1.3.4.css +359 -0
- includes/lib/fancybox/jquery.fancybox-1.3.4.js +1156 -0
- includes/lib/fancybox/jquery.fancybox-1.3.4.pack.js +46 -0
- includes/metabox.php +1 -1
- includes/view/admin-page-view.php +67 -0
- readme.txt +6 -2
easy-image-gallery.php
CHANGED
@@ -1,18 +1,20 @@
|
|
1 |
<?php
|
2 |
/*
|
3 |
Plugin Name: Easy Image Gallery
|
4 |
-
Plugin URI:
|
5 |
Description: An easy to use image gallery with drag & drop re-ordering
|
6 |
-
Version: 1.
|
7 |
Author: DevriX
|
8 |
-
Author URI:
|
9 |
Text Domain: easy-image-gallery
|
10 |
License: GPL-2.0+
|
11 |
License URI: http://www.opensource.org/licenses/gpl-license.php
|
12 |
*/
|
13 |
|
14 |
// Exit if accessed directly
|
15 |
-
if ( ! defined( 'ABSPATH' ) )
|
|
|
|
|
16 |
|
17 |
if ( ! class_exists( 'Easy_Image_Gallery' ) ) {
|
18 |
|
@@ -20,21 +22,21 @@ if ( ! class_exists( 'Easy_Image_Gallery' ) ) {
|
|
20 |
* PHP5 constructor method.
|
21 |
*
|
22 |
* @since 1.0
|
23 |
-
|
24 |
class Easy_Image_Gallery {
|
25 |
|
26 |
public function __construct() {
|
27 |
add_action( 'plugins_loaded', array( $this, 'load_textdomain' ) );
|
28 |
-
add_action( 'plugins_loaded', array( $this, 'constants' ));
|
29 |
add_action( 'plugins_loaded', array( $this, 'includes' ) );
|
30 |
-
add_filter( 'plugin_action_links_' . plugin_basename( __FILE__ ), 'easy_image_gallery_plugin_action_links' );
|
31 |
}
|
32 |
|
33 |
/**
|
34 |
* Internationalization
|
35 |
*
|
36 |
* @since 1.0
|
37 |
-
|
38 |
public function load_textdomain() {
|
39 |
load_plugin_textdomain( 'easy-image-gallery', false, dirname( plugin_basename( __FILE__ ) ) . '/languages/' );
|
40 |
}
|
@@ -44,35 +46,39 @@ if ( ! class_exists( 'Easy_Image_Gallery' ) ) {
|
|
44 |
* Constants
|
45 |
*
|
46 |
* @since 1.0
|
47 |
-
|
48 |
public function constants() {
|
49 |
|
50 |
-
if ( !defined( 'EASY_IMAGE_GALLERY_DIR' ) )
|
51 |
define( 'EASY_IMAGE_GALLERY_DIR', trailingslashit( plugin_dir_path( __FILE__ ) ) );
|
|
|
52 |
|
53 |
-
if ( !defined( 'EASY_IMAGE_GALLERY_URL' ) )
|
54 |
-
|
|
|
55 |
|
56 |
-
if ( ! defined( 'EASY_IMAGE_GALLERY_VERSION' ) )
|
57 |
-
|
|
|
58 |
|
59 |
-
if ( ! defined( 'EASY_IMAGE_GALLERY_INCLUDES' ) )
|
60 |
-
|
|
|
61 |
|
62 |
}
|
63 |
|
64 |
/**
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
public function includes() {
|
70 |
|
71 |
-
require_once
|
72 |
-
require_once
|
73 |
-
require_once
|
74 |
-
require_once
|
75 |
-
require_once
|
76 |
}
|
77 |
|
78 |
}
|
1 |
<?php
|
2 |
/*
|
3 |
Plugin Name: Easy Image Gallery
|
4 |
+
Plugin URI: https://devrix.com/
|
5 |
Description: An easy to use image gallery with drag & drop re-ordering
|
6 |
+
Version: 1.5
|
7 |
Author: DevriX
|
8 |
+
Author URI: https://devrix.com/
|
9 |
Text Domain: easy-image-gallery
|
10 |
License: GPL-2.0+
|
11 |
License URI: http://www.opensource.org/licenses/gpl-license.php
|
12 |
*/
|
13 |
|
14 |
// Exit if accessed directly
|
15 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
16 |
+
exit;
|
17 |
+
}
|
18 |
|
19 |
if ( ! class_exists( 'Easy_Image_Gallery' ) ) {
|
20 |
|
22 |
* PHP5 constructor method.
|
23 |
*
|
24 |
* @since 1.0
|
25 |
+
*/
|
26 |
class Easy_Image_Gallery {
|
27 |
|
28 |
public function __construct() {
|
29 |
add_action( 'plugins_loaded', array( $this, 'load_textdomain' ) );
|
30 |
+
add_action( 'plugins_loaded', array( $this, 'constants' ) );
|
31 |
add_action( 'plugins_loaded', array( $this, 'includes' ) );
|
32 |
+
// add_filter( 'plugin_action_links_' . plugin_basename( __FILE__ ), 'easy_image_gallery_plugin_action_links' );
|
33 |
}
|
34 |
|
35 |
/**
|
36 |
* Internationalization
|
37 |
*
|
38 |
* @since 1.0
|
39 |
+
*/
|
40 |
public function load_textdomain() {
|
41 |
load_plugin_textdomain( 'easy-image-gallery', false, dirname( plugin_basename( __FILE__ ) ) . '/languages/' );
|
42 |
}
|
46 |
* Constants
|
47 |
*
|
48 |
* @since 1.0
|
49 |
+
*/
|
50 |
public function constants() {
|
51 |
|
52 |
+
if ( ! defined( 'EASY_IMAGE_GALLERY_DIR' ) ) {
|
53 |
define( 'EASY_IMAGE_GALLERY_DIR', trailingslashit( plugin_dir_path( __FILE__ ) ) );
|
54 |
+
}
|
55 |
|
56 |
+
if ( ! defined( 'EASY_IMAGE_GALLERY_URL' ) ) {
|
57 |
+
define( 'EASY_IMAGE_GALLERY_URL', trailingslashit( plugin_dir_url( __FILE__ ) ) );
|
58 |
+
}
|
59 |
|
60 |
+
if ( ! defined( 'EASY_IMAGE_GALLERY_VERSION' ) ) {
|
61 |
+
define( 'EASY_IMAGE_GALLERY_VERSION', '1.2' );
|
62 |
+
}
|
63 |
|
64 |
+
if ( ! defined( 'EASY_IMAGE_GALLERY_INCLUDES' ) ) {
|
65 |
+
define( 'EASY_IMAGE_GALLERY_INCLUDES', EASY_IMAGE_GALLERY_DIR . trailingslashit( 'includes' ) );
|
66 |
+
}
|
67 |
|
68 |
}
|
69 |
|
70 |
/**
|
71 |
+
* Loads the initial files needed by the plugin.
|
72 |
+
*
|
73 |
+
* @since 1.0
|
74 |
+
*/
|
75 |
public function includes() {
|
76 |
|
77 |
+
require_once EASY_IMAGE_GALLERY_INCLUDES . 'template-functions.php';
|
78 |
+
require_once EASY_IMAGE_GALLERY_INCLUDES . 'scripts.php';
|
79 |
+
require_once EASY_IMAGE_GALLERY_INCLUDES . 'metabox.php';
|
80 |
+
require_once EASY_IMAGE_GALLERY_INCLUDES . 'admin-page.php';
|
81 |
+
require_once EASY_IMAGE_GALLERY_INCLUDES . 'gutenberg-block/plugin.php';
|
82 |
}
|
83 |
|
84 |
}
|
includes/admin-page.php
CHANGED
@@ -1,117 +1,21 @@
|
|
1 |
<?php
|
2 |
-
|
3 |
-
|
4 |
-
*
|
5 |
-
* @since 1.0
|
6 |
-
*/
|
7 |
-
function easy_image_gallery_admin_init() {
|
8 |
-
register_setting( 'media', 'easy-image-gallery', 'easy_image_gallery_settings_sanitize' );
|
9 |
-
|
10 |
-
// settings
|
11 |
-
add_settings_field( 'header', '<h3 class="title">' . __( 'Easy Image Gallery', 'easy-image-gallery' ) . '</h3>', 'easy_image_gallery_header_callback', 'media', 'default' );
|
12 |
-
add_settings_field( 'lightbox', __( 'Lightbox', 'easy-image-gallery' ), 'easy_image_gallery_lightbox_callback', 'media', 'default' );
|
13 |
-
add_settings_field( 'post-types', __( 'Post Types', 'easy-image-gallery' ), 'easy_image_gallery_post_types_callback', 'media', 'default' );
|
14 |
-
}
|
15 |
-
add_action( 'admin_init', 'easy_image_gallery_admin_init' );
|
16 |
-
|
17 |
-
/**
|
18 |
-
* Blank header callback
|
19 |
-
* @since 1.0.6
|
20 |
-
*/
|
21 |
-
function easy_image_gallery_header_callback() {}
|
22 |
-
|
23 |
-
/**
|
24 |
-
* Lightbox callback
|
25 |
-
*
|
26 |
-
* @since 1.0
|
27 |
-
*/
|
28 |
-
function easy_image_gallery_lightbox_callback() {
|
29 |
-
|
30 |
-
// default option when settings have not been saved
|
31 |
-
$defaults['lightbox'] = 'prettyphoto';
|
32 |
-
|
33 |
-
$settings = (array) get_option( 'easy-image-gallery', $defaults );
|
34 |
-
|
35 |
-
$lightbox = esc_attr( $settings['lightbox'] );
|
36 |
-
?>
|
37 |
-
<select name="easy-image-gallery[lightbox]">
|
38 |
-
<?php foreach ( easy_image_gallery_lightbox() as $key => $label ) { ?>
|
39 |
-
<option value="<?php echo $key; ?>" <?php selected( $lightbox, $key ); ?>><?php echo $label; ?></option>
|
40 |
-
<?php } ?>
|
41 |
-
</select>
|
42 |
-
|
43 |
-
<?php
|
44 |
-
|
45 |
-
}
|
46 |
-
|
47 |
-
/**
|
48 |
-
* Post Types callback
|
49 |
-
*
|
50 |
-
* @since 1.0
|
51 |
-
*/
|
52 |
-
|
53 |
-
function easy_image_gallery_post_types_callback() {
|
54 |
-
|
55 |
-
// post and page defaults
|
56 |
-
$defaults['post_types']['post'] = 'on';
|
57 |
-
$defaults['post_types']['page'] = 'on';
|
58 |
-
|
59 |
-
$settings = (array) get_option( 'easy-image-gallery', $defaults );
|
60 |
-
|
61 |
-
?>
|
62 |
-
<?php foreach ( easy_image_gallery_get_post_types() as $key => $label ) {
|
63 |
-
|
64 |
-
$post_types = isset( $settings['post_types'][ $key ] ) ? esc_attr( $settings['post_types'][ $key ] ) : '';
|
65 |
-
|
66 |
-
?>
|
67 |
-
<p>
|
68 |
-
<input type="checkbox" id="<?php echo $key; ?>" name="easy-image-gallery[post_types][<?php echo $key; ?>]" <?php checked( $post_types, 'on' ); ?>/><label for="<?php echo $key; ?>"> <?php echo $label; ?></label>
|
69 |
-
</p>
|
70 |
-
<?php } ?>
|
71 |
-
<?php
|
72 |
-
|
73 |
}
|
74 |
|
75 |
/**
|
76 |
-
*
|
77 |
*
|
78 |
-
* @since 1.
|
79 |
*/
|
80 |
-
function
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
$output['lightbox'] = $input['lightbox'];
|
90 |
-
|
91 |
-
// post types
|
92 |
-
$post_types = isset( $input['post_types'] ) ? $input['post_types'] : '';
|
93 |
-
|
94 |
-
// only loop through if there are post types in the array
|
95 |
-
if ( $post_types ) {
|
96 |
-
foreach ( $post_types as $post_type => $value )
|
97 |
-
$output[ 'post_types' ][ $post_type ] = isset( $input[ 'post_types' ][ $post_type ] ) ? 'on' : '';
|
98 |
-
}
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
return apply_filters( 'easy_image_gallery_settings_sanitize', $output, $input );
|
103 |
-
|
104 |
}
|
105 |
-
|
106 |
-
/**
|
107 |
-
* Action Links
|
108 |
-
*
|
109 |
-
* @since 1.0
|
110 |
-
*/
|
111 |
-
function easy_image_gallery_plugin_action_links( $links ) {
|
112 |
-
|
113 |
-
$settings_link = '<a href="' . admin_url( 'options-media.php' ) . '">'. __( 'Settings', 'easy-image-gallery' ) .'</a>';
|
114 |
-
array_unshift( $links, $settings_link );
|
115 |
-
|
116 |
-
return $links;
|
117 |
-
}
|
1 |
<?php
|
2 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
3 |
+
exit;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
}
|
5 |
|
6 |
/**
|
7 |
+
* Add EIG Plugin Options Page
|
8 |
*
|
9 |
+
* @since 1.4.1
|
10 |
*/
|
11 |
+
function add_eig_plugin_page() {
|
12 |
+
add_menu_page(
|
13 |
+
__( 'Easy Image Gallery Settings', 'easy-image-gallery' ),
|
14 |
+
__( 'Easy Image Gallery', 'easy-image-gallery' ),
|
15 |
+
'manage_options',
|
16 |
+
EASY_IMAGE_GALLERY_DIR . 'includes/view/admin-page-view.php',
|
17 |
+
'',
|
18 |
+
'dashicons-images-alt2',
|
19 |
+
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
20 |
}
|
21 |
+
add_action( 'admin_menu', 'add_eig_plugin_page' );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/gutenberg-block/dist/blocks.build.js
CHANGED
@@ -84,7 +84,7 @@ eval("Object.defineProperty(__webpack_exports__, \"__esModule\", { value: true }
|
|
84 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
85 |
|
86 |
"use strict";
|
87 |
-
eval("/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__style_scss__ = __webpack_require__(/*! ./style.scss */ 2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__style_scss___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__style_scss__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__editor_scss__ = __webpack_require__(/*! ./editor.scss */ 3);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__editor_scss___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__editor_scss__);\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }\n\n/**\n * BLOCK: easy-image-gallery-block\n *\n * Registering a basic block with Gutenberg.\n * Simple block, renders and saves the same content without any interactivity.\n */\n\n// Import CSS.\n\n\n\nvar __ = wp.i18n.__; // Import __() from wp.i18n\n\n// Import registerBlockType() from wp.blocks\n\nvar _wp$blocks = wp.blocks,\n BlockControls = _wp$blocks.BlockControls,\n registerBlockType = _wp$blocks.registerBlockType;\n\n//Import MediaUpload from wp.editor\n\nvar _wp$editor = wp.editor,\n MediaUpload = _wp$editor.MediaUpload,\n InspectorControls = _wp$editor.InspectorControls;\n\n//Import Button from wp.components\n\nvar _wp$components = wp.components,\n PanelBody = _wp$components.PanelBody,\n PanelRow = _wp$components.PanelRow,\n Button = _wp$components.Button,\n FormToggle = _wp$components.FormToggle,\n SelectControl = _wp$components.SelectControl;\nvar Fragment = wp.element.Fragment;\n\n/**\n * Register: aa Gutenberg Block.\n *\n * Registers a new block provided a unique name and an object defining its\n * behavior. Once registered, the block is made editor as an option to any\n * editor interface where blocks are implemented.\n *\n * @link https://wordpress.org/gutenberg/handbook/block-api/\n * @param {string} name Block name.\n * @param {Object} settings Block settings.\n * @return {?WPBlock} The block, if it has been successfully\n * registered; otherwise `undefined`.\n */\n\nvar ID = function ID() {\n\t// Math.random should be unique because of its seeding algorithm.\n\t// Convert it to base 36 (numbers + letters), and grab the first 9 characters\n\t// after the decimal.\n\treturn '_' + Math.random().toString(36).substr(2, 9);\n};\n\nvar uniqueNumber = function uniqueNumber() {\n\t// Math.random should be unique because of its seeding algorithm.\n\t// Convert it to base 36 (numbers + letters), and grab the first 9 characters\n\t// after the decimal.\n\treturn Math.floor(100 + Math.random() * 900);\n};\n\nregisterBlockType('devrix/easy-image-gallery-block', {\n\t// Block name. Block names must be string that contains a namespace prefix. Example: my-plugin/my-custom-block.\n\ttitle: 'Easy Image Gallery', // Block title.\n\ticon: 'format-gallery', // Block icon from Dashicons → https://developer.wordpress.org/resource/dashicons/.\n\tcategory: 'common', // Block category — Group blocks together based on common traits E.g. common, formatting, layout widgets, embed.\n\tkeywords: [__('easy-image-gallery-block'), __('Easy Image Gallery')],\n\tattributes: { //Attributes\n\t\timages: { //Images array\n\t\t\ttype: 'array'\n\t\t},\n\t\tid: {\n\t\t\ttype: 'string'\n\t\t},\n\t\tunique_number: {\n\t\t\ttype: 'number'\n\t\t},\n\t\tlink_images: {\n\t\t\ttype: 'boolean',\n\t\t\tdefault: false\n\t\t},\n\t\tlightbox_option: {\n\t\t\ttype: 'string'\n\t\t}\n\t},\n\n\t/**\n * The edit function describes the structure of your block in the context of the editor.\n * This represents what the editor will render when the block is used.\n *\n * The \"edit\" property must be a valid function.\n *\n * @link https://wordpress.org/gutenberg/handbook/block-api/block-edit-save/\n */\n\tedit: function edit(_ref) {\n\t\tvar attributes = _ref.attributes,\n\t\t className = _ref.className,\n\t\t setAttributes = _ref.setAttributes,\n\t\t isSelected = _ref.isSelected;\n\n\t\t//Destructuring the images array attribute\n\t\tvar _attributes$images = attributes.images,\n\t\t images = _attributes$images === undefined ? [] : _attributes$images,\n\t\t link_images = attributes.link_images,\n\t\t lightbox_option = attributes.lightbox_option,\n\t\t unique_number = attributes.unique_number;\n\n\t\t// This removes an image from the gallery\n\n\t\tvar removeImage = function removeImage(_removeImage) {\n\t\t\t//filter the images\n\t\t\tvar newImages = images.filter(function (image) {\n\t\t\t\t//If the current image is equal to removeImage the image will be returnd\n\t\t\t\tif (image.id != _removeImage.id) {\n\t\t\t\t\treturn image;\n\t\t\t\t}\n\t\t\t});\n\n\t\t\t//Saves the new state\n\t\t\tsetAttributes({\n\t\t\t\timages: newImages\n\t\t\t});\n\t\t};\n\n\t\tif (typeof lightbox_option == 'undefined') {\n\t\t\tsetAttributes({ lightbox_option: 'fancybox' });\n\t\t}\n\n\t\tvar toggleLinkImages = function toggleLinkImages() {\n\t\t\tsetAttributes({ link_images: !link_images });\n\t\t\tsetAttributes({ unique_number: uniqueNumber() });\n\t\t};\n\n\t\tvar setLightbox = function setLightbox(lightbox_option) {\n\t\t\tsetAttributes({ unique_number: uniqueNumber() });\n\t\t\tsetAttributes({ lightbox_option: lightbox_option });\n\t\t};\n\n\t\t//Displays the images\n\t\tvar displayImages = function displayImages(images) {\n\t\t\treturn (\n\t\t\t\t//Loops throug the images\n\t\t\t\timages.map(function (image) {\n\t\t\t\t\treturn wp.element.createElement(\n\t\t\t\t\t\t'div',\n\t\t\t\t\t\t{ className: 'gallery-item-container' },\n\t\t\t\t\t\twp.element.createElement('img', { className: 'gallery-item', src: image.url, key: images.id }),\n\t\t\t\t\t\tisSelected && wp.element.createElement(\n\t\t\t\t\t\t\t'div',\n\t\t\t\t\t\t\t{ className: 'remove-item' },\n\t\t\t\t\t\t\twp.element.createElement('span', { 'class': 'dashicons dashicons-trash', onClick: function onClick() {\n\t\t\t\t\t\t\t\t\treturn removeImage(image);\n\t\t\t\t\t\t\t\t} })\n\t\t\t\t\t\t)\n\t\t\t\t\t);\n\t\t\t\t})\n\t\t\t);\n\t\t};\n\t\tvar _id = \"\";\n\t\tif (attributes['id'] != undefined) {\n\t\t\t_id = attributes['id'];\n\t\t} else {\n\t\t\t_id = ID();\n\t\t}\n\t\tsetAttributes({ id: _id });\n\n\t\t//JSX to return\n\t\treturn wp.element.createElement(\n\t\t\tFragment,\n\t\t\tnull,\n\t\t\twp.element.createElement(\n\t\t\t\tInspectorControls,\n\t\t\t\tnull,\n\t\t\t\twp.element.createElement(\n\t\t\t\t\tPanelBody,\n\t\t\t\t\tnull,\n\t\t\t\t\twp.element.createElement(\n\t\t\t\t\t\tPanelRow,\n\t\t\t\t\t\tnull,\n\t\t\t\t\t\twp.element.createElement(\n\t\t\t\t\t\t\t'label',\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\thtmlFor: 'link-images-form-toggle'\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t__('Link images to larger sizes', 'dx-link-images')\n\t\t\t\t\t\t),\n\t\t\t\t\t\twp.element.createElement(FormToggle, {\n\t\t\t\t\t\t\tid: 'link-images-form-toggle',\n\t\t\t\t\t\t\tlabel: __('Link images to larger sizes', 'dx-link-images'),\n\t\t\t\t\t\t\tchecked: link_images,\n\t\t\t\t\t\t\tonChange: toggleLinkImages\n\t\t\t\t\t\t})\n\t\t\t\t\t),\n\t\t\t\t\twp.element.createElement(\n\t\t\t\t\t\tPanelRow,\n\t\t\t\t\t\tnull,\n\t\t\t\t\t\twp.element.createElement(SelectControl, {\n\t\t\t\t\t\t\tlabel: __('Lightbox:'),\n\t\t\t\t\t\t\tvalue: lightbox_option,\n\t\t\t\t\t\t\tonChange: setLightbox,\n\t\t\t\t\t\t\toptions: [{ value: 'fancybox', label: 'fancyBox' }, { value: 'pretty-photo', label: 'prettyPhoto' }, { value: 'luminous', label: 'Luminous' }]\n\t\t\t\t\t\t})\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t),\n\t\t\twp.element.createElement(\n\t\t\t\t'div',\n\t\t\t\tnull,\n\t\t\t\twp.element.createElement(\n\t\t\t\t\t'ul',\n\t\t\t\t\t{ className: 'image-gallery thumbnails-4 linked', 'data-total-slides': images.length },\n\t\t\t\t\tdisplayImages(images)\n\t\t\t\t),\n\t\t\t\tisSelected && wp.element.createElement(MediaUpload, {\n\t\t\t\t\tonSelect: function onSelect(media) {\n\t\t\t\t\t\tsetAttributes({ images: [].concat(_toConsumableArray(images), _toConsumableArray(media)) });\n\t\t\t\t\t},\n\t\t\t\t\ttype: 'image',\n\t\t\t\t\tmultiple: true,\n\t\t\t\t\tvalue: images,\n\t\t\t\t\trender: function render(_ref2) {\n\t\t\t\t\t\tvar open = _ref2.open;\n\t\t\t\t\t\treturn wp.element.createElement(\n\t\t\t\t\t\t\tButton,\n\t\t\t\t\t\t\t{ className: 'select-images-button is-button is-default is-large', onClick: open },\n\t\t\t\t\t\t\t'Add images'\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t)\n\t\t);\n\t},\n\n\n\t/**\n * The save function defines the way in which the different attributes should be combined\n * into the final markup, which is then serialized by Gutenberg into post_content.\n *\n * The \"save\" property must be specified and must be a valid function.\n *\n * @link https://wordpress.org/gutenberg/handbook/block-api/block-edit-save/\n */\n\tsave: function save(_ref3) {\n\t\tvar attributes = _ref3.attributes;\n\n\t\t//Destructuring the images array attribute\n\t\tvar images = attributes.images,\n\t\t link_images = attributes.link_images,\n\t\t lightbox_option = attributes.lightbox_option,\n\t\t unique_number = attributes.unique_number;\n\n\n\t\tif (typeof images === 'undefined') {\n\t\t\treturn false;\n\t\t}\n\n\t\t//let rel = \"rel=\\\"prettyphoto[\" + attributes['id'] + \"]\\\"\"\n\t\tvar data_fancybox = 'gallery';\n\n\t\t// Displays the images\n\t\tvar displayImages = function displayImages(images) {\n\n\t\t\treturn images.map(function (image, index) {\n\t\t\t\tvar imgSize = 'thumbnail';\n\t\t\t\tvar imgHrefSize = 'large';\n\n\t\t\t\tif (typeof image.sizes['thumbnail'] === 'undefined') {\n\t\t\t\t\timgSize = 'full';\n\t\t\t\t}\n\n\t\t\t\tif (typeof image.sizes['large'] === 'undefined') {\n\t\t\t\t\timgHrefSize = 'full';\n\t\t\t\t}\n\n\t\t\t\tvar imageWidth = image.sizes[imgSize]['width'];\n\t\t\t\tvar imageHeight = image.sizes[imgSize]['height'];\n\t\t\t\tvar imageThumb = image.sizes[imgSize]['url'];\n\t\t\t\tvar imageHrefUrl = image.sizes[imgHrefSize]['url'];\n\n\t\t\t\tvar lightbox_attr_data = {\n\t\t\t\t\t'fancybox': { 'key': 'data-fancybox', 'value': data_fancybox + unique_number },\n\t\t\t\t\t'pretty-photo': { 'key': 'rel', 'value': 'prettyPhoto[group-' + unique_number + ']' },\n\t\t\t\t\t'luminous': { 'key': 'rel', 'value': 'luminous[group-' + unique_number + ']' }\n\t\t\t\t};\n\n\t\t\t\treturn wp.element.createElement(\n\t\t\t\t\t'li',\n\t\t\t\t\tnull,\n\t\t\t\t\tlink_images && wp.element.createElement(\n\t\t\t\t\t\t'a',\n\t\t\t\t\t\t_extends({ href: imageHrefUrl }, _defineProperty({}, lightbox_attr_data[lightbox_option]['key'], lightbox_attr_data[lightbox_option]['value']), { 'data-caption': image.caption, className: 'eig-popup' }),\n\t\t\t\t\t\twp.element.createElement('i', { className: 'icon-view' }),\n\t\t\t\t\t\twp.element.createElement('span', { className: 'overlay' }),\n\t\t\t\t\t\twp.element.createElement('img', {\n\t\t\t\t\t\t\tclassName: 'attachment-thumbnail size-thumbnail',\n\t\t\t\t\t\t\tkey: images.id,\n\t\t\t\t\t\t\tsrc: imageThumb,\n\t\t\t\t\t\t\t'data-slide-no': index,\n\t\t\t\t\t\t\talt: image.alt,\n\t\t\t\t\t\t\twidth: imageWidth,\n\t\t\t\t\t\t\theight: imageHeight\n\t\t\t\t\t\t})\n\t\t\t\t\t),\n\t\t\t\t\t!link_images && wp.element.createElement('img', {\n\t\t\t\t\t\tclassName: 'attachment-thumbnail size-thumbnail',\n\t\t\t\t\t\tkey: images.id,\n\t\t\t\t\t\tsrc: imageThumb,\n\t\t\t\t\t\t'data-slide-no': index,\n\t\t\t\t\t\talt: image.alt,\n\t\t\t\t\t\twidth: imageWidth,\n\t\t\t\t\t\theight: imageHeight\n\t\t\t\t\t})\n\t\t\t\t);\n\t\t\t});\n\t\t};\n\n\t\t//JSX to return\n\t\treturn wp.element.createElement(\n\t\t\t'ul',\n\t\t\t{ className: 'easy-image-gallery thumbnails-4 linked', 'data-total-slides': images.length },\n\t\t\tdisplayImages(images),\n\t\t\t'luminous' == lightbox_option && wp.element.createElement(\n\t\t\t\t'script',\n\t\t\t\tnull,\n\t\t\t\t'new LuminousGallery(document.querySelectorAll(\"a[rel=\\'luminous[group-',\n\t\t\t\tunique_number,\n\t\t\t\t']\\']\"));'\n\t\t\t)\n\t\t);\n\t}\n});//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMS5qcyIsInNvdXJjZXMiOlsid2VicGFjazovLy8uL3NyYy9ibG9jay9ibG9jay5qcz85MjFkIl0sInNvdXJjZXNDb250ZW50IjpbInZhciBfZXh0ZW5kcyA9IE9iamVjdC5hc3NpZ24gfHwgZnVuY3Rpb24gKHRhcmdldCkgeyBmb3IgKHZhciBpID0gMTsgaSA8IGFyZ3VtZW50cy5sZW5ndGg7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0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///1\n");
|
88 |
|
89 |
/***/ }),
|
90 |
/* 2 */
|
@@ -94,7 +94,7 @@ eval("/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__style_scss__ = __web
|
|
94 |
/*! dynamic exports provided */
|
95 |
/***/ (function(module, exports) {
|
96 |
|
97 |
-
eval("// removed by extract-text-webpack-plugin//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,
|
98 |
|
99 |
/***/ }),
|
100 |
/* 3 */
|
@@ -104,7 +104,7 @@ eval("// removed by extract-text-webpack-plugin//# sourceURL=[module]\n//# sourc
|
|
104 |
/*! dynamic exports provided */
|
105 |
/***/ (function(module, exports) {
|
106 |
|
107 |
-
eval("// removed by extract-text-webpack-plugin//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,
|
108 |
|
109 |
/***/ })
|
110 |
/******/ ]);
|
84 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
85 |
|
86 |
"use strict";
|
87 |
+
eval("/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__style_scss__ = __webpack_require__(/*! ./style.scss */ 2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__style_scss___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__style_scss__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__editor_scss__ = __webpack_require__(/*! ./editor.scss */ 3);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__editor_scss___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__editor_scss__);\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }\n\n/**\n * BLOCK: easy-image-gallery-block\n *\n * Registering a basic block with Gutenberg.\n * Simple block, renders and saves the same content without any interactivity.\n */\n\n// Import CSS.\n\n\n\nvar __ = wp.i18n.__; // Import __() from wp.i18n\n\n// Import registerBlockType() from wp.blocks\n\nvar _wp$blocks = wp.blocks,\n BlockControls = _wp$blocks.BlockControls,\n registerBlockType = _wp$blocks.registerBlockType;\n\n//Import MediaUpload from wp.editor\n\nvar _wp$editor = wp.editor,\n MediaUpload = _wp$editor.MediaUpload,\n InspectorControls = _wp$editor.InspectorControls;\n\n//Import Button from wp.components\n\nvar _wp$components = wp.components,\n PanelBody = _wp$components.PanelBody,\n PanelRow = _wp$components.PanelRow,\n Button = _wp$components.Button,\n FormToggle = _wp$components.FormToggle,\n SelectControl = _wp$components.SelectControl;\nvar Fragment = wp.element.Fragment;\n\n/**\n * Register: aa Gutenberg Block.\n *\n * Registers a new block provided a unique name and an object defining its\n * behavior. Once registered, the block is made editor as an option to any\n * editor interface where blocks are implemented.\n *\n * @link https://wordpress.org/gutenberg/handbook/block-api/\n * @param {string} name Block name.\n * @param {Object} settings Block settings.\n * @return {?WPBlock} The block, if it has been successfully\n * registered; otherwise `undefined`.\n */\n\nvar ID = function ID() {\n\t// Math.random should be unique because of its seeding algorithm.\n\t// Convert it to base 36 (numbers + letters), and grab the first 9 characters\n\t// after the decimal.\n\treturn '_' + Math.random().toString(36).substr(2, 9);\n};\n\nvar uniqueNumber = function uniqueNumber() {\n\t// Math.random should be unique because of its seeding algorithm.\n\t// Convert it to base 36 (numbers + letters), and grab the first 9 characters\n\t// after the decimal.\n\treturn Math.floor(100 + Math.random() * 900);\n};\n\nregisterBlockType('devrix/easy-image-gallery-block', {\n\t// Block name. Block names must be string that contains a namespace prefix. Example: my-plugin/my-custom-block.\n\ttitle: 'Easy Image Gallery', // Block title.\n\ticon: 'format-gallery', // Block icon from Dashicons → https://developer.wordpress.org/resource/dashicons/.\n\tcategory: 'common', // Block category — Group blocks together based on common traits E.g. common, formatting, layout widgets, embed.\n\tkeywords: [__('easy-image-gallery-block'), __('Easy Image Gallery')],\n\tattributes: { //Attributes\n\t\timages: { //Images array\n\t\t\ttype: 'array'\n\t\t},\n\t\tid: {\n\t\t\ttype: 'string'\n\t\t},\n\t\tunique_number: {\n\t\t\ttype: 'number'\n\t\t},\n\t\tlink_images: {\n\t\t\ttype: 'boolean',\n\t\t\tdefault: true\n\t\t},\n\t\tlightbox_option: {\n\t\t\ttype: 'string'\n\t\t}\n\t},\n\n\t/**\n * The edit function describes the structure of your block in the context of the editor.\n * This represents what the editor will render when the block is used.\n *\n * The \"edit\" property must be a valid function.\n *\n * @link https://wordpress.org/gutenberg/handbook/block-api/block-edit-save/\n */\n\tedit: function edit(_ref) {\n\t\tvar attributes = _ref.attributes,\n\t\t className = _ref.className,\n\t\t setAttributes = _ref.setAttributes,\n\t\t isSelected = _ref.isSelected;\n\n\t\t//Destructuring the images array attribute\n\t\tvar _attributes$images = attributes.images,\n\t\t images = _attributes$images === undefined ? [] : _attributes$images,\n\t\t link_images = attributes.link_images,\n\t\t lightbox_option = attributes.lightbox_option,\n\t\t unique_number = attributes.unique_number;\n\n\t\t// This removes an image from the gallery\n\n\t\tvar removeImage = function removeImage(_removeImage) {\n\t\t\t//filter the images\n\t\t\tvar newImages = images.filter(function (image) {\n\t\t\t\t//If the current image is equal to removeImage the image will be returnd\n\t\t\t\tif (image.id != _removeImage.id) {\n\t\t\t\t\treturn image;\n\t\t\t\t}\n\t\t\t});\n\n\t\t\t//Saves the new state\n\t\t\tsetAttributes({\n\t\t\t\timages: newImages\n\t\t\t});\n\t\t};\n\n\t\tif (typeof lightbox_option == 'undefined') {\n\t\t\tsetAttributes({ lightbox_option: 'fancybox' });\n\t\t}\n\n\t\tvar toggleLinkImages = function toggleLinkImages() {\n\t\t\tsetAttributes({ link_images: !link_images });\n\t\t\tsetAttributes({ unique_number: uniqueNumber() });\n\t\t};\n\n\t\tvar setLightbox = function setLightbox(lightbox_option) {\n\t\t\tsetAttributes({ unique_number: uniqueNumber() });\n\t\t\tsetAttributes({ lightbox_option: lightbox_option });\n\t\t};\n\n\t\t//Displays the images\n\t\tvar displayImages = function displayImages(images) {\n\t\t\treturn (\n\t\t\t\t//Loops throug the images\n\t\t\t\timages.map(function (image) {\n\t\t\t\t\treturn wp.element.createElement(\n\t\t\t\t\t\t'div',\n\t\t\t\t\t\t{ className: 'gallery-item-container' },\n\t\t\t\t\t\twp.element.createElement('img', { className: 'gallery-item', src: image.url, key: images.id }),\n\t\t\t\t\t\tisSelected && wp.element.createElement(\n\t\t\t\t\t\t\t'div',\n\t\t\t\t\t\t\t{ className: 'remove-item' },\n\t\t\t\t\t\t\twp.element.createElement('span', { 'class': 'dashicons dashicons-trash', onClick: function onClick() {\n\t\t\t\t\t\t\t\t\treturn removeImage(image);\n\t\t\t\t\t\t\t\t} })\n\t\t\t\t\t\t)\n\t\t\t\t\t);\n\t\t\t\t})\n\t\t\t);\n\t\t};\n\t\tvar _id = \"\";\n\t\tif (attributes['id'] != undefined) {\n\t\t\t_id = attributes['id'];\n\t\t} else {\n\t\t\t_id = ID();\n\t\t}\n\t\tsetAttributes({ id: _id });\n\n\t\t//JSX to return\n\t\treturn wp.element.createElement(\n\t\t\tFragment,\n\t\t\tnull,\n\t\t\twp.element.createElement(\n\t\t\t\tInspectorControls,\n\t\t\t\tnull,\n\t\t\t\twp.element.createElement(\n\t\t\t\t\tPanelBody,\n\t\t\t\t\tnull,\n\t\t\t\t\twp.element.createElement(\n\t\t\t\t\t\tPanelRow,\n\t\t\t\t\t\tnull,\n\t\t\t\t\t\twp.element.createElement(\n\t\t\t\t\t\t\t'label',\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\thtmlFor: 'link-images-form-toggle'\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t__('Link images to larger sizes', 'dx-link-images')\n\t\t\t\t\t\t),\n\t\t\t\t\t\twp.element.createElement(FormToggle, {\n\t\t\t\t\t\t\tid: 'link-images-form-toggle',\n\t\t\t\t\t\t\tlabel: __('Link images to larger sizes', 'dx-link-images'),\n\t\t\t\t\t\t\tchecked: link_images,\n\t\t\t\t\t\t\tonChange: toggleLinkImages\n\t\t\t\t\t\t})\n\t\t\t\t\t),\n\t\t\t\t\twp.element.createElement(\n\t\t\t\t\t\tPanelRow,\n\t\t\t\t\t\tnull,\n\t\t\t\t\t\twp.element.createElement(SelectControl, {\n\t\t\t\t\t\t\tlabel: __('Lightbox:'),\n\t\t\t\t\t\t\tvalue: lightbox_option,\n\t\t\t\t\t\t\tonChange: setLightbox,\n\t\t\t\t\t\t\toptions: [{ value: 'fancybox', label: 'fancyBox' }, { value: 'pretty-photo', label: 'prettyPhoto' }, { value: 'luminous', label: 'Luminous' }]\n\t\t\t\t\t\t})\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t),\n\t\t\twp.element.createElement(\n\t\t\t\t'div',\n\t\t\t\tnull,\n\t\t\t\twp.element.createElement(\n\t\t\t\t\t'ul',\n\t\t\t\t\t{ className: 'image-gallery thumbnails-4 linked', 'data-total-slides': images.length },\n\t\t\t\t\tdisplayImages(images)\n\t\t\t\t),\n\t\t\t\tisSelected && wp.element.createElement(MediaUpload, {\n\t\t\t\t\tonSelect: function onSelect(media) {\n\t\t\t\t\t\tsetAttributes({ images: [].concat(_toConsumableArray(images), _toConsumableArray(media)) });\n\t\t\t\t\t},\n\t\t\t\t\ttype: 'image',\n\t\t\t\t\tmultiple: true,\n\t\t\t\t\tvalue: images,\n\t\t\t\t\trender: function render(_ref2) {\n\t\t\t\t\t\tvar open = _ref2.open;\n\t\t\t\t\t\treturn wp.element.createElement(\n\t\t\t\t\t\t\tButton,\n\t\t\t\t\t\t\t{ className: 'select-images-button is-button is-default is-large', onClick: open },\n\t\t\t\t\t\t\t'Add images'\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t)\n\t\t);\n\t},\n\n\n\t/**\n * The save function defines the way in which the different attributes should be combined\n * into the final markup, which is then serialized by Gutenberg into post_content.\n *\n * The \"save\" property must be specified and must be a valid function.\n *\n * @link https://wordpress.org/gutenberg/handbook/block-api/block-edit-save/\n */\n\tsave: function save(_ref3) {\n\t\tvar attributes = _ref3.attributes;\n\n\t\t//Destructuring the images array attribute\n\t\tvar images = attributes.images,\n\t\t link_images = attributes.link_images,\n\t\t lightbox_option = attributes.lightbox_option,\n\t\t unique_number = attributes.unique_number;\n\n\n\t\tif (typeof images === 'undefined') {\n\t\t\treturn false;\n\t\t}\n\n\t\t//let rel = \"rel=\\\"prettyphoto[\" + attributes['id'] + \"]\\\"\"\n\t\tvar data_fancybox = 'gallery';\n\n\t\t// Displays the images\n\t\tvar displayImages = function displayImages(images) {\n\n\t\t\treturn images.map(function (image, index) {\n\t\t\t\tvar imgSize = 'thumbnail';\n\t\t\t\tvar imgHrefSize = 'large';\n\n\t\t\t\tif (typeof image.sizes['thumbnail'] === 'undefined') {\n\t\t\t\t\timgSize = 'full';\n\t\t\t\t}\n\n\t\t\t\tif (typeof image.sizes['large'] === 'undefined') {\n\t\t\t\t\timgHrefSize = 'full';\n\t\t\t\t}\n\n\t\t\t\tvar imageWidth = image.sizes[imgSize]['width'];\n\t\t\t\tvar imageHeight = image.sizes[imgSize]['height'];\n\t\t\t\tvar imageThumb = image.sizes[imgSize]['url'];\n\t\t\t\tvar imageHrefUrl = image.sizes[imgHrefSize]['url'];\n\n\t\t\t\tvar lightbox_attr_data = {\n\t\t\t\t\t'fancybox': { 'key': 'data-fancybox', 'value': data_fancybox + unique_number },\n\t\t\t\t\t'pretty-photo': { 'key': 'rel', 'value': 'prettyPhoto[group-' + unique_number + ']' },\n\t\t\t\t\t'luminous': { 'key': 'rel', 'value': 'luminous[group-' + unique_number + ']' }\n\t\t\t\t};\n\n\t\t\t\treturn wp.element.createElement(\n\t\t\t\t\t'li',\n\t\t\t\t\tnull,\n\t\t\t\t\tlink_images && wp.element.createElement(\n\t\t\t\t\t\t'a',\n\t\t\t\t\t\t_extends({ href: imageHrefUrl }, _defineProperty({}, lightbox_attr_data[lightbox_option]['key'], lightbox_attr_data[lightbox_option]['value']), { 'data-caption': image.caption, className: 'eig-popup' }),\n\t\t\t\t\t\twp.element.createElement('i', { className: 'icon-view' }),\n\t\t\t\t\t\twp.element.createElement('span', { className: 'overlay' }),\n\t\t\t\t\t\twp.element.createElement('img', {\n\t\t\t\t\t\t\tclassName: 'attachment-thumbnail size-thumbnail',\n\t\t\t\t\t\t\tkey: images.id,\n\t\t\t\t\t\t\tsrc: imageThumb,\n\t\t\t\t\t\t\t'data-slide-no': index,\n\t\t\t\t\t\t\talt: image.alt,\n\t\t\t\t\t\t\twidth: imageWidth,\n\t\t\t\t\t\t\theight: imageHeight\n\t\t\t\t\t\t})\n\t\t\t\t\t),\n\t\t\t\t\t!link_images && wp.element.createElement('img', {\n\t\t\t\t\t\tclassName: 'attachment-thumbnail size-thumbnail',\n\t\t\t\t\t\tkey: images.id,\n\t\t\t\t\t\tsrc: imageThumb,\n\t\t\t\t\t\t'data-slide-no': index,\n\t\t\t\t\t\talt: image.alt,\n\t\t\t\t\t\twidth: imageWidth,\n\t\t\t\t\t\theight: imageHeight\n\t\t\t\t\t})\n\t\t\t\t);\n\t\t\t});\n\t\t};\n\n\t\t//JSX to return\n\t\treturn wp.element.createElement(\n\t\t\t'ul',\n\t\t\t{ className: 'easy-image-gallery thumbnails-4 linked', 'data-total-slides': images.length },\n\t\t\tdisplayImages(images),\n\t\t\t'luminous' == lightbox_option && wp.element.createElement(\n\t\t\t\t'script',\n\t\t\t\tnull,\n\t\t\t\t'new LuminousGallery(document.querySelectorAll(\"a[rel=\\'luminous[group-',\n\t\t\t\tunique_number,\n\t\t\t\t']\\']\"));'\n\t\t\t)\n\t\t);\n\t}\n});//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMS5qcyIsInNvdXJjZXMiOlsid2VicGFjazovLy8uL3NyYy9ibG9jay9ibG9jay5qcz85MjFkIl0sInNvdXJjZXNDb250ZW50IjpbInZhciBfZXh0ZW5kcyA9IE9iamVjdC5hc3NpZ24gfHwgZnVuY3Rpb24gKHRhcmdldCkgeyBmb3IgKHZhciBpID0gMTsgaSA8IGFyZ3VtZW50cy5sZW5ndGg7IGkrKykgeyB2YXIgc291cmNlID0gYXJndW1lbnRzW2ldOyBmb3IgKHZhciBrZXkgaW4gc291cmNlKSB7IGlmIChPYmplY3QucHJvdG90eXBlLmhhc093blByb3BlcnR5LmNhbGwoc291cmNlLCBrZXkpKSB7IHRhcmdldFtrZXldID0gc291cmNlW2tleV07IH0gfSB9IHJldHVybiB0YXJnZXQ7IH07XG5cbmZ1bmN0aW9uIF9kZWZpbmVQcm9wZXJ0eShvYmosIGtleSwgdmFsdWUpIHsgaWYgKGtleSBpbiBvYmopIHsgT2JqZWN0LmRlZmluZVBy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tBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBIiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///1\n");
|
88 |
|
89 |
/***/ }),
|
90 |
/* 2 */
|
94 |
/*! dynamic exports provided */
|
95 |
/***/ (function(module, exports) {
|
96 |
|
97 |
+
eval("// removed by extract-text-webpack-plugin//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMi5qcyIsInNvdXJjZXMiOlsid2VicGFjazovLy8uL3NyYy9ibG9jay9zdHlsZS5zY3NzPzljMWEiXSwic291cmNlc0NvbnRlbnQiOlsiLy8gcmVtb3ZlZCBieSBleHRyYWN0LXRleHQtd2VicGFjay1wbHVnaW5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL3NyYy9ibG9jay9zdHlsZS5zY3NzXG4vLyBtb2R1bGUgaWQgPSAyXG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUEiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///2\n");
|
98 |
|
99 |
/***/ }),
|
100 |
/* 3 */
|
104 |
/*! dynamic exports provided */
|
105 |
/***/ (function(module, exports) {
|
106 |
|
107 |
+
eval("// removed by extract-text-webpack-plugin//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMy5qcyIsInNvdXJjZXMiOlsid2VicGFjazovLy8uL3NyYy9ibG9jay9lZGl0b3Iuc2Nzcz9kMDVmIl0sInNvdXJjZXNDb250ZW50IjpbIi8vIHJlbW92ZWQgYnkgZXh0cmFjdC10ZXh0LXdlYnBhY2stcGx1Z2luXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9zcmMvYmxvY2svZWRpdG9yLnNjc3Ncbi8vIG1vZHVsZSBpZCA9IDNcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQSIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///3\n");
|
108 |
|
109 |
/***/ })
|
110 |
/******/ ]);
|
includes/gutenberg-block/dist/blocks.script.js
ADDED
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
|
2 |
+
jQuery(document).ready(function() {
|
3 |
+
jQuery("a[rel^='prettyPhoto']").prettyPhoto({
|
4 |
+
social_tools : false,
|
5 |
+
show_title : false
|
6 |
+
});
|
7 |
+
});
|
includes/gutenberg-block/src/block/block.js
CHANGED
@@ -84,7 +84,7 @@ registerBlockType( 'devrix/easy-image-gallery-block', {
|
|
84 |
},
|
85 |
link_images : {
|
86 |
type: 'boolean',
|
87 |
-
default:
|
88 |
},
|
89 |
lightbox_option : {
|
90 |
type: 'string',
|
84 |
},
|
85 |
link_images : {
|
86 |
type: 'boolean',
|
87 |
+
default: true
|
88 |
},
|
89 |
lightbox_option : {
|
90 |
type: 'string',
|
includes/lib/fancybox/blank.gif
ADDED
Binary file
|
includes/lib/fancybox/fancy_close.png
ADDED
Binary file
|
includes/lib/fancybox/fancy_loading.png
ADDED
Binary file
|
includes/lib/fancybox/fancy_nav_left.png
ADDED
Binary file
|
includes/lib/fancybox/fancy_nav_right.png
ADDED
Binary file
|
includes/lib/fancybox/fancy_shadow_e.png
ADDED
Binary file
|
includes/lib/fancybox/fancy_shadow_n.png
ADDED
Binary file
|
includes/lib/fancybox/fancy_shadow_ne.png
ADDED
Binary file
|
includes/lib/fancybox/fancy_shadow_nw.png
ADDED
Binary file
|
includes/lib/fancybox/fancy_shadow_s.png
ADDED
Binary file
|
includes/lib/fancybox/fancy_shadow_se.png
ADDED
Binary file
|
includes/lib/fancybox/fancy_shadow_sw.png
ADDED
Binary file
|
includes/lib/fancybox/fancy_shadow_w.png
ADDED
Binary file
|
includes/lib/fancybox/fancy_title_left.png
ADDED
Binary file
|
includes/lib/fancybox/fancy_title_main.png
ADDED
Binary file
|
includes/lib/fancybox/fancy_title_over.png
ADDED
Binary file
|
includes/lib/fancybox/fancy_title_right.png
ADDED
Binary file
|
includes/lib/fancybox/fancybox-x.png
ADDED
Binary file
|
includes/lib/fancybox/fancybox-y.png
ADDED
Binary file
|
includes/lib/fancybox/fancybox.png
ADDED
Binary file
|
includes/lib/fancybox/fancybox_loading.gif
ADDED
Binary file
|
includes/lib/fancybox/fancybox_loading@2x.gif
ADDED
Binary file
|
includes/lib/fancybox/fancybox_overlay.png
ADDED
Binary file
|
includes/lib/fancybox/fancybox_sprite.png
ADDED
Binary file
|
includes/lib/fancybox/fancybox_sprite@2x.png
ADDED
Binary file
|
includes/lib/fancybox/helpers/fancybox_buttons.png
ADDED
Binary file
|
includes/lib/fancybox/helpers/jquery.fancybox-buttons.css
ADDED
@@ -0,0 +1,97 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
#fancybox-buttons {
|
2 |
+
position: fixed;
|
3 |
+
left: 0;
|
4 |
+
width: 100%;
|
5 |
+
z-index: 8050;
|
6 |
+
}
|
7 |
+
|
8 |
+
#fancybox-buttons.top {
|
9 |
+
top: 10px;
|
10 |
+
}
|
11 |
+
|
12 |
+
#fancybox-buttons.bottom {
|
13 |
+
bottom: 10px;
|
14 |
+
}
|
15 |
+
|
16 |
+
#fancybox-buttons ul {
|
17 |
+
display: block;
|
18 |
+
width: 166px;
|
19 |
+
height: 30px;
|
20 |
+
margin: 0 auto;
|
21 |
+
padding: 0;
|
22 |
+
list-style: none;
|
23 |
+
border: 1px solid #111;
|
24 |
+
border-radius: 3px;
|
25 |
+
-webkit-box-shadow: inset 0 0 0 1px rgba(255,255,255,.05);
|
26 |
+
-moz-box-shadow: inset 0 0 0 1px rgba(255,255,255,.05);
|
27 |
+
box-shadow: inset 0 0 0 1px rgba(255,255,255,.05);
|
28 |
+
background: rgb(50,50,50);
|
29 |
+
background: -moz-linear-gradient(top, rgb(68,68,68) 0%, rgb(52,52,52) 50%, rgb(41,41,41) 50%, rgb(51,51,51) 100%);
|
30 |
+
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgb(68,68,68)), color-stop(50%,rgb(52,52,52)), color-stop(50%,rgb(41,41,41)), color-stop(100%,rgb(51,51,51)));
|
31 |
+
background: -webkit-linear-gradient(top, rgb(68,68,68) 0%,rgb(52,52,52) 50%,rgb(41,41,41) 50%,rgb(51,51,51) 100%);
|
32 |
+
background: -o-linear-gradient(top, rgb(68,68,68) 0%,rgb(52,52,52) 50%,rgb(41,41,41) 50%,rgb(51,51,51) 100%);
|
33 |
+
background: -ms-linear-gradient(top, rgb(68,68,68) 0%,rgb(52,52,52) 50%,rgb(41,41,41) 50%,rgb(51,51,51) 100%);
|
34 |
+
background: linear-gradient(top, rgb(68,68,68) 0%,rgb(52,52,52) 50%,rgb(41,41,41) 50%,rgb(51,51,51) 100%);
|
35 |
+
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#444444', endColorstr='#222222',GradientType=0 );
|
36 |
+
}
|
37 |
+
|
38 |
+
#fancybox-buttons ul li {
|
39 |
+
float: left;
|
40 |
+
margin: 0;
|
41 |
+
padding: 0;
|
42 |
+
}
|
43 |
+
|
44 |
+
#fancybox-buttons a {
|
45 |
+
display: block;
|
46 |
+
width: 30px;
|
47 |
+
height: 30px;
|
48 |
+
text-indent: -9999px;
|
49 |
+
background-color: transparent;
|
50 |
+
background-image: url('fancybox_buttons.png');
|
51 |
+
background-repeat: no-repeat;
|
52 |
+
outline: none;
|
53 |
+
opacity: 0.8;
|
54 |
+
}
|
55 |
+
|
56 |
+
#fancybox-buttons a:hover {
|
57 |
+
opacity: 1;
|
58 |
+
}
|
59 |
+
|
60 |
+
#fancybox-buttons a.btnPrev {
|
61 |
+
background-position: 5px 0;
|
62 |
+
}
|
63 |
+
|
64 |
+
#fancybox-buttons a.btnNext {
|
65 |
+
background-position: -33px 0;
|
66 |
+
border-right: 1px solid #3e3e3e;
|
67 |
+
}
|
68 |
+
|
69 |
+
#fancybox-buttons a.btnPlay {
|
70 |
+
background-position: 0 -30px;
|
71 |
+
}
|
72 |
+
|
73 |
+
#fancybox-buttons a.btnPlayOn {
|
74 |
+
background-position: -30px -30px;
|
75 |
+
}
|
76 |
+
|
77 |
+
#fancybox-buttons a.btnToggle {
|
78 |
+
background-position: 3px -60px;
|
79 |
+
border-left: 1px solid #111;
|
80 |
+
border-right: 1px solid #3e3e3e;
|
81 |
+
width: 35px
|
82 |
+
}
|
83 |
+
|
84 |
+
#fancybox-buttons a.btnToggleOn {
|
85 |
+
background-position: -27px -60px;
|
86 |
+
}
|
87 |
+
|
88 |
+
#fancybox-buttons a.btnClose {
|
89 |
+
border-left: 1px solid #111;
|
90 |
+
width: 35px;
|
91 |
+
background-position: -56px 0px;
|
92 |
+
}
|
93 |
+
|
94 |
+
#fancybox-buttons a.btnDisabled {
|
95 |
+
opacity : 0.4;
|
96 |
+
cursor: default;
|
97 |
+
}
|
includes/lib/fancybox/helpers/jquery.fancybox-buttons.js
ADDED
@@ -0,0 +1,122 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*!
|
2 |
+
* Buttons helper for fancyBox
|
3 |
+
* version: 1.0.5 (Mon, 15 Oct 2012)
|
4 |
+
* @requires fancyBox v2.0 or later
|
5 |
+
*
|
6 |
+
* Usage:
|
7 |
+
* $(".fancybox").fancybox({
|
8 |
+
* helpers : {
|
9 |
+
* buttons: {
|
10 |
+
* position : 'top'
|
11 |
+
* }
|
12 |
+
* }
|
13 |
+
* });
|
14 |
+
*
|
15 |
+
*/
|
16 |
+
(function ($) {
|
17 |
+
//Shortcut for fancyBox object
|
18 |
+
var F = $.fancybox;
|
19 |
+
|
20 |
+
//Add helper object
|
21 |
+
F.helpers.buttons = {
|
22 |
+
defaults : {
|
23 |
+
skipSingle : false, // disables if gallery contains single image
|
24 |
+
position : 'top', // 'top' or 'bottom'
|
25 |
+
tpl : '<div id="fancybox-buttons"><ul><li><a class="btnPrev" title="Previous" href="javascript:;"></a></li><li><a class="btnPlay" title="Start slideshow" href="javascript:;"></a></li><li><a class="btnNext" title="Next" href="javascript:;"></a></li><li><a class="btnToggle" title="Toggle size" href="javascript:;"></a></li><li><a class="btnClose" title="Close" href="javascript:;"></a></li></ul></div>'
|
26 |
+
},
|
27 |
+
|
28 |
+
list : null,
|
29 |
+
buttons: null,
|
30 |
+
|
31 |
+
beforeLoad: function (opts, obj) {
|
32 |
+
//Remove self if gallery do not have at least two items
|
33 |
+
|
34 |
+
if (opts.skipSingle && obj.group.length < 2) {
|
35 |
+
obj.helpers.buttons = false;
|
36 |
+
obj.closeBtn = true;
|
37 |
+
|
38 |
+
return;
|
39 |
+
}
|
40 |
+
|
41 |
+
//Increase top margin to give space for buttons
|
42 |
+
obj.margin[ opts.position === 'bottom' ? 2 : 0 ] += 30;
|
43 |
+
},
|
44 |
+
|
45 |
+
onPlayStart: function () {
|
46 |
+
if (this.buttons) {
|
47 |
+
this.buttons.play.attr('title', 'Pause slideshow').addClass('btnPlayOn');
|
48 |
+
}
|
49 |
+
},
|
50 |
+
|
51 |
+
onPlayEnd: function () {
|
52 |
+
if (this.buttons) {
|
53 |
+
this.buttons.play.attr('title', 'Start slideshow').removeClass('btnPlayOn');
|
54 |
+
}
|
55 |
+
},
|
56 |
+
|
57 |
+
afterShow: function (opts, obj) {
|
58 |
+
var buttons = this.buttons;
|
59 |
+
|
60 |
+
if (!buttons) {
|
61 |
+
this.list = $(opts.tpl).addClass(opts.position).appendTo('body');
|
62 |
+
|
63 |
+
buttons = {
|
64 |
+
prev : this.list.find('.btnPrev').click( F.prev ),
|
65 |
+
next : this.list.find('.btnNext').click( F.next ),
|
66 |
+
play : this.list.find('.btnPlay').click( F.play ),
|
67 |
+
toggle : this.list.find('.btnToggle').click( F.toggle ),
|
68 |
+
close : this.list.find('.btnClose').click( F.close )
|
69 |
+
}
|
70 |
+
}
|
71 |
+
|
72 |
+
//Prev
|
73 |
+
if (obj.index > 0 || obj.loop) {
|
74 |
+
buttons.prev.removeClass('btnDisabled');
|
75 |
+
} else {
|
76 |
+
buttons.prev.addClass('btnDisabled');
|
77 |
+
}
|
78 |
+
|
79 |
+
//Next / Play
|
80 |
+
if (obj.loop || obj.index < obj.group.length - 1) {
|
81 |
+
buttons.next.removeClass('btnDisabled');
|
82 |
+
buttons.play.removeClass('btnDisabled');
|
83 |
+
|
84 |
+
} else {
|
85 |
+
buttons.next.addClass('btnDisabled');
|
86 |
+
buttons.play.addClass('btnDisabled');
|
87 |
+
}
|
88 |
+
|
89 |
+
this.buttons = buttons;
|
90 |
+
|
91 |
+
this.onUpdate(opts, obj);
|
92 |
+
},
|
93 |
+
|
94 |
+
onUpdate: function (opts, obj) {
|
95 |
+
var toggle;
|
96 |
+
|
97 |
+
if (!this.buttons) {
|
98 |
+
return;
|
99 |
+
}
|
100 |
+
|
101 |
+
toggle = this.buttons.toggle.removeClass('btnDisabled btnToggleOn');
|
102 |
+
|
103 |
+
//Size toggle button
|
104 |
+
if (obj.canShrink) {
|
105 |
+
toggle.addClass('btnToggleOn');
|
106 |
+
|
107 |
+
} else if (!obj.canExpand) {
|
108 |
+
toggle.addClass('btnDisabled');
|
109 |
+
}
|
110 |
+
},
|
111 |
+
|
112 |
+
beforeClose: function () {
|
113 |
+
if (this.list) {
|
114 |
+
this.list.remove();
|
115 |
+
}
|
116 |
+
|
117 |
+
this.list = null;
|
118 |
+
this.buttons = null;
|
119 |
+
}
|
120 |
+
};
|
121 |
+
|
122 |
+
}(jQuery));
|
includes/lib/fancybox/helpers/jquery.fancybox-media.js
ADDED
@@ -0,0 +1,199 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*!
|
2 |
+
* Media helper for fancyBox
|
3 |
+
* version: 1.0.6 (Fri, 14 Jun 2013)
|
4 |
+
* @requires fancyBox v2.0 or later
|
5 |
+
*
|
6 |
+
* Usage:
|
7 |
+
* $(".fancybox").fancybox({
|
8 |
+
* helpers : {
|
9 |
+
* media: true
|
10 |
+
* }
|
11 |
+
* });
|
12 |
+
*
|
13 |
+
* Set custom URL parameters:
|
14 |
+
* $(".fancybox").fancybox({
|
15 |
+
* helpers : {
|
16 |
+
* media: {
|
17 |
+
* youtube : {
|
18 |
+
* params : {
|
19 |
+
* autoplay : 0
|
20 |
+
* }
|
21 |
+
* }
|
22 |
+
* }
|
23 |
+
* }
|
24 |
+
* });
|
25 |
+
*
|
26 |
+
* Or:
|
27 |
+
* $(".fancybox").fancybox({,
|
28 |
+
* helpers : {
|
29 |
+
* media: true
|
30 |
+
* },
|
31 |
+
* youtube : {
|
32 |
+
* autoplay: 0
|
33 |
+
* }
|
34 |
+
* });
|
35 |
+
*
|
36 |
+
* Supports:
|
37 |
+
*
|
38 |
+
* Youtube
|
39 |
+
* http://www.youtube.com/watch?v=opj24KnzrWo
|
40 |
+
* http://www.youtube.com/embed/opj24KnzrWo
|
41 |
+
* http://youtu.be/opj24KnzrWo
|
42 |
+
* http://www.youtube-nocookie.com/embed/opj24KnzrWo
|
43 |
+
* Vimeo
|
44 |
+
* http://vimeo.com/40648169
|
45 |
+
* http://vimeo.com/channels/staffpicks/38843628
|
46 |
+
* http://vimeo.com/groups/surrealism/videos/36516384
|
47 |
+
* http://player.vimeo.com/video/45074303
|
48 |
+
* Metacafe
|
49 |
+
* http://www.metacafe.com/watch/7635964/dr_seuss_the_lorax_movie_trailer/
|
50 |
+
* http://www.metacafe.com/watch/7635964/
|
51 |
+
* Dailymotion
|
52 |
+
* http://www.dailymotion.com/video/xoytqh_dr-seuss-the-lorax-premiere_people
|
53 |
+
* Twitvid
|
54 |
+
* http://twitvid.com/QY7MD
|
55 |
+
* Twitpic
|
56 |
+
* http://twitpic.com/7p93st
|
57 |
+
* Instagram
|
58 |
+
* http://instagr.am/p/IejkuUGxQn/
|
59 |
+
* http://instagram.com/p/IejkuUGxQn/
|
60 |
+
* Google maps
|
61 |
+
* http://maps.google.com/maps?q=Eiffel+Tower,+Avenue+Gustave+Eiffel,+Paris,+France&t=h&z=17
|
62 |
+
* http://maps.google.com/?ll=48.857995,2.294297&spn=0.007666,0.021136&t=m&z=16
|
63 |
+
* http://maps.google.com/?ll=48.859463,2.292626&spn=0.000965,0.002642&t=m&z=19&layer=c&cbll=48.859524,2.292532&panoid=YJ0lq28OOy3VT2IqIuVY0g&cbp=12,151.58,,0,-15.56
|
64 |
+
*/
|
65 |
+
(function ($) {
|
66 |
+
"use strict";
|
67 |
+
|
68 |
+
//Shortcut for fancyBox object
|
69 |
+
var F = $.fancybox,
|
70 |
+
format = function( url, rez, params ) {
|
71 |
+
params = params || '';
|
72 |
+
|
73 |
+
if ( $.type( params ) === "object" ) {
|
74 |
+
params = $.param(params, true);
|
75 |
+
}
|
76 |
+
|
77 |
+
$.each(rez, function(key, value) {
|
78 |
+
url = url.replace( '$' + key, value || '' );
|
79 |
+
});
|
80 |
+
|
81 |
+
if (params.length) {
|
82 |
+
url += ( url.indexOf('?') > 0 ? '&' : '?' ) + params;
|
83 |
+
}
|
84 |
+
|
85 |
+
return url;
|
86 |
+
};
|
87 |
+
|
88 |
+
//Add helper object
|
89 |
+
F.helpers.media = {
|
90 |
+
defaults : {
|
91 |
+
youtube : {
|
92 |
+
matcher : /(youtube\.com|youtu\.be|youtube-nocookie\.com)\/(watch\?v=|v\/|u\/|embed\/?)?(videoseries\?list=(.*)|[\w-]{11}|\?listType=(.*)&list=(.*)).*/i,
|
93 |
+
params : {
|
94 |
+
autoplay : 1,
|
95 |
+
autohide : 1,
|
96 |
+
fs : 1,
|
97 |
+
rel : 0,
|
98 |
+
hd : 1,
|
99 |
+
wmode : 'opaque',
|
100 |
+
enablejsapi : 1
|
101 |
+
},
|
102 |
+
type : 'iframe',
|
103 |
+
url : '//www.youtube.com/embed/$3'
|
104 |
+
},
|
105 |
+
vimeo : {
|
106 |
+
matcher : /(?:vimeo(?:pro)?.com)\/(?:[^\d]+)?(\d+)(?:.*)/,
|
107 |
+
params : {
|
108 |
+
autoplay : 1,
|
109 |
+
hd : 1,
|
110 |
+
show_title : 1,
|
111 |
+
show_byline : 1,
|
112 |
+
show_portrait : 0,
|
113 |
+
fullscreen : 1
|
114 |
+
},
|
115 |
+
type : 'iframe',
|
116 |
+
url : '//player.vimeo.com/video/$1'
|
117 |
+
},
|
118 |
+
metacafe : {
|
119 |
+
matcher : /metacafe.com\/(?:watch|fplayer)\/([\w\-]{1,10})/,
|
120 |
+
params : {
|
121 |
+
autoPlay : 'yes'
|
122 |
+
},
|
123 |
+
type : 'swf',
|
124 |
+
url : function( rez, params, obj ) {
|
125 |
+
obj.swf.flashVars = 'playerVars=' + $.param( params, true );
|
126 |
+
|
127 |
+
return '//www.metacafe.com/fplayer/' + rez[1] + '/.swf';
|
128 |
+
}
|
129 |
+
},
|
130 |
+
dailymotion : {
|
131 |
+
matcher : /dailymotion.com\/video\/(.*)\/?(.*)/,
|
132 |
+
params : {
|
133 |
+
additionalInfos : 0,
|
134 |
+
autoStart : 1
|
135 |
+
},
|
136 |
+
type : 'swf',
|
137 |
+
url : '//www.dailymotion.com/swf/video/$1'
|
138 |
+
},
|
139 |
+
twitvid : {
|
140 |
+
matcher : /twitvid\.com\/([a-zA-Z0-9_\-\?\=]+)/i,
|
141 |
+
params : {
|
142 |
+
autoplay : 0
|
143 |
+
},
|
144 |
+
type : 'iframe',
|
145 |
+
url : '//www.twitvid.com/embed.php?guid=$1'
|
146 |
+
},
|
147 |
+
twitpic : {
|
148 |
+
matcher : /twitpic\.com\/(?!(?:place|photos|events)\/)([a-zA-Z0-9\?\=\-]+)/i,
|
149 |
+
type : 'image',
|
150 |
+
url : '//twitpic.com/show/full/$1/'
|
151 |
+
},
|
152 |
+
instagram : {
|
153 |
+
matcher : /(instagr\.am|instagram\.com)\/p\/([a-zA-Z0-9_\-]+)\/?/i,
|
154 |
+
type : 'image',
|
155 |
+
url : '//$1/p/$2/media/?size=l'
|
156 |
+
},
|
157 |
+
google_maps : {
|
158 |
+
matcher : /maps\.google\.([a-z]{2,3}(\.[a-z]{2})?)\/(\?ll=|maps\?)(.*)/i,
|
159 |
+
type : 'iframe',
|
160 |
+
url : function( rez ) {
|
161 |
+
return '//maps.google.' + rez[1] + '/' + rez[3] + '' + rez[4] + '&output=' + (rez[4].indexOf('layer=c') > 0 ? 'svembed' : 'embed');
|
162 |
+
}
|
163 |
+
}
|
164 |
+
},
|
165 |
+
|
166 |
+
beforeLoad : function(opts, obj) {
|
167 |
+
var url = obj.href || '',
|
168 |
+
type = false,
|
169 |
+
what,
|
170 |
+
item,
|
171 |
+
rez,
|
172 |
+
params;
|
173 |
+
|
174 |
+
for (what in opts) {
|
175 |
+
if (opts.hasOwnProperty(what)) {
|
176 |
+
item = opts[ what ];
|
177 |
+
rez = url.match( item.matcher );
|
178 |
+
|
179 |
+
if (rez) {
|
180 |
+
type = item.type;
|
181 |
+
params = $.extend(true, {}, item.params, obj[ what ] || ($.isPlainObject(opts[ what ]) ? opts[ what ].params : null));
|
182 |
+
|
183 |
+
url = $.type( item.url ) === "function" ? item.url.call( this, rez, params, obj ) : format( item.url, rez, params );
|
184 |
+
|
185 |
+
break;
|
186 |
+
}
|
187 |
+
}
|
188 |
+
}
|
189 |
+
|
190 |
+
if (type) {
|
191 |
+
obj.href = url;
|
192 |
+
obj.type = type;
|
193 |
+
|
194 |
+
obj.autoHeight = false;
|
195 |
+
}
|
196 |
+
}
|
197 |
+
};
|
198 |
+
|
199 |
+
}(jQuery));
|
includes/lib/fancybox/helpers/jquery.fancybox-thumbs.css
ADDED
@@ -0,0 +1,55 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
#fancybox-thumbs {
|
2 |
+
position: fixed;
|
3 |
+
left: 0;
|
4 |
+
width: 100%;
|
5 |
+
overflow: hidden;
|
6 |
+
z-index: 8050;
|
7 |
+
}
|
8 |
+
|
9 |
+
#fancybox-thumbs.bottom {
|
10 |
+
bottom: 2px;
|
11 |
+
}
|
12 |
+
|
13 |
+
#fancybox-thumbs.top {
|
14 |
+
top: 2px;
|
15 |
+
}
|
16 |
+
|
17 |
+
#fancybox-thumbs ul {
|
18 |
+
position: relative;
|
19 |
+
list-style: none;
|
20 |
+
margin: 0;
|
21 |
+
padding: 0;
|
22 |
+
}
|
23 |
+
|
24 |
+
#fancybox-thumbs ul li {
|
25 |
+
float: left;
|
26 |
+
padding: 1px;
|
27 |
+
opacity: 0.5;
|
28 |
+
}
|
29 |
+
|
30 |
+
#fancybox-thumbs ul li.active {
|
31 |
+
opacity: 0.75;
|
32 |
+
padding: 0;
|
33 |
+
border: 1px solid #fff;
|
34 |
+
}
|
35 |
+
|
36 |
+
#fancybox-thumbs ul li:hover {
|
37 |
+
opacity: 1;
|
38 |
+
}
|
39 |
+
|
40 |
+
#fancybox-thumbs ul li a {
|
41 |
+
display: block;
|
42 |
+
position: relative;
|
43 |
+
overflow: hidden;
|
44 |
+
border: 1px solid #222;
|
45 |
+
background: #111;
|
46 |
+
outline: none;
|
47 |
+
}
|
48 |
+
|
49 |
+
#fancybox-thumbs ul li img {
|
50 |
+
display: block;
|
51 |
+
position: relative;
|
52 |
+
border: 0;
|
53 |
+
padding: 0;
|
54 |
+
max-width: none;
|
55 |
+
}
|
includes/lib/fancybox/helpers/jquery.fancybox-thumbs.js
ADDED
@@ -0,0 +1,162 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*!
|
2 |
+
* Thumbnail helper for fancyBox
|
3 |
+
* version: 1.0.7 (Mon, 01 Oct 2012)
|
4 |
+
* @requires fancyBox v2.0 or later
|
5 |
+
*
|
6 |
+
* Usage:
|
7 |
+
* $(".fancybox").fancybox({
|
8 |
+
* helpers : {
|
9 |
+
* thumbs: {
|
10 |
+
* width : 50,
|
11 |
+
* height : 50
|
12 |
+
* }
|
13 |
+
* }
|
14 |
+
* });
|
15 |
+
*
|
16 |
+
*/
|
17 |
+
(function ($) {
|
18 |
+
//Shortcut for fancyBox object
|
19 |
+
var F = $.fancybox;
|
20 |
+
|
21 |
+
//Add helper object
|
22 |
+
F.helpers.thumbs = {
|
23 |
+
defaults : {
|
24 |
+
width : 50, // thumbnail width
|
25 |
+
height : 50, // thumbnail height
|
26 |
+
position : 'bottom', // 'top' or 'bottom'
|
27 |
+
source : function ( item ) { // function to obtain the URL of the thumbnail image
|
28 |
+
var href;
|
29 |
+
|
30 |
+
if (item.element) {
|
31 |
+
href = $(item.element).find('img').attr('src');
|
32 |
+
}
|
33 |
+
|
34 |
+
if (!href && item.type === 'image' && item.href) {
|
35 |
+
href = item.href;
|
36 |
+
}
|
37 |
+
|
38 |
+
return href;
|
39 |
+
}
|
40 |
+
},
|
41 |
+
|
42 |
+
wrap : null,
|
43 |
+
list : null,
|
44 |
+
width : 0,
|
45 |
+
|
46 |
+
init: function (opts, obj) {
|
47 |
+
var that = this,
|
48 |
+
list,
|
49 |
+
thumbWidth = opts.width,
|
50 |
+
thumbHeight = opts.height,
|
51 |
+
thumbSource = opts.source;
|
52 |
+
|
53 |
+
//Build list structure
|
54 |
+
list = '';
|
55 |
+
|
56 |
+
for (var n = 0; n < obj.group.length; n++) {
|
57 |
+
list += '<li><a style="width:' + thumbWidth + 'px;height:' + thumbHeight + 'px;" href="javascript:jQuery.fancybox.jumpto(' + n + ');"></a></li>';
|
58 |
+
}
|
59 |
+
|
60 |
+
this.wrap = $('<div id="fancybox-thumbs"></div>').addClass(opts.position).appendTo('body');
|
61 |
+
this.list = $('<ul>' + list + '</ul>').appendTo(this.wrap);
|
62 |
+
|
63 |
+
//Load each thumbnail
|
64 |
+
$.each(obj.group, function (i) {
|
65 |
+
var href = thumbSource( obj.group[ i ] );
|
66 |
+
|
67 |
+
if (!href) {
|
68 |
+
return;
|
69 |
+
}
|
70 |
+
|
71 |
+
$("<img />").load(function () {
|
72 |
+
var width = this.width,
|
73 |
+
height = this.height,
|
74 |
+
widthRatio, heightRatio, parent;
|
75 |
+
|
76 |
+
if (!that.list || !width || !height) {
|
77 |
+
return;
|
78 |
+
}
|
79 |
+
|
80 |
+
//Calculate thumbnail width/height and center it
|
81 |
+
widthRatio = width / thumbWidth;
|
82 |
+
heightRatio = height / thumbHeight;
|
83 |
+
|
84 |
+
parent = that.list.children().eq(i).find('a');
|
85 |
+
|
86 |
+
if (widthRatio >= 1 && heightRatio >= 1) {
|
87 |
+
if (widthRatio > heightRatio) {
|
88 |
+
width = Math.floor(width / heightRatio);
|
89 |
+
height = thumbHeight;
|
90 |
+
|
91 |
+
} else {
|
92 |
+
width = thumbWidth;
|
93 |
+
height = Math.floor(height / widthRatio);
|
94 |
+
}
|
95 |
+
}
|
96 |
+
|
97 |
+
$(this).css({
|
98 |
+
width : width,
|
99 |
+
height : height,
|
100 |
+
top : Math.floor(thumbHeight / 2 - height / 2),
|
101 |
+
left : Math.floor(thumbWidth / 2 - width / 2)
|
102 |
+
});
|
103 |
+
|
104 |
+
parent.width(thumbWidth).height(thumbHeight);
|
105 |
+
|
106 |
+
$(this).hide().appendTo(parent).fadeIn(300);
|
107 |
+
|
108 |
+
}).attr('src', href);
|
109 |
+
});
|
110 |
+
|
111 |
+
//Set initial width
|
112 |
+
this.width = this.list.children().eq(0).outerWidth(true);
|
113 |
+
|
114 |
+
this.list.width(this.width * (obj.group.length + 1)).css('left', Math.floor($(window).width() * 0.5 - (obj.index * this.width + this.width * 0.5)));
|
115 |
+
},
|
116 |
+
|
117 |
+
beforeLoad: function (opts, obj) {
|
118 |
+
//Remove self if gallery do not have at least two items
|
119 |
+
if (obj.group.length < 2) {
|
120 |
+
obj.helpers.thumbs = false;
|
121 |
+
|
122 |
+
return;
|
123 |
+
}
|
124 |
+
|
125 |
+
//Increase bottom margin to give space for thumbs
|
126 |
+
obj.margin[ opts.position === 'top' ? 0 : 2 ] += ((opts.height) + 15);
|
127 |
+
},
|
128 |
+
|
129 |
+
afterShow: function (opts, obj) {
|
130 |
+
//Check if exists and create or update list
|
131 |
+
if (this.list) {
|
132 |
+
this.onUpdate(opts, obj);
|
133 |
+
|
134 |
+
} else {
|
135 |
+
this.init(opts, obj);
|
136 |
+
}
|
137 |
+
|
138 |
+
//Set active element
|
139 |
+
this.list.children().removeClass('active').eq(obj.index).addClass('active');
|
140 |
+
},
|
141 |
+
|
142 |
+
//Center list
|
143 |
+
onUpdate: function (opts, obj) {
|
144 |
+
if (this.list) {
|
145 |
+
this.list.stop(true).animate({
|
146 |
+
'left': Math.floor($(window).width() * 0.5 - (obj.index * this.width + this.width * 0.5))
|
147 |
+
}, 150);
|
148 |
+
}
|
149 |
+
},
|
150 |
+
|
151 |
+
beforeClose: function () {
|
152 |
+
if (this.wrap) {
|
153 |
+
this.wrap.remove();
|
154 |
+
}
|
155 |
+
|
156 |
+
this.wrap = null;
|
157 |
+
this.list = null;
|
158 |
+
this.width = 0;
|
159 |
+
}
|
160 |
+
}
|
161 |
+
|
162 |
+
}(jQuery));
|
includes/lib/fancybox/jqu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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*
|
2 |
+
* FancyBox - jQuery Plugin
|
3 |
+
* Simple and fancy lightbox alternative
|
4 |
+
*
|
5 |
+
* Examples and documentation at: http://fancybox.net
|
6 |
+
*
|
7 |
+
* Copyright (c) 2008 - 2010 Janis Skarnelis
|
8 |
+
* That said, it is hardly a one-person project. Many people have submitted bugs, code, and offered their advice freely. Their support is greatly appreciated.
|
9 |
+
*
|
10 |
+
* Version: 1.3.4 (11/11/2010)
|
11 |
+
* Requires: jQuery v1.3+
|
12 |
+
*
|
13 |
+
* Dual licensed under the MIT and GPL licenses:
|
14 |
+
* http://www.opensource.org/licenses/mit-license.php
|
15 |
+
* http://www.gnu.org/licenses/gpl.html
|
16 |
+
*/
|
17 |
+
|
18 |
+
#fancybox-loading {
|
19 |
+
position: fixed;
|
20 |
+
top: 50%;
|
21 |
+
left: 50%;
|
22 |
+
width: 40px;
|
23 |
+
height: 40px;
|
24 |
+
margin-top: -20px;
|
25 |
+
margin-left: -20px;
|
26 |
+
cursor: pointer;
|
27 |
+
overflow: hidden;
|
28 |
+
z-index: 1104;
|
29 |
+
display: none;
|
30 |
+
}
|
31 |
+
|
32 |
+
#fancybox-loading div {
|
33 |
+
position: absolute;
|
34 |
+
top: 0;
|
35 |
+
left: 0;
|
36 |
+
width: 40px;
|
37 |
+
height: 480px;
|
38 |
+
background-image: url('fancybox.png');
|
39 |
+
}
|
40 |
+
|
41 |
+
#fancybox-overlay {
|
42 |
+
position: absolute;
|
43 |
+
top: 0;
|
44 |
+
left: 0;
|
45 |
+
width: 100%;
|
46 |
+
z-index: 1100;
|
47 |
+
display: none;
|
48 |
+
}
|
49 |
+
|
50 |
+
#fancybox-tmp {
|
51 |
+
padding: 0;
|
52 |
+
margin: 0;
|
53 |
+
border: 0;
|
54 |
+
overflow: auto;
|
55 |
+
display: none;
|
56 |
+
}
|
57 |
+
|
58 |
+
#fancybox-wrap {
|
59 |
+
position: absolute;
|
60 |
+
top: 0;
|
61 |
+
left: 0;
|
62 |
+
padding: 20px;
|
63 |
+
z-index: 1101;
|
64 |
+
outline: none;
|
65 |
+
display: none;
|
66 |
+
}
|
67 |
+
|
68 |
+
#fancybox-outer {
|
69 |
+
position: relative;
|
70 |
+
width: 100%;
|
71 |
+
height: 100%;
|
72 |
+
background: #fff;
|
73 |
+
}
|
74 |
+
|
75 |
+
#fancybox-content {
|
76 |
+
width: 0;
|
77 |
+
height: 0;
|
78 |
+
padding: 0;
|
79 |
+
outline: none;
|
80 |
+
position: relative;
|
81 |
+
overflow: hidden;
|
82 |
+
z-index: 1102;
|
83 |
+
border: 0px solid #fff;
|
84 |
+
}
|
85 |
+
|
86 |
+
#fancybox-hide-sel-frame {
|
87 |
+
position: absolute;
|
88 |
+
top: 0;
|
89 |
+
left: 0;
|
90 |
+
width: 100%;
|
91 |
+
height: 100%;
|
92 |
+
background: transparent;
|
93 |
+
z-index: 1101;
|
94 |
+
}
|
95 |
+
|
96 |
+
#fancybox-close {
|
97 |
+
position: absolute;
|
98 |
+
top: -15px;
|
99 |
+
right: -15px;
|
100 |
+
width: 30px;
|
101 |
+
height: 30px;
|
102 |
+
background: transparent url('fancybox.png') -40px 0px;
|
103 |
+
cursor: pointer;
|
104 |
+
z-index: 1103;
|
105 |
+
display: none;
|
106 |
+
}
|
107 |
+
|
108 |
+
#fancybox-error {
|
109 |
+
color: #444;
|
110 |
+
font: normal 12px/20px Arial;
|
111 |
+
padding: 14px;
|
112 |
+
margin: 0;
|
113 |
+
}
|
114 |
+
|
115 |
+
#fancybox-img {
|
116 |
+
width: 100%;
|
117 |
+
height: 100%;
|
118 |
+
padding: 0;
|
119 |
+
margin: 0;
|
120 |
+
border: none;
|
121 |
+
outline: none;
|
122 |
+
line-height: 0;
|
123 |
+
vertical-align: top;
|
124 |
+
}
|
125 |
+
|
126 |
+
#fancybox-frame {
|
127 |
+
width: 100%;
|
128 |
+
height: 100%;
|
129 |
+
border: none;
|
130 |
+
display: block;
|
131 |
+
}
|
132 |
+
|
133 |
+
#fancybox-left, #fancybox-right {
|
134 |
+
position: absolute;
|
135 |
+
bottom: 0px;
|
136 |
+
height: 100%;
|
137 |
+
width: 35%;
|
138 |
+
cursor: pointer;
|
139 |
+
outline: none;
|
140 |
+
background: transparent url('blank.gif');
|
141 |
+
z-index: 1102;
|
142 |
+
display: none;
|
143 |
+
}
|
144 |
+
|
145 |
+
#fancybox-left {
|
146 |
+
left: 0px;
|
147 |
+
}
|
148 |
+
|
149 |
+
#fancybox-right {
|
150 |
+
right: 0px;
|
151 |
+
}
|
152 |
+
|
153 |
+
#fancybox-left-ico, #fancybox-right-ico {
|
154 |
+
position: absolute;
|
155 |
+
top: 50%;
|
156 |
+
left: -9999px;
|
157 |
+
width: 30px;
|
158 |
+
height: 30px;
|
159 |
+
margin-top: -15px;
|
160 |
+
cursor: pointer;
|
161 |
+
z-index: 1102;
|
162 |
+
display: block;
|
163 |
+
}
|
164 |
+
|
165 |
+
#fancybox-left-ico {
|
166 |
+
background-image: url('fancybox.png');
|
167 |
+
background-position: -40px -30px;
|
168 |
+
}
|
169 |
+
|
170 |
+
#fancybox-right-ico {
|
171 |
+
background-image: url('fancybox.png');
|
172 |
+
background-position: -40px -60px;
|
173 |
+
}
|
174 |
+
|
175 |
+
#fancybox-left:hover, #fancybox-right:hover {
|
176 |
+
visibility: visible; /* IE6 */
|
177 |
+
}
|
178 |
+
|
179 |
+
#fancybox-left:hover span {
|
180 |
+
left: 20px;
|
181 |
+
}
|
182 |
+
|
183 |
+
#fancybox-right:hover span {
|
184 |
+
left: auto;
|
185 |
+
right: 20px;
|
186 |
+
}
|
187 |
+
|
188 |
+
.fancybox-bg {
|
189 |
+
position: absolute;
|
190 |
+
padding: 0;
|
191 |
+
margin: 0;
|
192 |
+
border: 0;
|
193 |
+
width: 20px;
|
194 |
+
height: 20px;
|
195 |
+
z-index: 1001;
|
196 |
+
}
|
197 |
+
|
198 |
+
#fancybox-bg-n {
|
199 |
+
top: -20px;
|
200 |
+
left: 0;
|
201 |
+
width: 100%;
|
202 |
+
background-image: url('fancybox-x.png');
|
203 |
+
}
|
204 |
+
|
205 |
+
#fancybox-bg-ne {
|
206 |
+
top: -20px;
|
207 |
+
right: -20px;
|
208 |
+
background-image: url('fancybox.png');
|
209 |
+
background-position: -40px -162px;
|
210 |
+
}
|
211 |
+
|
212 |
+
#fancybox-bg-e {
|
213 |
+
top: 0;
|
214 |
+
right: -20px;
|
215 |
+
height: 100%;
|
216 |
+
background-image: url('fancybox-y.png');
|
217 |
+
background-position: -20px 0px;
|
218 |
+
}
|
219 |
+
|
220 |
+
#fancybox-bg-se {
|
221 |
+
bottom: -20px;
|
222 |
+
right: -20px;
|
223 |
+
background-image: url('fancybox.png');
|
224 |
+
background-position: -40px -182px;
|
225 |
+
}
|
226 |
+
|
227 |
+
#fancybox-bg-s {
|
228 |
+
bottom: -20px;
|
229 |
+
left: 0;
|
230 |
+
width: 100%;
|
231 |
+
background-image: url('fancybox-x.png');
|
232 |
+
background-position: 0px -20px;
|
233 |
+
}
|
234 |
+
|
235 |
+
#fancybox-bg-sw {
|
236 |
+
bottom: -20px;
|
237 |
+
left: -20px;
|
238 |
+
background-image: url('fancybox.png');
|
239 |
+
background-position: -40px -142px;
|
240 |
+
}
|
241 |
+
|
242 |
+
#fancybox-bg-w {
|
243 |
+
top: 0;
|
244 |
+
left: -20px;
|
245 |
+
height: 100%;
|
246 |
+
background-image: url('fancybox-y.png');
|
247 |
+
}
|
248 |
+
|
249 |
+
#fancybox-bg-nw {
|
250 |
+
top: -20px;
|
251 |
+
left: -20px;
|
252 |
+
background-image: url('fancybox.png');
|
253 |
+
background-position: -40px -122px;
|
254 |
+
}
|
255 |
+
|
256 |
+
#fancybox-title {
|
257 |
+
font-family: Helvetica;
|
258 |
+
font-size: 12px;
|
259 |
+
z-index: 1102;
|
260 |
+
}
|
261 |
+
|
262 |
+
.fancybox-title-inside {
|
263 |
+
padding-bottom: 10px;
|
264 |
+
text-align: center;
|
265 |
+
color: #333;
|
266 |
+
background: #fff;
|
267 |
+
position: relative;
|
268 |
+
}
|
269 |
+
|
270 |
+
.fancybox-title-outside {
|
271 |
+
padding-top: 10px;
|
272 |
+
color: #fff;
|
273 |
+
}
|
274 |
+
|
275 |
+
.fancybox-title-over {
|
276 |
+
position: absolute;
|
277 |
+
bottom: 0;
|
278 |
+
left: 0;
|
279 |
+
color: #FFF;
|
280 |
+
text-align: left;
|
281 |
+
}
|
282 |
+
|
283 |
+
#fancybox-title-over {
|
284 |
+
padding: 10px;
|
285 |
+
background-image: url('fancy_title_over.png');
|
286 |
+
display: block;
|
287 |
+
}
|
288 |
+
|
289 |
+
.fancybox-title-float {
|
290 |
+
position: absolute;
|
291 |
+
left: 0;
|
292 |
+
bottom: -20px;
|
293 |
+
height: 32px;
|
294 |
+
}
|
295 |
+
|
296 |
+
#fancybox-title-float-wrap {
|
297 |
+
border: none;
|
298 |
+
border-collapse: collapse;
|
299 |
+
width: auto;
|
300 |
+
}
|
301 |
+
|
302 |
+
#fancybox-title-float-wrap td {
|
303 |
+
border: none;
|
304 |
+
white-space: nowrap;
|
305 |
+
}
|
306 |
+
|
307 |
+
#fancybox-title-float-left {
|
308 |
+
padding: 0 0 0 15px;
|
309 |
+
background: url('fancybox.png') -40px -90px no-repeat;
|
310 |
+
}
|
311 |
+
|
312 |
+
#fancybox-title-float-main {
|
313 |
+
color: #FFF;
|
314 |
+
line-height: 29px;
|
315 |
+
font-weight: bold;
|
316 |
+
padding: 0 0 3px 0;
|
317 |
+
background: url('fancybox-x.png') 0px -40px;
|
318 |
+
}
|
319 |
+
|
320 |
+
#fancybox-title-float-right {
|
321 |
+
padding: 0 0 0 15px;
|
322 |
+
background: url('fancybox.png') -55px -90px no-repeat;
|
323 |
+
}
|
324 |
+
|
325 |
+
/* IE6 */
|
326 |
+
|
327 |
+
.fancybox-ie6 #fancybox-close { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_close.png', sizingMethod='scale'); }
|
328 |
+
|
329 |
+
.fancybox-ie6 #fancybox-left-ico { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_nav_left.png', sizingMethod='scale'); }
|
330 |
+
.fancybox-ie6 #fancybox-right-ico { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_nav_right.png', sizingMethod='scale'); }
|
331 |
+
|
332 |
+
.fancybox-ie6 #fancybox-title-over { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_title_over.png', sizingMethod='scale'); zoom: 1; }
|
333 |
+
.fancybox-ie6 #fancybox-title-float-left { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_title_left.png', sizingMethod='scale'); }
|
334 |
+
.fancybox-ie6 #fancybox-title-float-main { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_title_main.png', sizingMethod='scale'); }
|
335 |
+
.fancybox-ie6 #fancybox-title-float-right { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_title_right.png', sizingMethod='scale'); }
|
336 |
+
|
337 |
+
.fancybox-ie6 #fancybox-bg-w, .fancybox-ie6 #fancybox-bg-e, .fancybox-ie6 #fancybox-left, .fancybox-ie6 #fancybox-right, #fancybox-hide-sel-frame {
|
338 |
+
height: expression(this.parentNode.clientHeight + "px");
|
339 |
+
}
|
340 |
+
|
341 |
+
#fancybox-loading.fancybox-ie6 {
|
342 |
+
position: absolute; margin-top: 0;
|
343 |
+
top: expression( (-20 + (document.documentElement.clientHeight ? document.documentElement.clientHeight/2 : document.body.clientHeight/2 ) + ( ignoreMe = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop )) + 'px');
|
344 |
+
}
|
345 |
+
|
346 |
+
#fancybox-loading.fancybox-ie6 div { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_loading.png', sizingMethod='scale'); }
|
347 |
+
|
348 |
+
/* IE6, IE7, IE8 */
|
349 |
+
|
350 |
+
.fancybox-ie .fancybox-bg { background: transparent !important; }
|
351 |
+
|
352 |
+
.fancybox-ie #fancybox-bg-n { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_n.png', sizingMethod='scale'); }
|
353 |
+
.fancybox-ie #fancybox-bg-ne { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_ne.png', sizingMethod='scale'); }
|
354 |
+
.fancybox-ie #fancybox-bg-e { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_e.png', sizingMethod='scale'); }
|
355 |
+
.fancybox-ie #fancybox-bg-se { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_se.png', sizingMethod='scale'); }
|
356 |
+
.fancybox-ie #fancybox-bg-s { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_s.png', sizingMethod='scale'); }
|
357 |
+
.fancybox-ie #fancybox-bg-sw { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_sw.png', sizingMethod='scale'); }
|
358 |
+
.fancybox-ie #fancybox-bg-w { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_w.png', sizingMethod='scale'); }
|
359 |
+
.fancybox-ie #fancybox-bg-nw { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_nw.png', sizingMethod='scale'); }
|
includes/lib/fancybox/jquery.fancybox-1.3.4.js
ADDED
@@ -0,0 +1,1156 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*
|
2 |
+
* FancyBox - jQuery Plugin
|
3 |
+
* Simple and fancy lightbox alternative
|
4 |
+
*
|
5 |
+
* Examples and documentation at: http://fancybox.net
|
6 |
+
*
|
7 |
+
* Copyright (c) 2008 - 2010 Janis Skarnelis
|
8 |
+
* That said, it is hardly a one-person project. Many people have submitted bugs, code, and offered their advice freely. Their support is greatly appreciated.
|
9 |
+
*
|
10 |
+
* Version: 1.3.4 (11/11/2010)
|
11 |
+
* Requires: jQuery v1.3+
|
12 |
+
*
|
13 |
+
* Dual licensed under the MIT and GPL licenses:
|
14 |
+
* http://www.opensource.org/licenses/mit-license.php
|
15 |
+
* http://www.gnu.org/licenses/gpl.html
|
16 |
+
*/
|
17 |
+
|
18 |
+
;(function($) {
|
19 |
+
var tmp, loading, overlay, wrap, outer, content, close, title, nav_left, nav_right,
|
20 |
+
|
21 |
+
selectedIndex = 0, selectedOpts = {}, selectedArray = [], currentIndex = 0, currentOpts = {}, currentArray = [],
|
22 |
+
|
23 |
+
ajaxLoader = null, imgPreloader = new Image(), imgRegExp = /\.(jpg|gif|png|bmp|jpeg)(.*)?$/i, swfRegExp = /[^\.]\.(swf)\s*$/i,
|
24 |
+
|
25 |
+
loadingTimer, loadingFrame = 1,
|
26 |
+
|
27 |
+
titleHeight = 0, titleStr = '', start_pos, final_pos, busy = false, fx = $.extend($('<div/>')[0], { prop: 0 }),
|
28 |
+
|
29 |
+
isIE6 = $.browser.msie && $.browser.version < 7 && !window.XMLHttpRequest,
|
30 |
+
|
31 |
+
/*
|
32 |
+
* Private methods
|
33 |
+
*/
|
34 |
+
|
35 |
+
_abort = function() {
|
36 |
+
loading.hide();
|
37 |
+
|
38 |
+
imgPreloader.onerror = imgPreloader.onload = null;
|
39 |
+
|
40 |
+
if (ajaxLoader) {
|
41 |
+
ajaxLoader.abort();
|
42 |
+
}
|
43 |
+
|
44 |
+
tmp.empty();
|
45 |
+
},
|
46 |
+
|
47 |
+
_error = function() {
|
48 |
+
if (false === selectedOpts.onError(selectedArray, selectedIndex, selectedOpts)) {
|
49 |
+
loading.hide();
|
50 |
+
busy = false;
|
51 |
+
return;
|
52 |
+
}
|
53 |
+
|
54 |
+
selectedOpts.titleShow = false;
|
55 |
+
|
56 |
+
selectedOpts.width = 'auto';
|
57 |
+
selectedOpts.height = 'auto';
|
58 |
+
|
59 |
+
tmp.html( '<p id="fancybox-error">The requested content cannot be loaded.<br />Please try again later.</p>' );
|
60 |
+
|
61 |
+
_process_inline();
|
62 |
+
},
|
63 |
+
|
64 |
+
_start = function() {
|
65 |
+
var obj = selectedArray[ selectedIndex ],
|
66 |
+
href,
|
67 |
+
type,
|
68 |
+
title,
|
69 |
+
str,
|
70 |
+
emb,
|
71 |
+
ret;
|
72 |
+
|
73 |
+
_abort();
|
74 |
+
|
75 |
+
selectedOpts = $.extend({}, $.fn.fancybox.defaults, (typeof $(obj).data('fancybox') == 'undefined' ? selectedOpts : $(obj).data('fancybox')));
|
76 |
+
|
77 |
+
ret = selectedOpts.onStart(selectedArray, selectedIndex, selectedOpts);
|
78 |
+
|
79 |
+
if (ret === false) {
|
80 |
+
busy = false;
|
81 |
+
return;
|
82 |
+
} else if (typeof ret == 'object') {
|
83 |
+
selectedOpts = $.extend(selectedOpts, ret);
|
84 |
+
}
|
85 |
+
|
86 |
+
title = selectedOpts.title || (obj.nodeName ? $(obj).attr('title') : obj.title) || '';
|
87 |
+
|
88 |
+
if (obj.nodeName && !selectedOpts.orig) {
|
89 |
+
selectedOpts.orig = $(obj).children("img:first").length ? $(obj).children("img:first") : $(obj);
|
90 |
+
}
|
91 |
+
|
92 |
+
if (title === '' && selectedOpts.orig && selectedOpts.titleFromAlt) {
|
93 |
+
title = selectedOpts.orig.attr('alt');
|
94 |
+
}
|
95 |
+
|
96 |
+
href = selectedOpts.href || (obj.nodeName ? $(obj).attr('href') : obj.href) || null;
|
97 |
+
|
98 |
+
if ((/^(?:javascript)/i).test(href) || href == '#') {
|
99 |
+
href = null;
|
100 |
+
}
|
101 |
+
|
102 |
+
if (selectedOpts.type) {
|
103 |
+
type = selectedOpts.type;
|
104 |
+
|
105 |
+
if (!href) {
|
106 |
+
href = selectedOpts.content;
|
107 |
+
}
|
108 |
+
|
109 |
+
} else if (selectedOpts.content) {
|
110 |
+
type = 'html';
|
111 |
+
|
112 |
+
} else if (href) {
|
113 |
+
if (href.match(imgRegExp)) {
|
114 |
+
type = 'image';
|
115 |
+
|
116 |
+
} else if (href.match(swfRegExp)) {
|
117 |
+
type = 'swf';
|
118 |
+
|
119 |
+
} else if ($(obj).hasClass("iframe")) {
|
120 |
+
type = 'iframe';
|
121 |
+
|
122 |
+
} else if (href.indexOf("#") === 0) {
|
123 |
+
type = 'inline';
|
124 |
+
|
125 |
+
} else {
|
126 |
+
type = 'ajax';
|
127 |
+
}
|
128 |
+
}
|
129 |
+
|
130 |
+
if (!type) {
|
131 |
+
_error();
|
132 |
+
return;
|
133 |
+
}
|
134 |
+
|
135 |
+
if (type == 'inline') {
|
136 |
+
obj = href.substr(href.indexOf("#"));
|
137 |
+
type = $(obj).length > 0 ? 'inline' : 'ajax';
|
138 |
+
}
|
139 |
+
|
140 |
+
selectedOpts.type = type;
|
141 |
+
selectedOpts.href = href;
|
142 |
+
selectedOpts.title = title;
|
143 |
+
|
144 |
+
if (selectedOpts.autoDimensions) {
|
145 |
+
if (selectedOpts.type == 'html' || selectedOpts.type == 'inline' || selectedOpts.type == 'ajax') {
|
146 |
+
selectedOpts.width = 'auto';
|
147 |
+
selectedOpts.height = 'auto';
|
148 |
+
} else {
|
149 |
+
selectedOpts.autoDimensions = false;
|
150 |
+
}
|
151 |
+
}
|
152 |
+
|
153 |
+
if (selectedOpts.modal) {
|
154 |
+
selectedOpts.overlayShow = true;
|
155 |
+
selectedOpts.hideOnOverlayClick = false;
|
156 |
+
selectedOpts.hideOnContentClick = false;
|
157 |
+
selectedOpts.enableEscapeButton = false;
|
158 |
+
selectedOpts.showCloseButton = false;
|
159 |
+
}
|
160 |
+
|
161 |
+
selectedOpts.padding = parseInt(selectedOpts.padding, 10);
|
162 |
+
selectedOpts.margin = parseInt(selectedOpts.margin, 10);
|
163 |
+
|
164 |
+
tmp.css('padding', (selectedOpts.padding + selectedOpts.margin));
|
165 |
+
|
166 |
+
$('.fancybox-inline-tmp').unbind('fancybox-cancel').bind('fancybox-change', function() {
|
167 |
+
$(this).replaceWith(content.children());
|
168 |
+
});
|
169 |
+
|
170 |
+
switch (type) {
|
171 |
+
case 'html' :
|
172 |
+
tmp.html( selectedOpts.content );
|
173 |
+
_process_inline();
|
174 |
+
break;
|
175 |
+
|
176 |
+
case 'inline' :
|
177 |
+
if ( $(obj).parent().is('#fancybox-content') === true) {
|
178 |
+
busy = false;
|
179 |
+
return;
|
180 |
+
}
|
181 |
+
|
182 |
+
$('<div class="fancybox-inline-tmp" />')
|
183 |
+
.hide()
|
184 |
+
.insertBefore( $(obj) )
|
185 |
+
.bind('fancybox-cleanup', function() {
|
186 |
+
$(this).replaceWith(content.children());
|
187 |
+
}).bind('fancybox-cancel', function() {
|
188 |
+
$(this).replaceWith(tmp.children());
|
189 |
+
});
|
190 |
+
|
191 |
+
$(obj).appendTo(tmp);
|
192 |
+
|
193 |
+
_process_inline();
|
194 |
+
break;
|
195 |
+
|
196 |
+
case 'image':
|
197 |
+
busy = false;
|
198 |
+
|
199 |
+
$.fancybox.showActivity();
|
200 |
+
|
201 |
+
imgPreloader = new Image();
|
202 |
+
|
203 |
+
imgPreloader.onerror = function() {
|
204 |
+
_error();
|
205 |
+
};
|
206 |
+
|
207 |
+
imgPreloader.onload = function() {
|
208 |
+
busy = true;
|
209 |
+
|
210 |
+
imgPreloader.onerror = imgPreloader.onload = null;
|
211 |
+
|
212 |
+
_process_image();
|
213 |
+
};
|
214 |
+
|
215 |
+
imgPreloader.src = href;
|
216 |
+
break;
|
217 |
+
|
218 |
+
case 'swf':
|
219 |
+
selectedOpts.scrolling = 'no';
|
220 |
+
|
221 |
+
str = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="' + selectedOpts.width + '" height="' + selectedOpts.height + '"><param name="movie" value="' + href + '"></param>';
|
222 |
+
emb = '';
|
223 |
+
|
224 |
+
$.each(selectedOpts.swf, function(name, val) {
|
225 |
+
str += '<param name="' + name + '" value="' + val + '"></param>';
|
226 |
+
emb += ' ' + name + '="' + val + '"';
|
227 |
+
});
|
228 |
+
|
229 |
+
str += '<embed src="' + href + '" type="application/x-shockwave-flash" width="' + selectedOpts.width + '" height="' + selectedOpts.height + '"' + emb + '></embed></object>';
|
230 |
+
|
231 |
+
tmp.html(str);
|
232 |
+
|
233 |
+
_process_inline();
|
234 |
+
break;
|
235 |
+
|
236 |
+
case 'ajax':
|
237 |
+
busy = false;
|
238 |
+
|
239 |
+
$.fancybox.showActivity();
|
240 |
+
|
241 |
+
selectedOpts.ajax.win = selectedOpts.ajax.success;
|
242 |
+
|
243 |
+
ajaxLoader = $.ajax($.extend({}, selectedOpts.ajax, {
|
244 |
+
url : href,
|
245 |
+
data : selectedOpts.ajax.data || {},
|
246 |
+
error : function(XMLHttpRequest, textStatus, errorThrown) {
|
247 |
+
if ( XMLHttpRequest.status > 0 ) {
|
248 |
+
_error();
|
249 |
+
}
|
250 |
+
},
|
251 |
+
success : function(data, textStatus, XMLHttpRequest) {
|
252 |
+
var o = typeof XMLHttpRequest == 'object' ? XMLHttpRequest : ajaxLoader;
|
253 |
+
if (o.status == 200) {
|
254 |
+
if ( typeof selectedOpts.ajax.win == 'function' ) {
|
255 |
+
ret = selectedOpts.ajax.win(href, data, textStatus, XMLHttpRequest);
|
256 |
+
|
257 |
+
if (ret === false) {
|
258 |
+
loading.hide();
|
259 |
+
return;
|
260 |
+
} else if (typeof ret == 'string' || typeof ret == 'object') {
|
261 |
+
data = ret;
|
262 |
+
}
|
263 |
+
}
|
264 |
+
|
265 |
+
tmp.html( data );
|
266 |
+
_process_inline();
|
267 |
+
}
|
268 |
+
}
|
269 |
+
}));
|
270 |
+
|
271 |
+
break;
|
272 |
+
|
273 |
+
case 'iframe':
|
274 |
+
_show();
|
275 |
+
break;
|
276 |
+
}
|
277 |
+
},
|
278 |
+
|
279 |
+
_process_inline = function() {
|
280 |
+
var
|
281 |
+
w = selectedOpts.width,
|
282 |
+
h = selectedOpts.height;
|
283 |
+
|
284 |
+
if (w.toString().indexOf('%') > -1) {
|
285 |
+
w = parseInt( ($(window).width() - (selectedOpts.margin * 2)) * parseFloat(w) / 100, 10) + 'px';
|
286 |
+
|
287 |
+
} else {
|
288 |
+
w = w == 'auto' ? 'auto' : w + 'px';
|
289 |
+
}
|
290 |
+
|
291 |
+
if (h.toString().indexOf('%') > -1) {
|
292 |
+
h = parseInt( ($(window).height() - (selectedOpts.margin * 2)) * parseFloat(h) / 100, 10) + 'px';
|
293 |
+
|
294 |
+
} else {
|
295 |
+
h = h == 'auto' ? 'auto' : h + 'px';
|
296 |
+
}
|
297 |
+
|
298 |
+
tmp.wrapInner('<div style="width:' + w + ';height:' + h + ';overflow: ' + (selectedOpts.scrolling == 'auto' ? 'auto' : (selectedOpts.scrolling == 'yes' ? 'scroll' : 'hidden')) + ';position:relative;"></div>');
|
299 |
+
|
300 |
+
selectedOpts.width = tmp.width();
|
301 |
+
selectedOpts.height = tmp.height();
|
302 |
+
|
303 |
+
_show();
|
304 |
+
},
|
305 |
+
|
306 |
+
_process_image = function() {
|
307 |
+
selectedOpts.width = imgPreloader.width;
|
308 |
+
selectedOpts.height = imgPreloader.height;
|
309 |
+
|
310 |
+
$("<img />").attr({
|
311 |
+
'id' : 'fancybox-img',
|
312 |
+
'src' : imgPreloader.src,
|
313 |
+
'alt' : selectedOpts.title
|
314 |
+
}).appendTo( tmp );
|
315 |
+
|
316 |
+
_show();
|
317 |
+
},
|
318 |
+
|
319 |
+
_show = function() {
|
320 |
+
var pos, equal;
|
321 |
+
|
322 |
+
loading.hide();
|
323 |
+
|
324 |
+
if (wrap.is(":visible") && false === currentOpts.onCleanup(currentArray, currentIndex, currentOpts)) {
|
325 |
+
$.event.trigger('fancybox-cancel');
|
326 |
+
|
327 |
+
busy = false;
|
328 |
+
return;
|
329 |
+
}
|
330 |
+
|
331 |
+
busy = true;
|
332 |
+
|
333 |
+
$(content.add( overlay )).unbind();
|
334 |
+
|
335 |
+
$(window).unbind("resize.fb scroll.fb");
|
336 |
+
$(document).unbind('keydown.fb');
|
337 |
+
|
338 |
+
if (wrap.is(":visible") && currentOpts.titlePosition !== 'outside') {
|
339 |
+
wrap.css('height', wrap.height());
|
340 |
+
}
|
341 |
+
|
342 |
+
currentArray = selectedArray;
|
343 |
+
currentIndex = selectedIndex;
|
344 |
+
currentOpts = selectedOpts;
|
345 |
+
|
346 |
+
if (currentOpts.overlayShow) {
|
347 |
+
overlay.css({
|
348 |
+
'background-color' : currentOpts.overlayColor,
|
349 |
+
'opacity' : currentOpts.overlayOpacity,
|
350 |
+
'cursor' : currentOpts.hideOnOverlayClick ? 'pointer' : 'auto',
|
351 |
+
'height' : $(document).height()
|
352 |
+
});
|
353 |
+
|
354 |
+
if (!overlay.is(':visible')) {
|
355 |
+
if (isIE6) {
|
356 |
+
$('select:not(#fancybox-tmp select)').filter(function() {
|
357 |
+
return this.style.visibility !== 'hidden';
|
358 |
+
}).css({'visibility' : 'hidden'}).one('fancybox-cleanup', function() {
|
359 |
+
this.style.visibility = 'inherit';
|
360 |
+
});
|
361 |
+
}
|
362 |
+
|
363 |
+
overlay.show();
|
364 |
+
}
|
365 |
+
} else {
|
366 |
+
overlay.hide();
|
367 |
+
}
|
368 |
+
|
369 |
+
final_pos = _get_zoom_to();
|
370 |
+
|
371 |
+
_process_title();
|
372 |
+
|
373 |
+
if (wrap.is(":visible")) {
|
374 |
+
$( close.add( nav_left ).add( nav_right ) ).hide();
|
375 |
+
|
376 |
+
pos = wrap.position(),
|
377 |
+
|
378 |
+
start_pos = {
|
379 |
+
top : pos.top,
|
380 |
+
left : pos.left,
|
381 |
+
width : wrap.width(),
|
382 |
+
height : wrap.height()
|
383 |
+
};
|
384 |
+
|
385 |
+
equal = (start_pos.width == final_pos.width && start_pos.height == final_pos.height);
|
386 |
+
|
387 |
+
content.fadeTo(currentOpts.changeFade, 0.3, function() {
|
388 |
+
var finish_resizing = function() {
|
389 |
+
content.html( tmp.contents() ).fadeTo(currentOpts.changeFade, 1, _finish);
|
390 |
+
};
|
391 |
+
|
392 |
+
$.event.trigger('fancybox-change');
|
393 |
+
|
394 |
+
content
|
395 |
+
.empty()
|
396 |
+
.removeAttr('filter')
|
397 |
+
.css({
|
398 |
+
'border-width' : currentOpts.padding,
|
399 |
+
'width' : final_pos.width - currentOpts.padding * 2,
|
400 |
+
'height' : selectedOpts.autoDimensions ? 'auto' : final_pos.height - titleHeight - currentOpts.padding * 2
|
401 |
+
});
|
402 |
+
|
403 |
+
if (equal) {
|
404 |
+
finish_resizing();
|
405 |
+
|
406 |
+
} else {
|
407 |
+
fx.prop = 0;
|
408 |
+
|
409 |
+
$(fx).animate({prop: 1}, {
|
410 |
+
duration : currentOpts.changeSpeed,
|
411 |
+
easing : currentOpts.easingChange,
|
412 |
+
step : _draw,
|
413 |
+
complete : finish_resizing
|
414 |
+
});
|
415 |
+
}
|
416 |
+
});
|
417 |
+
|
418 |
+
return;
|
419 |
+
}
|
420 |
+
|
421 |
+
wrap.removeAttr("style");
|
422 |
+
|
423 |
+
content.css('border-width', currentOpts.padding);
|
424 |
+
|
425 |
+
if (currentOpts.transitionIn == 'elastic') {
|
426 |
+
start_pos = _get_zoom_from();
|
427 |
+
|
428 |
+
content.html( tmp.contents() );
|
429 |
+
|
430 |
+
wrap.show();
|
431 |
+
|
432 |
+
if (currentOpts.opacity) {
|
433 |
+
final_pos.opacity = 0;
|
434 |
+
}
|
435 |
+
|
436 |
+
fx.prop = 0;
|
437 |
+
|
438 |
+
$(fx).animate({prop: 1}, {
|
439 |
+
duration : currentOpts.speedIn,
|
440 |
+
easing : currentOpts.easingIn,
|
441 |
+
step : _draw,
|
442 |
+
complete : _finish
|
443 |
+
});
|
444 |
+
|
445 |
+
return;
|
446 |
+
}
|
447 |
+
|
448 |
+
if (currentOpts.titlePosition == 'inside' && titleHeight > 0) {
|
449 |
+
title.show();
|
450 |
+
}
|
451 |
+
|
452 |
+
content
|
453 |
+
.css({
|
454 |
+
'width' : final_pos.width - currentOpts.padding * 2,
|
455 |
+
'height' : selectedOpts.autoDimensions ? 'auto' : final_pos.height - titleHeight - currentOpts.padding * 2
|
456 |
+
})
|
457 |
+
.html( tmp.contents() );
|
458 |
+
|
459 |
+
wrap
|
460 |
+
.css(final_pos)
|
461 |
+
.fadeIn( currentOpts.transitionIn == 'none' ? 0 : currentOpts.speedIn, _finish );
|
462 |
+
},
|
463 |
+
|
464 |
+
_format_title = function(title) {
|
465 |
+
if (title && title.length) {
|
466 |
+
if (currentOpts.titlePosition == 'float') {
|
467 |
+
return '<table id="fancybox-title-float-wrap" cellpadding="0" cellspacing="0"><tr><td id="fancybox-title-float-left"></td><td id="fancybox-title-float-main">' + title + '</td><td id="fancybox-title-float-right"></td></tr></table>';
|
468 |
+
}
|
469 |
+
|
470 |
+
return '<div id="fancybox-title-' + currentOpts.titlePosition + '">' + title + '</div>';
|
471 |
+
}
|
472 |
+
|
473 |
+
return false;
|
474 |
+
},
|
475 |
+
|
476 |
+
_process_title = function() {
|
477 |
+
titleStr = currentOpts.title || '';
|
478 |
+
titleHeight = 0;
|
479 |
+
|
480 |
+
title
|
481 |
+
.empty()
|
482 |
+
.removeAttr('style')
|
483 |
+
.removeClass();
|
484 |
+
|
485 |
+
if (currentOpts.titleShow === false) {
|
486 |
+
title.hide();
|
487 |
+
return;
|
488 |
+
}
|
489 |
+
|
490 |
+
titleStr = $.isFunction(currentOpts.titleFormat) ? currentOpts.titleFormat(titleStr, currentArray, currentIndex, currentOpts) : _format_title(titleStr);
|
491 |
+
|
492 |
+
if (!titleStr || titleStr === '') {
|
493 |
+
title.hide();
|
494 |
+
return;
|
495 |
+
}
|
496 |
+
|
497 |
+
title
|
498 |
+
.addClass('fancybox-title-' + currentOpts.titlePosition)
|
499 |
+
.html( titleStr )
|
500 |
+
.appendTo( 'body' )
|
501 |
+
.show();
|
502 |
+
|
503 |
+
switch (currentOpts.titlePosition) {
|
504 |
+
case 'inside':
|
505 |
+
title
|
506 |
+
.css({
|
507 |
+
'width' : final_pos.width - (currentOpts.padding * 2),
|
508 |
+
'marginLeft' : currentOpts.padding,
|
509 |
+
'marginRight' : currentOpts.padding
|
510 |
+
});
|
511 |
+
|
512 |
+
titleHeight = title.outerHeight(true);
|
513 |
+
|
514 |
+
title.appendTo( outer );
|
515 |
+
|
516 |
+
final_pos.height += titleHeight;
|
517 |
+
break;
|
518 |
+
|
519 |
+
case 'over':
|
520 |
+
title
|
521 |
+
.css({
|
522 |
+
'marginLeft' : currentOpts.padding,
|
523 |
+
'width' : final_pos.width - (currentOpts.padding * 2),
|
524 |
+
'bottom' : currentOpts.padding
|
525 |
+
})
|
526 |
+
.appendTo( outer );
|
527 |
+
break;
|
528 |
+
|
529 |
+
case 'float':
|
530 |
+
title
|
531 |
+
.css('left', parseInt((title.width() - final_pos.width - 40)/ 2, 10) * -1)
|
532 |
+
.appendTo( wrap );
|
533 |
+
break;
|
534 |
+
|
535 |
+
default:
|
536 |
+
title
|
537 |
+
.css({
|
538 |
+
'width' : final_pos.width - (currentOpts.padding * 2),
|
539 |
+
'paddingLeft' : currentOpts.padding,
|
540 |
+
'paddingRight' : currentOpts.padding
|
541 |
+
})
|
542 |
+
.appendTo( wrap );
|
543 |
+
break;
|
544 |
+
}
|
545 |
+
|
546 |
+
title.hide();
|
547 |
+
},
|
548 |
+
|
549 |
+
_set_navigation = function() {
|
550 |
+
if (currentOpts.enableEscapeButton || currentOpts.enableKeyboardNav) {
|
551 |
+
$(document).bind('keydown.fb', function(e) {
|
552 |
+
if (e.keyCode == 27 && currentOpts.enableEscapeButton) {
|
553 |
+
e.preventDefault();
|
554 |
+
$.fancybox.close();
|
555 |
+
|
556 |
+
} else if ((e.keyCode == 37 || e.keyCode == 39) && currentOpts.enableKeyboardNav && e.target.tagName !== 'INPUT' && e.target.tagName !== 'TEXTAREA' && e.target.tagName !== 'SELECT') {
|
557 |
+
e.preventDefault();
|
558 |
+
$.fancybox[ e.keyCode == 37 ? 'prev' : 'next']();
|
559 |
+
}
|
560 |
+
});
|
561 |
+
}
|
562 |
+
|
563 |
+
if (!currentOpts.showNavArrows) {
|
564 |
+
nav_left.hide();
|
565 |
+
nav_right.hide();
|
566 |
+
return;
|
567 |
+
}
|
568 |
+
|
569 |
+
if ((currentOpts.cyclic && currentArray.length > 1) || currentIndex !== 0) {
|
570 |
+
nav_left.show();
|
571 |
+
}
|
572 |
+
|
573 |
+
if ((currentOpts.cyclic && currentArray.length > 1) || currentIndex != (currentArray.length -1)) {
|
574 |
+
nav_right.show();
|
575 |
+
}
|
576 |
+
},
|
577 |
+
|
578 |
+
_finish = function () {
|
579 |
+
if (!$.support.opacity) {
|
580 |
+
content.get(0).style.removeAttribute('filter');
|
581 |
+
wrap.get(0).style.removeAttribute('filter');
|
582 |
+
}
|
583 |
+
|
584 |
+
if (selectedOpts.autoDimensions) {
|
585 |
+
content.css('height', 'auto');
|
586 |
+
}
|
587 |
+
|
588 |
+
wrap.css('height', 'auto');
|
589 |
+
|
590 |
+
if (titleStr && titleStr.length) {
|
591 |
+
title.show();
|
592 |
+
}
|
593 |
+
|
594 |
+
if (currentOpts.showCloseButton) {
|
595 |
+
close.show();
|
596 |
+
}
|
597 |
+
|
598 |
+
_set_navigation();
|
599 |
+
|
600 |
+
if (currentOpts.hideOnContentClick) {
|
601 |
+
content.bind('click', $.fancybox.close);
|
602 |
+
}
|
603 |
+
|
604 |
+
if (currentOpts.hideOnOverlayClick) {
|
605 |
+
overlay.bind('click', $.fancybox.close);
|
606 |
+
}
|
607 |
+
|
608 |
+
$(window).bind("resize.fb", $.fancybox.resize);
|
609 |
+
|
610 |
+
if (currentOpts.centerOnScroll) {
|
611 |
+
$(window).bind("scroll.fb", $.fancybox.center);
|
612 |
+
}
|
613 |
+
|
614 |
+
if (currentOpts.type == 'iframe') {
|
615 |
+
$('<iframe id="fancybox-frame" name="fancybox-frame' + new Date().getTime() + '" frameborder="0" hspace="0" ' + ($.browser.msie ? 'allowtransparency="true""' : '') + ' scrolling="' + selectedOpts.scrolling + '" src="' + currentOpts.href + '"></iframe>').appendTo(content);
|
616 |
+
}
|
617 |
+
|
618 |
+
wrap.show();
|
619 |
+
|
620 |
+
busy = false;
|
621 |
+
|
622 |
+
$.fancybox.center();
|
623 |
+
|
624 |
+
currentOpts.onComplete(currentArray, currentIndex, currentOpts);
|
625 |
+
|
626 |
+
_preload_images();
|
627 |
+
},
|
628 |
+
|
629 |
+
_preload_images = function() {
|
630 |
+
var href,
|
631 |
+
objNext;
|
632 |
+
|
633 |
+
if ((currentArray.length -1) > currentIndex) {
|
634 |
+
href = currentArray[ currentIndex + 1 ].href;
|
635 |
+
|
636 |
+
if (typeof href !== 'undefined' && href.match(imgRegExp)) {
|
637 |
+
objNext = new Image();
|
638 |
+
objNext.src = href;
|
639 |
+
}
|
640 |
+
}
|
641 |
+
|
642 |
+
if (currentIndex > 0) {
|
643 |
+
href = currentArray[ currentIndex - 1 ].href;
|
644 |
+
|
645 |
+
if (typeof href !== 'undefined' && href.match(imgRegExp)) {
|
646 |
+
objNext = new Image();
|
647 |
+
objNext.src = href;
|
648 |
+
}
|
649 |
+
}
|
650 |
+
},
|
651 |
+
|
652 |
+
_draw = function(pos) {
|
653 |
+
var dim = {
|
654 |
+
width : parseInt(start_pos.width + (final_pos.width - start_pos.width) * pos, 10),
|
655 |
+
height : parseInt(start_pos.height + (final_pos.height - start_pos.height) * pos, 10),
|
656 |
+
|
657 |
+
top : parseInt(start_pos.top + (final_pos.top - start_pos.top) * pos, 10),
|
658 |
+
left : parseInt(start_pos.left + (final_pos.left - start_pos.left) * pos, 10)
|
659 |
+
};
|
660 |
+
|
661 |
+
if (typeof final_pos.opacity !== 'undefined') {
|
662 |
+
dim.opacity = pos < 0.5 ? 0.5 : pos;
|
663 |
+
}
|
664 |
+
|
665 |
+
wrap.css(dim);
|
666 |
+
|
667 |
+
content.css({
|
668 |
+
'width' : dim.width - currentOpts.padding * 2,
|
669 |
+
'height' : dim.height - (titleHeight * pos) - currentOpts.padding * 2
|
670 |
+
});
|
671 |
+
},
|
672 |
+
|
673 |
+
_get_viewport = function() {
|
674 |
+
return [
|
675 |
+
$(window).width() - (currentOpts.margin * 2),
|
676 |
+
$(window).height() - (currentOpts.margin * 2),
|
677 |
+
$(document).scrollLeft() + currentOpts.margin,
|
678 |
+
$(document).scrollTop() + currentOpts.margin
|
679 |
+
];
|
680 |
+
},
|
681 |
+
|
682 |
+
_get_zoom_to = function () {
|
683 |
+
var view = _get_viewport(),
|
684 |
+
to = {},
|
685 |
+
resize = currentOpts.autoScale,
|
686 |
+
double_padding = currentOpts.padding * 2,
|
687 |
+
ratio;
|
688 |
+
|
689 |
+
if (currentOpts.width.toString().indexOf('%') > -1) {
|
690 |
+
to.width = parseInt((view[0] * parseFloat(currentOpts.width)) / 100, 10);
|
691 |
+
} else {
|
692 |
+
to.width = currentOpts.width + double_padding;
|
693 |
+
}
|
694 |
+
|
695 |
+
if (currentOpts.height.toString().indexOf('%') > -1) {
|
696 |
+
to.height = parseInt((view[1] * parseFloat(currentOpts.height)) / 100, 10);
|
697 |
+
} else {
|
698 |
+
to.height = currentOpts.height + double_padding;
|
699 |
+
}
|
700 |
+
|
701 |
+
if (resize && (to.width > view[0] || to.height > view[1])) {
|
702 |
+
if (selectedOpts.type == 'image' || selectedOpts.type == 'swf') {
|
703 |
+
ratio = (currentOpts.width ) / (currentOpts.height );
|
704 |
+
|
705 |
+
if ((to.width ) > view[0]) {
|
706 |
+
to.width = view[0];
|
707 |
+
to.height = parseInt(((to.width - double_padding) / ratio) + double_padding, 10);
|
708 |
+
}
|
709 |
+
|
710 |
+
if ((to.height) > view[1]) {
|
711 |
+
to.height = view[1];
|
712 |
+
to.width = parseInt(((to.height - double_padding) * ratio) + double_padding, 10);
|
713 |
+
}
|
714 |
+
|
715 |
+
} else {
|
716 |
+
to.width = Math.min(to.width, view[0]);
|
717 |
+
to.height = Math.min(to.height, view[1]);
|
718 |
+
}
|
719 |
+
}
|
720 |
+
|
721 |
+
to.top = parseInt(Math.max(view[3] - 20, view[3] + ((view[1] - to.height - 40) * 0.5)), 10);
|
722 |
+
to.left = parseInt(Math.max(view[2] - 20, view[2] + ((view[0] - to.width - 40) * 0.5)), 10);
|
723 |
+
|
724 |
+
return to;
|
725 |
+
},
|
726 |
+
|
727 |
+
_get_obj_pos = function(obj) {
|
728 |
+
var pos = obj.offset();
|
729 |
+
|
730 |
+
pos.top += parseInt( obj.css('paddingTop'), 10 ) || 0;
|
731 |
+
pos.left += parseInt( obj.css('paddingLeft'), 10 ) || 0;
|
732 |
+
|
733 |
+
pos.top += parseInt( obj.css('border-top-width'), 10 ) || 0;
|
734 |
+
pos.left += parseInt( obj.css('border-left-width'), 10 ) || 0;
|
735 |
+
|
736 |
+
pos.width = obj.width();
|
737 |
+
pos.height = obj.height();
|
738 |
+
|
739 |
+
return pos;
|
740 |
+
},
|
741 |
+
|
742 |
+
_get_zoom_from = function() {
|
743 |
+
var orig = selectedOpts.orig ? $(selectedOpts.orig) : false,
|
744 |
+
from = {},
|
745 |
+
pos,
|
746 |
+
view;
|
747 |
+
|
748 |
+
if (orig && orig.length) {
|
749 |
+
pos = _get_obj_pos(orig);
|
750 |
+
|
751 |
+
from = {
|
752 |
+
width : pos.width + (currentOpts.padding * 2),
|
753 |
+
height : pos.height + (currentOpts.padding * 2),
|
754 |
+
top : pos.top - currentOpts.padding - 20,
|
755 |
+
left : pos.left - currentOpts.padding - 20
|
756 |
+
};
|
757 |
+
|
758 |
+
} else {
|
759 |
+
view = _get_viewport();
|
760 |
+
|
761 |
+
from = {
|
762 |
+
width : currentOpts.padding * 2,
|
763 |
+
height : currentOpts.padding * 2,
|
764 |
+
top : parseInt(view[3] + view[1] * 0.5, 10),
|
765 |
+
left : parseInt(view[2] + view[0] * 0.5, 10)
|
766 |
+
};
|
767 |
+
}
|
768 |
+
|
769 |
+
return from;
|
770 |
+
},
|
771 |
+
|
772 |
+
_animate_loading = function() {
|
773 |
+
if (!loading.is(':visible')){
|
774 |
+
clearInterval(loadingTimer);
|
775 |
+
return;
|
776 |
+
}
|
777 |
+
|
778 |
+
$('div', loading).css('top', (loadingFrame * -40) + 'px');
|
779 |
+
|
780 |
+
loadingFrame = (loadingFrame + 1) % 12;
|
781 |
+
};
|
782 |
+
|
783 |
+
/*
|
784 |
+
* Public methods
|
785 |
+
*/
|
786 |
+
|
787 |
+
$.fn.fancybox = function(options) {
|
788 |
+
if (!$(this).length) {
|
789 |
+
return this;
|
790 |
+
}
|
791 |
+
|
792 |
+
$(this)
|
793 |
+
.data('fancybox', $.extend({}, options, ($.metadata ? $(this).metadata() : {})))
|
794 |
+
.unbind('click.fb')
|
795 |
+
.bind('click.fb', function(e) {
|
796 |
+
e.preventDefault();
|
797 |
+
|
798 |
+
if (busy) {
|
799 |
+
return;
|
800 |
+
}
|
801 |
+
|
802 |
+
busy = true;
|
803 |
+
|
804 |
+
$(this).blur();
|
805 |
+
|
806 |
+
selectedArray = [];
|
807 |
+
selectedIndex = 0;
|
808 |
+
|
809 |
+
var rel = $(this).attr('rel') || '';
|
810 |
+
|
811 |
+
if (!rel || rel == '' || rel === 'nofollow') {
|
812 |
+
selectedArray.push(this);
|
813 |
+
|
814 |
+
} else {
|
815 |
+
selectedArray = $("a[rel=" + rel + "], area[rel=" + rel + "]");
|
816 |
+
selectedIndex = selectedArray.index( this );
|
817 |
+
}
|
818 |
+
|
819 |
+
_start();
|
820 |
+
|
821 |
+
return;
|
822 |
+
});
|
823 |
+
|
824 |
+
return this;
|
825 |
+
};
|
826 |
+
|
827 |
+
$.fancybox = function(obj) {
|
828 |
+
var opts;
|
829 |
+
|
830 |
+
if (busy) {
|
831 |
+
return;
|
832 |
+
}
|
833 |
+
|
834 |
+
busy = true;
|
835 |
+
opts = typeof arguments[1] !== 'undefined' ? arguments[1] : {};
|
836 |
+
|
837 |
+
selectedArray = [];
|
838 |
+
selectedIndex = parseInt(opts.index, 10) || 0;
|
839 |
+
|
840 |
+
if ($.isArray(obj)) {
|
841 |
+
for (var i = 0, j = obj.length; i < j; i++) {
|
842 |
+
if (typeof obj[i] == 'object') {
|
843 |
+
$(obj[i]).data('fancybox', $.extend({}, opts, obj[i]));
|
844 |
+
} else {
|
845 |
+
obj[i] = $({}).data('fancybox', $.extend({content : obj[i]}, opts));
|
846 |
+
}
|
847 |
+
}
|
848 |
+
|
849 |
+
selectedArray = jQuery.merge(selectedArray, obj);
|
850 |
+
|
851 |
+
} else {
|
852 |
+
if (typeof obj == 'object') {
|
853 |
+
$(obj).data('fancybox', $.extend({}, opts, obj));
|
854 |
+
} else {
|
855 |
+
obj = $({}).data('fancybox', $.extend({content : obj}, opts));
|
856 |
+
}
|
857 |
+
|
858 |
+
selectedArray.push(obj);
|
859 |
+
}
|
860 |
+
|
861 |
+
if (selectedIndex > selectedArray.length || selectedIndex < 0) {
|
862 |
+
selectedIndex = 0;
|
863 |
+
}
|
864 |
+
|
865 |
+
_start();
|
866 |
+
};
|
867 |
+
|
868 |
+
$.fancybox.showActivity = function() {
|
869 |
+
clearInterval(loadingTimer);
|
870 |
+
|
871 |
+
loading.show();
|
872 |
+
loadingTimer = setInterval(_animate_loading, 66);
|
873 |
+
};
|
874 |
+
|
875 |
+
$.fancybox.hideActivity = function() {
|
876 |
+
loading.hide();
|
877 |
+
};
|
878 |
+
|
879 |
+
$.fancybox.next = function() {
|
880 |
+
return $.fancybox.pos( currentIndex + 1);
|
881 |
+
};
|
882 |
+
|
883 |
+
$.fancybox.prev = function() {
|
884 |
+
return $.fancybox.pos( currentIndex - 1);
|
885 |
+
};
|
886 |
+
|
887 |
+
$.fancybox.pos = function(pos) {
|
888 |
+
if (busy) {
|
889 |
+
return;
|
890 |
+
}
|
891 |
+
|
892 |
+
pos = parseInt(pos);
|
893 |
+
|
894 |
+
selectedArray = currentArray;
|
895 |
+
|
896 |
+
if (pos > -1 && pos < currentArray.length) {
|
897 |
+
selectedIndex = pos;
|
898 |
+
_start();
|
899 |
+
|
900 |
+
} else if (currentOpts.cyclic && currentArray.length > 1) {
|
901 |
+
selectedIndex = pos >= currentArray.length ? 0 : currentArray.length - 1;
|
902 |
+
_start();
|
903 |
+
}
|
904 |
+
|
905 |
+
return;
|
906 |
+
};
|
907 |
+
|
908 |
+
$.fancybox.cancel = function() {
|
909 |
+
if (busy) {
|
910 |
+
return;
|
911 |
+
}
|
912 |
+
|
913 |
+
busy = true;
|
914 |
+
|
915 |
+
$.event.trigger('fancybox-cancel');
|
916 |
+
|
917 |
+
_abort();
|
918 |
+
|
919 |
+
selectedOpts.onCancel(selectedArray, selectedIndex, selectedOpts);
|
920 |
+
|
921 |
+
busy = false;
|
922 |
+
};
|
923 |
+
|
924 |
+
// Note: within an iframe use - parent.$.fancybox.close();
|
925 |
+
$.fancybox.close = function() {
|
926 |
+
if (busy || wrap.is(':hidden')) {
|
927 |
+
return;
|
928 |
+
}
|
929 |
+
|
930 |
+
busy = true;
|
931 |
+
|
932 |
+
if (currentOpts && false === currentOpts.onCleanup(currentArray, currentIndex, currentOpts)) {
|
933 |
+
busy = false;
|
934 |
+
return;
|
935 |
+
}
|
936 |
+
|
937 |
+
_abort();
|
938 |
+
|
939 |
+
$(close.add( nav_left ).add( nav_right )).hide();
|
940 |
+
|
941 |
+
$(content.add( overlay )).unbind();
|
942 |
+
|
943 |
+
$(window).unbind("resize.fb scroll.fb");
|
944 |
+
$(document).unbind('keydown.fb');
|
945 |
+
|
946 |
+
content.find('iframe').attr('src', isIE6 && /^https/i.test(window.location.href || '') ? 'javascript:void(false)' : 'about:blank');
|
947 |
+
|
948 |
+
if (currentOpts.titlePosition !== 'inside') {
|
949 |
+
title.empty();
|
950 |
+
}
|
951 |
+
|
952 |
+
wrap.stop();
|
953 |
+
|
954 |
+
function _cleanup() {
|
955 |
+
overlay.fadeOut('fast');
|
956 |
+
|
957 |
+
title.empty().hide();
|
958 |
+
wrap.hide();
|
959 |
+
|
960 |
+
$.event.trigger('fancybox-cleanup');
|
961 |
+
|
962 |
+
content.empty();
|
963 |
+
|
964 |
+
currentOpts.onClosed(currentArray, currentIndex, currentOpts);
|
965 |
+
|
966 |
+
currentArray = selectedOpts = [];
|
967 |
+
currentIndex = selectedIndex = 0;
|
968 |
+
currentOpts = selectedOpts = {};
|
969 |
+
|
970 |
+
busy = false;
|
971 |
+
}
|
972 |
+
|
973 |
+
if (currentOpts.transitionOut == 'elastic') {
|
974 |
+
start_pos = _get_zoom_from();
|
975 |
+
|
976 |
+
var pos = wrap.position();
|
977 |
+
|
978 |
+
final_pos = {
|
979 |
+
top : pos.top ,
|
980 |
+
left : pos.left,
|
981 |
+
width : wrap.width(),
|
982 |
+
height : wrap.height()
|
983 |
+
};
|
984 |
+
|
985 |
+
if (currentOpts.opacity) {
|
986 |
+
final_pos.opacity = 1;
|
987 |
+
}
|
988 |
+
|
989 |
+
title.empty().hide();
|
990 |
+
|
991 |
+
fx.prop = 1;
|
992 |
+
|
993 |
+
$(fx).animate({ prop: 0 }, {
|
994 |
+
duration : currentOpts.speedOut,
|
995 |
+
easing : currentOpts.easingOut,
|
996 |
+
step : _draw,
|
997 |
+
complete : _cleanup
|
998 |
+
});
|
999 |
+
|
1000 |
+
} else {
|
1001 |
+
wrap.fadeOut( currentOpts.transitionOut == 'none' ? 0 : currentOpts.speedOut, _cleanup);
|
1002 |
+
}
|
1003 |
+
};
|
1004 |
+
|
1005 |
+
$.fancybox.resize = function() {
|
1006 |
+
if (overlay.is(':visible')) {
|
1007 |
+
overlay.css('height', $(document).height());
|
1008 |
+
}
|
1009 |
+
|
1010 |
+
$.fancybox.center(true);
|
1011 |
+
};
|
1012 |
+
|
1013 |
+
$.fancybox.center = function() {
|
1014 |
+
var view, align;
|
1015 |
+
|
1016 |
+
if (busy) {
|
1017 |
+
return;
|
1018 |
+
}
|
1019 |
+
|
1020 |
+
align = arguments[0] === true ? 1 : 0;
|
1021 |
+
view = _get_viewport();
|
1022 |
+
|
1023 |
+
if (!align && (wrap.width() > view[0] || wrap.height() > view[1])) {
|
1024 |
+
return;
|
1025 |
+
}
|
1026 |
+
|
1027 |
+
wrap
|
1028 |
+
.stop()
|
1029 |
+
.animate({
|
1030 |
+
'top' : parseInt(Math.max(view[3] - 20, view[3] + ((view[1] - content.height() - 40) * 0.5) - currentOpts.padding)),
|
1031 |
+
'left' : parseInt(Math.max(view[2] - 20, view[2] + ((view[0] - content.width() - 40) * 0.5) - currentOpts.padding))
|
1032 |
+
}, typeof arguments[0] == 'number' ? arguments[0] : 200);
|
1033 |
+
};
|
1034 |
+
|
1035 |
+
$.fancybox.init = function() {
|
1036 |
+
if ($("#fancybox-wrap").length) {
|
1037 |
+
return;
|
1038 |
+
}
|
1039 |
+
|
1040 |
+
$('body').append(
|
1041 |
+
tmp = $('<div id="fancybox-tmp"></div>'),
|
1042 |
+
loading = $('<div id="fancybox-loading"><div></div></div>'),
|
1043 |
+
overlay = $('<div id="fancybox-overlay"></div>'),
|
1044 |
+
wrap = $('<div id="fancybox-wrap"></div>')
|
1045 |
+
);
|
1046 |
+
|
1047 |
+
outer = $('<div id="fancybox-outer"></div>')
|
1048 |
+
.append('<div class="fancybox-bg" id="fancybox-bg-n"></div><div class="fancybox-bg" id="fancybox-bg-ne"></div><div class="fancybox-bg" id="fancybox-bg-e"></div><div class="fancybox-bg" id="fancybox-bg-se"></div><div class="fancybox-bg" id="fancybox-bg-s"></div><div class="fancybox-bg" id="fancybox-bg-sw"></div><div class="fancybox-bg" id="fancybox-bg-w"></div><div class="fancybox-bg" id="fancybox-bg-nw"></div>')
|
1049 |
+
.appendTo( wrap );
|
1050 |
+
|
1051 |
+
outer.append(
|
1052 |
+
content = $('<div id="fancybox-content"></div>'),
|
1053 |
+
close = $('<a id="fancybox-close"></a>'),
|
1054 |
+
title = $('<div id="fancybox-title"></div>'),
|
1055 |
+
|
1056 |
+
nav_left = $('<a href="javascript:;" id="fancybox-left"><span class="fancy-ico" id="fancybox-left-ico"></span></a>'),
|
1057 |
+
nav_right = $('<a href="javascript:;" id="fancybox-right"><span class="fancy-ico" id="fancybox-right-ico"></span></a>')
|
1058 |
+
);
|
1059 |
+
|
1060 |
+
close.click($.fancybox.close);
|
1061 |
+
loading.click($.fancybox.cancel);
|
1062 |
+
|
1063 |
+
nav_left.click(function(e) {
|
1064 |
+
e.preventDefault();
|
1065 |
+
$.fancybox.prev();
|
1066 |
+
});
|
1067 |
+
|
1068 |
+
nav_right.click(function(e) {
|
1069 |
+
e.preventDefault();
|
1070 |
+
$.fancybox.next();
|
1071 |
+
});
|
1072 |
+
|
1073 |
+
if ($.fn.mousewheel) {
|
1074 |
+
wrap.bind('mousewheel.fb', function(e, delta) {
|
1075 |
+
if (busy) {
|
1076 |
+
e.preventDefault();
|
1077 |
+
|
1078 |
+
} else if ($(e.target).get(0).clientHeight == 0 || $(e.target).get(0).scrollHeight === $(e.target).get(0).clientHeight) {
|
1079 |
+
e.preventDefault();
|
1080 |
+
$.fancybox[ delta > 0 ? 'prev' : 'next']();
|
1081 |
+
}
|
1082 |
+
});
|
1083 |
+
}
|
1084 |
+
|
1085 |
+
if (!$.support.opacity) {
|
1086 |
+
wrap.addClass('fancybox-ie');
|
1087 |
+
}
|
1088 |
+
|
1089 |
+
if (isIE6) {
|
1090 |
+
loading.addClass('fancybox-ie6');
|
1091 |
+
wrap.addClass('fancybox-ie6');
|
1092 |
+
|
1093 |
+
$('<iframe id="fancybox-hide-sel-frame" src="' + (/^https/i.test(window.location.href || '') ? 'javascript:void(false)' : 'about:blank' ) + '" scrolling="no" border="0" frameborder="0" tabindex="-1"></iframe>').prependTo(outer);
|
1094 |
+
}
|
1095 |
+
};
|
1096 |
+
|
1097 |
+
$.fn.fancybox.defaults = {
|
1098 |
+
padding : 10,
|
1099 |
+
margin : 40,
|
1100 |
+
opacity : false,
|
1101 |
+
modal : false,
|
1102 |
+
cyclic : false,
|
1103 |
+
scrolling : 'auto', // 'auto', 'yes' or 'no'
|
1104 |
+
|
1105 |
+
width : 560,
|
1106 |
+
height : 340,
|
1107 |
+
|
1108 |
+
autoScale : true,
|
1109 |
+
autoDimensions : true,
|
1110 |
+
centerOnScroll : false,
|
1111 |
+
|
1112 |
+
ajax : {},
|
1113 |
+
swf : { wmode: 'transparent' },
|
1114 |
+
|
1115 |
+
hideOnOverlayClick : true,
|
1116 |
+
hideOnContentClick : false,
|
1117 |
+
|
1118 |
+
overlayShow : true,
|
1119 |
+
overlayOpacity : 0.7,
|
1120 |
+
overlayColor : '#777',
|
1121 |
+
|
1122 |
+
titleShow : true,
|
1123 |
+
titlePosition : 'float', // 'float', 'outside', 'inside' or 'over'
|
1124 |
+
titleFormat : null,
|
1125 |
+
titleFromAlt : false,
|
1126 |
+
|
1127 |
+
transitionIn : 'fade', // 'elastic', 'fade' or 'none'
|
1128 |
+
transitionOut : 'fade', // 'elastic', 'fade' or 'none'
|
1129 |
+
|
1130 |
+
speedIn : 300,
|
1131 |
+
speedOut : 300,
|
1132 |
+
|
1133 |
+
changeSpeed : 300,
|
1134 |
+
changeFade : 'fast',
|
1135 |
+
|
1136 |
+
easingIn : 'swing',
|
1137 |
+
easingOut : 'swing',
|
1138 |
+
|
1139 |
+
showCloseButton : true,
|
1140 |
+
showNavArrows : true,
|
1141 |
+
enableEscapeButton : true,
|
1142 |
+
enableKeyboardNav : true,
|
1143 |
+
|
1144 |
+
onStart : function(){},
|
1145 |
+
onCancel : function(){},
|
1146 |
+
onComplete : function(){},
|
1147 |
+
onCleanup : function(){},
|
1148 |
+
onClosed : function(){},
|
1149 |
+
onError : function(){}
|
1150 |
+
};
|
1151 |
+
|
1152 |
+
$(document).ready(function() {
|
1153 |
+
$.fancybox.init();
|
1154 |
+
});
|
1155 |
+
|
1156 |
+
})(jQuery);
|
includes/lib/fancybox/jquery.fancybox-1.3.4.pack.js
ADDED
@@ -0,0 +1,46 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*
|
2 |
+
* FancyBox - jQuery Plugin
|
3 |
+
* Simple and fancy lightbox alternative
|
4 |
+
*
|
5 |
+
* Examples and documentation at: http://fancybox.net
|
6 |
+
*
|
7 |
+
* Copyright (c) 2008 - 2010 Janis Skarnelis
|
8 |
+
* That said, it is hardly a one-person project. Many people have submitted bugs, code, and offered their advice freely. Their support is greatly appreciated.
|
9 |
+
*
|
10 |
+
* Version: 1.3.4 (11/11/2010)
|
11 |
+
* Requires: jQuery v1.3+
|
12 |
+
*
|
13 |
+
* Dual licensed under the MIT and GPL licenses:
|
14 |
+
* http://www.opensource.org/licenses/mit-license.php
|
15 |
+
* http://www.gnu.org/licenses/gpl.html
|
16 |
+
*/
|
17 |
+
|
18 |
+
;(function(b){var m,t,u,f,D,j,E,n,z,A,q=0,e={},o=[],p=0,d={},l=[],G=null,v=new Image,J=/\.(jpg|gif|png|bmp|jpeg)(.*)?$/i,W=/[^\.]\.(swf)\s*$/i,K,L=1,y=0,s="",r,i,h=false,B=b.extend(b("<div/>")[0],{prop:0}),M=b.browser.msie&&b.browser.version<7&&!window.XMLHttpRequest,N=function(){t.hide();v.onerror=v.onload=null;G&&G.abort();m.empty()},O=function(){if(false===e.onError(o,q,e)){t.hide();h=false}else{e.titleShow=false;e.width="auto";e.height="auto";m.html('<p id="fancybox-error">The requested content cannot be loaded.<br />Please try again later.</p>');
|
19 |
+
F()}},I=function(){var a=o[q],c,g,k,C,P,w;N();e=b.extend({},b.fn.fancybox.defaults,typeof b(a).data("fancybox")=="undefined"?e:b(a).data("fancybox"));w=e.onStart(o,q,e);if(w===false)h=false;else{if(typeof w=="object")e=b.extend(e,w);k=e.title||(a.nodeName?b(a).attr("title"):a.title)||"";if(a.nodeName&&!e.orig)e.orig=b(a).children("img:first").length?b(a).children("img:first"):b(a);if(k===""&&e.orig&&e.titleFromAlt)k=e.orig.attr("alt");c=e.href||(a.nodeName?b(a).attr("href"):a.href)||null;if(/^(?:javascript)/i.test(c)||
|
20 |
+
c=="#")c=null;if(e.type){g=e.type;if(!c)c=e.content}else if(e.content)g="html";else if(c)g=c.match(J)?"image":c.match(W)?"swf":b(a).hasClass("iframe")?"iframe":c.indexOf("#")===0?"inline":"ajax";if(g){if(g=="inline"){a=c.substr(c.indexOf("#"));g=b(a).length>0?"inline":"ajax"}e.type=g;e.href=c;e.title=k;if(e.autoDimensions)if(e.type=="html"||e.type=="inline"||e.type=="ajax"){e.width="auto";e.height="auto"}else e.autoDimensions=false;if(e.modal){e.overlayShow=true;e.hideOnOverlayClick=false;e.hideOnContentClick=
|
21 |
+
false;e.enableEscapeButton=false;e.showCloseButton=false}e.padding=parseInt(e.padding,10);e.margin=parseInt(e.margin,10);m.css("padding",e.padding+e.margin);b(".fancybox-inline-tmp").unbind("fancybox-cancel").bind("fancybox-change",function(){b(this).replaceWith(j.children())});switch(g){case "html":m.html(e.content);F();break;case "inline":if(b(a).parent().is("#fancybox-content")===true){h=false;break}b('<div class="fancybox-inline-tmp" />').hide().insertBefore(b(a)).bind("fancybox-cleanup",function(){b(this).replaceWith(j.children())}).bind("fancybox-cancel",
|
22 |
+
function(){b(this).replaceWith(m.children())});b(a).appendTo(m);F();break;case "image":h=false;b.fancybox.showActivity();v=new Image;v.onerror=function(){O()};v.onload=function(){h=true;v.onerror=v.onload=null;e.width=v.width;e.height=v.height;b("<img />").attr({id:"fancybox-img",src:v.src,alt:e.title}).appendTo(m);Q()};v.src=c;break;case "swf":e.scrolling="no";C='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="'+e.width+'" height="'+e.height+'"><param name="movie" value="'+c+
|
23 |
+
'"></param>';P="";b.each(e.swf,function(x,H){C+='<param name="'+x+'" value="'+H+'"></param>';P+=" "+x+'="'+H+'"'});C+='<embed src="'+c+'" type="application/x-shockwave-flash" width="'+e.width+'" height="'+e.height+'"'+P+"></embed></object>";m.html(C);F();break;case "ajax":h=false;b.fancybox.showActivity();e.ajax.win=e.ajax.success;G=b.ajax(b.extend({},e.ajax,{url:c,data:e.ajax.data||{},error:function(x){x.status>0&&O()},success:function(x,H,R){if((typeof R=="object"?R:G).status==200){if(typeof e.ajax.win==
|
24 |
+
"function"){w=e.ajax.win(c,x,H,R);if(w===false){t.hide();return}else if(typeof w=="string"||typeof w=="object")x=w}m.html(x);F()}}}));break;case "iframe":Q()}}else O()}},F=function(){var a=e.width,c=e.height;a=a.toString().indexOf("%")>-1?parseInt((b(window).width()-e.margin*2)*parseFloat(a)/100,10)+"px":a=="auto"?"auto":a+"px";c=c.toString().indexOf("%")>-1?parseInt((b(window).height()-e.margin*2)*parseFloat(c)/100,10)+"px":c=="auto"?"auto":c+"px";m.wrapInner('<div style="width:'+a+";height:"+c+
|
25 |
+
";overflow: "+(e.scrolling=="auto"?"auto":e.scrolling=="yes"?"scroll":"hidden")+';position:relative;"></div>');e.width=m.width();e.height=m.height();Q()},Q=function(){var a,c;t.hide();if(f.is(":visible")&&false===d.onCleanup(l,p,d)){b.event.trigger("fancybox-cancel");h=false}else{h=true;b(j.add(u)).unbind();b(window).unbind("resize.fb scroll.fb");b(document).unbind("keydown.fb");f.is(":visible")&&d.titlePosition!=="outside"&&f.css("height",f.height());l=o;p=q;d=e;if(d.overlayShow){u.css({"background-color":d.overlayColor,
|
26 |
+
opacity:d.overlayOpacity,cursor:d.hideOnOverlayClick?"pointer":"auto",height:b(document).height()});if(!u.is(":visible")){M&&b("select:not(#fancybox-tmp select)").filter(function(){return this.style.visibility!=="hidden"}).css({visibility:"hidden"}).one("fancybox-cleanup",function(){this.style.visibility="inherit"});u.show()}}else u.hide();i=X();s=d.title||"";y=0;n.empty().removeAttr("style").removeClass();if(d.titleShow!==false){if(b.isFunction(d.titleFormat))a=d.titleFormat(s,l,p,d);else a=s&&s.length?
|
27 |
+
d.titlePosition=="float"?'<table id="fancybox-title-float-wrap" cellpadding="0" cellspacing="0"><tr><td id="fancybox-title-float-left"></td><td id="fancybox-title-float-main">'+s+'</td><td id="fancybox-title-float-right"></td></tr></table>':'<div id="fancybox-title-'+d.titlePosition+'">'+s+"</div>":false;s=a;if(!(!s||s==="")){n.addClass("fancybox-title-"+d.titlePosition).html(s).appendTo("body").show();switch(d.titlePosition){case "inside":n.css({width:i.width-d.padding*2,marginLeft:d.padding,marginRight:d.padding});
|
28 |
+
y=n.outerHeight(true);n.appendTo(D);i.height+=y;break;case "over":n.css({marginLeft:d.padding,width:i.width-d.padding*2,bottom:d.padding}).appendTo(D);break;case "float":n.css("left",parseInt((n.width()-i.width-40)/2,10)*-1).appendTo(f);break;default:n.css({width:i.width-d.padding*2,paddingLeft:d.padding,paddingRight:d.padding}).appendTo(f)}}}n.hide();if(f.is(":visible")){b(E.add(z).add(A)).hide();a=f.position();r={top:a.top,left:a.left,width:f.width(),height:f.height()};c=r.width==i.width&&r.height==
|
29 |
+
i.height;j.fadeTo(d.changeFade,0.3,function(){var g=function(){j.html(m.contents()).fadeTo(d.changeFade,1,S)};b.event.trigger("fancybox-change");j.empty().removeAttr("filter").css({"border-width":d.padding,width:i.width-d.padding*2,height:e.autoDimensions?"auto":i.height-y-d.padding*2});if(c)g();else{B.prop=0;b(B).animate({prop:1},{duration:d.changeSpeed,easing:d.easingChange,step:T,complete:g})}})}else{f.removeAttr("style");j.css("border-width",d.padding);if(d.transitionIn=="elastic"){r=V();j.html(m.contents());
|
30 |
+
f.show();if(d.opacity)i.opacity=0;B.prop=0;b(B).animate({prop:1},{duration:d.speedIn,easing:d.easingIn,step:T,complete:S})}else{d.titlePosition=="inside"&&y>0&&n.show();j.css({width:i.width-d.padding*2,height:e.autoDimensions?"auto":i.height-y-d.padding*2}).html(m.contents());f.css(i).fadeIn(d.transitionIn=="none"?0:d.speedIn,S)}}}},Y=function(){if(d.enableEscapeButton||d.enableKeyboardNav)b(document).bind("keydown.fb",function(a){if(a.keyCode==27&&d.enableEscapeButton){a.preventDefault();b.fancybox.close()}else if((a.keyCode==
|
31 |
+
37||a.keyCode==39)&&d.enableKeyboardNav&&a.target.tagName!=="INPUT"&&a.target.tagName!=="TEXTAREA"&&a.target.tagName!=="SELECT"){a.preventDefault();b.fancybox[a.keyCode==37?"prev":"next"]()}});if(d.showNavArrows){if(d.cyclic&&l.length>1||p!==0)z.show();if(d.cyclic&&l.length>1||p!=l.length-1)A.show()}else{z.hide();A.hide()}},S=function(){if(!b.support.opacity){j.get(0).style.removeAttribute("filter");f.get(0).style.removeAttribute("filter")}e.autoDimensions&&j.css("height","auto");f.css("height","auto");
|
32 |
+
s&&s.length&&n.show();d.showCloseButton&&E.show();Y();d.hideOnContentClick&&j.bind("click",b.fancybox.close);d.hideOnOverlayClick&&u.bind("click",b.fancybox.close);b(window).bind("resize.fb",b.fancybox.resize);d.centerOnScroll&&b(window).bind("scroll.fb",b.fancybox.center);if(d.type=="iframe")b('<iframe id="fancybox-frame" name="fancybox-frame'+(new Date).getTime()+'" frameborder="0" hspace="0" '+(b.browser.msie?'allowtransparency="true""':"")+' scrolling="'+e.scrolling+'" src="'+d.href+'"></iframe>').appendTo(j);
|
33 |
+
f.show();h=false;b.fancybox.center();d.onComplete(l,p,d);var a,c;if(l.length-1>p){a=l[p+1].href;if(typeof a!=="undefined"&&a.match(J)){c=new Image;c.src=a}}if(p>0){a=l[p-1].href;if(typeof a!=="undefined"&&a.match(J)){c=new Image;c.src=a}}},T=function(a){var c={width:parseInt(r.width+(i.width-r.width)*a,10),height:parseInt(r.height+(i.height-r.height)*a,10),top:parseInt(r.top+(i.top-r.top)*a,10),left:parseInt(r.left+(i.left-r.left)*a,10)};if(typeof i.opacity!=="undefined")c.opacity=a<0.5?0.5:a;f.css(c);
|
34 |
+
j.css({width:c.width-d.padding*2,height:c.height-y*a-d.padding*2})},U=function(){return[b(window).width()-d.margin*2,b(window).height()-d.margin*2,b(document).scrollLeft()+d.margin,b(document).scrollTop()+d.margin]},X=function(){var a=U(),c={},g=d.autoScale,k=d.padding*2;c.width=d.width.toString().indexOf("%")>-1?parseInt(a[0]*parseFloat(d.width)/100,10):d.width+k;c.height=d.height.toString().indexOf("%")>-1?parseInt(a[1]*parseFloat(d.height)/100,10):d.height+k;if(g&&(c.width>a[0]||c.height>a[1]))if(e.type==
|
35 |
+
"image"||e.type=="swf"){g=d.width/d.height;if(c.width>a[0]){c.width=a[0];c.height=parseInt((c.width-k)/g+k,10)}if(c.height>a[1]){c.height=a[1];c.width=parseInt((c.height-k)*g+k,10)}}else{c.width=Math.min(c.width,a[0]);c.height=Math.min(c.height,a[1])}c.top=parseInt(Math.max(a[3]-20,a[3]+(a[1]-c.height-40)*0.5),10);c.left=parseInt(Math.max(a[2]-20,a[2]+(a[0]-c.width-40)*0.5),10);return c},V=function(){var a=e.orig?b(e.orig):false,c={};if(a&&a.length){c=a.offset();c.top+=parseInt(a.css("paddingTop"),
|
36 |
+
10)||0;c.left+=parseInt(a.css("paddingLeft"),10)||0;c.top+=parseInt(a.css("border-top-width"),10)||0;c.left+=parseInt(a.css("border-left-width"),10)||0;c.width=a.width();c.height=a.height();c={width:c.width+d.padding*2,height:c.height+d.padding*2,top:c.top-d.padding-20,left:c.left-d.padding-20}}else{a=U();c={width:d.padding*2,height:d.padding*2,top:parseInt(a[3]+a[1]*0.5,10),left:parseInt(a[2]+a[0]*0.5,10)}}return c},Z=function(){if(t.is(":visible")){b("div",t).css("top",L*-40+"px");L=(L+1)%12}else clearInterval(K)};
|
37 |
+
b.fn.fancybox=function(a){if(!b(this).length)return this;b(this).data("fancybox",b.extend({},a,b.metadata?b(this).metadata():{})).unbind("click.fb").bind("click.fb",function(c){c.preventDefault();if(!h){h=true;b(this).blur();o=[];q=0;c=b(this).attr("rel")||"";if(!c||c==""||c==="nofollow")o.push(this);else{o=b("a[rel="+c+"], area[rel="+c+"]");q=o.index(this)}I()}});return this};b.fancybox=function(a,c){var g;if(!h){h=true;g=typeof c!=="undefined"?c:{};o=[];q=parseInt(g.index,10)||0;if(b.isArray(a)){for(var k=
|
38 |
+
0,C=a.length;k<C;k++)if(typeof a[k]=="object")b(a[k]).data("fancybox",b.extend({},g,a[k]));else a[k]=b({}).data("fancybox",b.extend({content:a[k]},g));o=jQuery.merge(o,a)}else{if(typeof a=="object")b(a).data("fancybox",b.extend({},g,a));else a=b({}).data("fancybox",b.extend({content:a},g));o.push(a)}if(q>o.length||q<0)q=0;I()}};b.fancybox.showActivity=function(){clearInterval(K);t.show();K=setInterval(Z,66)};b.fancybox.hideActivity=function(){t.hide()};b.fancybox.next=function(){return b.fancybox.pos(p+
|
39 |
+
1)};b.fancybox.prev=function(){return b.fancybox.pos(p-1)};b.fancybox.pos=function(a){if(!h){a=parseInt(a);o=l;if(a>-1&&a<l.length){q=a;I()}else if(d.cyclic&&l.length>1){q=a>=l.length?0:l.length-1;I()}}};b.fancybox.cancel=function(){if(!h){h=true;b.event.trigger("fancybox-cancel");N();e.onCancel(o,q,e);h=false}};b.fancybox.close=function(){function a(){u.fadeOut("fast");n.empty().hide();f.hide();b.event.trigger("fancybox-cleanup");j.empty();d.onClosed(l,p,d);l=e=[];p=q=0;d=e={};h=false}if(!(h||f.is(":hidden"))){h=
|
40 |
+
true;if(d&&false===d.onCleanup(l,p,d))h=false;else{N();b(E.add(z).add(A)).hide();b(j.add(u)).unbind();b(window).unbind("resize.fb scroll.fb");b(document).unbind("keydown.fb");j.find("iframe").attr("src",M&&/^https/i.test(window.location.href||"")?"javascript:void(false)":"about:blank");d.titlePosition!=="inside"&&n.empty();f.stop();if(d.transitionOut=="elastic"){r=V();var c=f.position();i={top:c.top,left:c.left,width:f.width(),height:f.height()};if(d.opacity)i.opacity=1;n.empty().hide();B.prop=1;
|
41 |
+
b(B).animate({prop:0},{duration:d.speedOut,easing:d.easingOut,step:T,complete:a})}else f.fadeOut(d.transitionOut=="none"?0:d.speedOut,a)}}};b.fancybox.resize=function(){u.is(":visible")&&u.css("height",b(document).height());b.fancybox.center(true)};b.fancybox.center=function(a){var c,g;if(!h){g=a===true?1:0;c=U();!g&&(f.width()>c[0]||f.height()>c[1])||f.stop().animate({top:parseInt(Math.max(c[3]-20,c[3]+(c[1]-j.height()-40)*0.5-d.padding)),left:parseInt(Math.max(c[2]-20,c[2]+(c[0]-j.width()-40)*0.5-
|
42 |
+
d.padding))},typeof a=="number"?a:200)}};b.fancybox.init=function(){if(!b("#fancybox-wrap").length){b("body").append(m=b('<div id="fancybox-tmp"></div>'),t=b('<div id="fancybox-loading"><div></div></div>'),u=b('<div id="fancybox-overlay"></div>'),f=b('<div id="fancybox-wrap"></div>'));D=b('<div id="fancybox-outer"></div>').append('<div class="fancybox-bg" id="fancybox-bg-n"></div><div class="fancybox-bg" id="fancybox-bg-ne"></div><div class="fancybox-bg" id="fancybox-bg-e"></div><div class="fancybox-bg" id="fancybox-bg-se"></div><div class="fancybox-bg" id="fancybox-bg-s"></div><div class="fancybox-bg" id="fancybox-bg-sw"></div><div class="fancybox-bg" id="fancybox-bg-w"></div><div class="fancybox-bg" id="fancybox-bg-nw"></div>').appendTo(f);
|
43 |
+
D.append(j=b('<div id="fancybox-content"></div>'),E=b('<a id="fancybox-close"></a>'),n=b('<div id="fancybox-title"></div>'),z=b('<a href="javascript:;" id="fancybox-left"><span class="fancy-ico" id="fancybox-left-ico"></span></a>'),A=b('<a href="javascript:;" id="fancybox-right"><span class="fancy-ico" id="fancybox-right-ico"></span></a>'));E.click(b.fancybox.close);t.click(b.fancybox.cancel);z.click(function(a){a.preventDefault();b.fancybox.prev()});A.click(function(a){a.preventDefault();b.fancybox.next()});
|
44 |
+
b.fn.mousewheel&&f.bind("mousewheel.fb",function(a,c){if(h)a.preventDefault();else if(b(a.target).get(0).clientHeight==0||b(a.target).get(0).scrollHeight===b(a.target).get(0).clientHeight){a.preventDefault();b.fancybox[c>0?"prev":"next"]()}});b.support.opacity||f.addClass("fancybox-ie");if(M){t.addClass("fancybox-ie6");f.addClass("fancybox-ie6");b('<iframe id="fancybox-hide-sel-frame" src="'+(/^https/i.test(window.location.href||"")?"javascript:void(false)":"about:blank")+'" scrolling="no" border="0" frameborder="0" tabindex="-1"></iframe>').prependTo(D)}}};
|
45 |
+
b.fn.fancybox.defaults={padding:10,margin:40,opacity:false,modal:false,cyclic:false,scrolling:"auto",width:560,height:340,autoScale:true,autoDimensions:true,centerOnScroll:false,ajax:{},swf:{wmode:"transparent"},hideOnOverlayClick:true,hideOnContentClick:false,overlayShow:true,overlayOpacity:0.7,overlayColor:"#777",titleShow:true,titlePosition:"float",titleFormat:null,titleFromAlt:false,transitionIn:"fade",transitionOut:"fade",speedIn:300,speedOut:300,changeSpeed:300,changeFade:"fast",easingIn:"swing",
|
46 |
+
easingOut:"swing",showCloseButton:true,showNavArrows:true,enableEscapeButton:true,enableKeyboardNav:true,onStart:function(){},onCancel:function(){},onComplete:function(){},onCleanup:function(){},onClosed:function(){},onError:function(){}};b(document).ready(function(){b.fancybox.init()})})(jQuery);
|
includes/metabox.php
CHANGED
@@ -408,7 +408,7 @@ function easy_image_gallery_save_post( $post_id ) {
|
|
408 |
if ( isset( $_POST['easy_image_gallery_link_images'] ) ) {
|
409 |
update_post_meta( $post_id, '_easy_image_gallery_link_images', $_POST['easy_image_gallery_link_images'] );
|
410 |
} else {
|
411 |
-
update_post_meta( $post_id, '_easy_image_gallery_link_images', '
|
412 |
}
|
413 |
|
414 |
do_action( 'easy_image_gallery_save_post', $post_id );
|
408 |
if ( isset( $_POST['easy_image_gallery_link_images'] ) ) {
|
409 |
update_post_meta( $post_id, '_easy_image_gallery_link_images', $_POST['easy_image_gallery_link_images'] );
|
410 |
} else {
|
411 |
+
update_post_meta( $post_id, '_easy_image_gallery_link_images', 'on' );
|
412 |
}
|
413 |
|
414 |
do_action( 'easy_image_gallery_save_post', $post_id );
|
includes/view/admin-page-view.php
ADDED
@@ -0,0 +1,67 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
3 |
+
exit;
|
4 |
+
}
|
5 |
+
|
6 |
+
if ( ! current_user_can( 'manage_options' ) ) {
|
7 |
+
wp_die( 'Unauthorized user' );
|
8 |
+
}
|
9 |
+
|
10 |
+
if ( ! empty( $_POST ) && check_admin_referer( 'eig_admin_page_save', 'eig_admin_page' ) ) {
|
11 |
+
$_POST = filter_input_array( INPUT_POST, FILTER_SANITIZE_STRING );
|
12 |
+
update_option( 'easy-image-gallery', $_POST['easy-image-gallery'] );
|
13 |
+
}
|
14 |
+
?>
|
15 |
+
<div class="wrap">
|
16 |
+
<form action='' method='post'>
|
17 |
+
<h1><?php echo __( 'Easy Image Gallery Settings', 'easy-image-gallery' ); ?></h1>
|
18 |
+
<table class="form-table" role="presentation">
|
19 |
+
<tbody>
|
20 |
+
<div class="dx-plugin-disclaimer">
|
21 |
+
<h2><?php echo __( 'Add gallery to any post, page or custom post type', 'easy-image-gallery' ); ?></h2>
|
22 |
+
<p><strong><?php echo __( 'Disclaimer:', 'easy-image-gallery' ) ?></strong> <?php echo __( 'Each generated gallery shortcode can <strong> only be used on the specific page', 'easy-image-gallery');?> </strong> <?php echo __('it has been generated for. ', 'easy-image-gallery');?></p>
|
23 |
+
</div>
|
24 |
+
<?php
|
25 |
+
// Default option when settings have not been saved.
|
26 |
+
$defaults['lightbox'] = 'prettyphoto';
|
27 |
+
|
28 |
+
$settings = (array) get_option( 'easy-image-gallery', $defaults );
|
29 |
+
$lightbox = esc_attr( $settings['lightbox'] );
|
30 |
+
?>
|
31 |
+
<tr>
|
32 |
+
<th scope="row"><?php echo __( 'Lightbox', 'easy-image-gallery' ); ?></th>
|
33 |
+
<td>
|
34 |
+
<select name="easy-image-gallery[lightbox]">
|
35 |
+
<?php foreach ( easy_image_gallery_lightbox() as $key => $label ) : ?>
|
36 |
+
<option value="<?php echo $key; ?>" <?php selected( $lightbox, $key ); ?>><?php echo $label; ?></option>
|
37 |
+
<?php endforeach; ?>
|
38 |
+
</select>
|
39 |
+
</td>
|
40 |
+
</tr>
|
41 |
+
<?php
|
42 |
+
// Post and page defaults.
|
43 |
+
$defaults['post_types']['post'] = 'on';
|
44 |
+
$defaults['post_types']['page'] = 'on';
|
45 |
+
|
46 |
+
$settings = (array) get_option( 'easy-image-gallery', $defaults );
|
47 |
+
?>
|
48 |
+
<tr>
|
49 |
+
<th scope="row"><?php echo __( 'Post Types', 'easy-image-gallery' ); ?></th>
|
50 |
+
<td>
|
51 |
+
<?php
|
52 |
+
foreach ( easy_image_gallery_get_post_types() as $key => $label ) :
|
53 |
+
|
54 |
+
$post_types = isset( $settings['post_types'][ $key ] ) ? esc_attr( $settings['post_types'][ $key ] ) : '';
|
55 |
+
?>
|
56 |
+
<p>
|
57 |
+
<input type="checkbox" id="<?php echo $key; ?>" name="easy-image-gallery[post_types][<?php echo $key; ?>]" <?php checked( $post_types, 'on' ); ?>/><label for="<?php echo $key; ?>"> <?php echo $label; ?></label>
|
58 |
+
</p>
|
59 |
+
<?php endforeach; ?>
|
60 |
+
</td>
|
61 |
+
</tr>
|
62 |
+
</tbody>
|
63 |
+
</table>
|
64 |
+
<?php wp_nonce_field( 'eig_admin_page_save', 'eig_admin_page' ); ?>
|
65 |
+
<?php submit_button(); ?>
|
66 |
+
</form>
|
67 |
+
</div>
|
readme.txt
CHANGED
@@ -2,8 +2,8 @@
|
|
2 |
Contributors: devrix, nofearinc
|
3 |
Tags: image gallery, image, galleries, simple, easy, devrix
|
4 |
Requires at least: 3.5
|
5 |
-
Tested up to:
|
6 |
-
Stable tag: 1.
|
7 |
Requires PHP: 5.6
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
@@ -118,6 +118,10 @@ The plugin ownership was transferred to DevriX. There are no functionality chang
|
|
118 |
|
119 |
== Changelog ==
|
120 |
|
|
|
|
|
|
|
|
|
121 |
= 1.4.3 =
|
122 |
* Fix error on 404 pages about Trying to get property ‘ID’ of non-object
|
123 |
|
2 |
Contributors: devrix, nofearinc
|
3 |
Tags: image gallery, image, galleries, simple, easy, devrix
|
4 |
Requires at least: 3.5
|
5 |
+
Tested up to: 6.0
|
6 |
+
Stable tag: 1.5
|
7 |
Requires PHP: 5.6
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
118 |
|
119 |
== Changelog ==
|
120 |
|
121 |
+
= 1.5 =
|
122 |
+
* Has been added separate menu for the plugin
|
123 |
+
* Fix: Link to larger images
|
124 |
+
|
125 |
= 1.4.3 =
|
126 |
* Fix error on 404 pages about Trying to get property ‘ID’ of non-object
|
127 |
|