Version Description
= 3.0.0 =
This is a major overhaul without backwards compliance of over 80 changes. Please read the Testimonials Widget 3.0 and Testimonials Widget Premium 2.0 Upgrade Notice for more help.
If you use custom CSS, actions, or filters to modify Testimonials Widget and Testimonials Widget Premium actions or output, this upgrade will not be compatible with those modifications until corrections are made.
= Older Versions =
Read UPGRADING.
Download this release
Release Info
Developer | saurabhd |
Plugin | Testimonials Widget |
Version | 3.2.0 |
Comparing to | |
See all releases |
Code changes from version 3.1.1 to 3.2.0
- API.md +4 -0
- CHANGELOG.md +9 -1
- includes/class-testimonials-widget-settings.php +40 -32
- includes/class-testimonials-widget.php +7 -5
- includes/libraries/aihrus-framework/CHANGELOG.md +5 -0
- includes/libraries/aihrus-framework/README.md +1 -1
- includes/libraries/aihrus-framework/aihrus-framework.php +2 -2
- includes/libraries/aihrus-framework/includes/class-aihrus-common.php +1 -1
- includes/libraries/aihrus-framework/includes/class-aihrus-licensing.php +1 -1
- includes/libraries/aihrus-framework/includes/class-aihrus-settings.php +11 -10
- includes/libraries/bxslider-4/bower.json +10 -3
- includes/libraries/bxslider-4/dist/jquery.bxslider.css +18 -16
- includes/libraries/bxslider-4/dist/jquery.bxslider.js +1611 -1540
- includes/libraries/bxslider-4/dist/jquery.bxslider.min.js +8 -9
- includes/libraries/bxslider-4/package.json +40 -22
- includes/libraries/bxslider-4/readme.md +99 -3
- includes/libraries/bxslider-4/src/js/jquery.bxslider.js +1604 -1541
- includes/libraries/bxslider-4/src/less/jquery.bxslider.less +9 -17
- languages/testimonials-widget.pot +85 -85
- readme.txt +13 -13
- testimonials-widget.php +5 -5
API.md
CHANGED
@@ -194,6 +194,10 @@ The [Testimonials Widget plugin](http://wordpress.org/plugins/testimonials-widge
|
|
194 |
|
195 |
Alter setting options. [example](https://gist.github.com/michael-cannon/5833757)
|
196 |
|
|
|
|
|
|
|
|
|
197 |
* `tw_validate_settings`
|
198 |
|
199 |
Validate settings helper. [example](https://gist.github.com/michael-cannon/5833768)
|
194 |
|
195 |
Alter setting options. [example](https://gist.github.com/michael-cannon/5833757)
|
196 |
|
197 |
+
* `tw_testimonial_query`
|
198 |
+
|
199 |
+
Alter testimonials WP_Query within `get_testimonials`
|
200 |
+
|
201 |
* `tw_validate_settings`
|
202 |
|
203 |
Validate settings helper. [example](https://gist.github.com/michael-cannon/5833768)
|
CHANGELOG.md
CHANGED
@@ -2,6 +2,14 @@
|
|
2 |
|
3 |
## master
|
4 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5 |
## 3.1.1
|
6 |
* Redo SVN release
|
7 |
|
@@ -1193,7 +1201,7 @@
|
|
1193 |
* TODO Updates
|
1194 |
|
1195 |
## 2.2.5
|
1196 |
-
* Adapt for [Testimonials Widget Premium plugin](
|
1197 |
* Add support text
|
1198 |
* Correct verbiage spacing
|
1199 |
* Explain `limit`
|
2 |
|
3 |
## master
|
4 |
|
5 |
+
## 3.2.0
|
6 |
+
* Add filter tw_testimonial_query to alter WP_Query in get_testimonials
|
7 |
+
* Require Aihrus Framework 1.2.2
|
8 |
+
* RESOLVE #168 Auto save options and clear permalinks on updating
|
9 |
+
* RESOLVE #173 prevent_slug_conflict runs on front end page load
|
10 |
+
* Store branding updates
|
11 |
+
* Update bxslider library to v4.2.5
|
12 |
+
|
13 |
## 3.1.1
|
14 |
* Redo SVN release
|
15 |
|
1201 |
* TODO Updates
|
1202 |
|
1203 |
## 2.2.5
|
1204 |
+
* Adapt for [Testimonials Widget Premium plugin](https://store.axelerant.com/downloads/testimonials-widget-premium-wordpress-plugin/)
|
1205 |
* Add support text
|
1206 |
* Correct verbiage spacing
|
1207 |
* Explain `limit`
|
includes/class-testimonials-widget-settings.php
CHANGED
@@ -809,38 +809,39 @@ class Testimonials_Widget_Settings extends Aihrus_Settings {
|
|
809 |
}
|
810 |
|
811 |
$defaults = self::get_defaults();
|
812 |
-
|
813 |
-
|
814 |
-
|
815 |
-
|
816 |
-
|
817 |
-
|
818 |
-
|
819 |
-
|
820 |
-
|
821 |
-
|
822 |
-
|
823 |
-
|
824 |
-
|
825 |
-
|
826 |
-
|
827 |
-
|
828 |
-
|
829 |
-
|
830 |
-
|
831 |
-
|
832 |
-
|
833 |
-
|
834 |
-
|
835 |
-
|
836 |
-
|
837 |
-
|
838 |
-
|
839 |
-
|
840 |
-
|
841 |
-
|
842 |
-
|
843 |
-
|
|
|
844 |
}
|
845 |
|
846 |
$input['version'] = self::$version;
|
@@ -1084,4 +1085,11 @@ function tw_set_option( $option, $value = null ) {
|
|
1084 |
}
|
1085 |
|
1086 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1087 |
?>
|
809 |
}
|
810 |
|
811 |
$defaults = self::get_defaults();
|
812 |
+
if ( ! empty( $_REQUEST['page'] ) && 'testimonialswidget_settings' == $_REQUEST['page'] ) {
|
813 |
+
if ( ! empty( $input['has_archive'] ) ) {
|
814 |
+
$input['has_archive'] = self::prevent_slug_conflict( $input['has_archive'] );
|
815 |
+
} else {
|
816 |
+
$input['has_archive'] = $defaults['has_archive'];
|
817 |
+
}
|
818 |
+
|
819 |
+
if ( ! empty( $input['rewrite_slug'] ) ) {
|
820 |
+
$input['rewrite_slug'] = self::prevent_slug_conflict( $input['rewrite_slug'] );
|
821 |
+
} else {
|
822 |
+
$input['rewrite_slug'] = $defaults['rewrite_slug'];
|
823 |
+
}
|
824 |
+
|
825 |
+
$flush_rewrite_rules = false;
|
826 |
+
// same has_archive and rewrite_slug causes problems
|
827 |
+
if ( $input['has_archive'] == $input['rewrite_slug'] ) {
|
828 |
+
$input['has_archive'] = $defaults['has_archive'];
|
829 |
+
$input['rewrite_slug'] = $defaults['rewrite_slug'];
|
830 |
+
|
831 |
+
$flush_rewrite_rules = true;
|
832 |
+
}
|
833 |
+
|
834 |
+
// did URL slugs or taxonomy change?
|
835 |
+
$has_archive = tw_get_option( 'has_archive' );
|
836 |
+
$rewrite_slug = tw_get_option( 'rewrite_slug' );
|
837 |
+
$use_cpt_taxonomy = tw_get_option( 'use_cpt_taxonomy' );
|
838 |
+
if ( $has_archive != $input['has_archive'] || $rewrite_slug != $input['rewrite_slug'] || $use_cpt_taxonomy != $input['use_cpt_taxonomy'] ) {
|
839 |
+
$flush_rewrite_rules = true;
|
840 |
+
}
|
841 |
+
|
842 |
+
if ( $flush_rewrite_rules ) {
|
843 |
+
flush_rewrite_rules();
|
844 |
+
}
|
845 |
}
|
846 |
|
847 |
$input['version'] = self::$version;
|
1085 |
}
|
1086 |
|
1087 |
|
1088 |
+
function tw_init_options() {
|
1089 |
+
$options = tw_get_options();
|
1090 |
+
$options = wp_parse_args( $options, Testimonials_Widget::get_defaults() );
|
1091 |
+
$options = Testimonials_Widget_Settings::validate_settings( $options );
|
1092 |
+
update_option( Testimonials_Widget_Settings::ID, $options );
|
1093 |
+
}
|
1094 |
+
|
1095 |
?>
|
includes/class-testimonials-widget.php
CHANGED
@@ -272,6 +272,7 @@ class Testimonials_Widget extends Aihrus_Common {
|
|
272 |
}
|
273 |
|
274 |
self::init();
|
|
|
275 |
flush_rewrite_rules();
|
276 |
}
|
277 |
|
@@ -393,6 +394,8 @@ class Testimonials_Widget extends Aihrus_Common {
|
|
393 |
|
394 |
if ( $prior_version < self::VERSION ) {
|
395 |
tw_requirements_check( true );
|
|
|
|
|
396 |
do_action( 'tw_update' );
|
397 |
}
|
398 |
|
@@ -1161,8 +1164,7 @@ EOF;
|
|
1161 |
}
|
1162 |
|
1163 |
$args['tag_slug__and'][] = $tag;
|
1164 |
-
}
|
1165 |
-
else {
|
1166 |
if ( empty( $args['tag_slug__in'] ) || ! is_array( $args['tag_slug__in'] ) ) {
|
1167 |
$args['tag_slug__in'] = array();
|
1168 |
}
|
@@ -1176,8 +1178,7 @@ EOF;
|
|
1176 |
}
|
1177 |
|
1178 |
$args['tag__and'][] = $tag;
|
1179 |
-
}
|
1180 |
-
else {
|
1181 |
if ( empty( $args['tag__in'] ) || ! is_array( $args['tag__in'] ) ) {
|
1182 |
$args['tag__in'] = array();
|
1183 |
}
|
@@ -1254,6 +1255,7 @@ EOF;
|
|
1254 |
$testimonials = apply_filters( 'tw_cache_get', false, $args );
|
1255 |
if ( false === $testimonials ) {
|
1256 |
$testimonials = new WP_Query( $args );
|
|
|
1257 |
$testimonials = apply_filters( 'tw_cache_set', $testimonials, $args );
|
1258 |
}
|
1259 |
|
@@ -2086,7 +2088,7 @@ EOF;
|
|
2086 |
|
2087 |
$count = 0;
|
2088 |
$query = new WP_Query( $query_args );
|
2089 |
-
while
|
2090 |
$query->the_post();
|
2091 |
$count++;
|
2092 |
}
|
272 |
}
|
273 |
|
274 |
self::init();
|
275 |
+
tw_init_options();
|
276 |
flush_rewrite_rules();
|
277 |
}
|
278 |
|
394 |
|
395 |
if ( $prior_version < self::VERSION ) {
|
396 |
tw_requirements_check( true );
|
397 |
+
tw_init_options();
|
398 |
+
flush_rewrite_rules();
|
399 |
do_action( 'tw_update' );
|
400 |
}
|
401 |
|
1164 |
}
|
1165 |
|
1166 |
$args['tag_slug__and'][] = $tag;
|
1167 |
+
} else {
|
|
|
1168 |
if ( empty( $args['tag_slug__in'] ) || ! is_array( $args['tag_slug__in'] ) ) {
|
1169 |
$args['tag_slug__in'] = array();
|
1170 |
}
|
1178 |
}
|
1179 |
|
1180 |
$args['tag__and'][] = $tag;
|
1181 |
+
} else {
|
|
|
1182 |
if ( empty( $args['tag__in'] ) || ! is_array( $args['tag__in'] ) ) {
|
1183 |
$args['tag__in'] = array();
|
1184 |
}
|
1255 |
$testimonials = apply_filters( 'tw_cache_get', false, $args );
|
1256 |
if ( false === $testimonials ) {
|
1257 |
$testimonials = new WP_Query( $args );
|
1258 |
+
$testimonials = apply_filters( 'tw_testimonials_query', $testimonials, $args );
|
1259 |
$testimonials = apply_filters( 'tw_cache_set', $testimonials, $args );
|
1260 |
}
|
1261 |
|
2088 |
|
2089 |
$count = 0;
|
2090 |
$query = new WP_Query( $query_args );
|
2091 |
+
while ( $query->have_posts() ) {
|
2092 |
$query->the_post();
|
2093 |
$count++;
|
2094 |
}
|
includes/libraries/aihrus-framework/CHANGELOG.md
CHANGED
@@ -2,6 +2,11 @@
|
|
2 |
|
3 |
## master
|
4 |
|
|
|
|
|
|
|
|
|
|
|
5 |
## 1.2.1
|
6 |
* RESOLVE PHP Fatal error: Access to undeclared static property: CLASS::$scripts_called
|
7 |
|
2 |
|
3 |
## master
|
4 |
|
5 |
+
## 1.2.2
|
6 |
+
* Add Inside Axelerant link
|
7 |
+
* Store branding updates
|
8 |
+
* Update about Axelerant verbiage
|
9 |
+
|
10 |
## 1.2.1
|
11 |
* RESOLVE PHP Fatal error: Access to undeclared static property: CLASS::$scripts_called
|
12 |
|
includes/libraries/aihrus-framework/README.md
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
# Aihrus Framework
|
2 |
|
3 |
Tested up to: 4.1.0
|
4 |
-
Stable tag: 1.2.
|
5 |
|
6 |
A helper library for WordPress plugins by Aihrus and maintained by [Axelerant](//axelerant.com).
|
7 |
|
1 |
# Aihrus Framework
|
2 |
|
3 |
Tested up to: 4.1.0
|
4 |
+
Stable tag: 1.2.2
|
5 |
|
6 |
A helper library for WordPress plugins by Aihrus and maintained by [Axelerant](//axelerant.com).
|
7 |
|
includes/libraries/aihrus-framework/aihrus-framework.php
CHANGED
@@ -35,7 +35,7 @@ if ( ! defined( 'AIHR_DIR_LIB' ) ) {
|
|
35 |
}
|
36 |
|
37 |
if ( ! defined( 'AIHR_VERSION' ) ) {
|
38 |
-
define( 'AIHR_VERSION', '1.2.
|
39 |
}
|
40 |
|
41 |
require_once ABSPATH . 'wp-admin/includes/plugin.php';
|
@@ -344,7 +344,7 @@ if ( ! function_exists( 'aihr_notice_deactivate' ) ) {
|
|
344 |
$plugin_slug = dirname( plugin_basename( $file ) );
|
345 |
$url = 'https://wordpress.org/plugins/' . $plugin_slug . '/developers/';
|
346 |
|
347 |
-
$text = sprintf( __( 'Plugin "%1$s" has been deactivated due to "%2$s". Once corrected, "%1$s" can be activated.</p><p>If you want to revert "%1$s", look for <a href="%3$s">older versions on WordPress</a> or <a href="mailto:support@
|
348 |
|
349 |
aihr_notice_error( $text );
|
350 |
|
35 |
}
|
36 |
|
37 |
if ( ! defined( 'AIHR_VERSION' ) ) {
|
38 |
+
define( 'AIHR_VERSION', '1.2.2' );
|
39 |
}
|
40 |
|
41 |
require_once ABSPATH . 'wp-admin/includes/plugin.php';
|
344 |
$plugin_slug = dirname( plugin_basename( $file ) );
|
345 |
$url = 'https://wordpress.org/plugins/' . $plugin_slug . '/developers/';
|
346 |
|
347 |
+
$text = sprintf( __( 'Plugin "%1$s" has been deactivated due to "%2$s". Once corrected, "%1$s" can be activated.</p><p>If you want to revert "%1$s", look for <a href="%3$s">older versions on WordPress</a> or <a href="mailto:support@nodedesk.com?subject=Old+Plugin+Version+Request">email Axelerant support</a> if this is a premium plugin.' ), $name, $reason, $url );
|
348 |
|
349 |
aihr_notice_error( $text );
|
350 |
|
includes/libraries/aihrus-framework/includes/class-aihrus-common.php
CHANGED
@@ -41,7 +41,7 @@ abstract class Aihrus_Common {
|
|
41 |
</form>
|
42 |
EOD;
|
43 |
|
44 |
-
self::$donate_link = '<a href="
|
45 |
|
46 |
add_action( 'admin_init', array( static::$class, 'check_notices' ), 9999 );
|
47 |
}
|
41 |
</form>
|
42 |
EOD;
|
43 |
|
44 |
+
self::$donate_link = '<a href="https://axelerant.com/about-axelerant/donate/"><img src="https://www.paypalobjects.com/en_US/i/btn/btn_donate_SM.gif" border="0" alt="PayPal - The safer, easier way to pay online!" /></a>';
|
45 |
|
46 |
add_action( 'admin_init', array( static::$class, 'check_notices' ), 9999 );
|
47 |
}
|
includes/libraries/aihrus-framework/includes/class-aihrus-licensing.php
CHANGED
@@ -33,7 +33,7 @@ abstract class Aihrus_Licensing {
|
|
33 |
public static $settings_saved = false;
|
34 |
|
35 |
|
36 |
-
public function __construct( $slug, $item_name, $author = 'Axelerant', $store_url = 'https://axelerant.com' ) {
|
37 |
$this->author = $author;
|
38 |
$this->item_name_encoded = urlencode( $item_name );
|
39 |
$this->item_name = $item_name;
|
33 |
public static $settings_saved = false;
|
34 |
|
35 |
|
36 |
+
public function __construct( $slug, $item_name, $author = 'Axelerant', $store_url = 'https://store.axelerant.com' ) {
|
37 |
$this->author = $author;
|
38 |
$this->item_name_encoded = urlencode( $item_name );
|
39 |
$this->item_name = $item_name;
|
includes/libraries/aihrus-framework/includes/class-aihrus-settings.php
CHANGED
@@ -248,17 +248,18 @@ abstract class Aihrus_Settings {
|
|
248 |
|
249 |
|
250 |
public static function display_about() {
|
251 |
-
$text = __( '<img class="size-medium" src="%5$s" alt="Axelerant 2015 Retreat in Goa" width="640" height="327" /><p>
|
252 |
|
253 |
echo '<div id="about" style="width: 70%; min-height: 225px;"><p>';
|
254 |
echo sprintf(
|
255 |
$text,
|
256 |
-
esc_url( '
|
257 |
-
esc_url( '
|
258 |
-
esc_url( '
|
259 |
-
esc_url( '
|
260 |
-
esc_url( '
|
261 |
-
esc_url( '
|
|
|
262 |
);
|
263 |
echo '</p></div>';
|
264 |
}
|
@@ -295,9 +296,9 @@ abstract class Aihrus_Settings {
|
|
295 |
echo '<p>' .
|
296 |
sprintf(
|
297 |
__( 'If you like this plugin, please <a href="%1$s" title="Donate for Good Karma"><img src="%2$s" border="0" alt="Donate for Good Karma" /></a> or <a href="%3$s" title="purchase premium WordPress plugins from Axelerant ">purchase the Premium version</a> to help fund further development and <a href="%4$s" title="Support forums">support</a>.' ),
|
298 |
-
esc_url( '
|
299 |
esc_url( 'https://www.paypalobjects.com/en_US/i/btn/btn_donate_SM.gif' ),
|
300 |
-
esc_url( '
|
301 |
esc_url( 'https://nodedesk.zendesk.com' )
|
302 |
) .
|
303 |
'</p>';
|
@@ -307,7 +308,7 @@ abstract class Aihrus_Settings {
|
|
307 |
sprintf(
|
308 |
__( 'Copyright ©%1$s <a href="%2$s">Axlerant</a>.' ),
|
309 |
date( 'Y' ),
|
310 |
-
esc_url( '
|
311 |
) .
|
312 |
'</p>';
|
313 |
|
248 |
|
249 |
|
250 |
public static function display_about() {
|
251 |
+
$text = __( '<img class="size-medium" src="%5$s" alt="Axelerant 2015 Retreat in Goa" width="640" height="327" /><p>Axelerant is a full-service software development company that focuses on open-source technologies. Top technical talent who are passionate, giving, and communicative demonstrates our backbone. We provide high-end Strategy, Implementation, and Support services for our clients and agencies with whom we partner.</p><p>Our team members span the world, and we follow agile delivery and working processes. Further, we’re actively giving back to many open-source communities and have fostered an innovative, incubator culture to give ideas a chance to succeed.</p><h2>Foundations of Axelerant</h2><ul><li><b>Passion</b> – Our passion is so strong, we’re selfdirected to make the difficult easy.</li><li><b>Openness</b> – We’re so honest and painstaking in our discussions that there are no questions left, and standards are created.</li><li><b>Giving</b> – We’re excited to share our results to inspire all to surpass them.</li></ul><h3>Learn More About Axelerant</h3><ul><li><a href="%1$s">Axelerant Team</a></li><li><a href="%2$s">Giving Back</a></li><li><a href="%7$s">Inside Axelerant</a></li><li><a href="%3$s">Our Services</a></li><li><a href="%4$s">Testimonials</a></li><li><a href="%6$s">Careers</a></li></ul>' );
|
252 |
|
253 |
echo '<div id="about" style="width: 70%; min-height: 225px;"><p>';
|
254 |
echo sprintf(
|
255 |
$text,
|
256 |
+
esc_url( 'https://axelerant.com/about-axelerant/' ),
|
257 |
+
esc_url( 'https://axelerant.com/drupalgive/' ),
|
258 |
+
esc_url( 'https://axelerant.com/services/' ),
|
259 |
+
esc_url( 'https://axelerant.com/about-axelerant/testimonials/' ),
|
260 |
+
esc_url( 'https://axelerant.com/wp-content/uploads/2015/02/IGP7228-2015-01-22-at-05-18-02.jpg' ),
|
261 |
+
esc_url( 'https://axelerant.com/careers/' ),
|
262 |
+
esc_url( 'https://axelerant.com/open-policies-open-discussion/' )
|
263 |
);
|
264 |
echo '</p></div>';
|
265 |
}
|
296 |
echo '<p>' .
|
297 |
sprintf(
|
298 |
__( 'If you like this plugin, please <a href="%1$s" title="Donate for Good Karma"><img src="%2$s" border="0" alt="Donate for Good Karma" /></a> or <a href="%3$s" title="purchase premium WordPress plugins from Axelerant ">purchase the Premium version</a> to help fund further development and <a href="%4$s" title="Support forums">support</a>.' ),
|
299 |
+
esc_url( 'https://axelerant.com/about-axelerant/donate/' ),
|
300 |
esc_url( 'https://www.paypalobjects.com/en_US/i/btn/btn_donate_SM.gif' ),
|
301 |
+
esc_url( 'https://store.axelerant.com/' ),
|
302 |
esc_url( 'https://nodedesk.zendesk.com' )
|
303 |
) .
|
304 |
'</p>';
|
308 |
sprintf(
|
309 |
__( 'Copyright ©%1$s <a href="%2$s">Axlerant</a>.' ),
|
310 |
date( 'Y' ),
|
311 |
+
esc_url( 'https://axelerant.com' )
|
312 |
) .
|
313 |
'</p>';
|
314 |
|
includes/libraries/bxslider-4/bower.json
CHANGED
@@ -1,15 +1,18 @@
|
|
1 |
{
|
2 |
"name": "bxslider-4",
|
3 |
-
"version": "4.2.
|
4 |
"homepage": "http://bxslider.com",
|
5 |
"license": "MIT",
|
6 |
"main": [
|
7 |
"dist/jquery.bxslider.js",
|
8 |
-
"dist/jquery.bxslider.min.js",
|
9 |
"dist/jquery.bxslider.css",
|
10 |
"dist/images/bx_loader.gif",
|
11 |
"dist/images/controls.png"
|
12 |
],
|
|
|
|
|
|
|
|
|
13 |
"keywords": [
|
14 |
"bxslider",
|
15 |
"javascript",
|
@@ -17,6 +20,10 @@
|
|
17 |
"library"
|
18 |
],
|
19 |
"dependencies": {
|
20 |
-
"jquery": ">=1.
|
|
|
|
|
|
|
|
|
21 |
}
|
22 |
}
|
1 |
{
|
2 |
"name": "bxslider-4",
|
3 |
+
"version": "4.2.5",
|
4 |
"homepage": "http://bxslider.com",
|
5 |
"license": "MIT",
|
6 |
"main": [
|
7 |
"dist/jquery.bxslider.js",
|
|
|
8 |
"dist/jquery.bxslider.css",
|
9 |
"dist/images/bx_loader.gif",
|
10 |
"dist/images/controls.png"
|
11 |
],
|
12 |
+
"ignore": [
|
13 |
+
"docs_src/*",
|
14 |
+
"docs/*"
|
15 |
+
],
|
16 |
"keywords": [
|
17 |
"bxslider",
|
18 |
"javascript",
|
20 |
"library"
|
21 |
],
|
22 |
"dependencies": {
|
23 |
+
"jquery": ">= 1.8.3"
|
24 |
+
},
|
25 |
+
"devDependencies": {
|
26 |
+
"bootstrap": ">= 3.3.2",
|
27 |
+
"highlightjs": "~8.4.0"
|
28 |
}
|
29 |
}
|
includes/libraries/bxslider-4/dist/jquery.bxslider.css
CHANGED
@@ -1,14 +1,13 @@
|
|
1 |
-
|
2 |
-
*
|
3 |
-
*
|
4 |
-
*
|
5 |
-
|
6 |
-
* http://
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
***/
|
12 |
/** RESET AND LAYOUT
|
13 |
===================================*/
|
14 |
.bx-wrapper {
|
@@ -37,6 +36,7 @@ ul.bxslider {
|
|
37 |
/** THEME
|
38 |
===================================*/
|
39 |
.bx-wrapper {
|
|
|
40 |
-webkit-box-shadow: 0 0 5px #ccc;
|
41 |
box-shadow: 0 0 5px #ccc;
|
42 |
border: 5px solid #fff;
|
@@ -51,7 +51,7 @@ ul.bxslider {
|
|
51 |
/* LOADER */
|
52 |
.bx-wrapper .bx-loading {
|
53 |
min-height: 50px;
|
54 |
-
background: url(images/bx_loader.gif) center center no-repeat #ffffff;
|
55 |
height: 100%;
|
56 |
width: 100%;
|
57 |
position: absolute;
|
@@ -76,6 +76,8 @@ ul.bxslider {
|
|
76 |
height: 10px;
|
77 |
margin: 0 5px;
|
78 |
outline: 0;
|
|
|
|
|
79 |
border-radius: 5px;
|
80 |
}
|
81 |
.bx-wrapper .bx-pager.bx-default-pager a:hover,
|
@@ -96,7 +98,7 @@ ul.bxslider {
|
|
96 |
/* DIRECTION CONTROLS (NEXT / PREV) */
|
97 |
.bx-wrapper .bx-prev {
|
98 |
left: 10px;
|
99 |
-
background: url(images/controls.png) no-repeat 0 -32px;
|
100 |
}
|
101 |
.bx-wrapper .bx-prev:hover,
|
102 |
.bx-wrapper .bx-prev:focus {
|
@@ -104,7 +106,7 @@ ul.bxslider {
|
|
104 |
}
|
105 |
.bx-wrapper .bx-next {
|
106 |
right: 10px;
|
107 |
-
background: url(images/controls.png) no-repeat -43px -32px;
|
108 |
}
|
109 |
.bx-wrapper .bx-next:hover,
|
110 |
.bx-wrapper .bx-next:focus {
|
@@ -133,7 +135,7 @@ ul.bxslider {
|
|
133 |
width: 10px;
|
134 |
height: 11px;
|
135 |
outline: 0;
|
136 |
-
background: url(images/controls.png) -86px -11px no-repeat;
|
137 |
margin: 0 3px;
|
138 |
}
|
139 |
.bx-wrapper .bx-controls-auto .bx-start:hover,
|
@@ -147,7 +149,7 @@ ul.bxslider {
|
|
147 |
width: 9px;
|
148 |
height: 11px;
|
149 |
outline: 0;
|
150 |
-
background: url(images/controls.png) -86px -44px no-repeat;
|
151 |
margin: 0 3px;
|
152 |
}
|
153 |
.bx-wrapper .bx-controls-auto .bx-stop:hover,
|
1 |
+
/**
|
2 |
+
* bxSlider v4.2.5
|
3 |
+
* Copyright 2013-2015 Steven Wanderski
|
4 |
+
* Written while drinking Belgian ales and listening to jazz
|
5 |
+
|
6 |
+
* Licensed under MIT (http://opensource.org/licenses/MIT)
|
7 |
+
*/
|
8 |
+
|
9 |
+
/** VARIABLES
|
10 |
+
===================================*/
|
|
|
11 |
/** RESET AND LAYOUT
|
12 |
===================================*/
|
13 |
.bx-wrapper {
|
36 |
/** THEME
|
37 |
===================================*/
|
38 |
.bx-wrapper {
|
39 |
+
-moz-box-shadow: 0 0 5px #ccc;
|
40 |
-webkit-box-shadow: 0 0 5px #ccc;
|
41 |
box-shadow: 0 0 5px #ccc;
|
42 |
border: 5px solid #fff;
|
51 |
/* LOADER */
|
52 |
.bx-wrapper .bx-loading {
|
53 |
min-height: 50px;
|
54 |
+
background: url('images/bx_loader.gif') center center no-repeat #ffffff;
|
55 |
height: 100%;
|
56 |
width: 100%;
|
57 |
position: absolute;
|
76 |
height: 10px;
|
77 |
margin: 0 5px;
|
78 |
outline: 0;
|
79 |
+
-moz-border-radius: 5px;
|
80 |
+
-webkit-border-radius: 5px;
|
81 |
border-radius: 5px;
|
82 |
}
|
83 |
.bx-wrapper .bx-pager.bx-default-pager a:hover,
|
98 |
/* DIRECTION CONTROLS (NEXT / PREV) */
|
99 |
.bx-wrapper .bx-prev {
|
100 |
left: 10px;
|
101 |
+
background: url('images/controls.png') no-repeat 0 -32px;
|
102 |
}
|
103 |
.bx-wrapper .bx-prev:hover,
|
104 |
.bx-wrapper .bx-prev:focus {
|
106 |
}
|
107 |
.bx-wrapper .bx-next {
|
108 |
right: 10px;
|
109 |
+
background: url('images/controls.png') no-repeat -43px -32px;
|
110 |
}
|
111 |
.bx-wrapper .bx-next:hover,
|
112 |
.bx-wrapper .bx-next:focus {
|
135 |
width: 10px;
|
136 |
height: 11px;
|
137 |
outline: 0;
|
138 |
+
background: url('images/controls.png') -86px -11px no-repeat;
|
139 |
margin: 0 3px;
|
140 |
}
|
141 |
.bx-wrapper .bx-controls-auto .bx-start:hover,
|
149 |
width: 9px;
|
150 |
height: 11px;
|
151 |
outline: 0;
|
152 |
+
background: url('images/controls.png') -86px -44px no-repeat;
|
153 |
margin: 0 3px;
|
154 |
}
|
155 |
.bx-wrapper .bx-controls-auto .bx-stop:hover,
|
includes/libraries/bxslider-4/dist/jquery.bxslider.js
CHANGED
@@ -1,1543 +1,1614 @@
|
|
1 |
-
|
2 |
-
*
|
3 |
-
*
|
4 |
-
*
|
5 |
-
* Copyright 2014, Steven Wanderski - http://stevenwanderski.com - http://bxcreative.com
|
6 |
* Written while drinking Belgian ales and listening to jazz
|
7 |
-
|
8 |
-
*
|
9 |
-
|
10 |
-
|
11 |
-
;(function($){
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
|
267 |
-
|
268 |
-
|
269 |
-
|
270 |
-
|
271 |
-
|
272 |
-
|
273 |
-
|
274 |
-
|
275 |
-
|
276 |
-
|
277 |
-
|
278 |
-
|
279 |
-
|
280 |
-
|
281 |
-
|
282 |
-
|
283 |
-
|
284 |
-
|
285 |
-
|
286 |
-
|
287 |
-
|
288 |
-
|
289 |
-
|
290 |
-
|
291 |
-
|
292 |
-
|
293 |
-
|
294 |
-
|
295 |
-
|
296 |
-
|
297 |
-
|
298 |
-
|
299 |
-
|
300 |
-
|
301 |
-
|
302 |
-
|
303 |
-
|
304 |
-
|
305 |
-
|
306 |
-
|
307 |
-
|
308 |
-
|
309 |
-
|
310 |
-
|
311 |
-
|
312 |
-
|
313 |
-
|
314 |
-
|
315 |
-
|
316 |
-
|
317 |
-
|
318 |
-
|
319 |
-
|
320 |
-
|
321 |
-
|
322 |
-
|
323 |
-
|
324 |
-
|
325 |
-
|
326 |
-
|
327 |
-
|
328 |
-
|
329 |
-
|
330 |
-
|
331 |
-
|
332 |
-
|
333 |
-
|
334 |
-
|
335 |
-
|
336 |
-
|
337 |
-
|
338 |
-
|
339 |
-
|
340 |
-
|
341 |
-
|
342 |
-
|
343 |
-
|
344 |
-
|
345 |
-
|
346 |
-
|
347 |
-
|
348 |
-
|
349 |
-
|
350 |
-
|
351 |
-
|
352 |
-
|
353 |
-
|
354 |
-
|
355 |
-
|
356 |
-
|
357 |
-
|
358 |
-
|
359 |
-
|
360 |
-
|
361 |
-
|
362 |
-
|
363 |
-
|
364 |
-
|
365 |
-
|
366 |
-
|
367 |
-
|
368 |
-
|
369 |
-
|
370 |
-
|
371 |
-
|
372 |
-
|
373 |
-
|
374 |
-
|
375 |
-
|
376 |
-
|
377 |
-
|
378 |
-
|
379 |
-
|
380 |
-
|
381 |
-
|
382 |
-
|
383 |
-
|
384 |
-
|
385 |
-
|
386 |
-
|
387 |
-
|
388 |
-
|
389 |
-
|
390 |
-
|
391 |
-
|
392 |
-
|
393 |
-
|
394 |
-
|
395 |
-
|
396 |
-
|
397 |
-
|
398 |
-
|
399 |
-
|
400 |
-
|
401 |
-
|
402 |
-
|
403 |
-
|
404 |
-
|
405 |
-
|
406 |
-
|
407 |
-
|
408 |
-
|
409 |
-
|
410 |
-
|
411 |
-
|
412 |
-
|
413 |
-
|
414 |
-
|
415 |
-
|
416 |
-
|
417 |
-
|
418 |
-
|
419 |
-
|
420 |
-
|
421 |
-
|
422 |
-
|
423 |
-
|
424 |
-
|
425 |
-
|
426 |
-
|
427 |
-
|
428 |
-
|
429 |
-
|
430 |
-
|
431 |
-
|
432 |
-
|
433 |
-
|
434 |
-
|
435 |
-
|
436 |
-
|
437 |
-
|
438 |
-
|
439 |
-
|
440 |
-
|
441 |
-
|
442 |
-
|
443 |
-
|
444 |
-
|
445 |
-
|
446 |
-
|
447 |
-
|
448 |
-
|
449 |
-
|
450 |
-
|
451 |
-
|
452 |
-
|
453 |
-
|
454 |
-
|
455 |
-
|
456 |
-
|
457 |
-
|
458 |
-
|
459 |
-
|
460 |
-
|
461 |
-
|
462 |
-
|
463 |
-
|
464 |
-
|
465 |
-
|
466 |
-
|
467 |
-
|
468 |
-
|
469 |
-
|
470 |
-
|
471 |
-
|
472 |
-
|
473 |
-
|
474 |
-
|
475 |
-
|
476 |
-
|
477 |
-
|
478 |
-
|
479 |
-
|
480 |
-
|
481 |
-
|
482 |
-
|
483 |
-
|
484 |
-
|
485 |
-
|
486 |
-
|
487 |
-
|
488 |
-
|
489 |
-
|
490 |
-
|
491 |
-
|
492 |
-
|
493 |
-
|
494 |
-
|
495 |
-
|
496 |
-
|
497 |
-
|
498 |
-
|
499 |
-
|
500 |
-
|
501 |
-
|
502 |
-
|
503 |
-
|
504 |
-
|
505 |
-
|
506 |
-
|
507 |
-
|
508 |
-
|
509 |
-
|
510 |
-
|
511 |
-
|
512 |
-
|
513 |
-
|
514 |
-
|
515 |
-
|
516 |
-
|
517 |
-
|
518 |
-
|
519 |
-
|
520 |
-
|
521 |
-
|
522 |
-
|
523 |
-
|
524 |
-
|
525 |
-
|
526 |
-
|
527 |
-
|
528 |
-
|
529 |
-
|
530 |
-
|
531 |
-
|
532 |
-
|
533 |
-
|
534 |
-
|
535 |
-
|
536 |
-
|
537 |
-
|
538 |
-
|
539 |
-
|
540 |
-
|
541 |
-
|
542 |
-
|
543 |
-
|
544 |
-
|
545 |
-
|
546 |
-
|
547 |
-
|
548 |
-
|
549 |
-
|
550 |
-
|
551 |
-
|
552 |
-
|
553 |
-
|
554 |
-
|
555 |
-
|
556 |
-
|
557 |
-
|
558 |
-
|
559 |
-
|
560 |
-
|
561 |
-
|
562 |
-
|
563 |
-
|
564 |
-
|
565 |
-
|
566 |
-
|
567 |
-
|
568 |
-
|
569 |
-
|
570 |
-
|
571 |
-
|
572 |
-
|
573 |
-
|
574 |
-
|
575 |
-
|
576 |
-
|
577 |
-
|
578 |
-
|
579 |
-
|
580 |
-
|
581 |
-
|
582 |
-
|
583 |
-
|
584 |
-
|
585 |
-
|
586 |
-
|
587 |
-
|
588 |
-
|
589 |
-
|
590 |
-
|
591 |
-
|
592 |
-
|
593 |
-
|
594 |
-
|
595 |
-
|
596 |
-
|
597 |
-
|
598 |
-
|
599 |
-
|
600 |
-
|
601 |
-
|
602 |
-
|
603 |
-
|
604 |
-
|
605 |
-
|
606 |
-
|
607 |
-
|
608 |
-
|
609 |
-
|
610 |
-
|
611 |
-
|
612 |
-
|
613 |
-
|
614 |
-
|
615 |
-
|
616 |
-
|
617 |
-
|
618 |
-
|
619 |
-
|
620 |
-
|
621 |
-
|
622 |
-
|
623 |
-
|
624 |
-
|
625 |
-
|
626 |
-
|
627 |
-
|
628 |
-
|
629 |
-
|
630 |
-
|
631 |
-
|
632 |
-
|
633 |
-
|
634 |
-
|
635 |
-
|
636 |
-
|
637 |
-
|
638 |
-
|
639 |
-
|
640 |
-
|
641 |
-
|
642 |
-
|
643 |
-
|
644 |
-
|
645 |
-
|
646 |
-
|
647 |
-
|
648 |
-
|
649 |
-
|
650 |
-
|
651 |
-
|
652 |
-
|
653 |
-
|
654 |
-
|
655 |
-
|
656 |
-
|
657 |
-
|
658 |
-
|
659 |
-
|
660 |
-
|
661 |
-
|
662 |
-
|
663 |
-
|
664 |
-
|
665 |
-
|
666 |
-
|
667 |
-
|
668 |
-
|
669 |
-
|
670 |
-
|
671 |
-
|
672 |
-
|
673 |
-
|
674 |
-
|
675 |
-
|
676 |
-
|
677 |
-
|
678 |
-
|
679 |
-
|
680 |
-
|
681 |
-
|
682 |
-
|
683 |
-
|
684 |
-
|
685 |
-
|
686 |
-
|
687 |
-
|
688 |
-
|
689 |
-
|
690 |
-
|
691 |
-
|
692 |
-
|
693 |
-
|
694 |
-
|
695 |
-
|
696 |
-
|
697 |
-
|
698 |
-
|
699 |
-
|
700 |
-
|
701 |
-
|
702 |
-
|
703 |
-
|
704 |
-
|
705 |
-
|
706 |
-
|
707 |
-
|
708 |
-
|
709 |
-
|
710 |
-
|
711 |
-
|
712 |
-
|
713 |
-
|
714 |
-
|
715 |
-
|
716 |
-
|
717 |
-
|
718 |
-
|
719 |
-
|
720 |
-
|
721 |
-
|
722 |
-
|
723 |
-
|
724 |
-
|
725 |
-
|
726 |
-
|
727 |
-
|
728 |
-
|
729 |
-
|
730 |
-
|
731 |
-
|
732 |
-
|
733 |
-
|
734 |
-
|
735 |
-
|
736 |
-
|
737 |
-
|
738 |
-
|
739 |
-
|
740 |
-
|
741 |
-
|
742 |
-
|
743 |
-
|
744 |
-
|
745 |
-
|
746 |
-
|
747 |
-
|
748 |
-
|
749 |
-
|
750 |
-
|
751 |
-
|
752 |
-
|
753 |
-
|
754 |
-
|
755 |
-
|
756 |
-
|
757 |
-
|
758 |
-
|
759 |
-
|
760 |
-
|
761 |
-
|
762 |
-
|
763 |
-
|
764 |
-
|
765 |
-
|
766 |
-
|
767 |
-
|
768 |
-
|
769 |
-
|
770 |
-
|
771 |
-
|
772 |
-
|
773 |
-
|
774 |
-
|
775 |
-
|
776 |
-
|
777 |
-
|
778 |
-
|
779 |
-
|
780 |
-
|
781 |
-
|
782 |
-
|
783 |
-
|
784 |
-
|
785 |
-
|
786 |
-
|
787 |
-
|
788 |
-
|
789 |
-
|
790 |
-
|
791 |
-
|
792 |
-
|
793 |
-
|
794 |
-
|
795 |
-
|
796 |
-
|
797 |
-
|
798 |
-
|
799 |
-
|
800 |
-
|
801 |
-
|
802 |
-
|
803 |
-
|
804 |
-
|
805 |
-
|
806 |
-
|
807 |
-
|
808 |
-
|
809 |
-
|
810 |
-
|
811 |
-
|
812 |
-
|
813 |
-
|
814 |
-
|
815 |
-
|
816 |
-
|
817 |
-
|
818 |
-
|
819 |
-
|
820 |
-
|
821 |
-
|
822 |
-
|
823 |
-
|
824 |
-
|
825 |
-
|
826 |
-
|
827 |
-
|
828 |
-
|
829 |
-
|
830 |
-
|
831 |
-
|
832 |
-
|
833 |
-
|
834 |
-
|
835 |
-
|
836 |
-
|
837 |
-
|
838 |
-
|
839 |
-
|
840 |
-
|
841 |
-
|
842 |
-
|
843 |
-
|
844 |
-
|
845 |
-
|
846 |
-
|
847 |
-
|
848 |
-
|
849 |
-
|
850 |
-
|
851 |
-
|
852 |
-
|
853 |
-
|
854 |
-
|
855 |
-
|
856 |
-
|
857 |
-
|
858 |
-
|
859 |
-
|
860 |
-
|
861 |
-
|
862 |
-
|
863 |
-
|
864 |
-
|
865 |
-
|
866 |
-
|
867 |
-
|
868 |
-
|
869 |
-
|
870 |
-
|
871 |
-
|
872 |
-
|
873 |
-
|
874 |
-
|
875 |
-
|
876 |
-
|
877 |
-
|
878 |
-
|
879 |
-
|
880 |
-
|
881 |
-
|
882 |
-
|
883 |
-
|
884 |
-
|
885 |
-
|
886 |
-
|
887 |
-
|
888 |
-
|
889 |
-
|
890 |
-
|
891 |
-
|
892 |
-
|
893 |
-
|
894 |
-
|
895 |
-
|
896 |
-
|
897 |
-
|
898 |
-
|
899 |
-
|
900 |
-
|
901 |
-
|
902 |
-
|
903 |
-
|
904 |
-
|
905 |
-
|
906 |
-
|
907 |
-
|
908 |
-
|
909 |
-
|
910 |
-
|
911 |
-
|
912 |
-
|
913 |
-
|
914 |
-
|
915 |
-
|
916 |
-
|
917 |
-
|
918 |
-
|
919 |
-
|
920 |
-
|
921 |
-
|
922 |
-
|
923 |
-
|
924 |
-
|
925 |
-
|
926 |
-
|
927 |
-
|
928 |
-
|
929 |
-
|
930 |
-
|
931 |
-
|
932 |
-
|
933 |
-
|
934 |
-
|
935 |
-
|
936 |
-
|
937 |
-
|
938 |
-
|
939 |
-
|
940 |
-
|
941 |
-
|
942 |
-
|
943 |
-
|
944 |
-
|
945 |
-
|
946 |
-
|
947 |
-
|
948 |
-
|
949 |
-
|
950 |
-
|
951 |
-
|
952 |
-
|
953 |
-
|
954 |
-
|
955 |
-
|
956 |
-
|
957 |
-
|
958 |
-
|
959 |
-
|
960 |
-
|
961 |
-
|
962 |
-
|
963 |
-
|
964 |
-
|
965 |
-
|
966 |
-
|
967 |
-
|
968 |
-
|
969 |
-
|
970 |
-
|
971 |
-
|
972 |
-
|
973 |
-
|
974 |
-
|
975 |
-
|
976 |
-
|
977 |
-
|
978 |
-
|
979 |
-
|
980 |
-
|
981 |
-
|
982 |
-
|
983 |
-
|
984 |
-
|
985 |
-
|
986 |
-
|
987 |
-
|
988 |
-
|
989 |
-
|
990 |
-
|
991 |
-
|
992 |
-
|
993 |
-
|
994 |
-
|
995 |
-
|
996 |
-
|
997 |
-
|
998 |
-
|
999 |
-
|
1000 |
-
|
1001 |
-
|
1002 |
-
|
1003 |
-
|
1004 |
-
|
1005 |
-
|
1006 |
-
|
1007 |
-
|
1008 |
-
|
1009 |
-
|
1010 |
-
|
1011 |
-
|
1012 |
-
|
1013 |
-
|
1014 |
-
|
1015 |
-
|
1016 |
-
|
1017 |
-
|
1018 |
-
|
1019 |
-
|
1020 |
-
|
1021 |
-
|
1022 |
-
|
1023 |
-
|
1024 |
-
|
1025 |
-
|
1026 |
-
|
1027 |
-
|
1028 |
-
|
1029 |
-
|
1030 |
-
|
1031 |
-
|
1032 |
-
|
1033 |
-
|
1034 |
-
|
1035 |
-
|
1036 |
-
|
1037 |
-
|
1038 |
-
|
1039 |
-
|
1040 |
-
|
1041 |
-
|
1042 |
-
|
1043 |
-
|
1044 |
-
|
1045 |
-
|
1046 |
-
|
1047 |
-
|
1048 |
-
|
1049 |
-
|
1050 |
-
|
1051 |
-
|
1052 |
-
|
1053 |
-
|
1054 |
-
|
1055 |
-
|
1056 |
-
|
1057 |
-
|
1058 |
-
|
1059 |
-
|
1060 |
-
|
1061 |
-
|
1062 |
-
|
1063 |
-
|
1064 |
-
|
1065 |
-
|
1066 |
-
|
1067 |
-
|
1068 |
-
|
1069 |
-
|
1070 |
-
|
1071 |
-
|
1072 |
-
|
1073 |
-
|
1074 |
-
|
1075 |
-
|
1076 |
-
|
1077 |
-
|
1078 |
-
|
1079 |
-
|
1080 |
-
|
1081 |
-
|
1082 |
-
|
1083 |
-
|
1084 |
-
|
1085 |
-
|
1086 |
-
|
1087 |
-
|
1088 |
-
|
1089 |
-
|
1090 |
-
|
1091 |
-
|
1092 |
-
|
1093 |
-
|
1094 |
-
|
1095 |
-
|
1096 |
-
|
1097 |
-
|
1098 |
-
|
1099 |
-
|
1100 |
-
|
1101 |
-
|
1102 |
-
|
1103 |
-
|
1104 |
-
|
1105 |
-
|
1106 |
-
|
1107 |
-
|
1108 |
-
|
1109 |
-
|
1110 |
-
|
1111 |
-
|
1112 |
-
|
1113 |
-
|
1114 |
-
|
1115 |
-
|
1116 |
-
|
1117 |
-
|
1118 |
-
|
1119 |
-
|
1120 |
-
|
1121 |
-
|
1122 |
-
|
1123 |
-
|
1124 |
-
|
1125 |
-
|
1126 |
-
|
1127 |
-
|
1128 |
-
|
1129 |
-
|
1130 |
-
|
1131 |
-
|
1132 |
-
|
1133 |
-
|
1134 |
-
|
1135 |
-
|
1136 |
-
|
1137 |
-
|
1138 |
-
|
1139 |
-
|
1140 |
-
|
1141 |
-
|
1142 |
-
|
1143 |
-
|
1144 |
-
|
1145 |
-
|
1146 |
-
|
1147 |
-
|
1148 |
-
|
1149 |
-
|
1150 |
-
|
1151 |
-
|
1152 |
-
|
1153 |
-
|
1154 |
-
|
1155 |
-
|
1156 |
-
|
1157 |
-
|
1158 |
-
|
1159 |
-
|
1160 |
-
|
1161 |
-
|
1162 |
-
|
1163 |
-
|
1164 |
-
|
1165 |
-
|
1166 |
-
|
1167 |
-
|
1168 |
-
|
1169 |
-
|
1170 |
-
|
1171 |
-
|
1172 |
-
|
1173 |
-
|
1174 |
-
|
1175 |
-
|
1176 |
-
|
1177 |
-
|
1178 |
-
|
1179 |
-
|
1180 |
-
|
1181 |
-
|
1182 |
-
|
1183 |
-
|
1184 |
-
|
1185 |
-
|
1186 |
-
|
1187 |
-
|
1188 |
-
|
1189 |
-
|
1190 |
-
|
1191 |
-
|
1192 |
-
|
1193 |
-
|
1194 |
-
|
1195 |
-
|
1196 |
-
|
1197 |
-
|
1198 |
-
|
1199 |
-
|
1200 |
-
|
1201 |
-
|
1202 |
-
|
1203 |
-
|
1204 |
-
|
1205 |
-
|
1206 |
-
|
1207 |
-
|
1208 |
-
|
1209 |
-
|
1210 |
-
|
1211 |
-
|
1212 |
-
|
1213 |
-
|
1214 |
-
|
1215 |
-
|
1216 |
-
|
1217 |
-
|
1218 |
-
|
1219 |
-
|
1220 |
-
|
1221 |
-
|
1222 |
-
|
1223 |
-
|
1224 |
-
|
1225 |
-
|
1226 |
-
|
1227 |
-
|
1228 |
-
|
1229 |
-
|
1230 |
-
|
1231 |
-
|
1232 |
-
|
1233 |
-
|
1234 |
-
|
1235 |
-
|
1236 |
-
|
1237 |
-
|
1238 |
-
|
1239 |
-
|
1240 |
-
|
1241 |
-
|
1242 |
-
|
1243 |
-
|
1244 |
-
|
1245 |
-
|
1246 |
-
|
1247 |
-
|
1248 |
-
|
1249 |
-
|
1250 |
-
|
1251 |
-
|
1252 |
-
|
1253 |
-
|
1254 |
-
|
1255 |
-
|
1256 |
-
|
1257 |
-
|
1258 |
-
|
1259 |
-
|
1260 |
-
|
1261 |
-
|
1262 |
-
|
1263 |
-
|
1264 |
-
|
1265 |
-
|
1266 |
-
|
1267 |
-
|
1268 |
-
|
1269 |
-
|
1270 |
-
|
1271 |
-
|
1272 |
-
|
1273 |
-
|
1274 |
-
|
1275 |
-
|
1276 |
-
|
1277 |
-
|
1278 |
-
|
1279 |
-
|
1280 |
-
|
1281 |
-
|
1282 |
-
|
1283 |
-
|
1284 |
-
|
1285 |
-
|
1286 |
-
|
1287 |
-
|
1288 |
-
|
1289 |
-
|
1290 |
-
|
1291 |
-
|
1292 |
-
|
1293 |
-
|
1294 |
-
|
1295 |
-
|
1296 |
-
|
1297 |
-
|
1298 |
-
|
1299 |
-
|
1300 |
-
|
1301 |
-
|
1302 |
-
|
1303 |
-
|
1304 |
-
|
1305 |
-
|
1306 |
-
|
1307 |
-
|
1308 |
-
|
1309 |
-
|
1310 |
-
|
1311 |
-
|
1312 |
-
|
1313 |
-
|
1314 |
-
|
1315 |
-
|
1316 |
-
|
1317 |
-
|
1318 |
-
|
1319 |
-
|
1320 |
-
|
1321 |
-
|
1322 |
-
|
1323 |
-
|
1324 |
-
|
1325 |
-
|
1326 |
-
|
1327 |
-
|
1328 |
-
|
1329 |
-
|
1330 |
-
|
1331 |
-
|
1332 |
-
|
1333 |
-
|
1334 |
-
|
1335 |
-
|
1336 |
-
|
1337 |
-
|
1338 |
-
|
1339 |
-
|
1340 |
-
|
1341 |
-
|
1342 |
-
|
1343 |
-
|
1344 |
-
|
1345 |
-
|
1346 |
-
|
1347 |
-
|
1348 |
-
|
1349 |
-
|
1350 |
-
|
1351 |
-
|
1352 |
-
|
1353 |
-
|
1354 |
-
|
1355 |
-
|
1356 |
-
|
1357 |
-
|
1358 |
-
|
1359 |
-
|
1360 |
-
|
1361 |
-
|
1362 |
-
|
1363 |
-
|
1364 |
-
|
1365 |
-
|
1366 |
-
|
1367 |
-
|
1368 |
-
|
1369 |
-
|
1370 |
-
|
1371 |
-
|
1372 |
-
|
1373 |
-
|
1374 |
-
|
1375 |
-
|
1376 |
-
|
1377 |
-
|
1378 |
-
|
1379 |
-
|
1380 |
-
|
1381 |
-
|
1382 |
-
|
1383 |
-
|
1384 |
-
|
1385 |
-
|
1386 |
-
|
1387 |
-
|
1388 |
-
|
1389 |
-
|
1390 |
-
|
1391 |
-
|
1392 |
-
|
1393 |
-
|
1394 |
-
|
1395 |
-
|
1396 |
-
|
1397 |
-
|
1398 |
-
|
1399 |
-
|
1400 |
-
|
1401 |
-
|
1402 |
-
|
1403 |
-
|
1404 |
-
|
1405 |
-
|
1406 |
-
|
1407 |
-
|
1408 |
-
|
1409 |
-
|
1410 |
-
|
1411 |
-
|
1412 |
-
|
1413 |
-
|
1414 |
-
|
1415 |
-
|
1416 |
-
|
1417 |
-
|
1418 |
-
|
1419 |
-
|
1420 |
-
|
1421 |
-
|
1422 |
-
|
1423 |
-
|
1424 |
-
|
1425 |
-
|
1426 |
-
|
1427 |
-
|
1428 |
-
|
1429 |
-
|
1430 |
-
|
1431 |
-
|
1432 |
-
|
1433 |
-
|
1434 |
-
|
1435 |
-
|
1436 |
-
|
1437 |
-
|
1438 |
-
|
1439 |
-
|
1440 |
-
|
1441 |
-
|
1442 |
-
|
1443 |
-
|
1444 |
-
|
1445 |
-
|
1446 |
-
|
1447 |
-
|
1448 |
-
|
1449 |
-
|
1450 |
-
|
1451 |
-
|
1452 |
-
|
1453 |
-
|
1454 |
-
|
1455 |
-
|
1456 |
-
|
1457 |
-
|
1458 |
-
|
1459 |
-
|
1460 |
-
|
1461 |
-
|
1462 |
-
|
1463 |
-
|
1464 |
-
|
1465 |
-
|
1466 |
-
|
1467 |
-
|
1468 |
-
|
1469 |
-
|
1470 |
-
|
1471 |
-
|
1472 |
-
|
1473 |
-
|
1474 |
-
|
1475 |
-
|
1476 |
-
|
1477 |
-
|
1478 |
-
|
1479 |
-
|
1480 |
-
|
1481 |
-
|
1482 |
-
|
1483 |
-
|
1484 |
-
|
1485 |
-
|
1486 |
-
|
1487 |
-
|
1488 |
-
|
1489 |
-
|
1490 |
-
|
1491 |
-
|
1492 |
-
|
1493 |
-
|
1494 |
-
|
1495 |
-
|
1496 |
-
|
1497 |
-
|
1498 |
-
|
1499 |
-
|
1500 |
-
|
1501 |
-
|
1502 |
-
|
1503 |
-
|
1504 |
-
|
1505 |
-
|
1506 |
-
|
1507 |
-
|
1508 |
-
|
1509 |
-
|
1510 |
-
|
1511 |
-
|
1512 |
-
|
1513 |
-
|
1514 |
-
|
1515 |
-
|
1516 |
-
|
1517 |
-
|
1518 |
-
|
1519 |
-
|
1520 |
-
|
1521 |
-
|
1522 |
-
|
1523 |
-
|
1524 |
-
|
1525 |
-
|
1526 |
-
|
1527 |
-
|
1528 |
-
|
1529 |
-
|
1530 |
-
|
1531 |
-
|
1532 |
-
|
1533 |
-
|
1534 |
-
|
1535 |
-
|
1536 |
-
|
1537 |
-
|
1538 |
-
|
1539 |
-
|
1540 |
-
|
1541 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1542 |
|
1543 |
})(jQuery);
|
1 |
+
/**
|
2 |
+
* bxSlider v4.2.5
|
3 |
+
* Copyright 2013-2015 Steven Wanderski
|
|
|
|
|
4 |
* Written while drinking Belgian ales and listening to jazz
|
5 |
+
|
6 |
+
* Licensed under MIT (http://opensource.org/licenses/MIT)
|
7 |
+
*/
|
8 |
+
|
9 |
+
;(function($) {
|
10 |
+
|
11 |
+
var defaults = {
|
12 |
+
|
13 |
+
// GENERAL
|
14 |
+
mode: 'horizontal',
|
15 |
+
slideSelector: '',
|
16 |
+
infiniteLoop: true,
|
17 |
+
hideControlOnEnd: false,
|
18 |
+
speed: 500,
|
19 |
+
easing: null,
|
20 |
+
slideMargin: 0,
|
21 |
+
startSlide: 0,
|
22 |
+
randomStart: false,
|
23 |
+
captions: false,
|
24 |
+
ticker: false,
|
25 |
+
tickerHover: false,
|
26 |
+
adaptiveHeight: false,
|
27 |
+
adaptiveHeightSpeed: 500,
|
28 |
+
video: false,
|
29 |
+
useCSS: true,
|
30 |
+
preloadImages: 'visible',
|
31 |
+
responsive: true,
|
32 |
+
slideZIndex: 50,
|
33 |
+
wrapperClass: 'bx-wrapper',
|
34 |
+
|
35 |
+
// TOUCH
|
36 |
+
touchEnabled: true,
|
37 |
+
swipeThreshold: 50,
|
38 |
+
oneToOneTouch: true,
|
39 |
+
preventDefaultSwipeX: true,
|
40 |
+
preventDefaultSwipeY: false,
|
41 |
+
|
42 |
+
// ACCESSIBILITY
|
43 |
+
ariaLive: true,
|
44 |
+
ariaHidden: true,
|
45 |
+
|
46 |
+
// KEYBOARD
|
47 |
+
keyboardEnabled: false,
|
48 |
+
|
49 |
+
// PAGER
|
50 |
+
pager: true,
|
51 |
+
pagerType: 'full',
|
52 |
+
pagerShortSeparator: ' / ',
|
53 |
+
pagerSelector: null,
|
54 |
+
buildPager: null,
|
55 |
+
pagerCustom: null,
|
56 |
+
|
57 |
+
// CONTROLS
|
58 |
+
controls: true,
|
59 |
+
nextText: 'Next',
|
60 |
+
prevText: 'Prev',
|
61 |
+
nextSelector: null,
|
62 |
+
prevSelector: null,
|
63 |
+
autoControls: false,
|
64 |
+
startText: 'Start',
|
65 |
+
stopText: 'Stop',
|
66 |
+
autoControlsCombine: false,
|
67 |
+
autoControlsSelector: null,
|
68 |
+
|
69 |
+
// AUTO
|
70 |
+
auto: false,
|
71 |
+
pause: 4000,
|
72 |
+
autoStart: true,
|
73 |
+
autoDirection: 'next',
|
74 |
+
stopAutoOnClick: false,
|
75 |
+
autoHover: false,
|
76 |
+
autoDelay: 0,
|
77 |
+
autoSlideForOnePage: false,
|
78 |
+
|
79 |
+
// CAROUSEL
|
80 |
+
minSlides: 1,
|
81 |
+
maxSlides: 1,
|
82 |
+
moveSlides: 0,
|
83 |
+
slideWidth: 0,
|
84 |
+
shrinkItems: false,
|
85 |
+
|
86 |
+
// CALLBACKS
|
87 |
+
onSliderLoad: function() { return true; },
|
88 |
+
onSlideBefore: function() { return true; },
|
89 |
+
onSlideAfter: function() { return true; },
|
90 |
+
onSlideNext: function() { return true; },
|
91 |
+
onSlidePrev: function() { return true; },
|
92 |
+
onSliderResize: function() { return true; }
|
93 |
+
};
|
94 |
+
|
95 |
+
$.fn.bxSlider = function(options) {
|
96 |
+
|
97 |
+
if (this.length === 0) {
|
98 |
+
return this;
|
99 |
+
}
|
100 |
+
|
101 |
+
// support multiple elements
|
102 |
+
if (this.length > 1) {
|
103 |
+
this.each(function() {
|
104 |
+
$(this).bxSlider(options);
|
105 |
+
});
|
106 |
+
return this;
|
107 |
+
}
|
108 |
+
|
109 |
+
// create a namespace to be used throughout the plugin
|
110 |
+
var slider = {},
|
111 |
+
// set a reference to our slider element
|
112 |
+
el = this,
|
113 |
+
// get the original window dimens (thanks a lot IE)
|
114 |
+
windowWidth = $(window).width(),
|
115 |
+
windowHeight = $(window).height();
|
116 |
+
|
117 |
+
// Return if slider is already initialized
|
118 |
+
if ($(el).data('bxSlider')) { return; }
|
119 |
+
|
120 |
+
/**
|
121 |
+
* ===================================================================================
|
122 |
+
* = PRIVATE FUNCTIONS
|
123 |
+
* ===================================================================================
|
124 |
+
*/
|
125 |
+
|
126 |
+
/**
|
127 |
+
* Initializes namespace settings to be used throughout plugin
|
128 |
+
*/
|
129 |
+
var init = function() {
|
130 |
+
// Return if slider is already initialized
|
131 |
+
if ($(el).data('bxSlider')) { return; }
|
132 |
+
// merge user-supplied options with the defaults
|
133 |
+
slider.settings = $.extend({}, defaults, options);
|
134 |
+
// parse slideWidth setting
|
135 |
+
slider.settings.slideWidth = parseInt(slider.settings.slideWidth);
|
136 |
+
// store the original children
|
137 |
+
slider.children = el.children(slider.settings.slideSelector);
|
138 |
+
// check if actual number of slides is less than minSlides / maxSlides
|
139 |
+
if (slider.children.length < slider.settings.minSlides) { slider.settings.minSlides = slider.children.length; }
|
140 |
+
if (slider.children.length < slider.settings.maxSlides) { slider.settings.maxSlides = slider.children.length; }
|
141 |
+
// if random start, set the startSlide setting to random number
|
142 |
+
if (slider.settings.randomStart) { slider.settings.startSlide = Math.floor(Math.random() * slider.children.length); }
|
143 |
+
// store active slide information
|
144 |
+
slider.active = { index: slider.settings.startSlide };
|
145 |
+
// store if the slider is in carousel mode (displaying / moving multiple slides)
|
146 |
+
slider.carousel = slider.settings.minSlides > 1 || slider.settings.maxSlides > 1 ? true : false;
|
147 |
+
// if carousel, force preloadImages = 'all'
|
148 |
+
if (slider.carousel) { slider.settings.preloadImages = 'all'; }
|
149 |
+
// calculate the min / max width thresholds based on min / max number of slides
|
150 |
+
// used to setup and update carousel slides dimensions
|
151 |
+
slider.minThreshold = (slider.settings.minSlides * slider.settings.slideWidth) + ((slider.settings.minSlides - 1) * slider.settings.slideMargin);
|
152 |
+
slider.maxThreshold = (slider.settings.maxSlides * slider.settings.slideWidth) + ((slider.settings.maxSlides - 1) * slider.settings.slideMargin);
|
153 |
+
// store the current state of the slider (if currently animating, working is true)
|
154 |
+
slider.working = false;
|
155 |
+
// initialize the controls object
|
156 |
+
slider.controls = {};
|
157 |
+
// initialize an auto interval
|
158 |
+
slider.interval = null;
|
159 |
+
// determine which property to use for transitions
|
160 |
+
slider.animProp = slider.settings.mode === 'vertical' ? 'top' : 'left';
|
161 |
+
// determine if hardware acceleration can be used
|
162 |
+
slider.usingCSS = slider.settings.useCSS && slider.settings.mode !== 'fade' && (function() {
|
163 |
+
// create our test div element
|
164 |
+
var div = document.createElement('div'),
|
165 |
+
// css transition properties
|
166 |
+
props = ['WebkitPerspective', 'MozPerspective', 'OPerspective', 'msPerspective'];
|
167 |
+
// test for each property
|
168 |
+
for (var i = 0; i < props.length; i++) {
|
169 |
+
if (div.style[props[i]] !== undefined) {
|
170 |
+
slider.cssPrefix = props[i].replace('Perspective', '').toLowerCase();
|
171 |
+
slider.animProp = '-' + slider.cssPrefix + '-transform';
|
172 |
+
return true;
|
173 |
+
}
|
174 |
+
}
|
175 |
+
return false;
|
176 |
+
}());
|
177 |
+
// if vertical mode always make maxSlides and minSlides equal
|
178 |
+
if (slider.settings.mode === 'vertical') { slider.settings.maxSlides = slider.settings.minSlides; }
|
179 |
+
// save original style data
|
180 |
+
el.data('origStyle', el.attr('style'));
|
181 |
+
el.children(slider.settings.slideSelector).each(function() {
|
182 |
+
$(this).data('origStyle', $(this).attr('style'));
|
183 |
+
});
|
184 |
+
|
185 |
+
// perform all DOM / CSS modifications
|
186 |
+
setup();
|
187 |
+
};
|
188 |
+
|
189 |
+
/**
|
190 |
+
* Performs all DOM and CSS modifications
|
191 |
+
*/
|
192 |
+
var setup = function() {
|
193 |
+
var preloadSelector = slider.children.eq(slider.settings.startSlide); // set the default preload selector (visible)
|
194 |
+
|
195 |
+
// wrap el in a wrapper
|
196 |
+
el.wrap('<div class="' + slider.settings.wrapperClass + '"><div class="bx-viewport"></div></div>');
|
197 |
+
// store a namespace reference to .bx-viewport
|
198 |
+
slider.viewport = el.parent();
|
199 |
+
|
200 |
+
// add aria-live if the setting is enabled and ticker mode is disabled
|
201 |
+
if (slider.settings.ariaLive && !slider.settings.ticker) {
|
202 |
+
slider.viewport.attr('aria-live', 'polite');
|
203 |
+
}
|
204 |
+
// add a loading div to display while images are loading
|
205 |
+
slider.loader = $('<div class="bx-loading" />');
|
206 |
+
slider.viewport.prepend(slider.loader);
|
207 |
+
// set el to a massive width, to hold any needed slides
|
208 |
+
// also strip any margin and padding from el
|
209 |
+
el.css({
|
210 |
+
width: slider.settings.mode === 'horizontal' ? (slider.children.length * 1000 + 215) + '%' : 'auto',
|
211 |
+
position: 'relative'
|
212 |
+
});
|
213 |
+
// if using CSS, add the easing property
|
214 |
+
if (slider.usingCSS && slider.settings.easing) {
|
215 |
+
el.css('-' + slider.cssPrefix + '-transition-timing-function', slider.settings.easing);
|
216 |
+
// if not using CSS and no easing value was supplied, use the default JS animation easing (swing)
|
217 |
+
} else if (!slider.settings.easing) {
|
218 |
+
slider.settings.easing = 'swing';
|
219 |
+
}
|
220 |
+
// make modifications to the viewport (.bx-viewport)
|
221 |
+
slider.viewport.css({
|
222 |
+
width: '100%',
|
223 |
+
overflow: 'hidden',
|
224 |
+
position: 'relative'
|
225 |
+
});
|
226 |
+
slider.viewport.parent().css({
|
227 |
+
maxWidth: getViewportMaxWidth()
|
228 |
+
});
|
229 |
+
// make modification to the wrapper (.bx-wrapper)
|
230 |
+
if (!slider.settings.pager && !slider.settings.controls) {
|
231 |
+
slider.viewport.parent().css({
|
232 |
+
margin: '0 auto 0px'
|
233 |
+
});
|
234 |
+
}
|
235 |
+
// apply css to all slider children
|
236 |
+
slider.children.css({
|
237 |
+
float: slider.settings.mode === 'horizontal' ? 'left' : 'none',
|
238 |
+
listStyle: 'none',
|
239 |
+
position: 'relative'
|
240 |
+
});
|
241 |
+
// apply the calculated width after the float is applied to prevent scrollbar interference
|
242 |
+
slider.children.css('width', getSlideWidth());
|
243 |
+
// if slideMargin is supplied, add the css
|
244 |
+
if (slider.settings.mode === 'horizontal' && slider.settings.slideMargin > 0) { slider.children.css('marginRight', slider.settings.slideMargin); }
|
245 |
+
if (slider.settings.mode === 'vertical' && slider.settings.slideMargin > 0) { slider.children.css('marginBottom', slider.settings.slideMargin); }
|
246 |
+
// if "fade" mode, add positioning and z-index CSS
|
247 |
+
if (slider.settings.mode === 'fade') {
|
248 |
+
slider.children.css({
|
249 |
+
position: 'absolute',
|
250 |
+
zIndex: 0,
|
251 |
+
display: 'none'
|
252 |
+
});
|
253 |
+
// prepare the z-index on the showing element
|
254 |
+
slider.children.eq(slider.settings.startSlide).css({zIndex: slider.settings.slideZIndex, display: 'block'});
|
255 |
+
}
|
256 |
+
// create an element to contain all slider controls (pager, start / stop, etc)
|
257 |
+
slider.controls.el = $('<div class="bx-controls" />');
|
258 |
+
// if captions are requested, add them
|
259 |
+
if (slider.settings.captions) { appendCaptions(); }
|
260 |
+
// check if startSlide is last slide
|
261 |
+
slider.active.last = slider.settings.startSlide === getPagerQty() - 1;
|
262 |
+
// if video is true, set up the fitVids plugin
|
263 |
+
if (slider.settings.video) { el.fitVids(); }
|
264 |
+
if (slider.settings.preloadImages === 'all' || slider.settings.ticker) { preloadSelector = slider.children; }
|
265 |
+
// only check for control addition if not in "ticker" mode
|
266 |
+
if (!slider.settings.ticker) {
|
267 |
+
// if controls are requested, add them
|
268 |
+
if (slider.settings.controls) { appendControls(); }
|
269 |
+
// if auto is true, and auto controls are requested, add them
|
270 |
+
if (slider.settings.auto && slider.settings.autoControls) { appendControlsAuto(); }
|
271 |
+
// if pager is requested, add it
|
272 |
+
if (slider.settings.pager) { appendPager(); }
|
273 |
+
// if any control option is requested, add the controls wrapper
|
274 |
+
if (slider.settings.controls || slider.settings.autoControls || slider.settings.pager) { slider.viewport.after(slider.controls.el); }
|
275 |
+
// if ticker mode, do not allow a pager
|
276 |
+
} else {
|
277 |
+
slider.settings.pager = false;
|
278 |
+
}
|
279 |
+
loadElements(preloadSelector, start);
|
280 |
+
};
|
281 |
+
|
282 |
+
var loadElements = function(selector, callback) {
|
283 |
+
var total = selector.find('img:not([src=""]), iframe').length,
|
284 |
+
count = 0;
|
285 |
+
if (total === 0) {
|
286 |
+
callback();
|
287 |
+
return;
|
288 |
+
}
|
289 |
+
selector.find('img:not([src=""]), iframe').each(function() {
|
290 |
+
$(this).one('load error', function() {
|
291 |
+
if (++count === total) { callback(); }
|
292 |
+
}).each(function() {
|
293 |
+
if (this.complete) { $(this).load(); }
|
294 |
+
});
|
295 |
+
});
|
296 |
+
};
|
297 |
+
|
298 |
+
/**
|
299 |
+
* Start the slider
|
300 |
+
*/
|
301 |
+
var start = function() {
|
302 |
+
// if infinite loop, prepare additional slides
|
303 |
+
if (slider.settings.infiniteLoop && slider.settings.mode !== 'fade' && !slider.settings.ticker) {
|
304 |
+
var slice = slider.settings.mode === 'vertical' ? slider.settings.minSlides : slider.settings.maxSlides,
|
305 |
+
sliceAppend = slider.children.slice(0, slice).clone(true).addClass('bx-clone'),
|
306 |
+
slicePrepend = slider.children.slice(-slice).clone(true).addClass('bx-clone');
|
307 |
+
if (slider.settings.ariaHidden) {
|
308 |
+
sliceAppend.attr('aria-hidden', true);
|
309 |
+
slicePrepend.attr('aria-hidden', true);
|
310 |
+
}
|
311 |
+
el.append(sliceAppend).prepend(slicePrepend);
|
312 |
+
}
|
313 |
+
// remove the loading DOM element
|
314 |
+
slider.loader.remove();
|
315 |
+
// set the left / top position of "el"
|
316 |
+
setSlidePosition();
|
317 |
+
// if "vertical" mode, always use adaptiveHeight to prevent odd behavior
|
318 |
+
if (slider.settings.mode === 'vertical') { slider.settings.adaptiveHeight = true; }
|
319 |
+
// set the viewport height
|
320 |
+
slider.viewport.height(getViewportHeight());
|
321 |
+
// make sure everything is positioned just right (same as a window resize)
|
322 |
+
el.redrawSlider();
|
323 |
+
// onSliderLoad callback
|
324 |
+
slider.settings.onSliderLoad.call(el, slider.active.index);
|
325 |
+
// slider has been fully initialized
|
326 |
+
slider.initialized = true;
|
327 |
+
// bind the resize call to the window
|
328 |
+
if (slider.settings.responsive) { $(window).bind('resize', resizeWindow); }
|
329 |
+
// if auto is true and has more than 1 page, start the show
|
330 |
+
if (slider.settings.auto && slider.settings.autoStart && (getPagerQty() > 1 || slider.settings.autoSlideForOnePage)) { initAuto(); }
|
331 |
+
// if ticker is true, start the ticker
|
332 |
+
if (slider.settings.ticker) { initTicker(); }
|
333 |
+
// if pager is requested, make the appropriate pager link active
|
334 |
+
if (slider.settings.pager) { updatePagerActive(slider.settings.startSlide); }
|
335 |
+
// check for any updates to the controls (like hideControlOnEnd updates)
|
336 |
+
if (slider.settings.controls) { updateDirectionControls(); }
|
337 |
+
// if touchEnabled is true, setup the touch events
|
338 |
+
if (slider.settings.touchEnabled && !slider.settings.ticker) { initTouch(); }
|
339 |
+
// if keyboardEnabled is true, setup the keyboard events
|
340 |
+
if (slider.settings.keyboardEnabled && !slider.settings.ticker) {
|
341 |
+
$(document).keydown(keyPress);
|
342 |
+
}
|
343 |
+
};
|
344 |
+
|
345 |
+
/**
|
346 |
+
* Returns the calculated height of the viewport, used to determine either adaptiveHeight or the maxHeight value
|
347 |
+
*/
|
348 |
+
var getViewportHeight = function() {
|
349 |
+
var height = 0;
|
350 |
+
// first determine which children (slides) should be used in our height calculation
|
351 |
+
var children = $();
|
352 |
+
// if mode is not "vertical" and adaptiveHeight is false, include all children
|
353 |
+
if (slider.settings.mode !== 'vertical' && !slider.settings.adaptiveHeight) {
|
354 |
+
children = slider.children;
|
355 |
+
} else {
|
356 |
+
// if not carousel, return the single active child
|
357 |
+
if (!slider.carousel) {
|
358 |
+
children = slider.children.eq(slider.active.index);
|
359 |
+
// if carousel, return a slice of children
|
360 |
+
} else {
|
361 |
+
// get the individual slide index
|
362 |
+
var currentIndex = slider.settings.moveSlides === 1 ? slider.active.index : slider.active.index * getMoveBy();
|
363 |
+
// add the current slide to the children
|
364 |
+
children = slider.children.eq(currentIndex);
|
365 |
+
// cycle through the remaining "showing" slides
|
366 |
+
for (i = 1; i <= slider.settings.maxSlides - 1; i++) {
|
367 |
+
// if looped back to the start
|
368 |
+
if (currentIndex + i >= slider.children.length) {
|
369 |
+
children = children.add(slider.children.eq(i - 1));
|
370 |
+
} else {
|
371 |
+
children = children.add(slider.children.eq(currentIndex + i));
|
372 |
+
}
|
373 |
+
}
|
374 |
+
}
|
375 |
+
}
|
376 |
+
// if "vertical" mode, calculate the sum of the heights of the children
|
377 |
+
if (slider.settings.mode === 'vertical') {
|
378 |
+
children.each(function(index) {
|
379 |
+
height += $(this).outerHeight();
|
380 |
+
});
|
381 |
+
// add user-supplied margins
|
382 |
+
if (slider.settings.slideMargin > 0) {
|
383 |
+
height += slider.settings.slideMargin * (slider.settings.minSlides - 1);
|
384 |
+
}
|
385 |
+
// if not "vertical" mode, calculate the max height of the children
|
386 |
+
} else {
|
387 |
+
height = Math.max.apply(Math, children.map(function() {
|
388 |
+
return $(this).outerHeight(false);
|
389 |
+
}).get());
|
390 |
+
}
|
391 |
+
|
392 |
+
if (slider.viewport.css('box-sizing') === 'border-box') {
|
393 |
+
height += parseFloat(slider.viewport.css('padding-top')) + parseFloat(slider.viewport.css('padding-bottom')) +
|
394 |
+
parseFloat(slider.viewport.css('border-top-width')) + parseFloat(slider.viewport.css('border-bottom-width'));
|
395 |
+
} else if (slider.viewport.css('box-sizing') === 'padding-box') {
|
396 |
+
height += parseFloat(slider.viewport.css('padding-top')) + parseFloat(slider.viewport.css('padding-bottom'));
|
397 |
+
}
|
398 |
+
|
399 |
+
return height;
|
400 |
+
};
|
401 |
+
|
402 |
+
/**
|
403 |
+
* Returns the calculated width to be used for the outer wrapper / viewport
|
404 |
+
*/
|
405 |
+
var getViewportMaxWidth = function() {
|
406 |
+
var width = '100%';
|
407 |
+
if (slider.settings.slideWidth > 0) {
|
408 |
+
if (slider.settings.mode === 'horizontal') {
|
409 |
+
width = (slider.settings.maxSlides * slider.settings.slideWidth) + ((slider.settings.maxSlides - 1) * slider.settings.slideMargin);
|
410 |
+
} else {
|
411 |
+
width = slider.settings.slideWidth;
|
412 |
+
}
|
413 |
+
}
|
414 |
+
return width;
|
415 |
+
};
|
416 |
+
|
417 |
+
/**
|
418 |
+
* Returns the calculated width to be applied to each slide
|
419 |
+
*/
|
420 |
+
var getSlideWidth = function() {
|
421 |
+
var newElWidth = slider.settings.slideWidth, // start with any user-supplied slide width
|
422 |
+
wrapWidth = slider.viewport.width(); // get the current viewport width
|
423 |
+
// if slide width was not supplied, or is larger than the viewport use the viewport width
|
424 |
+
if (slider.settings.slideWidth === 0 ||
|
425 |
+
(slider.settings.slideWidth > wrapWidth && !slider.carousel) ||
|
426 |
+
slider.settings.mode === 'vertical') {
|
427 |
+
newElWidth = wrapWidth;
|
428 |
+
// if carousel, use the thresholds to determine the width
|
429 |
+
} else if (slider.settings.maxSlides > 1 && slider.settings.mode === 'horizontal') {
|
430 |
+
if (wrapWidth > slider.maxThreshold) {
|
431 |
+
return newElWidth;
|
432 |
+
} else if (wrapWidth < slider.minThreshold) {
|
433 |
+
newElWidth = (wrapWidth - (slider.settings.slideMargin * (slider.settings.minSlides - 1))) / slider.settings.minSlides;
|
434 |
+
} else if (slider.settings.shrinkItems) {
|
435 |
+
newElWidth = Math.floor((wrapWidth + slider.settings.slideMargin) / (Math.ceil((wrapWidth + slider.settings.slideMargin) / (newElWidth + slider.settings.slideMargin))) - slider.settings.slideMargin);
|
436 |
+
}
|
437 |
+
}
|
438 |
+
return newElWidth;
|
439 |
+
};
|
440 |
+
|
441 |
+
/**
|
442 |
+
* Returns the number of slides currently visible in the viewport (includes partially visible slides)
|
443 |
+
*/
|
444 |
+
var getNumberSlidesShowing = function() {
|
445 |
+
var slidesShowing = 1,
|
446 |
+
childWidth = null;
|
447 |
+
if (slider.settings.mode === 'horizontal' && slider.settings.slideWidth > 0) {
|
448 |
+
// if viewport is smaller than minThreshold, return minSlides
|
449 |
+
if (slider.viewport.width() < slider.minThreshold) {
|
450 |
+
slidesShowing = slider.settings.minSlides;
|
451 |
+
// if viewport is larger than maxThreshold, return maxSlides
|
452 |
+
} else if (slider.viewport.width() > slider.maxThreshold) {
|
453 |
+
slidesShowing = slider.settings.maxSlides;
|
454 |
+
// if viewport is between min / max thresholds, divide viewport width by first child width
|
455 |
+
} else {
|
456 |
+
childWidth = slider.children.first().width() + slider.settings.slideMargin;
|
457 |
+
slidesShowing = Math.floor((slider.viewport.width() +
|
458 |
+
slider.settings.slideMargin) / childWidth);
|
459 |
+
}
|
460 |
+
// if "vertical" mode, slides showing will always be minSlides
|
461 |
+
} else if (slider.settings.mode === 'vertical') {
|
462 |
+
slidesShowing = slider.settings.minSlides;
|
463 |
+
}
|
464 |
+
return slidesShowing;
|
465 |
+
};
|
466 |
+
|
467 |
+
/**
|
468 |
+
* Returns the number of pages (one full viewport of slides is one "page")
|
469 |
+
*/
|
470 |
+
var getPagerQty = function() {
|
471 |
+
var pagerQty = 0,
|
472 |
+
breakPoint = 0,
|
473 |
+
counter = 0;
|
474 |
+
// if moveSlides is specified by the user
|
475 |
+
if (slider.settings.moveSlides > 0) {
|
476 |
+
if (slider.settings.infiniteLoop) {
|
477 |
+
pagerQty = Math.ceil(slider.children.length / getMoveBy());
|
478 |
+
} else {
|
479 |
+
// when breakpoint goes above children length, counter is the number of pages
|
480 |
+
while (breakPoint < slider.children.length) {
|
481 |
+
++pagerQty;
|
482 |
+
breakPoint = counter + getNumberSlidesShowing();
|
483 |
+
counter += slider.settings.moveSlides <= getNumberSlidesShowing() ? slider.settings.moveSlides : getNumberSlidesShowing();
|
484 |
+
}
|
485 |
+
}
|
486 |
+
// if moveSlides is 0 (auto) divide children length by sides showing, then round up
|
487 |
+
} else {
|
488 |
+
pagerQty = Math.ceil(slider.children.length / getNumberSlidesShowing());
|
489 |
+
}
|
490 |
+
return pagerQty;
|
491 |
+
};
|
492 |
+
|
493 |
+
/**
|
494 |
+
* Returns the number of individual slides by which to shift the slider
|
495 |
+
*/
|
496 |
+
var getMoveBy = function() {
|
497 |
+
// if moveSlides was set by the user and moveSlides is less than number of slides showing
|
498 |
+
if (slider.settings.moveSlides > 0 && slider.settings.moveSlides <= getNumberSlidesShowing()) {
|
499 |
+
return slider.settings.moveSlides;
|
500 |
+
}
|
501 |
+
// if moveSlides is 0 (auto)
|
502 |
+
return getNumberSlidesShowing();
|
503 |
+
};
|
504 |
+
|
505 |
+
/**
|
506 |
+
* Sets the slider's (el) left or top position
|
507 |
+
*/
|
508 |
+
var setSlidePosition = function() {
|
509 |
+
var position, lastChild, lastShowingIndex;
|
510 |
+
// if last slide, not infinite loop, and number of children is larger than specified maxSlides
|
511 |
+
if (slider.children.length > slider.settings.maxSlides && slider.active.last && !slider.settings.infiniteLoop) {
|
512 |
+
if (slider.settings.mode === 'horizontal') {
|
513 |
+
// get the last child's position
|
514 |
+
lastChild = slider.children.last();
|
515 |
+
position = lastChild.position();
|
516 |
+
// set the left position
|
517 |
+
setPositionProperty(-(position.left - (slider.viewport.width() - lastChild.outerWidth())), 'reset', 0);
|
518 |
+
} else if (slider.settings.mode === 'vertical') {
|
519 |
+
// get the last showing index's position
|
520 |
+
lastShowingIndex = slider.children.length - slider.settings.minSlides;
|
521 |
+
position = slider.children.eq(lastShowingIndex).position();
|
522 |
+
// set the top position
|
523 |
+
setPositionProperty(-position.top, 'reset', 0);
|
524 |
+
}
|
525 |
+
// if not last slide
|
526 |
+
} else {
|
527 |
+
// get the position of the first showing slide
|
528 |
+
position = slider.children.eq(slider.active.index * getMoveBy()).position();
|
529 |
+
// check for last slide
|
530 |
+
if (slider.active.index === getPagerQty() - 1) { slider.active.last = true; }
|
531 |
+
// set the respective position
|
532 |
+
if (position !== undefined) {
|
533 |
+
if (slider.settings.mode === 'horizontal') { setPositionProperty(-position.left, 'reset', 0); }
|
534 |
+
else if (slider.settings.mode === 'vertical') { setPositionProperty(-position.top, 'reset', 0); }
|
535 |
+
}
|
536 |
+
}
|
537 |
+
};
|
538 |
+
|
539 |
+
/**
|
540 |
+
* Sets the el's animating property position (which in turn will sometimes animate el).
|
541 |
+
* If using CSS, sets the transform property. If not using CSS, sets the top / left property.
|
542 |
+
*
|
543 |
+
* @param value (int)
|
544 |
+
* - the animating property's value
|
545 |
+
*
|
546 |
+
* @param type (string) 'slide', 'reset', 'ticker'
|
547 |
+
* - the type of instance for which the function is being
|
548 |
+
*
|
549 |
+
* @param duration (int)
|
550 |
+
* - the amount of time (in ms) the transition should occupy
|
551 |
+
*
|
552 |
+
* @param params (array) optional
|
553 |
+
* - an optional parameter containing any variables that need to be passed in
|
554 |
+
*/
|
555 |
+
var setPositionProperty = function(value, type, duration, params) {
|
556 |
+
var animateObj, propValue;
|
557 |
+
// use CSS transform
|
558 |
+
if (slider.usingCSS) {
|
559 |
+
// determine the translate3d value
|
560 |
+
propValue = slider.settings.mode === 'vertical' ? 'translate3d(0, ' + value + 'px, 0)' : 'translate3d(' + value + 'px, 0, 0)';
|
561 |
+
// add the CSS transition-duration
|
562 |
+
el.css('-' + slider.cssPrefix + '-transition-duration', duration / 1000 + 's');
|
563 |
+
if (type === 'slide') {
|
564 |
+
// set the property value
|
565 |
+
el.css(slider.animProp, propValue);
|
566 |
+
if (duration !== 0) {
|
567 |
+
// bind a callback method - executes when CSS transition completes
|
568 |
+
el.bind('transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd', function(e) {
|
569 |
+
//make sure it's the correct one
|
570 |
+
if (!$(e.target).is(el)) { return; }
|
571 |
+
// unbind the callback
|
572 |
+
el.unbind('transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd');
|
573 |
+
updateAfterSlideTransition();
|
574 |
+
});
|
575 |
+
} else { //duration = 0
|
576 |
+
updateAfterSlideTransition();
|
577 |
+
}
|
578 |
+
} else if (type === 'reset') {
|
579 |
+
el.css(slider.animProp, propValue);
|
580 |
+
} else if (type === 'ticker') {
|
581 |
+
// make the transition use 'linear'
|
582 |
+
el.css('-' + slider.cssPrefix + '-transition-timing-function', 'linear');
|
583 |
+
el.css(slider.animProp, propValue);
|
584 |
+
if (duration !== 0) {
|
585 |
+
el.bind('transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd', function(e) {
|
586 |
+
//make sure it's the correct one
|
587 |
+
if (!$(e.target).is(el)) { return; }
|
588 |
+
// unbind the callback
|
589 |
+
el.unbind('transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd');
|
590 |
+
// reset the position
|
591 |
+
setPositionProperty(params.resetValue, 'reset', 0);
|
592 |
+
// start the loop again
|
593 |
+
tickerLoop();
|
594 |
+
});
|
595 |
+
} else { //duration = 0
|
596 |
+
setPositionProperty(params.resetValue, 'reset', 0);
|
597 |
+
tickerLoop();
|
598 |
+
}
|
599 |
+
}
|
600 |
+
// use JS animate
|
601 |
+
} else {
|
602 |
+
animateObj = {};
|
603 |
+
animateObj[slider.animProp] = value;
|
604 |
+
if (type === 'slide') {
|
605 |
+
el.animate(animateObj, duration, slider.settings.easing, function() {
|
606 |
+
updateAfterSlideTransition();
|
607 |
+
});
|
608 |
+
} else if (type === 'reset') {
|
609 |
+
el.css(slider.animProp, value);
|
610 |
+
} else if (type === 'ticker') {
|
611 |
+
el.animate(animateObj, duration, 'linear', function() {
|
612 |
+
setPositionProperty(params.resetValue, 'reset', 0);
|
613 |
+
// run the recursive loop after animation
|
614 |
+
tickerLoop();
|
615 |
+
});
|
616 |
+
}
|
617 |
+
}
|
618 |
+
};
|
619 |
+
|
620 |
+
/**
|
621 |
+
* Populates the pager with proper amount of pages
|
622 |
+
*/
|
623 |
+
var populatePager = function() {
|
624 |
+
var pagerHtml = '',
|
625 |
+
linkContent = '',
|
626 |
+
pagerQty = getPagerQty();
|
627 |
+
// loop through each pager item
|
628 |
+
for (var i = 0; i < pagerQty; i++) {
|
629 |
+
linkContent = '';
|
630 |
+
// if a buildPager function is supplied, use it to get pager link value, else use index + 1
|
631 |
+
if (slider.settings.buildPager && $.isFunction(slider.settings.buildPager) || slider.settings.pagerCustom) {
|
632 |
+
linkContent = slider.settings.buildPager(i);
|
633 |
+
slider.pagerEl.addClass('bx-custom-pager');
|
634 |
+
} else {
|
635 |
+
linkContent = i + 1;
|
636 |
+
slider.pagerEl.addClass('bx-default-pager');
|
637 |
+
}
|
638 |
+
// var linkContent = slider.settings.buildPager && $.isFunction(slider.settings.buildPager) ? slider.settings.buildPager(i) : i + 1;
|
639 |
+
// add the markup to the string
|
640 |
+
pagerHtml += '<div class="bx-pager-item"><a href="" data-slide-index="' + i + '" class="bx-pager-link">' + linkContent + '</a></div>';
|
641 |
+
}
|
642 |
+
// populate the pager element with pager links
|
643 |
+
slider.pagerEl.html(pagerHtml);
|
644 |
+
};
|
645 |
+
|
646 |
+
/**
|
647 |
+
* Appends the pager to the controls element
|
648 |
+
*/
|
649 |
+
var appendPager = function() {
|
650 |
+
if (!slider.settings.pagerCustom) {
|
651 |
+
// create the pager DOM element
|
652 |
+
slider.pagerEl = $('<div class="bx-pager" />');
|
653 |
+
// if a pager selector was supplied, populate it with the pager
|
654 |
+
if (slider.settings.pagerSelector) {
|
655 |
+
$(slider.settings.pagerSelector).html(slider.pagerEl);
|
656 |
+
// if no pager selector was supplied, add it after the wrapper
|
657 |
+
} else {
|
658 |
+
slider.controls.el.addClass('bx-has-pager').append(slider.pagerEl);
|
659 |
+
}
|
660 |
+
// populate the pager
|
661 |
+
populatePager();
|
662 |
+
} else {
|
663 |
+
slider.pagerEl = $(slider.settings.pagerCustom);
|
664 |
+
}
|
665 |
+
// assign the pager click binding
|
666 |
+
slider.pagerEl.on('click touchend', 'a', clickPagerBind);
|
667 |
+
};
|
668 |
+
|
669 |
+
/**
|
670 |
+
* Appends prev / next controls to the controls element
|
671 |
+
*/
|
672 |
+
var appendControls = function() {
|
673 |
+
slider.controls.next = $('<a class="bx-next" href="">' + slider.settings.nextText + '</a>');
|
674 |
+
slider.controls.prev = $('<a class="bx-prev" href="">' + slider.settings.prevText + '</a>');
|
675 |
+
// bind click actions to the controls
|
676 |
+
slider.controls.next.bind('click touchend', clickNextBind);
|
677 |
+
slider.controls.prev.bind('click touchend', clickPrevBind);
|
678 |
+
// if nextSelector was supplied, populate it
|
679 |
+
if (slider.settings.nextSelector) {
|
680 |
+
$(slider.settings.nextSelector).append(slider.controls.next);
|
681 |
+
}
|
682 |
+
// if prevSelector was supplied, populate it
|
683 |
+
if (slider.settings.prevSelector) {
|
684 |
+
$(slider.settings.prevSelector).append(slider.controls.prev);
|
685 |
+
}
|
686 |
+
// if no custom selectors were supplied
|
687 |
+
if (!slider.settings.nextSelector && !slider.settings.prevSelector) {
|
688 |
+
// add the controls to the DOM
|
689 |
+
slider.controls.directionEl = $('<div class="bx-controls-direction" />');
|
690 |
+
// add the control elements to the directionEl
|
691 |
+
slider.controls.directionEl.append(slider.controls.prev).append(slider.controls.next);
|
692 |
+
// slider.viewport.append(slider.controls.directionEl);
|
693 |
+
slider.controls.el.addClass('bx-has-controls-direction').append(slider.controls.directionEl);
|
694 |
+
}
|
695 |
+
};
|
696 |
+
|
697 |
+
/**
|
698 |
+
* Appends start / stop auto controls to the controls element
|
699 |
+
*/
|
700 |
+
var appendControlsAuto = function() {
|
701 |
+
slider.controls.start = $('<div class="bx-controls-auto-item"><a class="bx-start" href="">' + slider.settings.startText + '</a></div>');
|
702 |
+
slider.controls.stop = $('<div class="bx-controls-auto-item"><a class="bx-stop" href="">' + slider.settings.stopText + '</a></div>');
|
703 |
+
// add the controls to the DOM
|
704 |
+
slider.controls.autoEl = $('<div class="bx-controls-auto" />');
|
705 |
+
// bind click actions to the controls
|
706 |
+
slider.controls.autoEl.on('click', '.bx-start', clickStartBind);
|
707 |
+
slider.controls.autoEl.on('click', '.bx-stop', clickStopBind);
|
708 |
+
// if autoControlsCombine, insert only the "start" control
|
709 |
+
if (slider.settings.autoControlsCombine) {
|
710 |
+
slider.controls.autoEl.append(slider.controls.start);
|
711 |
+
// if autoControlsCombine is false, insert both controls
|
712 |
+
} else {
|
713 |
+
slider.controls.autoEl.append(slider.controls.start).append(slider.controls.stop);
|
714 |
+
}
|
715 |
+
// if auto controls selector was supplied, populate it with the controls
|
716 |
+
if (slider.settings.autoControlsSelector) {
|
717 |
+
$(slider.settings.autoControlsSelector).html(slider.controls.autoEl);
|
718 |
+
// if auto controls selector was not supplied, add it after the wrapper
|
719 |
+
} else {
|
720 |
+
slider.controls.el.addClass('bx-has-controls-auto').append(slider.controls.autoEl);
|
721 |
+
}
|
722 |
+
// update the auto controls
|
723 |
+
updateAutoControls(slider.settings.autoStart ? 'stop' : 'start');
|
724 |
+
};
|
725 |
+
|
726 |
+
/**
|
727 |
+
* Appends image captions to the DOM
|
728 |
+
*/
|
729 |
+
var appendCaptions = function() {
|
730 |
+
// cycle through each child
|
731 |
+
slider.children.each(function(index) {
|
732 |
+
// get the image title attribute
|
733 |
+
var title = $(this).find('img:first').attr('title');
|
734 |
+
// append the caption
|
735 |
+
if (title !== undefined && ('' + title).length) {
|
736 |
+
$(this).append('<div class="bx-caption"><span>' + title + '</span></div>');
|
737 |
+
}
|
738 |
+
});
|
739 |
+
};
|
740 |
+
|
741 |
+
/**
|
742 |
+
* Click next binding
|
743 |
+
*
|
744 |
+
* @param e (event)
|
745 |
+
* - DOM event object
|
746 |
+
*/
|
747 |
+
var clickNextBind = function(e) {
|
748 |
+
e.preventDefault();
|
749 |
+
if (slider.controls.el.hasClass('disabled')) { return; }
|
750 |
+
// if auto show is running, stop it
|
751 |
+
if (slider.settings.auto && slider.settings.stopAutoOnClick) { el.stopAuto(); }
|
752 |
+
el.goToNextSlide();
|
753 |
+
};
|
754 |
+
|
755 |
+
/**
|
756 |
+
* Click prev binding
|
757 |
+
*
|
758 |
+
* @param e (event)
|
759 |
+
* - DOM event object
|
760 |
+
*/
|
761 |
+
var clickPrevBind = function(e) {
|
762 |
+
e.preventDefault();
|
763 |
+
if (slider.controls.el.hasClass('disabled')) { return; }
|
764 |
+
// if auto show is running, stop it
|
765 |
+
if (slider.settings.auto && slider.settings.stopAutoOnClick) { el.stopAuto(); }
|
766 |
+
el.goToPrevSlide();
|
767 |
+
};
|
768 |
+
|
769 |
+
/**
|
770 |
+
* Click start binding
|
771 |
+
*
|
772 |
+
* @param e (event)
|
773 |
+
* - DOM event object
|
774 |
+
*/
|
775 |
+
var clickStartBind = function(e) {
|
776 |
+
el.startAuto();
|
777 |
+
e.preventDefault();
|
778 |
+
};
|
779 |
+
|
780 |
+
/**
|
781 |
+
* Click stop binding
|
782 |
+
*
|
783 |
+
* @param e (event)
|
784 |
+
* - DOM event object
|
785 |
+
*/
|
786 |
+
var clickStopBind = function(e) {
|
787 |
+
el.stopAuto();
|
788 |
+
e.preventDefault();
|
789 |
+
};
|
790 |
+
|
791 |
+
/**
|
792 |
+
* Click pager binding
|
793 |
+
*
|
794 |
+
* @param e (event)
|
795 |
+
* - DOM event object
|
796 |
+
*/
|
797 |
+
var clickPagerBind = function(e) {
|
798 |
+
var pagerLink, pagerIndex;
|
799 |
+
e.preventDefault();
|
800 |
+
if (slider.controls.el.hasClass('disabled')) {
|
801 |
+
return;
|
802 |
+
}
|
803 |
+
// if auto show is running, stop it
|
804 |
+
if (slider.settings.auto && slider.settings.stopAutoOnClick) { el.stopAuto(); }
|
805 |
+
pagerLink = $(e.currentTarget);
|
806 |
+
if (pagerLink.attr('data-slide-index') !== undefined) {
|
807 |
+
pagerIndex = parseInt(pagerLink.attr('data-slide-index'));
|
808 |
+
// if clicked pager link is not active, continue with the goToSlide call
|
809 |
+
if (pagerIndex !== slider.active.index) { el.goToSlide(pagerIndex); }
|
810 |
+
}
|
811 |
+
};
|
812 |
+
|
813 |
+
/**
|
814 |
+
* Updates the pager links with an active class
|
815 |
+
*
|
816 |
+
* @param slideIndex (int)
|
817 |
+
* - index of slide to make active
|
818 |
+
*/
|
819 |
+
var updatePagerActive = function(slideIndex) {
|
820 |
+
// if "short" pager type
|
821 |
+
var len = slider.children.length; // nb of children
|
822 |
+
if (slider.settings.pagerType === 'short') {
|
823 |
+
if (slider.settings.maxSlides > 1) {
|
824 |
+
len = Math.ceil(slider.children.length / slider.settings.maxSlides);
|
825 |
+
}
|
826 |
+
slider.pagerEl.html((slideIndex + 1) + slider.settings.pagerShortSeparator + len);
|
827 |
+
return;
|
828 |
+
}
|
829 |
+
// remove all pager active classes
|
830 |
+
slider.pagerEl.find('a').removeClass('active');
|
831 |
+
// apply the active class for all pagers
|
832 |
+
slider.pagerEl.each(function(i, el) { $(el).find('a').eq(slideIndex).addClass('active'); });
|
833 |
+
};
|
834 |
+
|
835 |
+
/**
|
836 |
+
* Performs needed actions after a slide transition
|
837 |
+
*/
|
838 |
+
var updateAfterSlideTransition = function() {
|
839 |
+
// if infinite loop is true
|
840 |
+
if (slider.settings.infiniteLoop) {
|
841 |
+
var position = '';
|
842 |
+
// first slide
|
843 |
+
if (slider.active.index === 0) {
|
844 |
+
// set the new position
|
845 |
+
position = slider.children.eq(0).position();
|
846 |
+
// carousel, last slide
|
847 |
+
} else if (slider.active.index === getPagerQty() - 1 && slider.carousel) {
|
848 |
+
position = slider.children.eq((getPagerQty() - 1) * getMoveBy()).position();
|
849 |
+
// last slide
|
850 |
+
} else if (slider.active.index === slider.children.length - 1) {
|
851 |
+
position = slider.children.eq(slider.children.length - 1).position();
|
852 |
+
}
|
853 |
+
if (position) {
|
854 |
+
if (slider.settings.mode === 'horizontal') { setPositionProperty(-position.left, 'reset', 0); }
|
855 |
+
else if (slider.settings.mode === 'vertical') { setPositionProperty(-position.top, 'reset', 0); }
|
856 |
+
}
|
857 |
+
}
|
858 |
+
// declare that the transition is complete
|
859 |
+
slider.working = false;
|
860 |
+
// onSlideAfter callback
|
861 |
+
slider.settings.onSlideAfter.call(el, slider.children.eq(slider.active.index), slider.oldIndex, slider.active.index);
|
862 |
+
};
|
863 |
+
|
864 |
+
/**
|
865 |
+
* Updates the auto controls state (either active, or combined switch)
|
866 |
+
*
|
867 |
+
* @param state (string) "start", "stop"
|
868 |
+
* - the new state of the auto show
|
869 |
+
*/
|
870 |
+
var updateAutoControls = function(state) {
|
871 |
+
// if autoControlsCombine is true, replace the current control with the new state
|
872 |
+
if (slider.settings.autoControlsCombine) {
|
873 |
+
slider.controls.autoEl.html(slider.controls[state]);
|
874 |
+
// if autoControlsCombine is false, apply the "active" class to the appropriate control
|
875 |
+
} else {
|
876 |
+
slider.controls.autoEl.find('a').removeClass('active');
|
877 |
+
slider.controls.autoEl.find('a:not(.bx-' + state + ')').addClass('active');
|
878 |
+
}
|
879 |
+
};
|
880 |
+
|
881 |
+
/**
|
882 |
+
* Updates the direction controls (checks if either should be hidden)
|
883 |
+
*/
|
884 |
+
var updateDirectionControls = function() {
|
885 |
+
if (getPagerQty() === 1) {
|
886 |
+
slider.controls.prev.addClass('disabled');
|
887 |
+
slider.controls.next.addClass('disabled');
|
888 |
+
} else if (!slider.settings.infiniteLoop && slider.settings.hideControlOnEnd) {
|
889 |
+
// if first slide
|
890 |
+
if (slider.active.index === 0) {
|
891 |
+
slider.controls.prev.addClass('disabled');
|
892 |
+
slider.controls.next.removeClass('disabled');
|
893 |
+
// if last slide
|
894 |
+
} else if (slider.active.index === getPagerQty() - 1) {
|
895 |
+
slider.controls.next.addClass('disabled');
|
896 |
+
slider.controls.prev.removeClass('disabled');
|
897 |
+
// if any slide in the middle
|
898 |
+
} else {
|
899 |
+
slider.controls.prev.removeClass('disabled');
|
900 |
+
slider.controls.next.removeClass('disabled');
|
901 |
+
}
|
902 |
+
}
|
903 |
+
};
|
904 |
+
|
905 |
+
/**
|
906 |
+
* Initializes the auto process
|
907 |
+
*/
|
908 |
+
var initAuto = function() {
|
909 |
+
// if autoDelay was supplied, launch the auto show using a setTimeout() call
|
910 |
+
if (slider.settings.autoDelay > 0) {
|
911 |
+
var timeout = setTimeout(el.startAuto, slider.settings.autoDelay);
|
912 |
+
// if autoDelay was not supplied, start the auto show normally
|
913 |
+
} else {
|
914 |
+
el.startAuto();
|
915 |
+
|
916 |
+
//add focus and blur events to ensure its running if timeout gets paused
|
917 |
+
$(window).focus(function() {
|
918 |
+
el.startAuto();
|
919 |
+
}).blur(function() {
|
920 |
+
el.stopAuto();
|
921 |
+
});
|
922 |
+
}
|
923 |
+
// if autoHover is requested
|
924 |
+
if (slider.settings.autoHover) {
|
925 |
+
// on el hover
|
926 |
+
el.hover(function() {
|
927 |
+
// if the auto show is currently playing (has an active interval)
|
928 |
+
if (slider.interval) {
|
929 |
+
// stop the auto show and pass true argument which will prevent control update
|
930 |
+
el.stopAuto(true);
|
931 |
+
// create a new autoPaused value which will be used by the relative "mouseout" event
|
932 |
+
slider.autoPaused = true;
|
933 |
+
}
|
934 |
+
}, function() {
|
935 |
+
// if the autoPaused value was created be the prior "mouseover" event
|
936 |
+
if (slider.autoPaused) {
|
937 |
+
// start the auto show and pass true argument which will prevent control update
|
938 |
+
el.startAuto(true);
|
939 |
+
// reset the autoPaused value
|
940 |
+
slider.autoPaused = null;
|
941 |
+
}
|
942 |
+
});
|
943 |
+
}
|
944 |
+
};
|
945 |
+
|
946 |
+
/**
|
947 |
+
* Initializes the ticker process
|
948 |
+
*/
|
949 |
+
var initTicker = function() {
|
950 |
+
var startPosition = 0,
|
951 |
+
position, transform, value, idx, ratio, property, newSpeed, totalDimens;
|
952 |
+
// if autoDirection is "next", append a clone of the entire slider
|
953 |
+
if (slider.settings.autoDirection === 'next') {
|
954 |
+
el.append(slider.children.clone().addClass('bx-clone'));
|
955 |
+
// if autoDirection is "prev", prepend a clone of the entire slider, and set the left position
|
956 |
+
} else {
|
957 |
+
el.prepend(slider.children.clone().addClass('bx-clone'));
|
958 |
+
position = slider.children.first().position();
|
959 |
+
startPosition = slider.settings.mode === 'horizontal' ? -position.left : -position.top;
|
960 |
+
}
|
961 |
+
setPositionProperty(startPosition, 'reset', 0);
|
962 |
+
// do not allow controls in ticker mode
|
963 |
+
slider.settings.pager = false;
|
964 |
+
slider.settings.controls = false;
|
965 |
+
slider.settings.autoControls = false;
|
966 |
+
// if autoHover is requested
|
967 |
+
if (slider.settings.tickerHover) {
|
968 |
+
if (slider.usingCSS) {
|
969 |
+
idx = slider.settings.mode === 'horizontal' ? 4 : 5;
|
970 |
+
slider.viewport.hover(function() {
|
971 |
+
transform = el.css('-' + slider.cssPrefix + '-transform');
|
972 |
+
value = parseFloat(transform.split(',')[idx]);
|
973 |
+
setPositionProperty(value, 'reset', 0);
|
974 |
+
}, function() {
|
975 |
+
totalDimens = 0;
|
976 |
+
slider.children.each(function(index) {
|
977 |
+
totalDimens += slider.settings.mode === 'horizontal' ? $(this).outerWidth(true) : $(this).outerHeight(true);
|
978 |
+
});
|
979 |
+
// calculate the speed ratio (used to determine the new speed to finish the paused animation)
|
980 |
+
ratio = slider.settings.speed / totalDimens;
|
981 |
+
// determine which property to use
|
982 |
+
property = slider.settings.mode === 'horizontal' ? 'left' : 'top';
|
983 |
+
// calculate the new speed
|
984 |
+
newSpeed = ratio * (totalDimens - (Math.abs(parseInt(value))));
|
985 |
+
tickerLoop(newSpeed);
|
986 |
+
});
|
987 |
+
} else {
|
988 |
+
// on el hover
|
989 |
+
slider.viewport.hover(function() {
|
990 |
+
el.stop();
|
991 |
+
}, function() {
|
992 |
+
// calculate the total width of children (used to calculate the speed ratio)
|
993 |
+
totalDimens = 0;
|
994 |
+
slider.children.each(function(index) {
|
995 |
+
totalDimens += slider.settings.mode === 'horizontal' ? $(this).outerWidth(true) : $(this).outerHeight(true);
|
996 |
+
});
|
997 |
+
// calculate the speed ratio (used to determine the new speed to finish the paused animation)
|
998 |
+
ratio = slider.settings.speed / totalDimens;
|
999 |
+
// determine which property to use
|
1000 |
+
property = slider.settings.mode === 'horizontal' ? 'left' : 'top';
|
1001 |
+
// calculate the new speed
|
1002 |
+
newSpeed = ratio * (totalDimens - (Math.abs(parseInt(el.css(property)))));
|
1003 |
+
tickerLoop(newSpeed);
|
1004 |
+
});
|
1005 |
+
}
|
1006 |
+
}
|
1007 |
+
// start the ticker loop
|
1008 |
+
tickerLoop();
|
1009 |
+
};
|
1010 |
+
|
1011 |
+
/**
|
1012 |
+
* Runs a continuous loop, news ticker-style
|
1013 |
+
*/
|
1014 |
+
var tickerLoop = function(resumeSpeed) {
|
1015 |
+
var speed = resumeSpeed ? resumeSpeed : slider.settings.speed,
|
1016 |
+
position = {left: 0, top: 0},
|
1017 |
+
reset = {left: 0, top: 0},
|
1018 |
+
animateProperty, resetValue, params;
|
1019 |
+
|
1020 |
+
// if "next" animate left position to last child, then reset left to 0
|
1021 |
+
if (slider.settings.autoDirection === 'next') {
|
1022 |
+
position = el.find('.bx-clone').first().position();
|
1023 |
+
// if "prev" animate left position to 0, then reset left to first non-clone child
|
1024 |
+
} else {
|
1025 |
+
reset = slider.children.first().position();
|
1026 |
+
}
|
1027 |
+
animateProperty = slider.settings.mode === 'horizontal' ? -position.left : -position.top;
|
1028 |
+
resetValue = slider.settings.mode === 'horizontal' ? -reset.left : -reset.top;
|
1029 |
+
params = {resetValue: resetValue};
|
1030 |
+
setPositionProperty(animateProperty, 'ticker', speed, params);
|
1031 |
+
};
|
1032 |
+
|
1033 |
+
/**
|
1034 |
+
* Check if el is on screen
|
1035 |
+
*/
|
1036 |
+
var isOnScreen = function(el) {
|
1037 |
+
var win = $(window),
|
1038 |
+
viewport = {
|
1039 |
+
top: win.scrollTop(),
|
1040 |
+
left: win.scrollLeft()
|
1041 |
+
},
|
1042 |
+
bounds = el.offset();
|
1043 |
+
|
1044 |
+
viewport.right = viewport.left + win.width();
|
1045 |
+
viewport.bottom = viewport.top + win.height();
|
1046 |
+
bounds.right = bounds.left + el.outerWidth();
|
1047 |
+
bounds.bottom = bounds.top + el.outerHeight();
|
1048 |
+
|
1049 |
+
return (!(viewport.right < bounds.left || viewport.left > bounds.right || viewport.bottom < bounds.top || viewport.top > bounds.bottom));
|
1050 |
+
};
|
1051 |
+
|
1052 |
+
/**
|
1053 |
+
* Initializes keyboard events
|
1054 |
+
*/
|
1055 |
+
var keyPress = function(e) {
|
1056 |
+
var activeElementTag = document.activeElement.tagName.toLowerCase(),
|
1057 |
+
tagFilters = 'input|textarea',
|
1058 |
+
p = new RegExp(activeElementTag,['i']),
|
1059 |
+
result = p.exec(tagFilters);
|
1060 |
+
|
1061 |
+
if (result == null && isOnScreen(el)) {
|
1062 |
+
if (e.keyCode === 39) {
|
1063 |
+
clickNextBind(e);
|
1064 |
+
return false;
|
1065 |
+
} else if (e.keyCode === 37) {
|
1066 |
+
clickPrevBind(e);
|
1067 |
+
return false;
|
1068 |
+
}
|
1069 |
+
}
|
1070 |
+
};
|
1071 |
+
|
1072 |
+
/**
|
1073 |
+
* Initializes touch events
|
1074 |
+
*/
|
1075 |
+
var initTouch = function() {
|
1076 |
+
// initialize object to contain all touch values
|
1077 |
+
slider.touch = {
|
1078 |
+
start: {x: 0, y: 0},
|
1079 |
+
end: {x: 0, y: 0}
|
1080 |
+
};
|
1081 |
+
slider.viewport.bind('touchstart MSPointerDown pointerdown', onTouchStart);
|
1082 |
+
|
1083 |
+
//for browsers that have implemented pointer events and fire a click after
|
1084 |
+
//every pointerup regardless of whether pointerup is on same screen location as pointerdown or not
|
1085 |
+
slider.viewport.on('click', '.bxslider a', function(e) {
|
1086 |
+
if (slider.viewport.hasClass('click-disabled')) {
|
1087 |
+
e.preventDefault();
|
1088 |
+
slider.viewport.removeClass('click-disabled');
|
1089 |
+
}
|
1090 |
+
});
|
1091 |
+
};
|
1092 |
+
|
1093 |
+
/**
|
1094 |
+
* Event handler for "touchstart"
|
1095 |
+
*
|
1096 |
+
* @param e (event)
|
1097 |
+
* - DOM event object
|
1098 |
+
*/
|
1099 |
+
var onTouchStart = function(e) {
|
1100 |
+
//disable slider controls while user is interacting with slides to avoid slider freeze that happens on touch devices when a slide swipe happens immediately after interacting with slider controls
|
1101 |
+
slider.controls.el.addClass('disabled');
|
1102 |
+
|
1103 |
+
if (slider.working) {
|
1104 |
+
e.preventDefault();
|
1105 |
+
slider.controls.el.removeClass('disabled');
|
1106 |
+
} else {
|
1107 |
+
// record the original position when touch starts
|
1108 |
+
slider.touch.originalPos = el.position();
|
1109 |
+
var orig = e.originalEvent,
|
1110 |
+
touchPoints = (typeof orig.changedTouches !== 'undefined') ? orig.changedTouches : [orig];
|
1111 |
+
// record the starting touch x, y coordinates
|
1112 |
+
slider.touch.start.x = touchPoints[0].pageX;
|
1113 |
+
slider.touch.start.y = touchPoints[0].pageY;
|
1114 |
+
|
1115 |
+
if (slider.viewport.get(0).setPointerCapture) {
|
1116 |
+
slider.pointerId = orig.pointerId;
|
1117 |
+
slider.viewport.get(0).setPointerCapture(slider.pointerId);
|
1118 |
+
}
|
1119 |
+
// bind a "touchmove" event to the viewport
|
1120 |
+
slider.viewport.bind('touchmove MSPointerMove pointermove', onTouchMove);
|
1121 |
+
// bind a "touchend" event to the viewport
|
1122 |
+
slider.viewport.bind('touchend MSPointerUp pointerup', onTouchEnd);
|
1123 |
+
slider.viewport.bind('MSPointerCancel pointercancel', onPointerCancel);
|
1124 |
+
}
|
1125 |
+
};
|
1126 |
+
|
1127 |
+
/**
|
1128 |
+
* Cancel Pointer for Windows Phone
|
1129 |
+
*
|
1130 |
+
* @param e (event)
|
1131 |
+
* - DOM event object
|
1132 |
+
*/
|
1133 |
+
var onPointerCancel = function(e) {
|
1134 |
+
/* onPointerCancel handler is needed to deal with situations when a touchend
|
1135 |
+
doesn't fire after a touchstart (this happens on windows phones only) */
|
1136 |
+
setPositionProperty(slider.touch.originalPos.left, 'reset', 0);
|
1137 |
+
|
1138 |
+
//remove handlers
|
1139 |
+
slider.controls.el.removeClass('disabled');
|
1140 |
+
slider.viewport.unbind('MSPointerCancel pointercancel', onPointerCancel);
|
1141 |
+
slider.viewport.unbind('touchmove MSPointerMove pointermove', onTouchMove);
|
1142 |
+
slider.viewport.unbind('touchend MSPointerUp pointerup', onTouchEnd);
|
1143 |
+
if (slider.viewport.get(0).releasePointerCapture) {
|
1144 |
+
slider.viewport.get(0).releasePointerCapture(slider.pointerId);
|
1145 |
+
}
|
1146 |
+
};
|
1147 |
+
|
1148 |
+
/**
|
1149 |
+
* Event handler for "touchmove"
|
1150 |
+
*
|
1151 |
+
* @param e (event)
|
1152 |
+
* - DOM event object
|
1153 |
+
*/
|
1154 |
+
var onTouchMove = function(e) {
|
1155 |
+
var orig = e.originalEvent,
|
1156 |
+
touchPoints = (typeof orig.changedTouches !== 'undefined') ? orig.changedTouches : [orig],
|
1157 |
+
// if scrolling on y axis, do not prevent default
|
1158 |
+
xMovement = Math.abs(touchPoints[0].pageX - slider.touch.start.x),
|
1159 |
+
yMovement = Math.abs(touchPoints[0].pageY - slider.touch.start.y),
|
1160 |
+
value = 0,
|
1161 |
+
change = 0;
|
1162 |
+
|
1163 |
+
// x axis swipe
|
1164 |
+
if ((xMovement * 3) > yMovement && slider.settings.preventDefaultSwipeX) {
|
1165 |
+
e.preventDefault();
|
1166 |
+
// y axis swipe
|
1167 |
+
} else if ((yMovement * 3) > xMovement && slider.settings.preventDefaultSwipeY) {
|
1168 |
+
e.preventDefault();
|
1169 |
+
}
|
1170 |
+
if (slider.settings.mode !== 'fade' && slider.settings.oneToOneTouch) {
|
1171 |
+
// if horizontal, drag along x axis
|
1172 |
+
if (slider.settings.mode === 'horizontal') {
|
1173 |
+
change = touchPoints[0].pageX - slider.touch.start.x;
|
1174 |
+
value = slider.touch.originalPos.left + change;
|
1175 |
+
// if vertical, drag along y axis
|
1176 |
+
} else {
|
1177 |
+
change = touchPoints[0].pageY - slider.touch.start.y;
|
1178 |
+
value = slider.touch.originalPos.top + change;
|
1179 |
+
}
|
1180 |
+
setPositionProperty(value, 'reset', 0);
|
1181 |
+
}
|
1182 |
+
};
|
1183 |
+
|
1184 |
+
/**
|
1185 |
+
* Event handler for "touchend"
|
1186 |
+
*
|
1187 |
+
* @param e (event)
|
1188 |
+
* - DOM event object
|
1189 |
+
*/
|
1190 |
+
var onTouchEnd = function(e) {
|
1191 |
+
slider.viewport.unbind('touchmove MSPointerMove pointermove', onTouchMove);
|
1192 |
+
//enable slider controls as soon as user stops interacing with slides
|
1193 |
+
slider.controls.el.removeClass('disabled');
|
1194 |
+
var orig = e.originalEvent,
|
1195 |
+
touchPoints = (typeof orig.changedTouches !== 'undefined') ? orig.changedTouches : [orig],
|
1196 |
+
value = 0,
|
1197 |
+
distance = 0;
|
1198 |
+
// record end x, y positions
|
1199 |
+
slider.touch.end.x = touchPoints[0].pageX;
|
1200 |
+
slider.touch.end.y = touchPoints[0].pageY;
|
1201 |
+
// if fade mode, check if absolute x distance clears the threshold
|
1202 |
+
if (slider.settings.mode === 'fade') {
|
1203 |
+
distance = Math.abs(slider.touch.start.x - slider.touch.end.x);
|
1204 |
+
if (distance >= slider.settings.swipeThreshold) {
|
1205 |
+
if (slider.touch.start.x > slider.touch.end.x) {
|
1206 |
+
el.goToNextSlide();
|
1207 |
+
} else {
|
1208 |
+
el.goToPrevSlide();
|
1209 |
+
}
|
1210 |
+
el.stopAuto();
|
1211 |
+
}
|
1212 |
+
// not fade mode
|
1213 |
+
} else {
|
1214 |
+
// calculate distance and el's animate property
|
1215 |
+
if (slider.settings.mode === 'horizontal') {
|
1216 |
+
distance = slider.touch.end.x - slider.touch.start.x;
|
1217 |
+
value = slider.touch.originalPos.left;
|
1218 |
+
} else {
|
1219 |
+
distance = slider.touch.end.y - slider.touch.start.y;
|
1220 |
+
value = slider.touch.originalPos.top;
|
1221 |
+
}
|
1222 |
+
// if not infinite loop and first / last slide, do not attempt a slide transition
|
1223 |
+
if (!slider.settings.infiniteLoop && ((slider.active.index === 0 && distance > 0) || (slider.active.last && distance < 0))) {
|
1224 |
+
setPositionProperty(value, 'reset', 200);
|
1225 |
+
} else {
|
1226 |
+
// check if distance clears threshold
|
1227 |
+
if (Math.abs(distance) >= slider.settings.swipeThreshold) {
|
1228 |
+
if (distance < 0) {
|
1229 |
+
el.goToNextSlide();
|
1230 |
+
} else {
|
1231 |
+
el.goToPrevSlide();
|
1232 |
+
}
|
1233 |
+
el.stopAuto();
|
1234 |
+
} else {
|
1235 |
+
// el.animate(property, 200);
|
1236 |
+
setPositionProperty(value, 'reset', 200);
|
1237 |
+
}
|
1238 |
+
}
|
1239 |
+
}
|
1240 |
+
slider.viewport.unbind('touchend MSPointerUp pointerup', onTouchEnd);
|
1241 |
+
if (slider.viewport.get(0).releasePointerCapture) {
|
1242 |
+
slider.viewport.get(0).releasePointerCapture(slider.pointerId);
|
1243 |
+
}
|
1244 |
+
};
|
1245 |
+
|
1246 |
+
/**
|
1247 |
+
* Window resize event callback
|
1248 |
+
*/
|
1249 |
+
var resizeWindow = function(e) {
|
1250 |
+
// don't do anything if slider isn't initialized.
|
1251 |
+
if (!slider.initialized) { return; }
|
1252 |
+
// Delay if slider working.
|
1253 |
+
if (slider.working) {
|
1254 |
+
window.setTimeout(resizeWindow, 10);
|
1255 |
+
} else {
|
1256 |
+
// get the new window dimens (again, thank you IE)
|
1257 |
+
var windowWidthNew = $(window).width(),
|
1258 |
+
windowHeightNew = $(window).height();
|
1259 |
+
// make sure that it is a true window resize
|
1260 |
+
// *we must check this because our dinosaur friend IE fires a window resize event when certain DOM elements
|
1261 |
+
// are resized. Can you just die already?*
|
1262 |
+
if (windowWidth !== windowWidthNew || windowHeight !== windowHeightNew) {
|
1263 |
+
// set the new window dimens
|
1264 |
+
windowWidth = windowWidthNew;
|
1265 |
+
windowHeight = windowHeightNew;
|
1266 |
+
// update all dynamic elements
|
1267 |
+
el.redrawSlider();
|
1268 |
+
// Call user resize handler
|
1269 |
+
slider.settings.onSliderResize.call(el, slider.active.index);
|
1270 |
+
}
|
1271 |
+
}
|
1272 |
+
};
|
1273 |
+
|
1274 |
+
/**
|
1275 |
+
* Adds an aria-hidden=true attribute to each element
|
1276 |
+
*
|
1277 |
+
* @param startVisibleIndex (int)
|
1278 |
+
* - the first visible element's index
|
1279 |
+
*/
|
1280 |
+
var applyAriaHiddenAttributes = function(startVisibleIndex) {
|
1281 |
+
var numberOfSlidesShowing = getNumberSlidesShowing();
|
1282 |
+
// only apply attributes if the setting is enabled and not in ticker mode
|
1283 |
+
if (slider.settings.ariaHidden && !slider.settings.ticker) {
|
1284 |
+
// add aria-hidden=true to all elements
|
1285 |
+
slider.children.attr('aria-hidden', 'true');
|
1286 |
+
// get the visible elements and change to aria-hidden=false
|
1287 |
+
slider.children.slice(startVisibleIndex, startVisibleIndex + numberOfSlidesShowing).attr('aria-hidden', 'false');
|
1288 |
+
}
|
1289 |
+
};
|
1290 |
+
|
1291 |
+
/**
|
1292 |
+
* Returns index according to present page range
|
1293 |
+
*
|
1294 |
+
* @param slideOndex (int)
|
1295 |
+
* - the desired slide index
|
1296 |
+
*/
|
1297 |
+
var setSlideIndex = function(slideIndex) {
|
1298 |
+
if (slideIndex < 0) {
|
1299 |
+
if (slider.settings.infiniteLoop) {
|
1300 |
+
return getPagerQty() - 1;
|
1301 |
+
}else {
|
1302 |
+
//we don't go to undefined slides
|
1303 |
+
return slider.active.index;
|
1304 |
+
}
|
1305 |
+
// if slideIndex is greater than children length, set active index to 0 (this happens during infinite loop)
|
1306 |
+
} else if (slideIndex >= getPagerQty()) {
|
1307 |
+
if (slider.settings.infiniteLoop) {
|
1308 |
+
return 0;
|
1309 |
+
} else {
|
1310 |
+
//we don't move to undefined pages
|
1311 |
+
return slider.active.index;
|
1312 |
+
}
|
1313 |
+
// set active index to requested slide
|
1314 |
+
} else {
|
1315 |
+
return slideIndex;
|
1316 |
+
}
|
1317 |
+
};
|
1318 |
+
|
1319 |
+
/**
|
1320 |
+
* ===================================================================================
|
1321 |
+
* = PUBLIC FUNCTIONS
|
1322 |
+
* ===================================================================================
|
1323 |
+
*/
|
1324 |
+
|
1325 |
+
/**
|
1326 |
+
* Performs slide transition to the specified slide
|
1327 |
+
*
|
1328 |
+
* @param slideIndex (int)
|
1329 |
+
* - the destination slide's index (zero-based)
|
1330 |
+
*
|
1331 |
+
* @param direction (string)
|
1332 |
+
* - INTERNAL USE ONLY - the direction of travel ("prev" / "next")
|
1333 |
+
*/
|
1334 |
+
el.goToSlide = function(slideIndex, direction) {
|
1335 |
+
// onSlideBefore, onSlideNext, onSlidePrev callbacks
|
1336 |
+
// Allow transition canceling based on returned value
|
1337 |
+
var performTransition = true,
|
1338 |
+
moveBy = 0,
|
1339 |
+
position = {left: 0, top: 0},
|
1340 |
+
lastChild = null,
|
1341 |
+
lastShowingIndex, eq, value, requestEl;
|
1342 |
+
// store the old index
|
1343 |
+
slider.oldIndex = slider.active.index;
|
1344 |
+
//set new index
|
1345 |
+
slider.active.index = setSlideIndex(slideIndex);
|
1346 |
+
|
1347 |
+
// if plugin is currently in motion, ignore request
|
1348 |
+
if (slider.working || slider.active.index === slider.oldIndex) { return; }
|
1349 |
+
// declare that plugin is in motion
|
1350 |
+
slider.working = true;
|
1351 |
+
|
1352 |
+
performTransition = slider.settings.onSlideBefore.call(el, slider.children.eq(slider.active.index), slider.oldIndex, slider.active.index);
|
1353 |
+
|
1354 |
+
// If transitions canceled, reset and return
|
1355 |
+
if (typeof (performTransition) !== 'undefined' && !performTransition) {
|
1356 |
+
slider.active.index = slider.oldIndex; // restore old index
|
1357 |
+
slider.working = false; // is not in motion
|
1358 |
+
return;
|
1359 |
+
}
|
1360 |
+
|
1361 |
+
if (direction === 'next') {
|
1362 |
+
// Prevent canceling in future functions or lack there-of from negating previous commands to cancel
|
1363 |
+
if (!slider.settings.onSlideNext.call(el, slider.children.eq(slider.active.index), slider.oldIndex, slider.active.index)) {
|
1364 |
+
performTransition = false;
|
1365 |
+
}
|
1366 |
+
} else if (direction === 'prev') {
|
1367 |
+
// Prevent canceling in future functions or lack there-of from negating previous commands to cancel
|
1368 |
+
if (!slider.settings.onSlidePrev.call(el, slider.children.eq(slider.active.index), slider.oldIndex, slider.active.index)) {
|
1369 |
+
performTransition = false;
|
1370 |
+
}
|
1371 |
+
}
|
1372 |
+
|
1373 |
+
// check if last slide
|
1374 |
+
slider.active.last = slider.active.index >= getPagerQty() - 1;
|
1375 |
+
// update the pager with active class
|
1376 |
+
if (slider.settings.pager || slider.settings.pagerCustom) { updatePagerActive(slider.active.index); }
|
1377 |
+
// // check for direction control update
|
1378 |
+
if (slider.settings.controls) { updateDirectionControls(); }
|
1379 |
+
// if slider is set to mode: "fade"
|
1380 |
+
if (slider.settings.mode === 'fade') {
|
1381 |
+
// if adaptiveHeight is true and next height is different from current height, animate to the new height
|
1382 |
+
if (slider.settings.adaptiveHeight && slider.viewport.height() !== getViewportHeight()) {
|
1383 |
+
slider.viewport.animate({height: getViewportHeight()}, slider.settings.adaptiveHeightSpeed);
|
1384 |
+
}
|
1385 |
+
// fade out the visible child and reset its z-index value
|
1386 |
+
slider.children.filter(':visible').fadeOut(slider.settings.speed).css({zIndex: 0});
|
1387 |
+
// fade in the newly requested slide
|
1388 |
+
slider.children.eq(slider.active.index).css('zIndex', slider.settings.slideZIndex + 1).fadeIn(slider.settings.speed, function() {
|
1389 |
+
$(this).css('zIndex', slider.settings.slideZIndex);
|
1390 |
+
updateAfterSlideTransition();
|
1391 |
+
});
|
1392 |
+
// slider mode is not "fade"
|
1393 |
+
} else {
|
1394 |
+
// if adaptiveHeight is true and next height is different from current height, animate to the new height
|
1395 |
+
if (slider.settings.adaptiveHeight && slider.viewport.height() !== getViewportHeight()) {
|
1396 |
+
slider.viewport.animate({height: getViewportHeight()}, slider.settings.adaptiveHeightSpeed);
|
1397 |
+
}
|
1398 |
+
// if carousel and not infinite loop
|
1399 |
+
if (!slider.settings.infiniteLoop && slider.carousel && slider.active.last) {
|
1400 |
+
if (slider.settings.mode === 'horizontal') {
|
1401 |
+
// get the last child position
|
1402 |
+
lastChild = slider.children.eq(slider.children.length - 1);
|
1403 |
+
position = lastChild.position();
|
1404 |
+
// calculate the position of the last slide
|
1405 |
+
moveBy = slider.viewport.width() - lastChild.outerWidth();
|
1406 |
+
} else {
|
1407 |
+
// get last showing index position
|
1408 |
+
lastShowingIndex = slider.children.length - slider.settings.minSlides;
|
1409 |
+
position = slider.children.eq(lastShowingIndex).position();
|
1410 |
+
}
|
1411 |
+
// horizontal carousel, going previous while on first slide (infiniteLoop mode)
|
1412 |
+
} else if (slider.carousel && slider.active.last && direction === 'prev') {
|
1413 |
+
// get the last child position
|
1414 |
+
eq = slider.settings.moveSlides === 1 ? slider.settings.maxSlides - getMoveBy() : ((getPagerQty() - 1) * getMoveBy()) - (slider.children.length - slider.settings.maxSlides);
|
1415 |
+
lastChild = el.children('.bx-clone').eq(eq);
|
1416 |
+
position = lastChild.position();
|
1417 |
+
// if infinite loop and "Next" is clicked on the last slide
|
1418 |
+
} else if (direction === 'next' && slider.active.index === 0) {
|
1419 |
+
// get the last clone position
|
1420 |
+
position = el.find('> .bx-clone').eq(slider.settings.maxSlides).position();
|
1421 |
+
slider.active.last = false;
|
1422 |
+
// normal non-zero requests
|
1423 |
+
} else if (slideIndex >= 0) {
|
1424 |
+
//parseInt is applied to allow floats for slides/page
|
1425 |
+
requestEl = slideIndex * parseInt(getMoveBy());
|
1426 |
+
position = slider.children.eq(requestEl).position();
|
1427 |
+
}
|
1428 |
+
|
1429 |
+
/* If the position doesn't exist
|
1430 |
+
* (e.g. if you destroy the slider on a next click),
|
1431 |
+
* it doesn't throw an error.
|
1432 |
+
*/
|
1433 |
+
if (typeof (position) !== 'undefined') {
|
1434 |
+
value = slider.settings.mode === 'horizontal' ? -(position.left - moveBy) : -position.top;
|
1435 |
+
// plugin values to be animated
|
1436 |
+
setPositionProperty(value, 'slide', slider.settings.speed);
|
1437 |
+
} else {
|
1438 |
+
slider.working = false;
|
1439 |
+
}
|
1440 |
+
}
|
1441 |
+
if (slider.settings.ariaHidden) { applyAriaHiddenAttributes(slider.active.index * getMoveBy()); }
|
1442 |
+
};
|
1443 |
+
|
1444 |
+
/**
|
1445 |
+
* Transitions to the next slide in the show
|
1446 |
+
*/
|
1447 |
+
el.goToNextSlide = function() {
|
1448 |
+
// if infiniteLoop is false and last page is showing, disregard call
|
1449 |
+
if (!slider.settings.infiniteLoop && slider.active.last) { return; }
|
1450 |
+
var pagerIndex = parseInt(slider.active.index) + 1;
|
1451 |
+
el.goToSlide(pagerIndex, 'next');
|
1452 |
+
};
|
1453 |
+
|
1454 |
+
/**
|
1455 |
+
* Transitions to the prev slide in the show
|
1456 |
+
*/
|
1457 |
+
el.goToPrevSlide = function() {
|
1458 |
+
// if infiniteLoop is false and last page is showing, disregard call
|
1459 |
+
if (!slider.settings.infiniteLoop && slider.active.index === 0) { return; }
|
1460 |
+
var pagerIndex = parseInt(slider.active.index) - 1;
|
1461 |
+
el.goToSlide(pagerIndex, 'prev');
|
1462 |
+
};
|
1463 |
+
|
1464 |
+
/**
|
1465 |
+
* Starts the auto show
|
1466 |
+
*
|
1467 |
+
* @param preventControlUpdate (boolean)
|
1468 |
+
* - if true, auto controls state will not be updated
|
1469 |
+
*/
|
1470 |
+
el.startAuto = function(preventControlUpdate) {
|
1471 |
+
// if an interval already exists, disregard call
|
1472 |
+
if (slider.interval) { return; }
|
1473 |
+
// create an interval
|
1474 |
+
slider.interval = setInterval(function() {
|
1475 |
+
if (slider.settings.autoDirection === 'next') {
|
1476 |
+
el.goToNextSlide();
|
1477 |
+
} else {
|
1478 |
+
el.goToPrevSlide();
|
1479 |
+
}
|
1480 |
+
}, slider.settings.pause);
|
1481 |
+
// if auto controls are displayed and preventControlUpdate is not true
|
1482 |
+
if (slider.settings.autoControls && preventControlUpdate !== true) { updateAutoControls('stop'); }
|
1483 |
+
};
|
1484 |
+
|
1485 |
+
/**
|
1486 |
+
* Stops the auto show
|
1487 |
+
*
|
1488 |
+
* @param preventControlUpdate (boolean)
|
1489 |
+
* - if true, auto controls state will not be updated
|
1490 |
+
*/
|
1491 |
+
el.stopAuto = function(preventControlUpdate) {
|
1492 |
+
// if no interval exists, disregard call
|
1493 |
+
if (!slider.interval) { return; }
|
1494 |
+
// clear the interval
|
1495 |
+
clearInterval(slider.interval);
|
1496 |
+
slider.interval = null;
|
1497 |
+
// if auto controls are displayed and preventControlUpdate is not true
|
1498 |
+
if (slider.settings.autoControls && preventControlUpdate !== true) { updateAutoControls('start'); }
|
1499 |
+
};
|
1500 |
+
|
1501 |
+
/**
|
1502 |
+
* Returns current slide index (zero-based)
|
1503 |
+
*/
|
1504 |
+
el.getCurrentSlide = function() {
|
1505 |
+
return slider.active.index;
|
1506 |
+
};
|
1507 |
+
|
1508 |
+
/**
|
1509 |
+
* Returns current slide element
|
1510 |
+
*/
|
1511 |
+
el.getCurrentSlideElement = function() {
|
1512 |
+
return slider.children.eq(slider.active.index);
|
1513 |
+
};
|
1514 |
+
|
1515 |
+
/**
|
1516 |
+
* Returns a slide element
|
1517 |
+
* @param index (int)
|
1518 |
+
* - The index (zero-based) of the element you want returned.
|
1519 |
+
*/
|
1520 |
+
el.getSlideElement = function(index) {
|
1521 |
+
return slider.children.eq(index);
|
1522 |
+
};
|
1523 |
+
|
1524 |
+
/**
|
1525 |
+
* Returns number of slides in show
|
1526 |
+
*/
|
1527 |
+
el.getSlideCount = function() {
|
1528 |
+
return slider.children.length;
|
1529 |
+
};
|
1530 |
+
|
1531 |
+
/**
|
1532 |
+
* Return slider.working variable
|
1533 |
+
*/
|
1534 |
+
el.isWorking = function() {
|
1535 |
+
return slider.working;
|
1536 |
+
};
|
1537 |
+
|
1538 |
+
/**
|
1539 |
+
* Update all dynamic slider elements
|
1540 |
+
*/
|
1541 |
+
el.redrawSlider = function() {
|
1542 |
+
// resize all children in ratio to new screen size
|
1543 |
+
slider.children.add(el.find('.bx-clone')).outerWidth(getSlideWidth());
|
1544 |
+
// adjust the height
|
1545 |
+
slider.viewport.css('height', getViewportHeight());
|
1546 |
+
// update the slide position
|
1547 |
+
if (!slider.settings.ticker) { setSlidePosition(); }
|
1548 |
+
// if active.last was true before the screen resize, we want
|
1549 |
+
// to keep it last no matter what screen size we end on
|
1550 |
+
if (slider.active.last) { slider.active.index = getPagerQty() - 1; }
|
1551 |
+
// if the active index (page) no longer exists due to the resize, simply set the index as last
|
1552 |
+
if (slider.active.index >= getPagerQty()) { slider.active.last = true; }
|
1553 |
+
// if a pager is being displayed and a custom pager is not being used, update it
|
1554 |
+
if (slider.settings.pager && !slider.settings.pagerCustom) {
|
1555 |
+
populatePager();
|
1556 |
+
updatePagerActive(slider.active.index);
|
1557 |
+
}
|
1558 |
+
if (slider.settings.ariaHidden) { applyAriaHiddenAttributes(slider.active.index * getMoveBy()); }
|
1559 |
+
};
|
1560 |
+
|
1561 |
+
/**
|
1562 |
+
* Destroy the current instance of the slider (revert everything back to original state)
|
1563 |
+
*/
|
1564 |
+
el.destroySlider = function() {
|
1565 |
+
// don't do anything if slider has already been destroyed
|
1566 |
+
if (!slider.initialized) { return; }
|
1567 |
+
slider.initialized = false;
|
1568 |
+
$('.bx-clone', this).remove();
|
1569 |
+
slider.children.each(function() {
|
1570 |
+
if ($(this).data('origStyle') !== undefined) {
|
1571 |
+
$(this).attr('style', $(this).data('origStyle'));
|
1572 |
+
} else {
|
1573 |
+
$(this).removeAttr('style');
|
1574 |
+
}
|
1575 |
+
});
|
1576 |
+
if ($(this).data('origStyle') !== undefined) {
|
1577 |
+
this.attr('style', $(this).data('origStyle'));
|
1578 |
+
} else {
|
1579 |
+
$(this).removeAttr('style');
|
1580 |
+
}
|
1581 |
+
$(this).unwrap().unwrap();
|
1582 |
+
if (slider.controls.el) { slider.controls.el.remove(); }
|
1583 |
+
if (slider.controls.next) { slider.controls.next.remove(); }
|
1584 |
+
if (slider.controls.prev) { slider.controls.prev.remove(); }
|
1585 |
+
if (slider.pagerEl && slider.settings.controls && !slider.settings.pagerCustom) { slider.pagerEl.remove(); }
|
1586 |
+
$('.bx-caption', this).remove();
|
1587 |
+
if (slider.controls.autoEl) { slider.controls.autoEl.remove(); }
|
1588 |
+
clearInterval(slider.interval);
|
1589 |
+
if (slider.settings.responsive) { $(window).unbind('resize', resizeWindow); }
|
1590 |
+
if (slider.settings.keyboardEnabled) { $(document).unbind('keydown', keyPress); }
|
1591 |
+
//remove self reference in data
|
1592 |
+
$(this).removeData('bxSlider');
|
1593 |
+
};
|
1594 |
+
|
1595 |
+
/**
|
1596 |
+
* Reload the slider (revert all DOM changes, and re-initialize)
|
1597 |
+
*/
|
1598 |
+
el.reloadSlider = function(settings) {
|
1599 |
+
if (settings !== undefined) { options = settings; }
|
1600 |
+
el.destroySlider();
|
1601 |
+
init();
|
1602 |
+
//store reference to self in order to access public functions later
|
1603 |
+
$(el).data('bxSlider', this);
|
1604 |
+
};
|
1605 |
+
|
1606 |
+
init();
|
1607 |
+
|
1608 |
+
$(el).data('bxSlider', this);
|
1609 |
+
|
1610 |
+
// returns the current jQuery object
|
1611 |
+
return this;
|
1612 |
+
};
|
1613 |
|
1614 |
})(jQuery);
|
includes/libraries/bxslider-4/dist/jquery.bxslider.min.js
CHANGED
@@ -1,10 +1,9 @@
|
|
1 |
-
|
2 |
-
*
|
3 |
-
*
|
4 |
-
*
|
5 |
-
* Copyright 2014, Steven Wanderski - http://stevenwanderski.com - http://bxcreative.com
|
6 |
* Written while drinking Belgian ales and listening to jazz
|
7 |
-
|
8 |
-
*
|
9 |
-
|
10 |
-
!function(e){var t={mode:"horizontal",slideSelector:"",infiniteLoop:!0,hideControlOnEnd:!1,speed:500,easing:null,slideMargin:0,startSlide:0,randomStart:!1,captions:!1,ticker:!1,tickerHover:!1,adaptiveHeight:!1,adaptiveHeightSpeed:500,video:!1,useCSS:!0,preloadImages:"visible",responsive:!0,slideZIndex:50,wrapperClass:"bx-wrapper",touchEnabled:!0,swipeThreshold:50,oneToOneTouch:!0,preventDefaultSwipeX:!0,preventDefaultSwipeY:!1,keyboardEnabled:!1,pager:!0,pagerType:"full",pagerShortSeparator:" / ",pagerSelector:null,buildPager:null,pagerCustom:null,controls:!0,nextText:"Next",prevText:"Prev",nextSelector:null,prevSelector:null,autoControls:!1,startText:"Start",stopText:"Stop",autoControlsCombine:!1,autoControlsSelector:null,auto:!1,pause:4e3,autoStart:!0,autoDirection:"next",autoHover:!1,autoDelay:0,autoSlideForOnePage:!1,minSlides:1,maxSlides:1,moveSlides:0,slideWidth:0,onSliderLoad:function(){return!0},onSlideBefore:function(){return!0},onSlideAfter:function(){return!0},onSlideNext:function(){return!0},onSlidePrev:function(){return!0},onSliderResize:function(){return!0}};e.fn.bxSlider=function(n){if(0===this.length)return this;if(this.length>1)return this.each(function(){e(this).bxSlider(n)}),this;var s={},o=this,r=e(window).width(),a=e(window).height(),l=function(){s.settings=e.extend({},t,n),s.settings.slideWidth=parseInt(s.settings.slideWidth),s.children=o.children(s.settings.slideSelector),s.children.length<s.settings.minSlides&&(s.settings.minSlides=s.children.length),s.children.length<s.settings.maxSlides&&(s.settings.maxSlides=s.children.length),s.settings.randomStart&&(s.settings.startSlide=Math.floor(Math.random()*s.children.length)),s.active={index:s.settings.startSlide},s.carousel=s.settings.minSlides>1||s.settings.maxSlides>1?!0:!1,s.carousel&&(s.settings.preloadImages="all"),s.minThreshold=s.settings.minSlides*s.settings.slideWidth+(s.settings.minSlides-1)*s.settings.slideMargin,s.maxThreshold=s.settings.maxSlides*s.settings.slideWidth+(s.settings.maxSlides-1)*s.settings.slideMargin,s.working=!1,s.controls={},s.interval=null,s.animProp="vertical"===s.settings.mode?"top":"left",s.usingCSS=s.settings.useCSS&&"fade"!==s.settings.mode&&function(){var e=document.createElement("div"),t=["WebkitPerspective","MozPerspective","OPerspective","msPerspective"];for(var i in t)if(void 0!==e.style[t[i]])return s.cssPrefix=t[i].replace("Perspective","").toLowerCase(),s.animProp="-"+s.cssPrefix+"-transform",!0;return!1}(),"vertical"===s.settings.mode&&(s.settings.maxSlides=s.settings.minSlides),o.data("origStyle",o.attr("style")),o.children(s.settings.slideSelector).each(function(){e(this).data("origStyle",e(this).attr("style"))}),d()},d=function(){o.wrap('<div class="'+s.settings.wrapperClass+'"><div class="bx-viewport"></div></div>'),s.viewport=o.parent(),s.loader=e('<div class="bx-loading" />'),s.viewport.prepend(s.loader),o.css({width:"horizontal"===s.settings.mode?1e3*s.children.length+215+"%":"auto",position:"absolute"}),s.usingCSS&&s.settings.easing?o.css("-"+s.cssPrefix+"-transition-timing-function",s.settings.easing):s.settings.easing||(s.settings.easing="swing");v();s.viewport.css({width:"100%",overflow:"hidden",position:"relative"}),s.viewport.parent().css({maxWidth:u()}),s.settings.pager||s.settings.controls||s.viewport.parent().css({margin:"0 auto 0px"}),s.children.css({"float":"horizontal"===s.settings.mode?"left":"none",listStyle:"none",position:"relative"}),s.children.css("width",h()),"horizontal"===s.settings.mode&&s.settings.slideMargin>0&&s.children.css("marginRight",s.settings.slideMargin),"vertical"===s.settings.mode&&s.settings.slideMargin>0&&s.children.css("marginBottom",s.settings.slideMargin),"fade"===s.settings.mode&&(s.children.css({position:"absolute",zIndex:0,display:"none"}),s.children.eq(s.settings.startSlide).css({zIndex:s.settings.slideZIndex,display:"block"})),s.controls.el=e('<div class="bx-controls" />'),s.settings.captions&&P(),s.active.last=s.settings.startSlide===f()-1,s.settings.video&&o.fitVids();var t=s.children.eq(s.settings.startSlide);("all"===s.settings.preloadImages||s.settings.ticker)&&(t=s.children),s.settings.ticker?s.settings.pager=!1:(s.settings.controls&&C(),s.settings.auto&&s.settings.autoControls&&T(),s.settings.pager&&w(),(s.settings.controls||s.settings.autoControls||s.settings.pager)&&s.viewport.after(s.controls.el)),c(t,g)},c=function(t,i){var n=t.find('img:not([src=""]), iframe').length;if(0===n)return void i();var s=0;t.find('img:not([src=""]), iframe').each(function(){e(this).one("load error",function(){++s===n&&i()}).each(function(){this.complete&&e(this).load()})})},g=function(){if(s.settings.infiniteLoop&&"fade"!==s.settings.mode&&!s.settings.ticker){var t="vertical"===s.settings.mode?s.settings.minSlides:s.settings.maxSlides,i=s.children.slice(0,t).clone(!0).addClass("bx-clone"),n=s.children.slice(-t).clone(!0).addClass("bx-clone");o.append(i).prepend(n)}s.loader.remove(),m(),"vertical"===s.settings.mode&&(s.settings.adaptiveHeight=!0),s.viewport.height(p()),o.redrawSlider(),s.settings.onSliderLoad(s,s.active.index),s.initialized=!0,s.settings.responsive&&e(window).bind("resize",Z),s.settings.auto&&s.settings.autoStart&&(f()>1||s.settings.autoSlideForOnePage)&&A(),s.settings.ticker&&H(),s.settings.pager&&I(s.settings.startSlide),s.settings.controls&&W(),s.settings.touchEnabled&&!s.settings.ticker&&O(),s.settings.keyboardEnabled&&!s.settings.ticker&&e(document).keydown(N)},p=function(){var t=0,n=e();if("vertical"===s.settings.mode||s.settings.adaptiveHeight)if(s.carousel){var o=1===s.settings.moveSlides?s.active.index:s.active.index*x();for(n=s.children.eq(o),i=1;i<=s.settings.maxSlides-1;i++)n=n.add(o+i>=s.children.length?s.children.eq(i-1):s.children.eq(o+i))}else n=s.children.eq(s.active.index);else n=s.children;return"vertical"===s.settings.mode?(n.each(function(){t+=e(this).outerHeight()}),s.settings.slideMargin>0&&(t+=s.settings.slideMargin*(s.settings.minSlides-1))):t=Math.max.apply(Math,n.map(function(){return e(this).outerHeight(!1)}).get()),"border-box"===s.viewport.css("box-sizing")?t+=parseFloat(s.viewport.css("padding-top"))+parseFloat(s.viewport.css("padding-bottom"))+parseFloat(s.viewport.css("border-top-width"))+parseFloat(s.viewport.css("border-bottom-width")):"padding-box"===s.viewport.css("box-sizing")&&(t+=parseFloat(s.viewport.css("padding-top"))+parseFloat(s.viewport.css("padding-bottom"))),t},u=function(){var e="100%";return s.settings.slideWidth>0&&(e="horizontal"===s.settings.mode?s.settings.maxSlides*s.settings.slideWidth+(s.settings.maxSlides-1)*s.settings.slideMargin:s.settings.slideWidth),e},h=function(){var e=s.settings.slideWidth,t=s.viewport.width();return 0===s.settings.slideWidth||s.settings.slideWidth>t&&!s.carousel||"vertical"===s.settings.mode?e=t:s.settings.maxSlides>1&&"horizontal"===s.settings.mode&&(t>s.maxThreshold||t<s.minThreshold&&(e=(t-s.settings.slideMargin*(s.settings.minSlides-1))/s.settings.minSlides)),e},v=function(){var e=1;if("horizontal"===s.settings.mode&&s.settings.slideWidth>0)if(s.viewport.width()<s.minThreshold)e=s.settings.minSlides;else if(s.viewport.width()>s.maxThreshold)e=s.settings.maxSlides;else{var t=s.children.first().width()+s.settings.slideMargin;e=Math.floor((s.viewport.width()+s.settings.slideMargin)/t)}else"vertical"===s.settings.mode&&(e=s.settings.minSlides);return e},f=function(){var e=0;if(s.settings.moveSlides>0)if(s.settings.infiniteLoop)e=Math.ceil(s.children.length/x());else for(var t=0,i=0;t<s.children.length;)++e,t=i+v(),i+=s.settings.moveSlides<=v()?s.settings.moveSlides:v();else e=Math.ceil(s.children.length/v());return e},x=function(){return s.settings.moveSlides>0&&s.settings.moveSlides<=v()?s.settings.moveSlides:v()},m=function(){var e;if(s.children.length>s.settings.maxSlides&&s.active.last&&!s.settings.infiniteLoop){if("horizontal"===s.settings.mode){var t=s.children.last();e=t.position(),S(-(e.left-(s.viewport.width()-t.outerWidth())),"reset",0)}else if("vertical"===s.settings.mode){var i=s.children.length-s.settings.minSlides;e=s.children.eq(i).position(),S(-e.top,"reset",0)}}else e=s.children.eq(s.active.index*x()).position(),s.active.index===f()-1&&(s.active.last=!0),void 0!==e&&("horizontal"===s.settings.mode?S(-e.left,"reset",0):"vertical"===s.settings.mode&&S(-e.top,"reset",0))},S=function(e,t,i,n){if(s.usingCSS){var r="vertical"===s.settings.mode?"translate3d(0, "+e+"px, 0)":"translate3d("+e+"px, 0, 0)";o.css("-"+s.cssPrefix+"-transition-duration",i/1e3+"s"),"slide"===t?setTimeout(function(){o.css(s.animProp,r),0===e?q():o.bind("transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd",function(){o.unbind("transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd"),q()})},0):"reset"===t?o.css(s.animProp,r):"ticker"===t&&(o.css("-"+s.cssPrefix+"-transition-timing-function","linear"),o.css(s.animProp,r),o.bind("transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd",function(){o.unbind("transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd"),S(n.resetValue,"reset",0),L()}))}else{var a={};a[s.animProp]=e,"slide"===t?o.animate(a,i,s.settings.easing,function(){q()}):"reset"===t?o.css(s.animProp,e):"ticker"===t&&o.animate(a,speed,"linear",function(){S(n.resetValue,"reset",0),L()})}},b=function(){for(var t="",i=f(),n=0;i>n;n++){var o="";s.settings.buildPager&&e.isFunction(s.settings.buildPager)||s.settings.pagerCustom?(o=s.settings.buildPager(n),s.pagerEl.addClass("bx-custom-pager")):(o=n+1,s.pagerEl.addClass("bx-default-pager")),t+='<div class="bx-pager-item"><a href="" data-slide-index="'+n+'" class="bx-pager-link">'+o+"</a></div>"}s.pagerEl.html(t)},w=function(){s.settings.pagerCustom?s.pagerEl=e(s.settings.pagerCustom):(s.pagerEl=e('<div class="bx-pager" />'),s.settings.pagerSelector?e(s.settings.pagerSelector).html(s.pagerEl):s.controls.el.addClass("bx-has-pager").append(s.pagerEl),b()),s.pagerEl.on("click touchend","a",z)},C=function(){s.controls.next=e('<a class="bx-next" href="">'+s.settings.nextText+"</a>"),s.controls.prev=e('<a class="bx-prev" href="">'+s.settings.prevText+"</a>"),s.controls.next.bind("click touchend",E),s.controls.prev.bind("click touchend",y),s.settings.nextSelector&&e(s.settings.nextSelector).append(s.controls.next),s.settings.prevSelector&&e(s.settings.prevSelector).append(s.controls.prev),s.settings.nextSelector||s.settings.prevSelector||(s.controls.directionEl=e('<div class="bx-controls-direction" />'),s.controls.directionEl.append(s.controls.prev).append(s.controls.next),s.controls.el.addClass("bx-has-controls-direction").append(s.controls.directionEl))},T=function(){s.controls.start=e('<div class="bx-controls-auto-item"><a class="bx-start" href="">'+s.settings.startText+"</a></div>"),s.controls.stop=e('<div class="bx-controls-auto-item"><a class="bx-stop" href="">'+s.settings.stopText+"</a></div>"),s.controls.autoEl=e('<div class="bx-controls-auto" />'),s.controls.autoEl.on("click",".bx-start",k),s.controls.autoEl.on("click",".bx-stop",M),s.settings.autoControlsCombine?s.controls.autoEl.append(s.controls.start):s.controls.autoEl.append(s.controls.start).append(s.controls.stop),s.settings.autoControlsSelector?e(s.settings.autoControlsSelector).html(s.controls.autoEl):s.controls.el.addClass("bx-has-controls-auto").append(s.controls.autoEl),D(s.settings.autoStart?"stop":"start")},P=function(){s.children.each(function(){var t=e(this).find("img:first").attr("title");void 0!==t&&(""+t).length&&e(this).append('<div class="bx-caption"><span>'+t+"</span></div>")})},E=function(e){e.preventDefault(),s.controls.el.hasClass("disabled")||(s.settings.auto&&o.stopAuto(),o.goToNextSlide())},y=function(e){e.preventDefault(),s.controls.el.hasClass("disabled")||(s.settings.auto&&o.stopAuto(),o.goToPrevSlide())},k=function(e){o.startAuto(),e.preventDefault()},M=function(e){o.stopAuto(),e.preventDefault()},z=function(t){if(t.preventDefault(),!s.controls.el.hasClass("disabled")){s.settings.auto&&o.stopAuto();var i=e(t.currentTarget);if(void 0!==i.attr("data-slide-index")){var n=parseInt(i.attr("data-slide-index"));n!==s.active.index&&o.goToSlide(n)}}},I=function(t){var i=s.children.length;return"short"===s.settings.pagerType?(s.settings.maxSlides>1&&(i=Math.ceil(s.children.length/s.settings.maxSlides)),void s.pagerEl.html(t+1+s.settings.pagerShortSeparator+i)):(s.pagerEl.find("a").removeClass("active"),void s.pagerEl.each(function(i,n){e(n).find("a").eq(t).addClass("active")}))},q=function(){if(s.settings.infiniteLoop){var e="";0===s.active.index?e=s.children.eq(0).position():s.active.index===f()-1&&s.carousel?e=s.children.eq((f()-1)*x()).position():s.active.index===s.children.length-1&&(e=s.children.eq(s.children.length-1).position()),e&&("horizontal"===s.settings.mode?S(-e.left,"reset",0):"vertical"===s.settings.mode&&S(-e.top,"reset",0))}s.working=!1,s.settings.onSlideAfter(s.children.eq(s.active.index),s.oldIndex,s.active.index)},D=function(e){s.settings.autoControlsCombine?s.controls.autoEl.html(s.controls[e]):(s.controls.autoEl.find("a").removeClass("active"),s.controls.autoEl.find("a:not(.bx-"+e+")").addClass("active"))},W=function(){1===f()?(s.controls.prev.addClass("disabled"),s.controls.next.addClass("disabled")):!s.settings.infiniteLoop&&s.settings.hideControlOnEnd&&(0===s.active.index?(s.controls.prev.addClass("disabled"),s.controls.next.removeClass("disabled")):s.active.index===f()-1?(s.controls.next.addClass("disabled"),s.controls.prev.removeClass("disabled")):(s.controls.prev.removeClass("disabled"),s.controls.next.removeClass("disabled")))},A=function(){if(s.settings.autoDelay>0){setTimeout(o.startAuto,s.settings.autoDelay)}else o.startAuto(),e(window).focus(function(){o.startAuto()}).blur(function(){o.stopAuto()});s.settings.autoHover&&o.hover(function(){s.interval&&(o.stopAuto(!0),s.autoPaused=!0)},function(){s.autoPaused&&(o.startAuto(!0),s.autoPaused=null)})},H=function(){var t=0;if("next"===s.settings.autoDirection)o.append(s.children.clone().addClass("bx-clone"));else{o.prepend(s.children.clone().addClass("bx-clone"));var i=s.children.first().position();t="horizontal"===s.settings.mode?-i.left:-i.top}if(S(t,"reset",0),s.settings.pager=!1,s.settings.controls=!1,s.settings.autoControls=!1,s.settings.tickerHover)if(s.usingCSS){var n,r="horizontal"==s.settings.mode?4:5;s.viewport.hover(function(){var e=o.css("-"+s.cssPrefix+"-transform");n=parseFloat(e.split(",")[r]),S(n,"reset",0)},function(){var t=0;s.children.each(function(){t+="horizontal"==s.settings.mode?e(this).outerWidth(!0):e(this).outerHeight(!0)});var i=s.settings.speed/t,o=("horizontal"==s.settings.mode?"left":"top",i*(t-Math.abs(parseInt(n))));L(o)})}else s.viewport.hover(function(){o.stop()},function(){var t=0;s.children.each(function(){t+="horizontal"==s.settings.mode?e(this).outerWidth(!0):e(this).outerHeight(!0)});var i=s.settings.speed/t,n="horizontal"==s.settings.mode?"left":"top",r=i*(t-Math.abs(parseInt(o.css(n))));L(r)});L()},L=function(e){speed=e?e:s.settings.speed;var t={left:0,top:0},i={left:0,top:0};"next"===s.settings.autoDirection?t=o.find(".bx-clone").first().position():i=s.children.first().position();var n="horizontal"===s.settings.mode?-t.left:-t.top,r="horizontal"===s.settings.mode?-i.left:-i.top,a={resetValue:r};S(n,"ticker",speed,a)},F=function(t){var i=e(window),n={top:i.scrollTop(),left:i.scrollLeft()};n.right=n.left+i.width(),n.bottom=n.top+i.height();var s=t.offset();return s.right=s.left+t.outerWidth(),s.bottom=s.top+t.outerHeight(),!(n.right<s.left||n.left>s.right||n.bottom<s.top||n.top>s.bottom)},N=function(e){var t=document.activeElement.tagName.toLowerCase(),i="input|textarea",n=new RegExp(t,["i"]),s=n.exec(i);if(null==s&&F(o)){if(39==e.keyCode)return E(e),!1;if(37==e.keyCode)return y(e),!1}},O=function(){s.touch={start:{x:0,y:0},end:{x:0,y:0}},s.viewport.bind("touchstart MSPointerDown pointerdown",X),s.viewport.on("click",".bxslider a",function(e){s.viewport.hasClass("click-disabled")&&(e.preventDefault(),s.viewport.removeClass("click-disabled"))})},X=function(e){if(s.controls.el.addClass("disabled"),s.working)e.preventDefault(),s.controls.el.removeClass("disabled");else{s.touch.originalPos=o.position();var t=e.originalEvent,i="undefined"!=typeof t.changedTouches?t.changedTouches:[t];s.touch.start.x=i[0].pageX,s.touch.start.y=i[0].pageY,s.viewport.get(0).setPointerCapture&&(s.pointerId=t.pointerId,s.viewport.get(0).setPointerCapture(s.pointerId)),s.viewport.bind("touchmove MSPointerMove pointermove",R),s.viewport.bind("touchend MSPointerUp pointerup",V),s.viewport.bind("MSPointerCancel pointercancel",Y)}},Y=function(){S(s.touch.originalPos.left,"reset",0),s.controls.el.removeClass("disabled"),s.viewport.unbind("MSPointerCancel pointercancel",Y),s.viewport.unbind("touchmove MSPointerMove pointermove",R),s.viewport.unbind("touchend MSPointerUp pointerup",V),s.viewport.get(0).releasePointerCapture&&s.viewport.get(0).releasePointerCapture(s.pointerId)},R=function(e){var t=e.originalEvent,i="undefined"!=typeof t.changedTouches?t.changedTouches:[t],n=Math.abs(i[0].pageX-s.touch.start.x),o=Math.abs(i[0].pageY-s.touch.start.y);if(3*n>o&&s.settings.preventDefaultSwipeX?e.preventDefault():3*o>n&&s.settings.preventDefaultSwipeY&&e.preventDefault(),"fade"!==s.settings.mode&&s.settings.oneToOneTouch){var r=0,a=0;"horizontal"===s.settings.mode?(a=i[0].pageX-s.touch.start.x,r=s.touch.originalPos.left+a):(a=i[0].pageY-s.touch.start.y,r=s.touch.originalPos.top+a),S(r,"reset",0)}},V=function(e){s.viewport.unbind("touchmove MSPointerMove pointermove",R),s.controls.el.removeClass("disabled");var t=e.originalEvent,i="undefined"!=typeof t.changedTouches?t.changedTouches:[t],n=0,r=0;s.touch.end.x=i[0].pageX,s.touch.end.y=i[0].pageY,"fade"===s.settings.mode?(r=Math.abs(s.touch.start.x-s.touch.end.x),r>=s.settings.swipeThreshold&&(s.touch.start.x>s.touch.end.x?o.goToNextSlide():o.goToPrevSlide(),o.stopAuto())):("horizontal"===s.settings.mode?(r=s.touch.end.x-s.touch.start.x,n=s.touch.originalPos.left):(r=s.touch.end.y-s.touch.start.y,n=s.touch.originalPos.top),!s.settings.infiniteLoop&&(0===s.active.index&&r>0||s.active.last&&0>r)?S(n,"reset",200):Math.abs(r)>=s.settings.swipeThreshold?(0>r?o.goToNextSlide():o.goToPrevSlide(),o.stopAuto()):S(n,"reset",200)),s.viewport.unbind("touchend MSPointerUp pointerup",V),s.viewport.get(0).releasePointerCapture&&s.viewport.get(0).releasePointerCapture(s.pointerId)},Z=function(){if(s.initialized)if(s.working)window.setTimeout(Z,10);else{var t=e(window).width(),i=e(window).height();(r!==t||a!==i)&&(r=t,a=i,o.redrawSlider(),s.settings.onSliderResize.call(o,s.active.index))}};return o.goToSlide=function(t,i){if(!s.working&&s.active.index!==t){s.working=!0,s.oldIndex=s.active.index,s.active.index=0>t?f()-1:t>=f()?0:t;var n=!0;if(n=s.settings.onSlideBefore(s.children.eq(s.active.index),s.oldIndex,s.active.index),"undefined"!=typeof n&&!n)return s.active.index=s.oldIndex,void(s.working=!1);if("next"===i?s.settings.onSlideNext(s.children.eq(s.active.index),s.oldIndex,s.active.index)||(n=!1):"prev"===i&&(s.settings.onSlidePrev(s.children.eq(s.active.index),s.oldIndex,s.active.index)||(n=!1)),"undefined"!=typeof n&&!n)return s.active.index=s.oldIndex,void(s.working=!1);if(s.active.last=s.active.index>=f()-1,(s.settings.pager||s.settings.pagerCustom)&&I(s.active.index),s.settings.controls&&W(),"fade"===s.settings.mode)s.settings.adaptiveHeight&&s.viewport.height()!==p()&&s.viewport.animate({height:p()},s.settings.adaptiveHeightSpeed),s.children.filter(":visible").fadeOut(s.settings.speed).css({zIndex:0}),s.children.eq(s.active.index).css("zIndex",s.settings.slideZIndex+1).fadeIn(s.settings.speed,function(){e(this).css("zIndex",s.settings.slideZIndex),q()});else{s.settings.adaptiveHeight&&s.viewport.height()!==p()&&s.viewport.animate({height:p()},s.settings.adaptiveHeightSpeed);var r=0,a={left:0,top:0},l=null;if(!s.settings.infiniteLoop&&s.carousel&&s.active.last)if("horizontal"===s.settings.mode)l=s.children.eq(s.children.length-1),a=l.position(),r=s.viewport.width()-l.outerWidth();else{var d=s.children.length-s.settings.minSlides;a=s.children.eq(d).position()}else if(s.carousel&&s.active.last&&"prev"===i){var c=1===s.settings.moveSlides?s.settings.maxSlides-x():(f()-1)*x()-(s.children.length-s.settings.maxSlides);l=o.children(".bx-clone").eq(c),a=l.position()}else if("next"===i&&0===s.active.index)a=o.find("> .bx-clone").eq(s.settings.maxSlides).position(),s.active.last=!1;else if(t>=0){var g=t*x();a=s.children.eq(g).position()}if("undefined"!=typeof a){var u="horizontal"===s.settings.mode?-(a.left-r):-a.top;S(u,"slide",s.settings.speed)}}}},o.goToNextSlide=function(){if(s.settings.infiniteLoop||!s.active.last){var e=parseInt(s.active.index)+1;o.goToSlide(e,"next")}},o.goToPrevSlide=function(){if(s.settings.infiniteLoop||0!==s.active.index){var e=parseInt(s.active.index)-1;o.goToSlide(e,"prev")}},o.startAuto=function(e){s.interval||(s.interval=setInterval(function(){"next"===s.settings.autoDirection?o.goToNextSlide():o.goToPrevSlide()},s.settings.pause),s.settings.autoControls&&e!==!0&&D("stop"))},o.stopAuto=function(e){s.interval&&(clearInterval(s.interval),s.interval=null,s.settings.autoControls&&e!==!0&&D("start"))},o.getCurrentSlide=function(){return s.active.index},o.getCurrentSlideElement=function(){return s.children.eq(s.active.index)},o.getSlideCount=function(){return s.children.length},o.isWorking=function(){return s.working},o.redrawSlider=function(){s.children.add(o.find(".bx-clone")).outerWidth(h()),s.viewport.css("height",p()),s.settings.ticker||m(),s.active.last&&(s.active.index=f()-1),s.active.index>=f()&&(s.active.last=!0),s.settings.pager&&!s.settings.pagerCustom&&(b(),I(s.active.index))},o.destroySlider=function(){s.initialized&&(s.initialized=!1,e(".bx-clone",this).remove(),s.children.each(function(){void 0!==e(this).data("origStyle")?e(this).attr("style",e(this).data("origStyle")):e(this).removeAttr("style")}),void 0!==e(this).data("origStyle")?this.attr("style",e(this).data("origStyle")):e(this).removeAttr("style"),e(this).unwrap().unwrap(),s.controls.el&&s.controls.el.remove(),s.controls.next&&s.controls.next.remove(),s.controls.prev&&s.controls.prev.remove(),s.pagerEl&&s.settings.controls&&!s.settings.pagerCustom&&s.pagerEl.remove(),e(".bx-caption",this).remove(),s.controls.autoEl&&s.controls.autoEl.remove(),clearInterval(s.interval),s.settings.responsive&&e(window).unbind("resize",Z),s.settings.keyboardEnabled&&e(document).unbind("keydown",N))},o.reloadSlider=function(e){void 0!==e&&(n=e),o.destroySlider(),l()},l(),this}}(jQuery);
|
|
1 |
+
/**
|
2 |
+
* bxSlider v4.2.5
|
3 |
+
* Copyright 2013-2015 Steven Wanderski
|
|
|
|
|
4 |
* Written while drinking Belgian ales and listening to jazz
|
5 |
+
|
6 |
+
* Licensed under MIT (http://opensource.org/licenses/MIT)
|
7 |
+
*/
|
8 |
+
|
9 |
+
!function(a){var b={mode:"horizontal",slideSelector:"",infiniteLoop:!0,hideControlOnEnd:!1,speed:500,easing:null,slideMargin:0,startSlide:0,randomStart:!1,captions:!1,ticker:!1,tickerHover:!1,adaptiveHeight:!1,adaptiveHeightSpeed:500,video:!1,useCSS:!0,preloadImages:"visible",responsive:!0,slideZIndex:50,wrapperClass:"bx-wrapper",touchEnabled:!0,swipeThreshold:50,oneToOneTouch:!0,preventDefaultSwipeX:!0,preventDefaultSwipeY:!1,ariaLive:!0,ariaHidden:!0,keyboardEnabled:!1,pager:!0,pagerType:"full",pagerShortSeparator:" / ",pagerSelector:null,buildPager:null,pagerCustom:null,controls:!0,nextText:"Next",prevText:"Prev",nextSelector:null,prevSelector:null,autoControls:!1,startText:"Start",stopText:"Stop",autoControlsCombine:!1,autoControlsSelector:null,auto:!1,pause:4e3,autoStart:!0,autoDirection:"next",stopAutoOnClick:!1,autoHover:!1,autoDelay:0,autoSlideForOnePage:!1,minSlides:1,maxSlides:1,moveSlides:0,slideWidth:0,shrinkItems:!1,onSliderLoad:function(){return!0},onSlideBefore:function(){return!0},onSlideAfter:function(){return!0},onSlideNext:function(){return!0},onSlidePrev:function(){return!0},onSliderResize:function(){return!0}};a.fn.bxSlider=function(c){if(0===this.length)return this;if(this.length>1)return this.each(function(){a(this).bxSlider(c)}),this;var d={},e=this,f=a(window).width(),g=a(window).height();if(!a(e).data("bxSlider")){var h=function(){a(e).data("bxSlider")||(d.settings=a.extend({},b,c),d.settings.slideWidth=parseInt(d.settings.slideWidth),d.children=e.children(d.settings.slideSelector),d.children.length<d.settings.minSlides&&(d.settings.minSlides=d.children.length),d.children.length<d.settings.maxSlides&&(d.settings.maxSlides=d.children.length),d.settings.randomStart&&(d.settings.startSlide=Math.floor(Math.random()*d.children.length)),d.active={index:d.settings.startSlide},d.carousel=d.settings.minSlides>1||d.settings.maxSlides>1?!0:!1,d.carousel&&(d.settings.preloadImages="all"),d.minThreshold=d.settings.minSlides*d.settings.slideWidth+(d.settings.minSlides-1)*d.settings.slideMargin,d.maxThreshold=d.settings.maxSlides*d.settings.slideWidth+(d.settings.maxSlides-1)*d.settings.slideMargin,d.working=!1,d.controls={},d.interval=null,d.animProp="vertical"===d.settings.mode?"top":"left",d.usingCSS=d.settings.useCSS&&"fade"!==d.settings.mode&&function(){for(var a=document.createElement("div"),b=["WebkitPerspective","MozPerspective","OPerspective","msPerspective"],c=0;c<b.length;c++)if(void 0!==a.style[b[c]])return d.cssPrefix=b[c].replace("Perspective","").toLowerCase(),d.animProp="-"+d.cssPrefix+"-transform",!0;return!1}(),"vertical"===d.settings.mode&&(d.settings.maxSlides=d.settings.minSlides),e.data("origStyle",e.attr("style")),e.children(d.settings.slideSelector).each(function(){a(this).data("origStyle",a(this).attr("style"))}),j())},j=function(){var b=d.children.eq(d.settings.startSlide);e.wrap('<div class="'+d.settings.wrapperClass+'"><div class="bx-viewport"></div></div>'),d.viewport=e.parent(),d.settings.ariaLive&&!d.settings.ticker&&d.viewport.attr("aria-live","polite"),d.loader=a('<div class="bx-loading" />'),d.viewport.prepend(d.loader),e.css({width:"horizontal"===d.settings.mode?1e3*d.children.length+215+"%":"auto",position:"relative"}),d.usingCSS&&d.settings.easing?e.css("-"+d.cssPrefix+"-transition-timing-function",d.settings.easing):d.settings.easing||(d.settings.easing="swing"),d.viewport.css({width:"100%",overflow:"hidden",position:"relative"}),d.viewport.parent().css({maxWidth:n()}),d.settings.pager||d.settings.controls||d.viewport.parent().css({margin:"0 auto 0px"}),d.children.css({"float":"horizontal"===d.settings.mode?"left":"none",listStyle:"none",position:"relative"}),d.children.css("width",o()),"horizontal"===d.settings.mode&&d.settings.slideMargin>0&&d.children.css("marginRight",d.settings.slideMargin),"vertical"===d.settings.mode&&d.settings.slideMargin>0&&d.children.css("marginBottom",d.settings.slideMargin),"fade"===d.settings.mode&&(d.children.css({position:"absolute",zIndex:0,display:"none"}),d.children.eq(d.settings.startSlide).css({zIndex:d.settings.slideZIndex,display:"block"})),d.controls.el=a('<div class="bx-controls" />'),d.settings.captions&&y(),d.active.last=d.settings.startSlide===q()-1,d.settings.video&&e.fitVids(),("all"===d.settings.preloadImages||d.settings.ticker)&&(b=d.children),d.settings.ticker?d.settings.pager=!1:(d.settings.controls&&w(),d.settings.auto&&d.settings.autoControls&&x(),d.settings.pager&&v(),(d.settings.controls||d.settings.autoControls||d.settings.pager)&&d.viewport.after(d.controls.el)),k(b,l)},k=function(b,c){var d=b.find('img:not([src=""]), iframe').length,e=0;return 0===d?void c():void b.find('img:not([src=""]), iframe').each(function(){a(this).one("load error",function(){++e===d&&c()}).each(function(){this.complete&&a(this).load()})})},l=function(){if(d.settings.infiniteLoop&&"fade"!==d.settings.mode&&!d.settings.ticker){var b="vertical"===d.settings.mode?d.settings.minSlides:d.settings.maxSlides,c=d.children.slice(0,b).clone(!0).addClass("bx-clone"),f=d.children.slice(-b).clone(!0).addClass("bx-clone");d.settings.ariaHidden&&(c.attr("aria-hidden",!0),f.attr("aria-hidden",!0)),e.append(c).prepend(f)}d.loader.remove(),s(),"vertical"===d.settings.mode&&(d.settings.adaptiveHeight=!0),d.viewport.height(m()),e.redrawSlider(),d.settings.onSliderLoad.call(e,d.active.index),d.initialized=!0,d.settings.responsive&&a(window).bind("resize",S),d.settings.auto&&d.settings.autoStart&&(q()>1||d.settings.autoSlideForOnePage)&&I(),d.settings.ticker&&J(),d.settings.pager&&E(d.settings.startSlide),d.settings.controls&&H(),d.settings.touchEnabled&&!d.settings.ticker&&N(),d.settings.keyboardEnabled&&!d.settings.ticker&&a(document).keydown(M)},m=function(){var b=0,c=a();if("vertical"===d.settings.mode||d.settings.adaptiveHeight)if(d.carousel){var e=1===d.settings.moveSlides?d.active.index:d.active.index*r();for(c=d.children.eq(e),i=1;i<=d.settings.maxSlides-1;i++)c=e+i>=d.children.length?c.add(d.children.eq(i-1)):c.add(d.children.eq(e+i))}else c=d.children.eq(d.active.index);else c=d.children;return"vertical"===d.settings.mode?(c.each(function(c){b+=a(this).outerHeight()}),d.settings.slideMargin>0&&(b+=d.settings.slideMargin*(d.settings.minSlides-1))):b=Math.max.apply(Math,c.map(function(){return a(this).outerHeight(!1)}).get()),"border-box"===d.viewport.css("box-sizing")?b+=parseFloat(d.viewport.css("padding-top"))+parseFloat(d.viewport.css("padding-bottom"))+parseFloat(d.viewport.css("border-top-width"))+parseFloat(d.viewport.css("border-bottom-width")):"padding-box"===d.viewport.css("box-sizing")&&(b+=parseFloat(d.viewport.css("padding-top"))+parseFloat(d.viewport.css("padding-bottom"))),b},n=function(){var a="100%";return d.settings.slideWidth>0&&(a="horizontal"===d.settings.mode?d.settings.maxSlides*d.settings.slideWidth+(d.settings.maxSlides-1)*d.settings.slideMargin:d.settings.slideWidth),a},o=function(){var a=d.settings.slideWidth,b=d.viewport.width();if(0===d.settings.slideWidth||d.settings.slideWidth>b&&!d.carousel||"vertical"===d.settings.mode)a=b;else if(d.settings.maxSlides>1&&"horizontal"===d.settings.mode){if(b>d.maxThreshold)return a;b<d.minThreshold?a=(b-d.settings.slideMargin*(d.settings.minSlides-1))/d.settings.minSlides:d.settings.shrinkItems&&(a=Math.floor((b+d.settings.slideMargin)/Math.ceil((b+d.settings.slideMargin)/(a+d.settings.slideMargin))-d.settings.slideMargin))}return a},p=function(){var a=1,b=null;return"horizontal"===d.settings.mode&&d.settings.slideWidth>0?d.viewport.width()<d.minThreshold?a=d.settings.minSlides:d.viewport.width()>d.maxThreshold?a=d.settings.maxSlides:(b=d.children.first().width()+d.settings.slideMargin,a=Math.floor((d.viewport.width()+d.settings.slideMargin)/b)):"vertical"===d.settings.mode&&(a=d.settings.minSlides),a},q=function(){var a=0,b=0,c=0;if(d.settings.moveSlides>0)if(d.settings.infiniteLoop)a=Math.ceil(d.children.length/r());else for(;b<d.children.length;)++a,b=c+p(),c+=d.settings.moveSlides<=p()?d.settings.moveSlides:p();else a=Math.ceil(d.children.length/p());return a},r=function(){return d.settings.moveSlides>0&&d.settings.moveSlides<=p()?d.settings.moveSlides:p()},s=function(){var a,b,c;d.children.length>d.settings.maxSlides&&d.active.last&&!d.settings.infiniteLoop?"horizontal"===d.settings.mode?(b=d.children.last(),a=b.position(),t(-(a.left-(d.viewport.width()-b.outerWidth())),"reset",0)):"vertical"===d.settings.mode&&(c=d.children.length-d.settings.minSlides,a=d.children.eq(c).position(),t(-a.top,"reset",0)):(a=d.children.eq(d.active.index*r()).position(),d.active.index===q()-1&&(d.active.last=!0),void 0!==a&&("horizontal"===d.settings.mode?t(-a.left,"reset",0):"vertical"===d.settings.mode&&t(-a.top,"reset",0)))},t=function(b,c,f,g){var h,i;d.usingCSS?(i="vertical"===d.settings.mode?"translate3d(0, "+b+"px, 0)":"translate3d("+b+"px, 0, 0)",e.css("-"+d.cssPrefix+"-transition-duration",f/1e3+"s"),"slide"===c?(e.css(d.animProp,i),0!==f?e.bind("transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd",function(b){a(b.target).is(e)&&(e.unbind("transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd"),F())}):F()):"reset"===c?e.css(d.animProp,i):"ticker"===c&&(e.css("-"+d.cssPrefix+"-transition-timing-function","linear"),e.css(d.animProp,i),0!==f?e.bind("transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd",function(b){a(b.target).is(e)&&(e.unbind("transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd"),t(g.resetValue,"reset",0),K())}):(t(g.resetValue,"reset",0),K()))):(h={},h[d.animProp]=b,"slide"===c?e.animate(h,f,d.settings.easing,function(){F()}):"reset"===c?e.css(d.animProp,b):"ticker"===c&&e.animate(h,f,"linear",function(){t(g.resetValue,"reset",0),K()}))},u=function(){for(var b="",c="",e=q(),f=0;e>f;f++)c="",d.settings.buildPager&&a.isFunction(d.settings.buildPager)||d.settings.pagerCustom?(c=d.settings.buildPager(f),d.pagerEl.addClass("bx-custom-pager")):(c=f+1,d.pagerEl.addClass("bx-default-pager")),b+='<div class="bx-pager-item"><a href="" data-slide-index="'+f+'" class="bx-pager-link">'+c+"</a></div>";d.pagerEl.html(b)},v=function(){d.settings.pagerCustom?d.pagerEl=a(d.settings.pagerCustom):(d.pagerEl=a('<div class="bx-pager" />'),d.settings.pagerSelector?a(d.settings.pagerSelector).html(d.pagerEl):d.controls.el.addClass("bx-has-pager").append(d.pagerEl),u()),d.pagerEl.on("click touchend","a",D)},w=function(){d.controls.next=a('<a class="bx-next" href="">'+d.settings.nextText+"</a>"),d.controls.prev=a('<a class="bx-prev" href="">'+d.settings.prevText+"</a>"),d.controls.next.bind("click touchend",z),d.controls.prev.bind("click touchend",A),d.settings.nextSelector&&a(d.settings.nextSelector).append(d.controls.next),d.settings.prevSelector&&a(d.settings.prevSelector).append(d.controls.prev),d.settings.nextSelector||d.settings.prevSelector||(d.controls.directionEl=a('<div class="bx-controls-direction" />'),d.controls.directionEl.append(d.controls.prev).append(d.controls.next),d.controls.el.addClass("bx-has-controls-direction").append(d.controls.directionEl))},x=function(){d.controls.start=a('<div class="bx-controls-auto-item"><a class="bx-start" href="">'+d.settings.startText+"</a></div>"),d.controls.stop=a('<div class="bx-controls-auto-item"><a class="bx-stop" href="">'+d.settings.stopText+"</a></div>"),d.controls.autoEl=a('<div class="bx-controls-auto" />'),d.controls.autoEl.on("click",".bx-start",B),d.controls.autoEl.on("click",".bx-stop",C),d.settings.autoControlsCombine?d.controls.autoEl.append(d.controls.start):d.controls.autoEl.append(d.controls.start).append(d.controls.stop),d.settings.autoControlsSelector?a(d.settings.autoControlsSelector).html(d.controls.autoEl):d.controls.el.addClass("bx-has-controls-auto").append(d.controls.autoEl),G(d.settings.autoStart?"stop":"start")},y=function(){d.children.each(function(b){var c=a(this).find("img:first").attr("title");void 0!==c&&(""+c).length&&a(this).append('<div class="bx-caption"><span>'+c+"</span></div>")})},z=function(a){a.preventDefault(),d.controls.el.hasClass("disabled")||(d.settings.auto&&d.settings.stopAutoOnClick&&e.stopAuto(),e.goToNextSlide())},A=function(a){a.preventDefault(),d.controls.el.hasClass("disabled")||(d.settings.auto&&d.settings.stopAutoOnClick&&e.stopAuto(),e.goToPrevSlide())},B=function(a){e.startAuto(),a.preventDefault()},C=function(a){e.stopAuto(),a.preventDefault()},D=function(b){var c,f;b.preventDefault(),d.controls.el.hasClass("disabled")||(d.settings.auto&&d.settings.stopAutoOnClick&&e.stopAuto(),c=a(b.currentTarget),void 0!==c.attr("data-slide-index")&&(f=parseInt(c.attr("data-slide-index")),f!==d.active.index&&e.goToSlide(f)))},E=function(b){var c=d.children.length;return"short"===d.settings.pagerType?(d.settings.maxSlides>1&&(c=Math.ceil(d.children.length/d.settings.maxSlides)),void d.pagerEl.html(b+1+d.settings.pagerShortSeparator+c)):(d.pagerEl.find("a").removeClass("active"),void d.pagerEl.each(function(c,d){a(d).find("a").eq(b).addClass("active")}))},F=function(){if(d.settings.infiniteLoop){var a="";0===d.active.index?a=d.children.eq(0).position():d.active.index===q()-1&&d.carousel?a=d.children.eq((q()-1)*r()).position():d.active.index===d.children.length-1&&(a=d.children.eq(d.children.length-1).position()),a&&("horizontal"===d.settings.mode?t(-a.left,"reset",0):"vertical"===d.settings.mode&&t(-a.top,"reset",0))}d.working=!1,d.settings.onSlideAfter.call(e,d.children.eq(d.active.index),d.oldIndex,d.active.index)},G=function(a){d.settings.autoControlsCombine?d.controls.autoEl.html(d.controls[a]):(d.controls.autoEl.find("a").removeClass("active"),d.controls.autoEl.find("a:not(.bx-"+a+")").addClass("active"))},H=function(){1===q()?(d.controls.prev.addClass("disabled"),d.controls.next.addClass("disabled")):!d.settings.infiniteLoop&&d.settings.hideControlOnEnd&&(0===d.active.index?(d.controls.prev.addClass("disabled"),d.controls.next.removeClass("disabled")):d.active.index===q()-1?(d.controls.next.addClass("disabled"),d.controls.prev.removeClass("disabled")):(d.controls.prev.removeClass("disabled"),d.controls.next.removeClass("disabled")))},I=function(){if(d.settings.autoDelay>0){setTimeout(e.startAuto,d.settings.autoDelay)}else e.startAuto(),a(window).focus(function(){e.startAuto()}).blur(function(){e.stopAuto()});d.settings.autoHover&&e.hover(function(){d.interval&&(e.stopAuto(!0),d.autoPaused=!0)},function(){d.autoPaused&&(e.startAuto(!0),d.autoPaused=null)})},J=function(){var b,c,f,g,h,i,j,k,l=0;"next"===d.settings.autoDirection?e.append(d.children.clone().addClass("bx-clone")):(e.prepend(d.children.clone().addClass("bx-clone")),b=d.children.first().position(),l="horizontal"===d.settings.mode?-b.left:-b.top),t(l,"reset",0),d.settings.pager=!1,d.settings.controls=!1,d.settings.autoControls=!1,d.settings.tickerHover&&(d.usingCSS?(g="horizontal"===d.settings.mode?4:5,d.viewport.hover(function(){c=e.css("-"+d.cssPrefix+"-transform"),f=parseFloat(c.split(",")[g]),t(f,"reset",0)},function(){k=0,d.children.each(function(b){k+="horizontal"===d.settings.mode?a(this).outerWidth(!0):a(this).outerHeight(!0)}),h=d.settings.speed/k,i="horizontal"===d.settings.mode?"left":"top",j=h*(k-Math.abs(parseInt(f))),K(j)})):d.viewport.hover(function(){e.stop()},function(){k=0,d.children.each(function(b){k+="horizontal"===d.settings.mode?a(this).outerWidth(!0):a(this).outerHeight(!0)}),h=d.settings.speed/k,i="horizontal"===d.settings.mode?"left":"top",j=h*(k-Math.abs(parseInt(e.css(i)))),K(j)})),K()},K=function(a){var b,c,f,g=a?a:d.settings.speed,h={left:0,top:0},i={left:0,top:0};"next"===d.settings.autoDirection?h=e.find(".bx-clone").first().position():i=d.children.first().position(),b="horizontal"===d.settings.mode?-h.left:-h.top,c="horizontal"===d.settings.mode?-i.left:-i.top,f={resetValue:c},t(b,"ticker",g,f)},L=function(b){var c=a(window),d={top:c.scrollTop(),left:c.scrollLeft()},e=b.offset();return d.right=d.left+c.width(),d.bottom=d.top+c.height(),e.right=e.left+b.outerWidth(),e.bottom=e.top+b.outerHeight(),!(d.right<e.left||d.left>e.right||d.bottom<e.top||d.top>e.bottom)},M=function(a){var b=document.activeElement.tagName.toLowerCase(),c="input|textarea",d=new RegExp(b,["i"]),f=d.exec(c);if(null==f&&L(e)){if(39===a.keyCode)return z(a),!1;if(37===a.keyCode)return A(a),!1}},N=function(){d.touch={start:{x:0,y:0},end:{x:0,y:0}},d.viewport.bind("touchstart MSPointerDown pointerdown",O),d.viewport.on("click",".bxslider a",function(a){d.viewport.hasClass("click-disabled")&&(a.preventDefault(),d.viewport.removeClass("click-disabled"))})},O=function(a){if(d.controls.el.addClass("disabled"),d.working)a.preventDefault(),d.controls.el.removeClass("disabled");else{d.touch.originalPos=e.position();var b=a.originalEvent,c="undefined"!=typeof b.changedTouches?b.changedTouches:[b];d.touch.start.x=c[0].pageX,d.touch.start.y=c[0].pageY,d.viewport.get(0).setPointerCapture&&(d.pointerId=b.pointerId,d.viewport.get(0).setPointerCapture(d.pointerId)),d.viewport.bind("touchmove MSPointerMove pointermove",Q),d.viewport.bind("touchend MSPointerUp pointerup",R),d.viewport.bind("MSPointerCancel pointercancel",P)}},P=function(a){t(d.touch.originalPos.left,"reset",0),d.controls.el.removeClass("disabled"),d.viewport.unbind("MSPointerCancel pointercancel",P),d.viewport.unbind("touchmove MSPointerMove pointermove",Q),d.viewport.unbind("touchend MSPointerUp pointerup",R),d.viewport.get(0).releasePointerCapture&&d.viewport.get(0).releasePointerCapture(d.pointerId)},Q=function(a){var b=a.originalEvent,c="undefined"!=typeof b.changedTouches?b.changedTouches:[b],e=Math.abs(c[0].pageX-d.touch.start.x),f=Math.abs(c[0].pageY-d.touch.start.y),g=0,h=0;3*e>f&&d.settings.preventDefaultSwipeX?a.preventDefault():3*f>e&&d.settings.preventDefaultSwipeY&&a.preventDefault(),"fade"!==d.settings.mode&&d.settings.oneToOneTouch&&("horizontal"===d.settings.mode?(h=c[0].pageX-d.touch.start.x,g=d.touch.originalPos.left+h):(h=c[0].pageY-d.touch.start.y,g=d.touch.originalPos.top+h),t(g,"reset",0))},R=function(a){d.viewport.unbind("touchmove MSPointerMove pointermove",Q),d.controls.el.removeClass("disabled");var b=a.originalEvent,c="undefined"!=typeof b.changedTouches?b.changedTouches:[b],f=0,g=0;d.touch.end.x=c[0].pageX,d.touch.end.y=c[0].pageY,"fade"===d.settings.mode?(g=Math.abs(d.touch.start.x-d.touch.end.x),g>=d.settings.swipeThreshold&&(d.touch.start.x>d.touch.end.x?e.goToNextSlide():e.goToPrevSlide(),e.stopAuto())):("horizontal"===d.settings.mode?(g=d.touch.end.x-d.touch.start.x,f=d.touch.originalPos.left):(g=d.touch.end.y-d.touch.start.y,f=d.touch.originalPos.top),!d.settings.infiniteLoop&&(0===d.active.index&&g>0||d.active.last&&0>g)?t(f,"reset",200):Math.abs(g)>=d.settings.swipeThreshold?(0>g?e.goToNextSlide():e.goToPrevSlide(),e.stopAuto()):t(f,"reset",200)),d.viewport.unbind("touchend MSPointerUp pointerup",R),d.viewport.get(0).releasePointerCapture&&d.viewport.get(0).releasePointerCapture(d.pointerId)},S=function(b){if(d.initialized)if(d.working)window.setTimeout(S,10);else{var c=a(window).width(),h=a(window).height();(f!==c||g!==h)&&(f=c,g=h,e.redrawSlider(),d.settings.onSliderResize.call(e,d.active.index))}},T=function(a){var b=p();d.settings.ariaHidden&&!d.settings.ticker&&(d.children.attr("aria-hidden","true"),d.children.slice(a,a+b).attr("aria-hidden","false"))},U=function(a){return 0>a?d.settings.infiniteLoop?q()-1:d.active.index:a>=q()?d.settings.infiniteLoop?0:d.active.index:a};return e.goToSlide=function(b,c){var f,g,h,i,j=!0,k=0,l={left:0,top:0},n=null;if(d.oldIndex=d.active.index,d.active.index=U(b),!d.working&&d.active.index!==d.oldIndex){if(d.working=!0,j=d.settings.onSlideBefore.call(e,d.children.eq(d.active.index),d.oldIndex,d.active.index),"undefined"!=typeof j&&!j)return d.active.index=d.oldIndex,void(d.working=!1);"next"===c?d.settings.onSlideNext.call(e,d.children.eq(d.active.index),d.oldIndex,d.active.index)||(j=!1):"prev"===c&&(d.settings.onSlidePrev.call(e,d.children.eq(d.active.index),d.oldIndex,d.active.index)||(j=!1)),d.active.last=d.active.index>=q()-1,(d.settings.pager||d.settings.pagerCustom)&&E(d.active.index),d.settings.controls&&H(),"fade"===d.settings.mode?(d.settings.adaptiveHeight&&d.viewport.height()!==m()&&d.viewport.animate({height:m()},d.settings.adaptiveHeightSpeed),d.children.filter(":visible").fadeOut(d.settings.speed).css({zIndex:0}),d.children.eq(d.active.index).css("zIndex",d.settings.slideZIndex+1).fadeIn(d.settings.speed,function(){a(this).css("zIndex",d.settings.slideZIndex),F()})):(d.settings.adaptiveHeight&&d.viewport.height()!==m()&&d.viewport.animate({height:m()},d.settings.adaptiveHeightSpeed),!d.settings.infiniteLoop&&d.carousel&&d.active.last?"horizontal"===d.settings.mode?(n=d.children.eq(d.children.length-1),l=n.position(),k=d.viewport.width()-n.outerWidth()):(f=d.children.length-d.settings.minSlides,l=d.children.eq(f).position()):d.carousel&&d.active.last&&"prev"===c?(g=1===d.settings.moveSlides?d.settings.maxSlides-r():(q()-1)*r()-(d.children.length-d.settings.maxSlides),n=e.children(".bx-clone").eq(g),l=n.position()):"next"===c&&0===d.active.index?(l=e.find("> .bx-clone").eq(d.settings.maxSlides).position(),d.active.last=!1):b>=0&&(i=b*parseInt(r()),l=d.children.eq(i).position()),"undefined"!=typeof l?(h="horizontal"===d.settings.mode?-(l.left-k):-l.top,t(h,"slide",d.settings.speed)):d.working=!1),d.settings.ariaHidden&&T(d.active.index*r())}},e.goToNextSlide=function(){if(d.settings.infiniteLoop||!d.active.last){var a=parseInt(d.active.index)+1;e.goToSlide(a,"next")}},e.goToPrevSlide=function(){if(d.settings.infiniteLoop||0!==d.active.index){var a=parseInt(d.active.index)-1;e.goToSlide(a,"prev")}},e.startAuto=function(a){d.interval||(d.interval=setInterval(function(){"next"===d.settings.autoDirection?e.goToNextSlide():e.goToPrevSlide()},d.settings.pause),d.settings.autoControls&&a!==!0&&G("stop"))},e.stopAuto=function(a){d.interval&&(clearInterval(d.interval),d.interval=null,d.settings.autoControls&&a!==!0&&G("start"))},e.getCurrentSlide=function(){return d.active.index},e.getCurrentSlideElement=function(){return d.children.eq(d.active.index)},e.getSlideElement=function(a){return d.children.eq(a)},e.getSlideCount=function(){return d.children.length},e.isWorking=function(){return d.working},e.redrawSlider=function(){d.children.add(e.find(".bx-clone")).outerWidth(o()),d.viewport.css("height",m()),d.settings.ticker||s(),d.active.last&&(d.active.index=q()-1),d.active.index>=q()&&(d.active.last=!0),d.settings.pager&&!d.settings.pagerCustom&&(u(),E(d.active.index)),d.settings.ariaHidden&&T(d.active.index*r())},e.destroySlider=function(){d.initialized&&(d.initialized=!1,a(".bx-clone",this).remove(),d.children.each(function(){void 0!==a(this).data("origStyle")?a(this).attr("style",a(this).data("origStyle")):a(this).removeAttr("style")}),void 0!==a(this).data("origStyle")?this.attr("style",a(this).data("origStyle")):a(this).removeAttr("style"),a(this).unwrap().unwrap(),d.controls.el&&d.controls.el.remove(),d.controls.next&&d.controls.next.remove(),d.controls.prev&&d.controls.prev.remove(),d.pagerEl&&d.settings.controls&&!d.settings.pagerCustom&&d.pagerEl.remove(),a(".bx-caption",this).remove(),d.controls.autoEl&&d.controls.autoEl.remove(),clearInterval(d.interval),d.settings.responsive&&a(window).unbind("resize",S),d.settings.keyboardEnabled&&a(document).unbind("keydown",M),a(this).removeData("bxSlider"))},e.reloadSlider=function(b){void 0!==b&&(c=b),e.destroySlider(),h(),a(e).data("bxSlider",this)},h(),a(e).data("bxSlider",this),this}}}(jQuery);
|
includes/libraries/bxslider-4/package.json
CHANGED
@@ -1,33 +1,51 @@
|
|
1 |
{
|
2 |
"name": "bxslider",
|
3 |
-
"
|
4 |
-
"
|
5 |
"homepage": "http://bxslider.com",
|
6 |
-
"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7 |
"repository": {
|
8 |
"type": "git",
|
9 |
-
"url": "
|
10 |
},
|
11 |
"bugs": {
|
12 |
"url": "https://github.com/stevenwanderski/bxslider-4/issues"
|
13 |
},
|
14 |
-
"licenses": [
|
15 |
-
{
|
16 |
-
"type": "MIT",
|
17 |
-
"url": "http://opensource.org/licenses/MIT"
|
18 |
-
}
|
19 |
-
],
|
20 |
"devDependencies": {
|
21 |
-
"
|
22 |
-
"
|
23 |
-
"
|
24 |
-
"
|
25 |
-
"
|
26 |
-
"
|
27 |
-
"
|
28 |
-
"
|
29 |
-
"
|
30 |
-
"
|
31 |
-
"
|
32 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
33 |
}
|
1 |
{
|
2 |
"name": "bxslider",
|
3 |
+
"description": "Touch enabled jQuery plugin for creating responsive carousels and sliders.",
|
4 |
+
"version": "4.2.5",
|
5 |
"homepage": "http://bxslider.com",
|
6 |
+
"author": {
|
7 |
+
"name": "Steven Wanderski",
|
8 |
+
"email": "steven@bxcreative.com",
|
9 |
+
"url": "http://stevenwanderski.com"
|
10 |
+
},
|
11 |
+
"license": {
|
12 |
+
"type": "MIT",
|
13 |
+
"url": "http://opensource.org/licenses/MIT"
|
14 |
+
},
|
15 |
"repository": {
|
16 |
"type": "git",
|
17 |
+
"url": "https://github.com/stevenwanderski/bxslider-4/bxslider-4.git"
|
18 |
},
|
19 |
"bugs": {
|
20 |
"url": "https://github.com/stevenwanderski/bxslider-4/issues"
|
21 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
22 |
"devDependencies": {
|
23 |
+
"assemble": "~0.4.37",
|
24 |
+
"grunt": "~0.4.5",
|
25 |
+
"grunt-contrib-clean": "~0.5.0",
|
26 |
+
"grunt-contrib-compress": "~0.9.1",
|
27 |
+
"grunt-contrib-concat": "~0.4.0",
|
28 |
+
"grunt-contrib-connect": "~0.7.1",
|
29 |
+
"grunt-contrib-copy": "~0.5.0",
|
30 |
+
"grunt-contrib-cssmin": "^0.9.0",
|
31 |
+
"grunt-contrib-less": ">=1.0.0",
|
32 |
+
"grunt-contrib-uglify": "^0.4.0",
|
33 |
+
"grunt-contrib-watch": "^0.6.1",
|
34 |
+
"grunt-jscs-checker": "~0.4.2",
|
35 |
+
"grunt-contrib-jshint": "^0.10.0",
|
36 |
+
"load-grunt-tasks": "^0.4.0",
|
37 |
+
"pretty": "^0.1.2",
|
38 |
+
"handlebars-helpers": "~0.5.8"
|
39 |
+
},
|
40 |
+
"engines": {
|
41 |
+
"node": "~0.10.28"
|
42 |
+
},
|
43 |
+
"keywords": [
|
44 |
+
"responsive",
|
45 |
+
"carousel",
|
46 |
+
"bxslider",
|
47 |
+
"jQuery",
|
48 |
+
"plugin"
|
49 |
+
],
|
50 |
+
"private": true
|
51 |
}
|
includes/libraries/bxslider-4/readme.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
-
#bxSlider 4.2.
|
2 |
##The fully-loaded, responsive jQuery content slider
|
3 |
|
4 |
###Why should I use this slider?
|
@@ -29,7 +29,7 @@ First and most important, the jQuery library needs to be included (no need to do
|
|
29 |
|
30 |
```html
|
31 |
<!-- jQuery library (served from Google) -->
|
32 |
-
<script src="
|
33 |
<!-- bxSlider Javascript file -->
|
34 |
<script src="/js/jquery.bxslider.min.js"></script>
|
35 |
<!-- bxSlider CSS file -->
|
@@ -51,7 +51,7 @@ Create a `<ul class="bxslider">` element, with a `<li>` for each slide. Slides c
|
|
51 |
|
52 |
###Step 3: Call the bxSlider
|
53 |
|
54 |
-
Call .
|
55 |
|
56 |
```javascript
|
57 |
$(document).ready(function(){
|
@@ -362,6 +362,12 @@ Slides will automatically transition
|
|
362 |
default: false
|
363 |
options: boolean (true / false)
|
364 |
```
|
|
|
|
|
|
|
|
|
|
|
|
|
365 |
|
366 |
**pause**
|
367 |
The amount of time (in ms) between each auto transition
|
@@ -428,6 +434,37 @@ default: 0
|
|
428 |
options: integer
|
429 |
```
|
430 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
431 |
###Callbacks
|
432 |
|
433 |
**onSliderLoad**
|
@@ -550,6 +587,14 @@ slider = $('.bxslider').bxSlider();
|
|
550 |
var slideQty = slider.getSlideCount();
|
551 |
```
|
552 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
553 |
**reloadSlider**
|
554 |
Reload the slider. Useful when adding slides on the fly. Accepts an optional settings object. <a href="/examples/reload-slider-settings">See here for an example.</a>
|
555 |
```
|
@@ -566,8 +611,59 @@ slider = $('.bxslider').bxSlider();
|
|
566 |
slider.destroySlider();
|
567 |
```
|
568 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
569 |
## Changelog
|
570 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
571 |
### Version 4.2.3
|
572 |
* Minor bug fix
|
573 |
|
1 |
+
#bxSlider 4.2.5
|
2 |
##The fully-loaded, responsive jQuery content slider
|
3 |
|
4 |
###Why should I use this slider?
|
29 |
|
30 |
```html
|
31 |
<!-- jQuery library (served from Google) -->
|
32 |
+
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
|
33 |
<!-- bxSlider Javascript file -->
|
34 |
<script src="/js/jquery.bxslider.min.js"></script>
|
35 |
<!-- bxSlider CSS file -->
|
51 |
|
52 |
###Step 3: Call the bxSlider
|
53 |
|
54 |
+
Call .bxSlider() on `<ul class="bxslider">`. Note that the call must be made inside of a $(document).ready() call, or the plugin will not work!
|
55 |
|
56 |
```javascript
|
57 |
$(document).ready(function(){
|
362 |
default: false
|
363 |
options: boolean (true / false)
|
364 |
```
|
365 |
+
**stopAutoOnClick**
|
366 |
+
Auto will stop on interaction with controls
|
367 |
+
```
|
368 |
+
default: false
|
369 |
+
options: boolean (true / false)
|
370 |
+
```
|
371 |
|
372 |
**pause**
|
373 |
The amount of time (in ms) between each auto transition
|
434 |
options: integer
|
435 |
```
|
436 |
|
437 |
+
**shrinkItems**
|
438 |
+
The Carousel will only show whole items and shrink the images to fit the viewport based on maxSlides/MinSlides.
|
439 |
+
```
|
440 |
+
default: false
|
441 |
+
options: boolean (true / false)
|
442 |
+
```
|
443 |
+
|
444 |
+
###Keyboard
|
445 |
+
|
446 |
+
**keyboardEnabled**
|
447 |
+
Allows for keyboard control of visible slider. Keypress ignored if slider not visible.
|
448 |
+
```
|
449 |
+
default: false
|
450 |
+
options: boolean (true / false)
|
451 |
+
```
|
452 |
+
|
453 |
+
###Accessibility
|
454 |
+
**ariaLive**
|
455 |
+
Adds Aria Live attribute to slider.
|
456 |
+
```
|
457 |
+
default: true
|
458 |
+
options: boolean (true / false)
|
459 |
+
```
|
460 |
+
|
461 |
+
**ariaHidden**
|
462 |
+
Adds Aria Hidden attribute to any nonvisible slides.
|
463 |
+
```
|
464 |
+
default: true
|
465 |
+
options: boolean (true / false)
|
466 |
+
```
|
467 |
+
|
468 |
###Callbacks
|
469 |
|
470 |
**onSliderLoad**
|
587 |
var slideQty = slider.getSlideCount();
|
588 |
```
|
589 |
|
590 |
+
**redrawSlider**
|
591 |
+
Redraw the slider. Useful when needing to redraw a hidden slider after it is unhidden.
|
592 |
+
```
|
593 |
+
example:
|
594 |
+
slider = $('.bxslider').bxSlider();
|
595 |
+
slider.redrawSlider();
|
596 |
+
```
|
597 |
+
|
598 |
**reloadSlider**
|
599 |
Reload the slider. Useful when adding slides on the fly. Accepts an optional settings object. <a href="/examples/reload-slider-settings">See here for an example.</a>
|
600 |
```
|
611 |
slider.destroySlider();
|
612 |
```
|
613 |
|
614 |
+
### Install Grunt and Bower
|
615 |
+
|
616 |
+
**Unfamiliar with npm? Don't have node installed?** [Download and install node.js](http://nodejs.org/download/) before proceeding.
|
617 |
+
|
618 |
+
From the command line:
|
619 |
+
|
620 |
+
1. Install `grunt-cli` and `bower` globally with `npm install -g grunt-cli bower`.
|
621 |
+
2. Run `npm install`. npm will look at `package.json` and automatically install the necessary dependencies.
|
622 |
+
3. Run `bower install`, which installs front-end packages defined in `bower.json`.
|
623 |
+
|
624 |
+
When completed, you'll be able to run the various Grunt commands provided from the command line.
|
625 |
+
|
626 |
+
### Available Grunt commands
|
627 |
+
|
628 |
+
* `grunt` — Clean, Compile LESS to CSS, concatenate and validate JS, build documentation.
|
629 |
+
* `grunt dist` — Clean, Compile LESS to CSS, concatenate and validate JS for plugin only.
|
630 |
+
* `grunt docs` — Clean, build documentation only.
|
631 |
+
* `grunt watch` — loads LiveReload, connects, and watches all assets.
|
632 |
+
* `grunt zip` — Creates a zip of `/dist` and places it in `/download`.
|
633 |
+
|
634 |
+
## Contributing
|
635 |
+
|
636 |
+
Everyone is welcome to help [contribute](CONTRIBUTING.md) and improve this project. There are several ways you can contribute:
|
637 |
+
|
638 |
+
* Reporting issues (please read [issue guidelines](https://github.com/necolas/issue-guidelines))
|
639 |
+
* Suggesting new features
|
640 |
+
* Writing or refactoring code
|
641 |
+
* Fixing [issues](https://github.com/roots/roots/issues)
|
642 |
+
|
643 |
## Changelog
|
644 |
|
645 |
+
### Version 4.2.5
|
646 |
+
* Fix: Vertical carousel minSlides not working #840
|
647 |
+
* Fix: slider breaks with css animations if settings.speed set to 0 #838
|
648 |
+
* Fix: Slider runs into undefined state when reloadSlider is called before initialization was finished #833
|
649 |
+
|
650 |
+
### Version 4.2.4
|
651 |
+
NOTICE: We have switched to a Grunt based build process in order to leverage [Assemble](http://assemble.io) for local documentation building. Please review the above notes about Grunt for the commands available.
|
652 |
+
|
653 |
+
* Fix: Fixed transition from first to last slide during infinite loop #778
|
654 |
+
* Fix: Reload on multiple sliders doesn't work? #755
|
655 |
+
* Fix: bxSlider with text only #746
|
656 |
+
* Fix: bower missing main and ignore entries #738
|
657 |
+
* Fix: Tickermode transitionend event bubbling #737
|
658 |
+
* Fix: Initializing before destroyed breaks slider #748
|
659 |
+
* Enhancement: Added shrinkItems carousel setting #772
|
660 |
+
* Enhancement: Maintain auto display of slides after a manual selection #594
|
661 |
+
* Enhancement: Slider getter through jquery object #739
|
662 |
+
* Enhancement: Add aria attributes #751
|
663 |
+
* Enhancement: Slider element in every callback and a new method getSliderElement (#780)
|
664 |
+
* Enhancement: Local Documentiation and examples. I have added buildable documentation to the repo. This will expand over time and allow for community corrections as needed. Please see above Grunt notes on how to build.
|
665 |
+
|
666 |
+
|
667 |
### Version 4.2.3
|
668 |
* Minor bug fix
|
669 |
|
includes/libraries/bxslider-4/src/js/jquery.bxslider.js
CHANGED
@@ -1,1543 +1,1606 @@
|
|
1 |
-
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
|
267 |
-
|
268 |
-
|
269 |
-
|
270 |
-
|
271 |
-
|
272 |
-
|
273 |
-
|
274 |
-
|
275 |
-
|
276 |
-
|
277 |
-
|
278 |
-
|
279 |
-
|
280 |
-
|
281 |
-
|
282 |
-
|
283 |
-
|
284 |
-
|
285 |
-
|
286 |
-
|
287 |
-
|
288 |
-
|
289 |
-
|
290 |
-
|
291 |
-
|
292 |
-
|
293 |
-
|
294 |
-
|
295 |
-
|
296 |
-
|
297 |
-
|
298 |
-
|
299 |
-
|
300 |
-
|
301 |
-
|
302 |
-
|
303 |
-
|
304 |
-
|
305 |
-
|
306 |
-
|
307 |
-
|
308 |
-
|
309 |
-
|
310 |
-
|
311 |
-
|
312 |
-
|
313 |
-
|
314 |
-
|
315 |
-
|
316 |
-
|
317 |
-
|
318 |
-
|
319 |
-
|
320 |
-
|
321 |
-
|
322 |
-
|
323 |
-
|
324 |
-
|
325 |
-
|
326 |
-
|
327 |
-
|
328 |
-
|
329 |
-
|
330 |
-
|
331 |
-
|
332 |
-
|
333 |
-
|
334 |
-
|
335 |
-
|
336 |
-
|
337 |
-
|
338 |
-
|
339 |
-
|
340 |
-
|
341 |
-
|
342 |
-
|
343 |
-
|
344 |
-
|
345 |
-
|
346 |
-
|
347 |
-
|
348 |
-
|
349 |
-
|
350 |
-
|
351 |
-
|
352 |
-
|
353 |
-
|
354 |
-
|
355 |
-
|
356 |
-
|
357 |
-
|
358 |
-
|
359 |
-
|
360 |
-
|
361 |
-
|
362 |
-
|
363 |
-
|
364 |
-
|
365 |
-
|
366 |
-
|
367 |
-
|
368 |
-
|
369 |
-
|
370 |
-
|
371 |
-
|
372 |
-
|
373 |
-
|
374 |
-
|
375 |
-
|
376 |
-
|
377 |
-
|
378 |
-
|
379 |
-
|
380 |
-
|
381 |
-
|
382 |
-
|
383 |
-
|
384 |
-
|
385 |
-
|
386 |
-
|
387 |
-
|
388 |
-
|
389 |
-
|
390 |
-
|
391 |
-
|
392 |
-
|
393 |
-
|
394 |
-
|
395 |
-
|
396 |
-
|
397 |
-
|
398 |
-
|
399 |
-
|
400 |
-
|
401 |
-
|
402 |
-
|
403 |
-
|
404 |
-
|
405 |
-
|
406 |
-
|
407 |
-
|
408 |
-
|
409 |
-
|
410 |
-
|
411 |
-
|
412 |
-
|
413 |
-
|
414 |
-
|
415 |
-
|
416 |
-
|
417 |
-
|
418 |
-
|
419 |
-
|
420 |
-
|
421 |
-
|
422 |
-
|
423 |
-
|
424 |
-
|
425 |
-
|
426 |
-
|
427 |
-
|
428 |
-
|
429 |
-
|
430 |
-
|
431 |
-
|
432 |
-
|
433 |
-
|
434 |
-
|
435 |
-
|
436 |
-
|
437 |
-
|
438 |
-
|
439 |
-
|
440 |
-
|
441 |
-
|
442 |
-
|
443 |
-
|
444 |
-
|
445 |
-
|
446 |
-
|
447 |
-
|
448 |
-
|
449 |
-
|
450 |
-
|
451 |
-
|
452 |
-
|
453 |
-
|
454 |
-
|
455 |
-
|
456 |
-
|
457 |
-
|
458 |
-
|
459 |
-
|
460 |
-
|
461 |
-
|
462 |
-
|
463 |
-
|
464 |
-
|
465 |
-
|
466 |
-
|
467 |
-
|
468 |
-
|
469 |
-
|
470 |
-
|
471 |
-
|
472 |
-
|
473 |
-
|
474 |
-
|
475 |
-
|
476 |
-
|
477 |
-
|
478 |
-
|
479 |
-
|
480 |
-
|
481 |
-
|
482 |
-
|
483 |
-
|
484 |
-
|
485 |
-
|
486 |
-
|
487 |
-
|
488 |
-
|
489 |
-
|
490 |
-
|
491 |
-
|
492 |
-
|
493 |
-
|
494 |
-
|
495 |
-
|
496 |
-
|
497 |
-
|
498 |
-
|
499 |
-
|
500 |
-
|
501 |
-
|
502 |
-
|
503 |
-
|
504 |
-
|
505 |
-
|
506 |
-
|
507 |
-
|
508 |
-
|
509 |
-
|
510 |
-
|
511 |
-
|
512 |
-
|
513 |
-
|
514 |
-
|
515 |
-
|
516 |
-
|
517 |
-
|
518 |
-
|
519 |
-
|
520 |
-
|
521 |
-
|
522 |
-
|
523 |
-
|
524 |
-
|
525 |
-
|
526 |
-
|
527 |
-
|
528 |
-
|
529 |
-
|
530 |
-
|
531 |
-
|
532 |
-
|
533 |
-
|
534 |
-
|
535 |
-
|
536 |
-
|
537 |
-
|
538 |
-
|
539 |
-
|
540 |
-
|
541 |
-
|
542 |
-
|
543 |
-
|
544 |
-
|
545 |
-
|
546 |
-
|
547 |
-
|
548 |
-
|
549 |
-
|
550 |
-
|
551 |
-
|
552 |
-
|
553 |
-
|
554 |
-
|
555 |
-
|
556 |
-
|
557 |
-
|
558 |
-
|
559 |
-
|
560 |
-
|
561 |
-
|
562 |
-
|
563 |
-
|
564 |
-
|
565 |
-
|
566 |
-
|
567 |
-
|
568 |
-
|
569 |
-
|
570 |
-
|
571 |
-
|
572 |
-
|
573 |
-
|
574 |
-
|
575 |
-
|
576 |
-
|
577 |
-
|
578 |
-
|
579 |
-
|
580 |
-
|
581 |
-
|
582 |
-
|
583 |
-
|
584 |
-
|
585 |
-
|
586 |
-
|
587 |
-
|
588 |
-
|
589 |
-
|
590 |
-
|
591 |
-
|
592 |
-
|
593 |
-
|
594 |
-
|
595 |
-
|
596 |
-
|
597 |
-
|
598 |
-
|
599 |
-
|
600 |
-
|
601 |
-
|
602 |
-
|
603 |
-
|
604 |
-
|
605 |
-
|
606 |
-
|
607 |
-
|
608 |
-
|
609 |
-
|
610 |
-
|
611 |
-
|
612 |
-
|
613 |
-
|
614 |
-
|
615 |
-
|
616 |
-
|
617 |
-
|
618 |
-
|
619 |
-
|
620 |
-
|
621 |
-
|
622 |
-
|
623 |
-
|
624 |
-
|
625 |
-
|
626 |
-
|
627 |
-
|
628 |
-
|
629 |
-
|
630 |
-
|
631 |
-
|
632 |
-
|
633 |
-
|
634 |
-
|
635 |
-
|
636 |
-
|
637 |
-
|
638 |
-
|
639 |
-
|
640 |
-
|
641 |
-
|
642 |
-
|
643 |
-
|
644 |
-
|
645 |
-
|
646 |
-
|
647 |
-
|
648 |
-
|
649 |
-
|
650 |
-
|
651 |
-
|
652 |
-
|
653 |
-
|
654 |
-
|
655 |
-
|
656 |
-
|
657 |
-
|
658 |
-
|
659 |
-
|
660 |
-
|
661 |
-
|
662 |
-
|
663 |
-
|
664 |
-
|
665 |
-
|
666 |
-
|
667 |
-
|
668 |
-
|
669 |
-
|
670 |
-
|
671 |
-
|
672 |
-
|
673 |
-
|
674 |
-
|
675 |
-
|
676 |
-
|
677 |
-
|
678 |
-
|
679 |
-
|
680 |
-
|
681 |
-
|
682 |
-
|
683 |
-
|
684 |
-
|
685 |
-
|
686 |
-
|
687 |
-
|
688 |
-
|
689 |
-
|
690 |
-
|
691 |
-
|
692 |
-
|
693 |
-
|
694 |
-
|
695 |
-
|
696 |
-
|
697 |
-
|
698 |
-
|
699 |
-
|
700 |
-
|
701 |
-
|
702 |
-
|
703 |
-
|
704 |
-
|
705 |
-
|
706 |
-
|
707 |
-
|
708 |
-
|
709 |
-
|
710 |
-
|
711 |
-
|
712 |
-
|
713 |
-
|
714 |
-
|
715 |
-
|
716 |
-
|
717 |
-
|
718 |
-
|
719 |
-
|
720 |
-
|
721 |
-
|
722 |
-
|
723 |
-
|
724 |
-
|
725 |
-
|
726 |
-
|
727 |
-
|
728 |
-
|
729 |
-
|
730 |
-
|
731 |
-
|
732 |
-
|
733 |
-
|
734 |
-
|
735 |
-
|
736 |
-
|
737 |
-
|
738 |
-
|
739 |
-
|
740 |
-
|
741 |
-
|
742 |
-
|
743 |
-
|
744 |
-
|
745 |
-
|
746 |
-
|
747 |
-
|
748 |
-
|
749 |
-
|
750 |
-
|
751 |
-
|
752 |
-
|
753 |
-
|
754 |
-
|
755 |
-
|
756 |
-
|
757 |
-
|
758 |
-
|
759 |
-
|
760 |
-
|
761 |
-
|
762 |
-
|
763 |
-
|
764 |
-
|
765 |
-
|
766 |
-
|
767 |
-
|
768 |
-
|
769 |
-
|
770 |
-
|
771 |
-
|
772 |
-
|
773 |
-
|
774 |
-
|
775 |
-
|
776 |
-
|
777 |
-
|
778 |
-
|
779 |
-
|
780 |
-
|
781 |
-
|
782 |
-
|
783 |
-
|
784 |
-
|
785 |
-
|
786 |
-
|
787 |
-
|
788 |
-
|
789 |
-
|
790 |
-
|
791 |
-
|
792 |
-
|
793 |
-
|
794 |
-
|
795 |
-
|
796 |
-
|
797 |
-
|
798 |
-
|
799 |
-
|
800 |
-
|
801 |
-
|
802 |
-
|
803 |
-
|
804 |
-
|
805 |
-
|
806 |
-
|
807 |
-
|
808 |
-
|
809 |
-
|
810 |
-
|
811 |
-
|
812 |
-
|
813 |
-
|
814 |
-
|
815 |
-
|
816 |
-
|
817 |
-
|
818 |
-
|
819 |
-
|
820 |
-
|
821 |
-
|
822 |
-
|
823 |
-
|
824 |
-
|
825 |
-
|
826 |
-
|
827 |
-
|
828 |
-
|
829 |
-
|
830 |
-
|
831 |
-
|
832 |
-
|
833 |
-
|
834 |
-
|
835 |
-
|
836 |
-
|
837 |
-
|
838 |
-
|
839 |
-
|
840 |
-
|
841 |
-
|
842 |
-
|
843 |
-
|
844 |
-
|
845 |
-
|
846 |
-
|
847 |
-
|
848 |
-
|
849 |
-
|
850 |
-
|
851 |
-
|
852 |
-
|
853 |
-
|
854 |
-
|
855 |
-
|
856 |
-
|
857 |
-
|
858 |
-
|
859 |
-
|
860 |
-
|
861 |
-
|
862 |
-
|
863 |
-
|
864 |
-
|
865 |
-
|
866 |
-
|
867 |
-
|
868 |
-
|
869 |
-
|
870 |
-
|
871 |
-
|
872 |
-
|
873 |
-
|
874 |
-
|
875 |
-
|
876 |
-
|
877 |
-
|
878 |
-
|
879 |
-
|
880 |
-
|
881 |
-
|
882 |
-
|
883 |
-
|
884 |
-
|
885 |
-
|
886 |
-
|
887 |
-
|
888 |
-
|
889 |
-
|
890 |
-
|
891 |
-
|
892 |
-
|
893 |
-
|
894 |
-
|
895 |
-
|
896 |
-
|
897 |
-
|
898 |
-
|
899 |
-
|
900 |
-
|
901 |
-
|
902 |
-
|
903 |
-
|
904 |
-
|
905 |
-
|
906 |
-
|
907 |
-
|
908 |
-
|
909 |
-
|
910 |
-
|
911 |
-
|
912 |
-
|
913 |
-
|
914 |
-
|
915 |
-
|
916 |
-
|
917 |
-
|
918 |
-
|
919 |
-
|
920 |
-
|
921 |
-
|
922 |
-
|
923 |
-
|
924 |
-
|
925 |
-
|
926 |
-
|
927 |
-
|
928 |
-
|
929 |
-
|
930 |
-
|
931 |
-
|
932 |
-
|
933 |
-
|
934 |
-
|
935 |
-
|
936 |
-
|
937 |
-
|
938 |
-
|
939 |
-
|
940 |
-
|
941 |
-
|
942 |
-
|
943 |
-
|
944 |
-
|
945 |
-
|
946 |
-
|
947 |
-
|
948 |
-
|
949 |
-
|
950 |
-
|
951 |
-
|
952 |
-
|
953 |
-
|
954 |
-
|
955 |
-
|
956 |
-
|
957 |
-
|
958 |
-
|
959 |
-
|
960 |
-
|
961 |
-
|
962 |
-
|
963 |
-
|
964 |
-
|
965 |
-
|
966 |
-
|
967 |
-
|
968 |
-
|
969 |
-
|
970 |
-
|
971 |
-
|
972 |
-
|
973 |
-
|
974 |
-
|
975 |
-
|
976 |
-
|
977 |
-
|
978 |
-
|
979 |
-
|
980 |
-
|
981 |
-
|
982 |
-
|
983 |
-
|
984 |
-
|
985 |
-
|
986 |
-
|
987 |
-
|
988 |
-
|
989 |
-
|
990 |
-
|
991 |
-
|
992 |
-
|
993 |
-
|
994 |
-
|
995 |
-
|
996 |
-
|
997 |
-
|
998 |
-
|
999 |
-
|
1000 |
-
|
1001 |
-
|
1002 |
-
|
1003 |
-
|
1004 |
-
|
1005 |
-
|
1006 |
-
|
1007 |
-
|
1008 |
-
|
1009 |
-
|
1010 |
-
|
1011 |
-
|
1012 |
-
|
1013 |
-
|
1014 |
-
|
1015 |
-
|
1016 |
-
|
1017 |
-
|
1018 |
-
|
1019 |
-
|
1020 |
-
|
1021 |
-
|
1022 |
-
|
1023 |
-
|
1024 |
-
|
1025 |
-
|
1026 |
-
|
1027 |
-
|
1028 |
-
|
1029 |
-
|
1030 |
-
|
1031 |
-
|
1032 |
-
|
1033 |
-
|
1034 |
-
|
1035 |
-
|
1036 |
-
|
1037 |
-
|
1038 |
-
|
1039 |
-
|
1040 |
-
|
1041 |
-
|
1042 |
-
|
1043 |
-
|
1044 |
-
|
1045 |
-
|
1046 |
-
|
1047 |
-
|
1048 |
-
|
1049 |
-
|
1050 |
-
|
1051 |
-
|
1052 |
-
|
1053 |
-
|
1054 |
-
|
1055 |
-
|
1056 |
-
|
1057 |
-
|
1058 |
-
|
1059 |
-
|
1060 |
-
|
1061 |
-
|
1062 |
-
|
1063 |
-
|
1064 |
-
|
1065 |
-
|
1066 |
-
|
1067 |
-
|
1068 |
-
|
1069 |
-
|
1070 |
-
|
1071 |
-
|
1072 |
-
|
1073 |
-
|
1074 |
-
|
1075 |
-
|
1076 |
-
|
1077 |
-
|
1078 |
-
|
1079 |
-
|
1080 |
-
|
1081 |
-
|
1082 |
-
|
1083 |
-
|
1084 |
-
|
1085 |
-
|
1086 |
-
|
1087 |
-
|
1088 |
-
|
1089 |
-
|
1090 |
-
|
1091 |
-
|
1092 |
-
|
1093 |
-
|
1094 |
-
|
1095 |
-
|
1096 |
-
|
1097 |
-
|
1098 |
-
|
1099 |
-
|
1100 |
-
|
1101 |
-
|
1102 |
-
|
1103 |
-
|
1104 |
-
|
1105 |
-
|
1106 |
-
|
1107 |
-
|
1108 |
-
|
1109 |
-
|
1110 |
-
|
1111 |
-
|
1112 |
-
|
1113 |
-
|
1114 |
-
|
1115 |
-
|
1116 |
-
|
1117 |
-
|
1118 |
-
|
1119 |
-
|
1120 |
-
|
1121 |
-
|
1122 |
-
|
1123 |
-
|
1124 |
-
|
1125 |
-
|
1126 |
-
|
1127 |
-
|
1128 |
-
|
1129 |
-
|
1130 |
-
|
1131 |
-
|
1132 |
-
|
1133 |
-
|
1134 |
-
|
1135 |
-
|
1136 |
-
|
1137 |
-
|
1138 |
-
|
1139 |
-
|
1140 |
-
|
1141 |
-
|
1142 |
-
|
1143 |
-
|
1144 |
-
|
1145 |
-
|
1146 |
-
|
1147 |
-
|
1148 |
-
|
1149 |
-
|
1150 |
-
|
1151 |
-
|
1152 |
-
|
1153 |
-
|
1154 |
-
|
1155 |
-
|
1156 |
-
|
1157 |
-
|
1158 |
-
|
1159 |
-
|
1160 |
-
|
1161 |
-
|
1162 |
-
|
1163 |
-
|
1164 |
-
|
1165 |
-
|
1166 |
-
|
1167 |
-
|
1168 |
-
|
1169 |
-
|
1170 |
-
|
1171 |
-
|
1172 |
-
|
1173 |
-
|
1174 |
-
|
1175 |
-
|
1176 |
-
|
1177 |
-
|
1178 |
-
|
1179 |
-
|
1180 |
-
|
1181 |
-
|
1182 |
-
|
1183 |
-
|
1184 |
-
|
1185 |
-
|
1186 |
-
|
1187 |
-
|
1188 |
-
|
1189 |
-
|
1190 |
-
|
1191 |
-
|
1192 |
-
|
1193 |
-
|
1194 |
-
|
1195 |
-
|
1196 |
-
|
1197 |
-
|
1198 |
-
|
1199 |
-
|
1200 |
-
|
1201 |
-
|
1202 |
-
|
1203 |
-
|
1204 |
-
|
1205 |
-
|
1206 |
-
|
1207 |
-
|
1208 |
-
|
1209 |
-
|
1210 |
-
|
1211 |
-
|
1212 |
-
|
1213 |
-
|
1214 |
-
|
1215 |
-
|
1216 |
-
|
1217 |
-
|
1218 |
-
|
1219 |
-
|
1220 |
-
|
1221 |
-
|
1222 |
-
|
1223 |
-
|
1224 |
-
|
1225 |
-
|
1226 |
-
|
1227 |
-
|
1228 |
-
|
1229 |
-
|
1230 |
-
|
1231 |
-
|
1232 |
-
|
1233 |
-
|
1234 |
-
|
1235 |
-
|
1236 |
-
|
1237 |
-
|
1238 |
-
|
1239 |
-
|
1240 |
-
|
1241 |
-
|
1242 |
-
|
1243 |
-
|
1244 |
-
|
1245 |
-
|
1246 |
-
|
1247 |
-
|
1248 |
-
|
1249 |
-
|
1250 |
-
|
1251 |
-
|
1252 |
-
|
1253 |
-
|
1254 |
-
|
1255 |
-
|
1256 |
-
|
1257 |
-
|
1258 |
-
|
1259 |
-
|
1260 |
-
|
1261 |
-
|
1262 |
-
|
1263 |
-
|
1264 |
-
|
1265 |
-
|
1266 |
-
|
1267 |
-
|
1268 |
-
|
1269 |
-
|
1270 |
-
|
1271 |
-
|
1272 |
-
|
1273 |
-
|
1274 |
-
|
1275 |
-
|
1276 |
-
|
1277 |
-
|
1278 |
-
|
1279 |
-
|
1280 |
-
|
1281 |
-
|
1282 |
-
|
1283 |
-
|
1284 |
-
|
1285 |
-
|
1286 |
-
|
1287 |
-
|
1288 |
-
|
1289 |
-
|
1290 |
-
|
1291 |
-
|
1292 |
-
|
1293 |
-
|
1294 |
-
|
1295 |
-
|
1296 |
-
|
1297 |
-
|
1298 |
-
|
1299 |
-
|
1300 |
-
|
1301 |
-
|
1302 |
-
|
1303 |
-
|
1304 |
-
|
1305 |
-
|
1306 |
-
|
1307 |
-
|
1308 |
-
|
1309 |
-
|
1310 |
-
|
1311 |
-
|
1312 |
-
|
1313 |
-
|
1314 |
-
|
1315 |
-
|
1316 |
-
|
1317 |
-
|
1318 |
-
|
1319 |
-
|
1320 |
-
|
1321 |
-
|
1322 |
-
|
1323 |
-
|
1324 |
-
|
1325 |
-
|
1326 |
-
|
1327 |
-
|
1328 |
-
|
1329 |
-
|
1330 |
-
|
1331 |
-
|
1332 |
-
|
1333 |
-
|
1334 |
-
|
1335 |
-
|
1336 |
-
|
1337 |
-
|
1338 |
-
|
1339 |
-
|
1340 |
-
|
1341 |
-
|
1342 |
-
|
1343 |
-
|
1344 |
-
|
1345 |
-
|
1346 |
-
|
1347 |
-
|
1348 |
-
|
1349 |
-
|
1350 |
-
|
1351 |
-
|
1352 |
-
|
1353 |
-
|
1354 |
-
|
1355 |
-
|
1356 |
-
|
1357 |
-
|
1358 |
-
|
1359 |
-
|
1360 |
-
|
1361 |
-
|
1362 |
-
|
1363 |
-
|
1364 |
-
|
1365 |
-
|
1366 |
-
|
1367 |
-
|
1368 |
-
|
1369 |
-
|
1370 |
-
|
1371 |
-
|
1372 |
-
|
1373 |
-
|
1374 |
-
|
1375 |
-
|
1376 |
-
|
1377 |
-
|
1378 |
-
|
1379 |
-
|
1380 |
-
|
1381 |
-
|
1382 |
-
|
1383 |
-
|
1384 |
-
|
1385 |
-
|
1386 |
-
|
1387 |
-
|
1388 |
-
|
1389 |
-
|
1390 |
-
|
1391 |
-
|
1392 |
-
|
1393 |
-
|
1394 |
-
|
1395 |
-
|
1396 |
-
|
1397 |
-
|
1398 |
-
|
1399 |
-
|
1400 |
-
|
1401 |
-
|
1402 |
-
|
1403 |
-
|
1404 |
-
|
1405 |
-
|
1406 |
-
|
1407 |
-
|
1408 |
-
|
1409 |
-
|
1410 |
-
|
1411 |
-
|
1412 |
-
|
1413 |
-
|
1414 |
-
|
1415 |
-
|
1416 |
-
|
1417 |
-
|
1418 |
-
|
1419 |
-
|
1420 |
-
|
1421 |
-
|
1422 |
-
|
1423 |
-
|
1424 |
-
|
1425 |
-
|
1426 |
-
|
1427 |
-
|
1428 |
-
|
1429 |
-
|
1430 |
-
|
1431 |
-
|
1432 |
-
|
1433 |
-
|
1434 |
-
|
1435 |
-
|
1436 |
-
|
1437 |
-
|
1438 |
-
|
1439 |
-
|
1440 |
-
|
1441 |
-
|
1442 |
-
|
1443 |
-
|
1444 |
-
|
1445 |
-
|
1446 |
-
|
1447 |
-
|
1448 |
-
|
1449 |
-
|
1450 |
-
|
1451 |
-
|
1452 |
-
|
1453 |
-
|
1454 |
-
|
1455 |
-
|
1456 |
-
|
1457 |
-
|
1458 |
-
|
1459 |
-
|
1460 |
-
|
1461 |
-
|
1462 |
-
|
1463 |
-
|
1464 |
-
|
1465 |
-
|
1466 |
-
|
1467 |
-
|
1468 |
-
|
1469 |
-
|
1470 |
-
|
1471 |
-
|
1472 |
-
|
1473 |
-
|
1474 |
-
|
1475 |
-
|
1476 |
-
|
1477 |
-
|
1478 |
-
|
1479 |
-
|
1480 |
-
|
1481 |
-
|
1482 |
-
|
1483 |
-
|
1484 |
-
|
1485 |
-
|
1486 |
-
|
1487 |
-
|
1488 |
-
|
1489 |
-
|
1490 |
-
|
1491 |
-
|
1492 |
-
|
1493 |
-
|
1494 |
-
|
1495 |
-
|
1496 |
-
|
1497 |
-
|
1498 |
-
|
1499 |
-
|
1500 |
-
|
1501 |
-
|
1502 |
-
|
1503 |
-
|
1504 |
-
|
1505 |
-
|
1506 |
-
|
1507 |
-
|
1508 |
-
|
1509 |
-
|
1510 |
-
|
1511 |
-
|
1512 |
-
|
1513 |
-
|
1514 |
-
|
1515 |
-
|
1516 |
-
|
1517 |
-
|
1518 |
-
|
1519 |
-
|
1520 |
-
|
1521 |
-
|
1522 |
-
|
1523 |
-
|
1524 |
-
|
1525 |
-
|
1526 |
-
|
1527 |
-
|
1528 |
-
|
1529 |
-
|
1530 |
-
|
1531 |
-
|
1532 |
-
|
1533 |
-
|
1534 |
-
|
1535 |
-
|
1536 |
-
|
1537 |
-
|
1538 |
-
|
1539 |
-
|
1540 |
-
|
1541 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1542 |
|
1543 |
})(jQuery);
|
1 |
+
;(function($) {
|
2 |
+
|
3 |
+
var defaults = {
|
4 |
+
|
5 |
+
// GENERAL
|
6 |
+
mode: 'horizontal',
|
7 |
+
slideSelector: '',
|
8 |
+
infiniteLoop: true,
|
9 |
+
hideControlOnEnd: false,
|
10 |
+
speed: 500,
|
11 |
+
easing: null,
|
12 |
+
slideMargin: 0,
|
13 |
+
startSlide: 0,
|
14 |
+
randomStart: false,
|
15 |
+
captions: false,
|
16 |
+
ticker: false,
|
17 |
+
tickerHover: false,
|
18 |
+
adaptiveHeight: false,
|
19 |
+
adaptiveHeightSpeed: 500,
|
20 |
+
video: false,
|
21 |
+
useCSS: true,
|
22 |
+
preloadImages: 'visible',
|
23 |
+
responsive: true,
|
24 |
+
slideZIndex: 50,
|
25 |
+
wrapperClass: 'bx-wrapper',
|
26 |
+
|
27 |
+
// TOUCH
|
28 |
+
touchEnabled: true,
|
29 |
+
swipeThreshold: 50,
|
30 |
+
oneToOneTouch: true,
|
31 |
+
preventDefaultSwipeX: true,
|
32 |
+
preventDefaultSwipeY: false,
|
33 |
+
|
34 |
+
// ACCESSIBILITY
|
35 |
+
ariaLive: true,
|
36 |
+
ariaHidden: true,
|
37 |
+
|
38 |
+
// KEYBOARD
|
39 |
+
keyboardEnabled: false,
|
40 |
+
|
41 |
+
// PAGER
|
42 |
+
pager: true,
|
43 |
+
pagerType: 'full',
|
44 |
+
pagerShortSeparator: ' / ',
|
45 |
+
pagerSelector: null,
|
46 |
+
buildPager: null,
|
47 |
+
pagerCustom: null,
|
48 |
+
|
49 |
+
// CONTROLS
|
50 |
+
controls: true,
|
51 |
+
nextText: 'Next',
|
52 |
+
prevText: 'Prev',
|
53 |
+
nextSelector: null,
|
54 |
+
prevSelector: null,
|
55 |
+
autoControls: false,
|
56 |
+
startText: 'Start',
|
57 |
+
stopText: 'Stop',
|
58 |
+
autoControlsCombine: false,
|
59 |
+
autoControlsSelector: null,
|
60 |
+
|
61 |
+
// AUTO
|
62 |
+
auto: false,
|
63 |
+
pause: 4000,
|
64 |
+
autoStart: true,
|
65 |
+
autoDirection: 'next',
|
66 |
+
stopAutoOnClick: false,
|
67 |
+
autoHover: false,
|
68 |
+
autoDelay: 0,
|
69 |
+
autoSlideForOnePage: false,
|
70 |
+
|
71 |
+
// CAROUSEL
|
72 |
+
minSlides: 1,
|
73 |
+
maxSlides: 1,
|
74 |
+
moveSlides: 0,
|
75 |
+
slideWidth: 0,
|
76 |
+
shrinkItems: false,
|
77 |
+
|
78 |
+
// CALLBACKS
|
79 |
+
onSliderLoad: function() { return true; },
|
80 |
+
onSlideBefore: function() { return true; },
|
81 |
+
onSlideAfter: function() { return true; },
|
82 |
+
onSlideNext: function() { return true; },
|
83 |
+
onSlidePrev: function() { return true; },
|
84 |
+
onSliderResize: function() { return true; }
|
85 |
+
};
|
86 |
+
|
87 |
+
$.fn.bxSlider = function(options) {
|
88 |
+
|
89 |
+
if (this.length === 0) {
|
90 |
+
return this;
|
91 |
+
}
|
92 |
+
|
93 |
+
// support multiple elements
|
94 |
+
if (this.length > 1) {
|
95 |
+
this.each(function() {
|
96 |
+
$(this).bxSlider(options);
|
97 |
+
});
|
98 |
+
return this;
|
99 |
+
}
|
100 |
+
|
101 |
+
// create a namespace to be used throughout the plugin
|
102 |
+
var slider = {},
|
103 |
+
// set a reference to our slider element
|
104 |
+
el = this,
|
105 |
+
// get the original window dimens (thanks a lot IE)
|
106 |
+
windowWidth = $(window).width(),
|
107 |
+
windowHeight = $(window).height();
|
108 |
+
|
109 |
+
// Return if slider is already initialized
|
110 |
+
if ($(el).data('bxSlider')) { return; }
|
111 |
+
|
112 |
+
/**
|
113 |
+
* ===================================================================================
|
114 |
+
* = PRIVATE FUNCTIONS
|
115 |
+
* ===================================================================================
|
116 |
+
*/
|
117 |
+
|
118 |
+
/**
|
119 |
+
* Initializes namespace settings to be used throughout plugin
|
120 |
+
*/
|
121 |
+
var init = function() {
|
122 |
+
// Return if slider is already initialized
|
123 |
+
if ($(el).data('bxSlider')) { return; }
|
124 |
+
// merge user-supplied options with the defaults
|
125 |
+
slider.settings = $.extend({}, defaults, options);
|
126 |
+
// parse slideWidth setting
|
127 |
+
slider.settings.slideWidth = parseInt(slider.settings.slideWidth);
|
128 |
+
// store the original children
|
129 |
+
slider.children = el.children(slider.settings.slideSelector);
|
130 |
+
// check if actual number of slides is less than minSlides / maxSlides
|
131 |
+
if (slider.children.length < slider.settings.minSlides) { slider.settings.minSlides = slider.children.length; }
|
132 |
+
if (slider.children.length < slider.settings.maxSlides) { slider.settings.maxSlides = slider.children.length; }
|
133 |
+
// if random start, set the startSlide setting to random number
|
134 |
+
if (slider.settings.randomStart) { slider.settings.startSlide = Math.floor(Math.random() * slider.children.length); }
|
135 |
+
// store active slide information
|
136 |
+
slider.active = { index: slider.settings.startSlide };
|
137 |
+
// store if the slider is in carousel mode (displaying / moving multiple slides)
|
138 |
+
slider.carousel = slider.settings.minSlides > 1 || slider.settings.maxSlides > 1 ? true : false;
|
139 |
+
// if carousel, force preloadImages = 'all'
|
140 |
+
if (slider.carousel) { slider.settings.preloadImages = 'all'; }
|
141 |
+
// calculate the min / max width thresholds based on min / max number of slides
|
142 |
+
// used to setup and update carousel slides dimensions
|
143 |
+
slider.minThreshold = (slider.settings.minSlides * slider.settings.slideWidth) + ((slider.settings.minSlides - 1) * slider.settings.slideMargin);
|
144 |
+
slider.maxThreshold = (slider.settings.maxSlides * slider.settings.slideWidth) + ((slider.settings.maxSlides - 1) * slider.settings.slideMargin);
|
145 |
+
// store the current state of the slider (if currently animating, working is true)
|
146 |
+
slider.working = false;
|
147 |
+
// initialize the controls object
|
148 |
+
slider.controls = {};
|
149 |
+
// initialize an auto interval
|
150 |
+
slider.interval = null;
|
151 |
+
// determine which property to use for transitions
|
152 |
+
slider.animProp = slider.settings.mode === 'vertical' ? 'top' : 'left';
|
153 |
+
// determine if hardware acceleration can be used
|
154 |
+
slider.usingCSS = slider.settings.useCSS && slider.settings.mode !== 'fade' && (function() {
|
155 |
+
// create our test div element
|
156 |
+
var div = document.createElement('div'),
|
157 |
+
// css transition properties
|
158 |
+
props = ['WebkitPerspective', 'MozPerspective', 'OPerspective', 'msPerspective'];
|
159 |
+
// test for each property
|
160 |
+
for (var i = 0; i < props.length; i++) {
|
161 |
+
if (div.style[props[i]] !== undefined) {
|
162 |
+
slider.cssPrefix = props[i].replace('Perspective', '').toLowerCase();
|
163 |
+
slider.animProp = '-' + slider.cssPrefix + '-transform';
|
164 |
+
return true;
|
165 |
+
}
|
166 |
+
}
|
167 |
+
return false;
|
168 |
+
}());
|
169 |
+
// if vertical mode always make maxSlides and minSlides equal
|
170 |
+
if (slider.settings.mode === 'vertical') { slider.settings.maxSlides = slider.settings.minSlides; }
|
171 |
+
// save original style data
|
172 |
+
el.data('origStyle', el.attr('style'));
|
173 |
+
el.children(slider.settings.slideSelector).each(function() {
|
174 |
+
$(this).data('origStyle', $(this).attr('style'));
|
175 |
+
});
|
176 |
+
|
177 |
+
// perform all DOM / CSS modifications
|
178 |
+
setup();
|
179 |
+
};
|
180 |
+
|
181 |
+
/**
|
182 |
+
* Performs all DOM and CSS modifications
|
183 |
+
*/
|
184 |
+
var setup = function() {
|
185 |
+
var preloadSelector = slider.children.eq(slider.settings.startSlide); // set the default preload selector (visible)
|
186 |
+
|
187 |
+
// wrap el in a wrapper
|
188 |
+
el.wrap('<div class="' + slider.settings.wrapperClass + '"><div class="bx-viewport"></div></div>');
|
189 |
+
// store a namespace reference to .bx-viewport
|
190 |
+
slider.viewport = el.parent();
|
191 |
+
|
192 |
+
// add aria-live if the setting is enabled and ticker mode is disabled
|
193 |
+
if (slider.settings.ariaLive && !slider.settings.ticker) {
|
194 |
+
slider.viewport.attr('aria-live', 'polite');
|
195 |
+
}
|
196 |
+
// add a loading div to display while images are loading
|
197 |
+
slider.loader = $('<div class="bx-loading" />');
|
198 |
+
slider.viewport.prepend(slider.loader);
|
199 |
+
// set el to a massive width, to hold any needed slides
|
200 |
+
// also strip any margin and padding from el
|
201 |
+
el.css({
|
202 |
+
width: slider.settings.mode === 'horizontal' ? (slider.children.length * 1000 + 215) + '%' : 'auto',
|
203 |
+
position: 'relative'
|
204 |
+
});
|
205 |
+
// if using CSS, add the easing property
|
206 |
+
if (slider.usingCSS && slider.settings.easing) {
|
207 |
+
el.css('-' + slider.cssPrefix + '-transition-timing-function', slider.settings.easing);
|
208 |
+
// if not using CSS and no easing value was supplied, use the default JS animation easing (swing)
|
209 |
+
} else if (!slider.settings.easing) {
|
210 |
+
slider.settings.easing = 'swing';
|
211 |
+
}
|
212 |
+
// make modifications to the viewport (.bx-viewport)
|
213 |
+
slider.viewport.css({
|
214 |
+
width: '100%',
|
215 |
+
overflow: 'hidden',
|
216 |
+
position: 'relative'
|
217 |
+
});
|
218 |
+
slider.viewport.parent().css({
|
219 |
+
maxWidth: getViewportMaxWidth()
|
220 |
+
});
|
221 |
+
// make modification to the wrapper (.bx-wrapper)
|
222 |
+
if (!slider.settings.pager && !slider.settings.controls) {
|
223 |
+
slider.viewport.parent().css({
|
224 |
+
margin: '0 auto 0px'
|
225 |
+
});
|
226 |
+
}
|
227 |
+
// apply css to all slider children
|
228 |
+
slider.children.css({
|
229 |
+
float: slider.settings.mode === 'horizontal' ? 'left' : 'none',
|
230 |
+
listStyle: 'none',
|
231 |
+
position: 'relative'
|
232 |
+
});
|
233 |
+
// apply the calculated width after the float is applied to prevent scrollbar interference
|
234 |
+
slider.children.css('width', getSlideWidth());
|
235 |
+
// if slideMargin is supplied, add the css
|
236 |
+
if (slider.settings.mode === 'horizontal' && slider.settings.slideMargin > 0) { slider.children.css('marginRight', slider.settings.slideMargin); }
|
237 |
+
if (slider.settings.mode === 'vertical' && slider.settings.slideMargin > 0) { slider.children.css('marginBottom', slider.settings.slideMargin); }
|
238 |
+
// if "fade" mode, add positioning and z-index CSS
|
239 |
+
if (slider.settings.mode === 'fade') {
|
240 |
+
slider.children.css({
|
241 |
+
position: 'absolute',
|
242 |
+
zIndex: 0,
|
243 |
+
display: 'none'
|
244 |
+
});
|
245 |
+
// prepare the z-index on the showing element
|
246 |
+
slider.children.eq(slider.settings.startSlide).css({zIndex: slider.settings.slideZIndex, display: 'block'});
|
247 |
+
}
|
248 |
+
// create an element to contain all slider controls (pager, start / stop, etc)
|
249 |
+
slider.controls.el = $('<div class="bx-controls" />');
|
250 |
+
// if captions are requested, add them
|
251 |
+
if (slider.settings.captions) { appendCaptions(); }
|
252 |
+
// check if startSlide is last slide
|
253 |
+
slider.active.last = slider.settings.startSlide === getPagerQty() - 1;
|
254 |
+
// if video is true, set up the fitVids plugin
|
255 |
+
if (slider.settings.video) { el.fitVids(); }
|
256 |
+
if (slider.settings.preloadImages === 'all' || slider.settings.ticker) { preloadSelector = slider.children; }
|
257 |
+
// only check for control addition if not in "ticker" mode
|
258 |
+
if (!slider.settings.ticker) {
|
259 |
+
// if controls are requested, add them
|
260 |
+
if (slider.settings.controls) { appendControls(); }
|
261 |
+
// if auto is true, and auto controls are requested, add them
|
262 |
+
if (slider.settings.auto && slider.settings.autoControls) { appendControlsAuto(); }
|
263 |
+
// if pager is requested, add it
|
264 |
+
if (slider.settings.pager) { appendPager(); }
|
265 |
+
// if any control option is requested, add the controls wrapper
|
266 |
+
if (slider.settings.controls || slider.settings.autoControls || slider.settings.pager) { slider.viewport.after(slider.controls.el); }
|
267 |
+
// if ticker mode, do not allow a pager
|
268 |
+
} else {
|
269 |
+
slider.settings.pager = false;
|
270 |
+
}
|
271 |
+
loadElements(preloadSelector, start);
|
272 |
+
};
|
273 |
+
|
274 |
+
var loadElements = function(selector, callback) {
|
275 |
+
var total = selector.find('img:not([src=""]), iframe').length,
|
276 |
+
count = 0;
|
277 |
+
if (total === 0) {
|
278 |
+
callback();
|
279 |
+
return;
|
280 |
+
}
|
281 |
+
selector.find('img:not([src=""]), iframe').each(function() {
|
282 |
+
$(this).one('load error', function() {
|
283 |
+
if (++count === total) { callback(); }
|
284 |
+
}).each(function() {
|
285 |
+
if (this.complete) { $(this).load(); }
|
286 |
+
});
|
287 |
+
});
|
288 |
+
};
|
289 |
+
|
290 |
+
/**
|
291 |
+
* Start the slider
|
292 |
+
*/
|
293 |
+
var start = function() {
|
294 |
+
// if infinite loop, prepare additional slides
|
295 |
+
if (slider.settings.infiniteLoop && slider.settings.mode !== 'fade' && !slider.settings.ticker) {
|
296 |
+
var slice = slider.settings.mode === 'vertical' ? slider.settings.minSlides : slider.settings.maxSlides,
|
297 |
+
sliceAppend = slider.children.slice(0, slice).clone(true).addClass('bx-clone'),
|
298 |
+
slicePrepend = slider.children.slice(-slice).clone(true).addClass('bx-clone');
|
299 |
+
if (slider.settings.ariaHidden) {
|
300 |
+
sliceAppend.attr('aria-hidden', true);
|
301 |
+
slicePrepend.attr('aria-hidden', true);
|
302 |
+
}
|
303 |
+
el.append(sliceAppend).prepend(slicePrepend);
|
304 |
+
}
|
305 |
+
// remove the loading DOM element
|
306 |
+
slider.loader.remove();
|
307 |
+
// set the left / top position of "el"
|
308 |
+
setSlidePosition();
|
309 |
+
// if "vertical" mode, always use adaptiveHeight to prevent odd behavior
|
310 |
+
if (slider.settings.mode === 'vertical') { slider.settings.adaptiveHeight = true; }
|
311 |
+
// set the viewport height
|
312 |
+
slider.viewport.height(getViewportHeight());
|
313 |
+
// make sure everything is positioned just right (same as a window resize)
|
314 |
+
el.redrawSlider();
|
315 |
+
// onSliderLoad callback
|
316 |
+
slider.settings.onSliderLoad.call(el, slider.active.index);
|
317 |
+
// slider has been fully initialized
|
318 |
+
slider.initialized = true;
|
319 |
+
// bind the resize call to the window
|
320 |
+
if (slider.settings.responsive) { $(window).bind('resize', resizeWindow); }
|
321 |
+
// if auto is true and has more than 1 page, start the show
|
322 |
+
if (slider.settings.auto && slider.settings.autoStart && (getPagerQty() > 1 || slider.settings.autoSlideForOnePage)) { initAuto(); }
|
323 |
+
// if ticker is true, start the ticker
|
324 |
+
if (slider.settings.ticker) { initTicker(); }
|
325 |
+
// if pager is requested, make the appropriate pager link active
|
326 |
+
if (slider.settings.pager) { updatePagerActive(slider.settings.startSlide); }
|
327 |
+
// check for any updates to the controls (like hideControlOnEnd updates)
|
328 |
+
if (slider.settings.controls) { updateDirectionControls(); }
|
329 |
+
// if touchEnabled is true, setup the touch events
|
330 |
+
if (slider.settings.touchEnabled && !slider.settings.ticker) { initTouch(); }
|
331 |
+
// if keyboardEnabled is true, setup the keyboard events
|
332 |
+
if (slider.settings.keyboardEnabled && !slider.settings.ticker) {
|
333 |
+
$(document).keydown(keyPress);
|
334 |
+
}
|
335 |
+
};
|
336 |
+
|
337 |
+
/**
|
338 |
+
* Returns the calculated height of the viewport, used to determine either adaptiveHeight or the maxHeight value
|
339 |
+
*/
|
340 |
+
var getViewportHeight = function() {
|
341 |
+
var height = 0;
|
342 |
+
// first determine which children (slides) should be used in our height calculation
|
343 |
+
var children = $();
|
344 |
+
// if mode is not "vertical" and adaptiveHeight is false, include all children
|
345 |
+
if (slider.settings.mode !== 'vertical' && !slider.settings.adaptiveHeight) {
|
346 |
+
children = slider.children;
|
347 |
+
} else {
|
348 |
+
// if not carousel, return the single active child
|
349 |
+
if (!slider.carousel) {
|
350 |
+
children = slider.children.eq(slider.active.index);
|
351 |
+
// if carousel, return a slice of children
|
352 |
+
} else {
|
353 |
+
// get the individual slide index
|
354 |
+
var currentIndex = slider.settings.moveSlides === 1 ? slider.active.index : slider.active.index * getMoveBy();
|
355 |
+
// add the current slide to the children
|
356 |
+
children = slider.children.eq(currentIndex);
|
357 |
+
// cycle through the remaining "showing" slides
|
358 |
+
for (i = 1; i <= slider.settings.maxSlides - 1; i++) {
|
359 |
+
// if looped back to the start
|
360 |
+
if (currentIndex + i >= slider.children.length) {
|
361 |
+
children = children.add(slider.children.eq(i - 1));
|
362 |
+
} else {
|
363 |
+
children = children.add(slider.children.eq(currentIndex + i));
|
364 |
+
}
|
365 |
+
}
|
366 |
+
}
|
367 |
+
}
|
368 |
+
// if "vertical" mode, calculate the sum of the heights of the children
|
369 |
+
if (slider.settings.mode === 'vertical') {
|
370 |
+
children.each(function(index) {
|
371 |
+
height += $(this).outerHeight();
|
372 |
+
});
|
373 |
+
// add user-supplied margins
|
374 |
+
if (slider.settings.slideMargin > 0) {
|
375 |
+
height += slider.settings.slideMargin * (slider.settings.minSlides - 1);
|
376 |
+
}
|
377 |
+
// if not "vertical" mode, calculate the max height of the children
|
378 |
+
} else {
|
379 |
+
height = Math.max.apply(Math, children.map(function() {
|
380 |
+
return $(this).outerHeight(false);
|
381 |
+
}).get());
|
382 |
+
}
|
383 |
+
|
384 |
+
if (slider.viewport.css('box-sizing') === 'border-box') {
|
385 |
+
height += parseFloat(slider.viewport.css('padding-top')) + parseFloat(slider.viewport.css('padding-bottom')) +
|
386 |
+
parseFloat(slider.viewport.css('border-top-width')) + parseFloat(slider.viewport.css('border-bottom-width'));
|
387 |
+
} else if (slider.viewport.css('box-sizing') === 'padding-box') {
|
388 |
+
height += parseFloat(slider.viewport.css('padding-top')) + parseFloat(slider.viewport.css('padding-bottom'));
|
389 |
+
}
|
390 |
+
|
391 |
+
return height;
|
392 |
+
};
|
393 |
+
|
394 |
+
/**
|
395 |
+
* Returns the calculated width to be used for the outer wrapper / viewport
|
396 |
+
*/
|
397 |
+
var getViewportMaxWidth = function() {
|
398 |
+
var width = '100%';
|
399 |
+
if (slider.settings.slideWidth > 0) {
|
400 |
+
if (slider.settings.mode === 'horizontal') {
|
401 |
+
width = (slider.settings.maxSlides * slider.settings.slideWidth) + ((slider.settings.maxSlides - 1) * slider.settings.slideMargin);
|
402 |
+
} else {
|
403 |
+
width = slider.settings.slideWidth;
|
404 |
+
}
|
405 |
+
}
|
406 |
+
return width;
|
407 |
+
};
|
408 |
+
|
409 |
+
/**
|
410 |
+
* Returns the calculated width to be applied to each slide
|
411 |
+
*/
|
412 |
+
var getSlideWidth = function() {
|
413 |
+
var newElWidth = slider.settings.slideWidth, // start with any user-supplied slide width
|
414 |
+
wrapWidth = slider.viewport.width(); // get the current viewport width
|
415 |
+
// if slide width was not supplied, or is larger than the viewport use the viewport width
|
416 |
+
if (slider.settings.slideWidth === 0 ||
|
417 |
+
(slider.settings.slideWidth > wrapWidth && !slider.carousel) ||
|
418 |
+
slider.settings.mode === 'vertical') {
|
419 |
+
newElWidth = wrapWidth;
|
420 |
+
// if carousel, use the thresholds to determine the width
|
421 |
+
} else if (slider.settings.maxSlides > 1 && slider.settings.mode === 'horizontal') {
|
422 |
+
if (wrapWidth > slider.maxThreshold) {
|
423 |
+
return newElWidth;
|
424 |
+
} else if (wrapWidth < slider.minThreshold) {
|
425 |
+
newElWidth = (wrapWidth - (slider.settings.slideMargin * (slider.settings.minSlides - 1))) / slider.settings.minSlides;
|
426 |
+
} else if (slider.settings.shrinkItems) {
|
427 |
+
newElWidth = Math.floor((wrapWidth + slider.settings.slideMargin) / (Math.ceil((wrapWidth + slider.settings.slideMargin) / (newElWidth + slider.settings.slideMargin))) - slider.settings.slideMargin);
|
428 |
+
}
|
429 |
+
}
|
430 |
+
return newElWidth;
|
431 |
+
};
|
432 |
+
|
433 |
+
/**
|
434 |
+
* Returns the number of slides currently visible in the viewport (includes partially visible slides)
|
435 |
+
*/
|
436 |
+
var getNumberSlidesShowing = function() {
|
437 |
+
var slidesShowing = 1,
|
438 |
+
childWidth = null;
|
439 |
+
if (slider.settings.mode === 'horizontal' && slider.settings.slideWidth > 0) {
|
440 |
+
// if viewport is smaller than minThreshold, return minSlides
|
441 |
+
if (slider.viewport.width() < slider.minThreshold) {
|
442 |
+
slidesShowing = slider.settings.minSlides;
|
443 |
+
// if viewport is larger than maxThreshold, return maxSlides
|
444 |
+
} else if (slider.viewport.width() > slider.maxThreshold) {
|
445 |
+
slidesShowing = slider.settings.maxSlides;
|
446 |
+
// if viewport is between min / max thresholds, divide viewport width by first child width
|
447 |
+
} else {
|
448 |
+
childWidth = slider.children.first().width() + slider.settings.slideMargin;
|
449 |
+
slidesShowing = Math.floor((slider.viewport.width() +
|
450 |
+
slider.settings.slideMargin) / childWidth);
|
451 |
+
}
|
452 |
+
// if "vertical" mode, slides showing will always be minSlides
|
453 |
+
} else if (slider.settings.mode === 'vertical') {
|
454 |
+
slidesShowing = slider.settings.minSlides;
|
455 |
+
}
|
456 |
+
return slidesShowing;
|
457 |
+
};
|
458 |
+
|
459 |
+
/**
|
460 |
+
* Returns the number of pages (one full viewport of slides is one "page")
|
461 |
+
*/
|
462 |
+
var getPagerQty = function() {
|
463 |
+
var pagerQty = 0,
|
464 |
+
breakPoint = 0,
|
465 |
+
counter = 0;
|
466 |
+
// if moveSlides is specified by the user
|
467 |
+
if (slider.settings.moveSlides > 0) {
|
468 |
+
if (slider.settings.infiniteLoop) {
|
469 |
+
pagerQty = Math.ceil(slider.children.length / getMoveBy());
|
470 |
+
} else {
|
471 |
+
// when breakpoint goes above children length, counter is the number of pages
|
472 |
+
while (breakPoint < slider.children.length) {
|
473 |
+
++pagerQty;
|
474 |
+
breakPoint = counter + getNumberSlidesShowing();
|
475 |
+
counter += slider.settings.moveSlides <= getNumberSlidesShowing() ? slider.settings.moveSlides : getNumberSlidesShowing();
|
476 |
+
}
|
477 |
+
}
|
478 |
+
// if moveSlides is 0 (auto) divide children length by sides showing, then round up
|
479 |
+
} else {
|
480 |
+
pagerQty = Math.ceil(slider.children.length / getNumberSlidesShowing());
|
481 |
+
}
|
482 |
+
return pagerQty;
|
483 |
+
};
|
484 |
+
|
485 |
+
/**
|
486 |
+
* Returns the number of individual slides by which to shift the slider
|
487 |
+
*/
|
488 |
+
var getMoveBy = function() {
|
489 |
+
// if moveSlides was set by the user and moveSlides is less than number of slides showing
|
490 |
+
if (slider.settings.moveSlides > 0 && slider.settings.moveSlides <= getNumberSlidesShowing()) {
|
491 |
+
return slider.settings.moveSlides;
|
492 |
+
}
|
493 |
+
// if moveSlides is 0 (auto)
|
494 |
+
return getNumberSlidesShowing();
|
495 |
+
};
|
496 |
+
|
497 |
+
/**
|
498 |
+
* Sets the slider's (el) left or top position
|
499 |
+
*/
|
500 |
+
var setSlidePosition = function() {
|
501 |
+
var position, lastChild, lastShowingIndex;
|
502 |
+
// if last slide, not infinite loop, and number of children is larger than specified maxSlides
|
503 |
+
if (slider.children.length > slider.settings.maxSlides && slider.active.last && !slider.settings.infiniteLoop) {
|
504 |
+
if (slider.settings.mode === 'horizontal') {
|
505 |
+
// get the last child's position
|
506 |
+
lastChild = slider.children.last();
|
507 |
+
position = lastChild.position();
|
508 |
+
// set the left position
|
509 |
+
setPositionProperty(-(position.left - (slider.viewport.width() - lastChild.outerWidth())), 'reset', 0);
|
510 |
+
} else if (slider.settings.mode === 'vertical') {
|
511 |
+
// get the last showing index's position
|
512 |
+
lastShowingIndex = slider.children.length - slider.settings.minSlides;
|
513 |
+
position = slider.children.eq(lastShowingIndex).position();
|
514 |
+
// set the top position
|
515 |
+
setPositionProperty(-position.top, 'reset', 0);
|
516 |
+
}
|
517 |
+
// if not last slide
|
518 |
+
} else {
|
519 |
+
// get the position of the first showing slide
|
520 |
+
position = slider.children.eq(slider.active.index * getMoveBy()).position();
|
521 |
+
// check for last slide
|
522 |
+
if (slider.active.index === getPagerQty() - 1) { slider.active.last = true; }
|
523 |
+
// set the respective position
|
524 |
+
if (position !== undefined) {
|
525 |
+
if (slider.settings.mode === 'horizontal') { setPositionProperty(-position.left, 'reset', 0); }
|
526 |
+
else if (slider.settings.mode === 'vertical') { setPositionProperty(-position.top, 'reset', 0); }
|
527 |
+
}
|
528 |
+
}
|
529 |
+
};
|
530 |
+
|
531 |
+
/**
|
532 |
+
* Sets the el's animating property position (which in turn will sometimes animate el).
|
533 |
+
* If using CSS, sets the transform property. If not using CSS, sets the top / left property.
|
534 |
+
*
|
535 |
+
* @param value (int)
|
536 |
+
* - the animating property's value
|
537 |
+
*
|
538 |
+
* @param type (string) 'slide', 'reset', 'ticker'
|
539 |
+
* - the type of instance for which the function is being
|
540 |
+
*
|
541 |
+
* @param duration (int)
|
542 |
+
* - the amount of time (in ms) the transition should occupy
|
543 |
+
*
|
544 |
+
* @param params (array) optional
|
545 |
+
* - an optional parameter containing any variables that need to be passed in
|
546 |
+
*/
|
547 |
+
var setPositionProperty = function(value, type, duration, params) {
|
548 |
+
var animateObj, propValue;
|
549 |
+
// use CSS transform
|
550 |
+
if (slider.usingCSS) {
|
551 |
+
// determine the translate3d value
|
552 |
+
propValue = slider.settings.mode === 'vertical' ? 'translate3d(0, ' + value + 'px, 0)' : 'translate3d(' + value + 'px, 0, 0)';
|
553 |
+
// add the CSS transition-duration
|
554 |
+
el.css('-' + slider.cssPrefix + '-transition-duration', duration / 1000 + 's');
|
555 |
+
if (type === 'slide') {
|
556 |
+
// set the property value
|
557 |
+
el.css(slider.animProp, propValue);
|
558 |
+
if (duration !== 0) {
|
559 |
+
// bind a callback method - executes when CSS transition completes
|
560 |
+
el.bind('transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd', function(e) {
|
561 |
+
//make sure it's the correct one
|
562 |
+
if (!$(e.target).is(el)) { return; }
|
563 |
+
// unbind the callback
|
564 |
+
el.unbind('transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd');
|
565 |
+
updateAfterSlideTransition();
|
566 |
+
});
|
567 |
+
} else { //duration = 0
|
568 |
+
updateAfterSlideTransition();
|
569 |
+
}
|
570 |
+
} else if (type === 'reset') {
|
571 |
+
el.css(slider.animProp, propValue);
|
572 |
+
} else if (type === 'ticker') {
|
573 |
+
// make the transition use 'linear'
|
574 |
+
el.css('-' + slider.cssPrefix + '-transition-timing-function', 'linear');
|
575 |
+
el.css(slider.animProp, propValue);
|
576 |
+
if (duration !== 0) {
|
577 |
+
el.bind('transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd', function(e) {
|
578 |
+
//make sure it's the correct one
|
579 |
+
if (!$(e.target).is(el)) { return; }
|
580 |
+
// unbind the callback
|
581 |
+
el.unbind('transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd');
|
582 |
+
// reset the position
|
583 |
+
setPositionProperty(params.resetValue, 'reset', 0);
|
584 |
+
// start the loop again
|
585 |
+
tickerLoop();
|
586 |
+
});
|
587 |
+
} else { //duration = 0
|
588 |
+
setPositionProperty(params.resetValue, 'reset', 0);
|
589 |
+
tickerLoop();
|
590 |
+
}
|
591 |
+
}
|
592 |
+
// use JS animate
|
593 |
+
} else {
|
594 |
+
animateObj = {};
|
595 |
+
animateObj[slider.animProp] = value;
|
596 |
+
if (type === 'slide') {
|
597 |
+
el.animate(animateObj, duration, slider.settings.easing, function() {
|
598 |
+
updateAfterSlideTransition();
|
599 |
+
});
|
600 |
+
} else if (type === 'reset') {
|
601 |
+
el.css(slider.animProp, value);
|
602 |
+
} else if (type === 'ticker') {
|
603 |
+
el.animate(animateObj, duration, 'linear', function() {
|
604 |
+
setPositionProperty(params.resetValue, 'reset', 0);
|
605 |
+
// run the recursive loop after animation
|
606 |
+
tickerLoop();
|
607 |
+
});
|
608 |
+
}
|
609 |
+
}
|
610 |
+
};
|
611 |
+
|
612 |
+
/**
|
613 |
+
* Populates the pager with proper amount of pages
|
614 |
+
*/
|
615 |
+
var populatePager = function() {
|
616 |
+
var pagerHtml = '',
|
617 |
+
linkContent = '',
|
618 |
+
pagerQty = getPagerQty();
|
619 |
+
// loop through each pager item
|
620 |
+
for (var i = 0; i < pagerQty; i++) {
|
621 |
+
linkContent = '';
|
622 |
+
// if a buildPager function is supplied, use it to get pager link value, else use index + 1
|
623 |
+
if (slider.settings.buildPager && $.isFunction(slider.settings.buildPager) || slider.settings.pagerCustom) {
|
624 |
+
linkContent = slider.settings.buildPager(i);
|
625 |
+
slider.pagerEl.addClass('bx-custom-pager');
|
626 |
+
} else {
|
627 |
+
linkContent = i + 1;
|
628 |
+
slider.pagerEl.addClass('bx-default-pager');
|
629 |
+
}
|
630 |
+
// var linkContent = slider.settings.buildPager && $.isFunction(slider.settings.buildPager) ? slider.settings.buildPager(i) : i + 1;
|
631 |
+
// add the markup to the string
|
632 |
+
pagerHtml += '<div class="bx-pager-item"><a href="" data-slide-index="' + i + '" class="bx-pager-link">' + linkContent + '</a></div>';
|
633 |
+
}
|
634 |
+
// populate the pager element with pager links
|
635 |
+
slider.pagerEl.html(pagerHtml);
|
636 |
+
};
|
637 |
+
|
638 |
+
/**
|
639 |
+
* Appends the pager to the controls element
|
640 |
+
*/
|
641 |
+
var appendPager = function() {
|
642 |
+
if (!slider.settings.pagerCustom) {
|
643 |
+
// create the pager DOM element
|
644 |
+
slider.pagerEl = $('<div class="bx-pager" />');
|
645 |
+
// if a pager selector was supplied, populate it with the pager
|
646 |
+
if (slider.settings.pagerSelector) {
|
647 |
+
$(slider.settings.pagerSelector).html(slider.pagerEl);
|
648 |
+
// if no pager selector was supplied, add it after the wrapper
|
649 |
+
} else {
|
650 |
+
slider.controls.el.addClass('bx-has-pager').append(slider.pagerEl);
|
651 |
+
}
|
652 |
+
// populate the pager
|
653 |
+
populatePager();
|
654 |
+
} else {
|
655 |
+
slider.pagerEl = $(slider.settings.pagerCustom);
|
656 |
+
}
|
657 |
+
// assign the pager click binding
|
658 |
+
slider.pagerEl.on('click touchend', 'a', clickPagerBind);
|
659 |
+
};
|
660 |
+
|
661 |
+
/**
|
662 |
+
* Appends prev / next controls to the controls element
|
663 |
+
*/
|
664 |
+
var appendControls = function() {
|
665 |
+
slider.controls.next = $('<a class="bx-next" href="">' + slider.settings.nextText + '</a>');
|
666 |
+
slider.controls.prev = $('<a class="bx-prev" href="">' + slider.settings.prevText + '</a>');
|
667 |
+
// bind click actions to the controls
|
668 |
+
slider.controls.next.bind('click touchend', clickNextBind);
|
669 |
+
slider.controls.prev.bind('click touchend', clickPrevBind);
|
670 |
+
// if nextSelector was supplied, populate it
|
671 |
+
if (slider.settings.nextSelector) {
|
672 |
+
$(slider.settings.nextSelector).append(slider.controls.next);
|
673 |
+
}
|
674 |
+
// if prevSelector was supplied, populate it
|
675 |
+
if (slider.settings.prevSelector) {
|
676 |
+
$(slider.settings.prevSelector).append(slider.controls.prev);
|
677 |
+
}
|
678 |
+
// if no custom selectors were supplied
|
679 |
+
if (!slider.settings.nextSelector && !slider.settings.prevSelector) {
|
680 |
+
// add the controls to the DOM
|
681 |
+
slider.controls.directionEl = $('<div class="bx-controls-direction" />');
|
682 |
+
// add the control elements to the directionEl
|
683 |
+
slider.controls.directionEl.append(slider.controls.prev).append(slider.controls.next);
|
684 |
+
// slider.viewport.append(slider.controls.directionEl);
|
685 |
+
slider.controls.el.addClass('bx-has-controls-direction').append(slider.controls.directionEl);
|
686 |
+
}
|
687 |
+
};
|
688 |
+
|
689 |
+
/**
|
690 |
+
* Appends start / stop auto controls to the controls element
|
691 |
+
*/
|
692 |
+
var appendControlsAuto = function() {
|
693 |
+
slider.controls.start = $('<div class="bx-controls-auto-item"><a class="bx-start" href="">' + slider.settings.startText + '</a></div>');
|
694 |
+
slider.controls.stop = $('<div class="bx-controls-auto-item"><a class="bx-stop" href="">' + slider.settings.stopText + '</a></div>');
|
695 |
+
// add the controls to the DOM
|
696 |
+
slider.controls.autoEl = $('<div class="bx-controls-auto" />');
|
697 |
+
// bind click actions to the controls
|
698 |
+
slider.controls.autoEl.on('click', '.bx-start', clickStartBind);
|
699 |
+
slider.controls.autoEl.on('click', '.bx-stop', clickStopBind);
|
700 |
+
// if autoControlsCombine, insert only the "start" control
|
701 |
+
if (slider.settings.autoControlsCombine) {
|
702 |
+
slider.controls.autoEl.append(slider.controls.start);
|
703 |
+
// if autoControlsCombine is false, insert both controls
|
704 |
+
} else {
|
705 |
+
slider.controls.autoEl.append(slider.controls.start).append(slider.controls.stop);
|
706 |
+
}
|
707 |
+
// if auto controls selector was supplied, populate it with the controls
|
708 |
+
if (slider.settings.autoControlsSelector) {
|
709 |
+
$(slider.settings.autoControlsSelector).html(slider.controls.autoEl);
|
710 |
+
// if auto controls selector was not supplied, add it after the wrapper
|
711 |
+
} else {
|
712 |
+
slider.controls.el.addClass('bx-has-controls-auto').append(slider.controls.autoEl);
|
713 |
+
}
|
714 |
+
// update the auto controls
|
715 |
+
updateAutoControls(slider.settings.autoStart ? 'stop' : 'start');
|
716 |
+
};
|
717 |
+
|
718 |
+
/**
|
719 |
+
* Appends image captions to the DOM
|
720 |
+
*/
|
721 |
+
var appendCaptions = function() {
|
722 |
+
// cycle through each child
|
723 |
+
slider.children.each(function(index) {
|
724 |
+
// get the image title attribute
|
725 |
+
var title = $(this).find('img:first').attr('title');
|
726 |
+
// append the caption
|
727 |
+
if (title !== undefined && ('' + title).length) {
|
728 |
+
$(this).append('<div class="bx-caption"><span>' + title + '</span></div>');
|
729 |
+
}
|
730 |
+
});
|
731 |
+
};
|
732 |
+
|
733 |
+
/**
|
734 |
+
* Click next binding
|
735 |
+
*
|
736 |
+
* @param e (event)
|
737 |
+
* - DOM event object
|
738 |
+
*/
|
739 |
+
var clickNextBind = function(e) {
|
740 |
+
e.preventDefault();
|
741 |
+
if (slider.controls.el.hasClass('disabled')) { return; }
|
742 |
+
// if auto show is running, stop it
|
743 |
+
if (slider.settings.auto && slider.settings.stopAutoOnClick) { el.stopAuto(); }
|
744 |
+
el.goToNextSlide();
|
745 |
+
};
|
746 |
+
|
747 |
+
/**
|
748 |
+
* Click prev binding
|
749 |
+
*
|
750 |
+
* @param e (event)
|
751 |
+
* - DOM event object
|
752 |
+
*/
|
753 |
+
var clickPrevBind = function(e) {
|
754 |
+
e.preventDefault();
|
755 |
+
if (slider.controls.el.hasClass('disabled')) { return; }
|
756 |
+
// if auto show is running, stop it
|
757 |
+
if (slider.settings.auto && slider.settings.stopAutoOnClick) { el.stopAuto(); }
|
758 |
+
el.goToPrevSlide();
|
759 |
+
};
|
760 |
+
|
761 |
+
/**
|
762 |
+
* Click start binding
|
763 |
+
*
|
764 |
+
* @param e (event)
|
765 |
+
* - DOM event object
|
766 |
+
*/
|
767 |
+
var clickStartBind = function(e) {
|
768 |
+
el.startAuto();
|
769 |
+
e.preventDefault();
|
770 |
+
};
|
771 |
+
|
772 |
+
/**
|
773 |
+
* Click stop binding
|
774 |
+
*
|
775 |
+
* @param e (event)
|
776 |
+
* - DOM event object
|
777 |
+
*/
|
778 |
+
var clickStopBind = function(e) {
|
779 |
+
el.stopAuto();
|
780 |
+
e.preventDefault();
|
781 |
+
};
|
782 |
+
|
783 |
+
/**
|
784 |
+
* Click pager binding
|
785 |
+
*
|
786 |
+
* @param e (event)
|
787 |
+
* - DOM event object
|
788 |
+
*/
|
789 |
+
var clickPagerBind = function(e) {
|
790 |
+
var pagerLink, pagerIndex;
|
791 |
+
e.preventDefault();
|
792 |
+
if (slider.controls.el.hasClass('disabled')) {
|
793 |
+
return;
|
794 |
+
}
|
795 |
+
// if auto show is running, stop it
|
796 |
+
if (slider.settings.auto && slider.settings.stopAutoOnClick) { el.stopAuto(); }
|
797 |
+
pagerLink = $(e.currentTarget);
|
798 |
+
if (pagerLink.attr('data-slide-index') !== undefined) {
|
799 |
+
pagerIndex = parseInt(pagerLink.attr('data-slide-index'));
|
800 |
+
// if clicked pager link is not active, continue with the goToSlide call
|
801 |
+
if (pagerIndex !== slider.active.index) { el.goToSlide(pagerIndex); }
|
802 |
+
}
|
803 |
+
};
|
804 |
+
|
805 |
+
/**
|
806 |
+
* Updates the pager links with an active class
|
807 |
+
*
|
808 |
+
* @param slideIndex (int)
|
809 |
+
* - index of slide to make active
|
810 |
+
*/
|
811 |
+
var updatePagerActive = function(slideIndex) {
|
812 |
+
// if "short" pager type
|
813 |
+
var len = slider.children.length; // nb of children
|
814 |
+
if (slider.settings.pagerType === 'short') {
|
815 |
+
if (slider.settings.maxSlides > 1) {
|
816 |
+
len = Math.ceil(slider.children.length / slider.settings.maxSlides);
|
817 |
+
}
|
818 |
+
slider.pagerEl.html((slideIndex + 1) + slider.settings.pagerShortSeparator + len);
|
819 |
+
return;
|
820 |
+
}
|
821 |
+
// remove all pager active classes
|
822 |
+
slider.pagerEl.find('a').removeClass('active');
|
823 |
+
// apply the active class for all pagers
|
824 |
+
slider.pagerEl.each(function(i, el) { $(el).find('a').eq(slideIndex).addClass('active'); });
|
825 |
+
};
|
826 |
+
|
827 |
+
/**
|
828 |
+
* Performs needed actions after a slide transition
|
829 |
+
*/
|
830 |
+
var updateAfterSlideTransition = function() {
|
831 |
+
// if infinite loop is true
|
832 |
+
if (slider.settings.infiniteLoop) {
|
833 |
+
var position = '';
|
834 |
+
// first slide
|
835 |
+
if (slider.active.index === 0) {
|
836 |
+
// set the new position
|
837 |
+
position = slider.children.eq(0).position();
|
838 |
+
// carousel, last slide
|
839 |
+
} else if (slider.active.index === getPagerQty() - 1 && slider.carousel) {
|
840 |
+
position = slider.children.eq((getPagerQty() - 1) * getMoveBy()).position();
|
841 |
+
// last slide
|
842 |
+
} else if (slider.active.index === slider.children.length - 1) {
|
843 |
+
position = slider.children.eq(slider.children.length - 1).position();
|
844 |
+
}
|
845 |
+
if (position) {
|
846 |
+
if (slider.settings.mode === 'horizontal') { setPositionProperty(-position.left, 'reset', 0); }
|
847 |
+
else if (slider.settings.mode === 'vertical') { setPositionProperty(-position.top, 'reset', 0); }
|
848 |
+
}
|
849 |
+
}
|
850 |
+
// declare that the transition is complete
|
851 |
+
slider.working = false;
|
852 |
+
// onSlideAfter callback
|
853 |
+
slider.settings.onSlideAfter.call(el, slider.children.eq(slider.active.index), slider.oldIndex, slider.active.index);
|
854 |
+
};
|
855 |
+
|
856 |
+
/**
|
857 |
+
* Updates the auto controls state (either active, or combined switch)
|
858 |
+
*
|
859 |
+
* @param state (string) "start", "stop"
|
860 |
+
* - the new state of the auto show
|
861 |
+
*/
|
862 |
+
var updateAutoControls = function(state) {
|
863 |
+
// if autoControlsCombine is true, replace the current control with the new state
|
864 |
+
if (slider.settings.autoControlsCombine) {
|
865 |
+
slider.controls.autoEl.html(slider.controls[state]);
|
866 |
+
// if autoControlsCombine is false, apply the "active" class to the appropriate control
|
867 |
+
} else {
|
868 |
+
slider.controls.autoEl.find('a').removeClass('active');
|
869 |
+
slider.controls.autoEl.find('a:not(.bx-' + state + ')').addClass('active');
|
870 |
+
}
|
871 |
+
};
|
872 |
+
|
873 |
+
/**
|
874 |
+
* Updates the direction controls (checks if either should be hidden)
|
875 |
+
*/
|
876 |
+
var updateDirectionControls = function() {
|
877 |
+
if (getPagerQty() === 1) {
|
878 |
+
slider.controls.prev.addClass('disabled');
|
879 |
+
slider.controls.next.addClass('disabled');
|
880 |
+
} else if (!slider.settings.infiniteLoop && slider.settings.hideControlOnEnd) {
|
881 |
+
// if first slide
|
882 |
+
if (slider.active.index === 0) {
|
883 |
+
slider.controls.prev.addClass('disabled');
|
884 |
+
slider.controls.next.removeClass('disabled');
|
885 |
+
// if last slide
|
886 |
+
} else if (slider.active.index === getPagerQty() - 1) {
|
887 |
+
slider.controls.next.addClass('disabled');
|
888 |
+
slider.controls.prev.removeClass('disabled');
|
889 |
+
// if any slide in the middle
|
890 |
+
} else {
|
891 |
+
slider.controls.prev.removeClass('disabled');
|
892 |
+
slider.controls.next.removeClass('disabled');
|
893 |
+
}
|
894 |
+
}
|
895 |
+
};
|
896 |
+
|
897 |
+
/**
|
898 |
+
* Initializes the auto process
|
899 |
+
*/
|
900 |
+
var initAuto = function() {
|
901 |
+
// if autoDelay was supplied, launch the auto show using a setTimeout() call
|
902 |
+
if (slider.settings.autoDelay > 0) {
|
903 |
+
var timeout = setTimeout(el.startAuto, slider.settings.autoDelay);
|
904 |
+
// if autoDelay was not supplied, start the auto show normally
|
905 |
+
} else {
|
906 |
+
el.startAuto();
|
907 |
+
|
908 |
+
//add focus and blur events to ensure its running if timeout gets paused
|
909 |
+
$(window).focus(function() {
|
910 |
+
el.startAuto();
|
911 |
+
}).blur(function() {
|
912 |
+
el.stopAuto();
|
913 |
+
});
|
914 |
+
}
|
915 |
+
// if autoHover is requested
|
916 |
+
if (slider.settings.autoHover) {
|
917 |
+
// on el hover
|
918 |
+
el.hover(function() {
|
919 |
+
// if the auto show is currently playing (has an active interval)
|
920 |
+
if (slider.interval) {
|
921 |
+
// stop the auto show and pass true argument which will prevent control update
|
922 |
+
el.stopAuto(true);
|
923 |
+
// create a new autoPaused value which will be used by the relative "mouseout" event
|
924 |
+
slider.autoPaused = true;
|
925 |
+
}
|
926 |
+
}, function() {
|
927 |
+
// if the autoPaused value was created be the prior "mouseover" event
|
928 |
+
if (slider.autoPaused) {
|
929 |
+
// start the auto show and pass true argument which will prevent control update
|
930 |
+
el.startAuto(true);
|
931 |
+
// reset the autoPaused value
|
932 |
+
slider.autoPaused = null;
|
933 |
+
}
|
934 |
+
});
|
935 |
+
}
|
936 |
+
};
|
937 |
+
|
938 |
+
/**
|
939 |
+
* Initializes the ticker process
|
940 |
+
*/
|
941 |
+
var initTicker = function() {
|
942 |
+
var startPosition = 0,
|
943 |
+
position, transform, value, idx, ratio, property, newSpeed, totalDimens;
|
944 |
+
// if autoDirection is "next", append a clone of the entire slider
|
945 |
+
if (slider.settings.autoDirection === 'next') {
|
946 |
+
el.append(slider.children.clone().addClass('bx-clone'));
|
947 |
+
// if autoDirection is "prev", prepend a clone of the entire slider, and set the left position
|
948 |
+
} else {
|
949 |
+
el.prepend(slider.children.clone().addClass('bx-clone'));
|
950 |
+
position = slider.children.first().position();
|
951 |
+
startPosition = slider.settings.mode === 'horizontal' ? -position.left : -position.top;
|
952 |
+
}
|
953 |
+
setPositionProperty(startPosition, 'reset', 0);
|
954 |
+
// do not allow controls in ticker mode
|
955 |
+
slider.settings.pager = false;
|
956 |
+
slider.settings.controls = false;
|
957 |
+
slider.settings.autoControls = false;
|
958 |
+
// if autoHover is requested
|
959 |
+
if (slider.settings.tickerHover) {
|
960 |
+
if (slider.usingCSS) {
|
961 |
+
idx = slider.settings.mode === 'horizontal' ? 4 : 5;
|
962 |
+
slider.viewport.hover(function() {
|
963 |
+
transform = el.css('-' + slider.cssPrefix + '-transform');
|
964 |
+
value = parseFloat(transform.split(',')[idx]);
|
965 |
+
setPositionProperty(value, 'reset', 0);
|
966 |
+
}, function() {
|
967 |
+
totalDimens = 0;
|
968 |
+
slider.children.each(function(index) {
|
969 |
+
totalDimens += slider.settings.mode === 'horizontal' ? $(this).outerWidth(true) : $(this).outerHeight(true);
|
970 |
+
});
|
971 |
+
// calculate the speed ratio (used to determine the new speed to finish the paused animation)
|
972 |
+
ratio = slider.settings.speed / totalDimens;
|
973 |
+
// determine which property to use
|
974 |
+
property = slider.settings.mode === 'horizontal' ? 'left' : 'top';
|
975 |
+
// calculate the new speed
|
976 |
+
newSpeed = ratio * (totalDimens - (Math.abs(parseInt(value))));
|
977 |
+
tickerLoop(newSpeed);
|
978 |
+
});
|
979 |
+
} else {
|
980 |
+
// on el hover
|
981 |
+
slider.viewport.hover(function() {
|
982 |
+
el.stop();
|
983 |
+
}, function() {
|
984 |
+
// calculate the total width of children (used to calculate the speed ratio)
|
985 |
+
totalDimens = 0;
|
986 |
+
slider.children.each(function(index) {
|
987 |
+
totalDimens += slider.settings.mode === 'horizontal' ? $(this).outerWidth(true) : $(this).outerHeight(true);
|
988 |
+
});
|
989 |
+
// calculate the speed ratio (used to determine the new speed to finish the paused animation)
|
990 |
+
ratio = slider.settings.speed / totalDimens;
|
991 |
+
// determine which property to use
|
992 |
+
property = slider.settings.mode === 'horizontal' ? 'left' : 'top';
|
993 |
+
// calculate the new speed
|
994 |
+
newSpeed = ratio * (totalDimens - (Math.abs(parseInt(el.css(property)))));
|
995 |
+
tickerLoop(newSpeed);
|
996 |
+
});
|
997 |
+
}
|
998 |
+
}
|
999 |
+
// start the ticker loop
|
1000 |
+
tickerLoop();
|
1001 |
+
};
|
1002 |
+
|
1003 |
+
/**
|
1004 |
+
* Runs a continuous loop, news ticker-style
|
1005 |
+
*/
|
1006 |
+
var tickerLoop = function(resumeSpeed) {
|
1007 |
+
var speed = resumeSpeed ? resumeSpeed : slider.settings.speed,
|
1008 |
+
position = {left: 0, top: 0},
|
1009 |
+
reset = {left: 0, top: 0},
|
1010 |
+
animateProperty, resetValue, params;
|
1011 |
+
|
1012 |
+
// if "next" animate left position to last child, then reset left to 0
|
1013 |
+
if (slider.settings.autoDirection === 'next') {
|
1014 |
+
position = el.find('.bx-clone').first().position();
|
1015 |
+
// if "prev" animate left position to 0, then reset left to first non-clone child
|
1016 |
+
} else {
|
1017 |
+
reset = slider.children.first().position();
|
1018 |
+
}
|
1019 |
+
animateProperty = slider.settings.mode === 'horizontal' ? -position.left : -position.top;
|
1020 |
+
resetValue = slider.settings.mode === 'horizontal' ? -reset.left : -reset.top;
|
1021 |
+
params = {resetValue: resetValue};
|
1022 |
+
setPositionProperty(animateProperty, 'ticker', speed, params);
|
1023 |
+
};
|
1024 |
+
|
1025 |
+
/**
|
1026 |
+
* Check if el is on screen
|
1027 |
+
*/
|
1028 |
+
var isOnScreen = function(el) {
|
1029 |
+
var win = $(window),
|
1030 |
+
viewport = {
|
1031 |
+
top: win.scrollTop(),
|
1032 |
+
left: win.scrollLeft()
|
1033 |
+
},
|
1034 |
+
bounds = el.offset();
|
1035 |
+
|
1036 |
+
viewport.right = viewport.left + win.width();
|
1037 |
+
viewport.bottom = viewport.top + win.height();
|
1038 |
+
bounds.right = bounds.left + el.outerWidth();
|
1039 |
+
bounds.bottom = bounds.top + el.outerHeight();
|
1040 |
+
|
1041 |
+
return (!(viewport.right < bounds.left || viewport.left > bounds.right || viewport.bottom < bounds.top || viewport.top > bounds.bottom));
|
1042 |
+
};
|
1043 |
+
|
1044 |
+
/**
|
1045 |
+
* Initializes keyboard events
|
1046 |
+
*/
|
1047 |
+
var keyPress = function(e) {
|
1048 |
+
var activeElementTag = document.activeElement.tagName.toLowerCase(),
|
1049 |
+
tagFilters = 'input|textarea',
|
1050 |
+
p = new RegExp(activeElementTag,['i']),
|
1051 |
+
result = p.exec(tagFilters);
|
1052 |
+
|
1053 |
+
if (result == null && isOnScreen(el)) {
|
1054 |
+
if (e.keyCode === 39) {
|
1055 |
+
clickNextBind(e);
|
1056 |
+
return false;
|
1057 |
+
} else if (e.keyCode === 37) {
|
1058 |
+
clickPrevBind(e);
|
1059 |
+
return false;
|
1060 |
+
}
|
1061 |
+
}
|
1062 |
+
};
|
1063 |
+
|
1064 |
+
/**
|
1065 |
+
* Initializes touch events
|
1066 |
+
*/
|
1067 |
+
var initTouch = function() {
|
1068 |
+
// initialize object to contain all touch values
|
1069 |
+
slider.touch = {
|
1070 |
+
start: {x: 0, y: 0},
|
1071 |
+
end: {x: 0, y: 0}
|
1072 |
+
};
|
1073 |
+
slider.viewport.bind('touchstart MSPointerDown pointerdown', onTouchStart);
|
1074 |
+
|
1075 |
+
//for browsers that have implemented pointer events and fire a click after
|
1076 |
+
//every pointerup regardless of whether pointerup is on same screen location as pointerdown or not
|
1077 |
+
slider.viewport.on('click', '.bxslider a', function(e) {
|
1078 |
+
if (slider.viewport.hasClass('click-disabled')) {
|
1079 |
+
e.preventDefault();
|
1080 |
+
slider.viewport.removeClass('click-disabled');
|
1081 |
+
}
|
1082 |
+
});
|
1083 |
+
};
|
1084 |
+
|
1085 |
+
/**
|
1086 |
+
* Event handler for "touchstart"
|
1087 |
+
*
|
1088 |
+
* @param e (event)
|
1089 |
+
* - DOM event object
|
1090 |
+
*/
|
1091 |
+
var onTouchStart = function(e) {
|
1092 |
+
//disable slider controls while user is interacting with slides to avoid slider freeze that happens on touch devices when a slide swipe happens immediately after interacting with slider controls
|
1093 |
+
slider.controls.el.addClass('disabled');
|
1094 |
+
|
1095 |
+
if (slider.working) {
|
1096 |
+
e.preventDefault();
|
1097 |
+
slider.controls.el.removeClass('disabled');
|
1098 |
+
} else {
|
1099 |
+
// record the original position when touch starts
|
1100 |
+
slider.touch.originalPos = el.position();
|
1101 |
+
var orig = e.originalEvent,
|
1102 |
+
touchPoints = (typeof orig.changedTouches !== 'undefined') ? orig.changedTouches : [orig];
|
1103 |
+
// record the starting touch x, y coordinates
|
1104 |
+
slider.touch.start.x = touchPoints[0].pageX;
|
1105 |
+
slider.touch.start.y = touchPoints[0].pageY;
|
1106 |
+
|
1107 |
+
if (slider.viewport.get(0).setPointerCapture) {
|
1108 |
+
slider.pointerId = orig.pointerId;
|
1109 |
+
slider.viewport.get(0).setPointerCapture(slider.pointerId);
|
1110 |
+
}
|
1111 |
+
// bind a "touchmove" event to the viewport
|
1112 |
+
slider.viewport.bind('touchmove MSPointerMove pointermove', onTouchMove);
|
1113 |
+
// bind a "touchend" event to the viewport
|
1114 |
+
slider.viewport.bind('touchend MSPointerUp pointerup', onTouchEnd);
|
1115 |
+
slider.viewport.bind('MSPointerCancel pointercancel', onPointerCancel);
|
1116 |
+
}
|
1117 |
+
};
|
1118 |
+
|
1119 |
+
/**
|
1120 |
+
* Cancel Pointer for Windows Phone
|
1121 |
+
*
|
1122 |
+
* @param e (event)
|
1123 |
+
* - DOM event object
|
1124 |
+
*/
|
1125 |
+
var onPointerCancel = function(e) {
|
1126 |
+
/* onPointerCancel handler is needed to deal with situations when a touchend
|
1127 |
+
doesn't fire after a touchstart (this happens on windows phones only) */
|
1128 |
+
setPositionProperty(slider.touch.originalPos.left, 'reset', 0);
|
1129 |
+
|
1130 |
+
//remove handlers
|
1131 |
+
slider.controls.el.removeClass('disabled');
|
1132 |
+
slider.viewport.unbind('MSPointerCancel pointercancel', onPointerCancel);
|
1133 |
+
slider.viewport.unbind('touchmove MSPointerMove pointermove', onTouchMove);
|
1134 |
+
slider.viewport.unbind('touchend MSPointerUp pointerup', onTouchEnd);
|
1135 |
+
if (slider.viewport.get(0).releasePointerCapture) {
|
1136 |
+
slider.viewport.get(0).releasePointerCapture(slider.pointerId);
|
1137 |
+
}
|
1138 |
+
};
|
1139 |
+
|
1140 |
+
/**
|
1141 |
+
* Event handler for "touchmove"
|
1142 |
+
*
|
1143 |
+
* @param e (event)
|
1144 |
+
* - DOM event object
|
1145 |
+
*/
|
1146 |
+
var onTouchMove = function(e) {
|
1147 |
+
var orig = e.originalEvent,
|
1148 |
+
touchPoints = (typeof orig.changedTouches !== 'undefined') ? orig.changedTouches : [orig],
|
1149 |
+
// if scrolling on y axis, do not prevent default
|
1150 |
+
xMovement = Math.abs(touchPoints[0].pageX - slider.touch.start.x),
|
1151 |
+
yMovement = Math.abs(touchPoints[0].pageY - slider.touch.start.y),
|
1152 |
+
value = 0,
|
1153 |
+
change = 0;
|
1154 |
+
|
1155 |
+
// x axis swipe
|
1156 |
+
if ((xMovement * 3) > yMovement && slider.settings.preventDefaultSwipeX) {
|
1157 |
+
e.preventDefault();
|
1158 |
+
// y axis swipe
|
1159 |
+
} else if ((yMovement * 3) > xMovement && slider.settings.preventDefaultSwipeY) {
|
1160 |
+
e.preventDefault();
|
1161 |
+
}
|
1162 |
+
if (slider.settings.mode !== 'fade' && slider.settings.oneToOneTouch) {
|
1163 |
+
// if horizontal, drag along x axis
|
1164 |
+
if (slider.settings.mode === 'horizontal') {
|
1165 |
+
change = touchPoints[0].pageX - slider.touch.start.x;
|
1166 |
+
value = slider.touch.originalPos.left + change;
|
1167 |
+
// if vertical, drag along y axis
|
1168 |
+
} else {
|
1169 |
+
change = touchPoints[0].pageY - slider.touch.start.y;
|
1170 |
+
value = slider.touch.originalPos.top + change;
|
1171 |
+
}
|
1172 |
+
setPositionProperty(value, 'reset', 0);
|
1173 |
+
}
|
1174 |
+
};
|
1175 |
+
|
1176 |
+
/**
|
1177 |
+
* Event handler for "touchend"
|
1178 |
+
*
|
1179 |
+
* @param e (event)
|
1180 |
+
* - DOM event object
|
1181 |
+
*/
|
1182 |
+
var onTouchEnd = function(e) {
|
1183 |
+
slider.viewport.unbind('touchmove MSPointerMove pointermove', onTouchMove);
|
1184 |
+
//enable slider controls as soon as user stops interacing with slides
|
1185 |
+
slider.controls.el.removeClass('disabled');
|
1186 |
+
var orig = e.originalEvent,
|
1187 |
+
touchPoints = (typeof orig.changedTouches !== 'undefined') ? orig.changedTouches : [orig],
|
1188 |
+
value = 0,
|
1189 |
+
distance = 0;
|
1190 |
+
// record end x, y positions
|
1191 |
+
slider.touch.end.x = touchPoints[0].pageX;
|
1192 |
+
slider.touch.end.y = touchPoints[0].pageY;
|
1193 |
+
// if fade mode, check if absolute x distance clears the threshold
|
1194 |
+
if (slider.settings.mode === 'fade') {
|
1195 |
+
distance = Math.abs(slider.touch.start.x - slider.touch.end.x);
|
1196 |
+
if (distance >= slider.settings.swipeThreshold) {
|
1197 |
+
if (slider.touch.start.x > slider.touch.end.x) {
|
1198 |
+
el.goToNextSlide();
|
1199 |
+
} else {
|
1200 |
+
el.goToPrevSlide();
|
1201 |
+
}
|
1202 |
+
el.stopAuto();
|
1203 |
+
}
|
1204 |
+
// not fade mode
|
1205 |
+
} else {
|
1206 |
+
// calculate distance and el's animate property
|
1207 |
+
if (slider.settings.mode === 'horizontal') {
|
1208 |
+
distance = slider.touch.end.x - slider.touch.start.x;
|
1209 |
+
value = slider.touch.originalPos.left;
|
1210 |
+
} else {
|
1211 |
+
distance = slider.touch.end.y - slider.touch.start.y;
|
1212 |
+
value = slider.touch.originalPos.top;
|
1213 |
+
}
|
1214 |
+
// if not infinite loop and first / last slide, do not attempt a slide transition
|
1215 |
+
if (!slider.settings.infiniteLoop && ((slider.active.index === 0 && distance > 0) || (slider.active.last && distance < 0))) {
|
1216 |
+
setPositionProperty(value, 'reset', 200);
|
1217 |
+
} else {
|
1218 |
+
// check if distance clears threshold
|
1219 |
+
if (Math.abs(distance) >= slider.settings.swipeThreshold) {
|
1220 |
+
if (distance < 0) {
|
1221 |
+
el.goToNextSlide();
|
1222 |
+
} else {
|
1223 |
+
el.goToPrevSlide();
|
1224 |
+
}
|
1225 |
+
el.stopAuto();
|
1226 |
+
} else {
|
1227 |
+
// el.animate(property, 200);
|
1228 |
+
setPositionProperty(value, 'reset', 200);
|
1229 |
+
}
|
1230 |
+
}
|
1231 |
+
}
|
1232 |
+
slider.viewport.unbind('touchend MSPointerUp pointerup', onTouchEnd);
|
1233 |
+
if (slider.viewport.get(0).releasePointerCapture) {
|
1234 |
+
slider.viewport.get(0).releasePointerCapture(slider.pointerId);
|
1235 |
+
}
|
1236 |
+
};
|
1237 |
+
|
1238 |
+
/**
|
1239 |
+
* Window resize event callback
|
1240 |
+
*/
|
1241 |
+
var resizeWindow = function(e) {
|
1242 |
+
// don't do anything if slider isn't initialized.
|
1243 |
+
if (!slider.initialized) { return; }
|
1244 |
+
// Delay if slider working.
|
1245 |
+
if (slider.working) {
|
1246 |
+
window.setTimeout(resizeWindow, 10);
|
1247 |
+
} else {
|
1248 |
+
// get the new window dimens (again, thank you IE)
|
1249 |
+
var windowWidthNew = $(window).width(),
|
1250 |
+
windowHeightNew = $(window).height();
|
1251 |
+
// make sure that it is a true window resize
|
1252 |
+
// *we must check this because our dinosaur friend IE fires a window resize event when certain DOM elements
|
1253 |
+
// are resized. Can you just die already?*
|
1254 |
+
if (windowWidth !== windowWidthNew || windowHeight !== windowHeightNew) {
|
1255 |
+
// set the new window dimens
|
1256 |
+
windowWidth = windowWidthNew;
|
1257 |
+
windowHeight = windowHeightNew;
|
1258 |
+
// update all dynamic elements
|
1259 |
+
el.redrawSlider();
|
1260 |
+
// Call user resize handler
|
1261 |
+
slider.settings.onSliderResize.call(el, slider.active.index);
|
1262 |
+
}
|
1263 |
+
}
|
1264 |
+
};
|
1265 |
+
|
1266 |
+
/**
|
1267 |
+
* Adds an aria-hidden=true attribute to each element
|
1268 |
+
*
|
1269 |
+
* @param startVisibleIndex (int)
|
1270 |
+
* - the first visible element's index
|
1271 |
+
*/
|
1272 |
+
var applyAriaHiddenAttributes = function(startVisibleIndex) {
|
1273 |
+
var numberOfSlidesShowing = getNumberSlidesShowing();
|
1274 |
+
// only apply attributes if the setting is enabled and not in ticker mode
|
1275 |
+
if (slider.settings.ariaHidden && !slider.settings.ticker) {
|
1276 |
+
// add aria-hidden=true to all elements
|
1277 |
+
slider.children.attr('aria-hidden', 'true');
|
1278 |
+
// get the visible elements and change to aria-hidden=false
|
1279 |
+
slider.children.slice(startVisibleIndex, startVisibleIndex + numberOfSlidesShowing).attr('aria-hidden', 'false');
|
1280 |
+
}
|
1281 |
+
};
|
1282 |
+
|
1283 |
+
/**
|
1284 |
+
* Returns index according to present page range
|
1285 |
+
*
|
1286 |
+
* @param slideOndex (int)
|
1287 |
+
* - the desired slide index
|
1288 |
+
*/
|
1289 |
+
var setSlideIndex = function(slideIndex) {
|
1290 |
+
if (slideIndex < 0) {
|
1291 |
+
if (slider.settings.infiniteLoop) {
|
1292 |
+
return getPagerQty() - 1;
|
1293 |
+
}else {
|
1294 |
+
//we don't go to undefined slides
|
1295 |
+
return slider.active.index;
|
1296 |
+
}
|
1297 |
+
// if slideIndex is greater than children length, set active index to 0 (this happens during infinite loop)
|
1298 |
+
} else if (slideIndex >= getPagerQty()) {
|
1299 |
+
if (slider.settings.infiniteLoop) {
|
1300 |
+
return 0;
|
1301 |
+
} else {
|
1302 |
+
//we don't move to undefined pages
|
1303 |
+
return slider.active.index;
|
1304 |
+
}
|
1305 |
+
// set active index to requested slide
|
1306 |
+
} else {
|
1307 |
+
return slideIndex;
|
1308 |
+
}
|
1309 |
+
};
|
1310 |
+
|
1311 |
+
/**
|
1312 |
+
* ===================================================================================
|
1313 |
+
* = PUBLIC FUNCTIONS
|
1314 |
+
* ===================================================================================
|
1315 |
+
*/
|
1316 |
+
|
1317 |
+
/**
|
1318 |
+
* Performs slide transition to the specified slide
|
1319 |
+
*
|
1320 |
+
* @param slideIndex (int)
|
1321 |
+
* - the destination slide's index (zero-based)
|
1322 |
+
*
|
1323 |
+
* @param direction (string)
|
1324 |
+
* - INTERNAL USE ONLY - the direction of travel ("prev" / "next")
|
1325 |
+
*/
|
1326 |
+
el.goToSlide = function(slideIndex, direction) {
|
1327 |
+
// onSlideBefore, onSlideNext, onSlidePrev callbacks
|
1328 |
+
// Allow transition canceling based on returned value
|
1329 |
+
var performTransition = true,
|
1330 |
+
moveBy = 0,
|
1331 |
+
position = {left: 0, top: 0},
|
1332 |
+
lastChild = null,
|
1333 |
+
lastShowingIndex, eq, value, requestEl;
|
1334 |
+
// store the old index
|
1335 |
+
slider.oldIndex = slider.active.index;
|
1336 |
+
//set new index
|
1337 |
+
slider.active.index = setSlideIndex(slideIndex);
|
1338 |
+
|
1339 |
+
// if plugin is currently in motion, ignore request
|
1340 |
+
if (slider.working || slider.active.index === slider.oldIndex) { return; }
|
1341 |
+
// declare that plugin is in motion
|
1342 |
+
slider.working = true;
|
1343 |
+
|
1344 |
+
performTransition = slider.settings.onSlideBefore.call(el, slider.children.eq(slider.active.index), slider.oldIndex, slider.active.index);
|
1345 |
+
|
1346 |
+
// If transitions canceled, reset and return
|
1347 |
+
if (typeof (performTransition) !== 'undefined' && !performTransition) {
|
1348 |
+
slider.active.index = slider.oldIndex; // restore old index
|
1349 |
+
slider.working = false; // is not in motion
|
1350 |
+
return;
|
1351 |
+
}
|
1352 |
+
|
1353 |
+
if (direction === 'next') {
|
1354 |
+
// Prevent canceling in future functions or lack there-of from negating previous commands to cancel
|
1355 |
+
if (!slider.settings.onSlideNext.call(el, slider.children.eq(slider.active.index), slider.oldIndex, slider.active.index)) {
|
1356 |
+
performTransition = false;
|
1357 |
+
}
|
1358 |
+
} else if (direction === 'prev') {
|
1359 |
+
// Prevent canceling in future functions or lack there-of from negating previous commands to cancel
|
1360 |
+
if (!slider.settings.onSlidePrev.call(el, slider.children.eq(slider.active.index), slider.oldIndex, slider.active.index)) {
|
1361 |
+
performTransition = false;
|
1362 |
+
}
|
1363 |
+
}
|
1364 |
+
|
1365 |
+
// check if last slide
|
1366 |
+
slider.active.last = slider.active.index >= getPagerQty() - 1;
|
1367 |
+
// update the pager with active class
|
1368 |
+
if (slider.settings.pager || slider.settings.pagerCustom) { updatePagerActive(slider.active.index); }
|
1369 |
+
// // check for direction control update
|
1370 |
+
if (slider.settings.controls) { updateDirectionControls(); }
|
1371 |
+
// if slider is set to mode: "fade"
|
1372 |
+
if (slider.settings.mode === 'fade') {
|
1373 |
+
// if adaptiveHeight is true and next height is different from current height, animate to the new height
|
1374 |
+
if (slider.settings.adaptiveHeight && slider.viewport.height() !== getViewportHeight()) {
|
1375 |
+
slider.viewport.animate({height: getViewportHeight()}, slider.settings.adaptiveHeightSpeed);
|
1376 |
+
}
|
1377 |
+
// fade out the visible child and reset its z-index value
|
1378 |
+
slider.children.filter(':visible').fadeOut(slider.settings.speed).css({zIndex: 0});
|
1379 |
+
// fade in the newly requested slide
|
1380 |
+
slider.children.eq(slider.active.index).css('zIndex', slider.settings.slideZIndex + 1).fadeIn(slider.settings.speed, function() {
|
1381 |
+
$(this).css('zIndex', slider.settings.slideZIndex);
|
1382 |
+
updateAfterSlideTransition();
|
1383 |
+
});
|
1384 |
+
// slider mode is not "fade"
|
1385 |
+
} else {
|
1386 |
+
// if adaptiveHeight is true and next height is different from current height, animate to the new height
|
1387 |
+
if (slider.settings.adaptiveHeight && slider.viewport.height() !== getViewportHeight()) {
|
1388 |
+
slider.viewport.animate({height: getViewportHeight()}, slider.settings.adaptiveHeightSpeed);
|
1389 |
+
}
|
1390 |
+
// if carousel and not infinite loop
|
1391 |
+
if (!slider.settings.infiniteLoop && slider.carousel && slider.active.last) {
|
1392 |
+
if (slider.settings.mode === 'horizontal') {
|
1393 |
+
// get the last child position
|
1394 |
+
lastChild = slider.children.eq(slider.children.length - 1);
|
1395 |
+
position = lastChild.position();
|
1396 |
+
// calculate the position of the last slide
|
1397 |
+
moveBy = slider.viewport.width() - lastChild.outerWidth();
|
1398 |
+
} else {
|
1399 |
+
// get last showing index position
|
1400 |
+
lastShowingIndex = slider.children.length - slider.settings.minSlides;
|
1401 |
+
position = slider.children.eq(lastShowingIndex).position();
|
1402 |
+
}
|
1403 |
+
// horizontal carousel, going previous while on first slide (infiniteLoop mode)
|
1404 |
+
} else if (slider.carousel && slider.active.last && direction === 'prev') {
|
1405 |
+
// get the last child position
|
1406 |
+
eq = slider.settings.moveSlides === 1 ? slider.settings.maxSlides - getMoveBy() : ((getPagerQty() - 1) * getMoveBy()) - (slider.children.length - slider.settings.maxSlides);
|
1407 |
+
lastChild = el.children('.bx-clone').eq(eq);
|
1408 |
+
position = lastChild.position();
|
1409 |
+
// if infinite loop and "Next" is clicked on the last slide
|
1410 |
+
} else if (direction === 'next' && slider.active.index === 0) {
|
1411 |
+
// get the last clone position
|
1412 |
+
position = el.find('> .bx-clone').eq(slider.settings.maxSlides).position();
|
1413 |
+
slider.active.last = false;
|
1414 |
+
// normal non-zero requests
|
1415 |
+
} else if (slideIndex >= 0) {
|
1416 |
+
//parseInt is applied to allow floats for slides/page
|
1417 |
+
requestEl = slideIndex * parseInt(getMoveBy());
|
1418 |
+
position = slider.children.eq(requestEl).position();
|
1419 |
+
}
|
1420 |
+
|
1421 |
+
/* If the position doesn't exist
|
1422 |
+
* (e.g. if you destroy the slider on a next click),
|
1423 |
+
* it doesn't throw an error.
|
1424 |
+
*/
|
1425 |
+
if (typeof (position) !== 'undefined') {
|
1426 |
+
value = slider.settings.mode === 'horizontal' ? -(position.left - moveBy) : -position.top;
|
1427 |
+
// plugin values to be animated
|
1428 |
+
setPositionProperty(value, 'slide', slider.settings.speed);
|
1429 |
+
} else {
|
1430 |
+
slider.working = false;
|
1431 |
+
}
|
1432 |
+
}
|
1433 |
+
if (slider.settings.ariaHidden) { applyAriaHiddenAttributes(slider.active.index * getMoveBy()); }
|
1434 |
+
};
|
1435 |
+
|
1436 |
+
/**
|
1437 |
+
* Transitions to the next slide in the show
|
1438 |
+
*/
|
1439 |
+
el.goToNextSlide = function() {
|
1440 |
+
// if infiniteLoop is false and last page is showing, disregard call
|
1441 |
+
if (!slider.settings.infiniteLoop && slider.active.last) { return; }
|
1442 |
+
var pagerIndex = parseInt(slider.active.index) + 1;
|
1443 |
+
el.goToSlide(pagerIndex, 'next');
|
1444 |
+
};
|
1445 |
+
|
1446 |
+
/**
|
1447 |
+
* Transitions to the prev slide in the show
|
1448 |
+
*/
|
1449 |
+
el.goToPrevSlide = function() {
|
1450 |
+
// if infiniteLoop is false and last page is showing, disregard call
|
1451 |
+
if (!slider.settings.infiniteLoop && slider.active.index === 0) { return; }
|
1452 |
+
var pagerIndex = parseInt(slider.active.index) - 1;
|
1453 |
+
el.goToSlide(pagerIndex, 'prev');
|
1454 |
+
};
|
1455 |
+
|
1456 |
+
/**
|
1457 |
+
* Starts the auto show
|
1458 |
+
*
|
1459 |
+
* @param preventControlUpdate (boolean)
|
1460 |
+
* - if true, auto controls state will not be updated
|
1461 |
+
*/
|
1462 |
+
el.startAuto = function(preventControlUpdate) {
|
1463 |
+
// if an interval already exists, disregard call
|
1464 |
+
if (slider.interval) { return; }
|
1465 |
+
// create an interval
|
1466 |
+
slider.interval = setInterval(function() {
|
1467 |
+
if (slider.settings.autoDirection === 'next') {
|
1468 |
+
el.goToNextSlide();
|
1469 |
+
} else {
|
1470 |
+
el.goToPrevSlide();
|
1471 |
+
}
|
1472 |
+
}, slider.settings.pause);
|
1473 |
+
// if auto controls are displayed and preventControlUpdate is not true
|
1474 |
+
if (slider.settings.autoControls && preventControlUpdate !== true) { updateAutoControls('stop'); }
|
1475 |
+
};
|
1476 |
+
|
1477 |
+
/**
|
1478 |
+
* Stops the auto show
|
1479 |
+
*
|
1480 |
+
* @param preventControlUpdate (boolean)
|
1481 |
+
* - if true, auto controls state will not be updated
|
1482 |
+
*/
|
1483 |
+
el.stopAuto = function(preventControlUpdate) {
|
1484 |
+
// if no interval exists, disregard call
|
1485 |
+
if (!slider.interval) { return; }
|
1486 |
+
// clear the interval
|
1487 |
+
clearInterval(slider.interval);
|
1488 |
+
slider.interval = null;
|
1489 |
+
// if auto controls are displayed and preventControlUpdate is not true
|
1490 |
+
if (slider.settings.autoControls && preventControlUpdate !== true) { updateAutoControls('start'); }
|
1491 |
+
};
|
1492 |
+
|
1493 |
+
/**
|
1494 |
+
* Returns current slide index (zero-based)
|
1495 |
+
*/
|
1496 |
+
el.getCurrentSlide = function() {
|
1497 |
+
return slider.active.index;
|
1498 |
+
};
|
1499 |
+
|
1500 |
+
/**
|
1501 |
+
* Returns current slide element
|
1502 |
+
*/
|
1503 |
+
el.getCurrentSlideElement = function() {
|
1504 |
+
return slider.children.eq(slider.active.index);
|
1505 |
+
};
|
1506 |
+
|
1507 |
+
/**
|
1508 |
+
* Returns a slide element
|
1509 |
+
* @param index (int)
|
1510 |
+
* - The index (zero-based) of the element you want returned.
|
1511 |
+
*/
|
1512 |
+
el.getSlideElement = function(index) {
|
1513 |
+
return slider.children.eq(index);
|
1514 |
+
};
|
1515 |
+
|
1516 |
+
/**
|
1517 |
+
* Returns number of slides in show
|
1518 |
+
*/
|
1519 |
+
el.getSlideCount = function() {
|
1520 |
+
return slider.children.length;
|
1521 |
+
};
|
1522 |
+
|
1523 |
+
/**
|
1524 |
+
* Return slider.working variable
|
1525 |
+
*/
|
1526 |
+
el.isWorking = function() {
|
1527 |
+
return slider.working;
|
1528 |
+
};
|
1529 |
+
|
1530 |
+
/**
|
1531 |
+
* Update all dynamic slider elements
|
1532 |
+
*/
|
1533 |
+
el.redrawSlider = function() {
|
1534 |
+
// resize all children in ratio to new screen size
|
1535 |
+
slider.children.add(el.find('.bx-clone')).outerWidth(getSlideWidth());
|
1536 |
+
// adjust the height
|
1537 |
+
slider.viewport.css('height', getViewportHeight());
|
1538 |
+
// update the slide position
|
1539 |
+
if (!slider.settings.ticker) { setSlidePosition(); }
|
1540 |
+
// if active.last was true before the screen resize, we want
|
1541 |
+
// to keep it last no matter what screen size we end on
|
1542 |
+
if (slider.active.last) { slider.active.index = getPagerQty() - 1; }
|
1543 |
+
// if the active index (page) no longer exists due to the resize, simply set the index as last
|
1544 |
+
if (slider.active.index >= getPagerQty()) { slider.active.last = true; }
|
1545 |
+
// if a pager is being displayed and a custom pager is not being used, update it
|
1546 |
+
if (slider.settings.pager && !slider.settings.pagerCustom) {
|
1547 |
+
populatePager();
|
1548 |
+
updatePagerActive(slider.active.index);
|
1549 |
+
}
|
1550 |
+
if (slider.settings.ariaHidden) { applyAriaHiddenAttributes(slider.active.index * getMoveBy()); }
|
1551 |
+
};
|
1552 |
+
|
1553 |
+
/**
|
1554 |
+
* Destroy the current instance of the slider (revert everything back to original state)
|
1555 |
+
*/
|
1556 |
+
el.destroySlider = function() {
|
1557 |
+
// don't do anything if slider has already been destroyed
|
1558 |
+
if (!slider.initialized) { return; }
|
1559 |
+
slider.initialized = false;
|
1560 |
+
$('.bx-clone', this).remove();
|
1561 |
+
slider.children.each(function() {
|
1562 |
+
if ($(this).data('origStyle') !== undefined) {
|
1563 |
+
$(this).attr('style', $(this).data('origStyle'));
|
1564 |
+
} else {
|
1565 |
+
$(this).removeAttr('style');
|
1566 |
+
}
|
1567 |
+
});
|
1568 |
+
if ($(this).data('origStyle') !== undefined) {
|
1569 |
+
this.attr('style', $(this).data('origStyle'));
|
1570 |
+
} else {
|
1571 |
+
$(this).removeAttr('style');
|
1572 |
+
}
|
1573 |
+
$(this).unwrap().unwrap();
|
1574 |
+
if (slider.controls.el) { slider.controls.el.remove(); }
|
1575 |
+
if (slider.controls.next) { slider.controls.next.remove(); }
|
1576 |
+
if (slider.controls.prev) { slider.controls.prev.remove(); }
|
1577 |
+
if (slider.pagerEl && slider.settings.controls && !slider.settings.pagerCustom) { slider.pagerEl.remove(); }
|
1578 |
+
$('.bx-caption', this).remove();
|
1579 |
+
if (slider.controls.autoEl) { slider.controls.autoEl.remove(); }
|
1580 |
+
clearInterval(slider.interval);
|
1581 |
+
if (slider.settings.responsive) { $(window).unbind('resize', resizeWindow); }
|
1582 |
+
if (slider.settings.keyboardEnabled) { $(document).unbind('keydown', keyPress); }
|
1583 |
+
//remove self reference in data
|
1584 |
+
$(this).removeData('bxSlider');
|
1585 |
+
};
|
1586 |
+
|
1587 |
+
/**
|
1588 |
+
* Reload the slider (revert all DOM changes, and re-initialize)
|
1589 |
+
*/
|
1590 |
+
el.reloadSlider = function(settings) {
|
1591 |
+
if (settings !== undefined) { options = settings; }
|
1592 |
+
el.destroySlider();
|
1593 |
+
init();
|
1594 |
+
//store reference to self in order to access public functions later
|
1595 |
+
$(el).data('bxSlider', this);
|
1596 |
+
};
|
1597 |
+
|
1598 |
+
init();
|
1599 |
+
|
1600 |
+
$(el).data('bxSlider', this);
|
1601 |
+
|
1602 |
+
// returns the current jQuery object
|
1603 |
+
return this;
|
1604 |
+
};
|
1605 |
|
1606 |
})(jQuery);
|
includes/libraries/bxslider-4/src/less/jquery.bxslider.less
CHANGED
@@ -1,15 +1,7 @@
|
|
1 |
-
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
* Written by: Steven Wanderski, 2014
|
6 |
-
* http://stevenwanderski.com
|
7 |
-
* (while drinking Belgian ales and listening to jazz)
|
8 |
-
*
|
9 |
-
* CEO and founder of bxCreative, LTD
|
10 |
-
* http://bxcreative.com
|
11 |
-
***/
|
12 |
-
|
13 |
|
14 |
/** RESET AND LAYOUT
|
15 |
===================================*/
|
@@ -61,7 +53,7 @@ ul.bxslider {
|
|
61 |
/* LOADER */
|
62 |
.bx-wrapper .bx-loading {
|
63 |
min-height: 50px;
|
64 |
-
background: url(
|
65 |
height: 100%;
|
66 |
width: 100%;
|
67 |
position: absolute;
|
@@ -113,7 +105,7 @@ ul.bxslider {
|
|
113 |
.bx-wrapper {
|
114 |
.bx-prev {
|
115 |
left: 10px;
|
116 |
-
background: url(
|
117 |
&:hover,
|
118 |
&:focus {
|
119 |
background-position: 0 0;
|
@@ -121,7 +113,7 @@ ul.bxslider {
|
|
121 |
}
|
122 |
.bx-next {
|
123 |
right: 10px;
|
124 |
-
background: url(
|
125 |
&:hover,
|
126 |
&:focus {
|
127 |
background-position: -43px 0;
|
@@ -151,7 +143,7 @@ ul.bxslider {
|
|
151 |
width: 10px;
|
152 |
height: 11px;
|
153 |
outline: 0;
|
154 |
-
background: url(
|
155 |
margin: 0 3px;
|
156 |
&:hover,
|
157 |
&.active,
|
@@ -165,7 +157,7 @@ ul.bxslider {
|
|
165 |
width: 9px;
|
166 |
height: 11px;
|
167 |
outline: 0;
|
168 |
-
background: url(
|
169 |
margin: 0 3px;
|
170 |
&:hover,
|
171 |
&.active,
|
1 |
+
/** VARIABLES
|
2 |
+
===================================*/
|
3 |
+
@controls: 'images/controls.png';
|
4 |
+
@loader: 'images/bx_loader.gif';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5 |
|
6 |
/** RESET AND LAYOUT
|
7 |
===================================*/
|
53 |
/* LOADER */
|
54 |
.bx-wrapper .bx-loading {
|
55 |
min-height: 50px;
|
56 |
+
background: url(@loader) center center no-repeat #fff;
|
57 |
height: 100%;
|
58 |
width: 100%;
|
59 |
position: absolute;
|
105 |
.bx-wrapper {
|
106 |
.bx-prev {
|
107 |
left: 10px;
|
108 |
+
background: url(@controls) no-repeat 0 -32px;
|
109 |
&:hover,
|
110 |
&:focus {
|
111 |
background-position: 0 0;
|
113 |
}
|
114 |
.bx-next {
|
115 |
right: 10px;
|
116 |
+
background: url(@controls) no-repeat -43px -32px;
|
117 |
&:hover,
|
118 |
&:focus {
|
119 |
background-position: -43px 0;
|
143 |
width: 10px;
|
144 |
height: 11px;
|
145 |
outline: 0;
|
146 |
+
background: url(@controls) -86px -11px no-repeat;
|
147 |
margin: 0 3px;
|
148 |
&:hover,
|
149 |
&.active,
|
157 |
width: 9px;
|
158 |
height: 11px;
|
159 |
outline: 0;
|
160 |
+
background: url(@controls) -86px -44px no-repeat;
|
161 |
margin: 0 3px;
|
162 |
&:hover,
|
163 |
&.active,
|
languages/testimonials-widget.pot
CHANGED
@@ -2,9 +2,9 @@
|
|
2 |
# This file is distributed under the same license as the Testimonials Widget package.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
-
"Project-Id-Version: Testimonials Widget 3.
|
6 |
"Report-Msgid-Bugs-To: http://wordpress.org/support/plugin/testimonials-widget\n"
|
7 |
-
"POT-Creation-Date: 2015-
|
8 |
"MIME-Version: 1.0\n"
|
9 |
"Content-Type: text/plain; charset=UTF-8\n"
|
10 |
"Content-Transfer-Encoding: 8bit\n"
|
@@ -68,37 +68,37 @@ msgid "Settings"
|
|
68 |
msgstr ""
|
69 |
|
70 |
#: includes/class-testimonials-widget-settings.php:113
|
71 |
-
#: includes/class-testimonials-widget-settings.php:
|
72 |
msgid "General"
|
73 |
msgstr ""
|
74 |
|
75 |
#: includes/class-testimonials-widget-settings.php:114
|
76 |
-
#: includes/class-testimonials-widget-settings.php:
|
77 |
msgid "Fields"
|
78 |
msgstr ""
|
79 |
|
80 |
#: includes/class-testimonials-widget-settings.php:115
|
81 |
-
#: includes/class-testimonials-widget-settings.php:
|
82 |
msgid "Selection"
|
83 |
msgstr ""
|
84 |
|
85 |
#: includes/class-testimonials-widget-settings.php:116
|
86 |
-
#: includes/class-testimonials-widget-settings.php:
|
87 |
msgid "Ordering"
|
88 |
msgstr ""
|
89 |
|
90 |
#: includes/class-testimonials-widget-settings.php:117
|
91 |
-
#: includes/class-testimonials-widget-settings.php:
|
92 |
msgid "Columns"
|
93 |
msgstr ""
|
94 |
|
95 |
#: includes/class-testimonials-widget-settings.php:118
|
96 |
-
#: includes/class-testimonials-widget-settings.php:
|
97 |
msgid "Post Type"
|
98 |
msgstr ""
|
99 |
|
100 |
#: includes/class-testimonials-widget-settings.php:119
|
101 |
-
#: includes/class-testimonials-widget-settings.php:
|
102 |
msgid "Slider Widget"
|
103 |
msgstr ""
|
104 |
|
@@ -116,8 +116,8 @@ msgid "Title"
|
|
116 |
msgstr ""
|
117 |
|
118 |
#: includes/class-testimonials-widget-settings.php:140
|
119 |
-
#: includes/class-testimonials-widget.php:
|
120 |
-
#: includes/class-testimonials-widget.php:
|
121 |
msgid "Testimonials"
|
122 |
msgstr ""
|
123 |
|
@@ -485,14 +485,14 @@ msgstr ""
|
|
485 |
|
486 |
#: includes/class-testimonials-widget-settings.php:508
|
487 |
#: includes/class-testimonials-widget-settings.php:511
|
488 |
-
#: includes/class-testimonials-widget.php:
|
489 |
-
#: includes/class-testimonials-widget.php:
|
490 |
-
#: includes/class-testimonials-widget.php:
|
491 |
msgid "Author"
|
492 |
msgstr ""
|
493 |
|
494 |
#: includes/class-testimonials-widget-settings.php:509
|
495 |
-
#: includes/class-testimonials-widget.php:
|
496 |
msgid "Date"
|
497 |
msgstr ""
|
498 |
|
@@ -517,32 +517,32 @@ msgid "None"
|
|
517 |
msgstr ""
|
518 |
|
519 |
#: includes/class-testimonials-widget-settings.php:525
|
520 |
-
#: includes/class-testimonials-widget.php:
|
521 |
-
#: includes/class-testimonials-widget.php:
|
522 |
msgid "Job Title"
|
523 |
msgstr ""
|
524 |
|
525 |
#: includes/class-testimonials-widget-settings.php:526
|
526 |
-
#: includes/class-testimonials-widget.php:
|
527 |
-
#: includes/class-testimonials-widget.php:
|
528 |
msgid "Email"
|
529 |
msgstr ""
|
530 |
|
531 |
#: includes/class-testimonials-widget-settings.php:527
|
532 |
-
#: includes/class-testimonials-widget.php:
|
533 |
-
#: includes/class-testimonials-widget.php:
|
534 |
msgid "Location"
|
535 |
msgstr ""
|
536 |
|
537 |
#: includes/class-testimonials-widget-settings.php:528
|
538 |
-
#: includes/class-testimonials-widget.php:
|
539 |
-
#: includes/class-testimonials-widget.php:
|
540 |
msgid "Company"
|
541 |
msgstr ""
|
542 |
|
543 |
#: includes/class-testimonials-widget-settings.php:529
|
544 |
-
#: includes/class-testimonials-widget.php:
|
545 |
-
#: includes/class-testimonials-widget.php:
|
546 |
msgid "URL"
|
547 |
msgstr ""
|
548 |
|
@@ -615,52 +615,52 @@ msgid "Hide Shortcode?"
|
|
615 |
msgstr ""
|
616 |
|
617 |
#: includes/class-testimonials-widget-settings.php:708
|
618 |
-
#: includes/class-testimonials-widget-settings.php:
|
619 |
#: includes/libraries/aihrus-framework/includes/class-aihrus-settings.php:65
|
620 |
msgid "Reset"
|
621 |
msgstr ""
|
622 |
|
623 |
-
#: includes/class-testimonials-widget-settings.php:
|
624 |
msgid "These Testimonials Settings establish the default option values for shortcodes, theme functions, and widget instances. Widgets, once created no longer inherit these global settings. Therefore, you'll need to update each widget with the new settings. It might be easier to delete the widget and then recreate it."
|
625 |
msgstr ""
|
626 |
|
627 |
-
#: includes/class-testimonials-widget-settings.php:
|
628 |
msgid "Shortcode option names are listed below each entry."
|
629 |
msgstr ""
|
630 |
|
631 |
-
#: includes/class-testimonials-widget-settings.php:
|
632 |
msgid "View the <a href=\"%s\">Testimonials documentation</a>."
|
633 |
msgstr ""
|
634 |
|
635 |
-
#: includes/class-testimonials-widget-settings.php:
|
636 |
msgid "General options."
|
637 |
msgstr ""
|
638 |
|
639 |
-
#: includes/class-testimonials-widget-settings.php:
|
640 |
msgid "Show or hide fields."
|
641 |
msgstr ""
|
642 |
|
643 |
-
#: includes/class-testimonials-widget-settings.php:
|
644 |
msgid "Options used to select testimonials."
|
645 |
msgstr ""
|
646 |
|
647 |
-
#: includes/class-testimonials-widget-settings.php:
|
648 |
msgid "Options used to determine displayed testimonials ordering."
|
649 |
msgstr ""
|
650 |
|
651 |
-
#: includes/class-testimonials-widget-settings.php:
|
652 |
msgid "Allowed columns to display on edit page."
|
653 |
msgstr ""
|
654 |
|
655 |
-
#: includes/class-testimonials-widget-settings.php:
|
656 |
msgid "Archive and singular page URL related testimonials options."
|
657 |
msgstr ""
|
658 |
|
659 |
-
#: includes/class-testimonials-widget-settings.php:
|
660 |
msgid "Options related to showing testimonials in widgets."
|
661 |
msgstr ""
|
662 |
|
663 |
-
#: includes/class-testimonials-widget-settings.php:
|
664 |
msgid "Backwards compatibility, import/export options, and reset options."
|
665 |
msgstr ""
|
666 |
|
@@ -690,15 +690,15 @@ msgstr ""
|
|
690 |
|
691 |
#: includes/class-testimonials-widget-tag-cloud-widget.php:63
|
692 |
#: includes/class-testimonials-widget-tag-cloud-widget.php:70
|
693 |
-
#: includes/class-testimonials-widget.php:510
|
694 |
#: includes/class-testimonials-widget.php:513
|
|
|
695 |
msgid "Category"
|
696 |
msgstr ""
|
697 |
|
698 |
#: includes/class-testimonials-widget-tag-cloud-widget.php:64
|
699 |
#: includes/class-testimonials-widget-tag-cloud-widget.php:71
|
700 |
-
#: includes/class-testimonials-widget.php:511
|
701 |
#: includes/class-testimonials-widget.php:514
|
|
|
702 |
msgid "Tags"
|
703 |
msgstr ""
|
704 |
|
@@ -706,140 +706,140 @@ msgstr ""
|
|
706 |
msgid "Taxonomy"
|
707 |
msgstr ""
|
708 |
|
709 |
-
#: includes/class-testimonials-widget.php:
|
710 |
msgid "If your Testimonials display has gone to funky town, please <a href=\"%s\">read the FAQ</a> about possible CSS fixes."
|
711 |
msgstr ""
|
712 |
|
713 |
-
#: includes/class-testimonials-widget.php:
|
714 |
msgid "Published by"
|
715 |
msgstr ""
|
716 |
|
717 |
-
#: includes/class-testimonials-widget.php:
|
718 |
msgid "ID"
|
719 |
msgstr ""
|
720 |
|
721 |
-
#: includes/class-testimonials-widget.php:
|
722 |
msgid "Image"
|
723 |
msgstr ""
|
724 |
|
725 |
-
#: includes/class-testimonials-widget.php:
|
726 |
msgid "Shortcodes"
|
727 |
msgstr ""
|
728 |
|
729 |
-
#: includes/class-testimonials-widget.php:
|
730 |
msgid "Add New"
|
731 |
msgstr ""
|
732 |
|
733 |
-
#: includes/class-testimonials-widget.php:571
|
734 |
#: includes/class-testimonials-widget.php:574
|
|
|
735 |
msgid "Add New Testimonial"
|
736 |
msgstr ""
|
737 |
|
738 |
-
#: includes/class-testimonials-widget.php:
|
739 |
msgid "Edit Testimonial"
|
740 |
msgstr ""
|
741 |
|
742 |
-
#: includes/class-testimonials-widget.php:
|
743 |
-
#: includes/class-testimonials-widget.php:
|
744 |
msgid "No testimonials found"
|
745 |
msgstr ""
|
746 |
|
747 |
-
#: includes/class-testimonials-widget.php:
|
748 |
msgid "No testimonials found in Trash"
|
749 |
msgstr ""
|
750 |
|
751 |
-
#: includes/class-testimonials-widget.php:
|
752 |
msgid "Search Testimonials"
|
753 |
msgstr ""
|
754 |
|
755 |
-
#: includes/class-testimonials-widget.php:
|
756 |
-
#: includes/class-testimonials-widget.php:
|
757 |
-
#: includes/class-testimonials-widget.php:
|
758 |
msgid "Testimonial"
|
759 |
msgstr ""
|
760 |
|
761 |
-
#: includes/class-testimonials-widget.php:
|
762 |
msgid "View Testimonial"
|
763 |
msgstr ""
|
764 |
|
765 |
-
#: includes/class-testimonials-widget.php:
|
766 |
msgid "Use when the testimonial title is not the authors' name."
|
767 |
msgstr ""
|
768 |
|
769 |
-
#: includes/class-testimonials-widget.php:
|
770 |
msgid "If an email is provided, but not an image, a Gravatar icon will be attempted to be loaded."
|
771 |
msgstr ""
|
772 |
|
773 |
-
#: includes/class-testimonials-widget.php:
|
774 |
msgid "Testimonial Data"
|
775 |
msgstr ""
|
776 |
|
777 |
-
#: includes/class-testimonials-widget.php:
|
778 |
msgid "Testimonial updated. <a href=\"%s\">View testimonial</a>"
|
779 |
msgstr ""
|
780 |
|
781 |
-
#: includes/class-testimonials-widget.php:
|
782 |
msgid "Custom field updated."
|
783 |
msgstr ""
|
784 |
|
785 |
-
#: includes/class-testimonials-widget.php:
|
786 |
msgid "Custom field deleted."
|
787 |
msgstr ""
|
788 |
|
789 |
-
#: includes/class-testimonials-widget.php:
|
790 |
msgid "Testimonial updated."
|
791 |
msgstr ""
|
792 |
|
793 |
#. translators: %s: date and time of the revision
|
794 |
|
795 |
-
#: includes/class-testimonials-widget.php:
|
796 |
msgid "Testimonial restored to revision from %s"
|
797 |
msgstr ""
|
798 |
|
799 |
-
#: includes/class-testimonials-widget.php:
|
800 |
msgid "Testimonial published. <a href=\"%s\">View testimonial</a>"
|
801 |
msgstr ""
|
802 |
|
803 |
-
#: includes/class-testimonials-widget.php:
|
804 |
msgid "Testimonial saved."
|
805 |
msgstr ""
|
806 |
|
807 |
-
#: includes/class-testimonials-widget.php:
|
808 |
msgid "Testimonial submitted. <a target=\"_blank\" href=\"%s\">Preview testimonial</a>"
|
809 |
msgstr ""
|
810 |
|
811 |
-
#: includes/class-testimonials-widget.php:
|
812 |
msgid "Testimonial scheduled for: <strong>%1$s</strong>. <a target=\"_blank\" href=\"%2$s\">Preview testimonial</a>"
|
813 |
msgstr ""
|
814 |
|
815 |
-
#: includes/class-testimonials-widget.php:
|
816 |
msgid "Testimonial draft updated. <a target=\"_blank\" href=\"%s\">Preview testimonial</a>"
|
817 |
msgstr ""
|
818 |
|
819 |
-
#: includes/class-testimonials-widget.php:
|
820 |
msgid "If your Testimonials display has gone to funky town, please <a href=\"%s\">read the FAQ</a> about possible fixes."
|
821 |
msgstr ""
|
822 |
|
823 |
-
#: includes/class-testimonials-widget.php:
|
824 |
msgid "Failed version check"
|
825 |
msgstr ""
|
826 |
|
827 |
-
#: includes/class-testimonials-widget.php:
|
828 |
msgid "Shortcode"
|
829 |
msgstr ""
|
830 |
|
831 |
-
#: includes/class-testimonials-widget.php:
|
832 |
-
#: includes/class-testimonials-widget.php:
|
833 |
msgid "Used with: "
|
834 |
msgstr ""
|
835 |
|
836 |
-
#: includes/class-testimonials-widget.php:
|
837 |
-
#: includes/class-testimonials-widget.php:
|
838 |
msgid "Options: "
|
839 |
msgstr ""
|
840 |
|
841 |
-
#: includes/class-testimonials-widget.php:
|
842 |
-
#: includes/class-testimonials-widget.php:
|
843 |
msgid "Usage: "
|
844 |
msgstr ""
|
845 |
|
@@ -925,7 +925,7 @@ msgid "Unknown"
|
|
925 |
msgstr ""
|
926 |
|
927 |
#: includes/libraries/aihrus-framework/aihrus-framework.php:347
|
928 |
-
msgid "Plugin \"%1$s\" has been deactivated due to \"%2$s\". Once corrected, \"%1$s\" can be activated.</p><p>If you want to revert \"%1$s\", look for <a href=\"%3$s\">older versions on WordPress</a> or <a href=\"mailto:support@
|
929 |
msgstr ""
|
930 |
|
931 |
#: includes/libraries/aihrus-framework/aihrus-framework.php:358
|
@@ -1073,26 +1073,26 @@ msgid "Check this box to reset options to their defaults."
|
|
1073 |
msgstr ""
|
1074 |
|
1075 |
#: includes/libraries/aihrus-framework/includes/class-aihrus-settings.php:251
|
1076 |
-
msgid "<img class=\"size-medium\" src=\"%5$s\" alt=\"Axelerant 2015 Retreat in Goa\" width=\"640\" height=\"327\" /><p>
|
1077 |
msgstr ""
|
1078 |
|
1079 |
-
#: includes/libraries/aihrus-framework/includes/class-aihrus-settings.php:
|
1080 |
msgid "Save Changes"
|
1081 |
msgstr ""
|
1082 |
|
1083 |
-
#: includes/libraries/aihrus-framework/includes/class-aihrus-settings.php:
|
1084 |
msgid "If you like this plugin, please <a href=\"%1$s\" title=\"Donate for Good Karma\"><img src=\"%2$s\" border=\"0\" alt=\"Donate for Good Karma\" /></a> or <a href=\"%3$s\" title=\"purchase premium WordPress plugins from Axelerant \">purchase the Premium version</a> to help fund further development and <a href=\"%4$s\" title=\"Support forums\">support</a>."
|
1085 |
msgstr ""
|
1086 |
|
1087 |
-
#: includes/libraries/aihrus-framework/includes/class-aihrus-settings.php:
|
1088 |
msgid "Copyright ©%1$s <a href=\"%2$s\">Axlerant</a>."
|
1089 |
msgstr ""
|
1090 |
|
1091 |
-
#: includes/libraries/aihrus-framework/includes/class-aihrus-settings.php:
|
1092 |
msgid "Settings saved."
|
1093 |
msgstr ""
|
1094 |
|
1095 |
-
#: includes/libraries/aihrus-framework/includes/class-aihrus-settings.php:
|
1096 |
msgid "Required"
|
1097 |
msgstr ""
|
1098 |
|
@@ -1168,5 +1168,5 @@ msgid "Axelerant"
|
|
1168 |
msgstr ""
|
1169 |
|
1170 |
#. Author URI of the plugin/theme
|
1171 |
-
msgid "
|
1172 |
msgstr ""
|
2 |
# This file is distributed under the same license as the Testimonials Widget package.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
+
"Project-Id-Version: Testimonials Widget 3.2.0\n"
|
6 |
"Report-Msgid-Bugs-To: http://wordpress.org/support/plugin/testimonials-widget\n"
|
7 |
+
"POT-Creation-Date: 2015-06-26 08:51:20+00:00\n"
|
8 |
"MIME-Version: 1.0\n"
|
9 |
"Content-Type: text/plain; charset=UTF-8\n"
|
10 |
"Content-Transfer-Encoding: 8bit\n"
|
68 |
msgstr ""
|
69 |
|
70 |
#: includes/class-testimonials-widget-settings.php:113
|
71 |
+
#: includes/class-testimonials-widget-settings.php:945
|
72 |
msgid "General"
|
73 |
msgstr ""
|
74 |
|
75 |
#: includes/class-testimonials-widget-settings.php:114
|
76 |
+
#: includes/class-testimonials-widget-settings.php:953
|
77 |
msgid "Fields"
|
78 |
msgstr ""
|
79 |
|
80 |
#: includes/class-testimonials-widget-settings.php:115
|
81 |
+
#: includes/class-testimonials-widget-settings.php:961
|
82 |
msgid "Selection"
|
83 |
msgstr ""
|
84 |
|
85 |
#: includes/class-testimonials-widget-settings.php:116
|
86 |
+
#: includes/class-testimonials-widget-settings.php:969
|
87 |
msgid "Ordering"
|
88 |
msgstr ""
|
89 |
|
90 |
#: includes/class-testimonials-widget-settings.php:117
|
91 |
+
#: includes/class-testimonials-widget-settings.php:977
|
92 |
msgid "Columns"
|
93 |
msgstr ""
|
94 |
|
95 |
#: includes/class-testimonials-widget-settings.php:118
|
96 |
+
#: includes/class-testimonials-widget-settings.php:985
|
97 |
msgid "Post Type"
|
98 |
msgstr ""
|
99 |
|
100 |
#: includes/class-testimonials-widget-settings.php:119
|
101 |
+
#: includes/class-testimonials-widget-settings.php:993
|
102 |
msgid "Slider Widget"
|
103 |
msgstr ""
|
104 |
|
116 |
msgstr ""
|
117 |
|
118 |
#: includes/class-testimonials-widget-settings.php:140
|
119 |
+
#: includes/class-testimonials-widget.php:576
|
120 |
+
#: includes/class-testimonials-widget.php:624
|
121 |
msgid "Testimonials"
|
122 |
msgstr ""
|
123 |
|
485 |
|
486 |
#: includes/class-testimonials-widget-settings.php:508
|
487 |
#: includes/class-testimonials-widget-settings.php:511
|
488 |
+
#: includes/class-testimonials-widget.php:506
|
489 |
+
#: includes/class-testimonials-widget.php:537
|
490 |
+
#: includes/class-testimonials-widget.php:1374
|
491 |
msgid "Author"
|
492 |
msgstr ""
|
493 |
|
494 |
#: includes/class-testimonials-widget-settings.php:509
|
495 |
+
#: includes/class-testimonials-widget.php:508
|
496 |
msgid "Date"
|
497 |
msgstr ""
|
498 |
|
517 |
msgstr ""
|
518 |
|
519 |
#: includes/class-testimonials-widget-settings.php:525
|
520 |
+
#: includes/class-testimonials-widget.php:542
|
521 |
+
#: includes/class-testimonials-widget.php:1380
|
522 |
msgid "Job Title"
|
523 |
msgstr ""
|
524 |
|
525 |
#: includes/class-testimonials-widget-settings.php:526
|
526 |
+
#: includes/class-testimonials-widget.php:557
|
527 |
+
#: includes/class-testimonials-widget.php:1398
|
528 |
msgid "Email"
|
529 |
msgstr ""
|
530 |
|
531 |
#: includes/class-testimonials-widget-settings.php:527
|
532 |
+
#: includes/class-testimonials-widget.php:547
|
533 |
+
#: includes/class-testimonials-widget.php:1386
|
534 |
msgid "Location"
|
535 |
msgstr ""
|
536 |
|
537 |
#: includes/class-testimonials-widget-settings.php:528
|
538 |
+
#: includes/class-testimonials-widget.php:552
|
539 |
+
#: includes/class-testimonials-widget.php:1392
|
540 |
msgid "Company"
|
541 |
msgstr ""
|
542 |
|
543 |
#: includes/class-testimonials-widget-settings.php:529
|
544 |
+
#: includes/class-testimonials-widget.php:562
|
545 |
+
#: includes/class-testimonials-widget.php:1404
|
546 |
msgid "URL"
|
547 |
msgstr ""
|
548 |
|
615 |
msgstr ""
|
616 |
|
617 |
#: includes/class-testimonials-widget-settings.php:708
|
618 |
+
#: includes/class-testimonials-widget-settings.php:1001
|
619 |
#: includes/libraries/aihrus-framework/includes/class-aihrus-settings.php:65
|
620 |
msgid "Reset"
|
621 |
msgstr ""
|
622 |
|
623 |
+
#: includes/class-testimonials-widget-settings.php:931
|
624 |
msgid "These Testimonials Settings establish the default option values for shortcodes, theme functions, and widget instances. Widgets, once created no longer inherit these global settings. Therefore, you'll need to update each widget with the new settings. It might be easier to delete the widget and then recreate it."
|
625 |
msgstr ""
|
626 |
|
627 |
+
#: includes/class-testimonials-widget-settings.php:933
|
628 |
msgid "Shortcode option names are listed below each entry."
|
629 |
msgstr ""
|
630 |
|
631 |
+
#: includes/class-testimonials-widget-settings.php:936
|
632 |
msgid "View the <a href=\"%s\">Testimonials documentation</a>."
|
633 |
msgstr ""
|
634 |
|
635 |
+
#: includes/class-testimonials-widget-settings.php:946
|
636 |
msgid "General options."
|
637 |
msgstr ""
|
638 |
|
639 |
+
#: includes/class-testimonials-widget-settings.php:954
|
640 |
msgid "Show or hide fields."
|
641 |
msgstr ""
|
642 |
|
643 |
+
#: includes/class-testimonials-widget-settings.php:962
|
644 |
msgid "Options used to select testimonials."
|
645 |
msgstr ""
|
646 |
|
647 |
+
#: includes/class-testimonials-widget-settings.php:970
|
648 |
msgid "Options used to determine displayed testimonials ordering."
|
649 |
msgstr ""
|
650 |
|
651 |
+
#: includes/class-testimonials-widget-settings.php:978
|
652 |
msgid "Allowed columns to display on edit page."
|
653 |
msgstr ""
|
654 |
|
655 |
+
#: includes/class-testimonials-widget-settings.php:986
|
656 |
msgid "Archive and singular page URL related testimonials options."
|
657 |
msgstr ""
|
658 |
|
659 |
+
#: includes/class-testimonials-widget-settings.php:994
|
660 |
msgid "Options related to showing testimonials in widgets."
|
661 |
msgstr ""
|
662 |
|
663 |
+
#: includes/class-testimonials-widget-settings.php:1002
|
664 |
msgid "Backwards compatibility, import/export options, and reset options."
|
665 |
msgstr ""
|
666 |
|
690 |
|
691 |
#: includes/class-testimonials-widget-tag-cloud-widget.php:63
|
692 |
#: includes/class-testimonials-widget-tag-cloud-widget.php:70
|
|
|
693 |
#: includes/class-testimonials-widget.php:513
|
694 |
+
#: includes/class-testimonials-widget.php:516
|
695 |
msgid "Category"
|
696 |
msgstr ""
|
697 |
|
698 |
#: includes/class-testimonials-widget-tag-cloud-widget.php:64
|
699 |
#: includes/class-testimonials-widget-tag-cloud-widget.php:71
|
|
|
700 |
#: includes/class-testimonials-widget.php:514
|
701 |
+
#: includes/class-testimonials-widget.php:517
|
702 |
msgid "Tags"
|
703 |
msgstr ""
|
704 |
|
706 |
msgid "Taxonomy"
|
707 |
msgstr ""
|
708 |
|
709 |
+
#: includes/class-testimonials-widget.php:368
|
710 |
msgid "If your Testimonials display has gone to funky town, please <a href=\"%s\">read the FAQ</a> about possible CSS fixes."
|
711 |
msgstr ""
|
712 |
|
713 |
+
#: includes/class-testimonials-widget.php:507
|
714 |
msgid "Published by"
|
715 |
msgstr ""
|
716 |
|
717 |
+
#: includes/class-testimonials-widget.php:522
|
718 |
msgid "ID"
|
719 |
msgstr ""
|
720 |
|
721 |
+
#: includes/class-testimonials-widget.php:527
|
722 |
msgid "Image"
|
723 |
msgstr ""
|
724 |
|
725 |
+
#: includes/class-testimonials-widget.php:532
|
726 |
msgid "Shortcodes"
|
727 |
msgstr ""
|
728 |
|
729 |
+
#: includes/class-testimonials-widget.php:573
|
730 |
msgid "Add New"
|
731 |
msgstr ""
|
732 |
|
|
|
733 |
#: includes/class-testimonials-widget.php:574
|
734 |
+
#: includes/class-testimonials-widget.php:577
|
735 |
msgid "Add New Testimonial"
|
736 |
msgstr ""
|
737 |
|
738 |
+
#: includes/class-testimonials-widget.php:575
|
739 |
msgid "Edit Testimonial"
|
740 |
msgstr ""
|
741 |
|
742 |
+
#: includes/class-testimonials-widget.php:578
|
743 |
+
#: includes/class-testimonials-widget.php:880
|
744 |
msgid "No testimonials found"
|
745 |
msgstr ""
|
746 |
|
747 |
+
#: includes/class-testimonials-widget.php:579
|
748 |
msgid "No testimonials found in Trash"
|
749 |
msgstr ""
|
750 |
|
751 |
+
#: includes/class-testimonials-widget.php:581
|
752 |
msgid "Search Testimonials"
|
753 |
msgstr ""
|
754 |
|
755 |
+
#: includes/class-testimonials-widget.php:582
|
756 |
+
#: includes/class-testimonials-widget.php:1465
|
757 |
+
#: includes/class-testimonials-widget.php:1833
|
758 |
msgid "Testimonial"
|
759 |
msgstr ""
|
760 |
|
761 |
+
#: includes/class-testimonials-widget.php:583
|
762 |
msgid "View Testimonial"
|
763 |
msgstr ""
|
764 |
|
765 |
+
#: includes/class-testimonials-widget.php:1377
|
766 |
msgid "Use when the testimonial title is not the authors' name."
|
767 |
msgstr ""
|
768 |
|
769 |
+
#: includes/class-testimonials-widget.php:1401
|
770 |
msgid "If an email is provided, but not an image, a Gravatar icon will be attempted to be loaded."
|
771 |
msgstr ""
|
772 |
|
773 |
+
#: includes/class-testimonials-widget.php:1416
|
774 |
msgid "Testimonial Data"
|
775 |
msgstr ""
|
776 |
|
777 |
+
#: includes/class-testimonials-widget.php:1440
|
778 |
msgid "Testimonial updated. <a href=\"%s\">View testimonial</a>"
|
779 |
msgstr ""
|
780 |
|
781 |
+
#: includes/class-testimonials-widget.php:1441
|
782 |
msgid "Custom field updated."
|
783 |
msgstr ""
|
784 |
|
785 |
+
#: includes/class-testimonials-widget.php:1442
|
786 |
msgid "Custom field deleted."
|
787 |
msgstr ""
|
788 |
|
789 |
+
#: includes/class-testimonials-widget.php:1443
|
790 |
msgid "Testimonial updated."
|
791 |
msgstr ""
|
792 |
|
793 |
#. translators: %s: date and time of the revision
|
794 |
|
795 |
+
#: includes/class-testimonials-widget.php:1445
|
796 |
msgid "Testimonial restored to revision from %s"
|
797 |
msgstr ""
|
798 |
|
799 |
+
#: includes/class-testimonials-widget.php:1446
|
800 |
msgid "Testimonial published. <a href=\"%s\">View testimonial</a>"
|
801 |
msgstr ""
|
802 |
|
803 |
+
#: includes/class-testimonials-widget.php:1447
|
804 |
msgid "Testimonial saved."
|
805 |
msgstr ""
|
806 |
|
807 |
+
#: includes/class-testimonials-widget.php:1448
|
808 |
msgid "Testimonial submitted. <a target=\"_blank\" href=\"%s\">Preview testimonial</a>"
|
809 |
msgstr ""
|
810 |
|
811 |
+
#: includes/class-testimonials-widget.php:1449
|
812 |
msgid "Testimonial scheduled for: <strong>%1$s</strong>. <a target=\"_blank\" href=\"%2$s\">Preview testimonial</a>"
|
813 |
msgstr ""
|
814 |
|
815 |
+
#: includes/class-testimonials-widget.php:1450
|
816 |
msgid "Testimonial draft updated. <a target=\"_blank\" href=\"%s\">Preview testimonial</a>"
|
817 |
msgstr ""
|
818 |
|
819 |
+
#: includes/class-testimonials-widget.php:1728
|
820 |
msgid "If your Testimonials display has gone to funky town, please <a href=\"%s\">read the FAQ</a> about possible fixes."
|
821 |
msgstr ""
|
822 |
|
823 |
+
#: includes/class-testimonials-widget.php:1747
|
824 |
msgid "Failed version check"
|
825 |
msgstr ""
|
826 |
|
827 |
+
#: includes/class-testimonials-widget.php:1778
|
828 |
msgid "Shortcode"
|
829 |
msgstr ""
|
830 |
|
831 |
+
#: includes/class-testimonials-widget.php:2216
|
832 |
+
#: includes/class-testimonials-widget.php:2289
|
833 |
msgid "Used with: "
|
834 |
msgstr ""
|
835 |
|
836 |
+
#: includes/class-testimonials-widget.php:2253
|
837 |
+
#: includes/class-testimonials-widget.php:2317
|
838 |
msgid "Options: "
|
839 |
msgstr ""
|
840 |
|
841 |
+
#: includes/class-testimonials-widget.php:2258
|
842 |
+
#: includes/class-testimonials-widget.php:2322
|
843 |
msgid "Usage: "
|
844 |
msgstr ""
|
845 |
|
925 |
msgstr ""
|
926 |
|
927 |
#: includes/libraries/aihrus-framework/aihrus-framework.php:347
|
928 |
+
msgid "Plugin \"%1$s\" has been deactivated due to \"%2$s\". Once corrected, \"%1$s\" can be activated.</p><p>If you want to revert \"%1$s\", look for <a href=\"%3$s\">older versions on WordPress</a> or <a href=\"mailto:support@nodedesk.com?subject=Old+Plugin+Version+Request\">email Axelerant support</a> if this is a premium plugin."
|
929 |
msgstr ""
|
930 |
|
931 |
#: includes/libraries/aihrus-framework/aihrus-framework.php:358
|
1073 |
msgstr ""
|
1074 |
|
1075 |
#: includes/libraries/aihrus-framework/includes/class-aihrus-settings.php:251
|
1076 |
+
msgid "<img class=\"size-medium\" src=\"%5$s\" alt=\"Axelerant 2015 Retreat in Goa\" width=\"640\" height=\"327\" /><p>Axelerant is a full-service software development company that focuses on open-source technologies. Top technical talent who are passionate, giving, and communicative demonstrates our backbone. We provide high-end Strategy, Implementation, and Support services for our clients and agencies with whom we partner.</p><p>Our team members span the world, and we follow agile delivery and working processes. Further, we’re actively giving back to many open-source communities and have fostered an innovative, incubator culture to give ideas a chance to succeed.</p><h2>Foundations of Axelerant</h2><ul><li><b>Passion</b> – Our passion is so strong, we’re selfdirected to make the difficult easy.</li><li><b>Openness</b> – We’re so honest and painstaking in our discussions that there are no questions left, and standards are created.</li><li><b>Giving</b> – We’re excited to share our results to inspire all to surpass them.</li></ul><h3>Learn More About Axelerant</h3><ul><li><a href=\"%1$s\">Axelerant Team</a></li><li><a href=\"%2$s\">Giving Back</a></li><li><a href=\"%7$s\">Inside Axelerant</a></li><li><a href=\"%3$s\">Our Services</a></li><li><a href=\"%4$s\">Testimonials</a></li><li><a href=\"%6$s\">Careers</a></li></ul>"
|
1077 |
msgstr ""
|
1078 |
|
1079 |
+
#: includes/libraries/aihrus-framework/includes/class-aihrus-settings.php:290
|
1080 |
msgid "Save Changes"
|
1081 |
msgstr ""
|
1082 |
|
1083 |
+
#: includes/libraries/aihrus-framework/includes/class-aihrus-settings.php:298
|
1084 |
msgid "If you like this plugin, please <a href=\"%1$s\" title=\"Donate for Good Karma\"><img src=\"%2$s\" border=\"0\" alt=\"Donate for Good Karma\" /></a> or <a href=\"%3$s\" title=\"purchase premium WordPress plugins from Axelerant \">purchase the Premium version</a> to help fund further development and <a href=\"%4$s\" title=\"Support forums\">support</a>."
|
1085 |
msgstr ""
|
1086 |
|
1087 |
+
#: includes/libraries/aihrus-framework/includes/class-aihrus-settings.php:309
|
1088 |
msgid "Copyright ©%1$s <a href=\"%2$s\">Axlerant</a>."
|
1089 |
msgstr ""
|
1090 |
|
1091 |
+
#: includes/libraries/aihrus-framework/includes/class-aihrus-settings.php:616
|
1092 |
msgid "Settings saved."
|
1093 |
msgstr ""
|
1094 |
|
1095 |
+
#: includes/libraries/aihrus-framework/includes/class-aihrus-settings.php:680
|
1096 |
msgid "Required"
|
1097 |
msgstr ""
|
1098 |
|
1168 |
msgstr ""
|
1169 |
|
1170 |
#. Author URI of the plugin/theme
|
1171 |
+
msgid "https://axelerant.com/"
|
1172 |
msgstr ""
|
readme.txt
CHANGED
@@ -1,11 +1,11 @@
|
|
1 |
=== Testimonials Widget ===
|
2 |
|
3 |
-
Contributors: comprock,saurabhd
|
4 |
-
Donate link:
|
5 |
Tags: axelerant, client, customer, portfolio, quote, quotes, random, recommendation, reference, review, reviews, slider, testimonial, testimonials, wpml
|
6 |
Requires at least: 3.9.2
|
7 |
-
Tested up to: 4.
|
8 |
-
Stable tag: 3.
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
11 |
|
@@ -33,7 +33,7 @@ Testimonials Widget lets you randomly slide or list selected portfolios, quotes,
|
|
33 |
|
34 |
[youtube https://www.youtube.com/watch?v=bhUhuQ-2m8s]
|
35 |
|
36 |
-
**View a [Live Testimonials Widget Demo](
|
37 |
|
38 |
= Testimonials Widget Premium =
|
39 |
|
@@ -50,7 +50,7 @@ Testimonials Widget Premium increases all of Testimonials Widget' benefits and f
|
|
50 |
* Use any post types for testimonials
|
51 |
* User submitted testimonials
|
52 |
|
53 |
-
**[Buy Testimonials Widget Premium](
|
54 |
|
55 |
= Testimonials Widget Premium Doesn't Work For You? =
|
56 |
|
@@ -95,7 +95,7 @@ The single testimonial view supports image, author, title, location, email, comp
|
|
95 |
= Shortcode Examples =
|
96 |
|
97 |
* Read [EXAMPLES](https://github.com/michael-cannon/testimonials-widget/blob/master/EXAMPLES.md).
|
98 |
-
* View [Testimonials Widget demo](
|
99 |
|
100 |
= Shortcode and Widget Options =
|
101 |
|
@@ -103,7 +103,7 @@ Please keep in mind that inheritance affects options. This means that changes ma
|
|
103 |
|
104 |
Further, global settings are the baseline for shortcodes. If you want to alter the shortcode appearance, then alter the shortcode options directly.
|
105 |
|
106 |
-
Details on the Shortcode Attributes tab at WordPress Admin > Testimonials > Settings. Alternately, read [OPTIONS](
|
107 |
|
108 |
= Testimonials Widget Migration Helpers =
|
109 |
|
@@ -262,13 +262,13 @@ Details on the Shortcode Attributes tab at WordPress Admin > Testimonials > Sett
|
|
262 |
|
263 |
* [Installation Guide](https://wordpress.org/plugins/testimonials-widget/installation/)
|
264 |
* [Frequently Asked Questions](https://wordpress.org/plugins/testimonials-widget/faq/)
|
265 |
-
* [Options](
|
266 |
* [API](https://github.com/michael-cannon/testimonials-widget/blob/master/API.md)
|
267 |
* [Benefits and Features](https://wordpress.org/plugins/testimonials-widget/)
|
268 |
* [CHANGELOG](https://github.com/michael-cannon/testimonials-widget/blob/master/CHANGELOG.md)
|
269 |
* [CONTRIBUTING](https://github.com/michael-cannon/testimonials-widget/blob/master/CONTRIBUTING.md)
|
270 |
* [DEPRECATED](https://github.com/michael-cannon/testimonials-widget/blob/master/DEPRECATED.md)
|
271 |
-
* [EXAMPLES](
|
272 |
* [UPGRADING](https://github.com/michael-cannon/testimonials-widget/blob/master/UPGRADING.md)
|
273 |
|
274 |
|
@@ -302,7 +302,7 @@ This is a major overhaul *without* backwards compliance of over 80 changes. Plea
|
|
302 |
1. [Open Issues](https://github.com/michael-cannon/testimonials-widget/issues) - review and submit bug reports and enhancement requests
|
303 |
1. [Support on WordPress](http://wordpress.org/support/plugin/testimonials-widget) - ask questions and review responses
|
304 |
1. [Contribute Code](https://github.com/michael-cannon/testimonials-widget/blob/master/CONTRIBUTING.md)
|
305 |
-
1. [Beta Testers Needed](
|
306 |
1. [Old Plugin Versions](http://wordpress.org/plugins/testimonials-widget/developers/)
|
307 |
|
308 |
|
@@ -365,7 +365,7 @@ Read [DEPRECATED](https://github.com/michael-cannon/testimonials-widget/blob/mas
|
|
365 |
* Dutch by Bjorn Robijns
|
366 |
* [Hebrew by Ahrale](http://atar4u.com/)
|
367 |
|
368 |
-
You can translate this plugin into your own language if it's not done so already. The localization file `testimonials-widget.pot` can be found in the `languages` folder of this plugin. After translation, please [send the localized file](
|
369 |
|
370 |
**[How do I localize?](https://nodedesk.zendesk.com/hc/en-us/articles/202294892)**
|
371 |
|
@@ -388,4 +388,4 @@ A big, special thank you to [Joe Weber](https://plus.google.com/1000632712692773
|
|
388 |
|
389 |
A cool thanks to RedRokk Library for the [redrokk_metabox_class](https://gist.github.com/1880770). It makes configuring meta boxes for your posts, pages or custom post types a snap.
|
390 |
|
391 |
-
Current development by [Axelerant](
|
1 |
=== Testimonials Widget ===
|
2 |
|
3 |
+
Contributors: comprock,saurabhd,subharanjan
|
4 |
+
Donate link: https://axelerant.com/about-axelerant/donate/
|
5 |
Tags: axelerant, client, customer, portfolio, quote, quotes, random, recommendation, reference, review, reviews, slider, testimonial, testimonials, wpml
|
6 |
Requires at least: 3.9.2
|
7 |
+
Tested up to: 4.3.0
|
8 |
+
Stable tag: 3.2.0
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
11 |
|
33 |
|
34 |
[youtube https://www.youtube.com/watch?v=bhUhuQ-2m8s]
|
35 |
|
36 |
+
**View a [Live Testimonials Widget Demo](https://store.axelerant.com/testimonials-examples/)**
|
37 |
|
38 |
= Testimonials Widget Premium =
|
39 |
|
50 |
* Use any post types for testimonials
|
51 |
* User submitted testimonials
|
52 |
|
53 |
+
**[Buy Testimonials Widget Premium](https://store.axelerant.com/downloads/best-wordpress-testimonials-plugin-testimonials-premium/)** plugin for WordPress.
|
54 |
|
55 |
= Testimonials Widget Premium Doesn't Work For You? =
|
56 |
|
95 |
= Shortcode Examples =
|
96 |
|
97 |
* Read [EXAMPLES](https://github.com/michael-cannon/testimonials-widget/blob/master/EXAMPLES.md).
|
98 |
+
* View [Testimonials Widget demo](https://store.axelerant.com/testimonials-examples/).
|
99 |
|
100 |
= Shortcode and Widget Options =
|
101 |
|
103 |
|
104 |
Further, global settings are the baseline for shortcodes. If you want to alter the shortcode appearance, then alter the shortcode options directly.
|
105 |
|
106 |
+
Details on the Shortcode Attributes tab at WordPress Admin > Testimonials > Settings. Alternately, read [OPTIONS](https://store.axelerant.com/best-wordpress-testimonials-plugin/shortcode-widget-options/).
|
107 |
|
108 |
= Testimonials Widget Migration Helpers =
|
109 |
|
262 |
|
263 |
* [Installation Guide](https://wordpress.org/plugins/testimonials-widget/installation/)
|
264 |
* [Frequently Asked Questions](https://wordpress.org/plugins/testimonials-widget/faq/)
|
265 |
+
* [Options](https://store.axelerant.com/best-wordpress-testimonials-plugin/shortcode-widget-options/)
|
266 |
* [API](https://github.com/michael-cannon/testimonials-widget/blob/master/API.md)
|
267 |
* [Benefits and Features](https://wordpress.org/plugins/testimonials-widget/)
|
268 |
* [CHANGELOG](https://github.com/michael-cannon/testimonials-widget/blob/master/CHANGELOG.md)
|
269 |
* [CONTRIBUTING](https://github.com/michael-cannon/testimonials-widget/blob/master/CONTRIBUTING.md)
|
270 |
* [DEPRECATED](https://github.com/michael-cannon/testimonials-widget/blob/master/DEPRECATED.md)
|
271 |
+
* [EXAMPLES](https://store.axelerant.com/best-wordpress-testimonials-plugin/shortcode-examples/)
|
272 |
* [UPGRADING](https://github.com/michael-cannon/testimonials-widget/blob/master/UPGRADING.md)
|
273 |
|
274 |
|
302 |
1. [Open Issues](https://github.com/michael-cannon/testimonials-widget/issues) - review and submit bug reports and enhancement requests
|
303 |
1. [Support on WordPress](http://wordpress.org/support/plugin/testimonials-widget) - ask questions and review responses
|
304 |
1. [Contribute Code](https://github.com/michael-cannon/testimonials-widget/blob/master/CONTRIBUTING.md)
|
305 |
+
1. [Beta Testers Needed](https://store.axelerant.com/become-beta-tester/) - provide feedback and direction to plugin development
|
306 |
1. [Old Plugin Versions](http://wordpress.org/plugins/testimonials-widget/developers/)
|
307 |
|
308 |
|
365 |
* Dutch by Bjorn Robijns
|
366 |
* [Hebrew by Ahrale](http://atar4u.com/)
|
367 |
|
368 |
+
You can translate this plugin into your own language if it's not done so already. The localization file `testimonials-widget.pot` can be found in the `languages` folder of this plugin. After translation, please [send the localized file](https://axelerant.com/contact-axelerant/) for plugin inclusion.
|
369 |
|
370 |
**[How do I localize?](https://nodedesk.zendesk.com/hc/en-us/articles/202294892)**
|
371 |
|
388 |
|
389 |
A cool thanks to RedRokk Library for the [redrokk_metabox_class](https://gist.github.com/1880770). It makes configuring meta boxes for your posts, pages or custom post types a snap.
|
390 |
|
391 |
+
Current development by [Axelerant](https://axelerant.com/about-axelerant/).
|
testimonials-widget.php
CHANGED
@@ -4,9 +4,9 @@
|
|
4 |
* Plugin URI: http://wordpress.org/plugins/testimonials-widget/
|
5 |
* Description: Easily add social proofing to your website with Testimonials Widget. List or slide reviews via functions, shortcodes, or widgets.
|
6 |
* lets you socially randomly slide or list selected portfolios, quotes, reviews, or text with images or videos on your WordPress site.
|
7 |
-
* Version: 3.
|
8 |
* Author: Axelerant
|
9 |
-
* Author URI:
|
10 |
* License: GPLv2 or later
|
11 |
* Text Domain: testimonials-widget
|
12 |
* Domain Path: /languages
|
@@ -36,7 +36,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
36 |
}
|
37 |
|
38 |
if ( ! defined( 'TW_AIHR_VERSION' ) ) {
|
39 |
-
define( 'TW_AIHR_VERSION', '1.2.
|
40 |
}
|
41 |
|
42 |
if ( ! defined( 'TW_BASE' ) ) {
|
@@ -60,11 +60,11 @@ if ( ! defined( 'TW_NAME' ) ) {
|
|
60 |
}
|
61 |
|
62 |
if ( ! defined( 'TW_PREMIUM_LINK' ) ) {
|
63 |
-
define( 'TW_PREMIUM_LINK', '<a href="
|
64 |
}
|
65 |
|
66 |
if ( ! defined( 'TW_VERSION' ) ) {
|
67 |
-
define( 'TW_VERSION', '3.
|
68 |
}
|
69 |
|
70 |
require_once TW_DIR_INC . 'requirements.php';
|
4 |
* Plugin URI: http://wordpress.org/plugins/testimonials-widget/
|
5 |
* Description: Easily add social proofing to your website with Testimonials Widget. List or slide reviews via functions, shortcodes, or widgets.
|
6 |
* lets you socially randomly slide or list selected portfolios, quotes, reviews, or text with images or videos on your WordPress site.
|
7 |
+
* Version: 3.2.0
|
8 |
* Author: Axelerant
|
9 |
+
* Author URI: https://axelerant.com/
|
10 |
* License: GPLv2 or later
|
11 |
* Text Domain: testimonials-widget
|
12 |
* Domain Path: /languages
|
36 |
}
|
37 |
|
38 |
if ( ! defined( 'TW_AIHR_VERSION' ) ) {
|
39 |
+
define( 'TW_AIHR_VERSION', '1.2.2' );
|
40 |
}
|
41 |
|
42 |
if ( ! defined( 'TW_BASE' ) ) {
|
60 |
}
|
61 |
|
62 |
if ( ! defined( 'TW_PREMIUM_LINK' ) ) {
|
63 |
+
define( 'TW_PREMIUM_LINK', '<a href="https://store.axelerant.com/downloads/best-wordpress-testimonials-plugin-testimonials-premium/">Buy Premium</a>' );
|
64 |
}
|
65 |
|
66 |
if ( ! defined( 'TW_VERSION' ) ) {
|
67 |
+
define( 'TW_VERSION', '3.2.0' );
|
68 |
}
|
69 |
|
70 |
require_once TW_DIR_INC . 'requirements.php';
|