j1-template 2023.7.0 → 2023.8.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/_includes/themes/j1/modules/searcher/procedures/topsearch.proc +2 -1
- data/_includes/themes/j1/procedures/global/create_bs_button.proc +0 -1
- data/_includes/themes/j1/procedures/global/create_word_cloud.proc +3 -2
- data/_includes/themes/j1/procedures/global/date-german.proc +2 -7
- data/_includes/themes/j1/procedures/global/get_category.proc +13 -19
- data/_includes/themes/j1/procedures/global/get_category_item.proc +29 -33
- data/_includes/themes/j1/procedures/global/get_documents_dir.proc +8 -8
- data/_includes/themes/j1/procedures/global/get_page_url.proc +9 -14
- data/_includes/themes/j1/procedures/global/select_color.proc +12 -17
- data/_includes/themes/j1/procedures/global/select_font_size.proc +31 -35
- data/_includes/themes/j1/procedures/global/select_icon_size.proc +38 -40
- data/_includes/themes/j1/procedures/global/select_location.proc +56 -59
- data/_includes/themes/j1/procedures/global/set_base_vars_folders.proc +2 -4
- data/_includes/themes/j1/procedures/global/set_image_block.proc +4 -2
- data/_includes/themes/j1/procedures/global/setup.proc +8 -3
- data/assets/data/masonry.html +13 -13
- data/assets/themes/j1/adapter/js/j1.js +39 -39
- data/assets/themes/j1/adapter/js/masterslider.js +2 -1
- data/assets/themes/j1/adapter/js/slick.js +13 -10
- data/assets/themes/j1/adapter/js/translator.js +62 -58
- data/assets/themes/j1/core/css/themes/unolight/bootstrap.css +70 -0
- data/assets/themes/j1/core/css/themes/unolight/bootstrap.min.css +1 -1
- data/assets/themes/j1/core/js/template.js +1339 -3
- data/assets/themes/j1/core/js/template.min.js +7 -7
- data/assets/themes/j1/core/js/template.min.js.map +1 -1
- data/assets/themes/j1/modules/carousel/css/theme/uno.css +5 -0
- data/assets/themes/j1/modules/carousel/css/theme/uno.min.css +1 -1
- data/assets/themes/j1/modules/masonry/css/theme/readme +1 -0
- data/assets/themes/j1/modules/masterslider/css/theme/uno.css +2 -3
- data/assets/themes/j1/modules/masterslider/css/theme/uno.min.css +1 -1
- data/assets/themes/j1/modules/slick/lightbox/css/theme/uno.css +13 -2
- data/assets/themes/j1/modules/slick/lightbox/css/theme/uno.min.css +1 -1
- data/assets/themes/j1/modules/slick/lightbox/js/slick-lightbox.js +373 -347
- data/assets/themes/j1/modules/slick/slider/css/theme/uno.css +20 -51
- data/assets/themes/j1/modules/slick/slider/css/theme/uno.min.css +2 -2
- data/lib/j1/version.rb +1 -1
- data/lib/starter_web/Gemfile +2 -2
- data/lib/starter_web/README.md +5 -5
- data/lib/starter_web/_config.yml +1 -1
- data/lib/starter_web/_data/blocks/banner.yml +8 -9
- data/lib/starter_web/_data/blocks/footer.yml +8 -10
- data/lib/starter_web/_data/modules/masonry.yml +9 -1
- data/lib/starter_web/_data/modules/masterslider.yml +69 -116
- data/lib/starter_web/_data/modules/navigator_menu.yml +58 -51
- data/lib/starter_web/_data/resources.yml +3 -3
- data/lib/starter_web/_data/templates/feed.xml +1 -1
- data/lib/starter_web/_includes/attributes.asciidoc +1 -0
- data/lib/starter_web/_plugins/asciidoctor/callout.rb +2 -2
- data/lib/starter_web/_plugins/asciidoctor/masterslider-block.rb +1 -1
- data/lib/starter_web/_plugins/asciidoctor/slick-block.rb +1 -1
- data/lib/starter_web/_plugins/index/lunr.rb +1 -1
- data/lib/starter_web/assets/images/collections/books/biography/a_life_in_questions.jpg +0 -0
- data/lib/starter_web/collections/posts/public/featured/_posts/0000-00-00-welcome-to-j1.adoc.erb +5 -5
- data/lib/starter_web/index.html +6 -6
- data/lib/starter_web/package.json +1 -1
- data/lib/starter_web/pages/public/blog/navigator/archive/categoryview.html +0 -1
- data/lib/starter_web/pages/public/tools/previewer/preview_bootstrap_theme.adoc +148 -140
- data/lib/starter_web/utilsrv/_defaults/package.json +1 -1
- data/lib/starter_web/utilsrv/package.json +1 -1
- metadata +3 -75
- data/assets/themes/j1/modules/carousel/js/carousel.js +0 -1517
- data/assets/themes/j1/modules/carousel/js/carousel.min.js +0 -57
- data/assets/themes/j1/modules/masonry/css/theme/uno.css +0 -35
- data/assets/themes/j1/modules/masonry/css/theme/uno.min.css +0 -15
- data/assets/themes/j1/modules/speak2me/LICENSE +0 -21
- data/assets/themes/j1/modules/speak2me/js/speak2me.js +0 -947
- data/assets/themes/j1/modules/speak2me/js/speak2me.min.js +0 -26
- data/lib/starter_web/_data/modules/buymeacoffee.yml +0 -30
- data/lib/starter_web/_data/modules/defaults/buymeacoffee.yml +0 -30
- data/lib/starter_web/assets/images/modules/masterslider/slider_5/ms-free-food-restaurant-140x80.jpg +0 -0
- data/lib/starter_web/assets/images/modules/masterslider/slider_5/ms-free-food-restaurant.jpg +0 -0
- data/lib/starter_web/assets/images/modules/masterslider/slider_5/ms-free-food-single-man-140x80.jpg +0 -0
- data/lib/starter_web/assets/images/modules/masterslider/slider_5/ms-free-food-single-man.jpg +0 -0
- data/lib/starter_web/assets/images/modules/masterslider/slider_5/ms-free-food-single-woman-140x80.jpg +0 -0
- data/lib/starter_web/assets/images/modules/masterslider/slider_5/ms-free-food-single-woman.jpg +0 -0
- data/lib/starter_web/pages/public/learn/bs_sass_variables/_includes/attributes.asciidoc +0 -58
- data/lib/starter_web/pages/public/learn/bs_sass_variables/_includes/documents/accordion.asciidoc +0 -34
- data/lib/starter_web/pages/public/learn/bs_sass_variables/_includes/documents/alerts.asciidoc +0 -15
- data/lib/starter_web/pages/public/learn/bs_sass_variables/_includes/documents/badges.asciidoc +0 -9
- data/lib/starter_web/pages/public/learn/bs_sass_variables/_includes/documents/body.asciidoc +0 -14
- data/lib/starter_web/pages/public/learn/bs_sass_variables/_includes/documents/breadcrumbs.asciidoc +0 -14
- data/lib/starter_web/pages/public/learn/bs_sass_variables/_includes/documents/buttons.asciidoc +0 -75
- data/lib/starter_web/pages/public/learn/bs_sass_variables/_includes/documents/cards.asciidoc +0 -22
- data/lib/starter_web/pages/public/learn/bs_sass_variables/_includes/documents/carousel.asciidoc +0 -37
- data/lib/starter_web/pages/public/learn/bs_sass_variables/_includes/documents/close.asciidoc +0 -15
- data/lib/starter_web/pages/public/learn/bs_sass_variables/_includes/documents/code.asciidoc +0 -14
- data/lib/starter_web/pages/public/learn/bs_sass_variables/_includes/documents/color_system.asciidoc +0 -353
- data/lib/starter_web/pages/public/learn/bs_sass_variables/_includes/documents/components.asciidoc +0 -69
- data/lib/starter_web/pages/public/learn/bs_sass_variables/_includes/documents/dropdowns.asciidoc +0 -53
- data/lib/starter_web/pages/public/learn/bs_sass_variables/_includes/documents/figures.asciidoc +0 -5
- data/lib/starter_web/pages/public/learn/bs_sass_variables/_includes/documents/forms.asciidoc +0 -270
- data/lib/starter_web/pages/public/learn/bs_sass_variables/_includes/documents/grid.asciidoc +0 -49
- data/lib/starter_web/pages/public/learn/bs_sass_variables/_includes/documents/links.asciidoc +0 -21
- data/lib/starter_web/pages/public/learn/bs_sass_variables/_includes/documents/list_groups.asciidoc +0 -28
- data/lib/starter_web/pages/public/learn/bs_sass_variables/_includes/documents/modals.asciidoc +0 -43
- data/lib/starter_web/pages/public/learn/bs_sass_variables/_includes/documents/navbar.asciidoc +0 -45
- data/lib/starter_web/pages/public/learn/bs_sass_variables/_includes/documents/navs.asciidoc +0 -28
- data/lib/starter_web/pages/public/learn/bs_sass_variables/_includes/documents/offcanvas.asciidoc +0 -16
- data/lib/starter_web/pages/public/learn/bs_sass_variables/_includes/documents/options.asciidoc +0 -30
- data/lib/starter_web/pages/public/learn/bs_sass_variables/_includes/documents/pagination.asciidoc +0 -40
- data/lib/starter_web/pages/public/learn/bs_sass_variables/_includes/documents/paragraph.asciidoc +0 -5
- data/lib/starter_web/pages/public/learn/bs_sass_variables/_includes/documents/placeholders.asciidoc +0 -5
- data/lib/starter_web/pages/public/learn/bs_sass_variables/_includes/documents/popovers.asciidoc +0 -28
- data/lib/starter_web/pages/public/learn/bs_sass_variables/_includes/documents/position.asciidoc +0 -8
- data/lib/starter_web/pages/public/learn/bs_sass_variables/_includes/documents/progress_bars.asciidoc +0 -12
- data/lib/starter_web/pages/public/learn/bs_sass_variables/_includes/documents/spacing.asciidoc +0 -14
- data/lib/starter_web/pages/public/learn/bs_sass_variables/_includes/documents/spinners.asciidoc +0 -12
- data/lib/starter_web/pages/public/learn/bs_sass_variables/_includes/documents/tables.asciidoc +0 -55
- data/lib/starter_web/pages/public/learn/bs_sass_variables/_includes/documents/thumbnails.asciidoc +0 -9
- data/lib/starter_web/pages/public/learn/bs_sass_variables/_includes/documents/toasts.asciidoc +0 -18
- data/lib/starter_web/pages/public/learn/bs_sass_variables/_includes/documents/tooltips.asciidoc +0 -28
- data/lib/starter_web/pages/public/learn/bs_sass_variables/_includes/documents/typography.asciidoc +0 -115
- data/lib/starter_web/pages/public/learn/bs_sass_variables/_includes/documents/z_index.asciidoc +0 -26
- data/lib/starter_web/pages/public/learn/bs_sass_variables/_includes/tables/_table.asciidoc +0 -9
- data/lib/starter_web/pages/public/learn/bs_sass_variables/_includes/tables/accordion.asciidoc +0 -87
- data/lib/starter_web/pages/public/learn/bs_sass_variables/bs_sass_variables.adoc +0 -267
- data/lib/starter_web/pages/public/learn/core_web_vitals/_includes/attributes.asciidoc +0 -59
- data/lib/starter_web/pages/public/learn/core_web_vitals/_includes/documents/100_chapter.asciidoc +0 -541
- data/lib/starter_web/pages/public/learn/core_web_vitals/_includes/documents/200_chapter.asciidoc +0 -33
- data/lib/starter_web/pages/public/learn/core_web_vitals/_includes/tables/build_command_options.asciidoc +0 -72
- data/lib/starter_web/pages/public/learn/core_web_vitals/_includes/tables/files_and_folders.asciidoc +0 -66
- data/lib/starter_web/pages/public/learn/core_web_vitals/_includes/tables/global_configuration_options.asciidoc +0 -63
- data/lib/starter_web/pages/public/learn/core_web_vitals/_includes/tables/global_variables.asciidoc +0 -26
- data/lib/starter_web/pages/public/learn/core_web_vitals/_includes/tables/page_variables.asciidoc +0 -54
- data/lib/starter_web/pages/public/learn/core_web_vitals/_includes/tables/serve_command_options.asciidoc +0 -45
- data/lib/starter_web/pages/public/learn/core_web_vitals/_includes/tables/site_variables.asciidoc +0 -59
- data/lib/starter_web/pages/public/learn/core_web_vitals/core_web_vitals.adoc +0 -447
- data/lib/starter_web/pages/public/learn/roundtrip/lunr_search.1.asciidoc +0 -460
- data/lib/starter_web/pages/public/manuals/speak2me.adoc +0 -412
- data/lib/starter_web/pages/public/tools/cheatsheet/gem.adoc +0 -259
- data/lib/starter_web/pages/public/tools/cheatsheet/git.adoc +0 -1462
- data/lib/starter_web/pages/public/tools/cheatsheet/j1.adoc +0 -177
- data/lib/starter_web/pages/public/tools/cheatsheet/yaml.adoc +0 -522
@@ -1723,6 +1723,1314 @@ module.exports = function asciidoctor(options) {
|
|
1723
1723
|
|
1724
1724
|
/***/ }),
|
1725
1725
|
|
1726
|
+
/***/ 254:
|
1727
|
+
/***/ (() => {
|
1728
|
+
|
1729
|
+
/*
|
1730
|
+
* jQuery OwlCarousel v1.3.3
|
1731
|
+
*
|
1732
|
+
* Copyright (C) 2013-2016 Bartosz Wojciechowski
|
1733
|
+
* http://jekyll.one/owlcarousel/
|
1734
|
+
*
|
1735
|
+
* Licensed under MIT
|
1736
|
+
*
|
1737
|
+
*/
|
1738
|
+
|
1739
|
+
/*JS Lint helpers: */
|
1740
|
+
/*global dragMove: false, dragEnd: false, $, jQuery, alert, window, document */
|
1741
|
+
/*jslint nomen: true, continue:true */
|
1742
|
+
|
1743
|
+
(function ($, window, document) {
|
1744
|
+
var Carousel = {
|
1745
|
+
init: function (options, el) {
|
1746
|
+
var base = this;
|
1747
|
+
base.$elem = $(el);
|
1748
|
+
base.options = $.extend({}, $.fn.owlCarousel.options, base.$elem.data(), options);
|
1749
|
+
base.userOptions = options;
|
1750
|
+
base.loadContent();
|
1751
|
+
},
|
1752
|
+
loadContent: function () {
|
1753
|
+
var base = this,
|
1754
|
+
url;
|
1755
|
+
function getData(data) {
|
1756
|
+
var i,
|
1757
|
+
content = "";
|
1758
|
+
if (typeof base.options.jsonSuccess === "function") {
|
1759
|
+
base.options.jsonSuccess.apply(this, [data]);
|
1760
|
+
} else {
|
1761
|
+
for (i in data.owl) {
|
1762
|
+
if (data.owl.hasOwnProperty(i)) {
|
1763
|
+
content += data.owl[i].item;
|
1764
|
+
}
|
1765
|
+
}
|
1766
|
+
base.$elem.html(content);
|
1767
|
+
}
|
1768
|
+
base.logIn();
|
1769
|
+
}
|
1770
|
+
if (typeof base.options.beforeInit === "function") {
|
1771
|
+
base.options.beforeInit.apply(this, [base.$elem]);
|
1772
|
+
}
|
1773
|
+
if (typeof base.options.jsonPath === "string") {
|
1774
|
+
url = base.options.jsonPath;
|
1775
|
+
$.getJSON(url, getData);
|
1776
|
+
} else {
|
1777
|
+
base.logIn();
|
1778
|
+
}
|
1779
|
+
},
|
1780
|
+
logIn: function () {
|
1781
|
+
var base = this;
|
1782
|
+
base.$elem.data({
|
1783
|
+
"owl-originalStyles": base.$elem.attr("style"),
|
1784
|
+
"owl-originalClasses": base.$elem.attr("class")
|
1785
|
+
});
|
1786
|
+
base.$elem.css({
|
1787
|
+
opacity: 0
|
1788
|
+
});
|
1789
|
+
base.orignalItems = base.options.items;
|
1790
|
+
base.checkBrowser();
|
1791
|
+
base.wrapperWidth = 0;
|
1792
|
+
base.checkVisible = null;
|
1793
|
+
base.setVars();
|
1794
|
+
},
|
1795
|
+
setVars: function () {
|
1796
|
+
var base = this;
|
1797
|
+
if (base.$elem.children().length === 0) {
|
1798
|
+
return false;
|
1799
|
+
}
|
1800
|
+
base.baseClass();
|
1801
|
+
base.eventTypes();
|
1802
|
+
base.$userItems = base.$elem.children();
|
1803
|
+
base.itemsAmount = base.$userItems.length;
|
1804
|
+
base.wrapItems();
|
1805
|
+
base.$owlItems = base.$elem.find(".owl-item");
|
1806
|
+
base.$owlWrapper = base.$elem.find(".owl-wrapper");
|
1807
|
+
base.playDirection = "next";
|
1808
|
+
base.prevItem = 0;
|
1809
|
+
base.prevArr = [0];
|
1810
|
+
base.currentItem = 0;
|
1811
|
+
base.customEvents();
|
1812
|
+
base.onStartup();
|
1813
|
+
},
|
1814
|
+
onStartup: function () {
|
1815
|
+
var base = this;
|
1816
|
+
base.updateItems();
|
1817
|
+
base.calculateAll();
|
1818
|
+
base.buildControls();
|
1819
|
+
base.updateControls();
|
1820
|
+
base.response();
|
1821
|
+
base.moveEvents();
|
1822
|
+
base.stopOnHover();
|
1823
|
+
base.owlStatus();
|
1824
|
+
if (base.options.transitionStyle !== false) {
|
1825
|
+
base.transitionTypes(base.options.transitionStyle);
|
1826
|
+
}
|
1827
|
+
if (base.options.autoPlay === true) {
|
1828
|
+
base.options.autoPlay = 5000;
|
1829
|
+
}
|
1830
|
+
base.play();
|
1831
|
+
base.$elem.find(".owl-wrapper").css("display", "block");
|
1832
|
+
if (!base.$elem.is(":visible")) {
|
1833
|
+
base.watchVisibility();
|
1834
|
+
} else {
|
1835
|
+
base.$elem.css("opacity", 1);
|
1836
|
+
}
|
1837
|
+
base.onstartup = false;
|
1838
|
+
base.eachMoveUpdate();
|
1839
|
+
if (typeof base.options.afterInit === "function") {
|
1840
|
+
base.options.afterInit.apply(this, [base.$elem]);
|
1841
|
+
}
|
1842
|
+
},
|
1843
|
+
eachMoveUpdate: function () {
|
1844
|
+
var base = this;
|
1845
|
+
if (base.options.lazyLoad === true) {
|
1846
|
+
base.lazyLoad();
|
1847
|
+
}
|
1848
|
+
if (base.options.autoHeight === true) {
|
1849
|
+
base.autoHeight();
|
1850
|
+
}
|
1851
|
+
base.onVisibleItems();
|
1852
|
+
if (typeof base.options.afterAction === "function") {
|
1853
|
+
base.options.afterAction.apply(this, [base.$elem]);
|
1854
|
+
}
|
1855
|
+
},
|
1856
|
+
updateVars: function () {
|
1857
|
+
var base = this;
|
1858
|
+
if (typeof base.options.beforeUpdate === "function") {
|
1859
|
+
base.options.beforeUpdate.apply(this, [base.$elem]);
|
1860
|
+
}
|
1861
|
+
base.watchVisibility();
|
1862
|
+
base.updateItems();
|
1863
|
+
base.calculateAll();
|
1864
|
+
base.updatePosition();
|
1865
|
+
base.updateControls();
|
1866
|
+
base.eachMoveUpdate();
|
1867
|
+
if (typeof base.options.afterUpdate === "function") {
|
1868
|
+
base.options.afterUpdate.apply(this, [base.$elem]);
|
1869
|
+
}
|
1870
|
+
},
|
1871
|
+
reload: function () {
|
1872
|
+
var base = this;
|
1873
|
+
window.setTimeout(function () {
|
1874
|
+
base.updateVars();
|
1875
|
+
}, 0);
|
1876
|
+
},
|
1877
|
+
watchVisibility: function () {
|
1878
|
+
var base = this;
|
1879
|
+
if (base.$elem.is(":visible") === false) {
|
1880
|
+
base.$elem.css({
|
1881
|
+
opacity: 0
|
1882
|
+
});
|
1883
|
+
window.clearInterval(base.autoPlayInterval);
|
1884
|
+
window.clearInterval(base.checkVisible);
|
1885
|
+
} else {
|
1886
|
+
return false;
|
1887
|
+
}
|
1888
|
+
base.checkVisible = window.setInterval(function () {
|
1889
|
+
if (base.$elem.is(":visible")) {
|
1890
|
+
base.reload();
|
1891
|
+
base.$elem.animate({
|
1892
|
+
opacity: 1
|
1893
|
+
}, 200);
|
1894
|
+
window.clearInterval(base.checkVisible);
|
1895
|
+
}
|
1896
|
+
}, 500);
|
1897
|
+
},
|
1898
|
+
wrapItems: function () {
|
1899
|
+
var base = this;
|
1900
|
+
base.$userItems.wrapAll("<div class=\"owl-wrapper\">").wrap("<div class=\"owl-item\"></div>");
|
1901
|
+
base.$elem.find(".owl-wrapper").wrap("<div class=\"owl-wrapper-outer\">");
|
1902
|
+
base.wrapperOuter = base.$elem.find(".owl-wrapper-outer");
|
1903
|
+
base.$elem.css("display", "block");
|
1904
|
+
},
|
1905
|
+
baseClass: function () {
|
1906
|
+
var base = this,
|
1907
|
+
hasBaseClass = base.$elem.hasClass(base.options.baseClass),
|
1908
|
+
hasThemeClass = base.$elem.hasClass(base.options.theme);
|
1909
|
+
if (!hasBaseClass) {
|
1910
|
+
base.$elem.addClass(base.options.baseClass);
|
1911
|
+
}
|
1912
|
+
if (!hasThemeClass) {
|
1913
|
+
base.$elem.addClass(base.options.theme);
|
1914
|
+
}
|
1915
|
+
},
|
1916
|
+
updateItems: function () {
|
1917
|
+
var base = this,
|
1918
|
+
width,
|
1919
|
+
i;
|
1920
|
+
if (base.options.responsive === false) {
|
1921
|
+
return false;
|
1922
|
+
}
|
1923
|
+
if (base.options.singleItem === true) {
|
1924
|
+
base.options.items = base.orignalItems = 1;
|
1925
|
+
base.options.itemsCustom = false;
|
1926
|
+
base.options.itemsDesktop = false;
|
1927
|
+
base.options.itemsDesktopSmall = false;
|
1928
|
+
base.options.itemsTablet = false;
|
1929
|
+
base.options.itemsTabletSmall = false;
|
1930
|
+
base.options.itemsMobile = false;
|
1931
|
+
return false;
|
1932
|
+
}
|
1933
|
+
width = $(base.options.responsiveBaseWidth).width();
|
1934
|
+
if (width > (base.options.itemsDesktop[0] || base.orignalItems)) {
|
1935
|
+
base.options.items = base.orignalItems;
|
1936
|
+
}
|
1937
|
+
if (base.options.itemsCustom !== false) {
|
1938
|
+
//Reorder array by screen size
|
1939
|
+
base.options.itemsCustom.sort(function (a, b) {
|
1940
|
+
return a[0] - b[0];
|
1941
|
+
});
|
1942
|
+
for (i = 0; i < base.options.itemsCustom.length; i += 1) {
|
1943
|
+
if (base.options.itemsCustom[i][0] <= width) {
|
1944
|
+
base.options.items = base.options.itemsCustom[i][1];
|
1945
|
+
}
|
1946
|
+
}
|
1947
|
+
} else {
|
1948
|
+
if (width <= base.options.itemsDesktop[0] && base.options.itemsDesktop !== false) {
|
1949
|
+
base.options.items = base.options.itemsDesktop[1];
|
1950
|
+
}
|
1951
|
+
if (width <= base.options.itemsDesktopSmall[0] && base.options.itemsDesktopSmall !== false) {
|
1952
|
+
base.options.items = base.options.itemsDesktopSmall[1];
|
1953
|
+
}
|
1954
|
+
if (width <= base.options.itemsTablet[0] && base.options.itemsTablet !== false) {
|
1955
|
+
base.options.items = base.options.itemsTablet[1];
|
1956
|
+
}
|
1957
|
+
if (width <= base.options.itemsTabletSmall[0] && base.options.itemsTabletSmall !== false) {
|
1958
|
+
base.options.items = base.options.itemsTabletSmall[1];
|
1959
|
+
}
|
1960
|
+
if (width <= base.options.itemsMobile[0] && base.options.itemsMobile !== false) {
|
1961
|
+
base.options.items = base.options.itemsMobile[1];
|
1962
|
+
}
|
1963
|
+
}
|
1964
|
+
|
1965
|
+
//if number of items is less than declared
|
1966
|
+
if (base.options.items > base.itemsAmount && base.options.itemsScaleUp === true) {
|
1967
|
+
base.options.items = base.itemsAmount;
|
1968
|
+
}
|
1969
|
+
},
|
1970
|
+
response: function () {
|
1971
|
+
var base = this,
|
1972
|
+
smallDelay,
|
1973
|
+
lastWindowWidth;
|
1974
|
+
if (base.options.responsive !== true) {
|
1975
|
+
return false;
|
1976
|
+
}
|
1977
|
+
lastWindowWidth = $(window).width();
|
1978
|
+
base.resizer = function () {
|
1979
|
+
if ($(window).width() !== lastWindowWidth) {
|
1980
|
+
if (base.options.autoPlay !== false) {
|
1981
|
+
window.clearInterval(base.autoPlayInterval);
|
1982
|
+
}
|
1983
|
+
window.clearTimeout(smallDelay);
|
1984
|
+
smallDelay = window.setTimeout(function () {
|
1985
|
+
lastWindowWidth = $(window).width();
|
1986
|
+
base.updateVars();
|
1987
|
+
}, base.options.responsiveRefreshRate);
|
1988
|
+
}
|
1989
|
+
};
|
1990
|
+
$(window).resize(base.resizer);
|
1991
|
+
},
|
1992
|
+
updatePosition: function () {
|
1993
|
+
var base = this;
|
1994
|
+
base.jumpTo(base.currentItem);
|
1995
|
+
if (base.options.autoPlay !== false) {
|
1996
|
+
base.checkAp();
|
1997
|
+
}
|
1998
|
+
},
|
1999
|
+
appendItemsSizes: function () {
|
2000
|
+
var base = this,
|
2001
|
+
roundPages = 0,
|
2002
|
+
lastItem = base.itemsAmount - base.options.items;
|
2003
|
+
base.$owlItems.each(function (index) {
|
2004
|
+
var $this = $(this);
|
2005
|
+
$this.css({
|
2006
|
+
"width": base.itemWidth
|
2007
|
+
}).data("owl-item", Number(index));
|
2008
|
+
if (index % base.options.items === 0 || index === lastItem) {
|
2009
|
+
if (!(index > lastItem)) {
|
2010
|
+
roundPages += 1;
|
2011
|
+
}
|
2012
|
+
}
|
2013
|
+
$this.data("owl-roundPages", roundPages);
|
2014
|
+
});
|
2015
|
+
},
|
2016
|
+
appendWrapperSizes: function () {
|
2017
|
+
var base = this,
|
2018
|
+
width = base.$owlItems.length * base.itemWidth;
|
2019
|
+
base.$owlWrapper.css({
|
2020
|
+
"width": width * 2,
|
2021
|
+
"left": 0
|
2022
|
+
});
|
2023
|
+
base.appendItemsSizes();
|
2024
|
+
},
|
2025
|
+
calculateAll: function () {
|
2026
|
+
var base = this;
|
2027
|
+
base.calculateWidth();
|
2028
|
+
base.appendWrapperSizes();
|
2029
|
+
base.loops();
|
2030
|
+
base.max();
|
2031
|
+
},
|
2032
|
+
calculateWidth: function () {
|
2033
|
+
var base = this;
|
2034
|
+
base.itemWidth = Math.round(base.$elem.width() / base.options.items);
|
2035
|
+
},
|
2036
|
+
max: function () {
|
2037
|
+
var base = this,
|
2038
|
+
maximum = (base.itemsAmount * base.itemWidth - base.options.items * base.itemWidth) * -1;
|
2039
|
+
if (base.options.items > base.itemsAmount) {
|
2040
|
+
base.maximumItem = 0;
|
2041
|
+
maximum = 0;
|
2042
|
+
base.maximumPixels = 0;
|
2043
|
+
} else {
|
2044
|
+
base.maximumItem = base.itemsAmount - base.options.items;
|
2045
|
+
base.maximumPixels = maximum;
|
2046
|
+
}
|
2047
|
+
return maximum;
|
2048
|
+
},
|
2049
|
+
min: function () {
|
2050
|
+
return 0;
|
2051
|
+
},
|
2052
|
+
loops: function () {
|
2053
|
+
var base = this,
|
2054
|
+
prev = 0,
|
2055
|
+
elWidth = 0,
|
2056
|
+
i,
|
2057
|
+
item,
|
2058
|
+
roundPageNum;
|
2059
|
+
base.positionsInArray = [0];
|
2060
|
+
base.pagesInArray = [];
|
2061
|
+
for (i = 0; i < base.itemsAmount; i += 1) {
|
2062
|
+
elWidth += base.itemWidth;
|
2063
|
+
base.positionsInArray.push(-elWidth);
|
2064
|
+
if (base.options.scrollPerPage === true) {
|
2065
|
+
item = $(base.$owlItems[i]);
|
2066
|
+
roundPageNum = item.data("owl-roundPages");
|
2067
|
+
if (roundPageNum !== prev) {
|
2068
|
+
base.pagesInArray[prev] = base.positionsInArray[i];
|
2069
|
+
prev = roundPageNum;
|
2070
|
+
}
|
2071
|
+
}
|
2072
|
+
}
|
2073
|
+
},
|
2074
|
+
buildControls: function () {
|
2075
|
+
var base = this;
|
2076
|
+
if (base.options.navigation === true || base.options.pagination === true) {
|
2077
|
+
base.owlControls = $("<div class=\"owl-controls\"/>").toggleClass("clickable", !base.browser.isTouch).appendTo(base.$elem);
|
2078
|
+
}
|
2079
|
+
if (base.options.pagination === true) {
|
2080
|
+
base.buildPagination();
|
2081
|
+
}
|
2082
|
+
if (base.options.navigation === true) {
|
2083
|
+
base.buildButtons();
|
2084
|
+
}
|
2085
|
+
},
|
2086
|
+
buildButtons: function () {
|
2087
|
+
var base = this,
|
2088
|
+
buttonsWrapper = $("<div class=\"owl-buttons\"/>");
|
2089
|
+
base.owlControls.append(buttonsWrapper);
|
2090
|
+
base.buttonPrev = $("<div/>", {
|
2091
|
+
"class": "owl-prev",
|
2092
|
+
"html": base.options.navigationText[0] || ""
|
2093
|
+
});
|
2094
|
+
base.buttonNext = $("<div/>", {
|
2095
|
+
"class": "owl-next",
|
2096
|
+
"html": base.options.navigationText[1] || ""
|
2097
|
+
});
|
2098
|
+
buttonsWrapper.append(base.buttonPrev).append(base.buttonNext);
|
2099
|
+
buttonsWrapper.on("touchstart.owlControls mousedown.owlControls", "div[class^=\"owl\"]", function (event) {
|
2100
|
+
event.preventDefault();
|
2101
|
+
});
|
2102
|
+
buttonsWrapper.on("touchend.owlControls mouseup.owlControls", "div[class^=\"owl\"]", function (event) {
|
2103
|
+
event.preventDefault();
|
2104
|
+
if ($(this).hasClass("owl-next")) {
|
2105
|
+
base.next();
|
2106
|
+
} else {
|
2107
|
+
base.prev();
|
2108
|
+
}
|
2109
|
+
});
|
2110
|
+
},
|
2111
|
+
buildPagination: function () {
|
2112
|
+
var base = this;
|
2113
|
+
base.paginationWrapper = $("<div class=\"owl-pagination\"/>");
|
2114
|
+
base.owlControls.append(base.paginationWrapper);
|
2115
|
+
base.paginationWrapper.on("touchend.owlControls mouseup.owlControls", ".owl-page", function (event) {
|
2116
|
+
event.preventDefault();
|
2117
|
+
if (Number($(this).data("owl-page")) !== base.currentItem) {
|
2118
|
+
base.goTo(Number($(this).data("owl-page")), true);
|
2119
|
+
}
|
2120
|
+
});
|
2121
|
+
},
|
2122
|
+
updatePagination: function () {
|
2123
|
+
var base = this,
|
2124
|
+
counter,
|
2125
|
+
lastPage,
|
2126
|
+
lastItem,
|
2127
|
+
i,
|
2128
|
+
paginationButton,
|
2129
|
+
paginationButtonInner;
|
2130
|
+
if (base.options.pagination === false) {
|
2131
|
+
return false;
|
2132
|
+
}
|
2133
|
+
base.paginationWrapper.html("");
|
2134
|
+
counter = 0;
|
2135
|
+
lastPage = base.itemsAmount - base.itemsAmount % base.options.items;
|
2136
|
+
for (i = 0; i < base.itemsAmount; i += 1) {
|
2137
|
+
if (i % base.options.items === 0) {
|
2138
|
+
counter += 1;
|
2139
|
+
if (lastPage === i) {
|
2140
|
+
lastItem = base.itemsAmount - base.options.items;
|
2141
|
+
}
|
2142
|
+
paginationButton = $("<div/>", {
|
2143
|
+
"class": "owl-page"
|
2144
|
+
});
|
2145
|
+
paginationButtonInner = $("<span></span>", {
|
2146
|
+
"text": base.options.paginationNumbers === true ? counter : "",
|
2147
|
+
"class": base.options.paginationNumbers === true ? "owl-numbers" : ""
|
2148
|
+
});
|
2149
|
+
paginationButton.append(paginationButtonInner);
|
2150
|
+
paginationButton.data("owl-page", lastPage === i ? lastItem : i);
|
2151
|
+
paginationButton.data("owl-roundPages", counter);
|
2152
|
+
base.paginationWrapper.append(paginationButton);
|
2153
|
+
}
|
2154
|
+
}
|
2155
|
+
base.checkPagination();
|
2156
|
+
},
|
2157
|
+
checkPagination: function () {
|
2158
|
+
var base = this;
|
2159
|
+
if (base.options.pagination === false) {
|
2160
|
+
return false;
|
2161
|
+
}
|
2162
|
+
base.paginationWrapper.find(".owl-page").each(function () {
|
2163
|
+
if ($(this).data("owl-roundPages") === $(base.$owlItems[base.currentItem]).data("owl-roundPages")) {
|
2164
|
+
base.paginationWrapper.find(".owl-page").removeClass("active");
|
2165
|
+
$(this).addClass("active");
|
2166
|
+
}
|
2167
|
+
});
|
2168
|
+
},
|
2169
|
+
checkNavigation: function () {
|
2170
|
+
var base = this;
|
2171
|
+
if (base.options.navigation === false) {
|
2172
|
+
return false;
|
2173
|
+
}
|
2174
|
+
if (base.options.rewindNav === false) {
|
2175
|
+
if (base.currentItem === 0 && base.maximumItem === 0) {
|
2176
|
+
base.buttonPrev.addClass("disabled");
|
2177
|
+
base.buttonNext.addClass("disabled");
|
2178
|
+
} else if (base.currentItem === 0 && base.maximumItem !== 0) {
|
2179
|
+
base.buttonPrev.addClass("disabled");
|
2180
|
+
base.buttonNext.removeClass("disabled");
|
2181
|
+
} else if (base.currentItem === base.maximumItem) {
|
2182
|
+
base.buttonPrev.removeClass("disabled");
|
2183
|
+
base.buttonNext.addClass("disabled");
|
2184
|
+
} else if (base.currentItem !== 0 && base.currentItem !== base.maximumItem) {
|
2185
|
+
base.buttonPrev.removeClass("disabled");
|
2186
|
+
base.buttonNext.removeClass("disabled");
|
2187
|
+
}
|
2188
|
+
}
|
2189
|
+
},
|
2190
|
+
updateControls: function () {
|
2191
|
+
var base = this;
|
2192
|
+
base.updatePagination();
|
2193
|
+
base.checkNavigation();
|
2194
|
+
if (base.owlControls) {
|
2195
|
+
if (base.options.items >= base.itemsAmount) {
|
2196
|
+
base.owlControls.hide();
|
2197
|
+
} else {
|
2198
|
+
base.owlControls.show();
|
2199
|
+
}
|
2200
|
+
}
|
2201
|
+
},
|
2202
|
+
destroyControls: function () {
|
2203
|
+
var base = this;
|
2204
|
+
if (base.owlControls) {
|
2205
|
+
base.owlControls.remove();
|
2206
|
+
}
|
2207
|
+
},
|
2208
|
+
next: function (speed) {
|
2209
|
+
var base = this;
|
2210
|
+
if (base.isTransition) {
|
2211
|
+
return false;
|
2212
|
+
}
|
2213
|
+
base.currentItem += base.options.scrollPerPage === true ? base.options.items : 1;
|
2214
|
+
if (base.currentItem > base.maximumItem + (base.options.scrollPerPage === true ? base.options.items - 1 : 0)) {
|
2215
|
+
if (base.options.rewindNav === true) {
|
2216
|
+
base.currentItem = 0;
|
2217
|
+
speed = "rewind";
|
2218
|
+
} else {
|
2219
|
+
base.currentItem = base.maximumItem;
|
2220
|
+
return false;
|
2221
|
+
}
|
2222
|
+
}
|
2223
|
+
base.goTo(base.currentItem, speed);
|
2224
|
+
},
|
2225
|
+
prev: function (speed) {
|
2226
|
+
var base = this;
|
2227
|
+
if (base.isTransition) {
|
2228
|
+
return false;
|
2229
|
+
}
|
2230
|
+
if (base.options.scrollPerPage === true && base.currentItem > 0 && base.currentItem < base.options.items) {
|
2231
|
+
base.currentItem = 0;
|
2232
|
+
} else {
|
2233
|
+
base.currentItem -= base.options.scrollPerPage === true ? base.options.items : 1;
|
2234
|
+
}
|
2235
|
+
if (base.currentItem < 0) {
|
2236
|
+
if (base.options.rewindNav === true) {
|
2237
|
+
base.currentItem = base.maximumItem;
|
2238
|
+
speed = "rewind";
|
2239
|
+
} else {
|
2240
|
+
base.currentItem = 0;
|
2241
|
+
return false;
|
2242
|
+
}
|
2243
|
+
}
|
2244
|
+
base.goTo(base.currentItem, speed);
|
2245
|
+
},
|
2246
|
+
goTo: function (position, speed, drag) {
|
2247
|
+
var base = this,
|
2248
|
+
goToPixel;
|
2249
|
+
if (base.isTransition) {
|
2250
|
+
return false;
|
2251
|
+
}
|
2252
|
+
if (typeof base.options.beforeMove === "function") {
|
2253
|
+
base.options.beforeMove.apply(this, [base.$elem]);
|
2254
|
+
}
|
2255
|
+
if (position >= base.maximumItem) {
|
2256
|
+
position = base.maximumItem;
|
2257
|
+
} else if (position <= 0) {
|
2258
|
+
position = 0;
|
2259
|
+
}
|
2260
|
+
base.currentItem = base.owl.currentItem = position;
|
2261
|
+
if (base.options.transitionStyle !== false && drag !== "drag" && base.options.items === 1 && base.browser.support3d === true) {
|
2262
|
+
base.swapSpeed(0);
|
2263
|
+
if (base.browser.support3d === true) {
|
2264
|
+
base.transition3d(base.positionsInArray[position]);
|
2265
|
+
} else {
|
2266
|
+
base.css2slide(base.positionsInArray[position], 1);
|
2267
|
+
}
|
2268
|
+
base.afterGo();
|
2269
|
+
base.singleItemTransition();
|
2270
|
+
return false;
|
2271
|
+
}
|
2272
|
+
goToPixel = base.positionsInArray[position];
|
2273
|
+
if (base.browser.support3d === true) {
|
2274
|
+
base.isCss3Finish = false;
|
2275
|
+
if (speed === true) {
|
2276
|
+
base.swapSpeed("paginationSpeed");
|
2277
|
+
window.setTimeout(function () {
|
2278
|
+
base.isCss3Finish = true;
|
2279
|
+
}, base.options.paginationSpeed);
|
2280
|
+
} else if (speed === "rewind") {
|
2281
|
+
base.swapSpeed(base.options.rewindSpeed);
|
2282
|
+
window.setTimeout(function () {
|
2283
|
+
base.isCss3Finish = true;
|
2284
|
+
}, base.options.rewindSpeed);
|
2285
|
+
} else {
|
2286
|
+
base.swapSpeed("slideSpeed");
|
2287
|
+
window.setTimeout(function () {
|
2288
|
+
base.isCss3Finish = true;
|
2289
|
+
}, base.options.slideSpeed);
|
2290
|
+
}
|
2291
|
+
base.transition3d(goToPixel);
|
2292
|
+
} else {
|
2293
|
+
if (speed === true) {
|
2294
|
+
base.css2slide(goToPixel, base.options.paginationSpeed);
|
2295
|
+
} else if (speed === "rewind") {
|
2296
|
+
base.css2slide(goToPixel, base.options.rewindSpeed);
|
2297
|
+
} else {
|
2298
|
+
base.css2slide(goToPixel, base.options.slideSpeed);
|
2299
|
+
}
|
2300
|
+
}
|
2301
|
+
base.afterGo();
|
2302
|
+
},
|
2303
|
+
jumpTo: function (position) {
|
2304
|
+
var base = this;
|
2305
|
+
if (typeof base.options.beforeMove === "function") {
|
2306
|
+
base.options.beforeMove.apply(this, [base.$elem]);
|
2307
|
+
}
|
2308
|
+
if (position >= base.maximumItem || position === -1) {
|
2309
|
+
position = base.maximumItem;
|
2310
|
+
} else if (position <= 0) {
|
2311
|
+
position = 0;
|
2312
|
+
}
|
2313
|
+
base.swapSpeed(0);
|
2314
|
+
if (base.browser.support3d === true) {
|
2315
|
+
base.transition3d(base.positionsInArray[position]);
|
2316
|
+
} else {
|
2317
|
+
base.css2slide(base.positionsInArray[position], 1);
|
2318
|
+
}
|
2319
|
+
base.currentItem = base.owl.currentItem = position;
|
2320
|
+
base.afterGo();
|
2321
|
+
},
|
2322
|
+
afterGo: function () {
|
2323
|
+
var base = this;
|
2324
|
+
base.prevArr.push(base.currentItem);
|
2325
|
+
base.prevItem = base.owl.prevItem = base.prevArr[base.prevArr.length - 2];
|
2326
|
+
base.prevArr.shift(0);
|
2327
|
+
if (base.prevItem !== base.currentItem) {
|
2328
|
+
base.checkPagination();
|
2329
|
+
base.checkNavigation();
|
2330
|
+
base.eachMoveUpdate();
|
2331
|
+
if (base.options.autoPlay !== false) {
|
2332
|
+
base.checkAp();
|
2333
|
+
}
|
2334
|
+
}
|
2335
|
+
if (typeof base.options.afterMove === "function" && base.prevItem !== base.currentItem) {
|
2336
|
+
base.options.afterMove.apply(this, [base.$elem]);
|
2337
|
+
}
|
2338
|
+
},
|
2339
|
+
stop: function () {
|
2340
|
+
var base = this;
|
2341
|
+
base.apStatus = "stop";
|
2342
|
+
window.clearInterval(base.autoPlayInterval);
|
2343
|
+
},
|
2344
|
+
checkAp: function () {
|
2345
|
+
var base = this;
|
2346
|
+
if (base.apStatus !== "stop") {
|
2347
|
+
base.play();
|
2348
|
+
}
|
2349
|
+
},
|
2350
|
+
play: function () {
|
2351
|
+
var base = this;
|
2352
|
+
base.apStatus = "play";
|
2353
|
+
if (base.options.autoPlay === false) {
|
2354
|
+
return false;
|
2355
|
+
}
|
2356
|
+
window.clearInterval(base.autoPlayInterval);
|
2357
|
+
base.autoPlayInterval = window.setInterval(function () {
|
2358
|
+
base.next(true);
|
2359
|
+
}, base.options.autoPlay);
|
2360
|
+
},
|
2361
|
+
swapSpeed: function (action) {
|
2362
|
+
var base = this;
|
2363
|
+
if (action === "slideSpeed") {
|
2364
|
+
base.$owlWrapper.css(base.addCssSpeed(base.options.slideSpeed));
|
2365
|
+
} else if (action === "paginationSpeed") {
|
2366
|
+
base.$owlWrapper.css(base.addCssSpeed(base.options.paginationSpeed));
|
2367
|
+
} else if (typeof action !== "string") {
|
2368
|
+
base.$owlWrapper.css(base.addCssSpeed(action));
|
2369
|
+
}
|
2370
|
+
},
|
2371
|
+
addCssSpeed: function (speed) {
|
2372
|
+
return {
|
2373
|
+
"-webkit-transition": "all " + speed + "ms ease",
|
2374
|
+
"-moz-transition": "all " + speed + "ms ease",
|
2375
|
+
"-o-transition": "all " + speed + "ms ease",
|
2376
|
+
"transition": "all " + speed + "ms ease"
|
2377
|
+
};
|
2378
|
+
},
|
2379
|
+
removeTransition: function () {
|
2380
|
+
return {
|
2381
|
+
"-webkit-transition": "",
|
2382
|
+
"-moz-transition": "",
|
2383
|
+
"-o-transition": "",
|
2384
|
+
"transition": ""
|
2385
|
+
};
|
2386
|
+
},
|
2387
|
+
doTranslate: function (pixels) {
|
2388
|
+
return {
|
2389
|
+
"-webkit-transform": "translate3d(" + pixels + "px, 0px, 0px)",
|
2390
|
+
"-moz-transform": "translate3d(" + pixels + "px, 0px, 0px)",
|
2391
|
+
"-o-transform": "translate3d(" + pixels + "px, 0px, 0px)",
|
2392
|
+
"-ms-transform": "translate3d(" + pixels + "px, 0px, 0px)",
|
2393
|
+
"transform": "translate3d(" + pixels + "px, 0px,0px)"
|
2394
|
+
};
|
2395
|
+
},
|
2396
|
+
transition3d: function (value) {
|
2397
|
+
var base = this;
|
2398
|
+
base.$owlWrapper.css(base.doTranslate(value));
|
2399
|
+
},
|
2400
|
+
css2move: function (value) {
|
2401
|
+
var base = this;
|
2402
|
+
base.$owlWrapper.css({
|
2403
|
+
"left": value
|
2404
|
+
});
|
2405
|
+
},
|
2406
|
+
css2slide: function (value, speed) {
|
2407
|
+
var base = this;
|
2408
|
+
base.isCssFinish = false;
|
2409
|
+
base.$owlWrapper.stop(true, true).animate({
|
2410
|
+
"left": value
|
2411
|
+
}, {
|
2412
|
+
duration: speed || base.options.slideSpeed,
|
2413
|
+
complete: function () {
|
2414
|
+
base.isCssFinish = true;
|
2415
|
+
}
|
2416
|
+
});
|
2417
|
+
},
|
2418
|
+
checkBrowser: function () {
|
2419
|
+
var base = this,
|
2420
|
+
translate3D = "translate3d(0px, 0px, 0px)",
|
2421
|
+
tempElem = document.createElement("div"),
|
2422
|
+
regex,
|
2423
|
+
asSupport,
|
2424
|
+
support3d,
|
2425
|
+
isTouch;
|
2426
|
+
tempElem.style.cssText = " -moz-transform:" + translate3D + "; -ms-transform:" + translate3D + "; -o-transform:" + translate3D + "; -webkit-transform:" + translate3D + "; transform:" + translate3D;
|
2427
|
+
regex = /translate3d\(0px, 0px, 0px\)/g;
|
2428
|
+
asSupport = tempElem.style.cssText.match(regex);
|
2429
|
+
support3d = asSupport !== null && asSupport.length === 1;
|
2430
|
+
isTouch = "ontouchstart" in window || window.navigator.msMaxTouchPoints;
|
2431
|
+
base.browser = {
|
2432
|
+
"support3d": support3d,
|
2433
|
+
"isTouch": isTouch
|
2434
|
+
};
|
2435
|
+
},
|
2436
|
+
moveEvents: function () {
|
2437
|
+
var base = this;
|
2438
|
+
if (base.options.mouseDrag !== false || base.options.touchDrag !== false) {
|
2439
|
+
base.gestures();
|
2440
|
+
base.disabledEvents();
|
2441
|
+
}
|
2442
|
+
},
|
2443
|
+
eventTypes: function () {
|
2444
|
+
var base = this,
|
2445
|
+
types = ["s", "e", "x"];
|
2446
|
+
base.ev_types = {};
|
2447
|
+
if (base.options.mouseDrag === true && base.options.touchDrag === true) {
|
2448
|
+
types = ["touchstart.owl mousedown.owl", "touchmove.owl mousemove.owl", "touchend.owl touchcancel.owl mouseup.owl"];
|
2449
|
+
} else if (base.options.mouseDrag === false && base.options.touchDrag === true) {
|
2450
|
+
types = ["touchstart.owl", "touchmove.owl", "touchend.owl touchcancel.owl"];
|
2451
|
+
} else if (base.options.mouseDrag === true && base.options.touchDrag === false) {
|
2452
|
+
types = ["mousedown.owl", "mousemove.owl", "mouseup.owl"];
|
2453
|
+
}
|
2454
|
+
base.ev_types.start = types[0];
|
2455
|
+
base.ev_types.move = types[1];
|
2456
|
+
base.ev_types.end = types[2];
|
2457
|
+
},
|
2458
|
+
disabledEvents: function () {
|
2459
|
+
var base = this;
|
2460
|
+
base.$elem.on("dragstart.owl", function (event) {
|
2461
|
+
event.preventDefault();
|
2462
|
+
});
|
2463
|
+
base.$elem.on("mousedown.disableTextSelect", function (e) {
|
2464
|
+
return $(e.target).is('input, textarea, select, option');
|
2465
|
+
});
|
2466
|
+
},
|
2467
|
+
gestures: function () {
|
2468
|
+
/*jslint unparam: true*/
|
2469
|
+
var base = this,
|
2470
|
+
locals = {
|
2471
|
+
offsetX: 0,
|
2472
|
+
offsetY: 0,
|
2473
|
+
baseElWidth: 0,
|
2474
|
+
relativePos: 0,
|
2475
|
+
position: null,
|
2476
|
+
minSwipe: null,
|
2477
|
+
maxSwipe: null,
|
2478
|
+
sliding: null,
|
2479
|
+
dargging: null,
|
2480
|
+
targetElement: null
|
2481
|
+
};
|
2482
|
+
base.isCssFinish = true;
|
2483
|
+
function getTouches(event) {
|
2484
|
+
if (event.touches !== undefined) {
|
2485
|
+
return {
|
2486
|
+
x: event.touches[0].pageX,
|
2487
|
+
y: event.touches[0].pageY
|
2488
|
+
};
|
2489
|
+
}
|
2490
|
+
if (event.touches === undefined) {
|
2491
|
+
if (event.pageX !== undefined) {
|
2492
|
+
return {
|
2493
|
+
x: event.pageX,
|
2494
|
+
y: event.pageY
|
2495
|
+
};
|
2496
|
+
}
|
2497
|
+
if (event.pageX === undefined) {
|
2498
|
+
return {
|
2499
|
+
x: event.clientX,
|
2500
|
+
y: event.clientY
|
2501
|
+
};
|
2502
|
+
}
|
2503
|
+
}
|
2504
|
+
}
|
2505
|
+
function swapEvents(type) {
|
2506
|
+
if (type === "on") {
|
2507
|
+
$(document).on(base.ev_types.move, dragMove);
|
2508
|
+
$(document).on(base.ev_types.end, dragEnd);
|
2509
|
+
} else if (type === "off") {
|
2510
|
+
$(document).off(base.ev_types.move);
|
2511
|
+
$(document).off(base.ev_types.end);
|
2512
|
+
}
|
2513
|
+
}
|
2514
|
+
function dragStart(event) {
|
2515
|
+
var ev = event.originalEvent || event || window.event,
|
2516
|
+
position;
|
2517
|
+
if (ev.which === 3) {
|
2518
|
+
return false;
|
2519
|
+
}
|
2520
|
+
if (base.itemsAmount <= base.options.items) {
|
2521
|
+
return;
|
2522
|
+
}
|
2523
|
+
if (base.isCssFinish === false && !base.options.dragBeforeAnimFinish) {
|
2524
|
+
return false;
|
2525
|
+
}
|
2526
|
+
if (base.isCss3Finish === false && !base.options.dragBeforeAnimFinish) {
|
2527
|
+
return false;
|
2528
|
+
}
|
2529
|
+
if (base.options.autoPlay !== false) {
|
2530
|
+
window.clearInterval(base.autoPlayInterval);
|
2531
|
+
}
|
2532
|
+
if (base.browser.isTouch !== true && !base.$owlWrapper.hasClass("grabbing")) {
|
2533
|
+
base.$owlWrapper.addClass("grabbing");
|
2534
|
+
}
|
2535
|
+
base.newPosX = 0;
|
2536
|
+
base.newRelativeX = 0;
|
2537
|
+
$(this).css(base.removeTransition());
|
2538
|
+
position = $(this).position();
|
2539
|
+
locals.relativePos = position.left;
|
2540
|
+
locals.offsetX = getTouches(ev).x - position.left;
|
2541
|
+
locals.offsetY = getTouches(ev).y - position.top;
|
2542
|
+
swapEvents("on");
|
2543
|
+
locals.sliding = false;
|
2544
|
+
locals.targetElement = ev.target || ev.srcElement;
|
2545
|
+
}
|
2546
|
+
function dragMove(event) {
|
2547
|
+
var ev = event.originalEvent || event || window.event,
|
2548
|
+
minSwipe,
|
2549
|
+
maxSwipe;
|
2550
|
+
base.newPosX = getTouches(ev).x - locals.offsetX;
|
2551
|
+
base.newPosY = getTouches(ev).y - locals.offsetY;
|
2552
|
+
base.newRelativeX = base.newPosX - locals.relativePos;
|
2553
|
+
if (typeof base.options.startDragging === "function" && locals.dragging !== true && base.newRelativeX !== 0) {
|
2554
|
+
locals.dragging = true;
|
2555
|
+
base.options.startDragging.apply(base, [base.$elem]);
|
2556
|
+
}
|
2557
|
+
if ((base.newRelativeX > 8 || base.newRelativeX < -8) && base.browser.isTouch === true) {
|
2558
|
+
if (ev.preventDefault !== undefined) {
|
2559
|
+
ev.preventDefault();
|
2560
|
+
} else {
|
2561
|
+
ev.returnValue = false;
|
2562
|
+
}
|
2563
|
+
locals.sliding = true;
|
2564
|
+
}
|
2565
|
+
if ((base.newPosY > 10 || base.newPosY < -10) && locals.sliding === false) {
|
2566
|
+
$(document).off("touchmove.owl");
|
2567
|
+
}
|
2568
|
+
minSwipe = function () {
|
2569
|
+
return base.newRelativeX / 5;
|
2570
|
+
};
|
2571
|
+
maxSwipe = function () {
|
2572
|
+
return base.maximumPixels + base.newRelativeX / 5;
|
2573
|
+
};
|
2574
|
+
base.newPosX = Math.max(Math.min(base.newPosX, minSwipe()), maxSwipe());
|
2575
|
+
if (base.browser.support3d === true) {
|
2576
|
+
base.transition3d(base.newPosX);
|
2577
|
+
} else {
|
2578
|
+
base.css2move(base.newPosX);
|
2579
|
+
}
|
2580
|
+
}
|
2581
|
+
function dragEnd(event) {
|
2582
|
+
var ev = event.originalEvent || event || window.event,
|
2583
|
+
newPosition,
|
2584
|
+
handlers,
|
2585
|
+
owlStopEvent;
|
2586
|
+
ev.target = ev.target || ev.srcElement;
|
2587
|
+
locals.dragging = false;
|
2588
|
+
if (base.browser.isTouch !== true) {
|
2589
|
+
base.$owlWrapper.removeClass("grabbing");
|
2590
|
+
}
|
2591
|
+
if (base.newRelativeX < 0) {
|
2592
|
+
base.dragDirection = base.owl.dragDirection = "left";
|
2593
|
+
} else {
|
2594
|
+
base.dragDirection = base.owl.dragDirection = "right";
|
2595
|
+
}
|
2596
|
+
if (base.newRelativeX !== 0) {
|
2597
|
+
newPosition = base.getNewPosition();
|
2598
|
+
base.goTo(newPosition, false, "drag");
|
2599
|
+
if (locals.targetElement === ev.target && base.browser.isTouch !== true) {
|
2600
|
+
$(ev.target).on("click.disable", function (ev) {
|
2601
|
+
ev.stopImmediatePropagation();
|
2602
|
+
ev.stopPropagation();
|
2603
|
+
ev.preventDefault();
|
2604
|
+
$(ev.target).off("click.disable");
|
2605
|
+
});
|
2606
|
+
handlers = $._data(ev.target, "events").click;
|
2607
|
+
owlStopEvent = handlers.pop();
|
2608
|
+
handlers.splice(0, 0, owlStopEvent);
|
2609
|
+
}
|
2610
|
+
}
|
2611
|
+
swapEvents("off");
|
2612
|
+
}
|
2613
|
+
base.$elem.on(base.ev_types.start, ".owl-wrapper", dragStart);
|
2614
|
+
},
|
2615
|
+
getNewPosition: function () {
|
2616
|
+
var base = this,
|
2617
|
+
newPosition = base.closestItem();
|
2618
|
+
if (newPosition > base.maximumItem) {
|
2619
|
+
base.currentItem = base.maximumItem;
|
2620
|
+
newPosition = base.maximumItem;
|
2621
|
+
} else if (base.newPosX >= 0) {
|
2622
|
+
newPosition = 0;
|
2623
|
+
base.currentItem = 0;
|
2624
|
+
}
|
2625
|
+
return newPosition;
|
2626
|
+
},
|
2627
|
+
closestItem: function () {
|
2628
|
+
var base = this,
|
2629
|
+
array = base.options.scrollPerPage === true ? base.pagesInArray : base.positionsInArray,
|
2630
|
+
goal = base.newPosX,
|
2631
|
+
closest = null;
|
2632
|
+
$.each(array, function (i, v) {
|
2633
|
+
if (goal - base.itemWidth / 20 > array[i + 1] && goal - base.itemWidth / 20 < v && base.moveDirection() === "left") {
|
2634
|
+
closest = v;
|
2635
|
+
if (base.options.scrollPerPage === true) {
|
2636
|
+
base.currentItem = $.inArray(closest, base.positionsInArray);
|
2637
|
+
} else {
|
2638
|
+
base.currentItem = i;
|
2639
|
+
}
|
2640
|
+
} else if (goal + base.itemWidth / 20 < v && goal + base.itemWidth / 20 > (array[i + 1] || array[i] - base.itemWidth) && base.moveDirection() === "right") {
|
2641
|
+
if (base.options.scrollPerPage === true) {
|
2642
|
+
closest = array[i + 1] || array[array.length - 1];
|
2643
|
+
base.currentItem = $.inArray(closest, base.positionsInArray);
|
2644
|
+
} else {
|
2645
|
+
closest = array[i + 1];
|
2646
|
+
base.currentItem = i + 1;
|
2647
|
+
}
|
2648
|
+
}
|
2649
|
+
});
|
2650
|
+
return base.currentItem;
|
2651
|
+
},
|
2652
|
+
moveDirection: function () {
|
2653
|
+
var base = this,
|
2654
|
+
direction;
|
2655
|
+
if (base.newRelativeX < 0) {
|
2656
|
+
direction = "right";
|
2657
|
+
base.playDirection = "next";
|
2658
|
+
} else {
|
2659
|
+
direction = "left";
|
2660
|
+
base.playDirection = "prev";
|
2661
|
+
}
|
2662
|
+
return direction;
|
2663
|
+
},
|
2664
|
+
customEvents: function () {
|
2665
|
+
/*jslint unparam: true*/
|
2666
|
+
var base = this;
|
2667
|
+
base.$elem.on("owl.next", function () {
|
2668
|
+
base.next();
|
2669
|
+
});
|
2670
|
+
base.$elem.on("owl.prev", function () {
|
2671
|
+
base.prev();
|
2672
|
+
});
|
2673
|
+
base.$elem.on("owl.play", function (event, speed) {
|
2674
|
+
base.options.autoPlay = speed;
|
2675
|
+
base.play();
|
2676
|
+
base.hoverStatus = "play";
|
2677
|
+
});
|
2678
|
+
base.$elem.on("owl.stop", function () {
|
2679
|
+
base.stop();
|
2680
|
+
base.hoverStatus = "stop";
|
2681
|
+
});
|
2682
|
+
base.$elem.on("owl.goTo", function (event, item) {
|
2683
|
+
base.goTo(item);
|
2684
|
+
});
|
2685
|
+
base.$elem.on("owl.jumpTo", function (event, item) {
|
2686
|
+
base.jumpTo(item);
|
2687
|
+
});
|
2688
|
+
},
|
2689
|
+
stopOnHover: function () {
|
2690
|
+
var base = this;
|
2691
|
+
if (base.options.stopOnHover === true && base.browser.isTouch !== true && base.options.autoPlay !== false) {
|
2692
|
+
base.$elem.on("mouseover", function () {
|
2693
|
+
base.stop();
|
2694
|
+
});
|
2695
|
+
base.$elem.on("mouseout", function () {
|
2696
|
+
if (base.hoverStatus !== "stop") {
|
2697
|
+
base.play();
|
2698
|
+
}
|
2699
|
+
});
|
2700
|
+
}
|
2701
|
+
},
|
2702
|
+
lazyLoad: function () {
|
2703
|
+
var base = this,
|
2704
|
+
i,
|
2705
|
+
$item,
|
2706
|
+
itemNumber,
|
2707
|
+
$lazyImg,
|
2708
|
+
follow;
|
2709
|
+
if (base.options.lazyLoad === false) {
|
2710
|
+
return false;
|
2711
|
+
}
|
2712
|
+
for (i = 0; i < base.itemsAmount; i += 1) {
|
2713
|
+
$item = $(base.$owlItems[i]);
|
2714
|
+
if ($item.data("owl-loaded") === "loaded") {
|
2715
|
+
continue;
|
2716
|
+
}
|
2717
|
+
itemNumber = $item.data("owl-item");
|
2718
|
+
$lazyImg = $item.find(".lazyOwl");
|
2719
|
+
if (typeof $lazyImg.data("src") !== "string") {
|
2720
|
+
$item.data("owl-loaded", "loaded");
|
2721
|
+
continue;
|
2722
|
+
}
|
2723
|
+
if ($item.data("owl-loaded") === undefined) {
|
2724
|
+
$lazyImg.hide();
|
2725
|
+
$item.addClass("loading").data("owl-loaded", "checked");
|
2726
|
+
}
|
2727
|
+
if (base.options.lazyFollow === true) {
|
2728
|
+
follow = itemNumber >= base.currentItem;
|
2729
|
+
} else {
|
2730
|
+
follow = true;
|
2731
|
+
}
|
2732
|
+
if (follow && itemNumber < base.currentItem + base.options.items && $lazyImg.length) {
|
2733
|
+
$lazyImg.each(function () {
|
2734
|
+
base.lazyPreload($item, $(this));
|
2735
|
+
});
|
2736
|
+
}
|
2737
|
+
}
|
2738
|
+
},
|
2739
|
+
lazyPreload: function ($item, $lazyImg) {
|
2740
|
+
var base = this,
|
2741
|
+
iterations = 0,
|
2742
|
+
isBackgroundImg;
|
2743
|
+
if ($lazyImg.prop("tagName") === "DIV") {
|
2744
|
+
$lazyImg.css("background-image", "url(" + $lazyImg.data("src") + ")");
|
2745
|
+
isBackgroundImg = true;
|
2746
|
+
} else {
|
2747
|
+
$lazyImg[0].src = $lazyImg.data("src");
|
2748
|
+
}
|
2749
|
+
function showImage() {
|
2750
|
+
$item.data("owl-loaded", "loaded").removeClass("loading");
|
2751
|
+
$lazyImg.removeAttr("data-src");
|
2752
|
+
if (base.options.lazyEffect === "fade") {
|
2753
|
+
$lazyImg.fadeIn(400);
|
2754
|
+
} else {
|
2755
|
+
$lazyImg.show();
|
2756
|
+
}
|
2757
|
+
if (typeof base.options.afterLazyLoad === "function") {
|
2758
|
+
base.options.afterLazyLoad.apply(this, [base.$elem]);
|
2759
|
+
}
|
2760
|
+
}
|
2761
|
+
function checkLazyImage() {
|
2762
|
+
iterations += 1;
|
2763
|
+
if (base.completeImg($lazyImg.get(0)) || isBackgroundImg === true) {
|
2764
|
+
showImage();
|
2765
|
+
} else if (iterations <= 100) {
|
2766
|
+
//if image loads in less than 10 seconds
|
2767
|
+
window.setTimeout(checkLazyImage, 100);
|
2768
|
+
} else {
|
2769
|
+
showImage();
|
2770
|
+
}
|
2771
|
+
}
|
2772
|
+
checkLazyImage();
|
2773
|
+
},
|
2774
|
+
autoHeight: function () {
|
2775
|
+
var base = this,
|
2776
|
+
$currentimg = $(base.$owlItems[base.currentItem]).find("img"),
|
2777
|
+
iterations;
|
2778
|
+
function addHeight() {
|
2779
|
+
var $currentItem = $(base.$owlItems[base.currentItem]).height();
|
2780
|
+
base.wrapperOuter.css("height", $currentItem + "px");
|
2781
|
+
if (!base.wrapperOuter.hasClass("autoHeight")) {
|
2782
|
+
window.setTimeout(function () {
|
2783
|
+
base.wrapperOuter.addClass("autoHeight");
|
2784
|
+
}, 0);
|
2785
|
+
}
|
2786
|
+
}
|
2787
|
+
function checkImage() {
|
2788
|
+
iterations += 1;
|
2789
|
+
if (base.completeImg($currentimg.get(0))) {
|
2790
|
+
addHeight();
|
2791
|
+
} else if (iterations <= 100) {
|
2792
|
+
//if image loads in less than 10 seconds
|
2793
|
+
window.setTimeout(checkImage, 100);
|
2794
|
+
} else {
|
2795
|
+
base.wrapperOuter.css("height", ""); //Else remove height attribute
|
2796
|
+
}
|
2797
|
+
}
|
2798
|
+
|
2799
|
+
if ($currentimg.get(0) !== undefined) {
|
2800
|
+
iterations = 0;
|
2801
|
+
checkImage();
|
2802
|
+
} else {
|
2803
|
+
addHeight();
|
2804
|
+
}
|
2805
|
+
},
|
2806
|
+
completeImg: function (img) {
|
2807
|
+
var naturalWidthType;
|
2808
|
+
if (!img.complete) {
|
2809
|
+
return false;
|
2810
|
+
}
|
2811
|
+
naturalWidthType = typeof img.naturalWidth;
|
2812
|
+
if (naturalWidthType !== "undefined" && img.naturalWidth === 0) {
|
2813
|
+
return false;
|
2814
|
+
}
|
2815
|
+
return true;
|
2816
|
+
},
|
2817
|
+
onVisibleItems: function () {
|
2818
|
+
var base = this,
|
2819
|
+
i;
|
2820
|
+
if (base.options.addClassActive === true) {
|
2821
|
+
base.$owlItems.removeClass("active");
|
2822
|
+
}
|
2823
|
+
base.visibleItems = [];
|
2824
|
+
for (i = base.currentItem; i < base.currentItem + base.options.items; i += 1) {
|
2825
|
+
base.visibleItems.push(i);
|
2826
|
+
if (base.options.addClassActive === true) {
|
2827
|
+
$(base.$owlItems[i]).addClass("active");
|
2828
|
+
}
|
2829
|
+
}
|
2830
|
+
base.owl.visibleItems = base.visibleItems;
|
2831
|
+
},
|
2832
|
+
transitionTypes: function (className) {
|
2833
|
+
var base = this;
|
2834
|
+
//Currently available: "fade", "backSlide", "goDown", "fadeUp"
|
2835
|
+
base.outClass = "owl-" + className + "-out";
|
2836
|
+
base.inClass = "owl-" + className + "-in";
|
2837
|
+
},
|
2838
|
+
singleItemTransition: function () {
|
2839
|
+
var base = this,
|
2840
|
+
outClass = base.outClass,
|
2841
|
+
inClass = base.inClass,
|
2842
|
+
$currentItem = base.$owlItems.eq(base.currentItem),
|
2843
|
+
$prevItem = base.$owlItems.eq(base.prevItem),
|
2844
|
+
prevPos = Math.abs(base.positionsInArray[base.currentItem]) + base.positionsInArray[base.prevItem],
|
2845
|
+
origin = Math.abs(base.positionsInArray[base.currentItem]) + base.itemWidth / 2,
|
2846
|
+
animEnd = 'webkitAnimationEnd oAnimationEnd MSAnimationEnd animationend';
|
2847
|
+
base.isTransition = true;
|
2848
|
+
base.$owlWrapper.addClass('owl-origin').css({
|
2849
|
+
"-webkit-transform-origin": origin + "px",
|
2850
|
+
"-moz-perspective-origin": origin + "px",
|
2851
|
+
"perspective-origin": origin + "px"
|
2852
|
+
});
|
2853
|
+
function transStyles(prevPos) {
|
2854
|
+
return {
|
2855
|
+
"position": "relative",
|
2856
|
+
"left": prevPos + "px"
|
2857
|
+
};
|
2858
|
+
}
|
2859
|
+
$prevItem.css(transStyles(prevPos, 10)).addClass(outClass).on(animEnd, function () {
|
2860
|
+
base.endPrev = true;
|
2861
|
+
$prevItem.off(animEnd);
|
2862
|
+
base.clearTransStyle($prevItem, outClass);
|
2863
|
+
});
|
2864
|
+
$currentItem.addClass(inClass).on(animEnd, function () {
|
2865
|
+
base.endCurrent = true;
|
2866
|
+
$currentItem.off(animEnd);
|
2867
|
+
base.clearTransStyle($currentItem, inClass);
|
2868
|
+
});
|
2869
|
+
},
|
2870
|
+
clearTransStyle: function (item, classToRemove) {
|
2871
|
+
var base = this;
|
2872
|
+
item.css({
|
2873
|
+
"position": "",
|
2874
|
+
"left": ""
|
2875
|
+
}).removeClass(classToRemove);
|
2876
|
+
if (base.endPrev && base.endCurrent) {
|
2877
|
+
base.$owlWrapper.removeClass('owl-origin');
|
2878
|
+
base.endPrev = false;
|
2879
|
+
base.endCurrent = false;
|
2880
|
+
base.isTransition = false;
|
2881
|
+
}
|
2882
|
+
},
|
2883
|
+
owlStatus: function () {
|
2884
|
+
var base = this;
|
2885
|
+
base.owl = {
|
2886
|
+
"userOptions": base.userOptions,
|
2887
|
+
"baseElement": base.$elem,
|
2888
|
+
"userItems": base.$userItems,
|
2889
|
+
"owlItems": base.$owlItems,
|
2890
|
+
"currentItem": base.currentItem,
|
2891
|
+
"prevItem": base.prevItem,
|
2892
|
+
"visibleItems": base.visibleItems,
|
2893
|
+
"isTouch": base.browser.isTouch,
|
2894
|
+
"browser": base.browser,
|
2895
|
+
"dragDirection": base.dragDirection
|
2896
|
+
};
|
2897
|
+
},
|
2898
|
+
clearEvents: function () {
|
2899
|
+
var base = this;
|
2900
|
+
base.$elem.off(".owl owl mousedown.disableTextSelect");
|
2901
|
+
$(document).off(".owl owl");
|
2902
|
+
$(window).off("resize", base.resizer);
|
2903
|
+
},
|
2904
|
+
unWrap: function () {
|
2905
|
+
var base = this;
|
2906
|
+
if (base.$elem.children().length !== 0) {
|
2907
|
+
base.$owlWrapper.unwrap();
|
2908
|
+
base.$userItems.unwrap().unwrap();
|
2909
|
+
if (base.owlControls) {
|
2910
|
+
base.owlControls.remove();
|
2911
|
+
}
|
2912
|
+
}
|
2913
|
+
base.clearEvents();
|
2914
|
+
base.$elem.attr({
|
2915
|
+
style: base.$elem.data("owl-originalStyles") || "",
|
2916
|
+
class: base.$elem.data("owl-originalClasses")
|
2917
|
+
});
|
2918
|
+
},
|
2919
|
+
destroy: function () {
|
2920
|
+
var base = this;
|
2921
|
+
base.stop();
|
2922
|
+
window.clearInterval(base.checkVisible);
|
2923
|
+
base.unWrap();
|
2924
|
+
base.$elem.removeData();
|
2925
|
+
},
|
2926
|
+
reinit: function (newOptions) {
|
2927
|
+
var base = this,
|
2928
|
+
options = $.extend({}, base.userOptions, newOptions);
|
2929
|
+
base.unWrap();
|
2930
|
+
base.init(options, base.$elem);
|
2931
|
+
},
|
2932
|
+
addItem: function (htmlString, targetPosition) {
|
2933
|
+
var base = this,
|
2934
|
+
position;
|
2935
|
+
if (!htmlString) {
|
2936
|
+
return false;
|
2937
|
+
}
|
2938
|
+
if (base.$elem.children().length === 0) {
|
2939
|
+
base.$elem.append(htmlString);
|
2940
|
+
base.setVars();
|
2941
|
+
return false;
|
2942
|
+
}
|
2943
|
+
base.unWrap();
|
2944
|
+
if (targetPosition === undefined || targetPosition === -1) {
|
2945
|
+
position = -1;
|
2946
|
+
} else {
|
2947
|
+
position = targetPosition;
|
2948
|
+
}
|
2949
|
+
if (position >= base.$userItems.length || position === -1) {
|
2950
|
+
base.$userItems.eq(-1).after(htmlString);
|
2951
|
+
} else {
|
2952
|
+
base.$userItems.eq(position).before(htmlString);
|
2953
|
+
}
|
2954
|
+
base.setVars();
|
2955
|
+
},
|
2956
|
+
removeItem: function (targetPosition) {
|
2957
|
+
var base = this,
|
2958
|
+
position;
|
2959
|
+
if (base.$elem.children().length === 0) {
|
2960
|
+
return false;
|
2961
|
+
}
|
2962
|
+
if (targetPosition === undefined || targetPosition === -1) {
|
2963
|
+
position = -1;
|
2964
|
+
} else {
|
2965
|
+
position = targetPosition;
|
2966
|
+
}
|
2967
|
+
base.unWrap();
|
2968
|
+
base.$userItems.eq(position).remove();
|
2969
|
+
base.setVars();
|
2970
|
+
}
|
2971
|
+
};
|
2972
|
+
$.fn.owlCarousel = function (options) {
|
2973
|
+
return this.each(function () {
|
2974
|
+
if ($(this).data("owl-init") === true) {
|
2975
|
+
return false;
|
2976
|
+
}
|
2977
|
+
$(this).data("owl-init", true);
|
2978
|
+
var carousel = Object.create(Carousel);
|
2979
|
+
carousel.init(options, this);
|
2980
|
+
$.data(this, "owlCarousel", carousel);
|
2981
|
+
});
|
2982
|
+
};
|
2983
|
+
$.fn.owlCarousel.options = {
|
2984
|
+
items: 5,
|
2985
|
+
itemsCustom: false,
|
2986
|
+
itemsDesktop: [1199, 4],
|
2987
|
+
itemsDesktopSmall: [979, 3],
|
2988
|
+
itemsTablet: [768, 2],
|
2989
|
+
itemsTabletSmall: false,
|
2990
|
+
itemsMobile: [479, 1],
|
2991
|
+
singleItem: false,
|
2992
|
+
itemsScaleUp: false,
|
2993
|
+
slideSpeed: 200,
|
2994
|
+
paginationSpeed: 800,
|
2995
|
+
rewindSpeed: 1000,
|
2996
|
+
autoPlay: false,
|
2997
|
+
stopOnHover: false,
|
2998
|
+
navigation: false,
|
2999
|
+
navigationText: ["prev", "next"],
|
3000
|
+
rewindNav: true,
|
3001
|
+
scrollPerPage: false,
|
3002
|
+
pagination: true,
|
3003
|
+
paginationNumbers: false,
|
3004
|
+
responsive: true,
|
3005
|
+
responsiveRefreshRate: 200,
|
3006
|
+
responsiveBaseWidth: window,
|
3007
|
+
baseClass: "owl-carousel",
|
3008
|
+
theme: "owl-theme",
|
3009
|
+
lazyLoad: false,
|
3010
|
+
lazyFollow: true,
|
3011
|
+
lazyEffect: "fade",
|
3012
|
+
autoHeight: false,
|
3013
|
+
jsonPath: false,
|
3014
|
+
jsonSuccess: false,
|
3015
|
+
dragBeforeAnimFinish: true,
|
3016
|
+
mouseDrag: true,
|
3017
|
+
touchDrag: true,
|
3018
|
+
addClassActive: false,
|
3019
|
+
transitionStyle: false,
|
3020
|
+
beforeUpdate: false,
|
3021
|
+
afterUpdate: false,
|
3022
|
+
beforeInit: false,
|
3023
|
+
afterInit: false,
|
3024
|
+
beforeMove: false,
|
3025
|
+
afterMove: false,
|
3026
|
+
afterAction: false,
|
3027
|
+
startDragging: false,
|
3028
|
+
afterLazyLoad: false
|
3029
|
+
};
|
3030
|
+
})(jQuery, window, document);
|
3031
|
+
|
3032
|
+
/***/ }),
|
3033
|
+
|
1726
3034
|
/***/ 602:
|
1727
3035
|
/***/ ((module) => {
|
1728
3036
|
|
@@ -3525,7 +4833,7 @@ module.exports = function parseContent(options) {
|
|
3525
4833
|
|
3526
4834
|
// Default values
|
3527
4835
|
//
|
3528
|
-
voiceTags['a'] = new voiceTag('Link, '
|
4836
|
+
voiceTags['a'] = new voiceTag('Follow the Link:', ':');
|
3529
4837
|
voiceTags['q'] = new voiceTag('', pause_spoken);
|
3530
4838
|
voiceTags['ol'] = new voiceTag('Start of list.', 'End of list. ');
|
3531
4839
|
voiceTags['ul'] = new voiceTag('Start of list.', 'End of list. ');
|
@@ -3535,7 +4843,7 @@ module.exports = function parseContent(options) {
|
|
3535
4843
|
voiceTags['table'] = new voiceTag('Start of an embedded table,', 'This element ist not spoken.');
|
3536
4844
|
voiceTags['card-header'] = new voiceTag('', '');
|
3537
4845
|
voiceTags['doc-example'] = new voiceTag('Start of an embedded example element,', 'This element ist not spoken.');
|
3538
|
-
voiceTags['admonitionblock'] = new voiceTag('Start of an attention element of type, ', '');
|
4846
|
+
voiceTags['admonitionblock'] = new voiceTag('Start of an attention element of type, ', ':');
|
3539
4847
|
voiceTags['listingblock'] = new voiceTag('Start of an embedded structured text block,', 'This element ist not spoken.');
|
3540
4848
|
voiceTags['carousel'] = new voiceTag('Start of an embedded carousel element,', 'This element ist not spoken.');
|
3541
4849
|
voiceTags['slider'] = new voiceTag('Start of an embedded slider element,', 'This element ist not spoken.');
|
@@ -3637,6 +4945,7 @@ module.exports = function parseContent(options) {
|
|
3637
4945
|
// unclear why a elements of ' >' is generated in text
|
3638
4946
|
// may caused by a HTML tag
|
3639
4947
|
text = text.replace(/^\s+>/gm, '');
|
4948
|
+
text = text.replaceAll(' ..', '.');
|
3640
4949
|
|
3641
4950
|
// cleanup text
|
3642
4951
|
text = text.replace(/(\r\n|\n|\r)/gm, '');
|
@@ -4021,7 +5330,7 @@ module.exports = function parseContent(options) {
|
|
4021
5330
|
appended = voiceTags['admonitionblock'].append;
|
4022
5331
|
if (content !== undefined && content != '') {
|
4023
5332
|
jQuery('<div>' + prepend + ' ' + content + '</div>').insertBefore(this);
|
4024
|
-
jQuery('<div>' + appended +
|
5333
|
+
jQuery('<div>' + appended + '</div>').insertBefore(this);
|
4025
5334
|
}
|
4026
5335
|
jQuery(this).remove();
|
4027
5336
|
});
|
@@ -4130,6 +5439,32 @@ module.exports = function parseContent(options) {
|
|
4130
5439
|
jQuery(this).remove();
|
4131
5440
|
});
|
4132
5441
|
|
5442
|
+
// Search for <masonry> tags, check for previous declared <div>
|
5443
|
+
// container that contains the title element and insert the
|
5444
|
+
// text if exists and finally remove the DOM object.
|
5445
|
+
//
|
5446
|
+
jQuery(clone).find('masonry').addBack('masonry').each(function () {
|
5447
|
+
if ($(this).prev()[0].innerText !== undefined) {
|
5448
|
+
title = $(this).prev()[0].innerText;
|
5449
|
+
title_element = jQuery(this).prev();
|
5450
|
+
// remove the title 'before' the DOM object deleted
|
5451
|
+
//
|
5452
|
+
jQuery(title_element).remove();
|
5453
|
+
} else {
|
5454
|
+
title = '';
|
5455
|
+
}
|
5456
|
+
prepend = voiceTags['masonry'].prepend;
|
5457
|
+
appended = voiceTags['masonry'].append;
|
5458
|
+
if (title !== undefined && title != '') {
|
5459
|
+
jQuery('<div>' + prepend + ' with the caption,' + title + pause_spoken + '</div>').insertBefore(this);
|
5460
|
+
jQuery('<div>' + appended + '</div>').insertBefore(this);
|
5461
|
+
} else {
|
5462
|
+
jQuery('<div>' + prepend + '</div>').insertBefore(this);
|
5463
|
+
jQuery('<div>' + appended + '</div>').insertBefore(this);
|
5464
|
+
}
|
5465
|
+
jQuery(this).remove();
|
5466
|
+
});
|
5467
|
+
|
4133
5468
|
// Search for <slider> tags, check for previous declared <div>
|
4134
5469
|
// container that contains the title element and insert the
|
4135
5470
|
// text if exists and finally remove the DOM object.
|
@@ -11529,6 +12864,7 @@ window.j1.core.scrollSmooth = __webpack_require__(814);
|
|
11529
12864
|
const J1Tocbot = __webpack_require__(799);
|
11530
12865
|
const J1AttrChangeListener = __webpack_require__(610);
|
11531
12866
|
const J1Speak2Me = __webpack_require__(229);
|
12867
|
+
const J1SCarousel = __webpack_require__(254);
|
11532
12868
|
|
11533
12869
|
// Passing log data over Internet|SeeMe (currently NOT used)
|
11534
12870
|
// -----------------------------------------------------------------------------
|