Version Description
Download this release
Release Info
Developer | bravenewcode |
Plugin | WPtouch |
Version | 4.1.5 |
Comparing to | |
See all releases |
Code changes from version 4.1.4 to 4.1.5
- admin/customizer/wptouch-customizer.php +1 -1
- admin/js/wptouch-admin-4.js +74 -74
- admin/js/wptouch-admin-wizard.js +4 -2
- core/admin-ajax.php +3 -3
- core/admin-load.php +5 -6
- core/admin-page-templates.php +2 -2
- core/admin-render.php +3 -1
- core/class-cache-smash.php +9 -0
- core/class-wptouch-pro.php +19 -5
- core/globals.php +4 -0
- core/multisite.php +1 -1
- lang/wptouch-pro-it_IT.mo +0 -0
- lang/wptouch-pro-pt.mo +0 -0
- lang/wptouch.pot +108 -100
- readme.txt +13 -1
- themes/bauhaus/default/bauhaus.js +0 -1
- themes/bauhaus/default/featured-slider.php +1 -1
- themes/bauhaus/default/functions.php +17 -0
- themes/bauhaus/default/header-bottom.php +2 -4
- themes/bauhaus/default/style.css +25 -0
- themes/bauhaus/readme.txt +8 -1
- themes/bauhaus/root-functions.php +57 -1
- themes/foundation/modules/featured/featured.php +9 -7
- themes/foundation/modules/featured/wptouch-owl.js +1 -1
- themes/foundation/modules/menu/menu.js +24 -6
- themes/foundation/modules/owlcarousel/LICENSE +0 -23
- themes/foundation/modules/owlcarousel/README.md +0 -73
- themes/foundation/modules/owlcarousel/assets/ajax-loader.gif +0 -0
- themes/foundation/modules/owlcarousel/assets/owl.carousel.css +0 -173
- themes/foundation/modules/owlcarousel/assets/owl.carousel.min.css +0 -6
- themes/foundation/modules/owlcarousel/assets/owl.theme.default.min.css +0 -5
- themes/foundation/modules/owlcarousel/assets/owl.theme.green.min.css +0 -5
- themes/foundation/modules/owlcarousel/assets/owl.video.play.png +0 -0
- themes/foundation/modules/owlcarousel/owl.carousel.css +216 -0
- themes/foundation/modules/owlcarousel/owl.carousel.js +1016 -1213
- themes/foundation/modules/owlcarousel/owl.carousel.min.css +1 -0
- themes/foundation/modules/owlcarousel/owl.carousel.min.js +2 -7
- themes/foundation/modules/owlcarousel/owlcarousel.php +8 -9
- themes/foundation/root-functions.php +1 -1
- wptouch.php +2 -2
admin/customizer/wptouch-customizer.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
global $wptouch_pro;
|
3 |
$current_theme = $wptouch_pro->get_current_theme_info();
|
4 |
|
5 |
-
if ( $current_theme &&
|
6 |
|
7 |
add_action( 'admin_init', 'wptouch_initialize_customizer' );
|
8 |
|
2 |
global $wptouch_pro;
|
3 |
$current_theme = $wptouch_pro->get_current_theme_info();
|
4 |
|
5 |
+
if ( $current_theme && wptouch_admin_use_customizer() ) {
|
6 |
|
7 |
add_action( 'admin_init', 'wptouch_initialize_customizer' );
|
8 |
|
admin/js/wptouch-admin-4.js
CHANGED
@@ -688,91 +688,91 @@ function wptouchSetupFreeSettings(){
|
|
688 |
}
|
689 |
}
|
690 |
|
691 |
-
function
|
|
|
|
|
|
|
|
|
|
|
692 |
|
693 |
-
|
694 |
-
|
695 |
-
|
696 |
-
|
697 |
|
698 |
-
|
699 |
-
jQuery( '#multisite-deploy-sites input' ).prop( 'checked', '' );
|
700 |
-
e.preventDefault();
|
701 |
-
});
|
702 |
|
703 |
-
|
|
|
704 |
|
705 |
-
|
706 |
-
|
|
|
|
|
|
|
707 |
|
708 |
-
|
709 |
-
|
710 |
-
jQuery( '.icon-ok-circle, .button-close' ).remove();
|
711 |
-
jQuery( 'p.deploy-text' ).text( jQuery( 'p.deploy-text' ).attr( 'data-text' ) );
|
712 |
-
deployment_modal.open();
|
713 |
|
714 |
-
|
715 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
716 |
|
717 |
-
|
718 |
-
|
719 |
-
|
720 |
-
// reset all checkboxes to enabled
|
721 |
-
jQuery( '#multisite-deploy-sites input' ).attr( 'disabled', false );
|
722 |
-
// disabled the selected site's checkbox and uncheck it
|
723 |
-
var destinationSite = jQuery( '#multisite-deploy-sites' ).find( 'input#site-' + currentSite );
|
724 |
-
destinationSite.prop( 'checked', false ).attr( 'disabled', true );
|
725 |
-
}).change();
|
726 |
-
|
727 |
-
jQuery( '.deploy-to-sites' ).on( 'click', function( e ){
|
728 |
-
jQuery( this ).hide();
|
729 |
-
e.preventDefault();
|
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 |
|
@@ -1000,7 +1000,7 @@ function wptouchAdminReady() {
|
|
1000 |
|
1001 |
wptouchHandleResetSettings();
|
1002 |
|
1003 |
-
|
1004 |
|
1005 |
wptouchControlReturn();
|
1006 |
|
688 |
}
|
689 |
}
|
690 |
|
691 |
+
function wptouchAdminMultisite(){
|
692 |
+
if ( jQuery( '#multisite_deployment_source' ).is( 'select' ) ) {
|
693 |
+
jQuery( '#multisite-select-all' ).on( 'click', function( e ){
|
694 |
+
jQuery( '#multisite-deploy-sites input:not(input:disabled)' ).prop( 'checked', 'checked' );
|
695 |
+
e.preventDefault();
|
696 |
+
});
|
697 |
|
698 |
+
jQuery( '#multisite-select-none' ).on( 'click', function( e ){
|
699 |
+
jQuery( '#multisite-deploy-sites input' ).prop( 'checked', '' );
|
700 |
+
e.preventDefault();
|
701 |
+
});
|
702 |
|
703 |
+
var deployment_modal = jQuery('[data-remodal-id=modal-deployment]').remodal();
|
|
|
|
|
|
|
704 |
|
705 |
+
jQuery( '#multisite-deploy' ).on( 'click', function( e ){
|
706 |
+
e.preventDefault();
|
707 |
|
708 |
+
if ( jQuery( '#multisite-deploy-sites input' ).is( ':checked' ) ) {
|
709 |
+
jQuery( '.deploy-to-sites' ).show();
|
710 |
+
jQuery( '.icon-ok-circle, .button-close' ).remove();
|
711 |
+
jQuery( 'p.deploy-text' ).text( jQuery( 'p.deploy-text' ).attr( 'data-text' ) );
|
712 |
+
deployment_modal.open();
|
713 |
|
714 |
+
}
|
715 |
+
});
|
|
|
|
|
|
|
716 |
|
717 |
+
jQuery( '#multisite_deployment_source' ).change( function(){
|
718 |
+
// what's the current selected site?
|
719 |
+
var currentSite = jQuery( this ).val();
|
720 |
+
// reset all checkboxes to enabled
|
721 |
+
jQuery( '#multisite-deploy-sites input' ).attr( 'disabled', false );
|
722 |
+
// disabled the selected site's checkbox and uncheck it
|
723 |
+
var destinationSite = jQuery( '#multisite-deploy-sites' ).find( 'input#site-' + currentSite );
|
724 |
+
destinationSite.prop( 'checked', false ).attr( 'disabled', true );
|
725 |
+
}).change();
|
726 |
|
727 |
+
jQuery( '.deploy-to-sites' ).on( 'click', function( e ){
|
728 |
+
jQuery( this ).hide();
|
729 |
+
e.preventDefault();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
730 |
|
731 |
+
var sourceSite = jQuery( '#multisite_deployment_source' ).val();
|
732 |
+
var deployGeneral = jQuery( "#multisite_deploy_general_settings" ).is( ":checked" );
|
733 |
+
var deployCompat = jQuery( "#multisite_deploy_site_compat" ).is( ":checked" );
|
734 |
+
var deployDevices = jQuery( "#multisite_deploy_devices" ).is( ":checked" );
|
735 |
+
var deployMenus = jQuery( "#multisite_deploy_menus" ).is( ":checked" );
|
736 |
+
var deployThemes = jQuery( "#multisite_deploy_themes" ).is( ":checked" );
|
737 |
+
var deployExtensions = jQuery( "#multisite_deploy_extensions" ).is( ":checked" );
|
738 |
+
var deployColors = jQuery( "#multisite_deploy_colors" ).is( ":checked" );
|
739 |
+
var deploySocialMedia = jQuery( "#multisite_deploy_social_media" ).is( ":checked" );
|
740 |
+
var deploySocialSharing = jQuery( "#multisite_deploy_social_sharing" ).is( ":checked" );
|
741 |
+
|
742 |
+
var sites = [];
|
743 |
+
|
744 |
+
jQuery( '#multisite-deploy-sites input' ).each( function( index, value ) {
|
745 |
+
if ( jQuery( this ).is( ":checked" ) ) {
|
746 |
+
sites.push( jQuery( this ).attr( 'id' ) );
|
747 |
+
}
|
748 |
+
});
|
749 |
|
750 |
+
var ajaxParams = {
|
751 |
+
source_site: sourceSite,
|
752 |
+
deploy_general: deployGeneral ? '1' : '0',
|
753 |
+
deploy_compat: deployCompat ? '1' : '0',
|
754 |
+
deploy_devices: deployDevices ? '1' : '0',
|
755 |
+
deploy_menus: deployMenus ? '1' : '0',
|
756 |
+
deploy_themes: deployThemes ? '1' : '0',
|
757 |
+
deploy_extensions: deployExtensions ? '1' : '0',
|
758 |
+
deploy_colors: deployColors ? '1' : '0',
|
759 |
+
deploy_social_media: deploySocialMedia ? '1' : '0',
|
760 |
+
deploy_social_sharing: deploySocialSharing ? '1' : '0',
|
761 |
+
deploy_sites: sites
|
762 |
+
};
|
763 |
|
764 |
+
jQuery( 'p.deploy-text' ).text( jQuery( 'p.deploy-text' ).attr( 'data-deploying-text' ) );
|
765 |
|
766 |
+
wptouchAdminAjax( 'multisite_deploy', ajaxParams, function( result ) {
|
767 |
+
setTimeout( function(){
|
768 |
+
jQuery( 'p.deploy-text' )
|
769 |
+
.text( jQuery( 'p.deploy-text' ).attr( 'data-completed-text' ) )
|
770 |
+
.prepend( '<i class="icon-ok-circle"></i>' )
|
771 |
+
.append( '<br /><br /><button class="button button-close" data-remodal-action="cancel">Close</button>' );
|
772 |
+
}, 1000 );
|
773 |
+
});
|
774 |
});
|
775 |
+
}
|
|
|
776 |
}
|
777 |
|
778 |
|
1000 |
|
1001 |
wptouchHandleResetSettings();
|
1002 |
|
1003 |
+
wptouchAdminMultisite();
|
1004 |
|
1005 |
wptouchControlReturn();
|
1006 |
|
admin/js/wptouch-admin-wizard.js
CHANGED
@@ -42,7 +42,6 @@ function wptouchDoWizard(){
|
|
42 |
}
|
43 |
},
|
44 |
onStepChanging: function ( event, currentIndex, newIndex ) {
|
45 |
-
var whereWeAt = wizardContainer.steps('getStep', currentIndex );
|
46 |
bncHasLicense = bncHasLicense;
|
47 |
// language
|
48 |
if ( newIndex > currentIndex ) {
|
@@ -142,7 +141,10 @@ function wptouchDoWizard(){
|
|
142 |
}
|
143 |
return true;
|
144 |
}
|
145 |
-
})
|
|
|
|
|
|
|
146 |
}
|
147 |
|
148 |
function wptouchContinue() {
|
42 |
}
|
43 |
},
|
44 |
onStepChanging: function ( event, currentIndex, newIndex ) {
|
|
|
45 |
bncHasLicense = bncHasLicense;
|
46 |
// language
|
47 |
if ( newIndex > currentIndex ) {
|
141 |
}
|
142 |
return true;
|
143 |
}
|
144 |
+
});
|
145 |
+
|
146 |
+
// Now make it visible ;p
|
147 |
+
wizardContainer.css( 'visibility', 'visible' );
|
148 |
}
|
149 |
|
150 |
function wptouchContinue() {
|
core/admin-ajax.php
CHANGED
@@ -188,7 +188,7 @@ function wptouch_admin_handle_ajax( &$wptouch_pro, $ajax_action ) {
|
|
188 |
|
189 |
$result_info = array();
|
190 |
|
191 |
-
if ( $result && isset( $result[ 'body' ] ) ) {
|
192 |
if ( preg_match_all( '#(<script>.*</script>)#iUs', $result[ 'body' ], $match ) ) {
|
193 |
foreach( $match[0] as $possible_analytics ) {
|
194 |
$search_for = array( 'GoogleAnalyticsObject' );
|
@@ -214,7 +214,7 @@ function wptouch_admin_handle_ajax( &$wptouch_pro, $ajax_action ) {
|
|
214 |
}
|
215 |
}
|
216 |
|
217 |
-
if ( !isset( $result_info[ 'code' ] ) ) {
|
218 |
$result_info[ 'code' ] = 'noresult';
|
219 |
$result_info[ 'msg' ] = __( 'Unable to find your Google Analytics code. You can enter it manually in the settings later.', 'wptouch-pro' );
|
220 |
}
|
@@ -348,7 +348,7 @@ function wptouch_admin_handle_ajax( &$wptouch_pro, $ajax_action ) {
|
|
348 |
$destination_main_settings = $wptouch_pro->get_setting_defaults( 'wptouch_pro' );
|
349 |
$destination_main_settings = 'wptouch_pro';
|
350 |
}
|
351 |
-
|
352 |
$destination_foundation_settings = $wptouch_pro->get_raw_settings( 'foundation' );
|
353 |
if ( !$destination_foundation_settings ) {
|
354 |
$destination_foundation_settings = $wptouch_pro->get_setting_defaults( 'foundation' );
|
188 |
|
189 |
$result_info = array();
|
190 |
|
191 |
+
if ( $result && is_array( $result ) && isset( $result[ 'body' ] ) ) {
|
192 |
if ( preg_match_all( '#(<script>.*</script>)#iUs', $result[ 'body' ], $match ) ) {
|
193 |
foreach( $match[0] as $possible_analytics ) {
|
194 |
$search_for = array( 'GoogleAnalyticsObject' );
|
214 |
}
|
215 |
}
|
216 |
|
217 |
+
if ( is_array( $result ) && !isset( $result_info[ 'code' ] ) ) {
|
218 |
$result_info[ 'code' ] = 'noresult';
|
219 |
$result_info[ 'msg' ] = __( 'Unable to find your Google Analytics code. You can enter it manually in the settings later.', 'wptouch-pro' );
|
220 |
}
|
348 |
$destination_main_settings = $wptouch_pro->get_setting_defaults( 'wptouch_pro' );
|
349 |
$destination_main_settings = 'wptouch_pro';
|
350 |
}
|
351 |
+
|
352 |
$destination_foundation_settings = $wptouch_pro->get_raw_settings( 'foundation' );
|
353 |
if ( !$destination_foundation_settings ) {
|
354 |
$destination_foundation_settings = $wptouch_pro->get_setting_defaults( 'foundation' );
|
core/admin-load.php
CHANGED
@@ -22,7 +22,6 @@ function wptouch_admin_check_api() {
|
|
22 |
wptouch_check_api();
|
23 |
}
|
24 |
|
25 |
-
|
26 |
function wptouch_admin_build_menu( $network_admin = false ) {
|
27 |
wptouch_admin_check_api();
|
28 |
|
@@ -77,7 +76,7 @@ function wptouch_add_page_section( $sub_page_name, $section_name, $section_slug,
|
|
77 |
$skip_domains = array( ADDON_SETTING_DOMAIN, 'multisite', 'wptouch_pro', 'bncid' );
|
78 |
$skip_pages = array( 'Compatibility', 'Web-App Mode', 'Basic Ads', 'General' );
|
79 |
|
80 |
-
if (
|
81 |
$use_customizer = false;
|
82 |
}
|
83 |
|
@@ -115,15 +114,15 @@ function _wptouch_add_setting( $type, $name, $desc = '', $tooltip = '', $level =
|
|
115 |
$type = 'list';
|
116 |
}
|
117 |
|
118 |
-
if (
|
119 |
$type = 'list';
|
120 |
}
|
121 |
|
122 |
-
if (
|
123 |
$type = 'text';
|
124 |
}
|
125 |
|
126 |
-
if (
|
127 |
$type = 'text';
|
128 |
}
|
129 |
|
@@ -340,4 +339,4 @@ function wptouch_admin_panel_get_classes( $classes = false ) {
|
|
340 |
|
341 |
function wptouch_admin_panel_classes( $classes = false ) {
|
342 |
echo implode( ' ', wptouch_admin_panel_get_classes( $classes ) );
|
343 |
-
}
|
22 |
wptouch_check_api();
|
23 |
}
|
24 |
|
|
|
25 |
function wptouch_admin_build_menu( $network_admin = false ) {
|
26 |
wptouch_admin_check_api();
|
27 |
|
76 |
$skip_domains = array( ADDON_SETTING_DOMAIN, 'multisite', 'wptouch_pro', 'bncid' );
|
77 |
$skip_pages = array( 'Compatibility', 'Web-App Mode', 'Basic Ads', 'General' );
|
78 |
|
79 |
+
if ( !wptouch_admin_use_customizer() ) {
|
80 |
$use_customizer = false;
|
81 |
}
|
82 |
|
114 |
$type = 'list';
|
115 |
}
|
116 |
|
117 |
+
if ( !wptouch_admin_use_customizer() && $type == 'select' ) {
|
118 |
$type = 'list';
|
119 |
}
|
120 |
|
121 |
+
if ( !wptouch_admin_use_customizer() && $type == 'range' ) {
|
122 |
$type = 'text';
|
123 |
}
|
124 |
|
125 |
+
if ( !wptouch_admin_use_customizer() && $type == 'url' ) {
|
126 |
$type = 'text';
|
127 |
}
|
128 |
|
339 |
|
340 |
function wptouch_admin_panel_classes( $classes = false ) {
|
341 |
echo implode( ' ', wptouch_admin_panel_get_classes( $classes ) );
|
342 |
+
}
|
core/admin-page-templates.php
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?php
|
2 |
$settings = wptouch_get_settings();
|
3 |
|
4 |
-
if ( !defined( 'WPTOUCH_IS_FREE' ) && $settings->show_wizard
|
5 |
add_action( 'add_meta_boxes', 'wptouch_page_template_init' );
|
6 |
add_action( 'save_post', 'wptouch_page_template_save' );
|
7 |
}
|
@@ -96,4 +96,4 @@ function wptouch_page_template_save( $post_id ) {
|
|
96 |
|
97 |
// Update the meta field in the database.
|
98 |
update_post_meta( $post_id, '_mobile_page_template', $page_template );
|
99 |
-
}
|
1 |
<?php
|
2 |
$settings = wptouch_get_settings();
|
3 |
|
4 |
+
if ( !defined( 'WPTOUCH_IS_FREE' ) && $settings->show_wizard == false ) {
|
5 |
add_action( 'add_meta_boxes', 'wptouch_page_template_init' );
|
6 |
add_action( 'save_post', 'wptouch_page_template_save' );
|
7 |
}
|
96 |
|
97 |
// Update the meta field in the database.
|
98 |
update_post_meta( $post_id, '_mobile_page_template', $page_template );
|
99 |
+
}
|
core/admin-render.php
CHANGED
@@ -106,7 +106,9 @@
|
|
106 |
<?php if ( isset( $panel_options[ 'Theme Settings' ]->sections ) && count( $panel_options[ 'Theme Settings' ]->sections ) > 0 ) { ?>
|
107 |
<li><a href="#" class="<?php wptouch_multisite_page_classes( 'themes' ); ?> foundation-page-theme-settings<?php if ( isset( $_COOKIE['wptouch-4-admin-menu'] ) && ( $_COOKIE['wptouch-4-admin-menu'] == 'foundation-page-theme-settings' ) ) { echo ' active'; } ?>" data-page-slug="foundation-page-theme-settings"><?php _e( 'Theme Settings', 'wptouch-pro' ); ?></a></li>
|
108 |
<?php } ?>
|
109 |
-
|
|
|
|
|
110 |
<?php } ?>
|
111 |
</ul>
|
112 |
<?php } ?>
|
106 |
<?php if ( isset( $panel_options[ 'Theme Settings' ]->sections ) && count( $panel_options[ 'Theme Settings' ]->sections ) > 0 ) { ?>
|
107 |
<li><a href="#" class="<?php wptouch_multisite_page_classes( 'themes' ); ?> foundation-page-theme-settings<?php if ( isset( $_COOKIE['wptouch-4-admin-menu'] ) && ( $_COOKIE['wptouch-4-admin-menu'] == 'foundation-page-theme-settings' ) ) { echo ' active'; } ?>" data-page-slug="foundation-page-theme-settings"><?php _e( 'Theme Settings', 'wptouch-pro' ); ?></a></li>
|
108 |
<?php } ?>
|
109 |
+
<?php if ( wptouch_admin_use_customizer() ) { ?>
|
110 |
+
<li><a href="#" class="<?php wptouch_multisite_page_classes( 'themes' ); ?> foundation-page-theme-customizer<?php if ( isset( $_COOKIE['wptouch-4-admin-menu'] ) && ( $_COOKIE['wptouch-4-admin-menu'] == 'foundation-page-theme-customizer' ) ) { echo ' active'; } ?>" data-page-slug="foundation-page-theme-customizer"><?php _e( 'Customize Theme', 'wptouch-pro' ); ?></a></li>
|
111 |
+
<?php } ?>
|
112 |
<?php } ?>
|
113 |
</ul>
|
114 |
<?php } ?>
|
core/class-cache-smash.php
CHANGED
@@ -102,6 +102,15 @@ class WPtouchCacheSmash {
|
|
102 |
if ( !$this->find_in_array_no_case( 'iphone', $rejected_user_agents ) ) {
|
103 |
$cache_configured = false;
|
104 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
105 |
}
|
106 |
}
|
107 |
|
102 |
if ( !$this->find_in_array_no_case( 'iphone', $rejected_user_agents ) ) {
|
103 |
$cache_configured = false;
|
104 |
}
|
105 |
+
|
106 |
+
if ( !$cache_configured && ( $user_groups = $w3_config->get_array( 'mobile.rgroups' ) ) && is_array( $user_groups ) && count( $user_groups ) > 0 ) {
|
107 |
+
foreach ( $user_groups as $group ) {
|
108 |
+
if ( $group[ 'enabled' ] && $this->find_in_array_no_case( 'iphone', $group[ 'agents' ] ) && $group[ 'theme' ] == '' && $group[ 'redirect' ] == '' ) {
|
109 |
+
$cache_configured = true;
|
110 |
+
add_filter( 'wptouch_show_mobile_switch_link', '__return_false' );
|
111 |
+
}
|
112 |
+
}
|
113 |
+
}
|
114 |
}
|
115 |
}
|
116 |
|
core/class-wptouch-pro.php
CHANGED
@@ -291,7 +291,14 @@ class WPtouchProFour {
|
|
291 |
} else {
|
292 |
if ( $this->should_do_desktop_shortcode_magic( $settings ) ) {
|
293 |
add_filter( 'wptouch_force_mobile_device', array( &$this, 'shortcode_override' ) );
|
294 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
295 |
}
|
296 |
|
297 |
add_action( 'wp', array( &$this, 'set_cache_cookie' ) );
|
@@ -825,7 +832,7 @@ class WPtouchProFour {
|
|
825 |
$this->handle_admin_menu_commands();
|
826 |
$this->setup_automatic_backup();
|
827 |
|
828 |
-
wptouch_update_info();
|
829 |
}
|
830 |
|
831 |
function setup_automatic_backup() {
|
@@ -1685,6 +1692,7 @@ class WPtouchProFour {
|
|
1685 |
|
1686 |
function get_theme_information( $theme_location, $theme_url ) {
|
1687 |
$style_file = $theme_location . '/readme.txt';
|
|
|
1688 |
if ( file_exists( $style_file ) ) {
|
1689 |
$style_info = $this->load_file( $style_file );
|
1690 |
|
@@ -1702,6 +1710,15 @@ class WPtouchProFour {
|
|
1702 |
$theme_info->changelog = '';
|
1703 |
$theme_info->preview_images = array();
|
1704 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1705 |
$features = $this->get_information_fragment( $style_info, 'Features' );
|
1706 |
|
1707 |
if ( $features ) {
|
@@ -2793,7 +2810,6 @@ class WPtouchProFour {
|
|
2793 |
delete_site_transient( '_wptouch_available_cloud_addons' );
|
2794 |
delete_site_transient( '_wptouch_available_cloud_themes' );
|
2795 |
delete_site_transient( '_wptouch_bncid_latest_version' );
|
2796 |
-
delete_site_transient( '_wptouch_language_info' );
|
2797 |
}
|
2798 |
|
2799 |
function activate_license() {
|
@@ -3238,8 +3254,6 @@ class WPtouchProFour {
|
|
3238 |
require_once( WPTOUCH_DIR . '/core/admin-settings.php' );
|
3239 |
wptouch_settings_process( $this );
|
3240 |
|
3241 |
-
$this->delete_theme_add_on_cache();
|
3242 |
-
|
3243 |
$new_settings = wptouch_get_settings();
|
3244 |
|
3245 |
if ( function_exists( 'wptouch_pro_update_site_info' ) && $update_info ) {
|
291 |
} else {
|
292 |
if ( $this->should_do_desktop_shortcode_magic( $settings ) ) {
|
293 |
add_filter( 'wptouch_force_mobile_device', array( &$this, 'shortcode_override' ) );
|
294 |
+
|
295 |
+
if ( defined( 'WPTOUCH_SHORTCODE_TIMING' ) ) {
|
296 |
+
$shortcode_priority = WPTOUCH_SHORTCODE_TIMING;
|
297 |
+
} else {
|
298 |
+
$shortcode_priority = 10;
|
299 |
+
}
|
300 |
+
|
301 |
+
add_action( 'init', array( &$this, 'handle_desktop_shortcode' ), $shortcode_priority);
|
302 |
}
|
303 |
|
304 |
add_action( 'wp', array( &$this, 'set_cache_cookie' ) );
|
832 |
$this->handle_admin_menu_commands();
|
833 |
$this->setup_automatic_backup();
|
834 |
|
835 |
+
// wptouch_update_info();
|
836 |
}
|
837 |
|
838 |
function setup_automatic_backup() {
|
1692 |
|
1693 |
function get_theme_information( $theme_location, $theme_url ) {
|
1694 |
$style_file = $theme_location . '/readme.txt';
|
1695 |
+
|
1696 |
if ( file_exists( $style_file ) ) {
|
1697 |
$style_info = $this->load_file( $style_file );
|
1698 |
|
1710 |
$theme_info->changelog = '';
|
1711 |
$theme_info->preview_images = array();
|
1712 |
|
1713 |
+
if ( preg_match_all( '#== Long Description ==(.*)(==|\z)#sUi', $style_info, $matches ) ) {
|
1714 |
+
$theme_info->long_description = $matches[1][0];
|
1715 |
+
}
|
1716 |
+
|
1717 |
+
if ( preg_match_all( '#== Changelog ==(.*)(==|\z)#sUi', $style_info, $matches ) ) {
|
1718 |
+
$changelog = str_replace( array( "= ", "=\n", '* ' ), array( '<em>', '</em><ul><li>', '</li><li>' ), $matches[1][0] );
|
1719 |
+
$theme_info->changelog = $changelog . '</li></ul>';
|
1720 |
+
}
|
1721 |
+
|
1722 |
$features = $this->get_information_fragment( $style_info, 'Features' );
|
1723 |
|
1724 |
if ( $features ) {
|
2810 |
delete_site_transient( '_wptouch_available_cloud_addons' );
|
2811 |
delete_site_transient( '_wptouch_available_cloud_themes' );
|
2812 |
delete_site_transient( '_wptouch_bncid_latest_version' );
|
|
|
2813 |
}
|
2814 |
|
2815 |
function activate_license() {
|
3254 |
require_once( WPTOUCH_DIR . '/core/admin-settings.php' );
|
3255 |
wptouch_settings_process( $this );
|
3256 |
|
|
|
|
|
3257 |
$new_settings = wptouch_get_settings();
|
3258 |
|
3259 |
if ( function_exists( 'wptouch_pro_update_site_info' ) && $update_info ) {
|
core/globals.php
CHANGED
@@ -595,4 +595,8 @@ function wptouch_hex_to_rgb($hexStr, $returnAsString = false, $seperator = ',')
|
|
595 |
return false; //Invalid hex color code
|
596 |
}
|
597 |
return $returnAsString ? implode( $seperator, $rgbArray ) : $rgbArray; // returns the rgb string or the associative array
|
|
|
|
|
|
|
|
|
598 |
}
|
595 |
return false; //Invalid hex color code
|
596 |
}
|
597 |
return $returnAsString ? implode( $seperator, $rgbArray ) : $rgbArray; // returns the rgb string or the associative array
|
598 |
+
}
|
599 |
+
|
600 |
+
function wptouch_admin_use_customizer() {
|
601 |
+
return !( defined( 'WPTOUCH_IS_FREE' ) || ( defined( 'WPTOUCH_USE_CUSTOMIZER' ) && WPTOUCH_USE_CUSTOMIZER == false ) );
|
602 |
}
|
core/multisite.php
CHANGED
@@ -420,7 +420,7 @@ function wptouch_addon_multisite_render_settings( $page_options ) {
|
|
420 |
__( 'Destination Sites', 'wptouch-pro' ),
|
421 |
'multisite-deployment-sites',
|
422 |
array(
|
423 |
-
|
424 |
'sites',
|
425 |
'multisite_sites',
|
426 |
'',
|
420 |
__( 'Destination Sites', 'wptouch-pro' ),
|
421 |
'multisite-deployment-sites',
|
422 |
array(
|
423 |
+
wptouch_add_pro_setting(
|
424 |
'sites',
|
425 |
'multisite_sites',
|
426 |
'',
|
lang/wptouch-pro-it_IT.mo
CHANGED
Binary file
|
lang/wptouch-pro-pt.mo
CHANGED
Binary file
|
lang/wptouch.pot
CHANGED
@@ -2,9 +2,9 @@
|
|
2 |
# This file is distributed under the same license as the WPtouch Mobile Plugin package.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
-
"Project-Id-Version: WPtouch Mobile Plugin 4.1.
|
6 |
"Report-Msgid-Bugs-To: http://wordpress.org/tag/wptouch\n"
|
7 |
-
"POT-Creation-Date: 2016-
|
8 |
"MIME-Version: 1.0\n"
|
9 |
"Content-Type: text/plain; charset=UTF-8\n"
|
10 |
"Content-Transfer-Encoding: 8bit\n"
|
@@ -374,7 +374,7 @@ msgstr ""
|
|
374 |
#: admin/pages/custom/wptouch-admin-wizard.php:179
|
375 |
#: admin/settings/html/theme-browser-item-detail.php:52
|
376 |
#: admin/settings/html/updates-available.php:35
|
377 |
-
#: admin/settings/html/updates-available.php:71 core/class-wptouch-pro.php:
|
378 |
msgid "Download"
|
379 |
msgstr ""
|
380 |
|
@@ -384,7 +384,7 @@ msgstr ""
|
|
384 |
#: admin/settings/html/installed_icon_sets_ajax.php:13
|
385 |
#: admin/settings/html/installed_icon_sets_ajax.php:26
|
386 |
#: admin/settings/html/theme-browser-item.php:12
|
387 |
-
#: core/class-wptouch-pro.php:
|
388 |
msgid "Installed"
|
389 |
msgstr ""
|
390 |
|
@@ -802,7 +802,7 @@ msgstr ""
|
|
802 |
|
803 |
#: admin/pages/wptouch-admin-general-settings.php:591
|
804 |
#: admin/settings/html/installed_icon_sets_ajax.php:4
|
805 |
-
#: core/class-wptouch-pro.php:
|
806 |
#: core/config.php:54
|
807 |
msgid "Custom Icons"
|
808 |
msgstr ""
|
@@ -812,7 +812,7 @@ msgid "WordPress Pages"
|
|
812 |
msgstr ""
|
813 |
|
814 |
#: admin/pages/wptouch-admin-general-settings.php:640
|
815 |
-
#: core/admin-render.php:
|
816 |
msgid "Customize Theme"
|
817 |
msgstr ""
|
818 |
|
@@ -910,7 +910,7 @@ msgstr ""
|
|
910 |
msgid "No extensions available"
|
911 |
msgstr ""
|
912 |
|
913 |
-
#: admin/settings/html/image-upload.php:7 core/class-wptouch-pro.php:
|
914 |
msgid "Upload Complete!"
|
915 |
msgstr ""
|
916 |
|
@@ -929,13 +929,13 @@ msgid ""
|
|
929 |
msgstr ""
|
930 |
|
931 |
#: admin/settings/html/installed_icon_sets_ajax.php:25
|
932 |
-
#: core/class-wptouch-pro.php:
|
933 |
msgid "Installing"
|
934 |
msgstr ""
|
935 |
|
936 |
#: admin/settings/html/installed_icon_sets_ajax.php:25
|
937 |
#: admin/settings/html/theme-browser-item-detail.php:3
|
938 |
-
#: core/admin-extensions.php:363 core/class-wptouch-pro.php:
|
939 |
msgid "Install"
|
940 |
msgstr ""
|
941 |
|
@@ -1147,7 +1147,7 @@ msgstr ""
|
|
1147 |
msgid "Setup Wizard"
|
1148 |
msgstr ""
|
1149 |
|
1150 |
-
#: core/admin-menu.php:48 core/class-wptouch-pro.php:
|
1151 |
msgid "Settings"
|
1152 |
msgstr ""
|
1153 |
|
@@ -1229,150 +1229,150 @@ msgid "Site Compatibility"
|
|
1229 |
msgstr ""
|
1230 |
|
1231 |
#: core/admin-render.php:102 core/admin-render.php:104
|
1232 |
-
#: core/admin-render.php:
|
1233 |
#: core/multisite.php:376
|
1234 |
msgid "Themes"
|
1235 |
msgstr ""
|
1236 |
|
1237 |
-
#: core/admin-render.php:
|
1238 |
-
#: core/admin-render.php:
|
1239 |
#: core/multisite.php:384
|
1240 |
msgid "Extensions"
|
1241 |
msgstr ""
|
1242 |
|
1243 |
-
#: core/admin-render.php:
|
1244 |
msgid "Available for WPtouch Pro"
|
1245 |
msgstr ""
|
1246 |
|
1247 |
-
#: core/admin-render.php:
|
1248 |
msgid "Reset Settings"
|
1249 |
msgstr ""
|
1250 |
|
1251 |
-
#: core/class-wptouch-pro.php:
|
1252 |
msgid ""
|
1253 |
"Automatic theme migration from wp-content/uploads/wptouch-data directory "
|
1254 |
"failed. Please manually move these folders to wp-content/wptouch-data: %s"
|
1255 |
msgstr ""
|
1256 |
|
1257 |
-
#: core/class-wptouch-pro.php:
|
1258 |
msgid ""
|
1259 |
"%sWPtouch: %s was recently disabled, but is still affecting your website and "
|
1260 |
"caching pages.%s"
|
1261 |
msgstr ""
|
1262 |
|
1263 |
-
#: core/class-wptouch-pro.php:
|
1264 |
msgid ""
|
1265 |
"%sPlease reactivate the plugin, disable page caching, then deactivate the "
|
1266 |
"plugin again to correct this issue.%s"
|
1267 |
msgstr ""
|
1268 |
|
1269 |
-
#: core/class-wptouch-pro.php:
|
1270 |
msgid ""
|
1271 |
"%sFixing this issue prevents cached desktop pages being served to mobile "
|
1272 |
"devices and vice-versa.%s"
|
1273 |
msgstr ""
|
1274 |
|
1275 |
-
#: core/class-wptouch-pro.php:
|
1276 |
msgid ""
|
1277 |
-
"%sOnce fixed, this message will be dismissed automatically. Until fixed,
|
1278 |
-
"sWPtouch will not be shown%s to mobile visitors, and cannot be previewed.%s"
|
1279 |
msgstr ""
|
1280 |
|
1281 |
-
#: core/class-wptouch-pro.php:
|
1282 |
msgid "%sWPtouch: %s needs to be configured to work correctly with WPtouch.%s"
|
1283 |
msgstr ""
|
1284 |
|
1285 |
-
#: core/class-wptouch-pro.php:
|
1286 |
msgid ""
|
1287 |
"%sTo fix the issue, follow our %sstep-by-step setup guide%s on support."
|
1288 |
"wptouch.com%s"
|
1289 |
msgstr ""
|
1290 |
|
1291 |
-
#: core/class-wptouch-pro.php:
|
1292 |
msgid "WPtouch Repair Required"
|
1293 |
msgstr ""
|
1294 |
|
1295 |
-
#: core/class-wptouch-pro.php:
|
1296 |
msgid "Your mobile theme was either broken or missing."
|
1297 |
msgstr ""
|
1298 |
|
1299 |
-
#: core/class-wptouch-pro.php:
|
1300 |
msgid "We downloaded a fresh copy for you."
|
1301 |
msgstr ""
|
1302 |
|
1303 |
-
#: core/class-wptouch-pro.php:
|
1304 |
msgid "OK"
|
1305 |
msgstr ""
|
1306 |
|
1307 |
-
#: core/class-wptouch-pro.php:
|
1308 |
msgid ""
|
1309 |
"We were unable to install your WPtouch Pro theme from the Cloud. %s Please "
|
1310 |
"visit %sthis article%s for more information."
|
1311 |
msgstr ""
|
1312 |
|
1313 |
-
#: core/class-wptouch-pro.php:
|
1314 |
msgid "WPtouch Server Issue"
|
1315 |
msgstr ""
|
1316 |
|
1317 |
-
#: core/class-wptouch-pro.php:
|
1318 |
msgid ""
|
1319 |
-
"Your server setup is preventing WPtouch Pro from installing from the Cloud.
|
1320 |
-
"s Please visit %sthis article%s for more information on how to fix it."
|
1321 |
msgstr ""
|
1322 |
|
1323 |
-
#: core/class-wptouch-pro.php:
|
1324 |
msgid ""
|
1325 |
"This will reset all WPtouch Pro settings.\n"
|
1326 |
"Are you sure?"
|
1327 |
msgstr ""
|
1328 |
|
1329 |
-
#: core/class-wptouch-pro.php:
|
1330 |
msgid ""
|
1331 |
"This will reset all WPtouch Pro settings and delete the wptouch-data "
|
1332 |
"folder.\n"
|
1333 |
"Are you sure?"
|
1334 |
msgstr ""
|
1335 |
|
1336 |
-
#: core/class-wptouch-pro.php:
|
1337 |
msgid ""
|
1338 |
"This will reset all WPtouch Pro settings, delete the wptouch-data folder, "
|
1339 |
"and deactivate the plugin. Are you sure?"
|
1340 |
msgstr ""
|
1341 |
|
1342 |
-
#: core/class-wptouch-pro.php:
|
1343 |
msgid "The item failed to download for this reason: %reason%"
|
1344 |
msgstr ""
|
1345 |
|
1346 |
-
#: core/class-wptouch-pro.php:
|
1347 |
msgid "You are about to reset your license information. Proceed?"
|
1348 |
msgstr ""
|
1349 |
|
1350 |
-
#: core/class-wptouch-pro.php:
|
1351 |
msgid "Upload Failed: Not a valid image."
|
1352 |
msgstr ""
|
1353 |
|
1354 |
-
#: core/class-wptouch-pro.php:
|
1355 |
msgid ""
|
1356 |
"WPtouch is saving settings. Please do not refresh the page while saving."
|
1357 |
msgstr ""
|
1358 |
|
1359 |
-
#: core/class-wptouch-pro.php:
|
1360 |
msgid "Install Themes"
|
1361 |
msgstr ""
|
1362 |
|
1363 |
-
#: core/class-wptouch-pro.php:
|
1364 |
msgid "Install Extensions"
|
1365 |
msgstr ""
|
1366 |
|
1367 |
-
#: core/class-wptouch-pro.php:
|
1368 |
msgid "%s Changelog"
|
1369 |
msgstr ""
|
1370 |
|
1371 |
-
#: core/class-wptouch-pro.php:
|
1372 |
msgid "Directory Problem"
|
1373 |
msgstr ""
|
1374 |
|
1375 |
-
#: core/class-wptouch-pro.php:
|
1376 |
msgid "One or more required directories could not be created"
|
1377 |
msgstr ""
|
1378 |
|
@@ -1803,122 +1803,130 @@ msgstr ""
|
|
1803 |
msgid "desktop"
|
1804 |
msgstr ""
|
1805 |
|
1806 |
-
#: themes/bauhaus/root-functions.php:
|
1807 |
msgid "Header Menu"
|
1808 |
msgstr ""
|
1809 |
|
1810 |
-
#: themes/bauhaus/root-functions.php:
|
1811 |
msgid "Choose a menu"
|
1812 |
msgstr ""
|
1813 |
|
1814 |
-
#: themes/bauhaus/root-functions.php:
|
1815 |
msgid "Main menu selection"
|
1816 |
msgstr ""
|
1817 |
|
1818 |
-
#: themes/bauhaus/root-functions.php:
|
1819 |
msgid "Theme background"
|
1820 |
msgstr ""
|
1821 |
|
1822 |
-
#: themes/bauhaus/root-functions.php:
|
1823 |
msgid "Header & Menu"
|
1824 |
msgstr ""
|
1825 |
|
1826 |
-
#: themes/bauhaus/root-functions.php:
|
1827 |
msgid "Links"
|
1828 |
msgstr ""
|
1829 |
|
1830 |
-
#: themes/bauhaus/root-functions.php:
|
1831 |
msgid "Post/Page Headers"
|
1832 |
msgstr ""
|
1833 |
|
1834 |
-
#: themes/bauhaus/root-functions.php:
|
1835 |
msgid "Menu animation style"
|
1836 |
msgstr ""
|
1837 |
|
1838 |
-
#: themes/bauhaus/root-functions.php:
|
1839 |
msgid "Off-canvas"
|
1840 |
msgstr ""
|
1841 |
|
1842 |
-
#: themes/bauhaus/root-functions.php:
|
1843 |
msgid "Drop-down"
|
1844 |
msgstr ""
|
1845 |
|
1846 |
-
#: themes/bauhaus/root-functions.php:
|
1847 |
msgid "Menu position"
|
1848 |
msgstr ""
|
1849 |
|
1850 |
-
#: themes/bauhaus/root-functions.php:
|
1851 |
msgid "Left side"
|
1852 |
msgstr ""
|
1853 |
|
1854 |
-
#: themes/bauhaus/root-functions.php:
|
1855 |
msgid "Right side"
|
1856 |
msgstr ""
|
1857 |
|
1858 |
-
#: themes/bauhaus/root-functions.php:
|
1859 |
msgid "Show search in header"
|
1860 |
msgstr ""
|
1861 |
|
1862 |
-
#: themes/bauhaus/root-functions.php:
|
1863 |
msgid "Post thumbnails"
|
1864 |
msgstr ""
|
1865 |
|
1866 |
-
#: themes/bauhaus/root-functions.php:
|
1867 |
msgid "No thumbnails"
|
1868 |
msgstr ""
|
1869 |
|
1870 |
-
#: themes/bauhaus/root-functions.php:
|
1871 |
msgid "Blog listing only"
|
1872 |
msgstr ""
|
1873 |
|
1874 |
-
#: themes/bauhaus/root-functions.php:
|
1875 |
msgid "Blog listing, single posts"
|
1876 |
msgstr ""
|
1877 |
|
1878 |
-
#: themes/bauhaus/root-functions.php:
|
1879 |
msgid "Blog listing, single posts & pages"
|
1880 |
msgstr ""
|
1881 |
|
1882 |
-
#: themes/bauhaus/root-functions.php:
|
1883 |
msgid "All (blog, single, pages, search & archive)"
|
1884 |
msgstr ""
|
1885 |
|
1886 |
-
#: themes/bauhaus/root-functions.php:
|
1887 |
msgid "Thumbnail Type"
|
1888 |
msgstr ""
|
1889 |
|
1890 |
-
#: themes/bauhaus/root-functions.php:
|
1891 |
msgid "Post featured images"
|
1892 |
msgstr ""
|
1893 |
|
1894 |
-
#: themes/bauhaus/root-functions.php:
|
1895 |
msgid "Post custom field"
|
1896 |
msgstr ""
|
1897 |
|
1898 |
-
#: themes/bauhaus/root-functions.php:
|
1899 |
msgid "Thumbnail custom field name"
|
1900 |
msgstr ""
|
1901 |
|
1902 |
-
#: themes/bauhaus/root-functions.php:
|
1903 |
msgid "Show post categories and tags"
|
1904 |
msgstr ""
|
1905 |
|
1906 |
-
#: themes/bauhaus/root-functions.php:
|
1907 |
msgid "Show post date"
|
1908 |
msgstr ""
|
1909 |
|
1910 |
-
#: themes/bauhaus/root-functions.php:
|
1911 |
msgid "Show post author"
|
1912 |
msgstr ""
|
1913 |
|
1914 |
-
#: themes/bauhaus/root-functions.php:
|
1915 |
msgid "Show comment bubbles on posts"
|
1916 |
msgstr ""
|
1917 |
|
1918 |
-
#: themes/bauhaus/root-functions.php:
|
1919 |
msgid "Use infinite scrolling for blog"
|
1920 |
msgstr ""
|
1921 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1922 |
#: themes/foundation/default/formerror.php:6
|
1923 |
msgid "Comment Error"
|
1924 |
msgstr ""
|
@@ -1969,104 +1977,104 @@ msgid ""
|
|
1969 |
"site."
|
1970 |
msgstr ""
|
1971 |
|
1972 |
-
#: themes/foundation/modules/featured/featured.php:
|
1973 |
msgid "Featured slider style"
|
1974 |
msgstr ""
|
1975 |
|
1976 |
-
#: themes/foundation/modules/featured/featured.php:
|
1977 |
msgid "Enhanced"
|
1978 |
msgstr ""
|
1979 |
|
1980 |
-
#: themes/foundation/modules/featured/featured.php:
|
1981 |
msgid "Streamlined"
|
1982 |
msgstr ""
|
1983 |
|
1984 |
-
#: themes/foundation/modules/featured/featured.php:
|
1985 |
msgid "Number of posts in slider"
|
1986 |
msgstr ""
|
1987 |
|
1988 |
-
#: themes/foundation/modules/featured/featured.php:
|
1989 |
msgid "Show # of comments"
|
1990 |
msgstr ""
|
1991 |
|
1992 |
-
#: themes/foundation/modules/featured/featured.php:
|
1993 |
msgid "Slide automatically"
|
1994 |
msgstr ""
|
1995 |
|
1996 |
-
#: themes/foundation/modules/featured/featured.php:
|
1997 |
msgid "Slides repeat"
|
1998 |
msgstr ""
|
1999 |
|
2000 |
-
#: themes/foundation/modules/featured/featured.php:
|
2001 |
msgid "Make images grayscale"
|
2002 |
msgstr ""
|
2003 |
|
2004 |
-
#: themes/foundation/modules/featured/featured.php:
|
2005 |
msgid "Slider posts also show in listings"
|
2006 |
msgstr ""
|
2007 |
|
2008 |
-
#: themes/foundation/modules/featured/featured.php:
|
2009 |
msgid "Slide transition speed"
|
2010 |
msgstr ""
|
2011 |
|
2012 |
-
#: themes/foundation/modules/featured/featured.php:
|
2013 |
msgid "Slow"
|
2014 |
msgstr ""
|
2015 |
|
2016 |
-
#: themes/foundation/modules/featured/featured.php:
|
2017 |
msgid "Normal"
|
2018 |
msgstr ""
|
2019 |
|
2020 |
-
#: themes/foundation/modules/featured/featured.php:
|
2021 |
msgid "Fast"
|
2022 |
msgstr ""
|
2023 |
|
2024 |
-
#: themes/foundation/modules/featured/featured.php:
|
2025 |
msgid "Show latest posts"
|
2026 |
msgstr ""
|
2027 |
|
2028 |
-
#: themes/foundation/modules/featured/featured.php:
|
2029 |
msgid "Show posts from a specific tag"
|
2030 |
msgstr ""
|
2031 |
|
2032 |
-
#: themes/foundation/modules/featured/featured.php:
|
2033 |
msgid "Show posts from a specific category"
|
2034 |
msgstr ""
|
2035 |
|
2036 |
-
#: themes/foundation/modules/featured/featured.php:
|
2037 |
msgid "Show posts from a specific post type"
|
2038 |
msgstr ""
|
2039 |
|
2040 |
-
#: themes/foundation/modules/featured/featured.php:
|
2041 |
msgid "Show only specific posts or pages"
|
2042 |
msgstr ""
|
2043 |
|
2044 |
-
#: themes/foundation/modules/featured/featured.php:
|
2045 |
msgid "Only this tag"
|
2046 |
msgstr ""
|
2047 |
|
2048 |
-
#: themes/foundation/modules/featured/featured.php:
|
2049 |
-
#: themes/foundation/modules/featured/featured.php:
|
2050 |
msgid "Enter the tag/category slug name"
|
2051 |
msgstr ""
|
2052 |
|
2053 |
-
#: themes/foundation/modules/featured/featured.php:
|
2054 |
msgid "Only this category"
|
2055 |
msgstr ""
|
2056 |
|
2057 |
-
#: themes/foundation/modules/featured/featured.php:
|
2058 |
msgid "Comma-separated list of post/page IDs"
|
2059 |
msgstr ""
|
2060 |
|
2061 |
-
#: themes/foundation/modules/featured/featured.php:
|
2062 |
msgid "Only this post type"
|
2063 |
msgstr ""
|
2064 |
|
2065 |
-
#: themes/foundation/modules/featured/featured.php:
|
2066 |
msgid "Featured Slider"
|
2067 |
msgstr ""
|
2068 |
|
2069 |
-
#: themes/foundation/modules/featured/featured.php:
|
2070 |
msgid "Enable featured slider"
|
2071 |
msgstr ""
|
2072 |
|
2 |
# This file is distributed under the same license as the WPtouch Mobile Plugin package.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
+
"Project-Id-Version: WPtouch Mobile Plugin 4.1.5\n"
|
6 |
"Report-Msgid-Bugs-To: http://wordpress.org/tag/wptouch\n"
|
7 |
+
"POT-Creation-Date: 2016-06-17 17:28:43+00:00\n"
|
8 |
"MIME-Version: 1.0\n"
|
9 |
"Content-Type: text/plain; charset=UTF-8\n"
|
10 |
"Content-Transfer-Encoding: 8bit\n"
|
374 |
#: admin/pages/custom/wptouch-admin-wizard.php:179
|
375 |
#: admin/settings/html/theme-browser-item-detail.php:52
|
376 |
#: admin/settings/html/updates-available.php:35
|
377 |
+
#: admin/settings/html/updates-available.php:71 core/class-wptouch-pro.php:940
|
378 |
msgid "Download"
|
379 |
msgstr ""
|
380 |
|
384 |
#: admin/settings/html/installed_icon_sets_ajax.php:13
|
385 |
#: admin/settings/html/installed_icon_sets_ajax.php:26
|
386 |
#: admin/settings/html/theme-browser-item.php:12
|
387 |
+
#: core/class-wptouch-pro.php:939
|
388 |
msgid "Installed"
|
389 |
msgstr ""
|
390 |
|
802 |
|
803 |
#: admin/pages/wptouch-admin-general-settings.php:591
|
804 |
#: admin/settings/html/installed_icon_sets_ajax.php:4
|
805 |
+
#: core/class-wptouch-pro.php:2135 core/class-wptouch-pro.php:2136
|
806 |
#: core/config.php:54
|
807 |
msgid "Custom Icons"
|
808 |
msgstr ""
|
812 |
msgstr ""
|
813 |
|
814 |
#: admin/pages/wptouch-admin-general-settings.php:640
|
815 |
+
#: core/admin-render.php:110 core/config.php:93
|
816 |
msgid "Customize Theme"
|
817 |
msgstr ""
|
818 |
|
910 |
msgid "No extensions available"
|
911 |
msgstr ""
|
912 |
|
913 |
+
#: admin/settings/html/image-upload.php:7 core/class-wptouch-pro.php:932
|
914 |
msgid "Upload Complete!"
|
915 |
msgstr ""
|
916 |
|
929 |
msgstr ""
|
930 |
|
931 |
#: admin/settings/html/installed_icon_sets_ajax.php:25
|
932 |
+
#: core/class-wptouch-pro.php:938
|
933 |
msgid "Installing"
|
934 |
msgstr ""
|
935 |
|
936 |
#: admin/settings/html/installed_icon_sets_ajax.php:25
|
937 |
#: admin/settings/html/theme-browser-item-detail.php:3
|
938 |
+
#: core/admin-extensions.php:363 core/class-wptouch-pro.php:937
|
939 |
msgid "Install"
|
940 |
msgstr ""
|
941 |
|
1147 |
msgid "Setup Wizard"
|
1148 |
msgstr ""
|
1149 |
|
1150 |
+
#: core/admin-menu.php:48 core/class-wptouch-pro.php:1607
|
1151 |
msgid "Settings"
|
1152 |
msgstr ""
|
1153 |
|
1229 |
msgstr ""
|
1230 |
|
1231 |
#: core/admin-render.php:102 core/admin-render.php:104
|
1232 |
+
#: core/admin-render.php:142 core/config.php:95 core/multisite.php:283
|
1233 |
#: core/multisite.php:376
|
1234 |
msgid "Themes"
|
1235 |
msgstr ""
|
1236 |
|
1237 |
+
#: core/admin-render.php:117 core/admin-render.php:119
|
1238 |
+
#: core/admin-render.php:143 core/config.php:96 core/multisite.php:291
|
1239 |
#: core/multisite.php:384
|
1240 |
msgid "Extensions"
|
1241 |
msgstr ""
|
1242 |
|
1243 |
+
#: core/admin-render.php:140
|
1244 |
msgid "Available for WPtouch Pro"
|
1245 |
msgstr ""
|
1246 |
|
1247 |
+
#: core/admin-render.php:191
|
1248 |
msgid "Reset Settings"
|
1249 |
msgstr ""
|
1250 |
|
1251 |
+
#: core/class-wptouch-pro.php:619
|
1252 |
msgid ""
|
1253 |
"Automatic theme migration from wp-content/uploads/wptouch-data directory "
|
1254 |
"failed. Please manually move these folders to wp-content/wptouch-data: %s"
|
1255 |
msgstr ""
|
1256 |
|
1257 |
+
#: core/class-wptouch-pro.php:638
|
1258 |
msgid ""
|
1259 |
"%sWPtouch: %s was recently disabled, but is still affecting your website and "
|
1260 |
"caching pages.%s"
|
1261 |
msgstr ""
|
1262 |
|
1263 |
+
#: core/class-wptouch-pro.php:639
|
1264 |
msgid ""
|
1265 |
"%sPlease reactivate the plugin, disable page caching, then deactivate the "
|
1266 |
"plugin again to correct this issue.%s"
|
1267 |
msgstr ""
|
1268 |
|
1269 |
+
#: core/class-wptouch-pro.php:640 core/class-wptouch-pro.php:649
|
1270 |
msgid ""
|
1271 |
"%sFixing this issue prevents cached desktop pages being served to mobile "
|
1272 |
"devices and vice-versa.%s"
|
1273 |
msgstr ""
|
1274 |
|
1275 |
+
#: core/class-wptouch-pro.php:641 core/class-wptouch-pro.php:650
|
1276 |
msgid ""
|
1277 |
+
"%sOnce fixed, this message will be dismissed automatically. Until fixed, "
|
1278 |
+
"%sWPtouch will not be shown%s to mobile visitors, and cannot be previewed.%s"
|
1279 |
msgstr ""
|
1280 |
|
1281 |
+
#: core/class-wptouch-pro.php:648
|
1282 |
msgid "%sWPtouch: %s needs to be configured to work correctly with WPtouch.%s"
|
1283 |
msgstr ""
|
1284 |
|
1285 |
+
#: core/class-wptouch-pro.php:651
|
1286 |
msgid ""
|
1287 |
"%sTo fix the issue, follow our %sstep-by-step setup guide%s on support."
|
1288 |
"wptouch.com%s"
|
1289 |
msgstr ""
|
1290 |
|
1291 |
+
#: core/class-wptouch-pro.php:663
|
1292 |
msgid "WPtouch Repair Required"
|
1293 |
msgstr ""
|
1294 |
|
1295 |
+
#: core/class-wptouch-pro.php:670
|
1296 |
msgid "Your mobile theme was either broken or missing."
|
1297 |
msgstr ""
|
1298 |
|
1299 |
+
#: core/class-wptouch-pro.php:671
|
1300 |
msgid "We downloaded a fresh copy for you."
|
1301 |
msgstr ""
|
1302 |
|
1303 |
+
#: core/class-wptouch-pro.php:672 core/class-wptouch-pro.php:682
|
1304 |
msgid "OK"
|
1305 |
msgstr ""
|
1306 |
|
1307 |
+
#: core/class-wptouch-pro.php:675
|
1308 |
msgid ""
|
1309 |
"We were unable to install your WPtouch Pro theme from the Cloud. %s Please "
|
1310 |
"visit %sthis article%s for more information."
|
1311 |
msgstr ""
|
1312 |
|
1313 |
+
#: core/class-wptouch-pro.php:678
|
1314 |
msgid "WPtouch Server Issue"
|
1315 |
msgstr ""
|
1316 |
|
1317 |
+
#: core/class-wptouch-pro.php:680
|
1318 |
msgid ""
|
1319 |
+
"Your server setup is preventing WPtouch Pro from installing from the Cloud. "
|
1320 |
+
"%s Please visit %sthis article%s for more information on how to fix it."
|
1321 |
msgstr ""
|
1322 |
|
1323 |
+
#: core/class-wptouch-pro.php:927
|
1324 |
msgid ""
|
1325 |
"This will reset all WPtouch Pro settings.\n"
|
1326 |
"Are you sure?"
|
1327 |
msgstr ""
|
1328 |
|
1329 |
+
#: core/class-wptouch-pro.php:928
|
1330 |
msgid ""
|
1331 |
"This will reset all WPtouch Pro settings and delete the wptouch-data "
|
1332 |
"folder.\n"
|
1333 |
"Are you sure?"
|
1334 |
msgstr ""
|
1335 |
|
1336 |
+
#: core/class-wptouch-pro.php:929
|
1337 |
msgid ""
|
1338 |
"This will reset all WPtouch Pro settings, delete the wptouch-data folder, "
|
1339 |
"and deactivate the plugin. Are you sure?"
|
1340 |
msgstr ""
|
1341 |
|
1342 |
+
#: core/class-wptouch-pro.php:930
|
1343 |
msgid "The item failed to download for this reason: %reason%"
|
1344 |
msgstr ""
|
1345 |
|
1346 |
+
#: core/class-wptouch-pro.php:931
|
1347 |
msgid "You are about to reset your license information. Proceed?"
|
1348 |
msgstr ""
|
1349 |
|
1350 |
+
#: core/class-wptouch-pro.php:933
|
1351 |
msgid "Upload Failed: Not a valid image."
|
1352 |
msgstr ""
|
1353 |
|
1354 |
+
#: core/class-wptouch-pro.php:934
|
1355 |
msgid ""
|
1356 |
"WPtouch is saving settings. Please do not refresh the page while saving."
|
1357 |
msgstr ""
|
1358 |
|
1359 |
+
#: core/class-wptouch-pro.php:935
|
1360 |
msgid "Install Themes"
|
1361 |
msgstr ""
|
1362 |
|
1363 |
+
#: core/class-wptouch-pro.php:936
|
1364 |
msgid "Install Extensions"
|
1365 |
msgstr ""
|
1366 |
|
1367 |
+
#: core/class-wptouch-pro.php:1644
|
1368 |
msgid "%s Changelog"
|
1369 |
msgstr ""
|
1370 |
|
1371 |
+
#: core/class-wptouch-pro.php:3061
|
1372 |
msgid "Directory Problem"
|
1373 |
msgstr ""
|
1374 |
|
1375 |
+
#: core/class-wptouch-pro.php:3062
|
1376 |
msgid "One or more required directories could not be created"
|
1377 |
msgstr ""
|
1378 |
|
1803 |
msgid "desktop"
|
1804 |
msgstr ""
|
1805 |
|
1806 |
+
#: themes/bauhaus/root-functions.php:126
|
1807 |
msgid "Header Menu"
|
1808 |
msgstr ""
|
1809 |
|
1810 |
+
#: themes/bauhaus/root-functions.php:128
|
1811 |
msgid "Choose a menu"
|
1812 |
msgstr ""
|
1813 |
|
1814 |
+
#: themes/bauhaus/root-functions.php:129
|
1815 |
msgid "Main menu selection"
|
1816 |
msgstr ""
|
1817 |
|
1818 |
+
#: themes/bauhaus/root-functions.php:136
|
1819 |
msgid "Theme background"
|
1820 |
msgstr ""
|
1821 |
|
1822 |
+
#: themes/bauhaus/root-functions.php:137
|
1823 |
msgid "Header & Menu"
|
1824 |
msgstr ""
|
1825 |
|
1826 |
+
#: themes/bauhaus/root-functions.php:138
|
1827 |
msgid "Links"
|
1828 |
msgstr ""
|
1829 |
|
1830 |
+
#: themes/bauhaus/root-functions.php:139
|
1831 |
msgid "Post/Page Headers"
|
1832 |
msgstr ""
|
1833 |
|
1834 |
+
#: themes/bauhaus/root-functions.php:232
|
1835 |
msgid "Menu animation style"
|
1836 |
msgstr ""
|
1837 |
|
1838 |
+
#: themes/bauhaus/root-functions.php:237
|
1839 |
msgid "Off-canvas"
|
1840 |
msgstr ""
|
1841 |
|
1842 |
+
#: themes/bauhaus/root-functions.php:238
|
1843 |
msgid "Drop-down"
|
1844 |
msgstr ""
|
1845 |
|
1846 |
+
#: themes/bauhaus/root-functions.php:246
|
1847 |
msgid "Menu position"
|
1848 |
msgstr ""
|
1849 |
|
1850 |
+
#: themes/bauhaus/root-functions.php:251
|
1851 |
msgid "Left side"
|
1852 |
msgstr ""
|
1853 |
|
1854 |
+
#: themes/bauhaus/root-functions.php:252
|
1855 |
msgid "Right side"
|
1856 |
msgstr ""
|
1857 |
|
1858 |
+
#: themes/bauhaus/root-functions.php:260
|
1859 |
msgid "Show search in header"
|
1860 |
msgstr ""
|
1861 |
|
1862 |
+
#: themes/bauhaus/root-functions.php:277
|
1863 |
msgid "Post thumbnails"
|
1864 |
msgstr ""
|
1865 |
|
1866 |
+
#: themes/bauhaus/root-functions.php:282
|
1867 |
msgid "No thumbnails"
|
1868 |
msgstr ""
|
1869 |
|
1870 |
+
#: themes/bauhaus/root-functions.php:283
|
1871 |
msgid "Blog listing only"
|
1872 |
msgstr ""
|
1873 |
|
1874 |
+
#: themes/bauhaus/root-functions.php:284
|
1875 |
msgid "Blog listing, single posts"
|
1876 |
msgstr ""
|
1877 |
|
1878 |
+
#: themes/bauhaus/root-functions.php:285
|
1879 |
msgid "Blog listing, single posts & pages"
|
1880 |
msgstr ""
|
1881 |
|
1882 |
+
#: themes/bauhaus/root-functions.php:286
|
1883 |
msgid "All (blog, single, pages, search & archive)"
|
1884 |
msgstr ""
|
1885 |
|
1886 |
+
#: themes/bauhaus/root-functions.php:294
|
1887 |
msgid "Thumbnail Type"
|
1888 |
msgstr ""
|
1889 |
|
1890 |
+
#: themes/bauhaus/root-functions.php:299
|
1891 |
msgid "Post featured images"
|
1892 |
msgstr ""
|
1893 |
|
1894 |
+
#: themes/bauhaus/root-functions.php:300
|
1895 |
msgid "Post custom field"
|
1896 |
msgstr ""
|
1897 |
|
1898 |
+
#: themes/bauhaus/root-functions.php:308
|
1899 |
msgid "Thumbnail custom field name"
|
1900 |
msgstr ""
|
1901 |
|
1902 |
+
#: themes/bauhaus/root-functions.php:319
|
1903 |
msgid "Show post categories and tags"
|
1904 |
msgstr ""
|
1905 |
|
1906 |
+
#: themes/bauhaus/root-functions.php:330
|
1907 |
msgid "Show post date"
|
1908 |
msgstr ""
|
1909 |
|
1910 |
+
#: themes/bauhaus/root-functions.php:341
|
1911 |
msgid "Show post author"
|
1912 |
msgstr ""
|
1913 |
|
1914 |
+
#: themes/bauhaus/root-functions.php:352
|
1915 |
msgid "Show comment bubbles on posts"
|
1916 |
msgstr ""
|
1917 |
|
1918 |
+
#: themes/bauhaus/root-functions.php:363
|
1919 |
msgid "Use infinite scrolling for blog"
|
1920 |
msgstr ""
|
1921 |
|
1922 |
+
#: themes/bauhaus/root-functions.php:502
|
1923 |
+
msgid "Featured Slider Page"
|
1924 |
+
msgstr ""
|
1925 |
+
|
1926 |
+
#: themes/bauhaus/root-functions.php:503
|
1927 |
+
msgid "Choose which page should display the featured slider"
|
1928 |
+
msgstr ""
|
1929 |
+
|
1930 |
#: themes/foundation/default/formerror.php:6
|
1931 |
msgid "Comment Error"
|
1932 |
msgstr ""
|
1977 |
"site."
|
1978 |
msgstr ""
|
1979 |
|
1980 |
+
#: themes/foundation/modules/featured/featured.php:334
|
1981 |
msgid "Featured slider style"
|
1982 |
msgstr ""
|
1983 |
|
1984 |
+
#: themes/foundation/modules/featured/featured.php:339
|
1985 |
msgid "Enhanced"
|
1986 |
msgstr ""
|
1987 |
|
1988 |
+
#: themes/foundation/modules/featured/featured.php:340
|
1989 |
msgid "Streamlined"
|
1990 |
msgstr ""
|
1991 |
|
1992 |
+
#: themes/foundation/modules/featured/featured.php:352
|
1993 |
msgid "Number of posts in slider"
|
1994 |
msgstr ""
|
1995 |
|
1996 |
+
#: themes/foundation/modules/featured/featured.php:365
|
1997 |
msgid "Show # of comments"
|
1998 |
msgstr ""
|
1999 |
|
2000 |
+
#: themes/foundation/modules/featured/featured.php:373
|
2001 |
msgid "Slide automatically"
|
2002 |
msgstr ""
|
2003 |
|
2004 |
+
#: themes/foundation/modules/featured/featured.php:381
|
2005 |
msgid "Slides repeat"
|
2006 |
msgstr ""
|
2007 |
|
2008 |
+
#: themes/foundation/modules/featured/featured.php:389
|
2009 |
msgid "Make images grayscale"
|
2010 |
msgstr ""
|
2011 |
|
2012 |
+
#: themes/foundation/modules/featured/featured.php:397
|
2013 |
msgid "Slider posts also show in listings"
|
2014 |
msgstr ""
|
2015 |
|
2016 |
+
#: themes/foundation/modules/featured/featured.php:405
|
2017 |
msgid "Slide transition speed"
|
2018 |
msgstr ""
|
2019 |
|
2020 |
+
#: themes/foundation/modules/featured/featured.php:410
|
2021 |
msgid "Slow"
|
2022 |
msgstr ""
|
2023 |
|
2024 |
+
#: themes/foundation/modules/featured/featured.php:411
|
2025 |
msgid "Normal"
|
2026 |
msgstr ""
|
2027 |
|
2028 |
+
#: themes/foundation/modules/featured/featured.php:412
|
2029 |
msgid "Fast"
|
2030 |
msgstr ""
|
2031 |
|
2032 |
+
#: themes/foundation/modules/featured/featured.php:423
|
2033 |
msgid "Show latest posts"
|
2034 |
msgstr ""
|
2035 |
|
2036 |
+
#: themes/foundation/modules/featured/featured.php:424
|
2037 |
msgid "Show posts from a specific tag"
|
2038 |
msgstr ""
|
2039 |
|
2040 |
+
#: themes/foundation/modules/featured/featured.php:425
|
2041 |
msgid "Show posts from a specific category"
|
2042 |
msgstr ""
|
2043 |
|
2044 |
+
#: themes/foundation/modules/featured/featured.php:426
|
2045 |
msgid "Show posts from a specific post type"
|
2046 |
msgstr ""
|
2047 |
|
2048 |
+
#: themes/foundation/modules/featured/featured.php:427
|
2049 |
msgid "Show only specific posts or pages"
|
2050 |
msgstr ""
|
2051 |
|
2052 |
+
#: themes/foundation/modules/featured/featured.php:433
|
2053 |
msgid "Only this tag"
|
2054 |
msgstr ""
|
2055 |
|
2056 |
+
#: themes/foundation/modules/featured/featured.php:434
|
2057 |
+
#: themes/foundation/modules/featured/featured.php:443
|
2058 |
msgid "Enter the tag/category slug name"
|
2059 |
msgstr ""
|
2060 |
|
2061 |
+
#: themes/foundation/modules/featured/featured.php:442
|
2062 |
msgid "Only this category"
|
2063 |
msgstr ""
|
2064 |
|
2065 |
+
#: themes/foundation/modules/featured/featured.php:451
|
2066 |
msgid "Comma-separated list of post/page IDs"
|
2067 |
msgstr ""
|
2068 |
|
2069 |
+
#: themes/foundation/modules/featured/featured.php:462
|
2070 |
msgid "Only this post type"
|
2071 |
msgstr ""
|
2072 |
|
2073 |
+
#: themes/foundation/modules/featured/featured.php:472
|
2074 |
msgid "Featured Slider"
|
2075 |
msgstr ""
|
2076 |
|
2077 |
+
#: themes/foundation/modules/featured/featured.php:479
|
2078 |
msgid "Enable featured slider"
|
2079 |
msgstr ""
|
2080 |
|
readme.txt
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
Contributors: bravenewcode, duanestorey, dalemugford, mkuplens
|
3 |
Tags: wptouch, iphone, ipod, bravenewcode, mobile, mobile-friendly, android, blackberry, smartphone, responsive, design, mobile plugin, ios, mobile theme
|
4 |
Requires at least: 4.2
|
5 |
-
Stable tag: 4.1.
|
6 |
Tested up to: 4.5
|
7 |
License: GPLv2
|
8 |
|
@@ -33,6 +33,18 @@ For more information visit [WPtouch.com](http://www.wptouch.com/?utm_campaign=wp
|
|
33 |
|
34 |
== Changelog ==
|
35 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
36 |
= Version 4.1.4 (May 26, 2016) =
|
37 |
|
38 |
* Added: Support for new setting types in admin
|
2 |
Contributors: bravenewcode, duanestorey, dalemugford, mkuplens
|
3 |
Tags: wptouch, iphone, ipod, bravenewcode, mobile, mobile-friendly, android, blackberry, smartphone, responsive, design, mobile plugin, ios, mobile theme
|
4 |
Requires at least: 4.2
|
5 |
+
Stable tag: 4.1.5
|
6 |
Tested up to: 4.5
|
7 |
License: GPLv2
|
8 |
|
33 |
|
34 |
== Changelog ==
|
35 |
|
36 |
+
= Version 4.1.5 (June 17, 2016) =
|
37 |
+
|
38 |
+
* Added: Option to choose which page the featured slider is shown on (Bauhaus, certain configurations)
|
39 |
+
* Added: For sites that redirect mobile visitors to a landing page other than their latest posts page, added option to select on which page the featured slider is shown.
|
40 |
+
* Changed: Auto-expand menu section if on a page within that section
|
41 |
+
* Changed: Reduced frequency of API calls in admin
|
42 |
+
* Changed: Cache warning is no longer displayed for sites running W3 Total Cache if a user agent group has been enabled to pass through mobile requests. As it is incompatible with this cache configuration, the desktop/mobile theme switch is disabled for sites using this cache configuration.
|
43 |
+
* Changed: Custom field-based thumbnails are now displayed in post listings, related posts, featured slider, and at top of posts.
|
44 |
+
* Changed: Featured slider no longer shows zero comment count
|
45 |
+
* Fixed: Incorrect XML sitemap output when Featured Slider was enabled
|
46 |
+
* Updated: Italian, Portuguese, Spanish translations
|
47 |
+
|
48 |
= Version 4.1.4 (May 26, 2016) =
|
49 |
|
50 |
* Added: Support for new setting types in admin
|
themes/bauhaus/default/bauhaus.js
CHANGED
@@ -16,7 +16,6 @@ function doBauhausReady() {
|
|
16 |
// Spice up the appearance of Foundation's Featured Slider
|
17 |
function bauhausSliderMods(){
|
18 |
jQuery( '#slider a' ).each( function(){
|
19 |
-
console.log( 'hai' );
|
20 |
imgCloned = jQuery( this ).find( 'img' ).clone();
|
21 |
jQuery( this ).append( imgCloned );
|
22 |
imgCloned.addClass( 'clone' );
|
16 |
// Spice up the appearance of Foundation's Featured Slider
|
17 |
function bauhausSliderMods(){
|
18 |
jQuery( '#slider a' ).each( function(){
|
|
|
19 |
imgCloned = jQuery( this ).find( 'img' ).clone();
|
20 |
jQuery( this ).append( imgCloned );
|
21 |
imgCloned.addClass( 'clone' );
|
themes/bauhaus/default/featured-slider.php
CHANGED
@@ -5,7 +5,7 @@
|
|
5 |
$settings = foundation_get_settings();
|
6 |
?>
|
7 |
<a href='<?php echo the_permalink(); ?>' class='needsclick'>
|
8 |
-
<?php if ( $settings->featured_style == 'enhanced' ) { ?>
|
9 |
<div class='comments-number'><span><?php echo wptouch_get_comment_count(); ?></span></div>
|
10 |
<?php } ?>
|
11 |
<img src='<?php echo foundation_featured_get_image(); ?>' alt='<?php the_title(); ?>' / >
|
5 |
$settings = foundation_get_settings();
|
6 |
?>
|
7 |
<a href='<?php echo the_permalink(); ?>' class='needsclick'>
|
8 |
+
<?php if ( $settings->featured_style == 'enhanced' && wptouch_get_comment_count() != 0 ) { ?>
|
9 |
<div class='comments-number'><span><?php echo wptouch_get_comment_count(); ?></span></div>
|
10 |
<?php } ?>
|
11 |
<img src='<?php echo foundation_featured_get_image(); ?>' alt='<?php the_title(); ?>' / >
|
themes/bauhaus/default/functions.php
CHANGED
@@ -1,6 +1,8 @@
|
|
1 |
<?php
|
2 |
|
3 |
add_action( 'foundation_enqueue_scripts', 'bauhaus_enqueue_scripts' );
|
|
|
|
|
4 |
|
5 |
function bauhaus_enqueue_scripts() {
|
6 |
wp_enqueue_script(
|
@@ -90,4 +92,19 @@ function bauhaus_is_menu_position_default(){
|
|
90 |
} else {
|
91 |
return false;
|
92 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
93 |
}
|
1 |
<?php
|
2 |
|
3 |
add_action( 'foundation_enqueue_scripts', 'bauhaus_enqueue_scripts' );
|
4 |
+
add_filter( 'amp_should_show_featured_image_in_header', 'bauhaus_should_show_thumbnail' );
|
5 |
+
add_filter( 'foundation_featured_show', 'bauhaus_show_featured_slider', 10, 2 );
|
6 |
|
7 |
function bauhaus_enqueue_scripts() {
|
8 |
wp_enqueue_script(
|
92 |
} else {
|
93 |
return false;
|
94 |
}
|
95 |
+
}
|
96 |
+
|
97 |
+
function bauhaus_show_featured_slider( $show_featured_slider, $featured_slider_enabled ) {
|
98 |
+
if ( bauhaus_allow_featured_slider_override() ) {
|
99 |
+
$settings = bauhaus_get_settings();
|
100 |
+
|
101 |
+
global $post;
|
102 |
+
if ( $settings->featured_slider_page !== false && $post->ID == $settings->featured_slider_page ) {
|
103 |
+
$show_featured_slider = true;
|
104 |
+
} elseif ( $settings->featured_slider_page == true ) {
|
105 |
+
$show_featured_slider = false;
|
106 |
+
}
|
107 |
+
}
|
108 |
+
|
109 |
+
return $show_featured_slider;
|
110 |
}
|
themes/bauhaus/default/header-bottom.php
CHANGED
@@ -55,10 +55,8 @@
|
|
55 |
|
56 |
<?php do_action( 'wptouch_advertising_top' ); ?>
|
57 |
|
58 |
-
<?php if (
|
59 |
-
<?php
|
60 |
-
<?php foundation_featured_slider(); ?>
|
61 |
-
<?php } ?>
|
62 |
<?php } ?>
|
63 |
|
64 |
<?php if ( is_archive() ) { ?>
|
55 |
|
56 |
<?php do_action( 'wptouch_advertising_top' ); ?>
|
57 |
|
58 |
+
<?php if ( function_exists( 'foundation_featured_slider' ) ) { ?>
|
59 |
+
<?php foundation_featured_slider(); ?>
|
|
|
|
|
60 |
<?php } ?>
|
61 |
|
62 |
<?php if ( is_archive() ) { ?>
|
themes/bauhaus/default/style.css
CHANGED
@@ -254,6 +254,7 @@ header img {
|
|
254 |
font-size: 160%;
|
255 |
line-height: 115%;
|
256 |
height: 4.2em;
|
|
|
257 |
}
|
258 |
|
259 |
.landscape #slider.enhanced a p.heading-font, .landscape #slider.enhanced a p.featured-date {
|
@@ -584,10 +585,12 @@ header img {
|
|
584 |
|
585 |
.nav-controls .previous {
|
586 |
text-align: left;
|
|
|
587 |
}
|
588 |
|
589 |
.nav-controls .next {
|
590 |
text-align: right;
|
|
|
591 |
float: right;
|
592 |
}
|
593 |
|
@@ -1153,3 +1156,25 @@ form#commentform button#submit {
|
|
1153 |
|
1154 |
|
1155 |
/* @end */
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
254 |
font-size: 160%;
|
255 |
line-height: 115%;
|
256 |
height: 4.2em;
|
257 |
+
word-wrap: break-word;
|
258 |
}
|
259 |
|
260 |
.landscape #slider.enhanced a p.heading-font, .landscape #slider.enhanced a p.featured-date {
|
585 |
|
586 |
.nav-controls .previous {
|
587 |
text-align: left;
|
588 |
+
word-wrap: break-word;
|
589 |
}
|
590 |
|
591 |
.nav-controls .next {
|
592 |
text-align: right;
|
593 |
+
word-wrap: break-word;
|
594 |
float: right;
|
595 |
}
|
596 |
|
1156 |
|
1157 |
|
1158 |
/* @end */
|
1159 |
+
|
1160 |
+
|
1161 |
+
/* @group Polylang language menu compat */
|
1162 |
+
.wptouch-menu li.lang-item span {
|
1163 |
+
border: none;
|
1164 |
+
box-shadow: none;
|
1165 |
+
float: left;
|
1166 |
+
padding: 0 15px;
|
1167 |
+
}
|
1168 |
+
|
1169 |
+
.wptouch-menu li.lang-item img {
|
1170 |
+
height: auto;
|
1171 |
+
width: auto;
|
1172 |
+
top: 2px;
|
1173 |
+
padding-right: 0;
|
1174 |
+
}
|
1175 |
+
|
1176 |
+
.wptouch-menu li.lang-item span:before {
|
1177 |
+
content: '';
|
1178 |
+
border: none;
|
1179 |
+
}
|
1180 |
+
/* @end* /
|
themes/bauhaus/readme.txt
CHANGED
@@ -2,7 +2,7 @@ Theme Name: Bauhaus
|
|
2 |
Theme URI: http://www.wptouch.com/themes/bauhaus
|
3 |
Author: BraveNewCode Inc.
|
4 |
Description: Clean, modern, functional design. Great for all types of WordPress sites.
|
5 |
-
Version: 1.6.
|
6 |
Depends on: 4.0
|
7 |
Framework: 2.0
|
8 |
Tags: smartphone
|
@@ -23,6 +23,13 @@ Bauhaus is one of our more flexible themes, and is designed to easily take on th
|
|
23 |
|
24 |
== Changelog ==
|
25 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
26 |
= Version 1.6.7 =
|
27 |
|
28 |
* Fixed: Long (non-word-wrappable) text is word-broken to fit on screen
|
2 |
Theme URI: http://www.wptouch.com/themes/bauhaus
|
3 |
Author: BraveNewCode Inc.
|
4 |
Description: Clean, modern, functional design. Great for all types of WordPress sites.
|
5 |
+
Version: 1.6.8
|
6 |
Depends on: 4.0
|
7 |
Framework: 2.0
|
8 |
Tags: smartphone
|
23 |
|
24 |
== Changelog ==
|
25 |
|
26 |
+
= Version 1.6.8 =
|
27 |
+
|
28 |
+
* Changed: Custom field-based thumbnails are now displayed in post listings, related posts, featured slider, and at top of posts.
|
29 |
+
* Changed: Featured image display settings now applied to AMP formatted posts also
|
30 |
+
* Changed: Featured slider no longer shows zero comment count
|
31 |
+
* Added: For sites that redirect mobile visitors to a landing page other than their latest posts page, added option to select on which page the featured slider is shown.
|
32 |
+
|
33 |
= Version 1.6.7 =
|
34 |
|
35 |
* Fixed: Long (non-word-wrappable) text is word-broken to fit on screen
|
themes/bauhaus/root-functions.php
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
<?php
|
2 |
|
3 |
-
define( 'BAUHAUS_THEME_VERSION', '1.6.
|
4 |
define( 'BAUHAUS_SETTING_DOMAIN', 'bauhaus' );
|
5 |
define( 'BAUHAUS_DIR', wptouch_get_bloginfo( 'theme_root_directory' ) );
|
6 |
define( 'BAUHAUS_URL', wptouch_get_bloginfo( 'theme_parent_url' ) );
|
@@ -14,6 +14,7 @@ add_action( 'customize_controls_enqueue_scripts', 'bauhaus_enqueue_customizer_sc
|
|
14 |
add_filter( 'wptouch_registered_setting_domains', 'bauhaus_setting_domain' );
|
15 |
add_filter( 'wptouch_setting_defaults_bauhaus', 'bauhaus_setting_defaults' );
|
16 |
add_filter( 'wptouch_setting_defaults_foundation', 'bauhaus_foundation_setting_defaults' );
|
|
|
17 |
|
18 |
add_filter( 'wptouch_body_classes', 'bauhaus_body_classes' );
|
19 |
add_filter( 'wptouch_post_classes', 'bauhaus_post_classes' );
|
@@ -26,6 +27,7 @@ add_filter( 'wptouch_post_footer', 'bauhaus_footer_version' );
|
|
26 |
add_filter( 'wptouch_has_post_thumbnail', 'bauhaus_handle_has_thumbnail' );
|
27 |
add_filter( 'wptouch_the_post_thumbnail', 'bauhaus_handle_the_thumbnail' );
|
28 |
add_filter( 'wptouch_get_post_thumbnail', 'bauhaus_handle_get_thumbnail' );
|
|
|
29 |
add_filter( 'wptouch_setting_version_compare', 'bauhaus_setting_version_compare', 10, 2 );
|
30 |
|
31 |
add_filter( 'foundation_featured_use_swipe', '__return_false' );
|
@@ -76,6 +78,8 @@ function bauhaus_setting_defaults( $settings ) {
|
|
76 |
$settings->bauhaus_thumbnail_type = 'featured';
|
77 |
$settings->bauhaus_thumbnail_custom_field = '';
|
78 |
|
|
|
|
|
79 |
return $settings;
|
80 |
}
|
81 |
|
@@ -408,6 +412,27 @@ function bauhaus_handle_get_thumbnail( $current_thumbnail ) {
|
|
408 |
return $current_thumbnail;
|
409 |
}
|
410 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
411 |
function bauhaus_if_infinite_scroll_enabled(){
|
412 |
$settings = bauhaus_get_settings();
|
413 |
|
@@ -452,4 +477,35 @@ add_filter( 'wptouch_amp_show_taxonomy', 'bauhaus_amp_show_taxonomy' );
|
|
452 |
function bauhaus_amp_show_taxonomy() {
|
453 |
$settings = bauhaus_get_settings();
|
454 |
return $settings->bauhaus_show_taxonomy;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
455 |
}
|
1 |
<?php
|
2 |
|
3 |
+
define( 'BAUHAUS_THEME_VERSION', '1.6.8' );
|
4 |
define( 'BAUHAUS_SETTING_DOMAIN', 'bauhaus' );
|
5 |
define( 'BAUHAUS_DIR', wptouch_get_bloginfo( 'theme_root_directory' ) );
|
6 |
define( 'BAUHAUS_URL', wptouch_get_bloginfo( 'theme_parent_url' ) );
|
14 |
add_filter( 'wptouch_registered_setting_domains', 'bauhaus_setting_domain' );
|
15 |
add_filter( 'wptouch_setting_defaults_bauhaus', 'bauhaus_setting_defaults' );
|
16 |
add_filter( 'wptouch_setting_defaults_foundation', 'bauhaus_foundation_setting_defaults' );
|
17 |
+
add_filter( 'wptouch_featured_slider_settings', 'bauhaus_featured_slider_settings' );
|
18 |
|
19 |
add_filter( 'wptouch_body_classes', 'bauhaus_body_classes' );
|
20 |
add_filter( 'wptouch_post_classes', 'bauhaus_post_classes' );
|
27 |
add_filter( 'wptouch_has_post_thumbnail', 'bauhaus_handle_has_thumbnail' );
|
28 |
add_filter( 'wptouch_the_post_thumbnail', 'bauhaus_handle_the_thumbnail' );
|
29 |
add_filter( 'wptouch_get_post_thumbnail', 'bauhaus_handle_get_thumbnail' );
|
30 |
+
add_filter( 'post_thumbnail_html', 'bauhaus_handle_thumbnail_html', 10, 5 );
|
31 |
add_filter( 'wptouch_setting_version_compare', 'bauhaus_setting_version_compare', 10, 2 );
|
32 |
|
33 |
add_filter( 'foundation_featured_use_swipe', '__return_false' );
|
78 |
$settings->bauhaus_thumbnail_type = 'featured';
|
79 |
$settings->bauhaus_thumbnail_custom_field = '';
|
80 |
|
81 |
+
$settings->featured_slider_page = false;
|
82 |
+
|
83 |
return $settings;
|
84 |
}
|
85 |
|
412 |
return $current_thumbnail;
|
413 |
}
|
414 |
|
415 |
+
function bauhaus_handle_thumbnail_html( $html, $post_id, $post_thumbnail_id, $size, $attr ) {
|
416 |
+
$settings = bauhaus_get_settings();
|
417 |
+
|
418 |
+
if ( $settings->bauhaus_thumbnail_type == 'custom_field' ) {
|
419 |
+
if ( $settings->bauhaus_thumbnail_custom_field ) {
|
420 |
+
global $post;
|
421 |
+
|
422 |
+
$possible_image = get_post_meta( $post->ID, $settings->bauhaus_thumbnail_custom_field, true );
|
423 |
+
|
424 |
+
$classes = '';
|
425 |
+
if ( strlen( $possible_image ) > 0 ) {
|
426 |
+
if ( isset( $attr[ 'class' ] ) ) { $classes = 'class="' . $attr[ 'class' ] . '"'; }
|
427 |
+
|
428 |
+
return '<img src="' . $possible_image . '" ' . $classes . '>';
|
429 |
+
}
|
430 |
+
}
|
431 |
+
}
|
432 |
+
|
433 |
+
return $html;
|
434 |
+
}
|
435 |
+
|
436 |
function bauhaus_if_infinite_scroll_enabled(){
|
437 |
$settings = bauhaus_get_settings();
|
438 |
|
477 |
function bauhaus_amp_show_taxonomy() {
|
478 |
$settings = bauhaus_get_settings();
|
479 |
return $settings->bauhaus_show_taxonomy;
|
480 |
+
}
|
481 |
+
|
482 |
+
function bauhaus_get_page_list() {
|
483 |
+
$contents = get_pages();
|
484 |
+
$pages = array( 'Select…' );
|
485 |
+
foreach ( $contents as $page ) {
|
486 |
+
$pages[ $page->ID ] = $page->post_title;
|
487 |
+
}
|
488 |
+
return $pages;
|
489 |
+
}
|
490 |
+
|
491 |
+
function bauhaus_allow_featured_slider_override() {
|
492 |
+
$settings = wptouch_get_settings();
|
493 |
+
$foundation_settings = foundation_get_settings();
|
494 |
+
return $settings->homepage_landing != 'none' && $settings->homepage_landing != $foundation_settings->latest_posts_page;
|
495 |
+
}
|
496 |
+
|
497 |
+
function bauhaus_featured_slider_settings( $featured_slider_settings ) {
|
498 |
+
if ( bauhaus_allow_featured_slider_override() ) {
|
499 |
+
$featured_slider_settings[] = wptouch_add_pro_setting(
|
500 |
+
'list',
|
501 |
+
'featured_slider_page',
|
502 |
+
__( 'Featured Slider Page', 'wptouch-pro' ),
|
503 |
+
__( 'Choose which page should display the featured slider', 'wptouch-pro' ),
|
504 |
+
WPTOUCH_SETTING_BASIC,
|
505 |
+
'4.1.15',
|
506 |
+
bauhaus_get_page_list()
|
507 |
+
);
|
508 |
+
}
|
509 |
+
|
510 |
+
return $featured_slider_settings;
|
511 |
}
|
themes/foundation/modules/featured/featured.php
CHANGED
@@ -44,7 +44,7 @@ function foundation_featured_init() {
|
|
44 |
|
45 |
function foundation_featured_setup() {
|
46 |
$settings = foundation_get_settings();
|
47 |
-
if ( !is_admin() && $settings->featured_enabled ) {
|
48 |
if ( function_exists( 'add_theme_support' ) ) {
|
49 |
add_theme_support( 'post-thumbnails' );
|
50 |
add_image_size( 'foundation-featured-image', 900, 9999, false );
|
@@ -55,6 +55,7 @@ function foundation_featured_setup() {
|
|
55 |
$args = foundation_featured_get_args();
|
56 |
|
57 |
$slides = foundation_featured_get_slides();
|
|
|
58 |
$slide_count = 0;
|
59 |
if ( $slides->post_count > 0 ) {
|
60 |
while ( $slides->have_posts() ) {//} && $slide_count < $args[ 'num' ] ) {
|
@@ -66,6 +67,7 @@ function foundation_featured_setup() {
|
|
66 |
}
|
67 |
}
|
68 |
}
|
|
|
69 |
add_filter( 'parse_query', 'foundation_featured_modify_query' );
|
70 |
}
|
71 |
}
|
@@ -77,20 +79,20 @@ function foundation_featured_config( $args ) {
|
|
77 |
}
|
78 |
|
79 |
function foundation_featured_modify_query( $query ) {
|
80 |
-
if ( $query->is_main_query()
|
81 |
$settings = foundation_get_settings();
|
82 |
|
83 |
if ( $settings->featured_filter_posts ) {
|
84 |
return;
|
85 |
}
|
86 |
|
87 |
-
$
|
88 |
'foundation_featured_should_modify_query',
|
89 |
-
$query->is_single || $query->is_page || $query->is_feed || $query->is_search || $query->is_archive || $query->is_category,
|
90 |
$query
|
91 |
);
|
92 |
|
93 |
-
if ( $
|
94 |
return;
|
95 |
}
|
96 |
|
@@ -216,7 +218,7 @@ function featured_should_show_slider() {
|
|
216 |
$settings = foundation_get_settings();
|
217 |
$should_show = ( ( is_home() || is_front_page() ) && $settings->featured_enabled );
|
218 |
|
219 |
-
return apply_filters( 'foundation_featured_show', $should_show );
|
220 |
}
|
221 |
|
222 |
function foundation_featured_get_slider_classes() {
|
@@ -481,7 +483,7 @@ function foundation_featured_settings( $page_options ) {
|
|
481 |
)
|
482 |
),
|
483 |
$featured_enhanced_setting,
|
484 |
-
$featured_settings
|
485 |
),
|
486 |
$page_options,
|
487 |
FOUNDATION_SETTING_DOMAIN,
|
44 |
|
45 |
function foundation_featured_setup() {
|
46 |
$settings = foundation_get_settings();
|
47 |
+
if ( wptouch_is_showing_mobile_theme_on_mobile_device() && !is_admin() && $settings->featured_enabled ) {
|
48 |
if ( function_exists( 'add_theme_support' ) ) {
|
49 |
add_theme_support( 'post-thumbnails' );
|
50 |
add_image_size( 'foundation-featured-image', 900, 9999, false );
|
55 |
$args = foundation_featured_get_args();
|
56 |
|
57 |
$slides = foundation_featured_get_slides();
|
58 |
+
|
59 |
$slide_count = 0;
|
60 |
if ( $slides->post_count > 0 ) {
|
61 |
while ( $slides->have_posts() ) {//} && $slide_count < $args[ 'num' ] ) {
|
67 |
}
|
68 |
}
|
69 |
}
|
70 |
+
|
71 |
add_filter( 'parse_query', 'foundation_featured_modify_query' );
|
72 |
}
|
73 |
}
|
79 |
}
|
80 |
|
81 |
function foundation_featured_modify_query( $query ) {
|
82 |
+
if ( $query->is_main_query() ) {
|
83 |
$settings = foundation_get_settings();
|
84 |
|
85 |
if ( $settings->featured_filter_posts ) {
|
86 |
return;
|
87 |
}
|
88 |
|
89 |
+
$should_modify_query = apply_filters(
|
90 |
'foundation_featured_should_modify_query',
|
91 |
+
( $query->is_single || $query->is_page || $query->is_feed || $query->is_search || $query->is_archive || $query->is_category ) == false,
|
92 |
$query
|
93 |
);
|
94 |
|
95 |
+
if ( $should_modify_query === false ) {
|
96 |
return;
|
97 |
}
|
98 |
|
218 |
$settings = foundation_get_settings();
|
219 |
$should_show = ( ( is_home() || is_front_page() ) && $settings->featured_enabled );
|
220 |
|
221 |
+
return apply_filters( 'foundation_featured_show', $should_show, $settings->featured_enabled );
|
222 |
}
|
223 |
|
224 |
function foundation_featured_get_slider_classes() {
|
483 |
)
|
484 |
),
|
485 |
$featured_enhanced_setting,
|
486 |
+
apply_filters( 'wptouch_featured_slider_settings', $featured_settings )
|
487 |
),
|
488 |
$page_options,
|
489 |
FOUNDATION_SETTING_DOMAIN,
|
themes/foundation/modules/featured/wptouch-owl.js
CHANGED
@@ -5,7 +5,7 @@ function doOwlFeatured() {
|
|
5 |
var autoplay = jQuery( '#slider' ).hasClass( 'slide' );
|
6 |
var loop = jQuery( '#slider' ).hasClass( 'continuous' );
|
7 |
|
8 |
-
if (
|
9 |
if ( jQuery( '#slider' ).hasClass( 'slow' ) ) {
|
10 |
var autoplayTimeout = 7000;
|
11 |
} else if ( jQuery( '#slider').hasClass( 'fast' ) ) {
|
5 |
var autoplay = jQuery( '#slider' ).hasClass( 'slide' );
|
6 |
var loop = jQuery( '#slider' ).hasClass( 'continuous' );
|
7 |
|
8 |
+
if ( autoplay ) {
|
9 |
if ( jQuery( '#slider' ).hasClass( 'slow' ) ) {
|
10 |
var autoplayTimeout = 7000;
|
11 |
} else if ( jQuery( '#slider').hasClass( 'fast' ) ) {
|
themes/foundation/modules/menu/menu.js
CHANGED
@@ -1,19 +1,33 @@
|
|
|
|
|
|
1 |
|
2 |
-
|
3 |
-
|
4 |
-
menuContainer = jQuery( menuContainer );
|
5 |
|
6 |
menuContainer.find( 'li.menu-item ul' ).each( function() {
|
7 |
-
if (
|
8 |
jQuery( this ).remove();
|
9 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10 |
});
|
11 |
|
12 |
menuContainer.find( 'li.menu-item' ).has( 'ul' ).addClass( 'has_children' ).prepend( '<span></span>' );
|
13 |
|
14 |
jQuery( 'ul li.has_children span', menuContainer ).on( 'click', function( e ) {
|
15 |
jQuery( this ).toggleClass( 'toggle' ).parent().toggleClass( 'open-tree' );
|
16 |
-
jQuery( this ).parent().find( 'ul' ).first().
|
17 |
e.preventDefault();
|
18 |
e.stopPropagation();
|
19 |
});
|
@@ -30,6 +44,10 @@ function wptouchFdnSetupMenu( menuContainer ) {
|
|
30 |
});
|
31 |
});
|
32 |
}
|
|
|
|
|
|
|
|
|
33 |
}
|
34 |
|
35 |
// Setup show/hide menus
|
@@ -37,7 +55,7 @@ function wptouchFdnSetupAllMenus() {
|
|
37 |
jQuery( '.show-hide-menu, .slide-menu' ).each( function() {
|
38 |
var menuId = jQuery( this ).prop( 'id' );
|
39 |
if ( menuId ) {
|
40 |
-
wptouchFdnSetupMenu(
|
41 |
}
|
42 |
});
|
43 |
}
|
1 |
+
function wptouchFdnSetupMenu( menuId ) {
|
2 |
+
menuContainer = jQuery( '#' + menuId );
|
3 |
|
4 |
+
var active_submenu = false;
|
|
|
|
|
5 |
|
6 |
menuContainer.find( 'li.menu-item ul' ).each( function() {
|
7 |
+
if ( jQuery( this ).children().length === 0 ) {
|
8 |
jQuery( this ).remove();
|
9 |
}
|
10 |
+
|
11 |
+
activeChildren = jQuery( this ).children( '.current-menu-item' );
|
12 |
+
if ( activeChildren.length > 0 ) {
|
13 |
+
active_submenu = jQuery( this );
|
14 |
+
}
|
15 |
+
});
|
16 |
+
|
17 |
+
jQuery( '.menu-item > a[href*="#"]', menuContainer ).on( 'click', function( e ) {
|
18 |
+
target = jQuery ( this ).attr( 'href' );
|
19 |
+
if ( target.length > 1 ) {
|
20 |
+
// e.preventDefault();
|
21 |
+
triggerButton = jQuery( '[data-effect-target="' + menuId + '"]');
|
22 |
+
triggerButton.trigger( 'click' );
|
23 |
+
}
|
24 |
});
|
25 |
|
26 |
menuContainer.find( 'li.menu-item' ).has( 'ul' ).addClass( 'has_children' ).prepend( '<span></span>' );
|
27 |
|
28 |
jQuery( 'ul li.has_children span', menuContainer ).on( 'click', function( e ) {
|
29 |
jQuery( this ).toggleClass( 'toggle' ).parent().toggleClass( 'open-tree' );
|
30 |
+
jQuery( this ).parent().find( 'ul' ).first().toggle();
|
31 |
e.preventDefault();
|
32 |
e.stopPropagation();
|
33 |
});
|
44 |
});
|
45 |
});
|
46 |
}
|
47 |
+
|
48 |
+
if ( active_submenu ) {
|
49 |
+
active_submenu.siblings( 'span' ).first().trigger( 'click' );
|
50 |
+
}
|
51 |
}
|
52 |
|
53 |
// Setup show/hide menus
|
55 |
jQuery( '.show-hide-menu, .slide-menu' ).each( function() {
|
56 |
var menuId = jQuery( this ).prop( 'id' );
|
57 |
if ( menuId ) {
|
58 |
+
wptouchFdnSetupMenu( menuId );
|
59 |
}
|
60 |
});
|
61 |
}
|
themes/foundation/modules/owlcarousel/LICENSE
DELETED
@@ -1,23 +0,0 @@
|
|
1 |
-
Copyright (c) 2014 Owl
|
2 |
-
Modified work Copyright 2016 David Deutsch
|
3 |
-
|
4 |
-
Permission is hereby granted, free of charge, to any person
|
5 |
-
obtaining a copy of this software and associated documentation
|
6 |
-
files (the "Software"), to deal in the Software without
|
7 |
-
restriction, including without limitation the rights to use,
|
8 |
-
copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9 |
-
copies of the Software, and to permit persons to whom the
|
10 |
-
Software is furnished to do so, subject to the following
|
11 |
-
conditions:
|
12 |
-
|
13 |
-
The above copyright notice and this permission notice shall be
|
14 |
-
included in all copies or substantial portions of the Software.
|
15 |
-
|
16 |
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17 |
-
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
18 |
-
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19 |
-
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
20 |
-
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
21 |
-
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
22 |
-
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
23 |
-
OTHER DEALINGS IN THE SOFTWARE.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
themes/foundation/modules/owlcarousel/README.md
DELETED
@@ -1,73 +0,0 @@
|
|
1 |
-
# OwlCarousel2 is currently being transferred to a new owner
|
2 |
-
|
3 |
-
Stay tuned while the new owner sorts through some stuff. (Oh, hi, I'm [David](https://github.com/daviddeutsch)!)
|
4 |
-
|
5 |
-
## Owl Carousel 2 Beta
|
6 |
-
|
7 |
-
Touch enabled [jQuery](https://jquery.com/) plugin that lets you create a beautiful, responsive carousel slider. **To get started, check out https://owlcarousel2.github.io/OwlCarousel2/.**
|
8 |
-
|
9 |
-
Please consider that the project is still in beta. The current status of the milestones can be found [here](https://github.com/owlcarousel2/OwlCarousel2/milestones). If you want to use the [latest development](https://github.com/owlcarousel2/OwlCarousel2/archive/develop.zip) see [building](#building).
|
10 |
-
|
11 |
-
## Quick start
|
12 |
-
|
13 |
-
Download the [latest release](https://owlcarousel2.github.io/OwlCarousel2/download/owl.carousel.2.1.0.zip) and put the required stylesheet at the [top](https://developer.yahoo.com/performance/rules.html#css_top) of your markup:
|
14 |
-
|
15 |
-
```html
|
16 |
-
<link rel="stylesheet" href="owlcarousel/owl.carousel.min.css" />
|
17 |
-
```
|
18 |
-
**NOTE:** If you want to use the default navigation styles, you will also need to include `owl.theme.default.css`.
|
19 |
-
|
20 |
-
|
21 |
-
Put the script at the [bottom](https://developer.yahoo.com/performance/rules.html#js_bottom) of your markup right after jQuery:
|
22 |
-
|
23 |
-
```html
|
24 |
-
<script src="jquery.min.js"></script>
|
25 |
-
<script src="owlcarousel/owl.carousel.min.js"></script>
|
26 |
-
```
|
27 |
-
|
28 |
-
Wrap your items (`div`, `a`, `img`, `span`, `li` etc.) with a container element (`div`, `ul` etc.). Only the class `owl-carousel` is mandatory to apply proper styles:
|
29 |
-
|
30 |
-
```html
|
31 |
-
<div class="owl-carousel owl-theme">
|
32 |
-
<div> Your Content </div>
|
33 |
-
<div> Your Content </div>
|
34 |
-
<div> Your Content </div>
|
35 |
-
<div> Your Content </div>
|
36 |
-
<div> Your Content </div>
|
37 |
-
<div> Your Content </div>
|
38 |
-
<div> Your Content </div>
|
39 |
-
</div>
|
40 |
-
```
|
41 |
-
**NOTE:** The `owl-theme` class is optional, but without it, you will need to style navigation features on your own.
|
42 |
-
|
43 |
-
|
44 |
-
Call the [plugin](https://learn.jquery.com/plugins/) function and your carousel is ready.
|
45 |
-
|
46 |
-
```javascript
|
47 |
-
$(document).ready(function(){
|
48 |
-
$('.owl-carousel').owlCarousel();
|
49 |
-
});
|
50 |
-
```
|
51 |
-
|
52 |
-
## Documentation
|
53 |
-
|
54 |
-
The documentation, included in this repo in the root directory, is built with [Assemble](http://assemble.io/) and publicly available at https://owlcarousel2.github.io/OwlCarousel2/. The documentation may also be run locally.
|
55 |
-
|
56 |
-
## Building
|
57 |
-
|
58 |
-
This package comes with [Grunt](http://gruntjs.com/) and [Bower](http://bower.io/). The following tasks are available:
|
59 |
-
|
60 |
-
* `default` compiles the CSS and JS into `/dist` and builds the doc.
|
61 |
-
* `dist` compiles the CSS and JS into `/dist` only.
|
62 |
-
* `watch` watches source files and builds them automatically whenever you save.
|
63 |
-
* `test` runs [JSHint](http://www.jshint.com/) and [QUnit](http://qunitjs.com/) tests headlessly in [PhantomJS](http://phantomjs.org/).
|
64 |
-
|
65 |
-
To define which plugins are build into the distribution just edit `/_config.json` to fit your needs.
|
66 |
-
|
67 |
-
## Contributing
|
68 |
-
|
69 |
-
Please read [CONTRIBUTING.md](CONTRIBUTING.md).
|
70 |
-
|
71 |
-
## License
|
72 |
-
|
73 |
-
The code and the documentation are released under the [MIT License](LICENSE).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
themes/foundation/modules/owlcarousel/assets/ajax-loader.gif
DELETED
Binary file
|
themes/foundation/modules/owlcarousel/assets/owl.carousel.css
DELETED
@@ -1,173 +0,0 @@
|
|
1 |
-
/**
|
2 |
-
* Owl Carousel v2.1.1
|
3 |
-
* Copyright 2013-2016 David Deutsch
|
4 |
-
* Licensed under MIT (https://github.com/OwlCarousel2/OwlCarousel2/blob/master/LICENSE)
|
5 |
-
*/
|
6 |
-
/*
|
7 |
-
* Owl Carousel - Core
|
8 |
-
*/
|
9 |
-
.owl-carousel {
|
10 |
-
display: none;
|
11 |
-
width: 100%;
|
12 |
-
-webkit-tap-highlight-color: transparent;
|
13 |
-
/* position relative and z-index fix webkit rendering fonts issue */
|
14 |
-
position: relative;
|
15 |
-
z-index: 1; }
|
16 |
-
.owl-carousel .owl-stage {
|
17 |
-
position: relative;
|
18 |
-
-ms-touch-action: pan-Y; }
|
19 |
-
.owl-carousel .owl-stage:after {
|
20 |
-
content: ".";
|
21 |
-
display: block;
|
22 |
-
clear: both;
|
23 |
-
visibility: hidden;
|
24 |
-
line-height: 0;
|
25 |
-
height: 0; }
|
26 |
-
.owl-carousel .owl-stage-outer {
|
27 |
-
position: relative;
|
28 |
-
overflow: hidden;
|
29 |
-
/* fix for flashing background */
|
30 |
-
-webkit-transform: translate3d(0px, 0px, 0px); }
|
31 |
-
.owl-carousel .owl-item {
|
32 |
-
position: relative;
|
33 |
-
min-height: 1px;
|
34 |
-
float: left;
|
35 |
-
-webkit-backface-visibility: hidden;
|
36 |
-
-webkit-tap-highlight-color: transparent;
|
37 |
-
-webkit-touch-callout: none; }
|
38 |
-
.owl-carousel .owl-item img {
|
39 |
-
display: block;
|
40 |
-
width: 100%;
|
41 |
-
-webkit-transform-style: preserve-3d; }
|
42 |
-
.owl-carousel .owl-nav.disabled,
|
43 |
-
.owl-carousel .owl-dots.disabled {
|
44 |
-
display: none; }
|
45 |
-
.owl-carousel .owl-nav .owl-prev,
|
46 |
-
.owl-carousel .owl-nav .owl-next,
|
47 |
-
.owl-carousel .owl-dot {
|
48 |
-
cursor: pointer;
|
49 |
-
cursor: hand;
|
50 |
-
-webkit-user-select: none;
|
51 |
-
-khtml-user-select: none;
|
52 |
-
-moz-user-select: none;
|
53 |
-
-ms-user-select: none;
|
54 |
-
user-select: none; }
|
55 |
-
.owl-carousel.owl-loaded {
|
56 |
-
display: block; }
|
57 |
-
.owl-carousel.owl-loading {
|
58 |
-
opacity: 0;
|
59 |
-
display: block; }
|
60 |
-
.owl-carousel.owl-hidden {
|
61 |
-
opacity: 0; }
|
62 |
-
.owl-carousel.owl-refresh .owl-item {
|
63 |
-
display: none; }
|
64 |
-
.owl-carousel.owl-drag .owl-item {
|
65 |
-
-webkit-user-select: none;
|
66 |
-
-moz-user-select: none;
|
67 |
-
-ms-user-select: none;
|
68 |
-
user-select: none; }
|
69 |
-
.owl-carousel.owl-grab {
|
70 |
-
cursor: move;
|
71 |
-
cursor: grab; }
|
72 |
-
.owl-carousel.owl-rtl {
|
73 |
-
direction: rtl; }
|
74 |
-
.owl-carousel.owl-rtl .owl-item {
|
75 |
-
float: right; }
|
76 |
-
|
77 |
-
/* No Js */
|
78 |
-
.no-js .owl-carousel {
|
79 |
-
display: block; }
|
80 |
-
|
81 |
-
/*
|
82 |
-
* Owl Carousel - Animate Plugin
|
83 |
-
*/
|
84 |
-
.owl-carousel .animated {
|
85 |
-
-webkit-animation-duration: 1000ms;
|
86 |
-
animation-duration: 1000ms;
|
87 |
-
-webkit-animation-fill-mode: both;
|
88 |
-
animation-fill-mode: both; }
|
89 |
-
|
90 |
-
.owl-carousel .owl-animated-in {
|
91 |
-
z-index: 0; }
|
92 |
-
|
93 |
-
.owl-carousel .owl-animated-out {
|
94 |
-
z-index: 1; }
|
95 |
-
|
96 |
-
.owl-carousel .fadeOut {
|
97 |
-
-webkit-animation-name: fadeOut;
|
98 |
-
animation-name: fadeOut; }
|
99 |
-
|
100 |
-
@-webkit-keyframes fadeOut {
|
101 |
-
0% {
|
102 |
-
opacity: 1; }
|
103 |
-
100% {
|
104 |
-
opacity: 0; } }
|
105 |
-
|
106 |
-
@keyframes fadeOut {
|
107 |
-
0% {
|
108 |
-
opacity: 1; }
|
109 |
-
100% {
|
110 |
-
opacity: 0; } }
|
111 |
-
|
112 |
-
/*
|
113 |
-
* Owl Carousel - Auto Height Plugin
|
114 |
-
*/
|
115 |
-
.owl-height {
|
116 |
-
transition: height 500ms ease-in-out; }
|
117 |
-
|
118 |
-
/*
|
119 |
-
* Owl Carousel - Lazy Load Plugin
|
120 |
-
*/
|
121 |
-
.owl-carousel .owl-item .owl-lazy {
|
122 |
-
opacity: 0;
|
123 |
-
transition: opacity 400ms ease; }
|
124 |
-
|
125 |
-
.owl-carousel .owl-item img.owl-lazy {
|
126 |
-
-webkit-transform-style: preserve-3d;
|
127 |
-
transform-style: preserve-3d; }
|
128 |
-
|
129 |
-
/*
|
130 |
-
* Owl Carousel - Video Plugin
|
131 |
-
*/
|
132 |
-
.owl-carousel .owl-video-wrapper {
|
133 |
-
position: relative;
|
134 |
-
height: 100%;
|
135 |
-
background: #000; }
|
136 |
-
|
137 |
-
.owl-carousel .owl-video-play-icon {
|
138 |
-
position: absolute;
|
139 |
-
height: 80px;
|
140 |
-
width: 80px;
|
141 |
-
left: 50%;
|
142 |
-
top: 50%;
|
143 |
-
margin-left: -40px;
|
144 |
-
margin-top: -40px;
|
145 |
-
background: url("owl.video.play.png") no-repeat;
|
146 |
-
cursor: pointer;
|
147 |
-
z-index: 1;
|
148 |
-
-webkit-backface-visibility: hidden;
|
149 |
-
transition: -webkit-transform 100ms ease;
|
150 |
-
transition: transform 100ms ease; }
|
151 |
-
|
152 |
-
.owl-carousel .owl-video-play-icon:hover {
|
153 |
-
-webkit-transform: scale(1.3, 1.3);
|
154 |
-
-ms-transform: scale(1.3, 1.3);
|
155 |
-
transform: scale(1.3, 1.3); }
|
156 |
-
|
157 |
-
.owl-carousel .owl-video-playing .owl-video-tn,
|
158 |
-
.owl-carousel .owl-video-playing .owl-video-play-icon {
|
159 |
-
display: none; }
|
160 |
-
|
161 |
-
.owl-carousel .owl-video-tn {
|
162 |
-
opacity: 0;
|
163 |
-
height: 100%;
|
164 |
-
background-position: center center;
|
165 |
-
background-repeat: no-repeat;
|
166 |
-
background-size: contain;
|
167 |
-
transition: opacity 400ms ease; }
|
168 |
-
|
169 |
-
.owl-carousel .owl-video-frame {
|
170 |
-
position: relative;
|
171 |
-
z-index: 1;
|
172 |
-
height: 100%;
|
173 |
-
width: 100%; }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
themes/foundation/modules/owlcarousel/assets/owl.carousel.min.css
DELETED
@@ -1,6 +0,0 @@
|
|
1 |
-
/**
|
2 |
-
* Owl Carousel v2.1.1
|
3 |
-
* Copyright 2013-2016 David Deutsch
|
4 |
-
* Licensed under MIT (https://github.com/OwlCarousel2/OwlCarousel2/blob/master/LICENSE)
|
5 |
-
*/
|
6 |
-
.owl-carousel,.owl-carousel .owl-item{-webkit-tap-highlight-color:transparent;position:relative}.owl-carousel{display:none;width:100%;z-index:1}.owl-carousel .owl-stage{position:relative;-ms-touch-action:pan-Y}.owl-carousel .owl-stage:after{content:".";display:block;clear:both;visibility:hidden;line-height:0;height:0}.owl-carousel .owl-stage-outer{position:relative;overflow:hidden;-webkit-transform:translate3d(0,0,0)}.owl-carousel .owl-item{min-height:1px;float:left;-webkit-backface-visibility:hidden;-webkit-touch-callout:none}.owl-carousel .owl-item img{display:block;width:100%;-webkit-transform-style:preserve-3d}.owl-carousel .owl-dots.disabled,.owl-carousel .owl-nav.disabled{display:none}.owl-carousel .owl-dot,.owl-carousel .owl-nav .owl-next,.owl-carousel .owl-nav .owl-prev{cursor:pointer;cursor:hand;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.owl-carousel.owl-loaded{display:block}.owl-carousel.owl-loading{opacity:0;display:block}.owl-carousel.owl-hidden{opacity:0}.owl-carousel.owl-refresh .owl-item{display:none}.owl-carousel.owl-drag .owl-item{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.owl-carousel.owl-grab{cursor:move;cursor:grab}.owl-carousel.owl-rtl{direction:rtl}.owl-carousel.owl-rtl .owl-item{float:right}.no-js .owl-carousel{display:block}.owl-carousel .animated{-webkit-animation-duration:1s;animation-duration:1s;-webkit-animation-fill-mode:both;animation-fill-mode:both}.owl-carousel .owl-animated-in{z-index:0}.owl-carousel .owl-animated-out{z-index:1}.owl-carousel .fadeOut{-webkit-animation-name:fadeOut;animation-name:fadeOut}@-webkit-keyframes fadeOut{0%{opacity:1}100%{opacity:0}}@keyframes fadeOut{0%{opacity:1}100%{opacity:0}}.owl-height{transition:height .5s ease-in-out}.owl-carousel .owl-item .owl-lazy{opacity:0;transition:opacity .4s ease}.owl-carousel .owl-item img.owl-lazy{-webkit-transform-style:preserve-3d;transform-style:preserve-3d}.owl-carousel .owl-video-wrapper{position:relative;height:100%;background:#000}.owl-carousel .owl-video-play-icon{position:absolute;height:80px;width:80px;left:50%;top:50%;margin-left:-40px;margin-top:-40px;background:url(owl.video.play.png) no-repeat;cursor:pointer;z-index:1;-webkit-backface-visibility:hidden;transition:-webkit-transform .1s ease;transition:transform .1s ease}.owl-carousel .owl-video-play-icon:hover{-webkit-transform:scale(1.3,1.3);-ms-transform:scale(1.3,1.3);transform:scale(1.3,1.3)}.owl-carousel .owl-video-playing .owl-video-play-icon,.owl-carousel .owl-video-playing .owl-video-tn{display:none}.owl-carousel .owl-video-tn{opacity:0;height:100%;background-position:center center;background-repeat:no-repeat;background-size:contain;transition:opacity .4s ease}.owl-carousel .owl-video-frame{position:relative;z-index:1;height:100%;width:100%}
|
|
|
|
|
|
|
|
|
|
|
|
themes/foundation/modules/owlcarousel/assets/owl.theme.default.min.css
DELETED
@@ -1,5 +0,0 @@
|
|
1 |
-
/**
|
2 |
-
* Owl Carousel v2.1.1
|
3 |
-
* Copyright 2013-2016 David Deutsch
|
4 |
-
* Licensed under MIT (https://github.com/OwlCarousel2/OwlCarousel2/blob/master/LICENSE)
|
5 |
-
*/
|
|
|
|
|
|
|
|
|
|
themes/foundation/modules/owlcarousel/assets/owl.theme.green.min.css
DELETED
@@ -1,5 +0,0 @@
|
|
1 |
-
/**
|
2 |
-
* Owl Carousel v2.1.1
|
3 |
-
* Copyright 2013-2016 David Deutsch
|
4 |
-
* Licensed under MIT (https://github.com/OwlCarousel2/OwlCarousel2/blob/master/LICENSE)
|
5 |
-
*/
|
|
|
|
|
|
|
|
|
|
themes/foundation/modules/owlcarousel/assets/owl.video.play.png
DELETED
Binary file
|
themes/foundation/modules/owlcarousel/owl.carousel.css
ADDED
@@ -0,0 +1,216 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*
|
2 |
+
* Owl Carousel - Animate Plugin
|
3 |
+
*/
|
4 |
+
.owl-carousel .animated {
|
5 |
+
-webkit-animation-duration: 1000ms;
|
6 |
+
animation-duration: 1000ms;
|
7 |
+
-webkit-animation-fill-mode: both;
|
8 |
+
animation-fill-mode: both;
|
9 |
+
}
|
10 |
+
.owl-carousel .owl-animated-in {
|
11 |
+
z-index: 0;
|
12 |
+
}
|
13 |
+
.owl-carousel .owl-animated-out {
|
14 |
+
z-index: 1;
|
15 |
+
}
|
16 |
+
.owl-carousel .fadeOut {
|
17 |
+
-webkit-animation-name: fadeOut;
|
18 |
+
animation-name: fadeOut;
|
19 |
+
}
|
20 |
+
|
21 |
+
@-webkit-keyframes fadeOut {
|
22 |
+
0% {
|
23 |
+
opacity: 1;
|
24 |
+
}
|
25 |
+
|
26 |
+
100% {
|
27 |
+
opacity: 0;
|
28 |
+
}
|
29 |
+
}
|
30 |
+
@keyframes fadeOut {
|
31 |
+
0% {
|
32 |
+
opacity: 1;
|
33 |
+
}
|
34 |
+
|
35 |
+
100% {
|
36 |
+
opacity: 0;
|
37 |
+
}
|
38 |
+
}
|
39 |
+
|
40 |
+
/*
|
41 |
+
* Owl Carousel - Auto Height Plugin
|
42 |
+
*/
|
43 |
+
.owl-height {
|
44 |
+
-webkit-transition: height 500ms ease-in-out;
|
45 |
+
-moz-transition: height 500ms ease-in-out;
|
46 |
+
-ms-transition: height 500ms ease-in-out;
|
47 |
+
-o-transition: height 500ms ease-in-out;
|
48 |
+
transition: height 500ms ease-in-out;
|
49 |
+
}
|
50 |
+
|
51 |
+
/*
|
52 |
+
* Core Owl Carousel CSS File
|
53 |
+
*/
|
54 |
+
.owl-carousel {
|
55 |
+
display: none;
|
56 |
+
width: 100%;
|
57 |
+
-webkit-tap-highlight-color: transparent;
|
58 |
+
/* position relative and z-index fix webkit rendering fonts issue */
|
59 |
+
position: relative;
|
60 |
+
z-index: 1;
|
61 |
+
}
|
62 |
+
.owl-carousel .owl-stage {
|
63 |
+
position: relative;
|
64 |
+
-ms-touch-action: pan-Y;
|
65 |
+
}
|
66 |
+
.owl-carousel .owl-stage:after {
|
67 |
+
content: ".";
|
68 |
+
display: block;
|
69 |
+
clear: both;
|
70 |
+
visibility: hidden;
|
71 |
+
line-height: 0;
|
72 |
+
height: 0;
|
73 |
+
}
|
74 |
+
.owl-carousel .owl-stage-outer {
|
75 |
+
position: relative;
|
76 |
+
overflow: hidden;
|
77 |
+
/* fix for flashing background */
|
78 |
+
-webkit-transform: translate3d(0px, 0px, 0px);
|
79 |
+
}
|
80 |
+
.owl-carousel .owl-controls .owl-nav .owl-prev,
|
81 |
+
.owl-carousel .owl-controls .owl-nav .owl-next,
|
82 |
+
.owl-carousel .owl-controls .owl-dot {
|
83 |
+
cursor: pointer;
|
84 |
+
cursor: hand;
|
85 |
+
-webkit-user-select: none;
|
86 |
+
-khtml-user-select: none;
|
87 |
+
-moz-user-select: none;
|
88 |
+
-ms-user-select: none;
|
89 |
+
user-select: none;
|
90 |
+
}
|
91 |
+
.owl-carousel.owl-loaded {
|
92 |
+
display: block;
|
93 |
+
}
|
94 |
+
.owl-carousel.owl-loading {
|
95 |
+
opacity: 0;
|
96 |
+
display: block;
|
97 |
+
}
|
98 |
+
.owl-carousel.owl-hidden {
|
99 |
+
opacity: 0;
|
100 |
+
}
|
101 |
+
.owl-carousel .owl-refresh .owl-item {
|
102 |
+
display: none;
|
103 |
+
}
|
104 |
+
.owl-carousel .owl-item {
|
105 |
+
position: relative;
|
106 |
+
min-height: 1px;
|
107 |
+
float: left;
|
108 |
+
-webkit-backface-visibility: hidden;
|
109 |
+
-webkit-tap-highlight-color: transparent;
|
110 |
+
-webkit-touch-callout: none;
|
111 |
+
-webkit-user-select: none;
|
112 |
+
-moz-user-select: none;
|
113 |
+
-ms-user-select: none;
|
114 |
+
user-select: none;
|
115 |
+
}
|
116 |
+
.owl-carousel .owl-item img {
|
117 |
+
display: block;
|
118 |
+
width: 100%;
|
119 |
+
-webkit-transform-style: preserve-3d;
|
120 |
+
}
|
121 |
+
.owl-carousel.owl-text-select-on .owl-item {
|
122 |
+
-webkit-user-select: auto;
|
123 |
+
-moz-user-select: auto;
|
124 |
+
-ms-user-select: auto;
|
125 |
+
user-select: auto;
|
126 |
+
}
|
127 |
+
.owl-carousel .owl-grab {
|
128 |
+
cursor: move;
|
129 |
+
cursor: -webkit-grab;
|
130 |
+
cursor: -o-grab;
|
131 |
+
cursor: -ms-grab;
|
132 |
+
cursor: grab;
|
133 |
+
}
|
134 |
+
.owl-carousel.owl-rtl {
|
135 |
+
direction: rtl;
|
136 |
+
}
|
137 |
+
.owl-carousel.owl-rtl .owl-item {
|
138 |
+
float: right;
|
139 |
+
}
|
140 |
+
|
141 |
+
/* No Js */
|
142 |
+
.no-js .owl-carousel {
|
143 |
+
display: block;
|
144 |
+
}
|
145 |
+
|
146 |
+
/*
|
147 |
+
* Owl Carousel - Lazy Load Plugin
|
148 |
+
*/
|
149 |
+
.owl-carousel .owl-item .owl-lazy {
|
150 |
+
opacity: 0;
|
151 |
+
-webkit-transition: opacity 400ms ease;
|
152 |
+
-moz-transition: opacity 400ms ease;
|
153 |
+
-ms-transition: opacity 400ms ease;
|
154 |
+
-o-transition: opacity 400ms ease;
|
155 |
+
transition: opacity 400ms ease;
|
156 |
+
}
|
157 |
+
.owl-carousel .owl-item img {
|
158 |
+
transform-style: preserve-3d;
|
159 |
+
}
|
160 |
+
|
161 |
+
/*
|
162 |
+
* Owl Carousel - Video Plugin
|
163 |
+
*/
|
164 |
+
.owl-carousel .owl-video-wrapper {
|
165 |
+
position: relative;
|
166 |
+
height: 100%;
|
167 |
+
background: #000;
|
168 |
+
}
|
169 |
+
.owl-carousel .owl-video-play-icon {
|
170 |
+
position: absolute;
|
171 |
+
height: 80px;
|
172 |
+
width: 80px;
|
173 |
+
left: 50%;
|
174 |
+
top: 50%;
|
175 |
+
margin-left: -40px;
|
176 |
+
margin-top: -40px;
|
177 |
+
background: url("owl.video.play.png") no-repeat;
|
178 |
+
cursor: pointer;
|
179 |
+
z-index: 1;
|
180 |
+
-webkit-backface-visibility: hidden;
|
181 |
+
-webkit-transition: scale 100ms ease;
|
182 |
+
-moz-transition: scale 100ms ease;
|
183 |
+
-ms-transition: scale 100ms ease;
|
184 |
+
-o-transition: scale 100ms ease;
|
185 |
+
transition: scale 100ms ease;
|
186 |
+
}
|
187 |
+
.owl-carousel .owl-video-play-icon:hover {
|
188 |
+
-webkit-transition: scale(1.3, 1.3);
|
189 |
+
-moz-transition: scale(1.3, 1.3);
|
190 |
+
-ms-transition: scale(1.3, 1.3);
|
191 |
+
-o-transition: scale(1.3, 1.3);
|
192 |
+
transition: scale(1.3, 1.3);
|
193 |
+
}
|
194 |
+
.owl-carousel .owl-video-playing .owl-video-tn,
|
195 |
+
.owl-carousel .owl-video-playing .owl-video-play-icon {
|
196 |
+
display: none;
|
197 |
+
}
|
198 |
+
.owl-carousel .owl-video-tn {
|
199 |
+
opacity: 0;
|
200 |
+
height: 100%;
|
201 |
+
background-position: center center;
|
202 |
+
background-repeat: no-repeat;
|
203 |
+
-webkit-background-size: contain;
|
204 |
+
-moz-background-size: contain;
|
205 |
+
-o-background-size: contain;
|
206 |
+
background-size: contain;
|
207 |
+
-webkit-transition: opacity 400ms ease;
|
208 |
+
-moz-transition: opacity 400ms ease;
|
209 |
+
-ms-transition: opacity 400ms ease;
|
210 |
+
-o-transition: opacity 400ms ease;
|
211 |
+
transition: opacity 400ms ease;
|
212 |
+
}
|
213 |
+
.owl-carousel .owl-video-frame {
|
214 |
+
position: relative;
|
215 |
+
z-index: 1;
|
216 |
+
}
|
themes/foundation/modules/owlcarousel/owl.carousel.js
CHANGED
@@ -1,13 +1,7 @@
|
|
1 |
-
/**
|
2 |
-
* Owl Carousel v2.1.1
|
3 |
-
* Copyright 2013-2016 David Deutsch
|
4 |
-
* Licensed under MIT (https://github.com/OwlCarousel2/OwlCarousel2/blob/master/LICENSE)
|
5 |
-
*/
|
6 |
/**
|
7 |
* Owl carousel
|
8 |
-
* @version 2.
|
9 |
* @author Bartosz Wojciechowski
|
10 |
-
* @author David Deutsch
|
11 |
* @license The MIT License (MIT)
|
12 |
* @todo Lazy Load Icon
|
13 |
* @todo prevent animationend bubling
|
@@ -17,6 +11,55 @@
|
|
17 |
*/
|
18 |
;(function($, window, document, undefined) {
|
19 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
20 |
/**
|
21 |
* Creates a carousel.
|
22 |
* @class The Owl Carousel.
|
@@ -45,10 +88,21 @@
|
|
45 |
this.$element = $(element);
|
46 |
|
47 |
/**
|
48 |
-
*
|
|
|
|
|
|
|
|
|
|
|
49 |
* @protected
|
50 |
*/
|
51 |
-
this.
|
|
|
|
|
|
|
|
|
|
|
|
|
52 |
|
53 |
/**
|
54 |
* References to the running plugins of this carousel.
|
@@ -112,11 +166,6 @@
|
|
112 |
*/
|
113 |
this._mergers = [];
|
114 |
|
115 |
-
/**
|
116 |
-
* Widths of all items.
|
117 |
-
*/
|
118 |
-
this._widths = [];
|
119 |
-
|
120 |
/**
|
121 |
* Invalidated parts within the update process.
|
122 |
* @protected
|
@@ -129,46 +178,12 @@
|
|
129 |
*/
|
130 |
this._pipe = [];
|
131 |
|
132 |
-
/**
|
133 |
-
* Current state information for the drag operation.
|
134 |
-
* @todo #261
|
135 |
-
* @protected
|
136 |
-
*/
|
137 |
-
this._drag = {
|
138 |
-
time: null,
|
139 |
-
target: null,
|
140 |
-
pointer: null,
|
141 |
-
stage: {
|
142 |
-
start: null,
|
143 |
-
current: null
|
144 |
-
},
|
145 |
-
direction: null
|
146 |
-
};
|
147 |
-
|
148 |
-
/**
|
149 |
-
* Current state information and their tags.
|
150 |
-
* @type {Object}
|
151 |
-
* @protected
|
152 |
-
*/
|
153 |
-
this._states = {
|
154 |
-
current: {},
|
155 |
-
tags: {
|
156 |
-
'initializing': [ 'busy' ],
|
157 |
-
'animating': [ 'busy' ],
|
158 |
-
'dragging': [ 'interacting' ]
|
159 |
-
}
|
160 |
-
};
|
161 |
-
|
162 |
-
$.each([ 'onResize', 'onThrottledResize' ], $.proxy(function(i, handler) {
|
163 |
-
this._handlers[handler] = $.proxy(this[handler], this);
|
164 |
-
}, this));
|
165 |
-
|
166 |
$.each(Owl.Plugins, $.proxy(function(key, plugin) {
|
167 |
-
this._plugins[key
|
168 |
= new plugin(this);
|
169 |
}, this));
|
170 |
|
171 |
-
$.each(Owl.
|
172 |
this._pipe.push({
|
173 |
'filter': worker.filter,
|
174 |
'run': $.proxy(worker.run, this)
|
@@ -187,7 +202,6 @@
|
|
187 |
items: 3,
|
188 |
loop: false,
|
189 |
center: false,
|
190 |
-
rewind: false,
|
191 |
|
192 |
mouseDrag: true,
|
193 |
touchDrag: true,
|
@@ -211,6 +225,7 @@
|
|
211 |
responsive: {},
|
212 |
responsiveRefreshRate: 200,
|
213 |
responsiveBaseElement: window,
|
|
|
214 |
|
215 |
fallbackEasing: 'swing',
|
216 |
|
@@ -220,16 +235,12 @@
|
|
220 |
itemElement: 'div',
|
221 |
stageElement: 'div',
|
222 |
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
rtlClass: 'owl-rtl',
|
227 |
-
responsiveClass: 'owl-responsive',
|
228 |
-
dragClass: 'owl-drag',
|
229 |
itemClass: 'owl-item',
|
230 |
-
|
231 |
-
|
232 |
-
grabClass: 'owl-grab'
|
233 |
};
|
234 |
|
235 |
/**
|
@@ -244,17 +255,6 @@
|
|
244 |
Outer: 'outer'
|
245 |
};
|
246 |
|
247 |
-
/**
|
248 |
-
* Enumeration for types.
|
249 |
-
* @public
|
250 |
-
* @readonly
|
251 |
-
* @enum {String}
|
252 |
-
*/
|
253 |
-
Owl.Type = {
|
254 |
-
Event: 'event',
|
255 |
-
State: 'state'
|
256 |
-
};
|
257 |
-
|
258 |
/**
|
259 |
* Contains all registered plugins.
|
260 |
* @public
|
@@ -262,14 +262,9 @@
|
|
262 |
Owl.Plugins = {};
|
263 |
|
264 |
/**
|
265 |
-
*
|
266 |
*/
|
267 |
-
Owl.
|
268 |
-
filter: [ 'width', 'settings' ],
|
269 |
-
run: function() {
|
270 |
-
this._width = this.$element.width();
|
271 |
-
}
|
272 |
-
}, {
|
273 |
filter: [ 'width', 'items', 'settings' ],
|
274 |
run: function(cache) {
|
275 |
cache.current = this._items && this._items[this.relative(this._current)];
|
@@ -277,134 +272,79 @@
|
|
277 |
}, {
|
278 |
filter: [ 'items', 'settings' ],
|
279 |
run: function() {
|
280 |
-
this
|
281 |
-
|
282 |
-
}, {
|
283 |
-
filter: [ 'width', 'items', 'settings' ],
|
284 |
-
run: function(cache) {
|
285 |
-
var margin = this.settings.margin || '',
|
286 |
-
grid = !this.settings.autoWidth,
|
287 |
-
rtl = this.settings.rtl,
|
288 |
-
css = {
|
289 |
-
'width': 'auto',
|
290 |
-
'margin-left': rtl ? margin : '',
|
291 |
-
'margin-right': rtl ? '' : margin
|
292 |
-
};
|
293 |
-
|
294 |
-
!grid && this.$stage.children().css(css);
|
295 |
-
|
296 |
-
cache.css = css;
|
297 |
-
}
|
298 |
-
}, {
|
299 |
-
filter: [ 'width', 'items', 'settings' ],
|
300 |
-
run: function(cache) {
|
301 |
-
var width = (this.width() / this.settings.items).toFixed(3) - this.settings.margin,
|
302 |
-
merge = null,
|
303 |
-
iterator = this._items.length,
|
304 |
-
grid = !this.settings.autoWidth,
|
305 |
-
widths = [];
|
306 |
-
|
307 |
-
cache.items = {
|
308 |
-
merge: false,
|
309 |
-
width: width
|
310 |
-
};
|
311 |
-
|
312 |
-
while (iterator--) {
|
313 |
-
merge = this._mergers[iterator];
|
314 |
-
merge = this.settings.mergeFit && Math.min(merge, this.settings.items) || merge;
|
315 |
|
316 |
-
|
317 |
-
|
318 |
-
|
319 |
}
|
320 |
-
|
321 |
-
this._widths = widths;
|
322 |
}
|
323 |
}, {
|
324 |
filter: [ 'items', 'settings' ],
|
325 |
run: function() {
|
326 |
-
var
|
|
|
327 |
items = this._items,
|
328 |
-
|
329 |
-
|
330 |
-
|
331 |
-
|
332 |
-
|
333 |
-
|
334 |
-
|
335 |
-
|
336 |
-
|
337 |
-
|
338 |
-
|
339 |
-
|
340 |
-
|
341 |
-
|
342 |
}
|
343 |
-
|
344 |
-
this._clones = clones;
|
345 |
-
|
346 |
-
$(append).addClass('cloned').appendTo(this.$stage);
|
347 |
-
$(prepend).addClass('cloned').prependTo(this.$stage);
|
348 |
}
|
349 |
}, {
|
350 |
filter: [ 'width', 'items', 'settings' ],
|
351 |
run: function() {
|
352 |
-
var rtl = this.settings.rtl ? 1 : -1,
|
353 |
-
|
354 |
-
|
355 |
-
|
356 |
-
|
357 |
-
|
358 |
-
|
359 |
-
|
360 |
-
|
361 |
-
current = this._widths[this.relative(iterator)] + this.settings.margin;
|
362 |
-
coordinates.push(previous + current * rtl);
|
363 |
-
}
|
364 |
|
365 |
-
|
|
|
366 |
}
|
367 |
}, {
|
368 |
filter: [ 'width', 'items', 'settings' ],
|
369 |
run: function() {
|
370 |
-
var
|
371 |
-
|
372 |
-
|
373 |
-
|
374 |
-
|
375 |
-
'padding-right': padding || ''
|
376 |
-
};
|
377 |
|
378 |
this.$stage.css(css);
|
379 |
-
|
380 |
-
|
381 |
-
|
382 |
-
|
383 |
-
|
384 |
-
|
385 |
-
|
386 |
-
|
387 |
-
if (grid && cache.items.merge) {
|
388 |
-
while (iterator--) {
|
389 |
-
cache.css.width = this._widths[this.relative(iterator)];
|
390 |
-
items.eq(iterator).css(cache.css);
|
391 |
}
|
392 |
-
} else
|
393 |
-
|
394 |
-
items.css(cache.css);
|
395 |
}
|
396 |
}
|
397 |
-
}, {
|
398 |
-
filter: [ 'items' ],
|
399 |
-
run: function() {
|
400 |
-
this._coordinates.length < 1 && this.$stage.removeAttr('style');
|
401 |
-
}
|
402 |
}, {
|
403 |
filter: [ 'width', 'items', 'settings' ],
|
404 |
run: function(cache) {
|
405 |
-
cache.current
|
406 |
-
cache.current = Math.max(this.minimum(), Math.min(this.maximum(), cache.current));
|
407 |
-
this.reset(cache.current);
|
408 |
}
|
409 |
}, {
|
410 |
filter: [ 'position' ],
|
@@ -430,12 +370,12 @@
|
|
430 |
}
|
431 |
}
|
432 |
|
433 |
-
this.$stage.children('.
|
434 |
-
this.$stage.children(':eq(' + matches.join('), :eq(') + ')').addClass(
|
435 |
|
436 |
if (this.settings.center) {
|
437 |
-
this.$stage.children('.
|
438 |
-
this.$stage.children().eq(this.current()).addClass(
|
439 |
}
|
440 |
}
|
441 |
} ];
|
@@ -445,12 +385,17 @@
|
|
445 |
* @protected
|
446 |
*/
|
447 |
Owl.prototype.initialize = function() {
|
448 |
-
this.enter('initializing');
|
449 |
this.trigger('initialize');
|
450 |
|
451 |
-
this.$element
|
|
|
|
|
|
|
|
|
|
|
|
|
452 |
|
453 |
-
if (this.settings.autoWidth &&
|
454 |
var imgs, nestedSelector, width;
|
455 |
imgs = this.$element.find('img');
|
456 |
nestedSelector = this.settings.nestedItemSelector ? '.' + this.settings.nestedItemSelector : undefined;
|
@@ -458,14 +403,15 @@
|
|
458 |
|
459 |
if (imgs.length && width <= 0) {
|
460 |
this.preloadAutoWidthImages(imgs);
|
|
|
461 |
}
|
462 |
}
|
463 |
|
464 |
-
this.$element.addClass(
|
465 |
|
466 |
// create stage
|
467 |
-
this.$stage = $('<' + this.settings.stageElement + ' class="
|
468 |
-
.wrap('<div class="
|
469 |
|
470 |
// append stage
|
471 |
this.$element.append(this.$stage.parent());
|
@@ -473,23 +419,23 @@
|
|
473 |
// append content
|
474 |
this.replace(this.$element.children().not(this.$stage.parent()));
|
475 |
|
476 |
-
//
|
477 |
-
|
478 |
-
// update view
|
479 |
-
this.refresh();
|
480 |
-
} else {
|
481 |
-
// invalidate width
|
482 |
-
this.invalidate('width');
|
483 |
-
}
|
484 |
|
485 |
-
|
486 |
-
|
487 |
-
.addClass(this.options.loadedClass);
|
488 |
|
489 |
-
|
490 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
491 |
|
492 |
-
this.leave('initializing');
|
493 |
this.trigger('initialized');
|
494 |
};
|
495 |
|
@@ -519,9 +465,9 @@
|
|
519 |
|
520 |
// responsive class
|
521 |
if (settings.responsiveClass) {
|
522 |
-
this.$element.attr('class',
|
523 |
-
|
524 |
-
);
|
525 |
}
|
526 |
}
|
527 |
|
@@ -539,6 +485,14 @@
|
|
539 |
* @protected
|
540 |
*/
|
541 |
Owl.prototype.optionsLogic = function() {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
542 |
if (this.settings.autoWidth) {
|
543 |
this.settings.stagePadding = false;
|
544 |
this.settings.merge = false;
|
@@ -556,7 +510,7 @@
|
|
556 |
|
557 |
if (!event.data) {
|
558 |
event.data = $('<' + this.settings.itemElement + '/>')
|
559 |
-
.addClass(this.
|
560 |
}
|
561 |
|
562 |
this.trigger('prepared', { content: event.data });
|
@@ -582,8 +536,6 @@
|
|
582 |
}
|
583 |
|
584 |
this._invalidated = {};
|
585 |
-
|
586 |
-
!this.is('valid') && this.enter('valid');
|
587 |
};
|
588 |
|
589 |
/**
|
@@ -608,30 +560,66 @@
|
|
608 |
* @public
|
609 |
*/
|
610 |
Owl.prototype.refresh = function() {
|
611 |
-
this.
|
|
|
|
|
|
|
|
|
|
|
612 |
this.trigger('refresh');
|
613 |
|
614 |
this.setup();
|
615 |
|
616 |
this.optionsLogic();
|
617 |
|
618 |
-
|
|
|
|
|
619 |
|
620 |
this.update();
|
621 |
|
622 |
-
this.$
|
|
|
|
|
|
|
|
|
623 |
|
624 |
-
this.leave('refreshing');
|
625 |
this.trigger('refreshed');
|
626 |
};
|
627 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
628 |
/**
|
629 |
* Checks window `resize` event.
|
630 |
* @protected
|
631 |
*/
|
632 |
Owl.prototype.onThrottledResize = function() {
|
633 |
window.clearTimeout(this.resizeTimer);
|
634 |
-
this.resizeTimer = window.setTimeout(this.
|
635 |
};
|
636 |
|
637 |
/**
|
@@ -647,185 +635,310 @@
|
|
647 |
return false;
|
648 |
}
|
649 |
|
650 |
-
if (!this.$element.is(':visible')) {
|
651 |
-
return false;
|
652 |
-
}
|
653 |
-
|
654 |
-
this.enter('resizing');
|
655 |
-
|
656 |
if (this.trigger('resize').isDefaultPrevented()) {
|
657 |
-
this.leave('resizing');
|
658 |
return false;
|
659 |
}
|
660 |
|
|
|
|
|
661 |
this.invalidate('width');
|
662 |
|
663 |
this.refresh();
|
664 |
|
665 |
-
this.leave('resizing');
|
666 |
this.trigger('resized');
|
667 |
};
|
668 |
|
669 |
/**
|
670 |
-
*
|
671 |
-
* @todo Check `msPointerEnabled`
|
672 |
-
* @todo #261
|
673 |
* @protected
|
674 |
*/
|
675 |
-
Owl.prototype.
|
676 |
-
|
677 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
678 |
}
|
|
|
679 |
|
680 |
-
|
681 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
682 |
}
|
683 |
|
684 |
-
if (this.settings.
|
685 |
-
this.$
|
686 |
-
this.$stage.on('mousedown.owl.core', $.proxy(this.onDragStart, this));
|
687 |
-
this.$stage.on('dragstart.owl.core selectstart.owl.core', function() { return false });
|
688 |
}
|
689 |
|
690 |
-
|
691 |
-
|
692 |
-
this.$stage.
|
|
|
|
|
|
|
|
|
|
|
693 |
}
|
694 |
};
|
695 |
|
696 |
/**
|
697 |
-
* Handles
|
698 |
-
* @todo Horizontal swipe threshold as option
|
699 |
-
* @todo #261
|
700 |
* @protected
|
701 |
* @param {Event} event - The event arguments.
|
702 |
*/
|
703 |
Owl.prototype.onDragStart = function(event) {
|
704 |
-
var
|
705 |
|
706 |
-
|
707 |
-
return;
|
708 |
-
}
|
709 |
|
710 |
-
|
711 |
-
|
712 |
-
|
713 |
-
x: stage[stage.length === 16 ? 12 : 4],
|
714 |
-
y: stage[stage.length === 16 ? 13 : 5]
|
715 |
-
};
|
716 |
-
} else {
|
717 |
-
stage = this.$stage.position();
|
718 |
-
stage = {
|
719 |
-
x: this.settings.rtl ?
|
720 |
-
stage.left + this.$stage.width() - this.width() + this.settings.margin :
|
721 |
-
stage.left,
|
722 |
-
y: stage.top
|
723 |
-
};
|
724 |
}
|
725 |
|
726 |
-
if (
|
727 |
-
|
728 |
-
this.invalidate('position');
|
729 |
}
|
730 |
|
731 |
-
this
|
732 |
-
|
733 |
this.speed(0);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
734 |
|
735 |
-
this.
|
736 |
-
this.
|
737 |
-
this._drag.stage.start = stage;
|
738 |
-
this._drag.stage.current = stage;
|
739 |
-
this._drag.pointer = this.pointer(event);
|
740 |
-
|
741 |
-
$(document).on('mouseup.owl.core touchend.owl.core', $.proxy(this.onDragEnd, this));
|
742 |
-
|
743 |
-
$(document).one('mousemove.owl.core touchmove.owl.core', $.proxy(function(event) {
|
744 |
-
var delta = this.difference(this._drag.pointer, this.pointer(event));
|
745 |
-
|
746 |
-
$(document).on('mousemove.owl.core touchmove.owl.core', $.proxy(this.onDragMove, this));
|
747 |
|
748 |
-
|
749 |
-
|
750 |
-
|
751 |
|
752 |
-
|
|
|
|
|
|
|
|
|
753 |
|
754 |
-
|
755 |
-
this.trigger('drag');
|
756 |
-
}, this));
|
757 |
};
|
758 |
|
759 |
/**
|
760 |
-
* Handles the
|
761 |
-
* @todo
|
762 |
* @protected
|
763 |
* @param {Event} event - The event arguments.
|
764 |
*/
|
765 |
Owl.prototype.onDragMove = function(event) {
|
766 |
-
var
|
767 |
-
|
768 |
-
|
769 |
-
|
770 |
-
|
771 |
|
772 |
-
if (
|
773 |
return;
|
774 |
}
|
775 |
|
776 |
-
event.
|
777 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
778 |
if (this.settings.loop) {
|
779 |
-
|
780 |
-
|
781 |
-
|
|
|
|
|
782 |
} else {
|
783 |
-
|
784 |
-
|
785 |
-
|
786 |
-
|
|
|
787 |
}
|
788 |
|
789 |
-
|
790 |
|
791 |
-
this.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
792 |
};
|
793 |
|
794 |
/**
|
795 |
-
* Handles the
|
796 |
-
* @todo #261
|
797 |
-
* @todo Threshold for click event
|
798 |
* @protected
|
799 |
-
* @param {Event} event - The event arguments.
|
800 |
*/
|
801 |
Owl.prototype.onDragEnd = function(event) {
|
802 |
-
var
|
803 |
-
|
804 |
-
|
|
|
|
|
805 |
|
806 |
-
|
|
|
|
|
807 |
|
808 |
-
this
|
809 |
|
810 |
-
|
811 |
-
|
812 |
-
this.current(this.closest(stage.x, delta.x !== 0 ? direction : this._drag.direction));
|
813 |
-
this.invalidate('position');
|
814 |
-
this.update();
|
815 |
|
816 |
-
|
817 |
|
818 |
-
|
819 |
-
|
820 |
-
|
|
|
|
|
|
|
|
|
|
|
821 |
}
|
822 |
|
823 |
-
|
824 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
825 |
}
|
826 |
|
827 |
-
this.
|
828 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
829 |
};
|
830 |
|
831 |
/**
|
@@ -833,28 +946,19 @@
|
|
833 |
* @todo Setting `freeDrag` makes `closest` not reusable. See #165.
|
834 |
* @protected
|
835 |
* @param {Number} coordinate - The coordinate in pixel.
|
836 |
-
* @param {String} direction - The direction to check for the closest item. Ether `left` or `right`.
|
837 |
* @return {Number} - The absolute position of the closest item.
|
838 |
*/
|
839 |
-
Owl.prototype.closest = function(coordinate
|
840 |
-
var position = -1,
|
841 |
-
pull = 30,
|
842 |
-
width = this.width(),
|
843 |
-
coordinates = this.coordinates();
|
844 |
|
845 |
if (!this.settings.freeDrag) {
|
846 |
// check closest item
|
847 |
$.each(coordinates, $.proxy(function(index, value) {
|
848 |
-
|
849 |
-
if (direction === 'left' && coordinate > value - pull && coordinate < value + pull) {
|
850 |
position = index;
|
851 |
-
// on a right pull, check on previous index
|
852 |
-
// to do so, subtract width from value and set position = index + 1
|
853 |
-
} else if (direction === 'right' && coordinate > value - width - pull && coordinate < value - width + pull) {
|
854 |
-
position = index + 1;
|
855 |
} else if (this.op(coordinate, '<', value)
|
856 |
&& this.op(coordinate, '>', coordinates[index + 1] || value - width)) {
|
857 |
-
position = direction === 'left' ? index + 1 : index;
|
858 |
}
|
859 |
return position === -1;
|
860 |
}, this));
|
@@ -874,45 +978,33 @@
|
|
874 |
|
875 |
/**
|
876 |
* Animates the stage.
|
877 |
-
* @todo #270
|
878 |
* @public
|
879 |
* @param {Number} coordinate - The coordinate in pixels.
|
880 |
*/
|
881 |
Owl.prototype.animate = function(coordinate) {
|
882 |
-
|
883 |
-
|
884 |
-
this.is('animating') && this.onTransitionEnd();
|
885 |
|
886 |
-
if (
|
887 |
-
this.enter('animating');
|
888 |
-
this.trigger('translate');
|
889 |
-
}
|
890 |
-
|
891 |
-
if ($.support.transform3d && $.support.transition) {
|
892 |
this.$stage.css({
|
893 |
-
transform: 'translate3d(' + coordinate + 'px,0px,0px)',
|
894 |
transition: (this.speed() / 1000) + 's'
|
895 |
});
|
896 |
-
} else if (
|
897 |
-
this.$stage.animate({
|
898 |
-
left: coordinate + 'px'
|
899 |
-
}, this.speed(), this.settings.fallbackEasing, $.proxy(this.onTransitionEnd, this));
|
900 |
-
} else {
|
901 |
this.$stage.css({
|
902 |
left: coordinate + 'px'
|
903 |
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
904 |
}
|
905 |
};
|
906 |
|
907 |
-
/**
|
908 |
-
* Checks whether the carousel is in a specific state or not.
|
909 |
-
* @param {String} state - The state to check.
|
910 |
-
* @returns {Boolean} - The flag which indicates if the carousel is busy.
|
911 |
-
*/
|
912 |
-
Owl.prototype.is = function(state) {
|
913 |
-
return this._states.current[state] && this._states.current[state] > 0;
|
914 |
-
};
|
915 |
-
|
916 |
/**
|
917 |
* Sets the absolute position of the current item.
|
918 |
* @public
|
@@ -949,16 +1041,11 @@
|
|
949 |
|
950 |
/**
|
951 |
* Invalidates the given part of the update routine.
|
952 |
-
* @param {String}
|
953 |
-
* @returns {Array.<String>} - The invalidated parts.
|
954 |
*/
|
955 |
Owl.prototype.invalidate = function(part) {
|
956 |
-
|
957 |
-
|
958 |
-
this.is('valid') && this.leave('valid');
|
959 |
-
}
|
960 |
-
return $.map(this._invalidated, function(v, i) { return i });
|
961 |
-
};
|
962 |
|
963 |
/**
|
964 |
* Resets the absolute position of the current item.
|
@@ -983,77 +1070,88 @@
|
|
983 |
};
|
984 |
|
985 |
/**
|
986 |
-
* Normalizes an absolute or a relative position
|
987 |
* @public
|
988 |
* @param {Number} position - The absolute or relative position to normalize.
|
989 |
* @param {Boolean} [relative=false] - Whether the given position is relative or not.
|
990 |
* @returns {Number} - The normalized position.
|
991 |
*/
|
992 |
Owl.prototype.normalize = function(position, relative) {
|
993 |
-
var n = this._items.length
|
994 |
-
m = relative ? 0 : this._clones.length;
|
995 |
|
996 |
-
if (
|
997 |
-
|
998 |
-
}
|
999 |
-
|
|
|
|
|
|
|
|
|
1000 |
}
|
1001 |
|
1002 |
return position;
|
1003 |
};
|
1004 |
|
1005 |
/**
|
1006 |
-
* Converts an absolute position
|
1007 |
* @public
|
1008 |
* @param {Number} position - The absolute position to convert.
|
1009 |
* @returns {Number} - The converted position.
|
1010 |
*/
|
1011 |
Owl.prototype.relative = function(position) {
|
1012 |
-
position
|
|
|
1013 |
return this.normalize(position, true);
|
1014 |
};
|
1015 |
|
1016 |
/**
|
1017 |
-
* Gets the maximum position for
|
1018 |
* @public
|
1019 |
* @param {Boolean} [relative=false] - Whether to return an absolute position or a relative position.
|
1020 |
* @returns {Number}
|
1021 |
*/
|
1022 |
Owl.prototype.maximum = function(relative) {
|
1023 |
-
var
|
1024 |
-
|
1025 |
-
boundary = Math.abs(this._coordinates[maximum - 1]) - this._width,
|
1026 |
-
i = -1, j;
|
1027 |
|
1028 |
-
if (
|
1029 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1030 |
} else if (settings.autoWidth || settings.merge) {
|
1031 |
-
|
1032 |
-
|
1033 |
-
|
1034 |
-
|
|
|
|
|
|
|
1035 |
}
|
1036 |
-
} else if (settings.center) {
|
1037 |
-
maximum = this._items.length - 1;
|
1038 |
} else {
|
1039 |
-
|
1040 |
-
}
|
1041 |
-
|
1042 |
-
if (relative) {
|
1043 |
-
maximum -= this._clones.length / 2;
|
1044 |
}
|
1045 |
|
1046 |
-
return
|
1047 |
};
|
1048 |
|
1049 |
/**
|
1050 |
-
* Gets the minimum position for
|
1051 |
* @public
|
1052 |
* @param {Boolean} [relative=false] - Whether to return an absolute position or a relative position.
|
1053 |
* @returns {Number}
|
1054 |
*/
|
1055 |
Owl.prototype.minimum = function(relative) {
|
1056 |
-
|
|
|
|
|
|
|
|
|
1057 |
};
|
1058 |
|
1059 |
/**
|
@@ -1126,9 +1224,7 @@
|
|
1126 |
* @returns {Number|Array.<Number>} - The coordinate of the item in pixel or all coordinates.
|
1127 |
*/
|
1128 |
Owl.prototype.coordinates = function(position) {
|
1129 |
-
var
|
1130 |
-
newPosition = position - 1,
|
1131 |
-
coordinate;
|
1132 |
|
1133 |
if (position === undefined) {
|
1134 |
return $.map(this._coordinates, $.proxy(function(coordinate, index) {
|
@@ -1137,19 +1233,12 @@
|
|
1137 |
}
|
1138 |
|
1139 |
if (this.settings.center) {
|
1140 |
-
if (this.settings.rtl) {
|
1141 |
-
multiplier = -1;
|
1142 |
-
newPosition = position + 1;
|
1143 |
-
}
|
1144 |
-
|
1145 |
coordinate = this._coordinates[position];
|
1146 |
-
coordinate += (this.width() - coordinate + (this._coordinates[
|
1147 |
} else {
|
1148 |
-
coordinate = this._coordinates[
|
1149 |
}
|
1150 |
|
1151 |
-
coordinate = Math.ceil(coordinate);
|
1152 |
-
|
1153 |
return coordinate;
|
1154 |
};
|
1155 |
|
@@ -1162,10 +1251,6 @@
|
|
1162 |
* @returns {Number} - The time in milliseconds for the translation.
|
1163 |
*/
|
1164 |
Owl.prototype.duration = function(from, to, factor) {
|
1165 |
-
if (factor === 0) {
|
1166 |
-
return 0;
|
1167 |
-
}
|
1168 |
-
|
1169 |
return Math.min(Math.max(Math.abs(to - from), 1), 6) * Math.abs((factor || this.settings.smartSpeed));
|
1170 |
};
|
1171 |
|
@@ -1176,38 +1261,30 @@
|
|
1176 |
* @param {Number} [speed] - The time in milliseconds for the transition.
|
1177 |
*/
|
1178 |
Owl.prototype.to = function(position, speed) {
|
1179 |
-
var current = this.current(),
|
1180 |
-
revert = null,
|
1181 |
-
distance = position - this.relative(current),
|
1182 |
-
direction = (distance > 0) - (distance < 0),
|
1183 |
-
items = this._items.length,
|
1184 |
-
minimum = this.minimum(),
|
1185 |
-
maximum = this.maximum();
|
1186 |
-
|
1187 |
if (this.settings.loop) {
|
1188 |
-
|
1189 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1190 |
}
|
1191 |
-
|
1192 |
-
|
1193 |
-
|
1194 |
-
|
1195 |
-
|
1196 |
-
|
1197 |
-
position = revert;
|
1198 |
-
this.reset(current);
|
1199 |
-
}
|
1200 |
-
} else if (this.settings.rewind) {
|
1201 |
-
maximum += 1;
|
1202 |
-
position = (position % maximum + maximum) % maximum;
|
1203 |
} else {
|
1204 |
-
|
1205 |
-
|
1206 |
-
|
1207 |
-
this.speed(this.duration(current, position, speed));
|
1208 |
-
this.current(position);
|
1209 |
-
|
1210 |
-
if (this.$element.is(':visible')) {
|
1211 |
this.update();
|
1212 |
}
|
1213 |
};
|
@@ -1237,7 +1314,7 @@
|
|
1237 |
* @protected
|
1238 |
* @param {Event} event - The event arguments.
|
1239 |
*/
|
1240 |
-
Owl.prototype.
|
1241 |
|
1242 |
// if css2 animation then event object is undefined
|
1243 |
if (event !== undefined) {
|
@@ -1249,7 +1326,7 @@
|
|
1249 |
}
|
1250 |
}
|
1251 |
|
1252 |
-
this.
|
1253 |
this.trigger('translated');
|
1254 |
};
|
1255 |
|
@@ -1298,7 +1375,7 @@
|
|
1298 |
this._mergers.push(item.find('[data-merge]').andSelf('[data-merge]').attr('data-merge') * 1 || 1);
|
1299 |
}, this));
|
1300 |
|
1301 |
-
this.reset(
|
1302 |
|
1303 |
this.invalidate('items');
|
1304 |
};
|
@@ -1311,18 +1388,12 @@
|
|
1311 |
* @param {Number} [position] - The relative position at which to insert the item otherwise the item will be added to the end.
|
1312 |
*/
|
1313 |
Owl.prototype.add = function(content, position) {
|
1314 |
-
var current = this.relative(this._current);
|
1315 |
-
|
1316 |
position = position === undefined ? this._items.length : this.normalize(position, true);
|
1317 |
-
content = content instanceof jQuery ? content : $(content);
|
1318 |
|
1319 |
this.trigger('add', { content: content, position: position });
|
1320 |
|
1321 |
-
content = this.prepare(content);
|
1322 |
-
|
1323 |
if (this._items.length === 0 || position === this._items.length) {
|
1324 |
-
this
|
1325 |
-
this._items.length !== 0 && this._items[position - 1].after(content);
|
1326 |
this._items.push(content);
|
1327 |
this._mergers.push(content.find('[data-merge]').andSelf('[data-merge]').attr('data-merge') * 1 || 1);
|
1328 |
} else {
|
@@ -1331,8 +1402,6 @@
|
|
1331 |
this._mergers.splice(position, 0, content.find('[data-merge]').andSelf('[data-merge]').attr('data-merge') * 1 || 1);
|
1332 |
}
|
1333 |
|
1334 |
-
this._items[current] && this.reset(this._items[current].index());
|
1335 |
-
|
1336 |
this.invalidate('items');
|
1337 |
|
1338 |
this.trigger('added', { content: content, position: position });
|
@@ -1363,21 +1432,87 @@
|
|
1363 |
};
|
1364 |
|
1365 |
/**
|
1366 |
-
*
|
1367 |
-
* @todo Replace by a more generic approach
|
1368 |
* @protected
|
1369 |
*/
|
1370 |
-
Owl.prototype.
|
1371 |
-
|
1372 |
-
|
1373 |
-
|
1374 |
-
|
1375 |
-
|
1376 |
-
|
1377 |
-
|
1378 |
-
|
1379 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1380 |
}, this));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1381 |
};
|
1382 |
|
1383 |
/**
|
@@ -1386,34 +1521,39 @@
|
|
1386 |
*/
|
1387 |
Owl.prototype.destroy = function() {
|
1388 |
|
1389 |
-
this.$element.
|
1390 |
-
|
1391 |
-
|
1392 |
|
1393 |
if (this.settings.responsive !== false) {
|
1394 |
-
window.
|
1395 |
-
|
|
|
|
|
|
|
1396 |
}
|
1397 |
|
1398 |
-
for (var i in this._plugins) {
|
1399 |
this._plugins[i].destroy();
|
1400 |
}
|
1401 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1402 |
this.$stage.children('.cloned').remove();
|
|
|
|
|
1403 |
|
1404 |
-
this.$stage.unwrap();
|
1405 |
this.$stage.children().contents().unwrap();
|
1406 |
this.$stage.children().unwrap();
|
1407 |
-
|
1408 |
-
this.$element
|
1409 |
-
.removeClass(this.options.refreshClass)
|
1410 |
-
.removeClass(this.options.loadingClass)
|
1411 |
-
.removeClass(this.options.loadedClass)
|
1412 |
-
.removeClass(this.options.rtlClass)
|
1413 |
-
.removeClass(this.options.dragClass)
|
1414 |
-
.removeClass(this.options.grabClass)
|
1415 |
-
.attr('class', this.$element.attr('class').replace(new RegExp(this.options.responsiveClass + '-\\S+\\s', 'g'), ''))
|
1416 |
-
.removeData('owl.carousel');
|
1417 |
};
|
1418 |
|
1419 |
/**
|
@@ -1472,17 +1612,14 @@
|
|
1472 |
};
|
1473 |
|
1474 |
/**
|
1475 |
-
* Triggers
|
1476 |
-
* @todo Remove `status`, `relatedTarget` should be used instead.
|
1477 |
* @protected
|
1478 |
* @param {String} name - The event name.
|
1479 |
* @param {*} [data=null] - The event data.
|
1480 |
-
* @param {String} [namespace
|
1481 |
-
* @param {String} [state] - The state which is associated with the event.
|
1482 |
-
* @param {Boolean} [enter=false] - Indicates if the call enters the specified state or not.
|
1483 |
* @returns {Event} - The event arguments.
|
1484 |
*/
|
1485 |
-
Owl.prototype.trigger = function(name, data, namespace
|
1486 |
var status = {
|
1487 |
item: { count: this._items.length, index: this.current() }
|
1488 |
}, handler = $.camelCase(
|
@@ -1500,75 +1637,16 @@
|
|
1500 |
}
|
1501 |
});
|
1502 |
|
1503 |
-
this.register({ type: Owl.Type.Event, name: name });
|
1504 |
this.$element.trigger(event);
|
1505 |
|
1506 |
if (this.settings && typeof this.settings[handler] === 'function') {
|
1507 |
-
this.settings[handler].
|
1508 |
}
|
1509 |
}
|
1510 |
|
1511 |
return event;
|
1512 |
};
|
1513 |
|
1514 |
-
/**
|
1515 |
-
* Enters a state.
|
1516 |
-
* @param name - The state name.
|
1517 |
-
*/
|
1518 |
-
Owl.prototype.enter = function(name) {
|
1519 |
-
$.each([ name ].concat(this._states.tags[name] || []), $.proxy(function(i, name) {
|
1520 |
-
if (this._states.current[name] === undefined) {
|
1521 |
-
this._states.current[name] = 0;
|
1522 |
-
}
|
1523 |
-
|
1524 |
-
this._states.current[name]++;
|
1525 |
-
}, this));
|
1526 |
-
};
|
1527 |
-
|
1528 |
-
/**
|
1529 |
-
* Leaves a state.
|
1530 |
-
* @param name - The state name.
|
1531 |
-
*/
|
1532 |
-
Owl.prototype.leave = function(name) {
|
1533 |
-
$.each([ name ].concat(this._states.tags[name] || []), $.proxy(function(i, name) {
|
1534 |
-
this._states.current[name]--;
|
1535 |
-
}, this));
|
1536 |
-
};
|
1537 |
-
|
1538 |
-
/**
|
1539 |
-
* Registers an event or state.
|
1540 |
-
* @public
|
1541 |
-
* @param {Object} object - The event or state to register.
|
1542 |
-
*/
|
1543 |
-
Owl.prototype.register = function(object) {
|
1544 |
-
if (object.type === Owl.Type.Event) {
|
1545 |
-
if (!$.event.special[object.name]) {
|
1546 |
-
$.event.special[object.name] = {};
|
1547 |
-
}
|
1548 |
-
|
1549 |
-
if (!$.event.special[object.name].owl) {
|
1550 |
-
var _default = $.event.special[object.name]._default;
|
1551 |
-
$.event.special[object.name]._default = function(e) {
|
1552 |
-
if (_default && _default.apply && (!e.namespace || e.namespace.indexOf('owl') === -1)) {
|
1553 |
-
return _default.apply(this, arguments);
|
1554 |
-
}
|
1555 |
-
return e.namespace && e.namespace.indexOf('owl') > -1;
|
1556 |
-
};
|
1557 |
-
$.event.special[object.name].owl = true;
|
1558 |
-
}
|
1559 |
-
} else if (object.type === Owl.Type.State) {
|
1560 |
-
if (!this._states.tags[object.name]) {
|
1561 |
-
this._states.tags[object.name] = object.tags;
|
1562 |
-
} else {
|
1563 |
-
this._states.tags[object.name] = this._states.tags[object.name].concat(object.tags);
|
1564 |
-
}
|
1565 |
-
|
1566 |
-
this._states.tags[object.name] = $.grep(this._states.tags[object.name], $.proxy(function(tag, i) {
|
1567 |
-
return $.inArray(tag, this._states.tags[object.name]) === i;
|
1568 |
-
}, this));
|
1569 |
-
}
|
1570 |
-
};
|
1571 |
-
|
1572 |
/**
|
1573 |
* Suppresses events.
|
1574 |
* @protected
|
@@ -1578,7 +1656,7 @@
|
|
1578 |
$.each(events, $.proxy(function(index, event) {
|
1579 |
this._supress[event] = true;
|
1580 |
}, this));
|
1581 |
-
}
|
1582 |
|
1583 |
/**
|
1584 |
* Releases suppressed events.
|
@@ -1589,221 +1667,150 @@
|
|
1589 |
$.each(events, $.proxy(function(index, event) {
|
1590 |
delete this._supress[event];
|
1591 |
}, this));
|
1592 |
-
}
|
1593 |
|
1594 |
/**
|
1595 |
-
*
|
1596 |
-
* @todo #261
|
1597 |
* @protected
|
1598 |
-
* @param {Event} - The `mousedown` or `touchstart` event.
|
1599 |
-
* @returns {Object} - Contains `x` and `y` coordinates of current pointer position.
|
1600 |
*/
|
1601 |
-
Owl.prototype.
|
1602 |
-
|
1603 |
|
1604 |
-
|
|
|
1605 |
|
1606 |
-
|
1607 |
-
|
1608 |
-
|
1609 |
|
1610 |
-
|
1611 |
-
|
1612 |
-
|
1613 |
-
} else {
|
1614 |
-
result.x = event.clientX;
|
1615 |
-
result.y = event.clientY;
|
1616 |
}
|
1617 |
|
1618 |
-
|
1619 |
};
|
1620 |
|
1621 |
/**
|
1622 |
-
*
|
1623 |
-
* @
|
1624 |
-
* @param {
|
1625 |
-
* @returns {
|
1626 |
*/
|
1627 |
-
Owl.prototype.isNumeric = function(number) {
|
1628 |
-
return !isNaN(parseFloat(number));
|
1629 |
-
};
|
1630 |
|
1631 |
-
|
1632 |
-
|
1633 |
-
|
1634 |
-
|
1635 |
-
|
1636 |
-
|
1637 |
-
|
1638 |
-
*/
|
1639 |
-
Owl.prototype.difference = function(first, second) {
|
1640 |
-
return {
|
1641 |
-
x: first.x - second.x,
|
1642 |
-
y: first.y - second.y
|
1643 |
-
};
|
1644 |
-
};
|
1645 |
|
1646 |
-
|
1647 |
-
|
1648 |
-
|
1649 |
-
|
1650 |
-
|
1651 |
-
|
1652 |
-
|
1653 |
|
1654 |
-
|
1655 |
-
|
1656 |
-
|
1657 |
-
|
1658 |
-
|
1659 |
-
data = new Owl(this, typeof option == 'object' && option);
|
1660 |
-
$this.data('owl.carousel', data);
|
1661 |
-
|
1662 |
-
$.each([
|
1663 |
-
'next', 'prev', 'to', 'destroy', 'refresh', 'replace', 'add', 'remove'
|
1664 |
-
], function(i, event) {
|
1665 |
-
data.register({ type: Owl.Type.Event, name: event });
|
1666 |
-
data.$element.on(event + '.owl.carousel.core', $.proxy(function(e) {
|
1667 |
-
if (e.namespace && e.relatedTarget !== this) {
|
1668 |
-
this.suppress([ event ]);
|
1669 |
-
data[event].apply(this, [].slice.call(arguments, 1));
|
1670 |
-
this.release([ event ]);
|
1671 |
-
}
|
1672 |
-
}, data));
|
1673 |
-
});
|
1674 |
}
|
|
|
|
|
1675 |
|
1676 |
-
|
1677 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1678 |
}
|
1679 |
-
}
|
1680 |
-
|
|
|
1681 |
|
1682 |
/**
|
1683 |
-
*
|
1684 |
-
* @
|
|
|
|
|
1685 |
*/
|
1686 |
-
|
1687 |
-
|
1688 |
-
}
|
1689 |
-
|
1690 |
-
/**
|
1691 |
-
* AutoRefresh Plugin
|
1692 |
-
* @version 2.1.0
|
1693 |
-
* @author Artus Kolanowski
|
1694 |
-
* @author David Deutsch
|
1695 |
-
* @license The MIT License (MIT)
|
1696 |
-
*/
|
1697 |
-
;(function($, window, document, undefined) {
|
1698 |
|
1699 |
/**
|
1700 |
-
*
|
1701 |
-
* @
|
1702 |
-
* @
|
1703 |
*/
|
1704 |
-
|
1705 |
-
|
1706 |
-
|
1707 |
-
* @protected
|
1708 |
-
* @type {Owl}
|
1709 |
-
*/
|
1710 |
-
this._core = carousel;
|
1711 |
-
|
1712 |
-
/**
|
1713 |
-
* Refresh interval.
|
1714 |
-
* @protected
|
1715 |
-
* @type {number}
|
1716 |
-
*/
|
1717 |
-
this._interval = null;
|
1718 |
-
|
1719 |
-
/**
|
1720 |
-
* Whether the element is currently visible or not.
|
1721 |
-
* @protected
|
1722 |
-
* @type {Boolean}
|
1723 |
-
*/
|
1724 |
-
this._visible = null;
|
1725 |
-
|
1726 |
-
/**
|
1727 |
-
* All event handlers.
|
1728 |
-
* @protected
|
1729 |
-
* @type {Object}
|
1730 |
-
*/
|
1731 |
-
this._handlers = {
|
1732 |
-
'initialized.owl.carousel': $.proxy(function(e) {
|
1733 |
-
if (e.namespace && this._core.settings.autoRefresh) {
|
1734 |
-
this.watch();
|
1735 |
-
}
|
1736 |
-
}, this)
|
1737 |
-
};
|
1738 |
-
|
1739 |
-
// set default options
|
1740 |
-
this._core.options = $.extend({}, AutoRefresh.Defaults, this._core.options);
|
1741 |
-
|
1742 |
-
// register event handlers
|
1743 |
-
this._core.$element.on(this._handlers);
|
1744 |
-
};
|
1745 |
|
1746 |
/**
|
1747 |
-
*
|
1748 |
-
* @
|
|
|
1749 |
*/
|
1750 |
-
|
1751 |
-
|
1752 |
-
|
1753 |
-
};
|
1754 |
|
1755 |
/**
|
1756 |
-
*
|
|
|
|
|
1757 |
*/
|
1758 |
-
|
1759 |
-
|
1760 |
-
|
1761 |
-
}
|
1762 |
-
|
1763 |
-
this._visible = this._core.$element.is(':visible');
|
1764 |
-
this._interval = window.setInterval($.proxy(this.refresh, this), this._core.settings.autoRefreshInterval);
|
1765 |
-
};
|
1766 |
|
1767 |
/**
|
1768 |
-
*
|
|
|
|
|
1769 |
*/
|
1770 |
-
|
1771 |
-
|
1772 |
-
|
1773 |
-
}
|
1774 |
-
|
1775 |
-
this._visible = !this._visible;
|
1776 |
-
|
1777 |
-
this._core.$element.toggleClass('owl-hidden', !this._visible);
|
1778 |
-
|
1779 |
-
this._visible && (this._core.invalidate('width') && this._core.refresh());
|
1780 |
-
};
|
1781 |
|
1782 |
/**
|
1783 |
-
*
|
|
|
1784 |
*/
|
1785 |
-
|
1786 |
-
|
1787 |
-
|
1788 |
-
|
1789 |
-
|
1790 |
-
|
1791 |
-
this._core.$element.off(handler, this._handlers[handler]);
|
1792 |
-
}
|
1793 |
-
for (property in Object.getOwnPropertyNames(this)) {
|
1794 |
-
typeof this[property] != 'function' && (this[property] = null);
|
1795 |
-
}
|
1796 |
};
|
1797 |
|
1798 |
-
|
|
|
|
|
|
|
|
|
1799 |
|
1800 |
})(window.Zepto || window.jQuery, window, document);
|
1801 |
|
1802 |
/**
|
1803 |
* Lazy Plugin
|
1804 |
-
* @version 2.
|
1805 |
* @author Bartosz Wojciechowski
|
1806 |
-
* @author David Deutsch
|
1807 |
* @license The MIT License (MIT)
|
1808 |
*/
|
1809 |
;(function($, window, document, undefined) {
|
@@ -1835,7 +1842,7 @@
|
|
1835 |
* @type {Object}
|
1836 |
*/
|
1837 |
this._handlers = {
|
1838 |
-
'initialized.owl.carousel change.owl.carousel
|
1839 |
if (!e.namespace) {
|
1840 |
return;
|
1841 |
}
|
@@ -1848,14 +1855,13 @@
|
|
1848 |
var settings = this._core.settings,
|
1849 |
n = (settings.center && Math.ceil(settings.items / 2) || settings.items),
|
1850 |
i = ((settings.center && n * -1) || 0),
|
1851 |
-
position = (e.property && e.property.value
|
1852 |
clones = this._core.clones().length,
|
1853 |
load = $.proxy(function(i, v) { this.load(v) }, this);
|
1854 |
|
1855 |
while (i++ < n) {
|
1856 |
this.load(clones / 2 + this._core.relative(position));
|
1857 |
-
clones && $.each(this._core.clones(this._core.relative(position)), load);
|
1858 |
-
position++;
|
1859 |
}
|
1860 |
}
|
1861 |
}, this)
|
@@ -1866,7 +1872,7 @@
|
|
1866 |
|
1867 |
// register event handler
|
1868 |
this._core.$element.on(this._handlers);
|
1869 |
-
}
|
1870 |
|
1871 |
/**
|
1872 |
* Default options.
|
@@ -1874,7 +1880,7 @@
|
|
1874 |
*/
|
1875 |
Lazy.Defaults = {
|
1876 |
lazyLoad: false
|
1877 |
-
}
|
1878 |
|
1879 |
/**
|
1880 |
* Loads all resources of an item at the specified position.
|
@@ -1914,7 +1920,7 @@
|
|
1914 |
}, this));
|
1915 |
|
1916 |
this._loaded.push($item.get(0));
|
1917 |
-
}
|
1918 |
|
1919 |
/**
|
1920 |
* Destroys the plugin.
|
@@ -1929,7 +1935,7 @@
|
|
1929 |
for (property in Object.getOwnPropertyNames(this)) {
|
1930 |
typeof this[property] != 'function' && (this[property] = null);
|
1931 |
}
|
1932 |
-
}
|
1933 |
|
1934 |
$.fn.owlCarousel.Constructor.Plugins.Lazy = Lazy;
|
1935 |
|
@@ -1937,9 +1943,8 @@
|
|
1937 |
|
1938 |
/**
|
1939 |
* AutoHeight Plugin
|
1940 |
-
* @version 2.
|
1941 |
* @author Bartosz Wojciechowski
|
1942 |
-
* @author David Deutsch
|
1943 |
* @license The MIT License (MIT)
|
1944 |
*/
|
1945 |
;(function($, window, document, undefined) {
|
@@ -1963,19 +1968,19 @@
|
|
1963 |
* @type {Object}
|
1964 |
*/
|
1965 |
this._handlers = {
|
1966 |
-
'initialized.owl.carousel
|
1967 |
-
if (
|
1968 |
this.update();
|
1969 |
}
|
1970 |
}, this),
|
1971 |
'changed.owl.carousel': $.proxy(function(e) {
|
1972 |
-
if (
|
1973 |
this.update();
|
1974 |
}
|
1975 |
}, this),
|
1976 |
'loaded.owl.lazy': $.proxy(function(e) {
|
1977 |
-
if (
|
1978 |
-
|
1979 |
this.update();
|
1980 |
}
|
1981 |
}, this)
|
@@ -2001,20 +2006,8 @@
|
|
2001 |
* Updates the view.
|
2002 |
*/
|
2003 |
AutoHeight.prototype.update = function() {
|
2004 |
-
var start = this._core._current,
|
2005 |
-
end = start + this._core.settings.items,
|
2006 |
-
visible = this._core.$stage.children().toArray().slice(start, end),
|
2007 |
-
heights = [],
|
2008 |
-
maxheight = 0;
|
2009 |
-
|
2010 |
-
$.each(visible, function(index, item) {
|
2011 |
-
heights.push($(item).height());
|
2012 |
-
});
|
2013 |
-
|
2014 |
-
maxheight = Math.max.apply(null, heights);
|
2015 |
-
|
2016 |
this._core.$stage.parent()
|
2017 |
-
.height(
|
2018 |
.addClass(this._core.settings.autoHeightClass);
|
2019 |
};
|
2020 |
|
@@ -2035,9 +2028,8 @@
|
|
2035 |
|
2036 |
/**
|
2037 |
* Video Plugin
|
2038 |
-
* @version 2.
|
2039 |
* @author Bartosz Wojciechowski
|
2040 |
-
* @author David Deutsch
|
2041 |
* @license The MIT License (MIT)
|
2042 |
*/
|
2043 |
;(function($, window, document, undefined) {
|
@@ -2069,40 +2061,31 @@
|
|
2069 |
*/
|
2070 |
this._playing = null;
|
2071 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2072 |
/**
|
2073 |
* All event handlers.
|
2074 |
-
* @todo The cloned content removale is too late
|
2075 |
* @protected
|
2076 |
* @type {Object}
|
2077 |
*/
|
2078 |
this._handlers = {
|
2079 |
-
'initialized.owl.carousel': $.proxy(function(e) {
|
2080 |
-
if (e.namespace) {
|
2081 |
-
this._core.register({ type: 'state', name: 'playing', tags: [ 'interacting' ] });
|
2082 |
-
}
|
2083 |
-
}, this),
|
2084 |
'resize.owl.carousel': $.proxy(function(e) {
|
2085 |
-
if (
|
2086 |
e.preventDefault();
|
2087 |
}
|
2088 |
}, this),
|
2089 |
-
'
|
2090 |
-
if (
|
2091 |
-
this._core.$stage.find('.cloned .owl-video-frame').remove();
|
2092 |
-
}
|
2093 |
-
}, this),
|
2094 |
-
'changed.owl.carousel': $.proxy(function(e) {
|
2095 |
-
if (e.namespace && e.property.name === 'position' && this._playing) {
|
2096 |
this.stop();
|
2097 |
}
|
2098 |
}, this),
|
2099 |
'prepared.owl.carousel': $.proxy(function(e) {
|
2100 |
-
if (!e.namespace) {
|
2101 |
-
return;
|
2102 |
-
}
|
2103 |
-
|
2104 |
var $element = $(e.content).find('.owl-video');
|
2105 |
-
|
2106 |
if ($element.length) {
|
2107 |
$element.css('display', 'none');
|
2108 |
this.fetch($element, $(e.content));
|
@@ -2132,48 +2115,26 @@
|
|
2132 |
};
|
2133 |
|
2134 |
/**
|
2135 |
-
* Gets the video ID and the type (YouTube/Vimeo
|
2136 |
* @protected
|
2137 |
* @param {jQuery} target - The target containing the video data.
|
2138 |
* @param {jQuery} item - The item containing the video.
|
2139 |
*/
|
2140 |
Video.prototype.fetch = function(target, item) {
|
2141 |
-
var type = (function() {
|
2142 |
-
if (target.attr('data-vimeo-id')) {
|
2143 |
-
return 'vimeo';
|
2144 |
-
} else if (target.attr('data-vzaar-id')) {
|
2145 |
-
return 'vzaar'
|
2146 |
-
} else {
|
2147 |
-
return 'youtube';
|
2148 |
-
}
|
2149 |
-
})(),
|
2150 |
-
id = target.attr('data-vimeo-id') || target.attr('data-youtube-id') || target.attr('data-vzaar-id'),
|
2151 |
-
width = target.attr('data-width') || this._core.settings.videoWidth,
|
2152 |
-
height = target.attr('data-height') || this._core.settings.videoHeight,
|
2153 |
-
url = target.attr('href');
|
2154 |
-
|
2155 |
-
if (url) {
|
2156 |
|
2157 |
-
|
2158 |
-
|
2159 |
-
|
2160 |
-
|
2161 |
-
|
2162 |
-
https://vimeo.com/channels/:channel/:id
|
2163 |
-
https://vimeo.com/groups/:group/videos/:id
|
2164 |
-
https://app.vzaar.com/videos/:id
|
2165 |
|
2166 |
-
|
2167 |
-
|
2168 |
-
|
2169 |
-
id = url.match(/(http:|https:|)\/\/(player.|www.|app.)?(vimeo\.com|youtu(be\.com|\.be|be\.googleapis\.com)|vzaar\.com)\/(video\/|videos\/|embed\/|channels\/.+\/|groups\/.+\/|watch\?v=|v\/)?([A-Za-z0-9._%-]*)(\&\S+)?/);
|
2170 |
|
2171 |
if (id[3].indexOf('youtu') > -1) {
|
2172 |
type = 'youtube';
|
2173 |
} else if (id[3].indexOf('vimeo') > -1) {
|
2174 |
type = 'vimeo';
|
2175 |
-
} else if (id[3].indexOf('vzaar') > -1) {
|
2176 |
-
type = 'vzaar';
|
2177 |
} else {
|
2178 |
throw new Error('Video URL not supported.');
|
2179 |
}
|
@@ -2202,6 +2163,7 @@
|
|
2202 |
* @see `fetch`
|
2203 |
*/
|
2204 |
Video.prototype.thumbnail = function(target, video) {
|
|
|
2205 |
var tnLink,
|
2206 |
icon,
|
2207 |
path,
|
@@ -2238,12 +2200,12 @@
|
|
2238 |
}
|
2239 |
|
2240 |
if (video.type === 'youtube') {
|
2241 |
-
path = "
|
2242 |
create(path);
|
2243 |
} else if (video.type === 'vimeo') {
|
2244 |
$.ajax({
|
2245 |
type: 'GET',
|
2246 |
-
url: '
|
2247 |
jsonp: 'callback',
|
2248 |
dataType: 'jsonp',
|
2249 |
success: function(data) {
|
@@ -2251,17 +2213,6 @@
|
|
2251 |
create(path);
|
2252 |
}
|
2253 |
});
|
2254 |
-
} else if (video.type === 'vzaar') {
|
2255 |
-
$.ajax({
|
2256 |
-
type: 'GET',
|
2257 |
-
url: '//vzaar.com/api/videos/' + video.id + '.json',
|
2258 |
-
jsonp: 'callback',
|
2259 |
-
dataType: 'jsonp',
|
2260 |
-
success: function(data) {
|
2261 |
-
path = data.framegrab_url;
|
2262 |
-
create(path);
|
2263 |
-
}
|
2264 |
-
});
|
2265 |
}
|
2266 |
};
|
2267 |
|
@@ -2274,50 +2225,42 @@
|
|
2274 |
this._playing.find('.owl-video-frame').remove();
|
2275 |
this._playing.removeClass('owl-video-playing');
|
2276 |
this._playing = null;
|
2277 |
-
this._core.leave('playing');
|
2278 |
-
this._core.trigger('stopped', null, 'video');
|
2279 |
};
|
2280 |
|
2281 |
/**
|
2282 |
* Starts the current video.
|
2283 |
* @public
|
2284 |
-
* @param {Event}
|
2285 |
*/
|
2286 |
-
Video.prototype.play = function(
|
2287 |
-
|
2288 |
-
item = target.closest('.' + this._core.settings.itemClass),
|
2289 |
-
video = this._videos[item.attr('data-video')],
|
2290 |
-
width = video.width || '100%',
|
2291 |
-
height = video.height || this._core.$stage.height(),
|
2292 |
-
html;
|
2293 |
|
2294 |
if (this._playing) {
|
2295 |
-
|
2296 |
}
|
2297 |
|
2298 |
-
|
2299 |
-
|
2300 |
-
|
2301 |
-
|
2302 |
-
|
2303 |
-
|
2304 |
|
2305 |
if (video.type === 'youtube') {
|
2306 |
-
html = '<iframe width="' + width + '" height="' + height + '" src="
|
2307 |
-
video.id + '?autoplay=1&v=' + video.id + '" frameborder="0" allowfullscreen></iframe>';
|
2308 |
} else if (video.type === 'vimeo') {
|
2309 |
-
html = '<iframe src="
|
2310 |
-
|
2311 |
-
'" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>';
|
2312 |
-
} else if (video.type === 'vzaar') {
|
2313 |
-
html = '<iframe frameborder="0"' + 'height="' + height + '"' + 'width="' + width +
|
2314 |
-
'" allowfullscreen mozallowfullscreen webkitAllowFullScreen ' +
|
2315 |
-
'src="//view.vzaar.com/' + video.id + '/player?autoplay=true"></iframe>';
|
2316 |
}
|
2317 |
|
2318 |
-
|
|
|
2319 |
|
2320 |
-
|
|
|
|
|
2321 |
};
|
2322 |
|
2323 |
/**
|
@@ -2327,10 +2270,35 @@
|
|
2327 |
* @returns {Boolean}
|
2328 |
*/
|
2329 |
Video.prototype.isInFullScreen = function() {
|
2330 |
-
var element = document.fullscreenElement || document.mozFullScreenElement ||
|
2331 |
-
document.webkitFullscreenElement;
|
2332 |
|
2333 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2334 |
};
|
2335 |
|
2336 |
/**
|
@@ -2355,9 +2323,8 @@
|
|
2355 |
|
2356 |
/**
|
2357 |
* Animate Plugin
|
2358 |
-
* @version 2.
|
2359 |
* @author Bartosz Wojciechowski
|
2360 |
-
* @author David Deutsch
|
2361 |
* @license The MIT License (MIT)
|
2362 |
*/
|
2363 |
;(function($, window, document, undefined) {
|
@@ -2376,18 +2343,16 @@
|
|
2376 |
|
2377 |
this.handlers = {
|
2378 |
'change.owl.carousel': $.proxy(function(e) {
|
2379 |
-
if (e.
|
2380 |
this.previous = this.core.current();
|
2381 |
this.next = e.property.value;
|
2382 |
}
|
2383 |
}, this),
|
2384 |
'drag.owl.carousel dragged.owl.carousel translated.owl.carousel': $.proxy(function(e) {
|
2385 |
-
|
2386 |
-
this.swapping = e.type == 'translated';
|
2387 |
-
}
|
2388 |
}, this),
|
2389 |
'translate.owl.carousel': $.proxy(function(e) {
|
2390 |
-
if (
|
2391 |
this.swap();
|
2392 |
}
|
2393 |
}, this)
|
@@ -2412,11 +2377,7 @@
|
|
2412 |
*/
|
2413 |
Animate.prototype.swap = function() {
|
2414 |
|
2415 |
-
if (this.core.settings.items !== 1) {
|
2416 |
-
return;
|
2417 |
-
}
|
2418 |
-
|
2419 |
-
if (!$.support.animation || !$.support.transition) {
|
2420 |
return;
|
2421 |
}
|
2422 |
|
@@ -2435,16 +2396,16 @@
|
|
2435 |
|
2436 |
if (outgoing) {
|
2437 |
left = this.core.coordinates(this.previous) - this.core.coordinates(this.next);
|
2438 |
-
previous.
|
2439 |
-
.css( { 'left': left + 'px' } )
|
2440 |
.addClass('animated owl-animated-out')
|
2441 |
-
.addClass(outgoing)
|
|
|
2442 |
}
|
2443 |
|
2444 |
if (incoming) {
|
2445 |
-
next.
|
2446 |
-
.addClass(
|
2447 |
-
.
|
2448 |
}
|
2449 |
};
|
2450 |
|
@@ -2453,8 +2414,8 @@
|
|
2453 |
.removeClass('animated owl-animated-out owl-animated-in')
|
2454 |
.removeClass(this.core.settings.animateIn)
|
2455 |
.removeClass(this.core.settings.animateOut);
|
2456 |
-
this.core.
|
2457 |
-
}
|
2458 |
|
2459 |
/**
|
2460 |
* Destroys the plugin.
|
@@ -2477,10 +2438,8 @@
|
|
2477 |
|
2478 |
/**
|
2479 |
* Autoplay Plugin
|
2480 |
-
* @version 2.
|
2481 |
* @author Bartosz Wojciechowski
|
2482 |
-
* @author Artus Kolanowski
|
2483 |
-
* @author David Deutsch
|
2484 |
* @license The MIT License (MIT)
|
2485 |
*/
|
2486 |
;(function($, window, document, undefined) {
|
@@ -2490,88 +2449,33 @@
|
|
2490 |
* @class The Autoplay Plugin
|
2491 |
* @param {Owl} scope - The Owl Carousel
|
2492 |
*/
|
2493 |
-
var Autoplay = function(
|
2494 |
-
|
2495 |
-
|
2496 |
-
* @protected
|
2497 |
-
* @type {Owl}
|
2498 |
-
*/
|
2499 |
-
this._core = carousel;
|
2500 |
-
|
2501 |
-
/**
|
2502 |
-
* The autoplay timeout.
|
2503 |
-
* @type {Timeout}
|
2504 |
-
*/
|
2505 |
-
this._timeout = null;
|
2506 |
-
|
2507 |
-
/**
|
2508 |
-
* Indicates whenever the autoplay is paused.
|
2509 |
-
* @type {Boolean}
|
2510 |
-
*/
|
2511 |
-
this._paused = false;
|
2512 |
|
2513 |
-
|
2514 |
-
|
2515 |
-
|
2516 |
-
* @type {Object}
|
2517 |
-
*/
|
2518 |
-
this._handlers = {
|
2519 |
-
'changed.owl.carousel': $.proxy(function(e) {
|
2520 |
-
if (e.namespace && e.property.name === 'settings') {
|
2521 |
-
if (this._core.settings.autoplay) {
|
2522 |
-
this.play();
|
2523 |
-
} else {
|
2524 |
-
this.stop();
|
2525 |
-
}
|
2526 |
-
} else if (e.namespace && e.property.name === 'position') {
|
2527 |
-
//console.log('play?', e);
|
2528 |
-
if (this._core.settings.autoplay) {
|
2529 |
-
this._setAutoPlayInterval();
|
2530 |
-
}
|
2531 |
-
}
|
2532 |
-
}, this),
|
2533 |
-
'initialized.owl.carousel': $.proxy(function(e) {
|
2534 |
-
if (e.namespace && this._core.settings.autoplay) {
|
2535 |
-
this.play();
|
2536 |
-
}
|
2537 |
}, this),
|
2538 |
'play.owl.autoplay': $.proxy(function(e, t, s) {
|
2539 |
-
|
2540 |
-
this.play(t, s);
|
2541 |
-
}
|
2542 |
}, this),
|
2543 |
-
'stop.owl.autoplay': $.proxy(function(
|
2544 |
-
|
2545 |
-
this.stop();
|
2546 |
-
}
|
2547 |
}, this),
|
2548 |
'mouseover.owl.autoplay': $.proxy(function() {
|
2549 |
-
if (this.
|
2550 |
this.pause();
|
2551 |
}
|
2552 |
}, this),
|
2553 |
'mouseleave.owl.autoplay': $.proxy(function() {
|
2554 |
-
if (this.
|
2555 |
-
this.
|
2556 |
-
}
|
2557 |
-
}, this),
|
2558 |
-
'touchstart.owl.core': $.proxy(function() {
|
2559 |
-
if (this._core.settings.autoplayHoverPause && this._core.is('rotating')) {
|
2560 |
-
this.pause();
|
2561 |
-
}
|
2562 |
-
}, this),
|
2563 |
-
'touchend.owl.core': $.proxy(function() {
|
2564 |
-
if (this._core.settings.autoplayHoverPause) {
|
2565 |
-
this.play();
|
2566 |
}
|
2567 |
}, this)
|
2568 |
};
|
2569 |
|
2570 |
-
|
2571 |
-
this._core.$element.on(this._handlers);
|
2572 |
-
|
2573 |
-
// set default options
|
2574 |
-
this._core.options = $.extend({}, Autoplay.Defaults, this._core.options);
|
2575 |
};
|
2576 |
|
2577 |
/**
|
@@ -2585,49 +2489,47 @@
|
|
2585 |
autoplaySpeed: false
|
2586 |
};
|
2587 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2588 |
/**
|
2589 |
* Starts the autoplay.
|
2590 |
* @public
|
2591 |
-
* @param {Number} [timeout] -
|
2592 |
-
* @param {Number} [speed] -
|
|
|
|
|
2593 |
*/
|
2594 |
Autoplay.prototype.play = function(timeout, speed) {
|
2595 |
-
|
2596 |
-
|
2597 |
-
if (this._core.is('rotating')) {
|
2598 |
return;
|
2599 |
}
|
2600 |
|
2601 |
-
this.
|
2602 |
-
|
2603 |
-
|
2604 |
-
|
2605 |
|
2606 |
-
|
2607 |
-
|
2608 |
-
|
2609 |
-
* @param {Number} [timeout] - The interval before the next animation starts.
|
2610 |
-
* @param {Number} [speed] - The animation speed for the animations.
|
2611 |
-
* @return {Timeout}
|
2612 |
-
*/
|
2613 |
-
Autoplay.prototype._getNextTimeout = function(timeout, speed) {
|
2614 |
-
if ( this._timeout ) {
|
2615 |
-
window.clearTimeout(this._timeout);
|
2616 |
}
|
2617 |
-
return window.setTimeout($.proxy(function() {
|
2618 |
-
if (this._paused || this._core.is('busy') || this._core.is('interacting') || document.hidden) {
|
2619 |
-
return;
|
2620 |
-
}
|
2621 |
-
this._core.next(speed || this._core.settings.autoplaySpeed);
|
2622 |
-
}, this), timeout || this._core.settings.autoplayTimeout);
|
2623 |
-
};
|
2624 |
|
2625 |
-
|
2626 |
-
* Sets autoplay in motion.
|
2627 |
-
* @private
|
2628 |
-
*/
|
2629 |
-
Autoplay.prototype._setAutoPlayInterval = function() {
|
2630 |
-
this._timeout = this._getNextTimeout();
|
2631 |
};
|
2632 |
|
2633 |
/**
|
@@ -2635,24 +2537,15 @@
|
|
2635 |
* @public
|
2636 |
*/
|
2637 |
Autoplay.prototype.stop = function() {
|
2638 |
-
|
2639 |
-
return;
|
2640 |
-
}
|
2641 |
-
|
2642 |
-
window.clearTimeout(this._timeout);
|
2643 |
-
this._core.leave('rotating');
|
2644 |
};
|
2645 |
|
2646 |
/**
|
2647 |
-
*
|
2648 |
* @public
|
2649 |
*/
|
2650 |
Autoplay.prototype.pause = function() {
|
2651 |
-
|
2652 |
-
return;
|
2653 |
-
}
|
2654 |
-
|
2655 |
-
this._paused = true;
|
2656 |
};
|
2657 |
|
2658 |
/**
|
@@ -2661,10 +2554,10 @@
|
|
2661 |
Autoplay.prototype.destroy = function() {
|
2662 |
var handler, property;
|
2663 |
|
2664 |
-
this.
|
2665 |
|
2666 |
-
for (handler in this.
|
2667 |
-
this.
|
2668 |
}
|
2669 |
for (property in Object.getOwnPropertyNames(this)) {
|
2670 |
typeof this[property] != 'function' && (this[property] = null);
|
@@ -2677,9 +2570,8 @@
|
|
2677 |
|
2678 |
/**
|
2679 |
* Navigation Plugin
|
2680 |
-
* @version 2.
|
2681 |
* @author Artus Kolanowski
|
2682 |
-
* @author David Deutsch
|
2683 |
* @license The MIT License (MIT)
|
2684 |
*/
|
2685 |
;(function($, window, document, undefined) {
|
@@ -2750,43 +2642,46 @@
|
|
2750 |
*/
|
2751 |
this._handlers = {
|
2752 |
'prepared.owl.carousel': $.proxy(function(e) {
|
2753 |
-
if (
|
2754 |
-
this._templates.push('
|
2755 |
-
$(e.content).find('[data-dot]').addBack('[data-dot]').attr('data-dot') + '</div>');
|
2756 |
}
|
2757 |
}, this),
|
2758 |
-
'
|
2759 |
-
if (
|
2760 |
-
this._templates.splice(e.position, 0,
|
2761 |
}
|
2762 |
}, this),
|
2763 |
-
'remove.owl.carousel': $.proxy(function(e) {
|
2764 |
-
if (
|
2765 |
this._templates.splice(e.position, 1);
|
2766 |
}
|
2767 |
}, this),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2768 |
'changed.owl.carousel': $.proxy(function(e) {
|
2769 |
-
if (e.
|
2770 |
this.draw();
|
2771 |
}
|
2772 |
}, this),
|
2773 |
-
'
|
2774 |
-
if (
|
2775 |
-
this._core.trigger('initialize', null, 'navigation');
|
2776 |
this.initialize();
|
2777 |
-
this.update();
|
2778 |
-
this.draw();
|
2779 |
this._initialized = true;
|
2780 |
-
this._core.trigger('initialized', null, 'navigation');
|
2781 |
-
}
|
2782 |
-
}, this),
|
2783 |
-
'refreshed.owl.carousel': $.proxy(function(e) {
|
2784 |
-
if (e.namespace && this._initialized) {
|
2785 |
-
this._core.trigger('refresh', null, 'navigation');
|
2786 |
-
this.update();
|
2787 |
-
this.draw();
|
2788 |
-
this._core.trigger('refreshed', null, 'navigation');
|
2789 |
}
|
|
|
|
|
|
|
|
|
2790 |
}, this)
|
2791 |
};
|
2792 |
|
@@ -2795,7 +2690,7 @@
|
|
2795 |
|
2796 |
// register event handlers
|
2797 |
this.$element.on(this._handlers);
|
2798 |
-
}
|
2799 |
|
2800 |
/**
|
2801 |
* Default options.
|
@@ -2804,6 +2699,7 @@
|
|
2804 |
*/
|
2805 |
Navigation.Defaults = {
|
2806 |
nav: false,
|
|
|
2807 |
navText: [ 'prev', 'next' ],
|
2808 |
navSpeed: false,
|
2809 |
navElement: 'div',
|
@@ -2815,63 +2711,77 @@
|
|
2815 |
dotsClass: 'owl-dots',
|
2816 |
dots: true,
|
2817 |
dotsEach: false,
|
2818 |
-
|
2819 |
dotsSpeed: false,
|
2820 |
-
dotsContainer: false
|
2821 |
-
|
|
|
2822 |
|
2823 |
/**
|
2824 |
* Initializes the layout of the plugin and extends the carousel.
|
2825 |
* @protected
|
2826 |
*/
|
2827 |
Navigation.prototype.initialize = function() {
|
2828 |
-
var override,
|
2829 |
-
|
2830 |
-
|
2831 |
-
// create DOM structure for relative navigation
|
2832 |
-
this._controls.$relative = (settings.navContainer ? $(settings.navContainer)
|
2833 |
-
: $('<div>').addClass(settings.navContainerClass).appendTo(this.$element)).addClass('disabled');
|
2834 |
-
|
2835 |
-
this._controls.$previous = $('<' + settings.navElement + '>')
|
2836 |
-
.addClass(settings.navClass[0])
|
2837 |
-
.html(settings.navText[0])
|
2838 |
-
.prependTo(this._controls.$relative)
|
2839 |
-
.on('click', $.proxy(function(e) {
|
2840 |
-
this.prev(settings.navSpeed);
|
2841 |
-
}, this));
|
2842 |
-
this._controls.$next = $('<' + settings.navElement + '>')
|
2843 |
-
.addClass(settings.navClass[1])
|
2844 |
-
.html(settings.navText[1])
|
2845 |
-
.appendTo(this._controls.$relative)
|
2846 |
-
.on('click', $.proxy(function(e) {
|
2847 |
-
this.next(settings.navSpeed);
|
2848 |
-
}, this));
|
2849 |
|
2850 |
-
// create
|
2851 |
-
if (!
|
2852 |
this._templates = [ $('<div>')
|
2853 |
-
.addClass(
|
2854 |
.append($('<span>'))
|
2855 |
.prop('outerHTML') ];
|
2856 |
}
|
2857 |
|
2858 |
-
|
2859 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2860 |
|
2861 |
-
this._controls.$
|
2862 |
-
var index = $(e.target).parent().is(this._controls.$
|
2863 |
? $(e.target).index() : $(e.target).parent().index();
|
2864 |
|
2865 |
e.preventDefault();
|
2866 |
|
2867 |
-
this.to(index,
|
2868 |
}, this));
|
2869 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2870 |
// override public methods of the carousel
|
2871 |
for (override in this._overrides) {
|
2872 |
this._core[override] = $.proxy(this[override], this);
|
2873 |
}
|
2874 |
-
}
|
2875 |
|
2876 |
/**
|
2877 |
* Destroys the plugin.
|
@@ -2892,7 +2802,7 @@
|
|
2892 |
for (property in Object.getOwnPropertyNames(this)) {
|
2893 |
typeof this[property] != 'function' && (this[property] = null);
|
2894 |
}
|
2895 |
-
}
|
2896 |
|
2897 |
/**
|
2898 |
* Updates the internal state.
|
@@ -2900,72 +2810,72 @@
|
|
2900 |
*/
|
2901 |
Navigation.prototype.update = function() {
|
2902 |
var i, j, k,
|
|
|
2903 |
lower = this._core.clones().length / 2,
|
2904 |
upper = lower + this._core.items().length,
|
2905 |
-
|
2906 |
-
|
2907 |
-
size = settings.center || settings.autoWidth || settings.dotsData
|
2908 |
-
? 1 : settings.dotsEach || settings.items;
|
2909 |
|
2910 |
-
if (
|
2911 |
-
|
2912 |
}
|
2913 |
|
2914 |
-
if (
|
2915 |
this._pages = [];
|
2916 |
|
2917 |
for (i = lower, j = 0, k = 0; i < upper; i++) {
|
2918 |
if (j >= size || j === 0) {
|
2919 |
this._pages.push({
|
2920 |
-
start:
|
2921 |
end: i - lower + size - 1
|
2922 |
});
|
2923 |
-
if (Math.min(maximum, i - lower) === maximum) {
|
2924 |
-
break;
|
2925 |
-
}
|
2926 |
j = 0, ++k;
|
2927 |
}
|
2928 |
j += this._core.mergers(this._core.relative(i));
|
2929 |
}
|
2930 |
}
|
2931 |
-
}
|
2932 |
|
2933 |
/**
|
2934 |
* Draws the user interface.
|
2935 |
-
* @todo The option `
|
2936 |
* @protected
|
2937 |
*/
|
2938 |
Navigation.prototype.draw = function() {
|
2939 |
-
var difference,
|
2940 |
-
|
2941 |
-
|
2942 |
-
index = this._core.relative(this._core.current())
|
2943 |
-
loop = settings.loop || settings.rewind;
|
2944 |
-
|
2945 |
-
this._controls.$relative.toggleClass('disabled', !settings.nav || disabled);
|
2946 |
|
2947 |
-
if (
|
2948 |
-
this._controls.$previous.toggleClass('disabled',
|
2949 |
-
this._controls.$next.toggleClass('disabled',
|
2950 |
}
|
2951 |
|
2952 |
-
this._controls.$
|
|
|
2953 |
|
2954 |
-
if (
|
2955 |
-
difference = this._pages.length - this._controls.$
|
2956 |
|
2957 |
-
if (
|
2958 |
-
this._controls.$
|
|
|
|
|
|
|
2959 |
} else if (difference > 0) {
|
2960 |
-
|
|
|
2961 |
} else if (difference < 0) {
|
2962 |
-
this._controls.$
|
2963 |
}
|
2964 |
|
2965 |
-
this._controls.$
|
2966 |
-
this._controls.$
|
2967 |
}
|
2968 |
-
|
|
|
|
|
2969 |
|
2970 |
/**
|
2971 |
* Extends event data.
|
@@ -2978,10 +2888,10 @@
|
|
2978 |
event.page = {
|
2979 |
index: $.inArray(this.current(), this._pages),
|
2980 |
count: this._pages.length,
|
2981 |
-
size: settings && (settings.center || settings.autoWidth || settings.
|
2982 |
? 1 : settings.dotsEach || settings.items)
|
2983 |
};
|
2984 |
-
}
|
2985 |
|
2986 |
/**
|
2987 |
* Gets the current page position of the carousel.
|
@@ -2989,11 +2899,11 @@
|
|
2989 |
* @returns {Number}
|
2990 |
*/
|
2991 |
Navigation.prototype.current = function() {
|
2992 |
-
var
|
2993 |
-
return $.grep(this._pages,
|
2994 |
-
return
|
2995 |
-
}
|
2996 |
-
}
|
2997 |
|
2998 |
/**
|
2999 |
* Gets the current succesor/predecessor position.
|
@@ -3002,9 +2912,9 @@
|
|
3002 |
*/
|
3003 |
Navigation.prototype.getPosition = function(successor) {
|
3004 |
var position, length,
|
3005 |
-
|
3006 |
|
3007 |
-
if (
|
3008 |
position = $.inArray(this.current(), this._pages);
|
3009 |
length = this._pages.length;
|
3010 |
successor ? ++position : --position;
|
@@ -3012,11 +2922,10 @@
|
|
3012 |
} else {
|
3013 |
position = this._core.relative(this._core.current());
|
3014 |
length = this._core.items().length;
|
3015 |
-
successor ? position +=
|
3016 |
}
|
3017 |
-
|
3018 |
return position;
|
3019 |
-
}
|
3020 |
|
3021 |
/**
|
3022 |
* Slides to the next item or page.
|
@@ -3025,7 +2934,7 @@
|
|
3025 |
*/
|
3026 |
Navigation.prototype.next = function(speed) {
|
3027 |
$.proxy(this._overrides.to, this._core)(this.getPosition(true), speed);
|
3028 |
-
}
|
3029 |
|
3030 |
/**
|
3031 |
* Slides to the previous item or page.
|
@@ -3034,7 +2943,7 @@
|
|
3034 |
*/
|
3035 |
Navigation.prototype.prev = function(speed) {
|
3036 |
$.proxy(this._overrides.to, this._core)(this.getPosition(false), speed);
|
3037 |
-
}
|
3038 |
|
3039 |
/**
|
3040 |
* Slides to the specified item or page.
|
@@ -3046,13 +2955,13 @@
|
|
3046 |
Navigation.prototype.to = function(position, speed, standard) {
|
3047 |
var length;
|
3048 |
|
3049 |
-
if (!standard
|
3050 |
length = this._pages.length;
|
3051 |
$.proxy(this._overrides.to, this._core)(this._pages[((position % length) + length) % length].start, speed);
|
3052 |
} else {
|
3053 |
$.proxy(this._overrides.to, this._core)(position, speed);
|
3054 |
}
|
3055 |
-
}
|
3056 |
|
3057 |
$.fn.owlCarousel.Constructor.Plugins.Navigation = Navigation;
|
3058 |
|
@@ -3060,9 +2969,8 @@
|
|
3060 |
|
3061 |
/**
|
3062 |
* Hash Plugin
|
3063 |
-
* @version 2.
|
3064 |
* @author Artus Kolanowski
|
3065 |
-
* @author David Deutsch
|
3066 |
* @license The MIT License (MIT)
|
3067 |
*/
|
3068 |
;(function($, window, document, undefined) {
|
@@ -3082,7 +2990,7 @@
|
|
3082 |
this._core = carousel;
|
3083 |
|
3084 |
/**
|
3085 |
-
* Hash
|
3086 |
* @protected
|
3087 |
* @type {Object}
|
3088 |
*/
|
@@ -3100,35 +3008,14 @@
|
|
3100 |
* @type {Object}
|
3101 |
*/
|
3102 |
this._handlers = {
|
3103 |
-
'initialized.owl.carousel': $.proxy(function(
|
3104 |
-
if (
|
3105 |
$(window).trigger('hashchange.owl.navigation');
|
3106 |
}
|
3107 |
}, this),
|
3108 |
'prepared.owl.carousel': $.proxy(function(e) {
|
3109 |
-
|
3110 |
-
|
3111 |
-
|
3112 |
-
if (!hash) {
|
3113 |
-
return;
|
3114 |
-
}
|
3115 |
-
|
3116 |
-
this._hashes[hash] = e.content;
|
3117 |
-
}
|
3118 |
-
}, this),
|
3119 |
-
'changed.owl.carousel': $.proxy(function(e) {
|
3120 |
-
if (e.namespace && e.property.name === 'position') {
|
3121 |
-
var current = this._core.items(this._core.relative(this._core.current())),
|
3122 |
-
hash = $.map(this._hashes, function(item, hash) {
|
3123 |
-
return item === current ? hash : null;
|
3124 |
-
}).join();
|
3125 |
-
|
3126 |
-
if (!hash || window.location.hash.slice(1) === hash) {
|
3127 |
-
return;
|
3128 |
-
}
|
3129 |
-
|
3130 |
-
window.location.hash = hash;
|
3131 |
-
}
|
3132 |
}, this)
|
3133 |
};
|
3134 |
|
@@ -3139,18 +3026,18 @@
|
|
3139 |
this.$element.on(this._handlers);
|
3140 |
|
3141 |
// register event listener for hash navigation
|
3142 |
-
$(window).on('hashchange.owl.navigation', $.proxy(function(
|
3143 |
var hash = window.location.hash.substring(1),
|
3144 |
items = this._core.$stage.children(),
|
3145 |
-
position = this._hashes[hash] && items.index(this._hashes[hash]);
|
3146 |
|
3147 |
-
if (
|
3148 |
-
return;
|
3149 |
}
|
3150 |
|
3151 |
-
this._core.to(
|
3152 |
}, this));
|
3153 |
-
}
|
3154 |
|
3155 |
/**
|
3156 |
* Default options.
|
@@ -3158,7 +3045,7 @@
|
|
3158 |
*/
|
3159 |
Hash.Defaults = {
|
3160 |
URLhashListener: false
|
3161 |
-
}
|
3162 |
|
3163 |
/**
|
3164 |
* Destroys the plugin.
|
@@ -3175,92 +3062,8 @@
|
|
3175 |
for (property in Object.getOwnPropertyNames(this)) {
|
3176 |
typeof this[property] != 'function' && (this[property] = null);
|
3177 |
}
|
3178 |
-
};
|
3179 |
-
|
3180 |
-
$.fn.owlCarousel.Constructor.Plugins.Hash = Hash;
|
3181 |
-
|
3182 |
-
})(window.Zepto || window.jQuery, window, document);
|
3183 |
-
|
3184 |
-
/**
|
3185 |
-
* Support Plugin
|
3186 |
-
*
|
3187 |
-
* @version 2.1.0
|
3188 |
-
* @author Vivid Planet Software GmbH
|
3189 |
-
* @author Artus Kolanowski
|
3190 |
-
* @author David Deutsch
|
3191 |
-
* @license The MIT License (MIT)
|
3192 |
-
*/
|
3193 |
-
;(function($, window, document, undefined) {
|
3194 |
-
|
3195 |
-
var style = $('<support>').get(0).style,
|
3196 |
-
prefixes = 'Webkit Moz O ms'.split(' '),
|
3197 |
-
events = {
|
3198 |
-
transition: {
|
3199 |
-
end: {
|
3200 |
-
WebkitTransition: 'webkitTransitionEnd',
|
3201 |
-
MozTransition: 'transitionend',
|
3202 |
-
OTransition: 'oTransitionEnd',
|
3203 |
-
transition: 'transitionend'
|
3204 |
-
}
|
3205 |
-
},
|
3206 |
-
animation: {
|
3207 |
-
end: {
|
3208 |
-
WebkitAnimation: 'webkitAnimationEnd',
|
3209 |
-
MozAnimation: 'animationend',
|
3210 |
-
OAnimation: 'oAnimationEnd',
|
3211 |
-
animation: 'animationend'
|
3212 |
-
}
|
3213 |
-
}
|
3214 |
-
},
|
3215 |
-
tests = {
|
3216 |
-
csstransforms: function() {
|
3217 |
-
return !!test('transform');
|
3218 |
-
},
|
3219 |
-
csstransforms3d: function() {
|
3220 |
-
return !!test('perspective');
|
3221 |
-
},
|
3222 |
-
csstransitions: function() {
|
3223 |
-
return !!test('transition');
|
3224 |
-
},
|
3225 |
-
cssanimations: function() {
|
3226 |
-
return !!test('animation');
|
3227 |
-
}
|
3228 |
-
};
|
3229 |
-
|
3230 |
-
function test(property, prefixed) {
|
3231 |
-
var result = false,
|
3232 |
-
upper = property.charAt(0).toUpperCase() + property.slice(1);
|
3233 |
-
|
3234 |
-
$.each((property + ' ' + prefixes.join(upper + ' ') + upper).split(' '), function(i, property) {
|
3235 |
-
if (style[property] !== undefined) {
|
3236 |
-
result = prefixed ? property : true;
|
3237 |
-
return false;
|
3238 |
-
}
|
3239 |
-
});
|
3240 |
-
|
3241 |
-
return result;
|
3242 |
}
|
3243 |
|
3244 |
-
|
3245 |
-
return test(property, true);
|
3246 |
-
}
|
3247 |
-
|
3248 |
-
if (tests.csstransitions()) {
|
3249 |
-
/* jshint -W053 */
|
3250 |
-
$.support.transition = new String(prefixed('transition'))
|
3251 |
-
$.support.transition.end = events.transition.end[ $.support.transition ];
|
3252 |
-
}
|
3253 |
-
|
3254 |
-
if (tests.cssanimations()) {
|
3255 |
-
/* jshint -W053 */
|
3256 |
-
$.support.animation = new String(prefixed('animation'))
|
3257 |
-
$.support.animation.end = events.animation.end[ $.support.animation ];
|
3258 |
-
}
|
3259 |
-
|
3260 |
-
if (tests.csstransforms()) {
|
3261 |
-
/* jshint -W053 */
|
3262 |
-
$.support.transform = new String(prefixed('transform'));
|
3263 |
-
$.support.transform3d = tests.csstransforms3d();
|
3264 |
-
}
|
3265 |
|
3266 |
})(window.Zepto || window.jQuery, window, document);
|
|
|
|
|
|
|
|
|
|
|
1 |
/**
|
2 |
* Owl carousel
|
3 |
+
* @version 2.0.0
|
4 |
* @author Bartosz Wojciechowski
|
|
|
5 |
* @license The MIT License (MIT)
|
6 |
* @todo Lazy Load Icon
|
7 |
* @todo prevent animationend bubling
|
11 |
*/
|
12 |
;(function($, window, document, undefined) {
|
13 |
|
14 |
+
var drag, state, e;
|
15 |
+
|
16 |
+
/**
|
17 |
+
* Template for status information about drag and touch events.
|
18 |
+
* @private
|
19 |
+
*/
|
20 |
+
drag = {
|
21 |
+
start: 0,
|
22 |
+
startX: 0,
|
23 |
+
startY: 0,
|
24 |
+
current: 0,
|
25 |
+
currentX: 0,
|
26 |
+
currentY: 0,
|
27 |
+
offsetX: 0,
|
28 |
+
offsetY: 0,
|
29 |
+
distance: null,
|
30 |
+
startTime: 0,
|
31 |
+
endTime: 0,
|
32 |
+
updatedX: 0,
|
33 |
+
targetEl: null
|
34 |
+
};
|
35 |
+
|
36 |
+
/**
|
37 |
+
* Template for some status informations.
|
38 |
+
* @private
|
39 |
+
*/
|
40 |
+
state = {
|
41 |
+
isTouch: false,
|
42 |
+
isScrolling: false,
|
43 |
+
isSwiping: false,
|
44 |
+
direction: false,
|
45 |
+
inMotion: false
|
46 |
+
};
|
47 |
+
|
48 |
+
/**
|
49 |
+
* Event functions references.
|
50 |
+
* @private
|
51 |
+
*/
|
52 |
+
e = {
|
53 |
+
_onDragStart: null,
|
54 |
+
_onDragMove: null,
|
55 |
+
_onDragEnd: null,
|
56 |
+
_transitionEnd: null,
|
57 |
+
_resizer: null,
|
58 |
+
_responsiveCall: null,
|
59 |
+
_goToLoop: null,
|
60 |
+
_checkVisibile: null
|
61 |
+
};
|
62 |
+
|
63 |
/**
|
64 |
* Creates a carousel.
|
65 |
* @class The Owl Carousel.
|
88 |
this.$element = $(element);
|
89 |
|
90 |
/**
|
91 |
+
* Caches informations about drag and touch events.
|
92 |
+
*/
|
93 |
+
this.drag = $.extend({}, drag);
|
94 |
+
|
95 |
+
/**
|
96 |
+
* Caches some status informations.
|
97 |
* @protected
|
98 |
*/
|
99 |
+
this.state = $.extend({}, state);
|
100 |
+
|
101 |
+
/**
|
102 |
+
* @protected
|
103 |
+
* @todo Must be documented
|
104 |
+
*/
|
105 |
+
this.e = $.extend({}, e);
|
106 |
|
107 |
/**
|
108 |
* References to the running plugins of this carousel.
|
166 |
*/
|
167 |
this._mergers = [];
|
168 |
|
|
|
|
|
|
|
|
|
|
|
169 |
/**
|
170 |
* Invalidated parts within the update process.
|
171 |
* @protected
|
178 |
*/
|
179 |
this._pipe = [];
|
180 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
181 |
$.each(Owl.Plugins, $.proxy(function(key, plugin) {
|
182 |
+
this._plugins[key[0].toLowerCase() + key.slice(1)]
|
183 |
= new plugin(this);
|
184 |
}, this));
|
185 |
|
186 |
+
$.each(Owl.Pipe, $.proxy(function(priority, worker) {
|
187 |
this._pipe.push({
|
188 |
'filter': worker.filter,
|
189 |
'run': $.proxy(worker.run, this)
|
202 |
items: 3,
|
203 |
loop: false,
|
204 |
center: false,
|
|
|
205 |
|
206 |
mouseDrag: true,
|
207 |
touchDrag: true,
|
225 |
responsive: {},
|
226 |
responsiveRefreshRate: 200,
|
227 |
responsiveBaseElement: window,
|
228 |
+
responsiveClass: false,
|
229 |
|
230 |
fallbackEasing: 'swing',
|
231 |
|
235 |
itemElement: 'div',
|
236 |
stageElement: 'div',
|
237 |
|
238 |
+
// Classes and Names
|
239 |
+
themeClass: 'owl-theme',
|
240 |
+
baseClass: 'owl-carousel',
|
|
|
|
|
|
|
241 |
itemClass: 'owl-item',
|
242 |
+
centerClass: 'center',
|
243 |
+
activeClass: 'active'
|
|
|
244 |
};
|
245 |
|
246 |
/**
|
255 |
Outer: 'outer'
|
256 |
};
|
257 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
258 |
/**
|
259 |
* Contains all registered plugins.
|
260 |
* @public
|
262 |
Owl.Plugins = {};
|
263 |
|
264 |
/**
|
265 |
+
* Update pipe.
|
266 |
*/
|
267 |
+
Owl.Pipe = [ {
|
|
|
|
|
|
|
|
|
|
|
268 |
filter: [ 'width', 'items', 'settings' ],
|
269 |
run: function(cache) {
|
270 |
cache.current = this._items && this._items[this.relative(this._current)];
|
272 |
}, {
|
273 |
filter: [ 'items', 'settings' ],
|
274 |
run: function() {
|
275 |
+
var cached = this._clones,
|
276 |
+
clones = this.$stage.children('.cloned');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
277 |
|
278 |
+
if (clones.length !== cached.length || (!this.settings.loop && cached.length > 0)) {
|
279 |
+
this.$stage.children('.cloned').remove();
|
280 |
+
this._clones = [];
|
281 |
}
|
|
|
|
|
282 |
}
|
283 |
}, {
|
284 |
filter: [ 'items', 'settings' ],
|
285 |
run: function() {
|
286 |
+
var i, n,
|
287 |
+
clones = this._clones,
|
288 |
items = this._items,
|
289 |
+
delta = this.settings.loop ? clones.length - Math.max(this.settings.items * 2, 4) : 0;
|
290 |
+
|
291 |
+
for (i = 0, n = Math.abs(delta / 2); i < n; i++) {
|
292 |
+
if (delta > 0) {
|
293 |
+
this.$stage.children().eq(items.length + clones.length - 1).remove();
|
294 |
+
clones.pop();
|
295 |
+
this.$stage.children().eq(0).remove();
|
296 |
+
clones.pop();
|
297 |
+
} else {
|
298 |
+
clones.push(clones.length / 2);
|
299 |
+
this.$stage.append(items[clones[clones.length - 1]].clone().addClass('cloned'));
|
300 |
+
clones.push(items.length - 1 - (clones.length - 1) / 2);
|
301 |
+
this.$stage.prepend(items[clones[clones.length - 1]].clone().addClass('cloned'));
|
302 |
+
}
|
303 |
}
|
|
|
|
|
|
|
|
|
|
|
304 |
}
|
305 |
}, {
|
306 |
filter: [ 'width', 'items', 'settings' ],
|
307 |
run: function() {
|
308 |
+
var rtl = (this.settings.rtl ? 1 : -1),
|
309 |
+
width = (this.width() / this.settings.items).toFixed(3),
|
310 |
+
coordinate = 0, merge, i, n;
|
311 |
+
|
312 |
+
this._coordinates = [];
|
313 |
+
for (i = 0, n = this._clones.length + this._items.length; i < n; i++) {
|
314 |
+
merge = this._mergers[this.relative(i)];
|
315 |
+
merge = (this.settings.mergeFit && Math.min(merge, this.settings.items)) || merge;
|
316 |
+
coordinate += (this.settings.autoWidth ? this._items[this.relative(i)].width() + this.settings.margin : width * merge) * rtl;
|
|
|
|
|
|
|
317 |
|
318 |
+
this._coordinates.push(coordinate);
|
319 |
+
}
|
320 |
}
|
321 |
}, {
|
322 |
filter: [ 'width', 'items', 'settings' ],
|
323 |
run: function() {
|
324 |
+
var i, n, width = (this.width() / this.settings.items).toFixed(3), css = {
|
325 |
+
'width': Math.abs(this._coordinates[this._coordinates.length - 1]) + this.settings.stagePadding * 2,
|
326 |
+
'padding-left': this.settings.stagePadding || '',
|
327 |
+
'padding-right': this.settings.stagePadding || ''
|
328 |
+
};
|
|
|
|
|
329 |
|
330 |
this.$stage.css(css);
|
331 |
+
|
332 |
+
css = { 'width': this.settings.autoWidth ? 'auto' : width - this.settings.margin };
|
333 |
+
css[this.settings.rtl ? 'margin-left' : 'margin-right'] = this.settings.margin;
|
334 |
+
|
335 |
+
if (!this.settings.autoWidth && $.grep(this._mergers, function(v) { return v > 1 }).length > 0) {
|
336 |
+
for (i = 0, n = this._coordinates.length; i < n; i++) {
|
337 |
+
css.width = Math.abs(this._coordinates[i]) - Math.abs(this._coordinates[i - 1] || 0) - this.settings.margin;
|
338 |
+
this.$stage.children().eq(i).css(css);
|
|
|
|
|
|
|
|
|
339 |
}
|
340 |
+
} else {
|
341 |
+
this.$stage.children().css(css);
|
|
|
342 |
}
|
343 |
}
|
|
|
|
|
|
|
|
|
|
|
344 |
}, {
|
345 |
filter: [ 'width', 'items', 'settings' ],
|
346 |
run: function(cache) {
|
347 |
+
cache.current && this.reset(this.$stage.children().index(cache.current));
|
|
|
|
|
348 |
}
|
349 |
}, {
|
350 |
filter: [ 'position' ],
|
370 |
}
|
371 |
}
|
372 |
|
373 |
+
this.$stage.children('.' + this.settings.activeClass).removeClass(this.settings.activeClass);
|
374 |
+
this.$stage.children(':eq(' + matches.join('), :eq(') + ')').addClass(this.settings.activeClass);
|
375 |
|
376 |
if (this.settings.center) {
|
377 |
+
this.$stage.children('.' + this.settings.centerClass).removeClass(this.settings.centerClass);
|
378 |
+
this.$stage.children().eq(this.current()).addClass(this.settings.centerClass);
|
379 |
}
|
380 |
}
|
381 |
} ];
|
385 |
* @protected
|
386 |
*/
|
387 |
Owl.prototype.initialize = function() {
|
|
|
388 |
this.trigger('initialize');
|
389 |
|
390 |
+
this.$element
|
391 |
+
.addClass(this.settings.baseClass)
|
392 |
+
.addClass(this.settings.themeClass)
|
393 |
+
.toggleClass('owl-rtl', this.settings.rtl);
|
394 |
+
|
395 |
+
// check support
|
396 |
+
this.browserSupport();
|
397 |
|
398 |
+
if (this.settings.autoWidth && this.state.imagesLoaded !== true) {
|
399 |
var imgs, nestedSelector, width;
|
400 |
imgs = this.$element.find('img');
|
401 |
nestedSelector = this.settings.nestedItemSelector ? '.' + this.settings.nestedItemSelector : undefined;
|
403 |
|
404 |
if (imgs.length && width <= 0) {
|
405 |
this.preloadAutoWidthImages(imgs);
|
406 |
+
return false;
|
407 |
}
|
408 |
}
|
409 |
|
410 |
+
this.$element.addClass('owl-loading');
|
411 |
|
412 |
// create stage
|
413 |
+
this.$stage = $('<' + this.settings.stageElement + ' class="owl-stage"/>')
|
414 |
+
.wrap('<div class="owl-stage-outer">');
|
415 |
|
416 |
// append stage
|
417 |
this.$element.append(this.$stage.parent());
|
419 |
// append content
|
420 |
this.replace(this.$element.children().not(this.$stage.parent()));
|
421 |
|
422 |
+
// set view width
|
423 |
+
this._width = this.$element.width();
|
|
|
|
|
|
|
|
|
|
|
|
|
424 |
|
425 |
+
// update view
|
426 |
+
this.refresh();
|
|
|
427 |
|
428 |
+
this.$element.removeClass('owl-loading').addClass('owl-loaded');
|
429 |
+
|
430 |
+
// attach generic events
|
431 |
+
this.eventsCall();
|
432 |
+
|
433 |
+
// attach generic events
|
434 |
+
this.internalEvents();
|
435 |
+
|
436 |
+
// attach custom control events
|
437 |
+
this.addTriggerableEvents();
|
438 |
|
|
|
439 |
this.trigger('initialized');
|
440 |
};
|
441 |
|
465 |
|
466 |
// responsive class
|
467 |
if (settings.responsiveClass) {
|
468 |
+
this.$element.attr('class', function(i, c) {
|
469 |
+
return c.replace(/\b owl-responsive-\S+/g, '');
|
470 |
+
}).addClass('owl-responsive-' + match);
|
471 |
}
|
472 |
}
|
473 |
|
485 |
* @protected
|
486 |
*/
|
487 |
Owl.prototype.optionsLogic = function() {
|
488 |
+
// Toggle Center class
|
489 |
+
this.$element.toggleClass('owl-center', this.settings.center);
|
490 |
+
|
491 |
+
// if items number is less than in body
|
492 |
+
if (this.settings.loop && this._items.length < this.settings.items) {
|
493 |
+
this.settings.loop = false;
|
494 |
+
}
|
495 |
+
|
496 |
if (this.settings.autoWidth) {
|
497 |
this.settings.stagePadding = false;
|
498 |
this.settings.merge = false;
|
510 |
|
511 |
if (!event.data) {
|
512 |
event.data = $('<' + this.settings.itemElement + '/>')
|
513 |
+
.addClass(this.settings.itemClass).append(item)
|
514 |
}
|
515 |
|
516 |
this.trigger('prepared', { content: event.data });
|
536 |
}
|
537 |
|
538 |
this._invalidated = {};
|
|
|
|
|
539 |
};
|
540 |
|
541 |
/**
|
560 |
* @public
|
561 |
*/
|
562 |
Owl.prototype.refresh = function() {
|
563 |
+
if (this._items.length === 0) {
|
564 |
+
return false;
|
565 |
+
}
|
566 |
+
|
567 |
+
var start = new Date().getTime();
|
568 |
+
|
569 |
this.trigger('refresh');
|
570 |
|
571 |
this.setup();
|
572 |
|
573 |
this.optionsLogic();
|
574 |
|
575 |
+
// hide and show methods helps here to set a proper widths,
|
576 |
+
// this prevents scrollbar to be calculated in stage width
|
577 |
+
this.$stage.addClass('owl-refresh');
|
578 |
|
579 |
this.update();
|
580 |
|
581 |
+
this.$stage.removeClass('owl-refresh');
|
582 |
+
|
583 |
+
this.state.orientation = window.orientation;
|
584 |
+
|
585 |
+
this.watchVisibility();
|
586 |
|
|
|
587 |
this.trigger('refreshed');
|
588 |
};
|
589 |
|
590 |
+
/**
|
591 |
+
* Save internal event references and add event based functions.
|
592 |
+
* @protected
|
593 |
+
*/
|
594 |
+
Owl.prototype.eventsCall = function() {
|
595 |
+
// Save events references
|
596 |
+
this.e._onDragStart = $.proxy(function(e) {
|
597 |
+
this.onDragStart(e);
|
598 |
+
}, this);
|
599 |
+
this.e._onDragMove = $.proxy(function(e) {
|
600 |
+
this.onDragMove(e);
|
601 |
+
}, this);
|
602 |
+
this.e._onDragEnd = $.proxy(function(e) {
|
603 |
+
this.onDragEnd(e);
|
604 |
+
}, this);
|
605 |
+
this.e._onResize = $.proxy(function(e) {
|
606 |
+
this.onResize(e);
|
607 |
+
}, this);
|
608 |
+
this.e._transitionEnd = $.proxy(function(e) {
|
609 |
+
this.transitionEnd(e);
|
610 |
+
}, this);
|
611 |
+
this.e._preventClick = $.proxy(function(e) {
|
612 |
+
this.preventClick(e);
|
613 |
+
}, this);
|
614 |
+
};
|
615 |
+
|
616 |
/**
|
617 |
* Checks window `resize` event.
|
618 |
* @protected
|
619 |
*/
|
620 |
Owl.prototype.onThrottledResize = function() {
|
621 |
window.clearTimeout(this.resizeTimer);
|
622 |
+
this.resizeTimer = window.setTimeout(this.e._onResize, this.settings.responsiveRefreshRate);
|
623 |
};
|
624 |
|
625 |
/**
|
635 |
return false;
|
636 |
}
|
637 |
|
|
|
|
|
|
|
|
|
|
|
|
|
638 |
if (this.trigger('resize').isDefaultPrevented()) {
|
|
|
639 |
return false;
|
640 |
}
|
641 |
|
642 |
+
this._width = this.$element.width();
|
643 |
+
|
644 |
this.invalidate('width');
|
645 |
|
646 |
this.refresh();
|
647 |
|
|
|
648 |
this.trigger('resized');
|
649 |
};
|
650 |
|
651 |
/**
|
652 |
+
* Checks for touch/mouse drag event type and add run event handlers.
|
|
|
|
|
653 |
* @protected
|
654 |
*/
|
655 |
+
Owl.prototype.eventsRouter = function(event) {
|
656 |
+
var type = event.type;
|
657 |
+
|
658 |
+
if (type === "mousedown" || type === "touchstart") {
|
659 |
+
this.onDragStart(event);
|
660 |
+
} else if (type === "mousemove" || type === "touchmove") {
|
661 |
+
this.onDragMove(event);
|
662 |
+
} else if (type === "mouseup" || type === "touchend") {
|
663 |
+
this.onDragEnd(event);
|
664 |
+
} else if (type === "touchcancel") {
|
665 |
+
this.onDragEnd(event);
|
666 |
}
|
667 |
+
};
|
668 |
|
669 |
+
/**
|
670 |
+
* Checks for touch/mouse drag options and add necessery event handlers.
|
671 |
+
* @protected
|
672 |
+
*/
|
673 |
+
Owl.prototype.internalEvents = function() {
|
674 |
+
var isTouch = isTouchSupport(),
|
675 |
+
isTouchIE = isTouchSupportIE();
|
676 |
+
|
677 |
+
if (this.settings.mouseDrag){
|
678 |
+
this.$stage.on('mousedown', $.proxy(function(event) { this.eventsRouter(event) }, this));
|
679 |
+
this.$stage.on('dragstart', function() { return false });
|
680 |
+
this.$stage.get(0).onselectstart = function() { return false };
|
681 |
+
} else {
|
682 |
+
this.$element.addClass('owl-text-select-on');
|
683 |
}
|
684 |
|
685 |
+
if (this.settings.touchDrag && !isTouchIE){
|
686 |
+
this.$stage.on('touchstart touchcancel', $.proxy(function(event) { this.eventsRouter(event) }, this));
|
|
|
|
|
687 |
}
|
688 |
|
689 |
+
// catch transitionEnd event
|
690 |
+
if (this.transitionEndVendor) {
|
691 |
+
this.on(this.$stage.get(0), this.transitionEndVendor, this.e._transitionEnd, false);
|
692 |
+
}
|
693 |
+
|
694 |
+
// responsive
|
695 |
+
if (this.settings.responsive !== false) {
|
696 |
+
this.on(window, 'resize', $.proxy(this.onThrottledResize, this));
|
697 |
}
|
698 |
};
|
699 |
|
700 |
/**
|
701 |
+
* Handles touchstart/mousedown event.
|
|
|
|
|
702 |
* @protected
|
703 |
* @param {Event} event - The event arguments.
|
704 |
*/
|
705 |
Owl.prototype.onDragStart = function(event) {
|
706 |
+
var ev, isTouchEvent, pageX, pageY, animatedPos;
|
707 |
|
708 |
+
ev = event.originalEvent || event || window.event;
|
|
|
|
|
709 |
|
710 |
+
// prevent right click
|
711 |
+
if (ev.which === 3 || this.state.isTouch) {
|
712 |
+
return false;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
713 |
}
|
714 |
|
715 |
+
if (ev.type === 'mousedown') {
|
716 |
+
this.$stage.addClass('owl-grab');
|
|
|
717 |
}
|
718 |
|
719 |
+
this.trigger('drag');
|
720 |
+
this.drag.startTime = new Date().getTime();
|
721 |
this.speed(0);
|
722 |
+
this.state.isTouch = true;
|
723 |
+
this.state.isScrolling = false;
|
724 |
+
this.state.isSwiping = false;
|
725 |
+
this.drag.distance = 0;
|
726 |
+
|
727 |
+
pageX = getTouches(ev).x;
|
728 |
+
pageY = getTouches(ev).y;
|
729 |
+
|
730 |
+
// get stage position left
|
731 |
+
this.drag.offsetX = this.$stage.position().left;
|
732 |
+
this.drag.offsetY = this.$stage.position().top;
|
733 |
+
|
734 |
+
if (this.settings.rtl) {
|
735 |
+
this.drag.offsetX = this.$stage.position().left + this.$stage.width() - this.width()
|
736 |
+
+ this.settings.margin;
|
737 |
+
}
|
738 |
+
|
739 |
+
// catch position // ie to fix
|
740 |
+
if (this.state.inMotion && this.support3d) {
|
741 |
+
animatedPos = this.getTransformProperty();
|
742 |
+
this.drag.offsetX = animatedPos;
|
743 |
+
this.animate(animatedPos);
|
744 |
+
this.state.inMotion = true;
|
745 |
+
} else if (this.state.inMotion && !this.support3d) {
|
746 |
+
this.state.inMotion = false;
|
747 |
+
return false;
|
748 |
+
}
|
749 |
|
750 |
+
this.drag.startX = pageX - this.drag.offsetX;
|
751 |
+
this.drag.startY = pageY - this.drag.offsetY;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
752 |
|
753 |
+
this.drag.start = pageX - this.drag.startX;
|
754 |
+
this.drag.targetEl = ev.target || ev.srcElement;
|
755 |
+
this.drag.updatedX = this.drag.start;
|
756 |
|
757 |
+
// to do/check
|
758 |
+
// prevent links and images dragging;
|
759 |
+
if (this.drag.targetEl.tagName === "IMG" || this.drag.targetEl.tagName === "A") {
|
760 |
+
this.drag.targetEl.draggable = false;
|
761 |
+
}
|
762 |
|
763 |
+
$(document).on('mousemove.owl.dragEvents mouseup.owl.dragEvents touchmove.owl.dragEvents touchend.owl.dragEvents', $.proxy(function(event) {this.eventsRouter(event)},this));
|
|
|
|
|
764 |
};
|
765 |
|
766 |
/**
|
767 |
+
* Handles the touchmove/mousemove events.
|
768 |
+
* @todo Simplify
|
769 |
* @protected
|
770 |
* @param {Event} event - The event arguments.
|
771 |
*/
|
772 |
Owl.prototype.onDragMove = function(event) {
|
773 |
+
var ev, isTouchEvent, pageX, pageY, minValue, maxValue, pull;
|
774 |
+
|
775 |
+
if (!this.state.isTouch) {
|
776 |
+
return;
|
777 |
+
}
|
778 |
|
779 |
+
if (this.state.isScrolling) {
|
780 |
return;
|
781 |
}
|
782 |
|
783 |
+
ev = event.originalEvent || event || window.event;
|
784 |
|
785 |
+
pageX = getTouches(ev).x;
|
786 |
+
pageY = getTouches(ev).y;
|
787 |
+
|
788 |
+
// Drag Direction
|
789 |
+
this.drag.currentX = pageX - this.drag.startX;
|
790 |
+
this.drag.currentY = pageY - this.drag.startY;
|
791 |
+
this.drag.distance = this.drag.currentX - this.drag.offsetX;
|
792 |
+
|
793 |
+
// Check move direction
|
794 |
+
if (this.drag.distance < 0) {
|
795 |
+
this.state.direction = this.settings.rtl ? 'right' : 'left';
|
796 |
+
} else if (this.drag.distance > 0) {
|
797 |
+
this.state.direction = this.settings.rtl ? 'left' : 'right';
|
798 |
+
}
|
799 |
+
// Loop
|
800 |
if (this.settings.loop) {
|
801 |
+
if (this.op(this.drag.currentX, '>', this.coordinates(this.minimum())) && this.state.direction === 'right') {
|
802 |
+
this.drag.currentX -= (this.settings.center && this.coordinates(0)) - this.coordinates(this._items.length);
|
803 |
+
} else if (this.op(this.drag.currentX, '<', this.coordinates(this.maximum())) && this.state.direction === 'left') {
|
804 |
+
this.drag.currentX += (this.settings.center && this.coordinates(0)) - this.coordinates(this._items.length);
|
805 |
+
}
|
806 |
} else {
|
807 |
+
// pull
|
808 |
+
minValue = this.settings.rtl ? this.coordinates(this.maximum()) : this.coordinates(this.minimum());
|
809 |
+
maxValue = this.settings.rtl ? this.coordinates(this.minimum()) : this.coordinates(this.maximum());
|
810 |
+
pull = this.settings.pullDrag ? this.drag.distance / 5 : 0;
|
811 |
+
this.drag.currentX = Math.max(Math.min(this.drag.currentX, minValue + pull), maxValue + pull);
|
812 |
}
|
813 |
|
814 |
+
// Lock browser if swiping horizontal
|
815 |
|
816 |
+
if ((this.drag.distance > 8 || this.drag.distance < -8)) {
|
817 |
+
if (ev.preventDefault !== undefined) {
|
818 |
+
ev.preventDefault();
|
819 |
+
} else {
|
820 |
+
ev.returnValue = false;
|
821 |
+
}
|
822 |
+
this.state.isSwiping = true;
|
823 |
+
}
|
824 |
+
|
825 |
+
this.drag.updatedX = this.drag.currentX;
|
826 |
+
|
827 |
+
// Lock Owl if scrolling
|
828 |
+
if ((this.drag.currentY > 16 || this.drag.currentY < -16) && this.state.isSwiping === false) {
|
829 |
+
this.state.isScrolling = true;
|
830 |
+
this.drag.updatedX = this.drag.start;
|
831 |
+
}
|
832 |
+
|
833 |
+
this.animate(this.drag.updatedX);
|
834 |
};
|
835 |
|
836 |
/**
|
837 |
+
* Handles the touchend/mouseup events.
|
|
|
|
|
838 |
* @protected
|
|
|
839 |
*/
|
840 |
Owl.prototype.onDragEnd = function(event) {
|
841 |
+
var compareTimes, distanceAbs, closest;
|
842 |
+
|
843 |
+
if (!this.state.isTouch) {
|
844 |
+
return;
|
845 |
+
}
|
846 |
|
847 |
+
if (event.type === 'mouseup') {
|
848 |
+
this.$stage.removeClass('owl-grab');
|
849 |
+
}
|
850 |
|
851 |
+
this.trigger('dragged');
|
852 |
|
853 |
+
// prevent links and images dragging;
|
854 |
+
this.drag.targetEl.removeAttribute("draggable");
|
|
|
|
|
|
|
855 |
|
856 |
+
// remove drag event listeners
|
857 |
|
858 |
+
this.state.isTouch = false;
|
859 |
+
this.state.isScrolling = false;
|
860 |
+
this.state.isSwiping = false;
|
861 |
+
|
862 |
+
// to check
|
863 |
+
if (this.drag.distance === 0 && this.state.inMotion !== true) {
|
864 |
+
this.state.inMotion = false;
|
865 |
+
return false;
|
866 |
}
|
867 |
|
868 |
+
// prevent clicks while scrolling
|
869 |
+
|
870 |
+
this.drag.endTime = new Date().getTime();
|
871 |
+
compareTimes = this.drag.endTime - this.drag.startTime;
|
872 |
+
distanceAbs = Math.abs(this.drag.distance);
|
873 |
+
|
874 |
+
// to test
|
875 |
+
if (distanceAbs > 3 || compareTimes > 300) {
|
876 |
+
this.removeClick(this.drag.targetEl);
|
877 |
}
|
878 |
|
879 |
+
closest = this.closest(this.drag.updatedX);
|
880 |
+
|
881 |
+
this.speed(this.settings.dragEndSpeed || this.settings.smartSpeed);
|
882 |
+
this.current(closest);
|
883 |
+
this.invalidate('position');
|
884 |
+
this.update();
|
885 |
+
|
886 |
+
// if pullDrag is off then fire transitionEnd event manually when stick
|
887 |
+
// to border
|
888 |
+
if (!this.settings.pullDrag && this.drag.updatedX === this.coordinates(closest)) {
|
889 |
+
this.transitionEnd();
|
890 |
+
}
|
891 |
+
|
892 |
+
this.drag.distance = 0;
|
893 |
+
|
894 |
+
$(document).off('.owl.dragEvents');
|
895 |
+
};
|
896 |
+
|
897 |
+
/**
|
898 |
+
* Attaches `preventClick` to disable link while swipping.
|
899 |
+
* @protected
|
900 |
+
* @param {HTMLElement} [target] - The target of the `click` event.
|
901 |
+
*/
|
902 |
+
Owl.prototype.removeClick = function(target) {
|
903 |
+
this.drag.targetEl = target;
|
904 |
+
$(target).on('click.preventClick', this.e._preventClick);
|
905 |
+
// to make sure click is removed:
|
906 |
+
window.setTimeout(function() {
|
907 |
+
$(target).off('click.preventClick');
|
908 |
+
}, 300);
|
909 |
+
};
|
910 |
+
|
911 |
+
/**
|
912 |
+
* Suppresses click event.
|
913 |
+
* @protected
|
914 |
+
* @param {Event} ev - The event arguments.
|
915 |
+
*/
|
916 |
+
Owl.prototype.preventClick = function(ev) {
|
917 |
+
if (ev.preventDefault) {
|
918 |
+
ev.preventDefault();
|
919 |
+
} else {
|
920 |
+
ev.returnValue = false;
|
921 |
+
}
|
922 |
+
if (ev.stopPropagation) {
|
923 |
+
ev.stopPropagation();
|
924 |
+
}
|
925 |
+
$(ev.target).off('click.preventClick');
|
926 |
+
};
|
927 |
+
|
928 |
+
/**
|
929 |
+
* Catches stage position while animate (only CSS3).
|
930 |
+
* @protected
|
931 |
+
* @returns
|
932 |
+
*/
|
933 |
+
Owl.prototype.getTransformProperty = function() {
|
934 |
+
var transform, matrix3d;
|
935 |
+
|
936 |
+
transform = window.getComputedStyle(this.$stage.get(0), null).getPropertyValue(this.vendorName + 'transform');
|
937 |
+
// var transform = this.$stage.css(this.vendorName + 'transform')
|
938 |
+
transform = transform.replace(/matrix(3d)?\(|\)/g, '').split(',');
|
939 |
+
matrix3d = transform.length === 16;
|
940 |
+
|
941 |
+
return matrix3d !== true ? transform[4] : transform[12];
|
942 |
};
|
943 |
|
944 |
/**
|
946 |
* @todo Setting `freeDrag` makes `closest` not reusable. See #165.
|
947 |
* @protected
|
948 |
* @param {Number} coordinate - The coordinate in pixel.
|
|
|
949 |
* @return {Number} - The absolute position of the closest item.
|
950 |
*/
|
951 |
+
Owl.prototype.closest = function(coordinate) {
|
952 |
+
var position = -1, pull = 30, width = this.width(), coordinates = this.coordinates();
|
|
|
|
|
|
|
953 |
|
954 |
if (!this.settings.freeDrag) {
|
955 |
// check closest item
|
956 |
$.each(coordinates, $.proxy(function(index, value) {
|
957 |
+
if (coordinate > value - pull && coordinate < value + pull) {
|
|
|
958 |
position = index;
|
|
|
|
|
|
|
|
|
959 |
} else if (this.op(coordinate, '<', value)
|
960 |
&& this.op(coordinate, '>', coordinates[index + 1] || value - width)) {
|
961 |
+
position = this.state.direction === 'left' ? index + 1 : index;
|
962 |
}
|
963 |
return position === -1;
|
964 |
}, this));
|
978 |
|
979 |
/**
|
980 |
* Animates the stage.
|
|
|
981 |
* @public
|
982 |
* @param {Number} coordinate - The coordinate in pixels.
|
983 |
*/
|
984 |
Owl.prototype.animate = function(coordinate) {
|
985 |
+
this.trigger('translate');
|
986 |
+
this.state.inMotion = this.speed() > 0;
|
|
|
987 |
|
988 |
+
if (this.support3d) {
|
|
|
|
|
|
|
|
|
|
|
989 |
this.$stage.css({
|
990 |
+
transform: 'translate3d(' + coordinate + 'px' + ',0px, 0px)',
|
991 |
transition: (this.speed() / 1000) + 's'
|
992 |
});
|
993 |
+
} else if (this.state.isTouch) {
|
|
|
|
|
|
|
|
|
994 |
this.$stage.css({
|
995 |
left: coordinate + 'px'
|
996 |
});
|
997 |
+
} else {
|
998 |
+
this.$stage.animate({
|
999 |
+
left: coordinate
|
1000 |
+
}, this.speed() / 1000, this.settings.fallbackEasing, $.proxy(function() {
|
1001 |
+
if (this.state.inMotion) {
|
1002 |
+
this.transitionEnd();
|
1003 |
+
}
|
1004 |
+
}, this));
|
1005 |
}
|
1006 |
};
|
1007 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1008 |
/**
|
1009 |
* Sets the absolute position of the current item.
|
1010 |
* @public
|
1041 |
|
1042 |
/**
|
1043 |
* Invalidates the given part of the update routine.
|
1044 |
+
* @param {String} part - The part to invalidate.
|
|
|
1045 |
*/
|
1046 |
Owl.prototype.invalidate = function(part) {
|
1047 |
+
this._invalidated[part] = true;
|
1048 |
+
}
|
|
|
|
|
|
|
|
|
1049 |
|
1050 |
/**
|
1051 |
* Resets the absolute position of the current item.
|
1070 |
};
|
1071 |
|
1072 |
/**
|
1073 |
+
* Normalizes an absolute or a relative position for an item.
|
1074 |
* @public
|
1075 |
* @param {Number} position - The absolute or relative position to normalize.
|
1076 |
* @param {Boolean} [relative=false] - Whether the given position is relative or not.
|
1077 |
* @returns {Number} - The normalized position.
|
1078 |
*/
|
1079 |
Owl.prototype.normalize = function(position, relative) {
|
1080 |
+
var n = (relative ? this._items.length : this._items.length + this._clones.length);
|
|
|
1081 |
|
1082 |
+
if (!$.isNumeric(position) || n < 1) {
|
1083 |
+
return undefined;
|
1084 |
+
}
|
1085 |
+
|
1086 |
+
if (this._clones.length) {
|
1087 |
+
position = ((position % n) + n) % n;
|
1088 |
+
} else {
|
1089 |
+
position = Math.max(this.minimum(relative), Math.min(this.maximum(relative), position));
|
1090 |
}
|
1091 |
|
1092 |
return position;
|
1093 |
};
|
1094 |
|
1095 |
/**
|
1096 |
+
* Converts an absolute position for an item into a relative position.
|
1097 |
* @public
|
1098 |
* @param {Number} position - The absolute position to convert.
|
1099 |
* @returns {Number} - The converted position.
|
1100 |
*/
|
1101 |
Owl.prototype.relative = function(position) {
|
1102 |
+
position = this.normalize(position);
|
1103 |
+
position = position - this._clones.length / 2;
|
1104 |
return this.normalize(position, true);
|
1105 |
};
|
1106 |
|
1107 |
/**
|
1108 |
+
* Gets the maximum position for an item.
|
1109 |
* @public
|
1110 |
* @param {Boolean} [relative=false] - Whether to return an absolute position or a relative position.
|
1111 |
* @returns {Number}
|
1112 |
*/
|
1113 |
Owl.prototype.maximum = function(relative) {
|
1114 |
+
var maximum, width, i = 0, coordinate,
|
1115 |
+
settings = this.settings;
|
|
|
|
|
1116 |
|
1117 |
+
if (relative) {
|
1118 |
+
return this._items.length - 1;
|
1119 |
+
}
|
1120 |
+
|
1121 |
+
if (!settings.loop && settings.center) {
|
1122 |
+
maximum = this._items.length - 1;
|
1123 |
+
} else if (!settings.loop && !settings.center) {
|
1124 |
+
maximum = this._items.length - settings.items;
|
1125 |
+
} else if (settings.loop || settings.center) {
|
1126 |
+
maximum = this._items.length + settings.items;
|
1127 |
} else if (settings.autoWidth || settings.merge) {
|
1128 |
+
revert = settings.rtl ? 1 : -1;
|
1129 |
+
width = this.$stage.width() - this.$element.width();
|
1130 |
+
while (coordinate = this.coordinates(i)) {
|
1131 |
+
if (coordinate * revert >= width) {
|
1132 |
+
break;
|
1133 |
+
}
|
1134 |
+
maximum = ++i;
|
1135 |
}
|
|
|
|
|
1136 |
} else {
|
1137 |
+
throw 'Can not detect maximum absolute position.'
|
|
|
|
|
|
|
|
|
1138 |
}
|
1139 |
|
1140 |
+
return maximum;
|
1141 |
};
|
1142 |
|
1143 |
/**
|
1144 |
+
* Gets the minimum position for an item.
|
1145 |
* @public
|
1146 |
* @param {Boolean} [relative=false] - Whether to return an absolute position or a relative position.
|
1147 |
* @returns {Number}
|
1148 |
*/
|
1149 |
Owl.prototype.minimum = function(relative) {
|
1150 |
+
if (relative) {
|
1151 |
+
return 0;
|
1152 |
+
}
|
1153 |
+
|
1154 |
+
return this._clones.length / 2;
|
1155 |
};
|
1156 |
|
1157 |
/**
|
1224 |
* @returns {Number|Array.<Number>} - The coordinate of the item in pixel or all coordinates.
|
1225 |
*/
|
1226 |
Owl.prototype.coordinates = function(position) {
|
1227 |
+
var coordinate = null;
|
|
|
|
|
1228 |
|
1229 |
if (position === undefined) {
|
1230 |
return $.map(this._coordinates, $.proxy(function(coordinate, index) {
|
1233 |
}
|
1234 |
|
1235 |
if (this.settings.center) {
|
|
|
|
|
|
|
|
|
|
|
1236 |
coordinate = this._coordinates[position];
|
1237 |
+
coordinate += (this.width() - coordinate + (this._coordinates[position - 1] || 0)) / 2 * (this.settings.rtl ? -1 : 1);
|
1238 |
} else {
|
1239 |
+
coordinate = this._coordinates[position - 1] || 0;
|
1240 |
}
|
1241 |
|
|
|
|
|
1242 |
return coordinate;
|
1243 |
};
|
1244 |
|
1251 |
* @returns {Number} - The time in milliseconds for the translation.
|
1252 |
*/
|
1253 |
Owl.prototype.duration = function(from, to, factor) {
|
|
|
|
|
|
|
|
|
1254 |
return Math.min(Math.max(Math.abs(to - from), 1), 6) * Math.abs((factor || this.settings.smartSpeed));
|
1255 |
};
|
1256 |
|
1261 |
* @param {Number} [speed] - The time in milliseconds for the transition.
|
1262 |
*/
|
1263 |
Owl.prototype.to = function(position, speed) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1264 |
if (this.settings.loop) {
|
1265 |
+
var distance = position - this.relative(this.current()),
|
1266 |
+
revert = this.current(),
|
1267 |
+
before = this.current(),
|
1268 |
+
after = this.current() + distance,
|
1269 |
+
direction = before - after < 0 ? true : false,
|
1270 |
+
items = this._clones.length + this._items.length;
|
1271 |
+
|
1272 |
+
if (after < this.settings.items && direction === false) {
|
1273 |
+
revert = before + this._items.length;
|
1274 |
+
this.reset(revert);
|
1275 |
+
} else if (after >= items - this.settings.items && direction === true) {
|
1276 |
+
revert = before - this._items.length;
|
1277 |
+
this.reset(revert);
|
1278 |
}
|
1279 |
+
window.clearTimeout(this.e._goToLoop);
|
1280 |
+
this.e._goToLoop = window.setTimeout($.proxy(function() {
|
1281 |
+
this.speed(this.duration(this.current(), revert + distance, speed));
|
1282 |
+
this.current(revert + distance);
|
1283 |
+
this.update();
|
1284 |
+
}, this), 30);
|
|
|
|
|
|
|
|
|
|
|
|
|
1285 |
} else {
|
1286 |
+
this.speed(this.duration(this.current(), position, speed));
|
1287 |
+
this.current(position);
|
|
|
|
|
|
|
|
|
|
|
1288 |
this.update();
|
1289 |
}
|
1290 |
};
|
1314 |
* @protected
|
1315 |
* @param {Event} event - The event arguments.
|
1316 |
*/
|
1317 |
+
Owl.prototype.transitionEnd = function(event) {
|
1318 |
|
1319 |
// if css2 animation then event object is undefined
|
1320 |
if (event !== undefined) {
|
1326 |
}
|
1327 |
}
|
1328 |
|
1329 |
+
this.state.inMotion = false;
|
1330 |
this.trigger('translated');
|
1331 |
};
|
1332 |
|
1375 |
this._mergers.push(item.find('[data-merge]').andSelf('[data-merge]').attr('data-merge') * 1 || 1);
|
1376 |
}, this));
|
1377 |
|
1378 |
+
this.reset($.isNumeric(this.settings.startPosition) ? this.settings.startPosition : 0);
|
1379 |
|
1380 |
this.invalidate('items');
|
1381 |
};
|
1388 |
* @param {Number} [position] - The relative position at which to insert the item otherwise the item will be added to the end.
|
1389 |
*/
|
1390 |
Owl.prototype.add = function(content, position) {
|
|
|
|
|
1391 |
position = position === undefined ? this._items.length : this.normalize(position, true);
|
|
|
1392 |
|
1393 |
this.trigger('add', { content: content, position: position });
|
1394 |
|
|
|
|
|
1395 |
if (this._items.length === 0 || position === this._items.length) {
|
1396 |
+
this.$stage.append(content);
|
|
|
1397 |
this._items.push(content);
|
1398 |
this._mergers.push(content.find('[data-merge]').andSelf('[data-merge]').attr('data-merge') * 1 || 1);
|
1399 |
} else {
|
1402 |
this._mergers.splice(position, 0, content.find('[data-merge]').andSelf('[data-merge]').attr('data-merge') * 1 || 1);
|
1403 |
}
|
1404 |
|
|
|
|
|
1405 |
this.invalidate('items');
|
1406 |
|
1407 |
this.trigger('added', { content: content, position: position });
|
1432 |
};
|
1433 |
|
1434 |
/**
|
1435 |
+
* Adds triggerable events.
|
|
|
1436 |
* @protected
|
1437 |
*/
|
1438 |
+
Owl.prototype.addTriggerableEvents = function() {
|
1439 |
+
var handler = $.proxy(function(callback, event) {
|
1440 |
+
return $.proxy(function(e) {
|
1441 |
+
if (e.relatedTarget !== this) {
|
1442 |
+
this.suppress([ event ]);
|
1443 |
+
callback.apply(this, [].slice.call(arguments, 1));
|
1444 |
+
this.release([ event ]);
|
1445 |
+
}
|
1446 |
+
}, this);
|
1447 |
+
}, this);
|
1448 |
+
|
1449 |
+
$.each({
|
1450 |
+
'next': this.next,
|
1451 |
+
'prev': this.prev,
|
1452 |
+
'to': this.to,
|
1453 |
+
'destroy': this.destroy,
|
1454 |
+
'refresh': this.refresh,
|
1455 |
+
'replace': this.replace,
|
1456 |
+
'add': this.add,
|
1457 |
+
'remove': this.remove
|
1458 |
+
}, $.proxy(function(event, callback) {
|
1459 |
+
this.$element.on(event + '.owl.carousel', handler(callback, event + '.owl.carousel'));
|
1460 |
}, this));
|
1461 |
+
|
1462 |
+
};
|
1463 |
+
|
1464 |
+
/**
|
1465 |
+
* Watches the visibility of the carousel element.
|
1466 |
+
* @protected
|
1467 |
+
*/
|
1468 |
+
Owl.prototype.watchVisibility = function() {
|
1469 |
+
|
1470 |
+
// test on zepto
|
1471 |
+
if (!isElVisible(this.$element.get(0))) {
|
1472 |
+
this.$element.addClass('owl-hidden');
|
1473 |
+
window.clearInterval(this.e._checkVisibile);
|
1474 |
+
this.e._checkVisibile = window.setInterval($.proxy(checkVisible, this), 500);
|
1475 |
+
}
|
1476 |
+
|
1477 |
+
function isElVisible(el) {
|
1478 |
+
return el.offsetWidth > 0 && el.offsetHeight > 0;
|
1479 |
+
}
|
1480 |
+
|
1481 |
+
function checkVisible() {
|
1482 |
+
if (isElVisible(this.$element.get(0))) {
|
1483 |
+
this.$element.removeClass('owl-hidden');
|
1484 |
+
this.refresh();
|
1485 |
+
window.clearInterval(this.e._checkVisibile);
|
1486 |
+
}
|
1487 |
+
}
|
1488 |
+
};
|
1489 |
+
|
1490 |
+
/**
|
1491 |
+
* Preloads images with auto width.
|
1492 |
+
* @protected
|
1493 |
+
* @todo Still to test
|
1494 |
+
*/
|
1495 |
+
Owl.prototype.preloadAutoWidthImages = function(imgs) {
|
1496 |
+
var loaded, that, $el, img;
|
1497 |
+
|
1498 |
+
loaded = 0;
|
1499 |
+
that = this;
|
1500 |
+
imgs.each(function(i, el) {
|
1501 |
+
$el = $(el);
|
1502 |
+
img = new Image();
|
1503 |
+
|
1504 |
+
img.onload = function() {
|
1505 |
+
loaded++;
|
1506 |
+
$el.attr('src', img.src);
|
1507 |
+
$el.css('opacity', 1);
|
1508 |
+
if (loaded >= imgs.length) {
|
1509 |
+
that.state.imagesLoaded = true;
|
1510 |
+
that.initialize();
|
1511 |
+
}
|
1512 |
+
};
|
1513 |
+
|
1514 |
+
img.src = $el.attr('src') || $el.attr('data-src') || $el.attr('data-src-retina');
|
1515 |
+
});
|
1516 |
};
|
1517 |
|
1518 |
/**
|
1521 |
*/
|
1522 |
Owl.prototype.destroy = function() {
|
1523 |
|
1524 |
+
if (this.$element.hasClass(this.settings.themeClass)) {
|
1525 |
+
this.$element.removeClass(this.settings.themeClass);
|
1526 |
+
}
|
1527 |
|
1528 |
if (this.settings.responsive !== false) {
|
1529 |
+
$(window).off('resize.owl.carousel');
|
1530 |
+
}
|
1531 |
+
|
1532 |
+
if (this.transitionEndVendor) {
|
1533 |
+
this.off(this.$stage.get(0), this.transitionEndVendor, this.e._transitionEnd);
|
1534 |
}
|
1535 |
|
1536 |
+
for ( var i in this._plugins) {
|
1537 |
this._plugins[i].destroy();
|
1538 |
}
|
1539 |
|
1540 |
+
if (this.settings.mouseDrag || this.settings.touchDrag) {
|
1541 |
+
this.$stage.off('mousedown touchstart touchcancel');
|
1542 |
+
$(document).off('.owl.dragEvents');
|
1543 |
+
this.$stage.get(0).onselectstart = function() {};
|
1544 |
+
this.$stage.off('dragstart', function() { return false });
|
1545 |
+
}
|
1546 |
+
|
1547 |
+
// remove event handlers in the ".owl.carousel" namespace
|
1548 |
+
this.$element.off('.owl');
|
1549 |
+
|
1550 |
this.$stage.children('.cloned').remove();
|
1551 |
+
this.e = null;
|
1552 |
+
this.$element.removeData('owlCarousel');
|
1553 |
|
|
|
1554 |
this.$stage.children().contents().unwrap();
|
1555 |
this.$stage.children().unwrap();
|
1556 |
+
this.$stage.unwrap();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1557 |
};
|
1558 |
|
1559 |
/**
|
1612 |
};
|
1613 |
|
1614 |
/**
|
1615 |
+
* Triggers an public event.
|
|
|
1616 |
* @protected
|
1617 |
* @param {String} name - The event name.
|
1618 |
* @param {*} [data=null] - The event data.
|
1619 |
+
* @param {String} [namespace=.owl.carousel] - The event namespace.
|
|
|
|
|
1620 |
* @returns {Event} - The event arguments.
|
1621 |
*/
|
1622 |
+
Owl.prototype.trigger = function(name, data, namespace) {
|
1623 |
var status = {
|
1624 |
item: { count: this._items.length, index: this.current() }
|
1625 |
}, handler = $.camelCase(
|
1637 |
}
|
1638 |
});
|
1639 |
|
|
|
1640 |
this.$element.trigger(event);
|
1641 |
|
1642 |
if (this.settings && typeof this.settings[handler] === 'function') {
|
1643 |
+
this.settings[handler].apply(this, event);
|
1644 |
}
|
1645 |
}
|
1646 |
|
1647 |
return event;
|
1648 |
};
|
1649 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1650 |
/**
|
1651 |
* Suppresses events.
|
1652 |
* @protected
|
1656 |
$.each(events, $.proxy(function(index, event) {
|
1657 |
this._supress[event] = true;
|
1658 |
}, this));
|
1659 |
+
}
|
1660 |
|
1661 |
/**
|
1662 |
* Releases suppressed events.
|
1667 |
$.each(events, $.proxy(function(index, event) {
|
1668 |
delete this._supress[event];
|
1669 |
}, this));
|
1670 |
+
}
|
1671 |
|
1672 |
/**
|
1673 |
+
* Checks the availability of some browser features.
|
|
|
1674 |
* @protected
|
|
|
|
|
1675 |
*/
|
1676 |
+
Owl.prototype.browserSupport = function() {
|
1677 |
+
this.support3d = isPerspective();
|
1678 |
|
1679 |
+
if (this.support3d) {
|
1680 |
+
this.transformVendor = isTransform();
|
1681 |
|
1682 |
+
// take transitionend event name by detecting transition
|
1683 |
+
var endVendors = [ 'transitionend', 'webkitTransitionEnd', 'transitionend', 'oTransitionEnd' ];
|
1684 |
+
this.transitionEndVendor = endVendors[isTransition()];
|
1685 |
|
1686 |
+
// take vendor name from transform name
|
1687 |
+
this.vendorName = this.transformVendor.replace(/Transform/i, '');
|
1688 |
+
this.vendorName = this.vendorName !== '' ? '-' + this.vendorName.toLowerCase() + '-' : '';
|
|
|
|
|
|
|
1689 |
}
|
1690 |
|
1691 |
+
this.state.orientation = window.orientation;
|
1692 |
};
|
1693 |
|
1694 |
/**
|
1695 |
+
* Get touch/drag coordinats.
|
1696 |
+
* @private
|
1697 |
+
* @param {event} - mousedown/touchstart event
|
1698 |
+
* @returns {object} - Contains X and Y of current mouse/touch position
|
1699 |
*/
|
|
|
|
|
|
|
1700 |
|
1701 |
+
function getTouches(event) {
|
1702 |
+
if (event.touches !== undefined) {
|
1703 |
+
return {
|
1704 |
+
x: event.touches[0].pageX,
|
1705 |
+
y: event.touches[0].pageY
|
1706 |
+
};
|
1707 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1708 |
|
1709 |
+
if (event.touches === undefined) {
|
1710 |
+
if (event.pageX !== undefined) {
|
1711 |
+
return {
|
1712 |
+
x: event.pageX,
|
1713 |
+
y: event.pageY
|
1714 |
+
};
|
1715 |
+
}
|
1716 |
|
1717 |
+
if (event.pageX === undefined) {
|
1718 |
+
return {
|
1719 |
+
x: event.clientX,
|
1720 |
+
y: event.clientY
|
1721 |
+
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1722 |
}
|
1723 |
+
}
|
1724 |
+
}
|
1725 |
|
1726 |
+
/**
|
1727 |
+
* Checks for CSS support.
|
1728 |
+
* @private
|
1729 |
+
* @param {Array} array - The CSS properties to check for.
|
1730 |
+
* @returns {Array} - Contains the supported CSS property name and its index or `false`.
|
1731 |
+
*/
|
1732 |
+
function isStyleSupported(array) {
|
1733 |
+
var p, s, fake = document.createElement('div'), list = array;
|
1734 |
+
for (p in list) {
|
1735 |
+
s = list[p];
|
1736 |
+
if (typeof fake.style[s] !== 'undefined') {
|
1737 |
+
fake = null;
|
1738 |
+
return [ s, p ];
|
1739 |
}
|
1740 |
+
}
|
1741 |
+
return [ false ];
|
1742 |
+
}
|
1743 |
|
1744 |
/**
|
1745 |
+
* Checks for CSS transition support.
|
1746 |
+
* @private
|
1747 |
+
* @todo Realy bad design
|
1748 |
+
* @returns {Number}
|
1749 |
*/
|
1750 |
+
function isTransition() {
|
1751 |
+
return isStyleSupported([ 'transition', 'WebkitTransition', 'MozTransition', 'OTransition' ])[1];
|
1752 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1753 |
|
1754 |
/**
|
1755 |
+
* Checks for CSS transform support.
|
1756 |
+
* @private
|
1757 |
+
* @returns {String} The supported property name or false.
|
1758 |
*/
|
1759 |
+
function isTransform() {
|
1760 |
+
return isStyleSupported([ 'transform', 'WebkitTransform', 'MozTransform', 'OTransform', 'msTransform' ])[0];
|
1761 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1762 |
|
1763 |
/**
|
1764 |
+
* Checks for CSS perspective support.
|
1765 |
+
* @private
|
1766 |
+
* @returns {String} The supported property name or false.
|
1767 |
*/
|
1768 |
+
function isPerspective() {
|
1769 |
+
return isStyleSupported([ 'perspective', 'webkitPerspective', 'MozPerspective', 'OPerspective', 'MsPerspective' ])[0];
|
1770 |
+
}
|
|
|
1771 |
|
1772 |
/**
|
1773 |
+
* Checks wether touch is supported or not.
|
1774 |
+
* @private
|
1775 |
+
* @returns {Boolean}
|
1776 |
*/
|
1777 |
+
function isTouchSupport() {
|
1778 |
+
return 'ontouchstart' in window || !!(navigator.msMaxTouchPoints);
|
1779 |
+
}
|
|
|
|
|
|
|
|
|
|
|
1780 |
|
1781 |
/**
|
1782 |
+
* Checks wether touch is supported or not for IE.
|
1783 |
+
* @private
|
1784 |
+
* @returns {Boolean}
|
1785 |
*/
|
1786 |
+
function isTouchSupportIE() {
|
1787 |
+
return window.navigator.msPointerEnabled;
|
1788 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1789 |
|
1790 |
/**
|
1791 |
+
* The jQuery Plugin for the Owl Carousel
|
1792 |
+
* @public
|
1793 |
*/
|
1794 |
+
$.fn.owlCarousel = function(options) {
|
1795 |
+
return this.each(function() {
|
1796 |
+
if (!$(this).data('owlCarousel')) {
|
1797 |
+
$(this).data('owlCarousel', new Owl(this, options));
|
1798 |
+
}
|
1799 |
+
});
|
|
|
|
|
|
|
|
|
|
|
1800 |
};
|
1801 |
|
1802 |
+
/**
|
1803 |
+
* The constructor for the jQuery Plugin
|
1804 |
+
* @public
|
1805 |
+
*/
|
1806 |
+
$.fn.owlCarousel.Constructor = Owl;
|
1807 |
|
1808 |
})(window.Zepto || window.jQuery, window, document);
|
1809 |
|
1810 |
/**
|
1811 |
* Lazy Plugin
|
1812 |
+
* @version 2.0.0
|
1813 |
* @author Bartosz Wojciechowski
|
|
|
1814 |
* @license The MIT License (MIT)
|
1815 |
*/
|
1816 |
;(function($, window, document, undefined) {
|
1842 |
* @type {Object}
|
1843 |
*/
|
1844 |
this._handlers = {
|
1845 |
+
'initialized.owl.carousel change.owl.carousel': $.proxy(function(e) {
|
1846 |
if (!e.namespace) {
|
1847 |
return;
|
1848 |
}
|
1855 |
var settings = this._core.settings,
|
1856 |
n = (settings.center && Math.ceil(settings.items / 2) || settings.items),
|
1857 |
i = ((settings.center && n * -1) || 0),
|
1858 |
+
position = ((e.property && e.property.value) || this._core.current()) + i,
|
1859 |
clones = this._core.clones().length,
|
1860 |
load = $.proxy(function(i, v) { this.load(v) }, this);
|
1861 |
|
1862 |
while (i++ < n) {
|
1863 |
this.load(clones / 2 + this._core.relative(position));
|
1864 |
+
clones && $.each(this._core.clones(this._core.relative(position++)), load);
|
|
|
1865 |
}
|
1866 |
}
|
1867 |
}, this)
|
1872 |
|
1873 |
// register event handler
|
1874 |
this._core.$element.on(this._handlers);
|
1875 |
+
}
|
1876 |
|
1877 |
/**
|
1878 |
* Default options.
|
1880 |
*/
|
1881 |
Lazy.Defaults = {
|
1882 |
lazyLoad: false
|
1883 |
+
}
|
1884 |
|
1885 |
/**
|
1886 |
* Loads all resources of an item at the specified position.
|
1920 |
}, this));
|
1921 |
|
1922 |
this._loaded.push($item.get(0));
|
1923 |
+
}
|
1924 |
|
1925 |
/**
|
1926 |
* Destroys the plugin.
|
1935 |
for (property in Object.getOwnPropertyNames(this)) {
|
1936 |
typeof this[property] != 'function' && (this[property] = null);
|
1937 |
}
|
1938 |
+
}
|
1939 |
|
1940 |
$.fn.owlCarousel.Constructor.Plugins.Lazy = Lazy;
|
1941 |
|
1943 |
|
1944 |
/**
|
1945 |
* AutoHeight Plugin
|
1946 |
+
* @version 2.0.0
|
1947 |
* @author Bartosz Wojciechowski
|
|
|
1948 |
* @license The MIT License (MIT)
|
1949 |
*/
|
1950 |
;(function($, window, document, undefined) {
|
1968 |
* @type {Object}
|
1969 |
*/
|
1970 |
this._handlers = {
|
1971 |
+
'initialized.owl.carousel': $.proxy(function() {
|
1972 |
+
if (this._core.settings.autoHeight) {
|
1973 |
this.update();
|
1974 |
}
|
1975 |
}, this),
|
1976 |
'changed.owl.carousel': $.proxy(function(e) {
|
1977 |
+
if (this._core.settings.autoHeight && e.property.name == 'position'){
|
1978 |
this.update();
|
1979 |
}
|
1980 |
}, this),
|
1981 |
'loaded.owl.lazy': $.proxy(function(e) {
|
1982 |
+
if (this._core.settings.autoHeight && e.element.closest('.' + this._core.settings.itemClass)
|
1983 |
+
=== this._core.$stage.children().eq(this._core.current())) {
|
1984 |
this.update();
|
1985 |
}
|
1986 |
}, this)
|
2006 |
* Updates the view.
|
2007 |
*/
|
2008 |
AutoHeight.prototype.update = function() {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009 |
this._core.$stage.parent()
|
2010 |
+
.height(this._core.$stage.children().eq(this._core.current()).height())
|
2011 |
.addClass(this._core.settings.autoHeightClass);
|
2012 |
};
|
2013 |
|
2028 |
|
2029 |
/**
|
2030 |
* Video Plugin
|
2031 |
+
* @version 2.0.0
|
2032 |
* @author Bartosz Wojciechowski
|
|
|
2033 |
* @license The MIT License (MIT)
|
2034 |
*/
|
2035 |
;(function($, window, document, undefined) {
|
2061 |
*/
|
2062 |
this._playing = null;
|
2063 |
|
2064 |
+
/**
|
2065 |
+
* Whether this is in fullscreen or not.
|
2066 |
+
* @protected
|
2067 |
+
* @type {Boolean}
|
2068 |
+
*/
|
2069 |
+
this._fullscreen = false;
|
2070 |
+
|
2071 |
/**
|
2072 |
* All event handlers.
|
|
|
2073 |
* @protected
|
2074 |
* @type {Object}
|
2075 |
*/
|
2076 |
this._handlers = {
|
|
|
|
|
|
|
|
|
|
|
2077 |
'resize.owl.carousel': $.proxy(function(e) {
|
2078 |
+
if (this._core.settings.video && !this.isInFullScreen()) {
|
2079 |
e.preventDefault();
|
2080 |
}
|
2081 |
}, this),
|
2082 |
+
'refresh.owl.carousel changed.owl.carousel': $.proxy(function(e) {
|
2083 |
+
if (this._playing) {
|
|
|
|
|
|
|
|
|
|
|
2084 |
this.stop();
|
2085 |
}
|
2086 |
}, this),
|
2087 |
'prepared.owl.carousel': $.proxy(function(e) {
|
|
|
|
|
|
|
|
|
2088 |
var $element = $(e.content).find('.owl-video');
|
|
|
2089 |
if ($element.length) {
|
2090 |
$element.css('display', 'none');
|
2091 |
this.fetch($element, $(e.content));
|
2115 |
};
|
2116 |
|
2117 |
/**
|
2118 |
+
* Gets the video ID and the type (YouTube/Vimeo only).
|
2119 |
* @protected
|
2120 |
* @param {jQuery} target - The target containing the video data.
|
2121 |
* @param {jQuery} item - The item containing the video.
|
2122 |
*/
|
2123 |
Video.prototype.fetch = function(target, item) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2124 |
|
2125 |
+
var type = target.attr('data-vimeo-id') ? 'vimeo' : 'youtube',
|
2126 |
+
id = target.attr('data-vimeo-id') || target.attr('data-youtube-id'),
|
2127 |
+
width = target.attr('data-width') || this._core.settings.videoWidth,
|
2128 |
+
height = target.attr('data-height') || this._core.settings.videoHeight,
|
2129 |
+
url = target.attr('href');
|
|
|
|
|
|
|
2130 |
|
2131 |
+
if (url) {
|
2132 |
+
id = url.match(/(http:|https:|)\/\/(player.|www.)?(vimeo\.com|youtu(be\.com|\.be|be\.googleapis\.com))\/(video\/|embed\/|watch\?v=|v\/)?([A-Za-z0-9._%-]*)(\&\S+)?/);
|
|
|
|
|
2133 |
|
2134 |
if (id[3].indexOf('youtu') > -1) {
|
2135 |
type = 'youtube';
|
2136 |
} else if (id[3].indexOf('vimeo') > -1) {
|
2137 |
type = 'vimeo';
|
|
|
|
|
2138 |
} else {
|
2139 |
throw new Error('Video URL not supported.');
|
2140 |
}
|
2163 |
* @see `fetch`
|
2164 |
*/
|
2165 |
Video.prototype.thumbnail = function(target, video) {
|
2166 |
+
|
2167 |
var tnLink,
|
2168 |
icon,
|
2169 |
path,
|
2200 |
}
|
2201 |
|
2202 |
if (video.type === 'youtube') {
|
2203 |
+
path = "http://img.youtube.com/vi/" + video.id + "/hqdefault.jpg";
|
2204 |
create(path);
|
2205 |
} else if (video.type === 'vimeo') {
|
2206 |
$.ajax({
|
2207 |
type: 'GET',
|
2208 |
+
url: 'http://vimeo.com/api/v2/video/' + video.id + '.json',
|
2209 |
jsonp: 'callback',
|
2210 |
dataType: 'jsonp',
|
2211 |
success: function(data) {
|
2213 |
create(path);
|
2214 |
}
|
2215 |
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2216 |
}
|
2217 |
};
|
2218 |
|
2225 |
this._playing.find('.owl-video-frame').remove();
|
2226 |
this._playing.removeClass('owl-video-playing');
|
2227 |
this._playing = null;
|
|
|
|
|
2228 |
};
|
2229 |
|
2230 |
/**
|
2231 |
* Starts the current video.
|
2232 |
* @public
|
2233 |
+
* @param {Event} ev - The event arguments.
|
2234 |
*/
|
2235 |
+
Video.prototype.play = function(ev) {
|
2236 |
+
this._core.trigger('play', null, 'video');
|
|
|
|
|
|
|
|
|
|
|
2237 |
|
2238 |
if (this._playing) {
|
2239 |
+
this.stop();
|
2240 |
}
|
2241 |
|
2242 |
+
var target = $(ev.target || ev.srcElement),
|
2243 |
+
item = target.closest('.' + this._core.settings.itemClass),
|
2244 |
+
video = this._videos[item.attr('data-video')],
|
2245 |
+
width = video.width || '100%',
|
2246 |
+
height = video.height || this._core.$stage.height(),
|
2247 |
+
html, wrap;
|
2248 |
|
2249 |
if (video.type === 'youtube') {
|
2250 |
+
html = '<iframe width="' + width + '" height="' + height + '" src="http://www.youtube.com/embed/'
|
2251 |
+
+ video.id + '?autoplay=1&v=' + video.id + '" frameborder="0" allowfullscreen></iframe>';
|
2252 |
} else if (video.type === 'vimeo') {
|
2253 |
+
html = '<iframe src="http://player.vimeo.com/video/' + video.id + '?autoplay=1" width="' + width
|
2254 |
+
+ '" height="' + height
|
2255 |
+
+ '" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>';
|
|
|
|
|
|
|
|
|
2256 |
}
|
2257 |
|
2258 |
+
item.addClass('owl-video-playing');
|
2259 |
+
this._playing = item;
|
2260 |
|
2261 |
+
wrap = $('<div style="height:' + height + 'px; width:' + width + 'px" class="owl-video-frame">'
|
2262 |
+
+ html + '</div>');
|
2263 |
+
target.after(wrap);
|
2264 |
};
|
2265 |
|
2266 |
/**
|
2270 |
* @returns {Boolean}
|
2271 |
*/
|
2272 |
Video.prototype.isInFullScreen = function() {
|
|
|
|
|
2273 |
|
2274 |
+
// if Vimeo Fullscreen mode
|
2275 |
+
var element = document.fullscreenElement || document.mozFullScreenElement
|
2276 |
+
|| document.webkitFullscreenElement;
|
2277 |
+
|
2278 |
+
if (element && $(element).parent().hasClass('owl-video-frame')) {
|
2279 |
+
this._core.speed(0);
|
2280 |
+
this._fullscreen = true;
|
2281 |
+
}
|
2282 |
+
|
2283 |
+
if (element && this._fullscreen && this._playing) {
|
2284 |
+
return false;
|
2285 |
+
}
|
2286 |
+
|
2287 |
+
// comming back from fullscreen
|
2288 |
+
if (this._fullscreen) {
|
2289 |
+
this._fullscreen = false;
|
2290 |
+
return false;
|
2291 |
+
}
|
2292 |
+
|
2293 |
+
// check full screen mode and window orientation
|
2294 |
+
if (this._playing) {
|
2295 |
+
if (this._core.state.orientation !== window.orientation) {
|
2296 |
+
this._core.state.orientation = window.orientation;
|
2297 |
+
return false;
|
2298 |
+
}
|
2299 |
+
}
|
2300 |
+
|
2301 |
+
return true;
|
2302 |
};
|
2303 |
|
2304 |
/**
|
2323 |
|
2324 |
/**
|
2325 |
* Animate Plugin
|
2326 |
+
* @version 2.0.0
|
2327 |
* @author Bartosz Wojciechowski
|
|
|
2328 |
* @license The MIT License (MIT)
|
2329 |
*/
|
2330 |
;(function($, window, document, undefined) {
|
2343 |
|
2344 |
this.handlers = {
|
2345 |
'change.owl.carousel': $.proxy(function(e) {
|
2346 |
+
if (e.property.name == 'position') {
|
2347 |
this.previous = this.core.current();
|
2348 |
this.next = e.property.value;
|
2349 |
}
|
2350 |
}, this),
|
2351 |
'drag.owl.carousel dragged.owl.carousel translated.owl.carousel': $.proxy(function(e) {
|
2352 |
+
this.swapping = e.type == 'translated';
|
|
|
|
|
2353 |
}, this),
|
2354 |
'translate.owl.carousel': $.proxy(function(e) {
|
2355 |
+
if (this.swapping && (this.core.options.animateOut || this.core.options.animateIn)) {
|
2356 |
this.swap();
|
2357 |
}
|
2358 |
}, this)
|
2377 |
*/
|
2378 |
Animate.prototype.swap = function() {
|
2379 |
|
2380 |
+
if (this.core.settings.items !== 1 || !this.core.support3d) {
|
|
|
|
|
|
|
|
|
2381 |
return;
|
2382 |
}
|
2383 |
|
2396 |
|
2397 |
if (outgoing) {
|
2398 |
left = this.core.coordinates(this.previous) - this.core.coordinates(this.next);
|
2399 |
+
previous.css( { 'left': left + 'px' } )
|
|
|
2400 |
.addClass('animated owl-animated-out')
|
2401 |
+
.addClass(outgoing)
|
2402 |
+
.one('webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend', clear);
|
2403 |
}
|
2404 |
|
2405 |
if (incoming) {
|
2406 |
+
next.addClass('animated owl-animated-in')
|
2407 |
+
.addClass(incoming)
|
2408 |
+
.one('webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend', clear);
|
2409 |
}
|
2410 |
};
|
2411 |
|
2414 |
.removeClass('animated owl-animated-out owl-animated-in')
|
2415 |
.removeClass(this.core.settings.animateIn)
|
2416 |
.removeClass(this.core.settings.animateOut);
|
2417 |
+
this.core.transitionEnd();
|
2418 |
+
}
|
2419 |
|
2420 |
/**
|
2421 |
* Destroys the plugin.
|
2438 |
|
2439 |
/**
|
2440 |
* Autoplay Plugin
|
2441 |
+
* @version 2.0.0
|
2442 |
* @author Bartosz Wojciechowski
|
|
|
|
|
2443 |
* @license The MIT License (MIT)
|
2444 |
*/
|
2445 |
;(function($, window, document, undefined) {
|
2449 |
* @class The Autoplay Plugin
|
2450 |
* @param {Owl} scope - The Owl Carousel
|
2451 |
*/
|
2452 |
+
var Autoplay = function(scope) {
|
2453 |
+
this.core = scope;
|
2454 |
+
this.core.options = $.extend({}, Autoplay.Defaults, this.core.options);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2455 |
|
2456 |
+
this.handlers = {
|
2457 |
+
'translated.owl.carousel refreshed.owl.carousel': $.proxy(function() {
|
2458 |
+
this.autoplay();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2459 |
}, this),
|
2460 |
'play.owl.autoplay': $.proxy(function(e, t, s) {
|
2461 |
+
this.play(t, s);
|
|
|
|
|
2462 |
}, this),
|
2463 |
+
'stop.owl.autoplay': $.proxy(function() {
|
2464 |
+
this.stop();
|
|
|
|
|
2465 |
}, this),
|
2466 |
'mouseover.owl.autoplay': $.proxy(function() {
|
2467 |
+
if (this.core.settings.autoplayHoverPause) {
|
2468 |
this.pause();
|
2469 |
}
|
2470 |
}, this),
|
2471 |
'mouseleave.owl.autoplay': $.proxy(function() {
|
2472 |
+
if (this.core.settings.autoplayHoverPause) {
|
2473 |
+
this.autoplay();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2474 |
}
|
2475 |
}, this)
|
2476 |
};
|
2477 |
|
2478 |
+
this.core.$element.on(this.handlers);
|
|
|
|
|
|
|
|
|
2479 |
};
|
2480 |
|
2481 |
/**
|
2489 |
autoplaySpeed: false
|
2490 |
};
|
2491 |
|
2492 |
+
/**
|
2493 |
+
* @protected
|
2494 |
+
* @todo Must be documented.
|
2495 |
+
*/
|
2496 |
+
Autoplay.prototype.autoplay = function() {
|
2497 |
+
if (this.core.settings.autoplay && !this.core.state.videoPlay) {
|
2498 |
+
window.clearInterval(this.interval);
|
2499 |
+
|
2500 |
+
this.interval = window.setInterval($.proxy(function() {
|
2501 |
+
this.play();
|
2502 |
+
}, this), this.core.settings.autoplayTimeout);
|
2503 |
+
} else {
|
2504 |
+
window.clearInterval(this.interval);
|
2505 |
+
}
|
2506 |
+
};
|
2507 |
+
|
2508 |
/**
|
2509 |
* Starts the autoplay.
|
2510 |
* @public
|
2511 |
+
* @param {Number} [timeout] - ...
|
2512 |
+
* @param {Number} [speed] - ...
|
2513 |
+
* @returns {Boolean|undefined} - ...
|
2514 |
+
* @todo Must be documented.
|
2515 |
*/
|
2516 |
Autoplay.prototype.play = function(timeout, speed) {
|
2517 |
+
// if tab is inactive - doesnt work in <IE10
|
2518 |
+
if (document.hidden === true) {
|
|
|
2519 |
return;
|
2520 |
}
|
2521 |
|
2522 |
+
if (this.core.state.isTouch || this.core.state.isScrolling
|
2523 |
+
|| this.core.state.isSwiping || this.core.state.inMotion) {
|
2524 |
+
return;
|
2525 |
+
}
|
2526 |
|
2527 |
+
if (this.core.settings.autoplay === false) {
|
2528 |
+
window.clearInterval(this.interval);
|
2529 |
+
return;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2530 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2531 |
|
2532 |
+
this.core.next(this.core.settings.autoplaySpeed);
|
|
|
|
|
|
|
|
|
|
|
2533 |
};
|
2534 |
|
2535 |
/**
|
2537 |
* @public
|
2538 |
*/
|
2539 |
Autoplay.prototype.stop = function() {
|
2540 |
+
window.clearInterval(this.interval);
|
|
|
|
|
|
|
|
|
|
|
2541 |
};
|
2542 |
|
2543 |
/**
|
2544 |
+
* Pauses the autoplay.
|
2545 |
* @public
|
2546 |
*/
|
2547 |
Autoplay.prototype.pause = function() {
|
2548 |
+
window.clearInterval(this.interval);
|
|
|
|
|
|
|
|
|
2549 |
};
|
2550 |
|
2551 |
/**
|
2554 |
Autoplay.prototype.destroy = function() {
|
2555 |
var handler, property;
|
2556 |
|
2557 |
+
window.clearInterval(this.interval);
|
2558 |
|
2559 |
+
for (handler in this.handlers) {
|
2560 |
+
this.core.$element.off(handler, this.handlers[handler]);
|
2561 |
}
|
2562 |
for (property in Object.getOwnPropertyNames(this)) {
|
2563 |
typeof this[property] != 'function' && (this[property] = null);
|
2570 |
|
2571 |
/**
|
2572 |
* Navigation Plugin
|
2573 |
+
* @version 2.0.0
|
2574 |
* @author Artus Kolanowski
|
|
|
2575 |
* @license The MIT License (MIT)
|
2576 |
*/
|
2577 |
;(function($, window, document, undefined) {
|
2642 |
*/
|
2643 |
this._handlers = {
|
2644 |
'prepared.owl.carousel': $.proxy(function(e) {
|
2645 |
+
if (this._core.settings.dotsData) {
|
2646 |
+
this._templates.push($(e.content).find('[data-dot]').andSelf('[data-dot]').attr('data-dot'));
|
|
|
2647 |
}
|
2648 |
}, this),
|
2649 |
+
'add.owl.carousel': $.proxy(function(e) {
|
2650 |
+
if (this._core.settings.dotsData) {
|
2651 |
+
this._templates.splice(e.position, 0, $(e.content).find('[data-dot]').andSelf('[data-dot]').attr('data-dot'));
|
2652 |
}
|
2653 |
}, this),
|
2654 |
+
'remove.owl.carousel prepared.owl.carousel': $.proxy(function(e) {
|
2655 |
+
if (this._core.settings.dotsData) {
|
2656 |
this._templates.splice(e.position, 1);
|
2657 |
}
|
2658 |
}, this),
|
2659 |
+
'change.owl.carousel': $.proxy(function(e) {
|
2660 |
+
if (e.property.name == 'position') {
|
2661 |
+
if (!this._core.state.revert && !this._core.settings.loop && this._core.settings.navRewind) {
|
2662 |
+
var current = this._core.current(),
|
2663 |
+
maximum = this._core.maximum(),
|
2664 |
+
minimum = this._core.minimum();
|
2665 |
+
e.data = e.property.value > maximum
|
2666 |
+
? current >= maximum ? minimum : maximum
|
2667 |
+
: e.property.value < minimum ? maximum : e.property.value;
|
2668 |
+
}
|
2669 |
+
}
|
2670 |
+
}, this),
|
2671 |
'changed.owl.carousel': $.proxy(function(e) {
|
2672 |
+
if (e.property.name == 'position') {
|
2673 |
this.draw();
|
2674 |
}
|
2675 |
}, this),
|
2676 |
+
'refreshed.owl.carousel': $.proxy(function() {
|
2677 |
+
if (!this._initialized) {
|
|
|
2678 |
this.initialize();
|
|
|
|
|
2679 |
this._initialized = true;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2680 |
}
|
2681 |
+
this._core.trigger('refresh', null, 'navigation');
|
2682 |
+
this.update();
|
2683 |
+
this.draw();
|
2684 |
+
this._core.trigger('refreshed', null, 'navigation');
|
2685 |
}, this)
|
2686 |
};
|
2687 |
|
2690 |
|
2691 |
// register event handlers
|
2692 |
this.$element.on(this._handlers);
|
2693 |
+
}
|
2694 |
|
2695 |
/**
|
2696 |
* Default options.
|
2699 |
*/
|
2700 |
Navigation.Defaults = {
|
2701 |
nav: false,
|
2702 |
+
navRewind: true,
|
2703 |
navText: [ 'prev', 'next' ],
|
2704 |
navSpeed: false,
|
2705 |
navElement: 'div',
|
2711 |
dotsClass: 'owl-dots',
|
2712 |
dots: true,
|
2713 |
dotsEach: false,
|
2714 |
+
dotData: false,
|
2715 |
dotsSpeed: false,
|
2716 |
+
dotsContainer: false,
|
2717 |
+
controlsClass: 'owl-controls'
|
2718 |
+
}
|
2719 |
|
2720 |
/**
|
2721 |
* Initializes the layout of the plugin and extends the carousel.
|
2722 |
* @protected
|
2723 |
*/
|
2724 |
Navigation.prototype.initialize = function() {
|
2725 |
+
var $container, override,
|
2726 |
+
options = this._core.settings;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2727 |
|
2728 |
+
// create the indicator template
|
2729 |
+
if (!options.dotsData) {
|
2730 |
this._templates = [ $('<div>')
|
2731 |
+
.addClass(options.dotClass)
|
2732 |
.append($('<span>'))
|
2733 |
.prop('outerHTML') ];
|
2734 |
}
|
2735 |
|
2736 |
+
// create controls container if needed
|
2737 |
+
if (!options.navContainer || !options.dotsContainer) {
|
2738 |
+
this._controls.$container = $('<div>')
|
2739 |
+
.addClass(options.controlsClass)
|
2740 |
+
.appendTo(this.$element);
|
2741 |
+
}
|
2742 |
+
|
2743 |
+
// create DOM structure for absolute navigation
|
2744 |
+
this._controls.$indicators = options.dotsContainer ? $(options.dotsContainer)
|
2745 |
+
: $('<div>').hide().addClass(options.dotsClass).appendTo(this._controls.$container);
|
2746 |
|
2747 |
+
this._controls.$indicators.on('click', 'div', $.proxy(function(e) {
|
2748 |
+
var index = $(e.target).parent().is(this._controls.$indicators)
|
2749 |
? $(e.target).index() : $(e.target).parent().index();
|
2750 |
|
2751 |
e.preventDefault();
|
2752 |
|
2753 |
+
this.to(index, options.dotsSpeed);
|
2754 |
}, this));
|
2755 |
|
2756 |
+
// create DOM structure for relative navigation
|
2757 |
+
$container = options.navContainer ? $(options.navContainer)
|
2758 |
+
: $('<div>').addClass(options.navContainerClass).prependTo(this._controls.$container);
|
2759 |
+
|
2760 |
+
this._controls.$next = $('<' + options.navElement + '>');
|
2761 |
+
this._controls.$previous = this._controls.$next.clone();
|
2762 |
+
|
2763 |
+
this._controls.$previous
|
2764 |
+
.addClass(options.navClass[0])
|
2765 |
+
.html(options.navText[0])
|
2766 |
+
.hide()
|
2767 |
+
.prependTo($container)
|
2768 |
+
.on('click', $.proxy(function(e) {
|
2769 |
+
this.prev(options.navSpeed);
|
2770 |
+
}, this));
|
2771 |
+
this._controls.$next
|
2772 |
+
.addClass(options.navClass[1])
|
2773 |
+
.html(options.navText[1])
|
2774 |
+
.hide()
|
2775 |
+
.appendTo($container)
|
2776 |
+
.on('click', $.proxy(function(e) {
|
2777 |
+
this.next(options.navSpeed);
|
2778 |
+
}, this));
|
2779 |
+
|
2780 |
// override public methods of the carousel
|
2781 |
for (override in this._overrides) {
|
2782 |
this._core[override] = $.proxy(this[override], this);
|
2783 |
}
|
2784 |
+
}
|
2785 |
|
2786 |
/**
|
2787 |
* Destroys the plugin.
|
2802 |
for (property in Object.getOwnPropertyNames(this)) {
|
2803 |
typeof this[property] != 'function' && (this[property] = null);
|
2804 |
}
|
2805 |
+
}
|
2806 |
|
2807 |
/**
|
2808 |
* Updates the internal state.
|
2810 |
*/
|
2811 |
Navigation.prototype.update = function() {
|
2812 |
var i, j, k,
|
2813 |
+
options = this._core.settings,
|
2814 |
lower = this._core.clones().length / 2,
|
2815 |
upper = lower + this._core.items().length,
|
2816 |
+
size = options.center || options.autoWidth || options.dotData
|
2817 |
+
? 1 : options.dotsEach || options.items;
|
|
|
|
|
2818 |
|
2819 |
+
if (options.slideBy !== 'page') {
|
2820 |
+
options.slideBy = Math.min(options.slideBy, options.items);
|
2821 |
}
|
2822 |
|
2823 |
+
if (options.dots || options.slideBy == 'page') {
|
2824 |
this._pages = [];
|
2825 |
|
2826 |
for (i = lower, j = 0, k = 0; i < upper; i++) {
|
2827 |
if (j >= size || j === 0) {
|
2828 |
this._pages.push({
|
2829 |
+
start: i - lower,
|
2830 |
end: i - lower + size - 1
|
2831 |
});
|
|
|
|
|
|
|
2832 |
j = 0, ++k;
|
2833 |
}
|
2834 |
j += this._core.mergers(this._core.relative(i));
|
2835 |
}
|
2836 |
}
|
2837 |
+
}
|
2838 |
|
2839 |
/**
|
2840 |
* Draws the user interface.
|
2841 |
+
* @todo The option `dotData` wont work.
|
2842 |
* @protected
|
2843 |
*/
|
2844 |
Navigation.prototype.draw = function() {
|
2845 |
+
var difference, i, html = '',
|
2846 |
+
options = this._core.settings,
|
2847 |
+
$items = this._core.$stage.children(),
|
2848 |
+
index = this._core.relative(this._core.current());
|
|
|
|
|
|
|
2849 |
|
2850 |
+
if (options.nav && !options.loop && !options.navRewind) {
|
2851 |
+
this._controls.$previous.toggleClass('disabled', index <= 0);
|
2852 |
+
this._controls.$next.toggleClass('disabled', index >= this._core.maximum());
|
2853 |
}
|
2854 |
|
2855 |
+
this._controls.$previous.toggle(options.nav);
|
2856 |
+
this._controls.$next.toggle(options.nav);
|
2857 |
|
2858 |
+
if (options.dots) {
|
2859 |
+
difference = this._pages.length - this._controls.$indicators.children().length;
|
2860 |
|
2861 |
+
if (options.dotData && difference !== 0) {
|
2862 |
+
for (i = 0; i < this._controls.$indicators.children().length; i++) {
|
2863 |
+
html += this._templates[this._core.relative(i)];
|
2864 |
+
}
|
2865 |
+
this._controls.$indicators.html(html);
|
2866 |
} else if (difference > 0) {
|
2867 |
+
html = new Array(difference + 1).join(this._templates[0]);
|
2868 |
+
this._controls.$indicators.append(html);
|
2869 |
} else if (difference < 0) {
|
2870 |
+
this._controls.$indicators.children().slice(difference).remove();
|
2871 |
}
|
2872 |
|
2873 |
+
this._controls.$indicators.find('.active').removeClass('active');
|
2874 |
+
this._controls.$indicators.children().eq($.inArray(this.current(), this._pages)).addClass('active');
|
2875 |
}
|
2876 |
+
|
2877 |
+
this._controls.$indicators.toggle(options.dots);
|
2878 |
+
}
|
2879 |
|
2880 |
/**
|
2881 |
* Extends event data.
|
2888 |
event.page = {
|
2889 |
index: $.inArray(this.current(), this._pages),
|
2890 |
count: this._pages.length,
|
2891 |
+
size: settings && (settings.center || settings.autoWidth || settings.dotData
|
2892 |
? 1 : settings.dotsEach || settings.items)
|
2893 |
};
|
2894 |
+
}
|
2895 |
|
2896 |
/**
|
2897 |
* Gets the current page position of the carousel.
|
2899 |
* @returns {Number}
|
2900 |
*/
|
2901 |
Navigation.prototype.current = function() {
|
2902 |
+
var index = this._core.relative(this._core.current());
|
2903 |
+
return $.grep(this._pages, function(o) {
|
2904 |
+
return o.start <= index && o.end >= index;
|
2905 |
+
}).pop();
|
2906 |
+
}
|
2907 |
|
2908 |
/**
|
2909 |
* Gets the current succesor/predecessor position.
|
2912 |
*/
|
2913 |
Navigation.prototype.getPosition = function(successor) {
|
2914 |
var position, length,
|
2915 |
+
options = this._core.settings;
|
2916 |
|
2917 |
+
if (options.slideBy == 'page') {
|
2918 |
position = $.inArray(this.current(), this._pages);
|
2919 |
length = this._pages.length;
|
2920 |
successor ? ++position : --position;
|
2922 |
} else {
|
2923 |
position = this._core.relative(this._core.current());
|
2924 |
length = this._core.items().length;
|
2925 |
+
successor ? position += options.slideBy : position -= options.slideBy;
|
2926 |
}
|
|
|
2927 |
return position;
|
2928 |
+
}
|
2929 |
|
2930 |
/**
|
2931 |
* Slides to the next item or page.
|
2934 |
*/
|
2935 |
Navigation.prototype.next = function(speed) {
|
2936 |
$.proxy(this._overrides.to, this._core)(this.getPosition(true), speed);
|
2937 |
+
}
|
2938 |
|
2939 |
/**
|
2940 |
* Slides to the previous item or page.
|
2943 |
*/
|
2944 |
Navigation.prototype.prev = function(speed) {
|
2945 |
$.proxy(this._overrides.to, this._core)(this.getPosition(false), speed);
|
2946 |
+
}
|
2947 |
|
2948 |
/**
|
2949 |
* Slides to the specified item or page.
|
2955 |
Navigation.prototype.to = function(position, speed, standard) {
|
2956 |
var length;
|
2957 |
|
2958 |
+
if (!standard) {
|
2959 |
length = this._pages.length;
|
2960 |
$.proxy(this._overrides.to, this._core)(this._pages[((position % length) + length) % length].start, speed);
|
2961 |
} else {
|
2962 |
$.proxy(this._overrides.to, this._core)(position, speed);
|
2963 |
}
|
2964 |
+
}
|
2965 |
|
2966 |
$.fn.owlCarousel.Constructor.Plugins.Navigation = Navigation;
|
2967 |
|
2969 |
|
2970 |
/**
|
2971 |
* Hash Plugin
|
2972 |
+
* @version 2.0.0
|
2973 |
* @author Artus Kolanowski
|
|
|
2974 |
* @license The MIT License (MIT)
|
2975 |
*/
|
2976 |
;(function($, window, document, undefined) {
|
2990 |
this._core = carousel;
|
2991 |
|
2992 |
/**
|
2993 |
+
* Hash table for the hashes.
|
2994 |
* @protected
|
2995 |
* @type {Object}
|
2996 |
*/
|
3008 |
* @type {Object}
|
3009 |
*/
|
3010 |
this._handlers = {
|
3011 |
+
'initialized.owl.carousel': $.proxy(function() {
|
3012 |
+
if (this._core.settings.startPosition == 'URLHash') {
|
3013 |
$(window).trigger('hashchange.owl.navigation');
|
3014 |
}
|
3015 |
}, this),
|
3016 |
'prepared.owl.carousel': $.proxy(function(e) {
|
3017 |
+
var hash = $(e.content).find('[data-hash]').andSelf('[data-hash]').attr('data-hash');
|
3018 |
+
this._hashes[hash] = e.content;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3019 |
}, this)
|
3020 |
};
|
3021 |
|
3026 |
this.$element.on(this._handlers);
|
3027 |
|
3028 |
// register event listener for hash navigation
|
3029 |
+
$(window).on('hashchange.owl.navigation', $.proxy(function() {
|
3030 |
var hash = window.location.hash.substring(1),
|
3031 |
items = this._core.$stage.children(),
|
3032 |
+
position = this._hashes[hash] && items.index(this._hashes[hash]) || 0;
|
3033 |
|
3034 |
+
if (!hash) {
|
3035 |
+
return false;
|
3036 |
}
|
3037 |
|
3038 |
+
this._core.to(position, false, true);
|
3039 |
}, this));
|
3040 |
+
}
|
3041 |
|
3042 |
/**
|
3043 |
* Default options.
|
3045 |
*/
|
3046 |
Hash.Defaults = {
|
3047 |
URLhashListener: false
|
3048 |
+
}
|
3049 |
|
3050 |
/**
|
3051 |
* Destroys the plugin.
|
3062 |
for (property in Object.getOwnPropertyNames(this)) {
|
3063 |
typeof this[property] != 'function' && (this[property] = null);
|
3064 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3065 |
}
|
3066 |
|
3067 |
+
$.fn.owlCarousel.Constructor.Plugins.Hash = Hash;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3068 |
|
3069 |
})(window.Zepto || window.jQuery, window, document);
|
themes/foundation/modules/owlcarousel/owl.carousel.min.css
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
.owl-carousel .animated{-webkit-animation-duration:1000ms;animation-duration:1000ms;-webkit-animation-fill-mode:both;animation-fill-mode:both}.owl-carousel .owl-animated-in{z-index:0}.owl-carousel .owl-animated-out{z-index:1}.owl-carousel .fadeOut{-webkit-animation-name:fadeOut;animation-name:fadeOut}@-webkit-keyframes fadeOut{0%{opacity:1}100%{opacity:0}}@keyframes fadeOut{0%{opacity:1}100%{opacity:0}}.owl-height{-webkit-transition:height 500ms ease-in-out;-moz-transition:height 500ms ease-in-out;-ms-transition:height 500ms ease-in-out;-o-transition:height 500ms ease-in-out;transition:height 500ms ease-in-out}.owl-carousel{display:none;width:100%;-webkit-tap-highlight-color:transparent;position:relative;z-index:1}.owl-carousel .owl-stage{position:relative;-ms-touch-action:pan-Y}.owl-carousel .owl-stage:after{content:".";display:block;clear:both;visibility:hidden;line-height:0;height:0}.owl-carousel .owl-stage-outer{position:relative;overflow:hidden;-webkit-transform:translate3d(0px,0px,0px)}.owl-carousel .owl-controls .owl-nav .owl-prev,.owl-carousel .owl-controls .owl-nav .owl-next,.owl-carousel .owl-controls .owl-dot{cursor:pointer;cursor:hand;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.owl-carousel.owl-loaded{display:block}.owl-carousel.owl-loading{opacity:0;display:block}.owl-carousel.owl-hidden{opacity:0}.owl-carousel .owl-refresh .owl-item{display:none}.owl-carousel .owl-item{position:relative;min-height:1px;float:left;-webkit-backface-visibility:hidden;-webkit-tap-highlight-color:transparent;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.owl-carousel .owl-item img{display:block;width:100%;-webkit-transform-style:preserve-3d}.owl-carousel.owl-text-select-on .owl-item{-webkit-user-select:auto;-moz-user-select:auto;-ms-user-select:auto;user-select:auto}.owl-carousel .owl-grab{cursor:move;cursor:-webkit-grab;cursor:-o-grab;cursor:-ms-grab;cursor:grab}.owl-carousel.owl-rtl{direction:rtl}.owl-carousel.owl-rtl .owl-item{float:right}.no-js .owl-carousel{display:block}.owl-carousel .owl-item .owl-lazy{opacity:0;-webkit-transition:opacity 400ms ease;-moz-transition:opacity 400ms ease;-ms-transition:opacity 400ms ease;-o-transition:opacity 400ms ease;transition:opacity 400ms ease}.owl-carousel .owl-item img{transform-style:preserve-3d}.owl-carousel .owl-video-wrapper{position:relative;height:100%;background:#000}.owl-carousel .owl-video-play-icon{position:absolute;height:80px;width:80px;left:50%;top:50%;margin-left:-40px;margin-top:-40px;background:url("owl.video.play.png") no-repeat;cursor:pointer;z-index:1;-webkit-backface-visibility:hidden;-webkit-transition:scale 100ms ease;-moz-transition:scale 100ms ease;-ms-transition:scale 100ms ease;-o-transition:scale 100ms ease;transition:scale 100ms ease}.owl-carousel .owl-video-play-icon:hover{-webkit-transition:scale(1.3,1.3);-moz-transition:scale(1.3,1.3);-ms-transition:scale(1.3,1.3);-o-transition:scale(1.3,1.3);transition:scale(1.3,1.3)}.owl-carousel .owl-video-playing .owl-video-tn,.owl-carousel .owl-video-playing .owl-video-play-icon{display:none}.owl-carousel .owl-video-tn{opacity:0;height:100%;background-position:center center;background-repeat:no-repeat;-webkit-background-size:contain;-moz-background-size:contain;-o-background-size:contain;background-size:contain;-webkit-transition:opacity 400ms ease;-moz-transition:opacity 400ms ease;-ms-transition:opacity 400ms ease;-o-transition:opacity 400ms ease;transition:opacity 400ms ease}.owl-carousel .owl-video-frame{position:relative;z-index:1}
|
themes/foundation/modules/owlcarousel/owl.carousel.min.js
CHANGED
@@ -1,7 +1,2 @@
|
|
1 |
-
/**
|
2 |
-
|
3 |
-
* Copyright 2013-2016 David Deutsch
|
4 |
-
* Licensed under MIT (https://github.com/OwlCarousel2/OwlCarousel2/blob/master/LICENSE)
|
5 |
-
*/
|
6 |
-
!function(a,b,c,d){function e(b,c){this.settings=null,this.options=a.extend({},e.Defaults,c),this.$element=a(b),this._handlers={},this._plugins={},this._supress={},this._current=null,this._speed=null,this._coordinates=[],this._breakpoint=null,this._width=null,this._items=[],this._clones=[],this._mergers=[],this._widths=[],this._invalidated={},this._pipe=[],this._drag={time:null,target:null,pointer:null,stage:{start:null,current:null},direction:null},this._states={current:{},tags:{initializing:["busy"],animating:["busy"],dragging:["interacting"]}},a.each(["onResize","onThrottledResize"],a.proxy(function(b,c){this._handlers[c]=a.proxy(this[c],this)},this)),a.each(e.Plugins,a.proxy(function(a,b){this._plugins[a.charAt(0).toLowerCase()+a.slice(1)]=new b(this)},this)),a.each(e.Workers,a.proxy(function(b,c){this._pipe.push({filter:c.filter,run:a.proxy(c.run,this)})},this)),this.setup(),this.initialize()}e.Defaults={items:3,loop:!1,center:!1,rewind:!1,mouseDrag:!0,touchDrag:!0,pullDrag:!0,freeDrag:!1,margin:0,stagePadding:0,merge:!1,mergeFit:!0,autoWidth:!1,startPosition:0,rtl:!1,smartSpeed:250,fluidSpeed:!1,dragEndSpeed:!1,responsive:{},responsiveRefreshRate:200,responsiveBaseElement:b,fallbackEasing:"swing",info:!1,nestedItemSelector:!1,itemElement:"div",stageElement:"div",refreshClass:"owl-refresh",loadedClass:"owl-loaded",loadingClass:"owl-loading",rtlClass:"owl-rtl",responsiveClass:"owl-responsive",dragClass:"owl-drag",itemClass:"owl-item",stageClass:"owl-stage",stageOuterClass:"owl-stage-outer",grabClass:"owl-grab"},e.Width={Default:"default",Inner:"inner",Outer:"outer"},e.Type={Event:"event",State:"state"},e.Plugins={},e.Workers=[{filter:["width","settings"],run:function(){this._width=this.$element.width()}},{filter:["width","items","settings"],run:function(a){a.current=this._items&&this._items[this.relative(this._current)]}},{filter:["items","settings"],run:function(){this.$stage.children(".cloned").remove()}},{filter:["width","items","settings"],run:function(a){var b=this.settings.margin||"",c=!this.settings.autoWidth,d=this.settings.rtl,e={width:"auto","margin-left":d?b:"","margin-right":d?"":b};!c&&this.$stage.children().css(e),a.css=e}},{filter:["width","items","settings"],run:function(a){var b=(this.width()/this.settings.items).toFixed(3)-this.settings.margin,c=null,d=this._items.length,e=!this.settings.autoWidth,f=[];for(a.items={merge:!1,width:b};d--;)c=this._mergers[d],c=this.settings.mergeFit&&Math.min(c,this.settings.items)||c,a.items.merge=c>1||a.items.merge,f[d]=e?b*c:this._items[d].width();this._widths=f}},{filter:["items","settings"],run:function(){var b=[],c=this._items,d=this.settings,e=Math.max(2*d.items,4),f=2*Math.ceil(c.length/2),g=d.loop&&c.length?d.rewind?e:Math.max(e,f):0,h="",i="";for(g/=2;g--;)b.push(this.normalize(b.length/2,!0)),h+=c[b[b.length-1]][0].outerHTML,b.push(this.normalize(c.length-1-(b.length-1)/2,!0)),i=c[b[b.length-1]][0].outerHTML+i;this._clones=b,a(h).addClass("cloned").appendTo(this.$stage),a(i).addClass("cloned").prependTo(this.$stage)}},{filter:["width","items","settings"],run:function(){for(var a=this.settings.rtl?1:-1,b=this._clones.length+this._items.length,c=-1,d=0,e=0,f=[];++c<b;)d=f[c-1]||0,e=this._widths[this.relative(c)]+this.settings.margin,f.push(d+e*a);this._coordinates=f}},{filter:["width","items","settings"],run:function(){var a=this.settings.stagePadding,b=this._coordinates,c={width:Math.ceil(Math.abs(b[b.length-1]))+2*a,"padding-left":a||"","padding-right":a||""};this.$stage.css(c)}},{filter:["width","items","settings"],run:function(a){var b=this._coordinates.length,c=!this.settings.autoWidth,d=this.$stage.children();if(c&&a.items.merge)for(;b--;)a.css.width=this._widths[this.relative(b)],d.eq(b).css(a.css);else c&&(a.css.width=a.items.width,d.css(a.css))}},{filter:["items"],run:function(){this._coordinates.length<1&&this.$stage.removeAttr("style")}},{filter:["width","items","settings"],run:function(a){a.current=a.current?this.$stage.children().index(a.current):0,a.current=Math.max(this.minimum(),Math.min(this.maximum(),a.current)),this.reset(a.current)}},{filter:["position"],run:function(){this.animate(this.coordinates(this._current))}},{filter:["width","position","items","settings"],run:function(){var a,b,c,d,e=this.settings.rtl?1:-1,f=2*this.settings.stagePadding,g=this.coordinates(this.current())+f,h=g+this.width()*e,i=[];for(c=0,d=this._coordinates.length;d>c;c++)a=this._coordinates[c-1]||0,b=Math.abs(this._coordinates[c])+f*e,(this.op(a,"<=",g)&&this.op(a,">",h)||this.op(b,"<",g)&&this.op(b,">",h))&&i.push(c);this.$stage.children(".active").removeClass("active"),this.$stage.children(":eq("+i.join("), :eq(")+")").addClass("active"),this.settings.center&&(this.$stage.children(".center").removeClass("center"),this.$stage.children().eq(this.current()).addClass("center"))}}],e.prototype.initialize=function(){if(this.enter("initializing"),this.trigger("initialize"),this.$element.toggleClass(this.settings.rtlClass,this.settings.rtl),this.settings.autoWidth&&!this.is("pre-loading")){var b,c,e;b=this.$element.find("img"),c=this.settings.nestedItemSelector?"."+this.settings.nestedItemSelector:d,e=this.$element.children(c).width(),b.length&&0>=e&&this.preloadAutoWidthImages(b)}this.$element.addClass(this.options.loadingClass),this.$stage=a("<"+this.settings.stageElement+' class="'+this.settings.stageClass+'"/>').wrap('<div class="'+this.settings.stageOuterClass+'"/>'),this.$element.append(this.$stage.parent()),this.replace(this.$element.children().not(this.$stage.parent())),this.$element.is(":visible")?this.refresh():this.invalidate("width"),this.$element.removeClass(this.options.loadingClass).addClass(this.options.loadedClass),this.registerEventHandlers(),this.leave("initializing"),this.trigger("initialized")},e.prototype.setup=function(){var b=this.viewport(),c=this.options.responsive,d=-1,e=null;c?(a.each(c,function(a){b>=a&&a>d&&(d=Number(a))}),e=a.extend({},this.options,c[d]),delete e.responsive,e.responsiveClass&&this.$element.attr("class",this.$element.attr("class").replace(new RegExp("("+this.options.responsiveClass+"-)\\S+\\s","g"),"$1"+d))):e=a.extend({},this.options),null!==this.settings&&this._breakpoint===d||(this.trigger("change",{property:{name:"settings",value:e}}),this._breakpoint=d,this.settings=e,this.invalidate("settings"),this.trigger("changed",{property:{name:"settings",value:this.settings}}))},e.prototype.optionsLogic=function(){this.settings.autoWidth&&(this.settings.stagePadding=!1,this.settings.merge=!1)},e.prototype.prepare=function(b){var c=this.trigger("prepare",{content:b});return c.data||(c.data=a("<"+this.settings.itemElement+"/>").addClass(this.options.itemClass).append(b)),this.trigger("prepared",{content:c.data}),c.data},e.prototype.update=function(){for(var b=0,c=this._pipe.length,d=a.proxy(function(a){return this[a]},this._invalidated),e={};c>b;)(this._invalidated.all||a.grep(this._pipe[b].filter,d).length>0)&&this._pipe[b].run(e),b++;this._invalidated={},!this.is("valid")&&this.enter("valid")},e.prototype.width=function(a){switch(a=a||e.Width.Default){case e.Width.Inner:case e.Width.Outer:return this._width;default:return this._width-2*this.settings.stagePadding+this.settings.margin}},e.prototype.refresh=function(){this.enter("refreshing"),this.trigger("refresh"),this.setup(),this.optionsLogic(),this.$element.addClass(this.options.refreshClass),this.update(),this.$element.removeClass(this.options.refreshClass),this.leave("refreshing"),this.trigger("refreshed")},e.prototype.onThrottledResize=function(){b.clearTimeout(this.resizeTimer),this.resizeTimer=b.setTimeout(this._handlers.onResize,this.settings.responsiveRefreshRate)},e.prototype.onResize=function(){return this._items.length?this._width===this.$element.width()?!1:this.$element.is(":visible")?(this.enter("resizing"),this.trigger("resize").isDefaultPrevented()?(this.leave("resizing"),!1):(this.invalidate("width"),this.refresh(),this.leave("resizing"),void this.trigger("resized"))):!1:!1},e.prototype.registerEventHandlers=function(){a.support.transition&&this.$stage.on(a.support.transition.end+".owl.core",a.proxy(this.onTransitionEnd,this)),this.settings.responsive!==!1&&this.on(b,"resize",this._handlers.onThrottledResize),this.settings.mouseDrag&&(this.$element.addClass(this.options.dragClass),this.$stage.on("mousedown.owl.core",a.proxy(this.onDragStart,this)),this.$stage.on("dragstart.owl.core selectstart.owl.core",function(){return!1})),this.settings.touchDrag&&(this.$stage.on("touchstart.owl.core",a.proxy(this.onDragStart,this)),this.$stage.on("touchcancel.owl.core",a.proxy(this.onDragEnd,this)))},e.prototype.onDragStart=function(b){var d=null;3!==b.which&&(a.support.transform?(d=this.$stage.css("transform").replace(/.*\(|\)| /g,"").split(","),d={x:d[16===d.length?12:4],y:d[16===d.length?13:5]}):(d=this.$stage.position(),d={x:this.settings.rtl?d.left+this.$stage.width()-this.width()+this.settings.margin:d.left,y:d.top}),this.is("animating")&&(a.support.transform?this.animate(d.x):this.$stage.stop(),this.invalidate("position")),this.$element.toggleClass(this.options.grabClass,"mousedown"===b.type),this.speed(0),this._drag.time=(new Date).getTime(),this._drag.target=a(b.target),this._drag.stage.start=d,this._drag.stage.current=d,this._drag.pointer=this.pointer(b),a(c).on("mouseup.owl.core touchend.owl.core",a.proxy(this.onDragEnd,this)),a(c).one("mousemove.owl.core touchmove.owl.core",a.proxy(function(b){var d=this.difference(this._drag.pointer,this.pointer(b));a(c).on("mousemove.owl.core touchmove.owl.core",a.proxy(this.onDragMove,this)),Math.abs(d.x)<Math.abs(d.y)&&this.is("valid")||(b.preventDefault(),this.enter("dragging"),this.trigger("drag"))},this)))},e.prototype.onDragMove=function(a){var b=null,c=null,d=null,e=this.difference(this._drag.pointer,this.pointer(a)),f=this.difference(this._drag.stage.start,e);this.is("dragging")&&(a.preventDefault(),this.settings.loop?(b=this.coordinates(this.minimum()),c=this.coordinates(this.maximum()+1)-b,f.x=((f.x-b)%c+c)%c+b):(b=this.settings.rtl?this.coordinates(this.maximum()):this.coordinates(this.minimum()),c=this.settings.rtl?this.coordinates(this.minimum()):this.coordinates(this.maximum()),d=this.settings.pullDrag?-1*e.x/5:0,f.x=Math.max(Math.min(f.x,b+d),c+d)),this._drag.stage.current=f,this.animate(f.x))},e.prototype.onDragEnd=function(b){var d=this.difference(this._drag.pointer,this.pointer(b)),e=this._drag.stage.current,f=d.x>0^this.settings.rtl?"left":"right";a(c).off(".owl.core"),this.$element.removeClass(this.options.grabClass),(0!==d.x&&this.is("dragging")||!this.is("valid"))&&(this.speed(this.settings.dragEndSpeed||this.settings.smartSpeed),this.current(this.closest(e.x,0!==d.x?f:this._drag.direction)),this.invalidate("position"),this.update(),this._drag.direction=f,(Math.abs(d.x)>3||(new Date).getTime()-this._drag.time>300)&&this._drag.target.one("click.owl.core",function(){return!1})),this.is("dragging")&&(this.leave("dragging"),this.trigger("dragged"))},e.prototype.closest=function(b,c){var d=-1,e=30,f=this.width(),g=this.coordinates();return this.settings.freeDrag||a.each(g,a.proxy(function(a,h){return"left"===c&&b>h-e&&h+e>b?d=a:"right"===c&&b>h-f-e&&h-f+e>b?d=a+1:this.op(b,"<",h)&&this.op(b,">",g[a+1]||h-f)&&(d="left"===c?a+1:a),-1===d},this)),this.settings.loop||(this.op(b,">",g[this.minimum()])?d=b=this.minimum():this.op(b,"<",g[this.maximum()])&&(d=b=this.maximum())),d},e.prototype.animate=function(b){var c=this.speed()>0;this.is("animating")&&this.onTransitionEnd(),c&&(this.enter("animating"),this.trigger("translate")),a.support.transform3d&&a.support.transition?this.$stage.css({transform:"translate3d("+b+"px,0px,0px)",transition:this.speed()/1e3+"s"}):c?this.$stage.animate({left:b+"px"},this.speed(),this.settings.fallbackEasing,a.proxy(this.onTransitionEnd,this)):this.$stage.css({left:b+"px"})},e.prototype.is=function(a){return this._states.current[a]&&this._states.current[a]>0},e.prototype.current=function(a){if(a===d)return this._current;if(0===this._items.length)return d;if(a=this.normalize(a),this._current!==a){var b=this.trigger("change",{property:{name:"position",value:a}});b.data!==d&&(a=this.normalize(b.data)),this._current=a,this.invalidate("position"),this.trigger("changed",{property:{name:"position",value:this._current}})}return this._current},e.prototype.invalidate=function(b){return"string"===a.type(b)&&(this._invalidated[b]=!0,this.is("valid")&&this.leave("valid")),a.map(this._invalidated,function(a,b){return b})},e.prototype.reset=function(a){a=this.normalize(a),a!==d&&(this._speed=0,this._current=a,this.suppress(["translate","translated"]),this.animate(this.coordinates(a)),this.release(["translate","translated"]))},e.prototype.normalize=function(a,b){var c=this._items.length,e=b?0:this._clones.length;return!this.isNumeric(a)||1>c?a=d:(0>a||a>=c+e)&&(a=((a-e/2)%c+c)%c+e/2),a},e.prototype.relative=function(a){return a-=this._clones.length/2,this.normalize(a,!0)},e.prototype.maximum=function(a){var b,c=this.settings,d=this._coordinates.length,e=Math.abs(this._coordinates[d-1])-this._width,f=-1;if(c.loop)d=this._clones.length/2+this._items.length-1;else if(c.autoWidth||c.merge)for(;d-f>1;)Math.abs(this._coordinates[b=d+f>>1])<e?f=b:d=b;else d=c.center?this._items.length-1:this._items.length-c.items;return a&&(d-=this._clones.length/2),Math.max(d,0)},e.prototype.minimum=function(a){return a?0:this._clones.length/2},e.prototype.items=function(a){return a===d?this._items.slice():(a=this.normalize(a,!0),this._items[a])},e.prototype.mergers=function(a){return a===d?this._mergers.slice():(a=this.normalize(a,!0),this._mergers[a])},e.prototype.clones=function(b){var c=this._clones.length/2,e=c+this._items.length,f=function(a){return a%2===0?e+a/2:c-(a+1)/2};return b===d?a.map(this._clones,function(a,b){return f(b)}):a.map(this._clones,function(a,c){return a===b?f(c):null})},e.prototype.speed=function(a){return a!==d&&(this._speed=a),this._speed},e.prototype.coordinates=function(b){var c,e=1,f=b-1;return b===d?a.map(this._coordinates,a.proxy(function(a,b){return this.coordinates(b)},this)):(this.settings.center?(this.settings.rtl&&(e=-1,f=b+1),c=this._coordinates[b],c+=(this.width()-c+(this._coordinates[f]||0))/2*e):c=this._coordinates[f]||0,c=Math.ceil(c))},e.prototype.duration=function(a,b,c){return 0===c?0:Math.min(Math.max(Math.abs(b-a),1),6)*Math.abs(c||this.settings.smartSpeed)},e.prototype.to=function(a,b){var c=this.current(),d=null,e=a-this.relative(c),f=(e>0)-(0>e),g=this._items.length,h=this.minimum(),i=this.maximum();this.settings.loop?(!this.settings.rewind&&Math.abs(e)>g/2&&(e+=-1*f*g),a=c+e,d=((a-h)%g+g)%g+h,d!==a&&i>=d-e&&d-e>0&&(c=d-e,a=d,this.reset(c))):this.settings.rewind?(i+=1,a=(a%i+i)%i):a=Math.max(h,Math.min(i,a)),this.speed(this.duration(c,a,b)),this.current(a),this.$element.is(":visible")&&this.update()},e.prototype.next=function(a){a=a||!1,this.to(this.relative(this.current())+1,a)},e.prototype.prev=function(a){a=a||!1,this.to(this.relative(this.current())-1,a)},e.prototype.onTransitionEnd=function(a){return a!==d&&(a.stopPropagation(),(a.target||a.srcElement||a.originalTarget)!==this.$stage.get(0))?!1:(this.leave("animating"),void this.trigger("translated"))},e.prototype.viewport=function(){var d;if(this.options.responsiveBaseElement!==b)d=a(this.options.responsiveBaseElement).width();else if(b.innerWidth)d=b.innerWidth;else{if(!c.documentElement||!c.documentElement.clientWidth)throw"Can not detect viewport width.";d=c.documentElement.clientWidth}return d},e.prototype.replace=function(b){this.$stage.empty(),this._items=[],b&&(b=b instanceof jQuery?b:a(b)),this.settings.nestedItemSelector&&(b=b.find("."+this.settings.nestedItemSelector)),b.filter(function(){return 1===this.nodeType}).each(a.proxy(function(a,b){b=this.prepare(b),this.$stage.append(b),this._items.push(b),this._mergers.push(1*b.find("[data-merge]").andSelf("[data-merge]").attr("data-merge")||1)},this)),this.reset(this.isNumeric(this.settings.startPosition)?this.settings.startPosition:0),this.invalidate("items")},e.prototype.add=function(b,c){var e=this.relative(this._current);c=c===d?this._items.length:this.normalize(c,!0),b=b instanceof jQuery?b:a(b),this.trigger("add",{content:b,position:c}),b=this.prepare(b),0===this._items.length||c===this._items.length?(0===this._items.length&&this.$stage.append(b),0!==this._items.length&&this._items[c-1].after(b),this._items.push(b),this._mergers.push(1*b.find("[data-merge]").andSelf("[data-merge]").attr("data-merge")||1)):(this._items[c].before(b),this._items.splice(c,0,b),this._mergers.splice(c,0,1*b.find("[data-merge]").andSelf("[data-merge]").attr("data-merge")||1)),this._items[e]&&this.reset(this._items[e].index()),this.invalidate("items"),this.trigger("added",{content:b,position:c})},e.prototype.remove=function(a){a=this.normalize(a,!0),a!==d&&(this.trigger("remove",{content:this._items[a],position:a}),this._items[a].remove(),this._items.splice(a,1),this._mergers.splice(a,1),this.invalidate("items"),this.trigger("removed",{content:null,position:a}))},e.prototype.preloadAutoWidthImages=function(b){b.each(a.proxy(function(b,c){this.enter("pre-loading"),c=a(c),a(new Image).one("load",a.proxy(function(a){c.attr("src",a.target.src),c.css("opacity",1),this.leave("pre-loading"),!this.is("pre-loading")&&!this.is("initializing")&&this.refresh()},this)).attr("src",c.attr("src")||c.attr("data-src")||c.attr("data-src-retina"))},this))},e.prototype.destroy=function(){this.$element.off(".owl.core"),this.$stage.off(".owl.core"),a(c).off(".owl.core"),this.settings.responsive!==!1&&(b.clearTimeout(this.resizeTimer),this.off(b,"resize",this._handlers.onThrottledResize));for(var d in this._plugins)this._plugins[d].destroy();this.$stage.children(".cloned").remove(),this.$stage.unwrap(),this.$stage.children().contents().unwrap(),this.$stage.children().unwrap(),this.$element.removeClass(this.options.refreshClass).removeClass(this.options.loadingClass).removeClass(this.options.loadedClass).removeClass(this.options.rtlClass).removeClass(this.options.dragClass).removeClass(this.options.grabClass).attr("class",this.$element.attr("class").replace(new RegExp(this.options.responsiveClass+"-\\S+\\s","g"),"")).removeData("owl.carousel")},e.prototype.op=function(a,b,c){var d=this.settings.rtl;switch(b){case"<":return d?a>c:c>a;case">":return d?c>a:a>c;case">=":return d?c>=a:a>=c;case"<=":return d?a>=c:c>=a}},e.prototype.on=function(a,b,c,d){a.addEventListener?a.addEventListener(b,c,d):a.attachEvent&&a.attachEvent("on"+b,c)},e.prototype.off=function(a,b,c,d){a.removeEventListener?a.removeEventListener(b,c,d):a.detachEvent&&a.detachEvent("on"+b,c)},e.prototype.trigger=function(b,c,d,f,g){var h={item:{count:this._items.length,index:this.current()}},i=a.camelCase(a.grep(["on",b,d],function(a){return a}).join("-").toLowerCase()),j=a.Event([b,"owl",d||"carousel"].join(".").toLowerCase(),a.extend({relatedTarget:this},h,c));return this._supress[b]||(a.each(this._plugins,function(a,b){b.onTrigger&&b.onTrigger(j)}),this.register({type:e.Type.Event,name:b}),this.$element.trigger(j),this.settings&&"function"==typeof this.settings[i]&&this.settings[i].call(this,j)),j},e.prototype.enter=function(b){a.each([b].concat(this._states.tags[b]||[]),a.proxy(function(a,b){this._states.current[b]===d&&(this._states.current[b]=0),this._states.current[b]++},this))},e.prototype.leave=function(b){a.each([b].concat(this._states.tags[b]||[]),a.proxy(function(a,b){this._states.current[b]--},this))},e.prototype.register=function(b){if(b.type===e.Type.Event){if(a.event.special[b.name]||(a.event.special[b.name]={}),!a.event.special[b.name].owl){var c=a.event.special[b.name]._default;a.event.special[b.name]._default=function(a){return!c||!c.apply||a.namespace&&-1!==a.namespace.indexOf("owl")?a.namespace&&a.namespace.indexOf("owl")>-1:c.apply(this,arguments)},a.event.special[b.name].owl=!0}}else b.type===e.Type.State&&(this._states.tags[b.name]?this._states.tags[b.name]=this._states.tags[b.name].concat(b.tags):this._states.tags[b.name]=b.tags,this._states.tags[b.name]=a.grep(this._states.tags[b.name],a.proxy(function(c,d){return a.inArray(c,this._states.tags[b.name])===d},this)))},e.prototype.suppress=function(b){a.each(b,a.proxy(function(a,b){this._supress[b]=!0},this))},e.prototype.release=function(b){a.each(b,a.proxy(function(a,b){delete this._supress[b]},this))},e.prototype.pointer=function(a){var c={x:null,y:null};return a=a.originalEvent||a||b.event,a=a.touches&&a.touches.length?a.touches[0]:a.changedTouches&&a.changedTouches.length?a.changedTouches[0]:a,a.pageX?(c.x=a.pageX,c.y=a.pageY):(c.x=a.clientX,c.y=a.clientY),c},e.prototype.isNumeric=function(a){return!isNaN(parseFloat(a))},e.prototype.difference=function(a,b){return{x:a.x-b.x,y:a.y-b.y}},a.fn.owlCarousel=function(b){var c=Array.prototype.slice.call(arguments,1);return this.each(function(){var d=a(this),f=d.data("owl.carousel");f||(f=new e(this,"object"==typeof b&&b),d.data("owl.carousel",f),a.each(["next","prev","to","destroy","refresh","replace","add","remove"],function(b,c){f.register({type:e.Type.Event,name:c}),f.$element.on(c+".owl.carousel.core",a.proxy(function(a){a.namespace&&a.relatedTarget!==this&&(this.suppress([c]),f[c].apply(this,[].slice.call(arguments,1)),this.release([c]))},f))})),"string"==typeof b&&"_"!==b.charAt(0)&&f[b].apply(f,c)})},a.fn.owlCarousel.Constructor=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){var e=function(b){this._core=b,this._interval=null,this._visible=null,this._handlers={"initialized.owl.carousel":a.proxy(function(a){a.namespace&&this._core.settings.autoRefresh&&this.watch()},this)},this._core.options=a.extend({},e.Defaults,this._core.options),this._core.$element.on(this._handlers)};e.Defaults={autoRefresh:!0,autoRefreshInterval:500},e.prototype.watch=function(){this._interval||(this._visible=this._core.$element.is(":visible"),this._interval=b.setInterval(a.proxy(this.refresh,this),this._core.settings.autoRefreshInterval))},e.prototype.refresh=function(){this._core.$element.is(":visible")!==this._visible&&(this._visible=!this._visible,this._core.$element.toggleClass("owl-hidden",!this._visible),this._visible&&this._core.invalidate("width")&&this._core.refresh())},e.prototype.destroy=function(){var a,c;b.clearInterval(this._interval);for(a in this._handlers)this._core.$element.off(a,this._handlers[a]);for(c in Object.getOwnPropertyNames(this))"function"!=typeof this[c]&&(this[c]=null)},a.fn.owlCarousel.Constructor.Plugins.AutoRefresh=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){var e=function(b){this._core=b,this._loaded=[],this._handlers={"initialized.owl.carousel change.owl.carousel resized.owl.carousel":a.proxy(function(b){if(b.namespace&&this._core.settings&&this._core.settings.lazyLoad&&(b.property&&"position"==b.property.name||"initialized"==b.type))for(var c=this._core.settings,e=c.center&&Math.ceil(c.items/2)||c.items,f=c.center&&-1*e||0,g=(b.property&&b.property.value!==d?b.property.value:this._core.current())+f,h=this._core.clones().length,i=a.proxy(function(a,b){this.load(b)},this);f++<e;)this.load(h/2+this._core.relative(g)),h&&a.each(this._core.clones(this._core.relative(g)),i),g++},this)},this._core.options=a.extend({},e.Defaults,this._core.options),this._core.$element.on(this._handlers)};e.Defaults={lazyLoad:!1},e.prototype.load=function(c){var d=this._core.$stage.children().eq(c),e=d&&d.find(".owl-lazy");!e||a.inArray(d.get(0),this._loaded)>-1||(e.each(a.proxy(function(c,d){var e,f=a(d),g=b.devicePixelRatio>1&&f.attr("data-src-retina")||f.attr("data-src");this._core.trigger("load",{element:f,url:g},"lazy"),f.is("img")?f.one("load.owl.lazy",a.proxy(function(){f.css("opacity",1),this._core.trigger("loaded",{element:f,url:g},"lazy")},this)).attr("src",g):(e=new Image,e.onload=a.proxy(function(){f.css({"background-image":"url("+g+")",opacity:"1"}),this._core.trigger("loaded",{element:f,url:g},"lazy")},this),e.src=g)},this)),this._loaded.push(d.get(0)))},e.prototype.destroy=function(){var a,b;for(a in this.handlers)this._core.$element.off(a,this.handlers[a]);for(b in Object.getOwnPropertyNames(this))"function"!=typeof this[b]&&(this[b]=null)},a.fn.owlCarousel.Constructor.Plugins.Lazy=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){var e=function(b){this._core=b,this._handlers={"initialized.owl.carousel refreshed.owl.carousel":a.proxy(function(a){a.namespace&&this._core.settings.autoHeight&&this.update()},this),"changed.owl.carousel":a.proxy(function(a){a.namespace&&this._core.settings.autoHeight&&"position"==a.property.name&&this.update()},this),"loaded.owl.lazy":a.proxy(function(a){a.namespace&&this._core.settings.autoHeight&&a.element.closest("."+this._core.settings.itemClass).index()===this._core.current()&&this.update()},this)},this._core.options=a.extend({},e.Defaults,this._core.options),this._core.$element.on(this._handlers)};e.Defaults={autoHeight:!1,autoHeightClass:"owl-height"},e.prototype.update=function(){var b=this._core._current,c=b+this._core.settings.items,d=this._core.$stage.children().toArray().slice(b,c),e=[],f=0;a.each(d,function(b,c){e.push(a(c).height())}),f=Math.max.apply(null,e),this._core.$stage.parent().height(f).addClass(this._core.settings.autoHeightClass)},e.prototype.destroy=function(){var a,b;for(a in this._handlers)this._core.$element.off(a,this._handlers[a]);for(b in Object.getOwnPropertyNames(this))"function"!=typeof this[b]&&(this[b]=null)},a.fn.owlCarousel.Constructor.Plugins.AutoHeight=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){var e=function(b){this._core=b,this._videos={},this._playing=null,this._handlers={"initialized.owl.carousel":a.proxy(function(a){a.namespace&&this._core.register({type:"state",name:"playing",tags:["interacting"]})},this),"resize.owl.carousel":a.proxy(function(a){a.namespace&&this._core.settings.video&&this.isInFullScreen()&&a.preventDefault()},this),"refreshed.owl.carousel":a.proxy(function(a){a.namespace&&this._core.is("resizing")&&this._core.$stage.find(".cloned .owl-video-frame").remove()},this),"changed.owl.carousel":a.proxy(function(a){a.namespace&&"position"===a.property.name&&this._playing&&this.stop()},this),"prepared.owl.carousel":a.proxy(function(b){if(b.namespace){var c=a(b.content).find(".owl-video");c.length&&(c.css("display","none"),this.fetch(c,a(b.content)))}},this)},this._core.options=a.extend({},e.Defaults,this._core.options),this._core.$element.on(this._handlers),this._core.$element.on("click.owl.video",".owl-video-play-icon",a.proxy(function(a){this.play(a)},this))};e.Defaults={video:!1,videoHeight:!1,videoWidth:!1},e.prototype.fetch=function(a,b){var c=function(){return a.attr("data-vimeo-id")?"vimeo":a.attr("data-vzaar-id")?"vzaar":"youtube"}(),d=a.attr("data-vimeo-id")||a.attr("data-youtube-id")||a.attr("data-vzaar-id"),e=a.attr("data-width")||this._core.settings.videoWidth,f=a.attr("data-height")||this._core.settings.videoHeight,g=a.attr("href");if(!g)throw new Error("Missing video URL.");if(d=g.match(/(http:|https:|)\/\/(player.|www.|app.)?(vimeo\.com|youtu(be\.com|\.be|be\.googleapis\.com)|vzaar\.com)\/(video\/|videos\/|embed\/|channels\/.+\/|groups\/.+\/|watch\?v=|v\/)?([A-Za-z0-9._%-]*)(\&\S+)?/),d[3].indexOf("youtu")>-1)c="youtube";else if(d[3].indexOf("vimeo")>-1)c="vimeo";else{if(!(d[3].indexOf("vzaar")>-1))throw new Error("Video URL not supported.");c="vzaar"}d=d[6],this._videos[g]={type:c,id:d,width:e,height:f},b.attr("data-video",g),this.thumbnail(a,this._videos[g])},e.prototype.thumbnail=function(b,c){var d,e,f,g=c.width&&c.height?'style="width:'+c.width+"px;height:"+c.height+'px;"':"",h=b.find("img"),i="src",j="",k=this._core.settings,l=function(a){e='<div class="owl-video-play-icon"></div>',d=k.lazyLoad?'<div class="owl-video-tn '+j+'" '+i+'="'+a+'"></div>':'<div class="owl-video-tn" style="opacity:1;background-image:url('+a+')"></div>',b.after(d),b.after(e)};return b.wrap('<div class="owl-video-wrapper"'+g+"></div>"),this._core.settings.lazyLoad&&(i="data-src",j="owl-lazy"),h.length?(l(h.attr(i)),h.remove(),!1):void("youtube"===c.type?(f="//img.youtube.com/vi/"+c.id+"/hqdefault.jpg",l(f)):"vimeo"===c.type?a.ajax({type:"GET",url:"//vimeo.com/api/v2/video/"+c.id+".json",jsonp:"callback",dataType:"jsonp",success:function(a){f=a[0].thumbnail_large,l(f)}}):"vzaar"===c.type&&a.ajax({type:"GET",url:"//vzaar.com/api/videos/"+c.id+".json",jsonp:"callback",dataType:"jsonp",success:function(a){f=a.framegrab_url,l(f)}}))},e.prototype.stop=function(){this._core.trigger("stop",null,"video"),this._playing.find(".owl-video-frame").remove(),this._playing.removeClass("owl-video-playing"),this._playing=null,this._core.leave("playing"),this._core.trigger("stopped",null,"video")},e.prototype.play=function(b){var c,d=a(b.target),e=d.closest("."+this._core.settings.itemClass),f=this._videos[e.attr("data-video")],g=f.width||"100%",h=f.height||this._core.$stage.height();this._playing||(this._core.enter("playing"),this._core.trigger("play",null,"video"),e=this._core.items(this._core.relative(e.index())),this._core.reset(e.index()),"youtube"===f.type?c='<iframe width="'+g+'" height="'+h+'" src="//www.youtube.com/embed/'+f.id+"?autoplay=1&v="+f.id+'" frameborder="0" allowfullscreen></iframe>':"vimeo"===f.type?c='<iframe src="//player.vimeo.com/video/'+f.id+'?autoplay=1" width="'+g+'" height="'+h+'" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>':"vzaar"===f.type&&(c='<iframe frameborder="0"height="'+h+'"width="'+g+'" allowfullscreen mozallowfullscreen webkitAllowFullScreen src="//view.vzaar.com/'+f.id+'/player?autoplay=true"></iframe>'),a('<div class="owl-video-frame">'+c+"</div>").insertAfter(e.find(".owl-video")),this._playing=e.addClass("owl-video-playing"))},e.prototype.isInFullScreen=function(){var b=c.fullscreenElement||c.mozFullScreenElement||c.webkitFullscreenElement;return b&&a(b).parent().hasClass("owl-video-frame")},e.prototype.destroy=function(){var a,b;this._core.$element.off("click.owl.video");for(a in this._handlers)this._core.$element.off(a,this._handlers[a]);for(b in Object.getOwnPropertyNames(this))"function"!=typeof this[b]&&(this[b]=null)},a.fn.owlCarousel.Constructor.Plugins.Video=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){var e=function(b){this.core=b,this.core.options=a.extend({},e.Defaults,this.core.options),this.swapping=!0,this.previous=d,this.next=d,this.handlers={"change.owl.carousel":a.proxy(function(a){a.namespace&&"position"==a.property.name&&(this.previous=this.core.current(),this.next=a.property.value)},this),"drag.owl.carousel dragged.owl.carousel translated.owl.carousel":a.proxy(function(a){a.namespace&&(this.swapping="translated"==a.type)},this),"translate.owl.carousel":a.proxy(function(a){a.namespace&&this.swapping&&(this.core.options.animateOut||this.core.options.animateIn)&&this.swap()},this)},this.core.$element.on(this.handlers)};e.Defaults={animateOut:!1,animateIn:!1},e.prototype.swap=function(){if(1===this.core.settings.items&&a.support.animation&&a.support.transition){this.core.speed(0);var b,c=a.proxy(this.clear,this),d=this.core.$stage.children().eq(this.previous),e=this.core.$stage.children().eq(this.next),f=this.core.settings.animateIn,g=this.core.settings.animateOut;this.core.current()!==this.previous&&(g&&(b=this.core.coordinates(this.previous)-this.core.coordinates(this.next),d.one(a.support.animation.end,c).css({left:b+"px"}).addClass("animated owl-animated-out").addClass(g)),f&&e.one(a.support.animation.end,c).addClass("animated owl-animated-in").addClass(f))}},e.prototype.clear=function(b){a(b.target).css({left:""}).removeClass("animated owl-animated-out owl-animated-in").removeClass(this.core.settings.animateIn).removeClass(this.core.settings.animateOut),this.core.onTransitionEnd()},e.prototype.destroy=function(){var a,b;for(a in this.handlers)this.core.$element.off(a,this.handlers[a]);for(b in Object.getOwnPropertyNames(this))"function"!=typeof this[b]&&(this[b]=null)},a.fn.owlCarousel.Constructor.Plugins.Animate=e}(window.Zepto||window.jQuery,window,document),
|
7 |
-
function(a,b,c,d){var e=function(b){this._core=b,this._timeout=null,this._paused=!1,this._handlers={"changed.owl.carousel":a.proxy(function(a){a.namespace&&"settings"===a.property.name?this._core.settings.autoplay?this.play():this.stop():a.namespace&&"position"===a.property.name&&this._core.settings.autoplay&&this._setAutoPlayInterval()},this),"initialized.owl.carousel":a.proxy(function(a){a.namespace&&this._core.settings.autoplay&&this.play()},this),"play.owl.autoplay":a.proxy(function(a,b,c){a.namespace&&this.play(b,c)},this),"stop.owl.autoplay":a.proxy(function(a){a.namespace&&this.stop()},this),"mouseover.owl.autoplay":a.proxy(function(){this._core.settings.autoplayHoverPause&&this._core.is("rotating")&&this.pause()},this),"mouseleave.owl.autoplay":a.proxy(function(){this._core.settings.autoplayHoverPause&&this._core.is("rotating")&&this.play()},this),"touchstart.owl.core":a.proxy(function(){this._core.settings.autoplayHoverPause&&this._core.is("rotating")&&this.pause()},this),"touchend.owl.core":a.proxy(function(){this._core.settings.autoplayHoverPause&&this.play()},this)},this._core.$element.on(this._handlers),this._core.options=a.extend({},e.Defaults,this._core.options)};e.Defaults={autoplay:!1,autoplayTimeout:5e3,autoplayHoverPause:!1,autoplaySpeed:!1},e.prototype.play=function(a,b){this._paused=!1,this._core.is("rotating")||(this._core.enter("rotating"),this._setAutoPlayInterval())},e.prototype._getNextTimeout=function(d,e){return this._timeout&&b.clearTimeout(this._timeout),b.setTimeout(a.proxy(function(){this._paused||this._core.is("busy")||this._core.is("interacting")||c.hidden||this._core.next(e||this._core.settings.autoplaySpeed)},this),d||this._core.settings.autoplayTimeout)},e.prototype._setAutoPlayInterval=function(){this._timeout=this._getNextTimeout()},e.prototype.stop=function(){this._core.is("rotating")&&(b.clearTimeout(this._timeout),this._core.leave("rotating"))},e.prototype.pause=function(){this._core.is("rotating")&&(this._paused=!0)},e.prototype.destroy=function(){var a,b;this.stop();for(a in this._handlers)this._core.$element.off(a,this._handlers[a]);for(b in Object.getOwnPropertyNames(this))"function"!=typeof this[b]&&(this[b]=null)},a.fn.owlCarousel.Constructor.Plugins.autoplay=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){"use strict";var e=function(b){this._core=b,this._initialized=!1,this._pages=[],this._controls={},this._templates=[],this.$element=this._core.$element,this._overrides={next:this._core.next,prev:this._core.prev,to:this._core.to},this._handlers={"prepared.owl.carousel":a.proxy(function(b){b.namespace&&this._core.settings.dotsData&&this._templates.push('<div class="'+this._core.settings.dotClass+'">'+a(b.content).find("[data-dot]").addBack("[data-dot]").attr("data-dot")+"</div>")},this),"added.owl.carousel":a.proxy(function(a){a.namespace&&this._core.settings.dotsData&&this._templates.splice(a.position,0,this._templates.pop())},this),"remove.owl.carousel":a.proxy(function(a){a.namespace&&this._core.settings.dotsData&&this._templates.splice(a.position,1)},this),"changed.owl.carousel":a.proxy(function(a){a.namespace&&"position"==a.property.name&&this.draw()},this),"initialized.owl.carousel":a.proxy(function(a){a.namespace&&!this._initialized&&(this._core.trigger("initialize",null,"navigation"),this.initialize(),this.update(),this.draw(),this._initialized=!0,this._core.trigger("initialized",null,"navigation"))},this),"refreshed.owl.carousel":a.proxy(function(a){a.namespace&&this._initialized&&(this._core.trigger("refresh",null,"navigation"),this.update(),this.draw(),this._core.trigger("refreshed",null,"navigation"))},this)},this._core.options=a.extend({},e.Defaults,this._core.options),this.$element.on(this._handlers)};e.Defaults={nav:!1,navText:["prev","next"],navSpeed:!1,navElement:"div",navContainer:!1,navContainerClass:"owl-nav",navClass:["owl-prev","owl-next"],slideBy:1,dotClass:"owl-dot",dotsClass:"owl-dots",dots:!0,dotsEach:!1,dotsData:!1,dotsSpeed:!1,dotsContainer:!1},e.prototype.initialize=function(){var b,c=this._core.settings;this._controls.$relative=(c.navContainer?a(c.navContainer):a("<div>").addClass(c.navContainerClass).appendTo(this.$element)).addClass("disabled"),this._controls.$previous=a("<"+c.navElement+">").addClass(c.navClass[0]).html(c.navText[0]).prependTo(this._controls.$relative).on("click",a.proxy(function(a){this.prev(c.navSpeed)},this)),this._controls.$next=a("<"+c.navElement+">").addClass(c.navClass[1]).html(c.navText[1]).appendTo(this._controls.$relative).on("click",a.proxy(function(a){this.next(c.navSpeed)},this)),c.dotsData||(this._templates=[a("<div>").addClass(c.dotClass).append(a("<span>")).prop("outerHTML")]),this._controls.$absolute=(c.dotsContainer?a(c.dotsContainer):a("<div>").addClass(c.dotsClass).appendTo(this.$element)).addClass("disabled"),this._controls.$absolute.on("click","div",a.proxy(function(b){var d=a(b.target).parent().is(this._controls.$absolute)?a(b.target).index():a(b.target).parent().index();b.preventDefault(),this.to(d,c.dotsSpeed)},this));for(b in this._overrides)this._core[b]=a.proxy(this[b],this)},e.prototype.destroy=function(){var a,b,c,d;for(a in this._handlers)this.$element.off(a,this._handlers[a]);for(b in this._controls)this._controls[b].remove();for(d in this.overides)this._core[d]=this._overrides[d];for(c in Object.getOwnPropertyNames(this))"function"!=typeof this[c]&&(this[c]=null)},e.prototype.update=function(){var a,b,c,d=this._core.clones().length/2,e=d+this._core.items().length,f=this._core.maximum(!0),g=this._core.settings,h=g.center||g.autoWidth||g.dotsData?1:g.dotsEach||g.items;if("page"!==g.slideBy&&(g.slideBy=Math.min(g.slideBy,g.items)),g.dots||"page"==g.slideBy)for(this._pages=[],a=d,b=0,c=0;e>a;a++){if(b>=h||0===b){if(this._pages.push({start:Math.min(f,a-d),end:a-d+h-1}),Math.min(f,a-d)===f)break;b=0,++c}b+=this._core.mergers(this._core.relative(a))}},e.prototype.draw=function(){var b,c=this._core.settings,d=this._core.items().length<=c.items,e=this._core.relative(this._core.current()),f=c.loop||c.rewind;this._controls.$relative.toggleClass("disabled",!c.nav||d),c.nav&&(this._controls.$previous.toggleClass("disabled",!f&&e<=this._core.minimum(!0)),this._controls.$next.toggleClass("disabled",!f&&e>=this._core.maximum(!0))),this._controls.$absolute.toggleClass("disabled",!c.dots||d),c.dots&&(b=this._pages.length-this._controls.$absolute.children().length,c.dotsData&&0!==b?this._controls.$absolute.html(this._templates.join("")):b>0?this._controls.$absolute.append(new Array(b+1).join(this._templates[0])):0>b&&this._controls.$absolute.children().slice(b).remove(),this._controls.$absolute.find(".active").removeClass("active"),this._controls.$absolute.children().eq(a.inArray(this.current(),this._pages)).addClass("active"))},e.prototype.onTrigger=function(b){var c=this._core.settings;b.page={index:a.inArray(this.current(),this._pages),count:this._pages.length,size:c&&(c.center||c.autoWidth||c.dotsData?1:c.dotsEach||c.items)}},e.prototype.current=function(){var b=this._core.relative(this._core.current());return a.grep(this._pages,a.proxy(function(a,c){return a.start<=b&&a.end>=b},this)).pop()},e.prototype.getPosition=function(b){var c,d,e=this._core.settings;return"page"==e.slideBy?(c=a.inArray(this.current(),this._pages),d=this._pages.length,b?++c:--c,c=this._pages[(c%d+d)%d].start):(c=this._core.relative(this._core.current()),d=this._core.items().length,b?c+=e.slideBy:c-=e.slideBy),c},e.prototype.next=function(b){a.proxy(this._overrides.to,this._core)(this.getPosition(!0),b)},e.prototype.prev=function(b){a.proxy(this._overrides.to,this._core)(this.getPosition(!1),b)},e.prototype.to=function(b,c,d){var e;!d&&this._pages.length?(e=this._pages.length,a.proxy(this._overrides.to,this._core)(this._pages[(b%e+e)%e].start,c)):a.proxy(this._overrides.to,this._core)(b,c)},a.fn.owlCarousel.Constructor.Plugins.Navigation=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){"use strict";var e=function(c){this._core=c,this._hashes={},this.$element=this._core.$element,this._handlers={"initialized.owl.carousel":a.proxy(function(c){c.namespace&&"URLHash"===this._core.settings.startPosition&&a(b).trigger("hashchange.owl.navigation")},this),"prepared.owl.carousel":a.proxy(function(b){if(b.namespace){var c=a(b.content).find("[data-hash]").addBack("[data-hash]").attr("data-hash");if(!c)return;this._hashes[c]=b.content}},this),"changed.owl.carousel":a.proxy(function(c){if(c.namespace&&"position"===c.property.name){var d=this._core.items(this._core.relative(this._core.current())),e=a.map(this._hashes,function(a,b){return a===d?b:null}).join();if(!e||b.location.hash.slice(1)===e)return;b.location.hash=e}},this)},this._core.options=a.extend({},e.Defaults,this._core.options),this.$element.on(this._handlers),a(b).on("hashchange.owl.navigation",a.proxy(function(a){var c=b.location.hash.substring(1),e=this._core.$stage.children(),f=this._hashes[c]&&e.index(this._hashes[c]);f!==d&&f!==this._core.current()&&this._core.to(this._core.relative(f),!1,!0)},this))};e.Defaults={URLhashListener:!1},e.prototype.destroy=function(){var c,d;a(b).off("hashchange.owl.navigation");for(c in this._handlers)this._core.$element.off(c,this._handlers[c]);for(d in Object.getOwnPropertyNames(this))"function"!=typeof this[d]&&(this[d]=null)},a.fn.owlCarousel.Constructor.Plugins.Hash=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){function e(b,c){var e=!1,f=b.charAt(0).toUpperCase()+b.slice(1);return a.each((b+" "+h.join(f+" ")+f).split(" "),function(a,b){return g[b]!==d?(e=c?b:!0,!1):void 0}),e}function f(a){return e(a,!0)}var g=a("<support>").get(0).style,h="Webkit Moz O ms".split(" "),i={transition:{end:{WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd",transition:"transitionend"}},animation:{end:{WebkitAnimation:"webkitAnimationEnd",MozAnimation:"animationend",OAnimation:"oAnimationEnd",animation:"animationend"}}},j={csstransforms:function(){return!!e("transform")},csstransforms3d:function(){return!!e("perspective")},csstransitions:function(){return!!e("transition")},cssanimations:function(){return!!e("animation")}};j.csstransitions()&&(a.support.transition=new String(f("transition")),a.support.transition.end=i.transition.end[a.support.transition]),j.cssanimations()&&(a.support.animation=new String(f("animation")),a.support.animation.end=i.animation.end[a.support.animation]),j.csstransforms()&&(a.support.transform=new String(f("transform")),a.support.transform3d=j.csstransforms3d())}(window.Zepto||window.jQuery,window,document);
|
1 |
+
!function(a,b,c,d){function e(b,c){this.settings=null,this.options=a.extend({},e.Defaults,c),this.$element=a(b),this.drag=a.extend({},m),this.state=a.extend({},n),this.e=a.extend({},o),this._plugins={},this._supress={},this._current=null,this._speed=null,this._coordinates=[],this._breakpoint=null,this._width=null,this._items=[],this._clones=[],this._mergers=[],this._invalidated={},this._pipe=[],a.each(e.Plugins,a.proxy(function(a,b){this._plugins[a[0].toLowerCase()+a.slice(1)]=new b(this)},this)),a.each(e.Pipe,a.proxy(function(b,c){this._pipe.push({filter:c.filter,run:a.proxy(c.run,this)})},this)),this.setup(),this.initialize()}function f(a){if(a.touches!==d)return{x:a.touches[0].pageX,y:a.touches[0].pageY};if(a.touches===d){if(a.pageX!==d)return{x:a.pageX,y:a.pageY};if(a.pageX===d)return{x:a.clientX,y:a.clientY}}}function g(a){var b,d,e=c.createElement("div"),f=a;for(b in f)if(d=f[b],"undefined"!=typeof e.style[d])return e=null,[d,b];return[!1]}function h(){return g(["transition","WebkitTransition","MozTransition","OTransition"])[1]}function i(){return g(["transform","WebkitTransform","MozTransform","OTransform","msTransform"])[0]}function j(){return g(["perspective","webkitPerspective","MozPerspective","OPerspective","MsPerspective"])[0]}function k(){return"ontouchstart"in b||!!navigator.msMaxTouchPoints}function l(){return b.navigator.msPointerEnabled}var m,n,o;m={start:0,startX:0,startY:0,current:0,currentX:0,currentY:0,offsetX:0,offsetY:0,distance:null,startTime:0,endTime:0,updatedX:0,targetEl:null},n={isTouch:!1,isScrolling:!1,isSwiping:!1,direction:!1,inMotion:!1},o={_onDragStart:null,_onDragMove:null,_onDragEnd:null,_transitionEnd:null,_resizer:null,_responsiveCall:null,_goToLoop:null,_checkVisibile:null},e.Defaults={items:3,loop:!1,center:!1,mouseDrag:!0,touchDrag:!0,pullDrag:!0,freeDrag:!1,margin:0,stagePadding:0,merge:!1,mergeFit:!0,autoWidth:!1,startPosition:0,rtl:!1,smartSpeed:250,fluidSpeed:!1,dragEndSpeed:!1,responsive:{},responsiveRefreshRate:200,responsiveBaseElement:b,responsiveClass:!1,fallbackEasing:"swing",info:!1,nestedItemSelector:!1,itemElement:"div",stageElement:"div",themeClass:"owl-theme",baseClass:"owl-carousel",itemClass:"owl-item",centerClass:"center",activeClass:"active"},e.Width={Default:"default",Inner:"inner",Outer:"outer"},e.Plugins={},e.Pipe=[{filter:["width","items","settings"],run:function(a){a.current=this._items&&this._items[this.relative(this._current)]}},{filter:["items","settings"],run:function(){var a=this._clones,b=this.$stage.children(".cloned");(b.length!==a.length||!this.settings.loop&&a.length>0)&&(this.$stage.children(".cloned").remove(),this._clones=[])}},{filter:["items","settings"],run:function(){var a,b,c=this._clones,d=this._items,e=this.settings.loop?c.length-Math.max(2*this.settings.items,4):0;for(a=0,b=Math.abs(e/2);b>a;a++)e>0?(this.$stage.children().eq(d.length+c.length-1).remove(),c.pop(),this.$stage.children().eq(0).remove(),c.pop()):(c.push(c.length/2),this.$stage.append(d[c[c.length-1]].clone().addClass("cloned")),c.push(d.length-1-(c.length-1)/2),this.$stage.prepend(d[c[c.length-1]].clone().addClass("cloned")))}},{filter:["width","items","settings"],run:function(){var a,b,c,d=this.settings.rtl?1:-1,e=(this.width()/this.settings.items).toFixed(3),f=0;for(this._coordinates=[],b=0,c=this._clones.length+this._items.length;c>b;b++)a=this._mergers[this.relative(b)],a=this.settings.mergeFit&&Math.min(a,this.settings.items)||a,f+=(this.settings.autoWidth?this._items[this.relative(b)].width()+this.settings.margin:e*a)*d,this._coordinates.push(f)}},{filter:["width","items","settings"],run:function(){var b,c,d=(this.width()/this.settings.items).toFixed(3),e={width:Math.abs(this._coordinates[this._coordinates.length-1])+2*this.settings.stagePadding,"padding-left":this.settings.stagePadding||"","padding-right":this.settings.stagePadding||""};if(this.$stage.css(e),e={width:this.settings.autoWidth?"auto":d-this.settings.margin},e[this.settings.rtl?"margin-left":"margin-right"]=this.settings.margin,!this.settings.autoWidth&&a.grep(this._mergers,function(a){return a>1}).length>0)for(b=0,c=this._coordinates.length;c>b;b++)e.width=Math.abs(this._coordinates[b])-Math.abs(this._coordinates[b-1]||0)-this.settings.margin,this.$stage.children().eq(b).css(e);else this.$stage.children().css(e)}},{filter:["width","items","settings"],run:function(a){a.current&&this.reset(this.$stage.children().index(a.current))}},{filter:["position"],run:function(){this.animate(this.coordinates(this._current))}},{filter:["width","position","items","settings"],run:function(){var a,b,c,d,e=this.settings.rtl?1:-1,f=2*this.settings.stagePadding,g=this.coordinates(this.current())+f,h=g+this.width()*e,i=[];for(c=0,d=this._coordinates.length;d>c;c++)a=this._coordinates[c-1]||0,b=Math.abs(this._coordinates[c])+f*e,(this.op(a,"<=",g)&&this.op(a,">",h)||this.op(b,"<",g)&&this.op(b,">",h))&&i.push(c);this.$stage.children("."+this.settings.activeClass).removeClass(this.settings.activeClass),this.$stage.children(":eq("+i.join("), :eq(")+")").addClass(this.settings.activeClass),this.settings.center&&(this.$stage.children("."+this.settings.centerClass).removeClass(this.settings.centerClass),this.$stage.children().eq(this.current()).addClass(this.settings.centerClass))}}],e.prototype.initialize=function(){if(this.trigger("initialize"),this.$element.addClass(this.settings.baseClass).addClass(this.settings.themeClass).toggleClass("owl-rtl",this.settings.rtl),this.browserSupport(),this.settings.autoWidth&&this.state.imagesLoaded!==!0){var b,c,e;if(b=this.$element.find("img"),c=this.settings.nestedItemSelector?"."+this.settings.nestedItemSelector:d,e=this.$element.children(c).width(),b.length&&0>=e)return this.preloadAutoWidthImages(b),!1}this.$element.addClass("owl-loading"),this.$stage=a("<"+this.settings.stageElement+' class="owl-stage"/>').wrap('<div class="owl-stage-outer">'),this.$element.append(this.$stage.parent()),this.replace(this.$element.children().not(this.$stage.parent())),this._width=this.$element.width(),this.refresh(),this.$element.removeClass("owl-loading").addClass("owl-loaded"),this.eventsCall(),this.internalEvents(),this.addTriggerableEvents(),this.trigger("initialized")},e.prototype.setup=function(){var b=this.viewport(),c=this.options.responsive,d=-1,e=null;c?(a.each(c,function(a){b>=a&&a>d&&(d=Number(a))}),e=a.extend({},this.options,c[d]),delete e.responsive,e.responsiveClass&&this.$element.attr("class",function(a,b){return b.replace(/\b owl-responsive-\S+/g,"")}).addClass("owl-responsive-"+d)):e=a.extend({},this.options),(null===this.settings||this._breakpoint!==d)&&(this.trigger("change",{property:{name:"settings",value:e}}),this._breakpoint=d,this.settings=e,this.invalidate("settings"),this.trigger("changed",{property:{name:"settings",value:this.settings}}))},e.prototype.optionsLogic=function(){this.$element.toggleClass("owl-center",this.settings.center),this.settings.loop&&this._items.length<this.settings.items&&(this.settings.loop=!1),this.settings.autoWidth&&(this.settings.stagePadding=!1,this.settings.merge=!1)},e.prototype.prepare=function(b){var c=this.trigger("prepare",{content:b});return c.data||(c.data=a("<"+this.settings.itemElement+"/>").addClass(this.settings.itemClass).append(b)),this.trigger("prepared",{content:c.data}),c.data},e.prototype.update=function(){for(var b=0,c=this._pipe.length,d=a.proxy(function(a){return this[a]},this._invalidated),e={};c>b;)(this._invalidated.all||a.grep(this._pipe[b].filter,d).length>0)&&this._pipe[b].run(e),b++;this._invalidated={}},e.prototype.width=function(a){switch(a=a||e.Width.Default){case e.Width.Inner:case e.Width.Outer:return this._width;default:return this._width-2*this.settings.stagePadding+this.settings.margin}},e.prototype.refresh=function(){if(0===this._items.length)return!1;(new Date).getTime();this.trigger("refresh"),this.setup(),this.optionsLogic(),this.$stage.addClass("owl-refresh"),this.update(),this.$stage.removeClass("owl-refresh"),this.state.orientation=b.orientation,this.watchVisibility(),this.trigger("refreshed")},e.prototype.eventsCall=function(){this.e._onDragStart=a.proxy(function(a){this.onDragStart(a)},this),this.e._onDragMove=a.proxy(function(a){this.onDragMove(a)},this),this.e._onDragEnd=a.proxy(function(a){this.onDragEnd(a)},this),this.e._onResize=a.proxy(function(a){this.onResize(a)},this),this.e._transitionEnd=a.proxy(function(a){this.transitionEnd(a)},this),this.e._preventClick=a.proxy(function(a){this.preventClick(a)},this)},e.prototype.onThrottledResize=function(){b.clearTimeout(this.resizeTimer),this.resizeTimer=b.setTimeout(this.e._onResize,this.settings.responsiveRefreshRate)},e.prototype.onResize=function(){return this._items.length?this._width===this.$element.width()?!1:this.trigger("resize").isDefaultPrevented()?!1:(this._width=this.$element.width(),this.invalidate("width"),this.refresh(),void this.trigger("resized")):!1},e.prototype.eventsRouter=function(a){var b=a.type;"mousedown"===b||"touchstart"===b?this.onDragStart(a):"mousemove"===b||"touchmove"===b?this.onDragMove(a):"mouseup"===b||"touchend"===b?this.onDragEnd(a):"touchcancel"===b&&this.onDragEnd(a)},e.prototype.internalEvents=function(){var c=(k(),l());this.settings.mouseDrag?(this.$stage.on("mousedown",a.proxy(function(a){this.eventsRouter(a)},this)),this.$stage.on("dragstart",function(){return!1}),this.$stage.get(0).onselectstart=function(){return!1}):this.$element.addClass("owl-text-select-on"),this.settings.touchDrag&&!c&&this.$stage.on("touchstart touchcancel",a.proxy(function(a){this.eventsRouter(a)},this)),this.transitionEndVendor&&this.on(this.$stage.get(0),this.transitionEndVendor,this.e._transitionEnd,!1),this.settings.responsive!==!1&&this.on(b,"resize",a.proxy(this.onThrottledResize,this))},e.prototype.onDragStart=function(d){var e,g,h,i;if(e=d.originalEvent||d||b.event,3===e.which||this.state.isTouch)return!1;if("mousedown"===e.type&&this.$stage.addClass("owl-grab"),this.trigger("drag"),this.drag.startTime=(new Date).getTime(),this.speed(0),this.state.isTouch=!0,this.state.isScrolling=!1,this.state.isSwiping=!1,this.drag.distance=0,g=f(e).x,h=f(e).y,this.drag.offsetX=this.$stage.position().left,this.drag.offsetY=this.$stage.position().top,this.settings.rtl&&(this.drag.offsetX=this.$stage.position().left+this.$stage.width()-this.width()+this.settings.margin),this.state.inMotion&&this.support3d)i=this.getTransformProperty(),this.drag.offsetX=i,this.animate(i),this.state.inMotion=!0;else if(this.state.inMotion&&!this.support3d)return this.state.inMotion=!1,!1;this.drag.startX=g-this.drag.offsetX,this.drag.startY=h-this.drag.offsetY,this.drag.start=g-this.drag.startX,this.drag.targetEl=e.target||e.srcElement,this.drag.updatedX=this.drag.start,("IMG"===this.drag.targetEl.tagName||"A"===this.drag.targetEl.tagName)&&(this.drag.targetEl.draggable=!1),a(c).on("mousemove.owl.dragEvents mouseup.owl.dragEvents touchmove.owl.dragEvents touchend.owl.dragEvents",a.proxy(function(a){this.eventsRouter(a)},this))},e.prototype.onDragMove=function(a){var c,e,g,h,i,j;this.state.isTouch&&(this.state.isScrolling||(c=a.originalEvent||a||b.event,e=f(c).x,g=f(c).y,this.drag.currentX=e-this.drag.startX,this.drag.currentY=g-this.drag.startY,this.drag.distance=this.drag.currentX-this.drag.offsetX,this.drag.distance<0?this.state.direction=this.settings.rtl?"right":"left":this.drag.distance>0&&(this.state.direction=this.settings.rtl?"left":"right"),this.settings.loop?this.op(this.drag.currentX,">",this.coordinates(this.minimum()))&&"right"===this.state.direction?this.drag.currentX-=(this.settings.center&&this.coordinates(0))-this.coordinates(this._items.length):this.op(this.drag.currentX,"<",this.coordinates(this.maximum()))&&"left"===this.state.direction&&(this.drag.currentX+=(this.settings.center&&this.coordinates(0))-this.coordinates(this._items.length)):(h=this.coordinates(this.settings.rtl?this.maximum():this.minimum()),i=this.coordinates(this.settings.rtl?this.minimum():this.maximum()),j=this.settings.pullDrag?this.drag.distance/5:0,this.drag.currentX=Math.max(Math.min(this.drag.currentX,h+j),i+j)),(this.drag.distance>8||this.drag.distance<-8)&&(c.preventDefault!==d?c.preventDefault():c.returnValue=!1,this.state.isSwiping=!0),this.drag.updatedX=this.drag.currentX,(this.drag.currentY>16||this.drag.currentY<-16)&&this.state.isSwiping===!1&&(this.state.isScrolling=!0,this.drag.updatedX=this.drag.start),this.animate(this.drag.updatedX)))},e.prototype.onDragEnd=function(b){var d,e,f;if(this.state.isTouch){if("mouseup"===b.type&&this.$stage.removeClass("owl-grab"),this.trigger("dragged"),this.drag.targetEl.removeAttribute("draggable"),this.state.isTouch=!1,this.state.isScrolling=!1,this.state.isSwiping=!1,0===this.drag.distance&&this.state.inMotion!==!0)return this.state.inMotion=!1,!1;this.drag.endTime=(new Date).getTime(),d=this.drag.endTime-this.drag.startTime,e=Math.abs(this.drag.distance),(e>3||d>300)&&this.removeClick(this.drag.targetEl),f=this.closest(this.drag.updatedX),this.speed(this.settings.dragEndSpeed||this.settings.smartSpeed),this.current(f),this.invalidate("position"),this.update(),this.settings.pullDrag||this.drag.updatedX!==this.coordinates(f)||this.transitionEnd(),this.drag.distance=0,a(c).off(".owl.dragEvents")}},e.prototype.removeClick=function(c){this.drag.targetEl=c,a(c).on("click.preventClick",this.e._preventClick),b.setTimeout(function(){a(c).off("click.preventClick")},300)},e.prototype.preventClick=function(b){b.preventDefault?b.preventDefault():b.returnValue=!1,b.stopPropagation&&b.stopPropagation(),a(b.target).off("click.preventClick")},e.prototype.getTransformProperty=function(){var a,c;return a=b.getComputedStyle(this.$stage.get(0),null).getPropertyValue(this.vendorName+"transform"),a=a.replace(/matrix(3d)?\(|\)/g,"").split(","),c=16===a.length,c!==!0?a[4]:a[12]},e.prototype.closest=function(b){var c=-1,d=30,e=this.width(),f=this.coordinates();return this.settings.freeDrag||a.each(f,a.proxy(function(a,g){return b>g-d&&g+d>b?c=a:this.op(b,"<",g)&&this.op(b,">",f[a+1]||g-e)&&(c="left"===this.state.direction?a+1:a),-1===c},this)),this.settings.loop||(this.op(b,">",f[this.minimum()])?c=b=this.minimum():this.op(b,"<",f[this.maximum()])&&(c=b=this.maximum())),c},e.prototype.animate=function(b){this.trigger("translate"),this.state.inMotion=this.speed()>0,this.support3d?this.$stage.css({transform:"translate3d("+b+"px,0px, 0px)",transition:this.speed()/1e3+"s"}):this.state.isTouch?this.$stage.css({left:b+"px"}):this.$stage.animate({left:b},this.speed()/1e3,this.settings.fallbackEasing,a.proxy(function(){this.state.inMotion&&this.transitionEnd()},this))},e.prototype.current=function(a){if(a===d)return this._current;if(0===this._items.length)return d;if(a=this.normalize(a),this._current!==a){var b=this.trigger("change",{property:{name:"position",value:a}});b.data!==d&&(a=this.normalize(b.data)),this._current=a,this.invalidate("position"),this.trigger("changed",{property:{name:"position",value:this._current}})}return this._current},e.prototype.invalidate=function(a){this._invalidated[a]=!0},e.prototype.reset=function(a){a=this.normalize(a),a!==d&&(this._speed=0,this._current=a,this.suppress(["translate","translated"]),this.animate(this.coordinates(a)),this.release(["translate","translated"]))},e.prototype.normalize=function(b,c){var e=c?this._items.length:this._items.length+this._clones.length;return!a.isNumeric(b)||1>e?d:b=this._clones.length?(b%e+e)%e:Math.max(this.minimum(c),Math.min(this.maximum(c),b))},e.prototype.relative=function(a){return a=this.normalize(a),a-=this._clones.length/2,this.normalize(a,!0)},e.prototype.maximum=function(a){var b,c,d,e=0,f=this.settings;if(a)return this._items.length-1;if(!f.loop&&f.center)b=this._items.length-1;else if(f.loop||f.center)if(f.loop||f.center)b=this._items.length+f.items;else{if(!f.autoWidth&&!f.merge)throw"Can not detect maximum absolute position.";for(revert=f.rtl?1:-1,c=this.$stage.width()-this.$element.width();(d=this.coordinates(e))&&!(d*revert>=c);)b=++e}else b=this._items.length-f.items;return b},e.prototype.minimum=function(a){return a?0:this._clones.length/2},e.prototype.items=function(a){return a===d?this._items.slice():(a=this.normalize(a,!0),this._items[a])},e.prototype.mergers=function(a){return a===d?this._mergers.slice():(a=this.normalize(a,!0),this._mergers[a])},e.prototype.clones=function(b){var c=this._clones.length/2,e=c+this._items.length,f=function(a){return a%2===0?e+a/2:c-(a+1)/2};return b===d?a.map(this._clones,function(a,b){return f(b)}):a.map(this._clones,function(a,c){return a===b?f(c):null})},e.prototype.speed=function(a){return a!==d&&(this._speed=a),this._speed},e.prototype.coordinates=function(b){var c=null;return b===d?a.map(this._coordinates,a.proxy(function(a,b){return this.coordinates(b)},this)):(this.settings.center?(c=this._coordinates[b],c+=(this.width()-c+(this._coordinates[b-1]||0))/2*(this.settings.rtl?-1:1)):c=this._coordinates[b-1]||0,c)},e.prototype.duration=function(a,b,c){return Math.min(Math.max(Math.abs(b-a),1),6)*Math.abs(c||this.settings.smartSpeed)},e.prototype.to=function(c,d){if(this.settings.loop){var e=c-this.relative(this.current()),f=this.current(),g=this.current(),h=this.current()+e,i=0>g-h?!0:!1,j=this._clones.length+this._items.length;h<this.settings.items&&i===!1?(f=g+this._items.length,this.reset(f)):h>=j-this.settings.items&&i===!0&&(f=g-this._items.length,this.reset(f)),b.clearTimeout(this.e._goToLoop),this.e._goToLoop=b.setTimeout(a.proxy(function(){this.speed(this.duration(this.current(),f+e,d)),this.current(f+e),this.update()},this),30)}else this.speed(this.duration(this.current(),c,d)),this.current(c),this.update()},e.prototype.next=function(a){a=a||!1,this.to(this.relative(this.current())+1,a)},e.prototype.prev=function(a){a=a||!1,this.to(this.relative(this.current())-1,a)},e.prototype.transitionEnd=function(a){return a!==d&&(a.stopPropagation(),(a.target||a.srcElement||a.originalTarget)!==this.$stage.get(0))?!1:(this.state.inMotion=!1,void this.trigger("translated"))},e.prototype.viewport=function(){var d;if(this.options.responsiveBaseElement!==b)d=a(this.options.responsiveBaseElement).width();else if(b.innerWidth)d=b.innerWidth;else{if(!c.documentElement||!c.documentElement.clientWidth)throw"Can not detect viewport width.";d=c.documentElement.clientWidth}return d},e.prototype.replace=function(b){this.$stage.empty(),this._items=[],b&&(b=b instanceof jQuery?b:a(b)),this.settings.nestedItemSelector&&(b=b.find("."+this.settings.nestedItemSelector)),b.filter(function(){return 1===this.nodeType}).each(a.proxy(function(a,b){b=this.prepare(b),this.$stage.append(b),this._items.push(b),this._mergers.push(1*b.find("[data-merge]").andSelf("[data-merge]").attr("data-merge")||1)},this)),this.reset(a.isNumeric(this.settings.startPosition)?this.settings.startPosition:0),this.invalidate("items")},e.prototype.add=function(a,b){b=b===d?this._items.length:this.normalize(b,!0),this.trigger("add",{content:a,position:b}),0===this._items.length||b===this._items.length?(this.$stage.append(a),this._items.push(a),this._mergers.push(1*a.find("[data-merge]").andSelf("[data-merge]").attr("data-merge")||1)):(this._items[b].before(a),this._items.splice(b,0,a),this._mergers.splice(b,0,1*a.find("[data-merge]").andSelf("[data-merge]").attr("data-merge")||1)),this.invalidate("items"),this.trigger("added",{content:a,position:b})},e.prototype.remove=function(a){a=this.normalize(a,!0),a!==d&&(this.trigger("remove",{content:this._items[a],position:a}),this._items[a].remove(),this._items.splice(a,1),this._mergers.splice(a,1),this.invalidate("items"),this.trigger("removed",{content:null,position:a}))},e.prototype.addTriggerableEvents=function(){var b=a.proxy(function(b,c){return a.proxy(function(a){a.relatedTarget!==this&&(this.suppress([c]),b.apply(this,[].slice.call(arguments,1)),this.release([c]))},this)},this);a.each({next:this.next,prev:this.prev,to:this.to,destroy:this.destroy,refresh:this.refresh,replace:this.replace,add:this.add,remove:this.remove},a.proxy(function(a,c){this.$element.on(a+".owl.carousel",b(c,a+".owl.carousel"))},this))},e.prototype.watchVisibility=function(){function c(a){return a.offsetWidth>0&&a.offsetHeight>0}function d(){c(this.$element.get(0))&&(this.$element.removeClass("owl-hidden"),this.refresh(),b.clearInterval(this.e._checkVisibile))}c(this.$element.get(0))||(this.$element.addClass("owl-hidden"),b.clearInterval(this.e._checkVisibile),this.e._checkVisibile=b.setInterval(a.proxy(d,this),500))},e.prototype.preloadAutoWidthImages=function(b){var c,d,e,f;c=0,d=this,b.each(function(g,h){e=a(h),f=new Image,f.onload=function(){c++,e.attr("src",f.src),e.css("opacity",1),c>=b.length&&(d.state.imagesLoaded=!0,d.initialize())},f.src=e.attr("src")||e.attr("data-src")||e.attr("data-src-retina")})},e.prototype.destroy=function(){this.$element.hasClass(this.settings.themeClass)&&this.$element.removeClass(this.settings.themeClass),this.settings.responsive!==!1&&a(b).off("resize.owl.carousel"),this.transitionEndVendor&&this.off(this.$stage.get(0),this.transitionEndVendor,this.e._transitionEnd);for(var d in this._plugins)this._plugins[d].destroy();(this.settings.mouseDrag||this.settings.touchDrag)&&(this.$stage.off("mousedown touchstart touchcancel"),a(c).off(".owl.dragEvents"),this.$stage.get(0).onselectstart=function(){},this.$stage.off("dragstart",function(){return!1})),this.$element.off(".owl"),this.$stage.children(".cloned").remove(),this.e=null,this.$element.removeData("owlCarousel"),this.$stage.children().contents().unwrap(),this.$stage.children().unwrap(),this.$stage.unwrap()},e.prototype.op=function(a,b,c){var d=this.settings.rtl;switch(b){case"<":return d?a>c:c>a;case">":return d?c>a:a>c;case">=":return d?c>=a:a>=c;case"<=":return d?a>=c:c>=a}},e.prototype.on=function(a,b,c,d){a.addEventListener?a.addEventListener(b,c,d):a.attachEvent&&a.attachEvent("on"+b,c)},e.prototype.off=function(a,b,c,d){a.removeEventListener?a.removeEventListener(b,c,d):a.detachEvent&&a.detachEvent("on"+b,c)},e.prototype.trigger=function(b,c,d){var e={item:{count:this._items.length,index:this.current()}},f=a.camelCase(a.grep(["on",b,d],function(a){return a}).join("-").toLowerCase()),g=a.Event([b,"owl",d||"carousel"].join(".").toLowerCase(),a.extend({relatedTarget:this},e,c));return this._supress[b]||(a.each(this._plugins,function(a,b){b.onTrigger&&b.onTrigger(g)}),this.$element.trigger(g),this.settings&&"function"==typeof this.settings[f]&&this.settings[f].apply(this,g)),g},e.prototype.suppress=function(b){a.each(b,a.proxy(function(a,b){this._supress[b]=!0},this))},e.prototype.release=function(b){a.each(b,a.proxy(function(a,b){delete this._supress[b]},this))},e.prototype.browserSupport=function(){if(this.support3d=j(),this.support3d){this.transformVendor=i();var a=["transitionend","webkitTransitionEnd","transitionend","oTransitionEnd"];this.transitionEndVendor=a[h()],this.vendorName=this.transformVendor.replace(/Transform/i,""),this.vendorName=""!==this.vendorName?"-"+this.vendorName.toLowerCase()+"-":""}this.state.orientation=b.orientation},a.fn.owlCarousel=function(b){return this.each(function(){a(this).data("owlCarousel")||a(this).data("owlCarousel",new e(this,b))})},a.fn.owlCarousel.Constructor=e}(window.Zepto||window.jQuery,window,document),function(a,b){var c=function(b){this._core=b,this._loaded=[],this._handlers={"initialized.owl.carousel change.owl.carousel":a.proxy(function(b){if(b.namespace&&this._core.settings&&this._core.settings.lazyLoad&&(b.property&&"position"==b.property.name||"initialized"==b.type))for(var c=this._core.settings,d=c.center&&Math.ceil(c.items/2)||c.items,e=c.center&&-1*d||0,f=(b.property&&b.property.value||this._core.current())+e,g=this._core.clones().length,h=a.proxy(function(a,b){this.load(b)},this);e++<d;)this.load(g/2+this._core.relative(f)),g&&a.each(this._core.clones(this._core.relative(f++)),h)},this)},this._core.options=a.extend({},c.Defaults,this._core.options),this._core.$element.on(this._handlers)};c.Defaults={lazyLoad:!1},c.prototype.load=function(c){var d=this._core.$stage.children().eq(c),e=d&&d.find(".owl-lazy");!e||a.inArray(d.get(0),this._loaded)>-1||(e.each(a.proxy(function(c,d){var e,f=a(d),g=b.devicePixelRatio>1&&f.attr("data-src-retina")||f.attr("data-src");this._core.trigger("load",{element:f,url:g},"lazy"),f.is("img")?f.one("load.owl.lazy",a.proxy(function(){f.css("opacity",1),this._core.trigger("loaded",{element:f,url:g},"lazy")},this)).attr("src",g):(e=new Image,e.onload=a.proxy(function(){f.css({"background-image":"url("+g+")",opacity:"1"}),this._core.trigger("loaded",{element:f,url:g},"lazy")},this),e.src=g)},this)),this._loaded.push(d.get(0)))},c.prototype.destroy=function(){var a,b;for(a in this.handlers)this._core.$element.off(a,this.handlers[a]);for(b in Object.getOwnPropertyNames(this))"function"!=typeof this[b]&&(this[b]=null)},a.fn.owlCarousel.Constructor.Plugins.Lazy=c}(window.Zepto||window.jQuery,window,document),function(a){var b=function(c){this._core=c,this._handlers={"initialized.owl.carousel":a.proxy(function(){this._core.settings.autoHeight&&this.update()},this),"changed.owl.carousel":a.proxy(function(a){this._core.settings.autoHeight&&"position"==a.property.name&&this.update()},this),"loaded.owl.lazy":a.proxy(function(a){this._core.settings.autoHeight&&a.element.closest("."+this._core.settings.itemClass)===this._core.$stage.children().eq(this._core.current())&&this.update()},this)},this._core.options=a.extend({},b.Defaults,this._core.options),this._core.$element.on(this._handlers)};b.Defaults={autoHeight:!1,autoHeightClass:"owl-height"},b.prototype.update=function(){this._core.$stage.parent().height(this._core.$stage.children().eq(this._core.current()).height()).addClass(this._core.settings.autoHeightClass)},b.prototype.destroy=function(){var a,b;for(a in this._handlers)this._core.$element.off(a,this._handlers[a]);for(b in Object.getOwnPropertyNames(this))"function"!=typeof this[b]&&(this[b]=null)},a.fn.owlCarousel.Constructor.Plugins.AutoHeight=b}(window.Zepto||window.jQuery,window,document),function(a,b,c){var d=function(b){this._core=b,this._videos={},this._playing=null,this._fullscreen=!1,this._handlers={"resize.owl.carousel":a.proxy(function(a){this._core.settings.video&&!this.isInFullScreen()&&a.preventDefault()},this),"refresh.owl.carousel changed.owl.carousel":a.proxy(function(){this._playing&&this.stop()},this),"prepared.owl.carousel":a.proxy(function(b){var c=a(b.content).find(".owl-video");c.length&&(c.css("display","none"),this.fetch(c,a(b.content)))},this)},this._core.options=a.extend({},d.Defaults,this._core.options),this._core.$element.on(this._handlers),this._core.$element.on("click.owl.video",".owl-video-play-icon",a.proxy(function(a){this.play(a)},this))};d.Defaults={video:!1,videoHeight:!1,videoWidth:!1},d.prototype.fetch=function(a,b){var c=a.attr("data-vimeo-id")?"vimeo":"youtube",d=a.attr("data-vimeo-id")||a.attr("data-youtube-id"),e=a.attr("data-width")||this._core.settings.videoWidth,f=a.attr("data-height")||this._core.settings.videoHeight,g=a.attr("href");if(!g)throw new Error("Missing video URL.");if(d=g.match(/(http:|https:|)\/\/(player.|www.)?(vimeo\.com|youtu(be\.com|\.be|be\.googleapis\.com))\/(video\/|embed\/|watch\?v=|v\/)?([A-Za-z0-9._%-]*)(\&\S+)?/),d[3].indexOf("youtu")>-1)c="youtube";else{if(!(d[3].indexOf("vimeo")>-1))throw new Error("Video URL not supported.");c="vimeo"}d=d[6],this._videos[g]={type:c,id:d,width:e,height:f},b.attr("data-video",g),this.thumbnail(a,this._videos[g])},d.prototype.thumbnail=function(b,c){var d,e,f,g=c.width&&c.height?'style="width:'+c.width+"px;height:"+c.height+'px;"':"",h=b.find("img"),i="src",j="",k=this._core.settings,l=function(a){e='<div class="owl-video-play-icon"></div>',d=k.lazyLoad?'<div class="owl-video-tn '+j+'" '+i+'="'+a+'"></div>':'<div class="owl-video-tn" style="opacity:1;background-image:url('+a+')"></div>',b.after(d),b.after(e)};return b.wrap('<div class="owl-video-wrapper"'+g+"></div>"),this._core.settings.lazyLoad&&(i="data-src",j="owl-lazy"),h.length?(l(h.attr(i)),h.remove(),!1):void("youtube"===c.type?(f="http://img.youtube.com/vi/"+c.id+"/hqdefault.jpg",l(f)):"vimeo"===c.type&&a.ajax({type:"GET",url:"http://vimeo.com/api/v2/video/"+c.id+".json",jsonp:"callback",dataType:"jsonp",success:function(a){f=a[0].thumbnail_large,l(f)}}))},d.prototype.stop=function(){this._core.trigger("stop",null,"video"),this._playing.find(".owl-video-frame").remove(),this._playing.removeClass("owl-video-playing"),this._playing=null},d.prototype.play=function(b){this._core.trigger("play",null,"video"),this._playing&&this.stop();var c,d,e=a(b.target||b.srcElement),f=e.closest("."+this._core.settings.itemClass),g=this._videos[f.attr("data-video")],h=g.width||"100%",i=g.height||this._core.$stage.height();"youtube"===g.type?c='<iframe width="'+h+'" height="'+i+'" src="http://www.youtube.com/embed/'+g.id+"?autoplay=1&v="+g.id+'" frameborder="0" allowfullscreen></iframe>':"vimeo"===g.type&&(c='<iframe src="http://player.vimeo.com/video/'+g.id+'?autoplay=1" width="'+h+'" height="'+i+'" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>'),f.addClass("owl-video-playing"),this._playing=f,d=a('<div style="height:'+i+"px; width:"+h+'px" class="owl-video-frame">'+c+"</div>"),e.after(d)},d.prototype.isInFullScreen=function(){var d=c.fullscreenElement||c.mozFullScreenElement||c.webkitFullscreenElement;return d&&a(d).parent().hasClass("owl-video-frame")&&(this._core.speed(0),this._fullscreen=!0),d&&this._fullscreen&&this._playing?!1:this._fullscreen?(this._fullscreen=!1,!1):this._playing&&this._core.state.orientation!==b.orientation?(this._core.state.orientation=b.orientation,!1):!0},d.prototype.destroy=function(){var a,b;this._core.$element.off("click.owl.video");for(a in this._handlers)this._core.$element.off(a,this._handlers[a]);for(b in Object.getOwnPropertyNames(this))"function"!=typeof this[b]&&(this[b]=null)},a.fn.owlCarousel.Constructor.Plugins.Video=d}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){var e=function(b){this.core=b,this.core.options=a.extend({},e.Defaults,this.core.options),this.swapping=!0,this.previous=d,this.next=d,this.handlers={"change.owl.carousel":a.proxy(function(a){"position"==a.property.name&&(this.previous=this.core.current(),this.next=a.property.value)},this),"drag.owl.carousel dragged.owl.carousel translated.owl.carousel":a.proxy(function(a){this.swapping="translated"==a.type},this),"translate.owl.carousel":a.proxy(function(){this.swapping&&(this.core.options.animateOut||this.core.options.animateIn)&&this.swap()},this)},this.core.$element.on(this.handlers)};e.Defaults={animateOut:!1,animateIn:!1},e.prototype.swap=function(){if(1===this.core.settings.items&&this.core.support3d){this.core.speed(0);var b,c=a.proxy(this.clear,this),d=this.core.$stage.children().eq(this.previous),e=this.core.$stage.children().eq(this.next),f=this.core.settings.animateIn,g=this.core.settings.animateOut;this.core.current()!==this.previous&&(g&&(b=this.core.coordinates(this.previous)-this.core.coordinates(this.next),d.css({left:b+"px"}).addClass("animated owl-animated-out").addClass(g).one("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",c)),f&&e.addClass("animated owl-animated-in").addClass(f).one("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",c))}},e.prototype.clear=function(b){a(b.target).css({left:""}).removeClass("animated owl-animated-out owl-animated-in").removeClass(this.core.settings.animateIn).removeClass(this.core.settings.animateOut),this.core.transitionEnd()},e.prototype.destroy=function(){var a,b;for(a in this.handlers)this.core.$element.off(a,this.handlers[a]);for(b in Object.getOwnPropertyNames(this))"function"!=typeof this[b]&&(this[b]=null)},a.fn.owlCarousel.Constructor.Plugins.Animate=e}(window.Zepto||window.jQuery,window,document),function(a,b,c){var d=function(b){this.core=b,this.core.options=a.extend({},d.Defaults,this.core.options),this.handlers={"translated.owl.carousel refreshed.owl.carousel":a.proxy(function(){this.autoplay()
|
2 |
+
},this),"play.owl.autoplay":a.proxy(function(a,b,c){this.play(b,c)},this),"stop.owl.autoplay":a.proxy(function(){this.stop()},this),"mouseover.owl.autoplay":a.proxy(function(){this.core.settings.autoplayHoverPause&&this.pause()},this),"mouseleave.owl.autoplay":a.proxy(function(){this.core.settings.autoplayHoverPause&&this.autoplay()},this)},this.core.$element.on(this.handlers)};d.Defaults={autoplay:!1,autoplayTimeout:5e3,autoplayHoverPause:!1,autoplaySpeed:!1},d.prototype.autoplay=function(){this.core.settings.autoplay&&!this.core.state.videoPlay?(b.clearInterval(this.interval),this.interval=b.setInterval(a.proxy(function(){this.play()},this),this.core.settings.autoplayTimeout)):b.clearInterval(this.interval)},d.prototype.play=function(){return c.hidden===!0||this.core.state.isTouch||this.core.state.isScrolling||this.core.state.isSwiping||this.core.state.inMotion?void 0:this.core.settings.autoplay===!1?void b.clearInterval(this.interval):void this.core.next(this.core.settings.autoplaySpeed)},d.prototype.stop=function(){b.clearInterval(this.interval)},d.prototype.pause=function(){b.clearInterval(this.interval)},d.prototype.destroy=function(){var a,c;b.clearInterval(this.interval);for(a in this.handlers)this.core.$element.off(a,this.handlers[a]);for(c in Object.getOwnPropertyNames(this))"function"!=typeof this[c]&&(this[c]=null)},a.fn.owlCarousel.Constructor.Plugins.autoplay=d}(window.Zepto||window.jQuery,window,document),function(a){"use strict";var b=function(c){this._core=c,this._initialized=!1,this._pages=[],this._controls={},this._templates=[],this.$element=this._core.$element,this._overrides={next:this._core.next,prev:this._core.prev,to:this._core.to},this._handlers={"prepared.owl.carousel":a.proxy(function(b){this._core.settings.dotsData&&this._templates.push(a(b.content).find("[data-dot]").andSelf("[data-dot]").attr("data-dot"))},this),"add.owl.carousel":a.proxy(function(b){this._core.settings.dotsData&&this._templates.splice(b.position,0,a(b.content).find("[data-dot]").andSelf("[data-dot]").attr("data-dot"))},this),"remove.owl.carousel prepared.owl.carousel":a.proxy(function(a){this._core.settings.dotsData&&this._templates.splice(a.position,1)},this),"change.owl.carousel":a.proxy(function(a){if("position"==a.property.name&&!this._core.state.revert&&!this._core.settings.loop&&this._core.settings.navRewind){var b=this._core.current(),c=this._core.maximum(),d=this._core.minimum();a.data=a.property.value>c?b>=c?d:c:a.property.value<d?c:a.property.value}},this),"changed.owl.carousel":a.proxy(function(a){"position"==a.property.name&&this.draw()},this),"refreshed.owl.carousel":a.proxy(function(){this._initialized||(this.initialize(),this._initialized=!0),this._core.trigger("refresh",null,"navigation"),this.update(),this.draw(),this._core.trigger("refreshed",null,"navigation")},this)},this._core.options=a.extend({},b.Defaults,this._core.options),this.$element.on(this._handlers)};b.Defaults={nav:!1,navRewind:!0,navText:["prev","next"],navSpeed:!1,navElement:"div",navContainer:!1,navContainerClass:"owl-nav",navClass:["owl-prev","owl-next"],slideBy:1,dotClass:"owl-dot",dotsClass:"owl-dots",dots:!0,dotsEach:!1,dotData:!1,dotsSpeed:!1,dotsContainer:!1,controlsClass:"owl-controls"},b.prototype.initialize=function(){var b,c,d=this._core.settings;d.dotsData||(this._templates=[a("<div>").addClass(d.dotClass).append(a("<span>")).prop("outerHTML")]),d.navContainer&&d.dotsContainer||(this._controls.$container=a("<div>").addClass(d.controlsClass).appendTo(this.$element)),this._controls.$indicators=d.dotsContainer?a(d.dotsContainer):a("<div>").hide().addClass(d.dotsClass).appendTo(this._controls.$container),this._controls.$indicators.on("click","div",a.proxy(function(b){var c=a(b.target).parent().is(this._controls.$indicators)?a(b.target).index():a(b.target).parent().index();b.preventDefault(),this.to(c,d.dotsSpeed)},this)),b=d.navContainer?a(d.navContainer):a("<div>").addClass(d.navContainerClass).prependTo(this._controls.$container),this._controls.$next=a("<"+d.navElement+">"),this._controls.$previous=this._controls.$next.clone(),this._controls.$previous.addClass(d.navClass[0]).html(d.navText[0]).hide().prependTo(b).on("click",a.proxy(function(){this.prev(d.navSpeed)},this)),this._controls.$next.addClass(d.navClass[1]).html(d.navText[1]).hide().appendTo(b).on("click",a.proxy(function(){this.next(d.navSpeed)},this));for(c in this._overrides)this._core[c]=a.proxy(this[c],this)},b.prototype.destroy=function(){var a,b,c,d;for(a in this._handlers)this.$element.off(a,this._handlers[a]);for(b in this._controls)this._controls[b].remove();for(d in this.overides)this._core[d]=this._overrides[d];for(c in Object.getOwnPropertyNames(this))"function"!=typeof this[c]&&(this[c]=null)},b.prototype.update=function(){var a,b,c,d=this._core.settings,e=this._core.clones().length/2,f=e+this._core.items().length,g=d.center||d.autoWidth||d.dotData?1:d.dotsEach||d.items;if("page"!==d.slideBy&&(d.slideBy=Math.min(d.slideBy,d.items)),d.dots||"page"==d.slideBy)for(this._pages=[],a=e,b=0,c=0;f>a;a++)(b>=g||0===b)&&(this._pages.push({start:a-e,end:a-e+g-1}),b=0,++c),b+=this._core.mergers(this._core.relative(a))},b.prototype.draw=function(){var b,c,d="",e=this._core.settings,f=(this._core.$stage.children(),this._core.relative(this._core.current()));if(!e.nav||e.loop||e.navRewind||(this._controls.$previous.toggleClass("disabled",0>=f),this._controls.$next.toggleClass("disabled",f>=this._core.maximum())),this._controls.$previous.toggle(e.nav),this._controls.$next.toggle(e.nav),e.dots){if(b=this._pages.length-this._controls.$indicators.children().length,e.dotData&&0!==b){for(c=0;c<this._controls.$indicators.children().length;c++)d+=this._templates[this._core.relative(c)];this._controls.$indicators.html(d)}else b>0?(d=new Array(b+1).join(this._templates[0]),this._controls.$indicators.append(d)):0>b&&this._controls.$indicators.children().slice(b).remove();this._controls.$indicators.find(".active").removeClass("active"),this._controls.$indicators.children().eq(a.inArray(this.current(),this._pages)).addClass("active")}this._controls.$indicators.toggle(e.dots)},b.prototype.onTrigger=function(b){var c=this._core.settings;b.page={index:a.inArray(this.current(),this._pages),count:this._pages.length,size:c&&(c.center||c.autoWidth||c.dotData?1:c.dotsEach||c.items)}},b.prototype.current=function(){var b=this._core.relative(this._core.current());return a.grep(this._pages,function(a){return a.start<=b&&a.end>=b}).pop()},b.prototype.getPosition=function(b){var c,d,e=this._core.settings;return"page"==e.slideBy?(c=a.inArray(this.current(),this._pages),d=this._pages.length,b?++c:--c,c=this._pages[(c%d+d)%d].start):(c=this._core.relative(this._core.current()),d=this._core.items().length,b?c+=e.slideBy:c-=e.slideBy),c},b.prototype.next=function(b){a.proxy(this._overrides.to,this._core)(this.getPosition(!0),b)},b.prototype.prev=function(b){a.proxy(this._overrides.to,this._core)(this.getPosition(!1),b)},b.prototype.to=function(b,c,d){var e;d?a.proxy(this._overrides.to,this._core)(b,c):(e=this._pages.length,a.proxy(this._overrides.to,this._core)(this._pages[(b%e+e)%e].start,c))},a.fn.owlCarousel.Constructor.Plugins.Navigation=b}(window.Zepto||window.jQuery,window,document),function(a,b){"use strict";var c=function(d){this._core=d,this._hashes={},this.$element=this._core.$element,this._handlers={"initialized.owl.carousel":a.proxy(function(){"URLHash"==this._core.settings.startPosition&&a(b).trigger("hashchange.owl.navigation")},this),"prepared.owl.carousel":a.proxy(function(b){var c=a(b.content).find("[data-hash]").andSelf("[data-hash]").attr("data-hash");this._hashes[c]=b.content},this)},this._core.options=a.extend({},c.Defaults,this._core.options),this.$element.on(this._handlers),a(b).on("hashchange.owl.navigation",a.proxy(function(){var a=b.location.hash.substring(1),c=this._core.$stage.children(),d=this._hashes[a]&&c.index(this._hashes[a])||0;return a?void this._core.to(d,!1,!0):!1},this))};c.Defaults={URLhashListener:!1},c.prototype.destroy=function(){var c,d;a(b).off("hashchange.owl.navigation");for(c in this._handlers)this._core.$element.off(c,this._handlers[c]);for(d in Object.getOwnPropertyNames(this))"function"!=typeof this[d]&&(this[d]=null)},a.fn.owlCarousel.Constructor.Plugins.Hash=c}(window.Zepto||window.jQuery,window,document);
|
|
|
|
|
|
|
|
|
|
themes/foundation/modules/owlcarousel/owlcarousel.php
CHANGED
@@ -3,20 +3,19 @@
|
|
3 |
add_action( 'foundation_module_init_mobile', 'foundation_owlcarousel_init' );
|
4 |
|
5 |
function foundation_owlcarousel_init() {
|
6 |
-
wp_enqueue_style(
|
7 |
-
'
|
8 |
-
foundation_get_base_module_url() . '/owlcarousel/assets/owl.
|
9 |
-
'',
|
10 |
-
md5( FOUNDATION_VERSION )
|
11 |
-
);
|
12 |
|
13 |
wp_enqueue_style(
|
14 |
-
'
|
15 |
-
foundation_get_base_module_url() . '/owlcarousel/
|
16 |
'',
|
17 |
md5( FOUNDATION_VERSION )
|
18 |
);
|
19 |
-
|
20 |
wp_enqueue_script(
|
21 |
'foundation_owlcarousel',
|
22 |
foundation_get_base_module_url() . '/owlcarousel/owl.carousel.min.js',
|
3 |
add_action( 'foundation_module_init_mobile', 'foundation_owlcarousel_init' );
|
4 |
|
5 |
function foundation_owlcarousel_init() {
|
6 |
+
// wp_enqueue_style(
|
7 |
+
// 'foundation_owlcarousel_theme',
|
8 |
+
// foundation_get_base_module_url() . '/owlcarousel/assets/owl.theme.default.min.css',
|
9 |
+
// '',
|
10 |
+
// md5( FOUNDATION_VERSION )
|
11 |
+
// );
|
12 |
|
13 |
wp_enqueue_style(
|
14 |
+
'foundation_owlcarousel',
|
15 |
+
foundation_get_base_module_url() . '/owlcarousel/owl.carousel.min.css',
|
16 |
'',
|
17 |
md5( FOUNDATION_VERSION )
|
18 |
);
|
|
|
19 |
wp_enqueue_script(
|
20 |
'foundation_owlcarousel',
|
21 |
foundation_get_base_module_url() . '/owlcarousel/owl.carousel.min.js',
|
themes/foundation/root-functions.php
CHANGED
@@ -362,7 +362,7 @@ function foundation_setup_viewport(){
|
|
362 |
function foundation_render_theme_settings( $page_options ) {
|
363 |
wptouch_add_sub_page( FOUNDATION_PAGE_GENERAL, 'foundation-page-theme-settings', $page_options );
|
364 |
|
365 |
-
if (
|
366 |
if ( foundation_has_theme_colors() ) {
|
367 |
$color_settings = array();
|
368 |
|
362 |
function foundation_render_theme_settings( $page_options ) {
|
363 |
wptouch_add_sub_page( FOUNDATION_PAGE_GENERAL, 'foundation-page-theme-settings', $page_options );
|
364 |
|
365 |
+
if ( !wptouch_admin_use_customizer() ) {
|
366 |
if ( foundation_has_theme_colors() ) {
|
367 |
$color_settings = array();
|
368 |
|
wptouch.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/*
|
3 |
Plugin Name: WPtouch Mobile Plugin
|
4 |
Plugin URI: http://www.wptouch.com/
|
5 |
-
Version: 4.1.
|
6 |
Description: Make a beautiful mobile-friendly version of your website with just a few clicks
|
7 |
Author: BraveNewCode Inc.
|
8 |
Author URI: http://www.bravenewcode.com/
|
@@ -14,7 +14,7 @@
|
|
14 |
|
15 |
function wptouch_create_four_object() {
|
16 |
if ( !defined( 'WPTOUCH_IS_PRO' ) ) {
|
17 |
-
define( 'WPTOUCH_VERSION', '4.1.
|
18 |
|
19 |
define( 'WPTOUCH_BASE_NAME', basename( __FILE__, '.php' ) . '.php' );
|
20 |
define( 'WPTOUCH_DIR', WP_PLUGIN_DIR . DIRECTORY_SEPARATOR . basename( __FILE__, '.php' ) );
|
2 |
/*
|
3 |
Plugin Name: WPtouch Mobile Plugin
|
4 |
Plugin URI: http://www.wptouch.com/
|
5 |
+
Version: 4.1.5
|
6 |
Description: Make a beautiful mobile-friendly version of your website with just a few clicks
|
7 |
Author: BraveNewCode Inc.
|
8 |
Author URI: http://www.bravenewcode.com/
|
14 |
|
15 |
function wptouch_create_four_object() {
|
16 |
if ( !defined( 'WPTOUCH_IS_PRO' ) ) {
|
17 |
+
define( 'WPTOUCH_VERSION', '4.1.5' );
|
18 |
|
19 |
define( 'WPTOUCH_BASE_NAME', basename( __FILE__, '.php' ) . '.php' );
|
20 |
define( 'WPTOUCH_DIR', WP_PLUGIN_DIR . DIRECTORY_SEPARATOR . basename( __FILE__, '.php' ) );
|