Version Description
Download this release
Release Info
Developer | valiano |
Plugin | Unlimited Elements For Elementor (Free Widgets, Addons, Templates) |
Version | 1.5.0 |
Comparing to | |
See all releases |
Code changes from version 1.4.99 to 1.5.0
- assets_libraries/filters/ue_filters.js +140 -39
- assets_libraries/owl-carousel-new/owl.carousel.js +4 -4
- assets_libraries/owl-carousel-new/owl.carousel.min.js +3 -3
- inc_php/unitecreator_addon.class.php +3 -5
- inc_php/unitecreator_filters_process.class.php +327 -349
- includes.php +1 -1
- provider/core/plugins/unlimited_elements/elementor/elementor_widget.class.php +62 -3
- provider/provider_params_processor.class.php +23 -11
- provider/provider_settings.class.php +11 -1
- readme.txt +7 -0
- release_log.txt +6 -0
- unlimited_elements.php +2 -2
assets_libraries/filters/ue_filters.js
CHANGED
@@ -407,8 +407,49 @@ function UEDynamicFilters(){
|
|
407 |
return(null);
|
408 |
}
|
409 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
410 |
|
411 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
412 |
|
413 |
function ________PAGINATION_FILTER______(){}
|
414 |
|
@@ -632,6 +673,12 @@ function UEDynamicFilters(){
|
|
632 |
if(!objGrid || objGrid.length == 0)
|
633 |
throw new Error("Grid not found");
|
634 |
|
|
|
|
|
|
|
|
|
|
|
|
|
635 |
//refresh grid
|
636 |
refreshAjaxGrid(objGrid);
|
637 |
|
@@ -654,6 +701,9 @@ function UEDynamicFilters(){
|
|
654 |
var slug = objSelected.data("slug");
|
655 |
var taxonomy = objSelected.data("taxonomy");
|
656 |
|
|
|
|
|
|
|
657 |
var objTerm = {
|
658 |
"slug": slug,
|
659 |
"taxonomy": taxonomy
|
@@ -696,7 +746,7 @@ function UEDynamicFilters(){
|
|
696 |
|
697 |
var strIDs = "";
|
698 |
for(var id in objIDs){
|
699 |
-
|
700 |
if(jQuery.isNumeric(id) == false)
|
701 |
continue;
|
702 |
|
@@ -784,15 +834,22 @@ function UEDynamicFilters(){
|
|
784 |
jQuery.each(arrTax,function(taxonomy,objSlugs){
|
785 |
|
786 |
var strSlugs = "";
|
787 |
-
|
|
|
788 |
for (var slug in objSlugs){
|
789 |
|
790 |
-
if(strSlugs)
|
|
|
791 |
strSlugs += ".";
|
|
|
792 |
|
793 |
strSlugs += slug;
|
794 |
}
|
795 |
|
|
|
|
|
|
|
|
|
796 |
var strTax = taxonomy+"~"+strSlugs;
|
797 |
|
798 |
if(query)
|
@@ -801,8 +858,7 @@ function UEDynamicFilters(){
|
|
801 |
query += strTax;
|
802 |
|
803 |
});
|
804 |
-
|
805 |
-
|
806 |
return(query);
|
807 |
}
|
808 |
|
@@ -891,7 +947,7 @@ function UEDynamicFilters(){
|
|
891 |
|
892 |
if(objDebug.length == 0)
|
893 |
return(false);
|
894 |
-
|
895 |
objDebug.replaceWith(htmlDebug);
|
896 |
}
|
897 |
|
@@ -943,10 +999,12 @@ function UEDynamicFilters(){
|
|
943 |
|
944 |
if(!objHtmlWidgets)
|
945 |
return(false);
|
946 |
-
|
947 |
if(objHtmlWidgets.length == 0)
|
948 |
return(false);
|
949 |
|
|
|
|
|
950 |
jQuery.each(objFilters, function(index, objFilter){
|
951 |
|
952 |
var widgetID = getElementWidgetID(objFilter);
|
@@ -965,6 +1023,21 @@ function UEDynamicFilters(){
|
|
965 |
|
966 |
objFilter.html(htmlInner);
|
967 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
968 |
objFilter.trigger("uc_ajax_reloaded");
|
969 |
|
970 |
});
|
@@ -1003,7 +1076,7 @@ function UEDynamicFilters(){
|
|
1003 |
function operateAjaxRefreshResponse(response, objGrid, objFilters, isLoadMore){
|
1004 |
|
1005 |
operateAjax_setHtmlGrid(response, objGrid, isLoadMore);
|
1006 |
-
|
1007 |
operateAjax_setHtmlWidgets(response, objFilters);
|
1008 |
|
1009 |
objGrid.trigger("uc_ajax_refreshed");
|
@@ -1099,6 +1172,8 @@ function UEDynamicFilters(){
|
|
1099 |
*/
|
1100 |
function showAjaxDebug(str){
|
1101 |
|
|
|
|
|
1102 |
str = jQuery.trim(str);
|
1103 |
|
1104 |
if(!str || str.length == 0)
|
@@ -1316,7 +1391,7 @@ function UEDynamicFilters(){
|
|
1316 |
return(false);
|
1317 |
|
1318 |
var objAjaxOptions = getGridAjaxOptions(objFilters, objGrid, isFiltersInit);
|
1319 |
-
|
1320 |
if(!objAjaxOptions)
|
1321 |
return(false);
|
1322 |
|
@@ -1342,7 +1417,7 @@ function UEDynamicFilters(){
|
|
1342 |
g_lastGridAjaxCall = objGrid;
|
1343 |
|
1344 |
ajaxRequest(ajaxUrl,null,null, function(response){
|
1345 |
-
|
1346 |
if(isLoadMore !== true)
|
1347 |
hideAjaxLoader(objGrid);
|
1348 |
|
@@ -1369,11 +1444,11 @@ function UEDynamicFilters(){
|
|
1369 |
|
1370 |
var strRefreshIDs = "";
|
1371 |
|
1372 |
-
var
|
1373 |
var page = null;
|
1374 |
var numItems = null;
|
1375 |
var arrTerms = [];
|
1376 |
-
var
|
1377 |
|
1378 |
|
1379 |
//get ajax options
|
@@ -1397,14 +1472,24 @@ function UEDynamicFilters(){
|
|
1397 |
|
1398 |
if(!page)
|
1399 |
urlAjax = null;
|
|
|
1400 |
break;
|
1401 |
case g_types.TERMS_LIST:
|
1402 |
|
1403 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1404 |
|
1405 |
-
|
1406 |
-
|
1407 |
-
|
1408 |
break;
|
1409 |
case g_types.CHECKBOX:
|
1410 |
|
@@ -1415,7 +1500,7 @@ function UEDynamicFilters(){
|
|
1415 |
throw new Error("Unknown filter type: "+type);
|
1416 |
break;
|
1417 |
}
|
1418 |
-
|
1419 |
//add widget id of the filter to refresh
|
1420 |
|
1421 |
var isNoRefresh = objFilter.data("uc_norefresh");
|
@@ -1432,20 +1517,25 @@ function UEDynamicFilters(){
|
|
1432 |
|
1433 |
objFilter.data("uc_norefresh",false);
|
1434 |
|
|
|
1435 |
if(isNoRefresh !== true){ //add to refresh mode
|
1436 |
|
1437 |
-
var
|
1438 |
|
1439 |
-
|
1440 |
-
|
1441 |
-
|
1442 |
-
|
1443 |
-
|
1444 |
-
|
1445 |
-
|
1446 |
-
|
1447 |
-
|
1448 |
-
|
|
|
|
|
|
|
|
|
1449 |
|
1450 |
}
|
1451 |
|
@@ -1455,19 +1545,26 @@ function UEDynamicFilters(){
|
|
1455 |
|
1456 |
//add init filters additions
|
1457 |
|
1458 |
-
var
|
|
|
1459 |
|
1460 |
if(isFiltersInitMode == true){
|
1461 |
|
1462 |
-
var strTaxIDs = getTermDsList(objInitTaxIDs);
|
1463 |
-
|
1464 |
if(!strTaxIDs)
|
1465 |
urlAjax = null;
|
1466 |
else{
|
1467 |
-
|
1468 |
}
|
1469 |
}
|
1470 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1471 |
if(urlAjax == null)
|
1472 |
return(null);
|
1473 |
|
@@ -1477,11 +1574,11 @@ function UEDynamicFilters(){
|
|
1477 |
var layoutID = dataLayout["layoutid"];
|
1478 |
|
1479 |
var urlAddition = "ucfrontajaxaction=getfiltersdata&layoutid="+layoutID+"&elid="+widgetID;
|
1480 |
-
|
1481 |
urlAjax = addUrlParam(urlAjax, urlAddition);
|
1482 |
|
1483 |
-
if(
|
1484 |
-
urlAjax = addUrlParam(urlAjax,
|
1485 |
|
1486 |
if(page)
|
1487 |
urlAjax += "&ucpage="+page;
|
@@ -1494,11 +1591,15 @@ function UEDynamicFilters(){
|
|
1494 |
if(strTerms)
|
1495 |
urlAjax += "&ucterms="+strTerms;
|
1496 |
}
|
1497 |
-
|
1498 |
//add refresh ids
|
1499 |
if(strRefreshIDs)
|
1500 |
urlAjax += "&addelids="+strRefreshIDs;
|
1501 |
|
|
|
|
|
|
|
|
|
1502 |
var output = {};
|
1503 |
output["ajax_url"] = urlAjax;
|
1504 |
|
@@ -1664,7 +1765,7 @@ function UEDynamicFilters(){
|
|
1664 |
* check and call ajax init filters
|
1665 |
*/
|
1666 |
function ajaxInitFilters(){
|
1667 |
-
|
1668 |
var objGrids = getAllGrids();
|
1669 |
|
1670 |
if(objGrids.length == 0)
|
@@ -1699,7 +1800,7 @@ function UEDynamicFilters(){
|
|
1699 |
|
1700 |
//init the grid object
|
1701 |
initGridObject();
|
1702 |
-
|
1703 |
initFilters();
|
1704 |
|
1705 |
ajaxInitFilters();
|
407 |
return(null);
|
408 |
}
|
409 |
|
410 |
+
/**
|
411 |
+
* clear non main grid filters
|
412 |
+
*/
|
413 |
+
function clearGridFilters(objGrid){
|
414 |
+
|
415 |
+
var objFilters = objGrid.data("filters");
|
416 |
+
|
417 |
+
if(!objFilters)
|
418 |
+
return(false);
|
419 |
+
|
420 |
+
if(objFilters.length == 0)
|
421 |
+
return(false);
|
422 |
+
|
423 |
+
jQuery.each(objFilters, function(index, filter){
|
424 |
+
|
425 |
+
var objFilter = jQuery(filter);
|
426 |
+
|
427 |
+
var isMainFilter = objFilter.hasClass("uc-main-filter");
|
428 |
+
|
429 |
+
if(isMainFilter == true)
|
430 |
+
return(true);
|
431 |
+
|
432 |
+
clearFilter(objFilter);
|
433 |
+
|
434 |
+
});
|
435 |
+
|
436 |
+
}
|
437 |
|
438 |
+
/**
|
439 |
+
* clear some filter
|
440 |
+
*/
|
441 |
+
function clearFilter(objFilter){
|
442 |
+
|
443 |
+
var type = getFilterType(objFilter);
|
444 |
+
|
445 |
+
switch(type){
|
446 |
+
case g_types.TERMS_LIST:
|
447 |
+
var objSelectedItems = objFilter.find(".ue_taxonomy_item.uc-selected");
|
448 |
+
objSelectedItems.removeClass("uc-selected");
|
449 |
+
break;
|
450 |
+
}
|
451 |
+
|
452 |
+
}
|
453 |
|
454 |
function ________PAGINATION_FILTER______(){}
|
455 |
|
673 |
if(!objGrid || objGrid.length == 0)
|
674 |
throw new Error("Grid not found");
|
675 |
|
676 |
+
//if main filter - clear other filters
|
677 |
+
var isMainFilter = objTermsFilter.hasClass("uc-main-filter");
|
678 |
+
|
679 |
+
if(isMainFilter == true)
|
680 |
+
clearGridFilters(objGrid);
|
681 |
+
|
682 |
//refresh grid
|
683 |
refreshAjaxGrid(objGrid);
|
684 |
|
701 |
var slug = objSelected.data("slug");
|
702 |
var taxonomy = objSelected.data("taxonomy");
|
703 |
|
704 |
+
if(!taxonomy)
|
705 |
+
return(null);
|
706 |
+
|
707 |
var objTerm = {
|
708 |
"slug": slug,
|
709 |
"taxonomy": taxonomy
|
746 |
|
747 |
var strIDs = "";
|
748 |
for(var id in objIDs){
|
749 |
+
|
750 |
if(jQuery.isNumeric(id) == false)
|
751 |
continue;
|
752 |
|
834 |
jQuery.each(arrTax,function(taxonomy,objSlugs){
|
835 |
|
836 |
var strSlugs = "";
|
837 |
+
|
838 |
+
var moreThenOne = false;
|
839 |
for (var slug in objSlugs){
|
840 |
|
841 |
+
if(strSlugs){
|
842 |
+
moreThenOne = true;
|
843 |
strSlugs += ".";
|
844 |
+
}
|
845 |
|
846 |
strSlugs += slug;
|
847 |
}
|
848 |
|
849 |
+
//add "and"
|
850 |
+
if(moreThenOne == true)
|
851 |
+
strSlugs += ".*";
|
852 |
+
|
853 |
var strTax = taxonomy+"~"+strSlugs;
|
854 |
|
855 |
if(query)
|
858 |
query += strTax;
|
859 |
|
860 |
});
|
861 |
+
|
|
|
862 |
return(query);
|
863 |
}
|
864 |
|
947 |
|
948 |
if(objDebug.length == 0)
|
949 |
return(false);
|
950 |
+
|
951 |
objDebug.replaceWith(htmlDebug);
|
952 |
}
|
953 |
|
999 |
|
1000 |
if(!objHtmlWidgets)
|
1001 |
return(false);
|
1002 |
+
|
1003 |
if(objHtmlWidgets.length == 0)
|
1004 |
return(false);
|
1005 |
|
1006 |
+
var objHtmlDebug = getVal(response, "html_widgets_debug");
|
1007 |
+
|
1008 |
jQuery.each(objFilters, function(index, objFilter){
|
1009 |
|
1010 |
var widgetID = getElementWidgetID(objFilter);
|
1023 |
|
1024 |
objFilter.html(htmlInner);
|
1025 |
|
1026 |
+
//---- put the debug if exists
|
1027 |
+
|
1028 |
+
var htmlDebug = null;
|
1029 |
+
|
1030 |
+
if(objHtmlDebug)
|
1031 |
+
var htmlDebug = getVal(objHtmlDebug, widgetID);
|
1032 |
+
|
1033 |
+
if(htmlDebug){
|
1034 |
+
var objParent = objFilter.parents(".elementor-widget-container");
|
1035 |
+
var objDebug = objParent.find(".uc-div-ajax-debug");
|
1036 |
+
|
1037 |
+
if(objDebug.length)
|
1038 |
+
objDebug.replaceWith(htmlDebug);
|
1039 |
+
}
|
1040 |
+
|
1041 |
objFilter.trigger("uc_ajax_reloaded");
|
1042 |
|
1043 |
});
|
1076 |
function operateAjaxRefreshResponse(response, objGrid, objFilters, isLoadMore){
|
1077 |
|
1078 |
operateAjax_setHtmlGrid(response, objGrid, isLoadMore);
|
1079 |
+
|
1080 |
operateAjax_setHtmlWidgets(response, objFilters);
|
1081 |
|
1082 |
objGrid.trigger("uc_ajax_refreshed");
|
1172 |
*/
|
1173 |
function showAjaxDebug(str){
|
1174 |
|
1175 |
+
trace("Ajax Error! - Check the debug");
|
1176 |
+
|
1177 |
str = jQuery.trim(str);
|
1178 |
|
1179 |
if(!str || str.length == 0)
|
1391 |
return(false);
|
1392 |
|
1393 |
var objAjaxOptions = getGridAjaxOptions(objFilters, objGrid, isFiltersInit);
|
1394 |
+
|
1395 |
if(!objAjaxOptions)
|
1396 |
return(false);
|
1397 |
|
1417 |
g_lastGridAjaxCall = objGrid;
|
1418 |
|
1419 |
ajaxRequest(ajaxUrl,null,null, function(response){
|
1420 |
+
|
1421 |
if(isLoadMore !== true)
|
1422 |
hideAjaxLoader(objGrid);
|
1423 |
|
1444 |
|
1445 |
var strRefreshIDs = "";
|
1446 |
|
1447 |
+
var isReplaceMode = false;
|
1448 |
var page = null;
|
1449 |
var numItems = null;
|
1450 |
var arrTerms = [];
|
1451 |
+
var objTaxIDs = {};
|
1452 |
|
1453 |
|
1454 |
//get ajax options
|
1472 |
|
1473 |
if(!page)
|
1474 |
urlAjax = null;
|
1475 |
+
|
1476 |
break;
|
1477 |
case g_types.TERMS_LIST:
|
1478 |
|
1479 |
+
//if not init mode - take first item
|
1480 |
+
if(isFiltersInitMode == false){
|
1481 |
+
|
1482 |
+
var objTerm = getTermsListSelectedTerm(objFilter);
|
1483 |
+
|
1484 |
+
if(objTerm)
|
1485 |
+
arrTerms.push(objTerm);
|
1486 |
+
}
|
1487 |
+
|
1488 |
+
//replace mode
|
1489 |
|
1490 |
+
var modeReplace = objFilter.data("replace-mode");
|
1491 |
+
if(modeReplace === true)
|
1492 |
+
isReplaceMode = true;
|
1493 |
break;
|
1494 |
case g_types.CHECKBOX:
|
1495 |
|
1500 |
throw new Error("Unknown filter type: "+type);
|
1501 |
break;
|
1502 |
}
|
1503 |
+
|
1504 |
//add widget id of the filter to refresh
|
1505 |
|
1506 |
var isNoRefresh = objFilter.data("uc_norefresh");
|
1517 |
|
1518 |
objFilter.data("uc_norefresh",false);
|
1519 |
|
1520 |
+
|
1521 |
if(isNoRefresh !== true){ //add to refresh mode
|
1522 |
|
1523 |
+
var isMainFilter = objFilter.hasClass("uc-main-filter");
|
1524 |
|
1525 |
+
if(isMainFilter == false){
|
1526 |
+
|
1527 |
+
var filterWidgetID = getElementWidgetID(objFilter);
|
1528 |
+
|
1529 |
+
//add test tax id's for init mode
|
1530 |
+
objTaxIDs = getFilterTaxIDs(objFilter, objTaxIDs);
|
1531 |
+
|
1532 |
+
if(strRefreshIDs)
|
1533 |
+
strRefreshIDs += ",";
|
1534 |
+
|
1535 |
+
strRefreshIDs += filterWidgetID;
|
1536 |
+
|
1537 |
+
objFilter.addClass("uc-ajax-refresh-soon");
|
1538 |
+
}
|
1539 |
|
1540 |
}
|
1541 |
|
1545 |
|
1546 |
//add init filters additions
|
1547 |
|
1548 |
+
var urlAddition_filtersTest = "";
|
1549 |
+
var strTaxIDs = getTermDsList(objTaxIDs);
|
1550 |
|
1551 |
if(isFiltersInitMode == true){
|
1552 |
|
|
|
|
|
1553 |
if(!strTaxIDs)
|
1554 |
urlAjax = null;
|
1555 |
else{
|
1556 |
+
urlAddition_filtersTest += "&modeinit=true";
|
1557 |
}
|
1558 |
}
|
1559 |
|
1560 |
+
if(strTaxIDs){
|
1561 |
+
if(urlAddition_filtersTest)
|
1562 |
+
urlAddition_filtersTest += "&";
|
1563 |
+
|
1564 |
+
urlAddition_filtersTest += "testtermids="+strTaxIDs;
|
1565 |
+
}
|
1566 |
+
|
1567 |
+
|
1568 |
if(urlAjax == null)
|
1569 |
return(null);
|
1570 |
|
1574 |
var layoutID = dataLayout["layoutid"];
|
1575 |
|
1576 |
var urlAddition = "ucfrontajaxaction=getfiltersdata&layoutid="+layoutID+"&elid="+widgetID;
|
1577 |
+
|
1578 |
urlAjax = addUrlParam(urlAjax, urlAddition);
|
1579 |
|
1580 |
+
if(urlAddition_filtersTest)
|
1581 |
+
urlAjax = addUrlParam(urlAjax, urlAddition_filtersTest);
|
1582 |
|
1583 |
if(page)
|
1584 |
urlAjax += "&ucpage="+page;
|
1591 |
if(strTerms)
|
1592 |
urlAjax += "&ucterms="+strTerms;
|
1593 |
}
|
1594 |
+
|
1595 |
//add refresh ids
|
1596 |
if(strRefreshIDs)
|
1597 |
urlAjax += "&addelids="+strRefreshIDs;
|
1598 |
|
1599 |
+
if(isReplaceMode == true)
|
1600 |
+
urlAjax += "&ucreplace=1";
|
1601 |
+
|
1602 |
+
|
1603 |
var output = {};
|
1604 |
output["ajax_url"] = urlAjax;
|
1605 |
|
1765 |
* check and call ajax init filters
|
1766 |
*/
|
1767 |
function ajaxInitFilters(){
|
1768 |
+
|
1769 |
var objGrids = getAllGrids();
|
1770 |
|
1771 |
if(objGrids.length == 0)
|
1800 |
|
1801 |
//init the grid object
|
1802 |
initGridObject();
|
1803 |
+
|
1804 |
initFilters();
|
1805 |
|
1806 |
ajaxInitFilters();
|
assets_libraries/owl-carousel-new/owl.carousel.js
CHANGED
@@ -1,11 +1,11 @@
|
|
1 |
/**
|
2 |
-
* Owl Carousel v2.3.
|
3 |
* Copyright 2013-2018 David Deutsch
|
4 |
* Licensed under: SEE LICENSE IN https://github.com/OwlCarousel2/OwlCarousel2/blob/master/LICENSE
|
5 |
*/
|
6 |
/**
|
7 |
* Owl carousel
|
8 |
-
* @version 2.3.
|
9 |
* @author Bartosz Wojciechowski
|
10 |
* @author David Deutsch
|
11 |
* @license The MIT License (MIT)
|
@@ -3028,14 +3028,14 @@
|
|
3028 |
this._controls.$relative = (settings.navContainer ? $(settings.navContainer)
|
3029 |
: $('<div>').addClass(settings.navContainerClass).appendTo(this.$element)).addClass('disabled');
|
3030 |
|
3031 |
-
this._controls.$previous = $('<' + settings.navElement + '>')
|
3032 |
.addClass(settings.navClass[0])
|
3033 |
.html(settings.navText[0])
|
3034 |
.prependTo(this._controls.$relative)
|
3035 |
.on('click', $.proxy(function(e) {
|
3036 |
this.prev(settings.navSpeed);
|
3037 |
}, this));
|
3038 |
-
this._controls.$next = $('<' + settings.navElement + '>')
|
3039 |
.addClass(settings.navClass[1])
|
3040 |
.html(settings.navText[1])
|
3041 |
.appendTo(this._controls.$relative)
|
1 |
/**
|
2 |
+
* Owl Carousel v2.3.5 - UE3
|
3 |
* Copyright 2013-2018 David Deutsch
|
4 |
* Licensed under: SEE LICENSE IN https://github.com/OwlCarousel2/OwlCarousel2/blob/master/LICENSE
|
5 |
*/
|
6 |
/**
|
7 |
* Owl carousel
|
8 |
+
* @version 2.3.5
|
9 |
* @author Bartosz Wojciechowski
|
10 |
* @author David Deutsch
|
11 |
* @license The MIT License (MIT)
|
3028 |
this._controls.$relative = (settings.navContainer ? $(settings.navContainer)
|
3029 |
: $('<div>').addClass(settings.navContainerClass).appendTo(this.$element)).addClass('disabled');
|
3030 |
|
3031 |
+
this._controls.$previous = $('<' + settings.navElement + ' value="previous item">')
|
3032 |
.addClass(settings.navClass[0])
|
3033 |
.html(settings.navText[0])
|
3034 |
.prependTo(this._controls.$relative)
|
3035 |
.on('click', $.proxy(function(e) {
|
3036 |
this.prev(settings.navSpeed);
|
3037 |
}, this));
|
3038 |
+
this._controls.$next = $('<' + settings.navElement + ' value="next item">')
|
3039 |
.addClass(settings.navClass[1])
|
3040 |
.html(settings.navText[1])
|
3041 |
.appendTo(this._controls.$relative)
|
assets_libraries/owl-carousel-new/owl.carousel.min.js
CHANGED
@@ -1,11 +1,11 @@
|
|
1 |
/**
|
2 |
-
* Owl Carousel v2.3.
|
3 |
* Copyright 2013-2018 David Deutsch
|
4 |
* Licensed under: SEE LICENSE IN https://github.com/OwlCarousel2/OwlCarousel2/blob/master/LICENSE
|
5 |
*/
|
6 |
/**
|
7 |
* Owl carousel
|
8 |
-
* @version 2.3.
|
9 |
* @author Bartosz Wojciechowski
|
10 |
* @author David Deutsch
|
11 |
* @license The MIT License (MIT)
|
@@ -16,4 +16,4 @@
|
|
16 |
* @todo stagePadding calculate wrong active classes
|
17 |
*/
|
18 |
|
19 |
-
!function(t,e,i,s){function n(e,i){this.settings=null,this.options=t.extend({},n.Defaults,i),this.$element=t(e),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"]}},t.each(["onResize","onThrottledResize"],t.proxy(function(e,i){this._handlers[i]=t.proxy(this[i],this)},this)),t.each(n.Plugins,t.proxy(function(t,e){this._plugins[t.charAt(0).toLowerCase()+t.slice(1)]=new e(this)},this)),t.each(n.Workers,t.proxy(function(e,i){this._pipe.push({filter:i.filter,run:t.proxy(i.run,this)})},this)),this.setup(),this.initialize()}n.Defaults={items:3,loop:!1,center:!1,rewind:!1,checkVisibility:!0,setActiveClass:!0,setActiveClassOnMobile:!0,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:e,fallbackEasing:"swing",slideTransition:"",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"},n.Width={Default:"default",Inner:"inner",Outer:"outer"},n.Type={Event:"event",State:"state"},n.Plugins={},n.Workers=[{filter:["width","settings"],run:function(){this._width=this.$element.width()}},{filter:["width","items","settings"],run:function(t){t.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(t){var e=this.settings.margin||"",i=!this.settings.autoWidth,s=this.settings.rtl,n={width:"auto","margin-left":s?e:"","margin-right":s?"":e};!i&&this.$stage.children().css(n),t.css=n}},{filter:["width","items","settings"],run:function(t){var e=(this.width()/this.settings.items).toFixed(3)-this.settings.margin,i=null,s=this._items.length,n=!this.settings.autoWidth,o=[];for(t.items={merge:!1,width:e};s--;)i=this._mergers[s],i=this.settings.mergeFit&&Math.min(i,this.settings.items)||i,t.items.merge=i>1||t.items.merge,o[s]=n?e*i:this._items[s].width();this._widths=o}},{filter:["items","settings"],run:function(){var e=[],i=this._items,s=this.settings,n=Math.max(2*s.items,4),o=2*Math.ceil(i.length/2),r=s.loop&&i.length?s.rewind?n:Math.max(n,o):0,a="",h="";for(r/=2;r>0;)e.push(this.normalize(e.length/2,!0)),a+=i[e[e.length-1]][0].outerHTML,e.push(this.normalize(i.length-1-(e.length-1)/2,!0)),h=i[e[e.length-1]][0].outerHTML+h,r-=1;this._clones=e,t(a).addClass("cloned").appendTo(this.$stage),t(h).addClass("cloned").prependTo(this.$stage)}},{filter:["width","items","settings"],run:function(){for(var t=this.settings.rtl?1:-1,e=this._clones.length+this._items.length,i=-1,s=0,n=0,o=[];++i<e;)s=o[i-1]||0,n=this._widths[this.relative(i)]+this.settings.margin,o.push(s+n*t);this._coordinates=o}},{filter:["width","items","settings"],run:function(){var t=this.settings.stagePadding,e=this._coordinates,i={width:Math.ceil(Math.abs(e[e.length-1]))+2*t,"padding-left":t||"","padding-right":t||""};this.$stage.css(i)}},{filter:["width","items","settings"],run:function(t){var e=this._coordinates.length,i=!this.settings.autoWidth,s=this.$stage.children();if(i&&t.items.merge)for(;e--;)t.css.width=this._widths[this.relative(e)],s.eq(e).css(t.css);else i&&(t.css.width=t.items.width,s.css(t.css))}},{filter:["items"],run:function(){this._coordinates.length<1&&this.$stage.removeAttr("style")}},{filter:["width","items","settings"],run:function(t){t.current=t.current?this.$stage.children().index(t.current):0,t.current=Math.max(this.minimum(),Math.min(this.maximum(),t.current)),this.reset(t.current)}},{filter:["position"],run:function(){this.animate(this.coordinates(this._current))}},{filter:["width","position","items","settings"],run:function(){var t,e,i,s,n=this.settings.rtl?1:-1,o=2*this.settings.stagePadding,r=this.coordinates(this.current())+o,a=r+this.width()*n,h=[];for(i=0,s=this._coordinates.length;i<s;i++)t=this._coordinates[i-1]||0,e=Math.abs(this._coordinates[i])+o*n,(this.op(t,"<=",r)&&this.op(t,">",a)||this.op(e,"<",r)&&this.op(e,">",a))&&h.push(i);this.$stage.children(".active").removeClass("active"),this.$stage.children(":eq("+h.join("), :eq(")+")").addClass("active"),this.$stage.children(".center").removeClass("center"),this.settings.center&&this.$stage.children().eq(this.current()).addClass("center")}},{filter:["width","position","items","settings"],run:function(){if(this.settings.setActiveClass&&this.settings.setActiveClass){var t=!0;this.settings.setActiveClassOnMobile?1==this.$stage.children(".active").length&&(t=!0):this.settings.setActiveClassOnMobile||1==this.$stage.children(".active").length&&(t=!1),1==t?this.$stage.children().eq(this.current()).addClass("uc-active-item").siblings().removeClass("uc-active-item"):0==t&&this.$stage.children().removeClass("uc-active-item")}}}],n.prototype.initializeStage=function(){this.$stage=this.$element.find("."+this.settings.stageClass),this.$stage.length||(this.$element.addClass(this.options.loadingClass),this.$stage=t("<"+this.settings.stageElement+">",{class:this.settings.stageClass}).wrap(t("<div/>",{class:this.settings.stageOuterClass})),this.$element.append(this.$stage.parent()))},n.prototype.initializeItems=function(){var e=this.$element.find(".owl-item");if(e.length)return this._items=e.get().map(function(e){return t(e)}),this._mergers=this._items.map(function(){return 1}),void this.refresh();this.replace(this.$element.children().not(this.$stage.parent())),this.isVisible()?this.refresh():this.invalidate("width"),this.$element.removeClass(this.options.loadingClass).addClass(this.options.loadedClass)},n.prototype.initialize=function(){var t,e,i;(this.enter("initializing"),this.trigger("initialize"),this.$element.toggleClass(this.settings.rtlClass,this.settings.rtl),this.settings.autoWidth&&!this.is("pre-loading"))&&(t=this.$element.find("img"),e=this.settings.nestedItemSelector?"."+this.settings.nestedItemSelector:void 0,i=this.$element.children(e).width(),t.length&&i<=0&&this.preloadAutoWidthImages(t));this.initializeStage(),this.initializeItems(),this.registerEventHandlers(),this.leave("initializing"),this.trigger("initialized")},n.prototype.isVisible=function(){return!this.settings.checkVisibility||this.$element.is(":visible")},n.prototype.setup=function(){var e=this.viewport(),i=this.options.responsive,s=-1,n=null;i?(t.each(i,function(t){t<=e&&t>s&&(s=Number(t))}),"function"==typeof(n=t.extend({},this.options,i[s])).stagePadding&&(n.stagePadding=n.stagePadding()),delete n.responsive,n.responsiveClass&&this.$element.attr("class",this.$element.attr("class").replace(new RegExp("("+this.options.responsiveClass+"-)\\S+\\s","g"),"$1"+s))):n=t.extend({},this.options),this.trigger("change",{property:{name:"settings",value:n}}),this._breakpoint=s,this.settings=n,this.invalidate("settings"),this.trigger("changed",{property:{name:"settings",value:this.settings}})},n.prototype.optionsLogic=function(){this.settings.autoWidth&&(this.settings.stagePadding=!1,this.settings.merge=!1)},n.prototype.prepare=function(e){var i=this.trigger("prepare",{content:e});return i.data||(i.data=t("<"+this.settings.itemElement+"/>").addClass(this.options.itemClass).append(e)),this.trigger("prepared",{content:i.data}),i.data},n.prototype.update=function(){for(var e=0,i=this._pipe.length,s=t.proxy(function(t){return this[t]},this._invalidated),n={};e<i;)(this._invalidated.all||t.grep(this._pipe[e].filter,s).length>0)&&this._pipe[e].run(n),e++;this._invalidated={},!this.is("valid")&&this.enter("valid")},n.prototype.width=function(t){switch(t=t||n.Width.Default){case n.Width.Inner:case n.Width.Outer:return this._width;default:return this._width-2*this.settings.stagePadding+this.settings.margin}},n.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")},n.prototype.onThrottledResize=function(){e.clearTimeout(this.resizeTimer),this.resizeTimer=e.setTimeout(this._handlers.onResize,this.settings.responsiveRefreshRate)},n.prototype.onResize=function(){return!!this._items.length&&(this._width!==this.$element.width()&&(!!this.isVisible()&&(this.enter("resizing"),this.trigger("resize").isDefaultPrevented()?(this.leave("resizing"),!1):(this.invalidate("width"),this.refresh(),this.leave("resizing"),void this.trigger("resized")))))},n.prototype.registerEventHandlers=function(){t.support.transition&&this.$stage.on(t.support.transition.end+".owl.core",t.proxy(this.onTransitionEnd,this)),!1!==this.settings.responsive&&this.on(e,"resize",this._handlers.onThrottledResize),this.settings.mouseDrag&&(this.$element.addClass(this.options.dragClass),this.$stage.on("mousedown.owl.core",t.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",t.proxy(this.onDragStart,this)),this.$stage.on("touchcancel.owl.core",t.proxy(this.onDragEnd,this)))},n.prototype.onDragStart=function(e){var s=null;3!==e.which&&(t.support.transform?s={x:(s=this.$stage.css("transform").replace(/.*\(|\)| /g,"").split(","))[16===s.length?12:4],y:s[16===s.length?13:5]}:(s=this.$stage.position(),s={x:this.settings.rtl?s.left+this.$stage.width()-this.width()+this.settings.margin:s.left,y:s.top}),this.is("animating")&&(t.support.transform?this.animate(s.x):this.$stage.stop(),this.invalidate("position")),this.$element.toggleClass(this.options.grabClass,"mousedown"===e.type),this.speed(0),this._drag.time=(new Date).getTime(),this._drag.target=t(e.target),this._drag.stage.start=s,this._drag.stage.current=s,this._drag.pointer=this.pointer(e),t(i).on("mouseup.owl.core touchend.owl.core",t.proxy(this.onDragEnd,this)),t(i).one("mousemove.owl.core touchmove.owl.core",t.proxy(function(e){var s=this.difference(this._drag.pointer,this.pointer(e));t(i).on("mousemove.owl.core touchmove.owl.core",t.proxy(this.onDragMove,this)),Math.abs(s.x)<Math.abs(s.y)&&this.is("valid")||(e.preventDefault(),this.enter("dragging"),this.trigger("drag"))},this)))},n.prototype.onDragMove=function(t){var e=null,i=null,s=null,n=this.difference(this._drag.pointer,this.pointer(t)),o=this.difference(this._drag.stage.start,n);this.is("dragging")&&(t.preventDefault(),this.settings.loop?(e=this.coordinates(this.minimum()),i=this.coordinates(this.maximum()+1)-e,o.x=((o.x-e)%i+i)%i+e):(e=this.settings.rtl?this.coordinates(this.maximum()):this.coordinates(this.minimum()),i=this.settings.rtl?this.coordinates(this.minimum()):this.coordinates(this.maximum()),s=this.settings.pullDrag?-1*n.x/5:0,o.x=Math.max(Math.min(o.x,e+s),i+s)),this._drag.stage.current=o,this.animate(o.x))},n.prototype.onDragEnd=function(e){var s=this.difference(this._drag.pointer,this.pointer(e)),n=this._drag.stage.current,o=s.x>0^this.settings.rtl?"left":"right";t(i).off(".owl.core"),this.$element.removeClass(this.options.grabClass),(0!==s.x&&this.is("dragging")||!this.is("valid"))&&(this.speed(this.settings.dragEndSpeed||this.settings.smartSpeed),this.current(this.closest(n.x,0!==s.x?o:this._drag.direction)),this.invalidate("position"),this.update(),this._drag.direction=o,(Math.abs(s.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"))},n.prototype.closest=function(e,i){var s=-1,n=this.width(),o=this.coordinates();return this.settings.freeDrag||t.each(o,t.proxy(function(t,r){return"left"===i&&e>r-30&&e<r+30?s=t:"right"===i&&e>r-n-30&&e<r-n+30?s=t+1:this.op(e,"<",r)&&this.op(e,">",void 0!==o[t+1]?o[t+1]:r-n)&&(s="left"===i?t+1:t),-1===s},this)),this.settings.loop||(this.op(e,">",o[this.minimum()])?s=e=this.minimum():this.op(e,"<",o[this.maximum()])&&(s=e=this.maximum())),s},n.prototype.animate=function(e){var i=this.speed()>0;this.is("animating")&&this.onTransitionEnd(),i&&(this.enter("animating"),this.trigger("translate")),t.support.transform3d&&t.support.transition?this.$stage.css({transform:"translate3d("+e+"px,0px,0px)",transition:this.speed()/1e3+"s"+(this.settings.slideTransition?" "+this.settings.slideTransition:"")}):i?this.$stage.animate({left:e+"px"},this.speed(),this.settings.fallbackEasing,t.proxy(this.onTransitionEnd,this)):this.$stage.css({left:e+"px"})},n.prototype.is=function(t){return this._states.current[t]&&this._states.current[t]>0},n.prototype.current=function(t){if(void 0===t)return this._current;if(0!==this._items.length){if(t=this.normalize(t),this._current!==t){var e=this.trigger("change",{property:{name:"position",value:t}});void 0!==e.data&&(t=this.normalize(e.data)),this._current=t,this.invalidate("position"),this.trigger("changed",{property:{name:"position",value:this._current}})}return this._current}},n.prototype.invalidate=function(e){return"string"===t.type(e)&&(this._invalidated[e]=!0,this.is("valid")&&this.leave("valid")),t.map(this._invalidated,function(t,e){return e})},n.prototype.reset=function(t){void 0!==(t=this.normalize(t))&&(this._speed=0,this._current=t,this.suppress(["translate","translated"]),this.animate(this.coordinates(t)),this.release(["translate","translated"]))},n.prototype.normalize=function(t,e){var i=this._items.length,s=e?0:this._clones.length;return!this.isNumeric(t)||i<1?t=void 0:(t<0||t>=i+s)&&(t=((t-s/2)%i+i)%i+s/2),t},n.prototype.relative=function(t){return t-=this._clones.length/2,this.normalize(t,!0)},n.prototype.maximum=function(t){var e,i,s,n=this.settings,o=this._coordinates.length;if(n.loop)o=this._clones.length/2+this._items.length-1;else if(n.autoWidth||n.merge){if(e=this._items.length)for(i=this._items[--e].width(),s=this.$element.width();e--&&!((i+=this._items[e].width()+this.settings.margin)>s););o=e+1}else o=n.center?this._items.length-1:this._items.length-n.items;return t&&(o-=this._clones.length/2),Math.max(o,0)},n.prototype.minimum=function(t){return t?0:this._clones.length/2},n.prototype.items=function(t){return void 0===t?this._items.slice():(t=this.normalize(t,!0),this._items[t])},n.prototype.mergers=function(t){return void 0===t?this._mergers.slice():(t=this.normalize(t,!0),this._mergers[t])},n.prototype.clones=function(e){var i=this._clones.length/2,s=i+this._items.length,n=function(t){return t%2==0?s+t/2:i-(t+1)/2};return void 0===e?t.map(this._clones,function(t,e){return n(e)}):t.map(this._clones,function(t,i){return t===e?n(i):null})},n.prototype.speed=function(t){return void 0!==t&&(this._speed=t),this._speed},n.prototype.coordinates=function(e){var i,s=1,n=e-1;return void 0===e?t.map(this._coordinates,t.proxy(function(t,e){return this.coordinates(e)},this)):(this.settings.center?(this.settings.rtl&&(s=-1,n=e+1),i=this._coordinates[e],i+=(this.width()-i+(this._coordinates[n]||0))/2*s):i=this._coordinates[n]||0,i=Math.ceil(i))},n.prototype.duration=function(t,e,i){return 0===i?0:Math.min(Math.max(Math.abs(e-t),1),6)*Math.abs(i||this.settings.smartSpeed)},n.prototype.to=function(t,e){var i=this.current(),s=null,n=t-this.relative(i),o=(n>0)-(n<0),r=this._items.length,a=this.minimum(),h=this.maximum();this.settings.loop?(!this.settings.rewind&&Math.abs(n)>r/2&&(n+=-1*o*r),(s=(((t=i+n)-a)%r+r)%r+a)!==t&&s-n<=h&&s-n>0&&(i=s-n,t=s,this.reset(i))):t=this.settings.rewind?(t%(h+=1)+h)%h:Math.max(a,Math.min(h,t)),this.speed(this.duration(i,t,e)),this.current(t),this.isVisible()&&this.update()},n.prototype.next=function(t){t=t||!1,this.to(this.relative(this.current())+1,t)},n.prototype.prev=function(t){t=t||!1,this.to(this.relative(this.current())-1,t)},n.prototype.onTransitionEnd=function(t){if(void 0!==t&&(t.stopPropagation(),(t.target||t.srcElement||t.originalTarget)!==this.$stage.get(0)))return!1;this.leave("animating"),this.trigger("translated")},n.prototype.viewport=function(){var s;return this.options.responsiveBaseElement!==e?s=t(this.options.responsiveBaseElement).width():e.innerWidth?s=e.innerWidth:i.documentElement&&i.documentElement.clientWidth?s=i.documentElement.clientWidth:console.warn("Can not detect viewport width."),s},n.prototype.replace=function(e){this.$stage.empty(),this._items=[],e&&(e=e instanceof jQuery?e:t(e)),this.settings.nestedItemSelector&&(e=e.find("."+this.settings.nestedItemSelector)),e.filter(function(){return 1===this.nodeType}).each(t.proxy(function(t,e){e=this.prepare(e),this.$stage.append(e),this._items.push(e),this._mergers.push(1*e.find("[data-merge]").addBack("[data-merge]").attr("data-merge")||1)},this)),this.reset(this.isNumeric(this.settings.startPosition)?this.settings.startPosition:0),this.invalidate("items")},n.prototype.add=function(e,i){var s=this.relative(this._current);i=void 0===i?this._items.length:this.normalize(i,!0),e=e instanceof jQuery?e:t(e),this.trigger("add",{content:e,position:i}),e=this.prepare(e),0===this._items.length||i===this._items.length?(0===this._items.length&&this.$stage.append(e),0!==this._items.length&&this._items[i-1].after(e),this._items.push(e),this._mergers.push(1*e.find("[data-merge]").addBack("[data-merge]").attr("data-merge")||1)):(this._items[i].before(e),this._items.splice(i,0,e),this._mergers.splice(i,0,1*e.find("[data-merge]").addBack("[data-merge]").attr("data-merge")||1)),this._items[s]&&this.reset(this._items[s].index()),this.invalidate("items"),this.trigger("added",{content:e,position:i})},n.prototype.remove=function(t){void 0!==(t=this.normalize(t,!0))&&(this.trigger("remove",{content:this._items[t],position:t}),this._items[t].remove(),this._items.splice(t,1),this._mergers.splice(t,1),this.invalidate("items"),this.trigger("removed",{content:null,position:t}))},n.prototype.preloadAutoWidthImages=function(e){e.each(t.proxy(function(e,i){this.enter("pre-loading"),i=t(i),t(new Image).one("load",t.proxy(function(t){i.attr("src",t.target.src),i.css("opacity",1),this.leave("pre-loading"),!this.is("pre-loading")&&!this.is("initializing")&&this.refresh()},this)).attr("src",i.attr("src")||i.attr("data-src")||i.attr("data-src-retina"))},this))},n.prototype.destroy=function(){for(var s in this.$element.off(".owl.core"),this.$stage.off(".owl.core"),t(i).off(".owl.core"),!1!==this.settings.responsive&&(e.clearTimeout(this.resizeTimer),this.off(e,"resize",this._handlers.onThrottledResize)),this._plugins)this._plugins[s].destroy();this.$stage.children(".cloned").remove(),this.$stage.unwrap(),this.$stage.children().contents().unwrap(),this.$stage.children().unwrap(),this.$stage.remove(),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")},n.prototype.op=function(t,e,i){var s=this.settings.rtl;switch(e){case"<":return s?t>i:t<i;case">":return s?t<i:t>i;case">=":return s?t<=i:t>=i;case"<=":return s?t>=i:t<=i}},n.prototype.on=function(t,e,i,s){t.addEventListener?t.addEventListener(e,i,s):t.attachEvent&&t.attachEvent("on"+e,i)},n.prototype.off=function(t,e,i,s){t.removeEventListener?t.removeEventListener(e,i,s):t.detachEvent&&t.detachEvent("on"+e,i)},n.prototype.trigger=function(e,i,s,o,r){var a={item:{count:this._items.length,index:this.current()}},h=t.camelCase(t.grep(["on",e,s],function(t){return t}).join("-").toLowerCase()),l=t.Event([e,"owl",s||"carousel"].join(".").toLowerCase(),t.extend({relatedTarget:this},a,i));return this._supress[e]||(t.each(this._plugins,function(t,e){e.onTrigger&&e.onTrigger(l)}),this.register({type:n.Type.Event,name:e}),this.$element.trigger(l),this.settings&&"function"==typeof this.settings[h]&&this.settings[h].call(this,l)),l},n.prototype.enter=function(e){t.each([e].concat(this._states.tags[e]||[]),t.proxy(function(t,e){void 0===this._states.current[e]&&(this._states.current[e]=0),this._states.current[e]++},this))},n.prototype.leave=function(e){t.each([e].concat(this._states.tags[e]||[]),t.proxy(function(t,e){this._states.current[e]--},this))},n.prototype.register=function(e){if(e.type===n.Type.Event){if(t.event.special[e.name]||(t.event.special[e.name]={}),!t.event.special[e.name].owl){var i=t.event.special[e.name]._default;t.event.special[e.name]._default=function(t){return!i||!i.apply||t.namespace&&-1!==t.namespace.indexOf("owl")?t.namespace&&t.namespace.indexOf("owl")>-1:i.apply(this,arguments)},t.event.special[e.name].owl=!0}}else e.type===n.Type.State&&(this._states.tags[e.name]?this._states.tags[e.name]=this._states.tags[e.name].concat(e.tags):this._states.tags[e.name]=e.tags,this._states.tags[e.name]=t.grep(this._states.tags[e.name],t.proxy(function(i,s){return t.inArray(i,this._states.tags[e.name])===s},this)))},n.prototype.suppress=function(e){t.each(e,t.proxy(function(t,e){this._supress[e]=!0},this))},n.prototype.release=function(e){t.each(e,t.proxy(function(t,e){delete this._supress[e]},this))},n.prototype.pointer=function(t){var i={x:null,y:null};return(t=(t=t.originalEvent||t||e.event).touches&&t.touches.length?t.touches[0]:t.changedTouches&&t.changedTouches.length?t.changedTouches[0]:t).pageX?(i.x=t.pageX,i.y=t.pageY):(i.x=t.clientX,i.y=t.clientY),i},n.prototype.isNumeric=function(t){return!isNaN(parseFloat(t))},n.prototype.difference=function(t,e){return{x:t.x-e.x,y:t.y-e.y}},t.fn.owlCarousel=function(e){var i=Array.prototype.slice.call(arguments,1);return this.each(function(){var s=t(this),o=s.data("owl.carousel");o||(o=new n(this,"object"==typeof e&&e),s.data("owl.carousel",o),t.each(["next","prev","to","destroy","refresh","replace","add","remove"],function(e,i){o.register({type:n.Type.Event,name:i}),o.$element.on(i+".owl.carousel.core",t.proxy(function(t){t.namespace&&t.relatedTarget!==this&&(this.suppress([i]),o[i].apply(this,[].slice.call(arguments,1)),this.release([i]))},o))})),"string"==typeof e&&"_"!==e.charAt(0)&&o[e].apply(o,i)})},t.fn.owlCarousel.Constructor=n}(window.Zepto||window.jQuery,window,document),function(t,e,i,s){var n=function(e){this._core=e,this._interval=null,this._visible=null,this._handlers={"initialized.owl.carousel":t.proxy(function(t){t.namespace&&this._core.settings.autoRefresh&&this.watch()},this)},this._core.options=t.extend({},n.Defaults,this._core.options),this._core.$element.on(this._handlers)};n.Defaults={autoRefresh:!0,autoRefreshInterval:500},n.prototype.watch=function(){this._interval||(this._visible=this._core.isVisible(),this._interval=e.setInterval(t.proxy(this.refresh,this),this._core.settings.autoRefreshInterval))},n.prototype.refresh=function(){this._core.isVisible()!==this._visible&&(this._visible=!this._visible,this._core.$element.toggleClass("owl-hidden",!this._visible),this._visible&&this._core.invalidate("width")&&this._core.refresh())},n.prototype.destroy=function(){var t,i;for(t in e.clearInterval(this._interval),this._handlers)this._core.$element.off(t,this._handlers[t]);for(i in Object.getOwnPropertyNames(this))"function"!=typeof this[i]&&(this[i]=null)},t.fn.owlCarousel.Constructor.Plugins.AutoRefresh=n}(window.Zepto||window.jQuery,window,document),function(t,e,i,s){var n=function(e){this._core=e,this._loaded=[],this._handlers={"initialized.owl.carousel change.owl.carousel resized.owl.carousel":t.proxy(function(e){if(e.namespace&&this._core.settings&&this._core.settings.lazyLoad&&(e.property&&"position"==e.property.name||"initialized"==e.type)){var i=this._core.settings,s=i.center&&Math.ceil(i.items/2)||i.items,n=i.center&&-1*s||0,o=(e.property&&void 0!==e.property.value?e.property.value:this._core.current())+n,r=this._core.clones().length,a=t.proxy(function(t,e){this.load(e)},this);for(i.lazyLoadEager>0&&(s+=i.lazyLoadEager,i.loop&&(o-=i.lazyLoadEager,s++));n++<s;)this.load(r/2+this._core.relative(o)),r&&t.each(this._core.clones(this._core.relative(o)),a),o++}},this)},this._core.options=t.extend({},n.Defaults,this._core.options),this._core.$element.on(this._handlers)};n.Defaults={lazyLoad:!1,lazyLoadEager:0},n.prototype.load=function(i){var s=this._core.$stage.children().eq(i),n=s&&s.find(".owl-lazy");!n||t.inArray(s.get(0),this._loaded)>-1||(n.each(t.proxy(function(i,s){var n,o=t(s),r=e.devicePixelRatio>1&&o.attr("data-src-retina")||o.attr("data-src")||o.attr("data-srcset");this._core.trigger("load",{element:o,url:r},"lazy"),o.is("img")?o.one("load.owl.lazy",t.proxy(function(){o.css("opacity",1),this._core.trigger("loaded",{element:o,url:r},"lazy")},this)).attr("src",r):o.is("source")?o.one("load.owl.lazy",t.proxy(function(){this._core.trigger("loaded",{element:o,url:r},"lazy")},this)).attr("srcset",r):((n=new Image).onload=t.proxy(function(){o.css({"background-image":'url("'+r+'")',opacity:"1"}),this._core.trigger("loaded",{element:o,url:r},"lazy")},this),n.src=r)},this)),this._loaded.push(s.get(0)))},n.prototype.destroy=function(){var t,e;for(t in this.handlers)this._core.$element.off(t,this.handlers[t]);for(e in Object.getOwnPropertyNames(this))"function"!=typeof this[e]&&(this[e]=null)},t.fn.owlCarousel.Constructor.Plugins.Lazy=n}(window.Zepto||window.jQuery,window,document),function(t,e,i,s){var n=function(i){this._core=i,this._previousHeight=null,this._handlers={"initialized.owl.carousel refreshed.owl.carousel":t.proxy(function(t){t.namespace&&this._core.settings.autoHeight&&this.update()},this),"changed.owl.carousel":t.proxy(function(t){t.namespace&&this._core.settings.autoHeight&&"position"===t.property.name&&this.update()},this),"loaded.owl.lazy":t.proxy(function(t){t.namespace&&this._core.settings.autoHeight&&t.element.closest("."+this._core.settings.itemClass).index()===this._core.current()&&this.update()},this)},this._core.options=t.extend({},n.Defaults,this._core.options),this._core.$element.on(this._handlers),this._intervalId=null;var s=this;t(e).on("load",function(){s._core.settings.autoHeight&&s.update()}),t(e).resize(function(){s._core.settings.autoHeight&&(null!=s._intervalId&&clearTimeout(s._intervalId),s._intervalId=setTimeout(function(){s.update()},250))})};n.Defaults={autoHeight:!1,autoHeightClass:"owl-height"},n.prototype.update=function(){var e=this._core._current,i=e+this._core.settings.items,s=this._core.settings.lazyLoad,n=this._core.$stage.children().toArray().slice(e,i),o=[],r=0;t.each(n,function(e,i){o.push(t(i).height())}),(r=Math.max.apply(null,o))<=1&&s&&this._previousHeight&&(r=this._previousHeight),this._previousHeight=r,this._core.$stage.parent().height(r).addClass(this._core.settings.autoHeightClass)},n.prototype.destroy=function(){var t,e;for(t in this._handlers)this._core.$element.off(t,this._handlers[t]);for(e in Object.getOwnPropertyNames(this))"function"!=typeof this[e]&&(this[e]=null)},t.fn.owlCarousel.Constructor.Plugins.AutoHeight=n}(window.Zepto||window.jQuery,window,document),function(t,e,i,s){var n=function(e){this._core=e,this._videos={},this._playing=null,this._handlers={"initialized.owl.carousel":t.proxy(function(t){t.namespace&&this._core.register({type:"state",name:"playing",tags:["interacting"]})},this),"resize.owl.carousel":t.proxy(function(t){t.namespace&&this._core.settings.video&&this.isInFullScreen()&&t.preventDefault()},this),"refreshed.owl.carousel":t.proxy(function(t){t.namespace&&this._core.is("resizing")&&this._core.$stage.find(".cloned .owl-video-frame").remove()},this),"changed.owl.carousel":t.proxy(function(t){t.namespace&&"position"===t.property.name&&this._playing&&this.stop()},this),"prepared.owl.carousel":t.proxy(function(e){if(e.namespace){var i=t(e.content).find(".owl-video");i.length&&(i.css("display","none"),this.fetch(i,t(e.content)))}},this)},this._core.options=t.extend({},n.Defaults,this._core.options),this._core.$element.on(this._handlers),this._core.$element.on("click.owl.video",".owl-video-play-icon",t.proxy(function(t){this.play(t)},this))};n.Defaults={video:!1,videoHeight:!1,videoWidth:!1},n.prototype.fetch=function(t,e){var i=t.attr("data-vimeo-id")?"vimeo":t.attr("data-vzaar-id")?"vzaar":"youtube",s=t.attr("data-vimeo-id")||t.attr("data-youtube-id")||t.attr("data-vzaar-id"),n=t.attr("data-width")||this._core.settings.videoWidth,o=t.attr("data-height")||this._core.settings.videoHeight,r=t.attr("href");if(!r)throw new Error("Missing video URL.");if((s=r.match(/(http:|https:|)\/\/(player.|www.|app.)?(vimeo\.com|youtu(be\.com|\.be|be\.googleapis\.com|be\-nocookie\.com)|vzaar\.com)\/(video\/|videos\/|embed\/|channels\/.+\/|groups\/.+\/|watch\?v=|v\/)?([A-Za-z0-9._%-]*)(\&\S+)?/))[3].indexOf("youtu")>-1)i="youtube";else if(s[3].indexOf("vimeo")>-1)i="vimeo";else{if(!(s[3].indexOf("vzaar")>-1))throw new Error("Video URL not supported.");i="vzaar"}s=s[6],this._videos[r]={type:i,id:s,width:n,height:o},e.attr("data-video",r),this.thumbnail(t,this._videos[r])},n.prototype.thumbnail=function(e,i){var s,n,o=i.width&&i.height?"width:"+i.width+"px;height:"+i.height+"px;":"",r=e.find("img"),a="src",h="",l=this._core.settings,c=function(i){'<div class="owl-video-play-icon"></div>',s=l.lazyLoad?t("<div/>",{class:"owl-video-tn "+h,srcType:i}):t("<div/>",{class:"owl-video-tn",style:"opacity:1;background-image:url("+i+")"}),e.after(s),e.after('<div class="owl-video-play-icon"></div>')};if(e.wrap(t("<div/>",{class:"owl-video-wrapper",style:o})),this._core.settings.lazyLoad&&(a="data-src",h="owl-lazy"),r.length)return c(r.attr(a)),r.remove(),!1;"youtube"===i.type?(n="//img.youtube.com/vi/"+i.id+"/hqdefault.jpg",c(n)):"vimeo"===i.type?t.ajax({type:"GET",url:"//vimeo.com/api/v2/video/"+i.id+".json",jsonp:"callback",dataType:"jsonp",success:function(t){n=t[0].thumbnail_large,c(n)}}):"vzaar"===i.type&&t.ajax({type:"GET",url:"//vzaar.com/api/videos/"+i.id+".json",jsonp:"callback",dataType:"jsonp",success:function(t){n=t.framegrab_url,c(n)}})},n.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")},n.prototype.play=function(e){var i,s=t(e.target).closest("."+this._core.settings.itemClass),n=this._videos[s.attr("data-video")],o=n.width||"100%",r=n.height||this._core.$stage.height();this._playing||(this._core.enter("playing"),this._core.trigger("play",null,"video"),s=this._core.items(this._core.relative(s.index())),this._core.reset(s.index()),(i=t('<iframe frameborder="0" allowfullscreen mozallowfullscreen webkitAllowFullScreen ></iframe>')).attr("height",r),i.attr("width",o),"youtube"===n.type?i.attr("src","//www.youtube.com/embed/"+n.id+"?autoplay=1&rel=0&v="+n.id):"vimeo"===n.type?i.attr("src","//player.vimeo.com/video/"+n.id+"?autoplay=1"):"vzaar"===n.type&&i.attr("src","//view.vzaar.com/"+n.id+"/player?autoplay=true"),t(i).wrap('<div class="owl-video-frame" />').insertAfter(s.find(".owl-video")),this._playing=s.addClass("owl-video-playing"))},n.prototype.isInFullScreen=function(){var e=i.fullscreenElement||i.mozFullScreenElement||i.webkitFullscreenElement;return e&&t(e).parent().hasClass("owl-video-frame")},n.prototype.destroy=function(){var t,e;for(t in this._core.$element.off("click.owl.video"),this._handlers)this._core.$element.off(t,this._handlers[t]);for(e in Object.getOwnPropertyNames(this))"function"!=typeof this[e]&&(this[e]=null)},t.fn.owlCarousel.Constructor.Plugins.Video=n}(window.Zepto||window.jQuery,window,document),function(t,e,i,s){var n=function(e){this.core=e,this.core.options=t.extend({},n.Defaults,this.core.options),this.swapping=!0,this.previous=void 0,this.next=void 0,this.handlers={"change.owl.carousel":t.proxy(function(t){t.namespace&&"position"==t.property.name&&(this.previous=this.core.current(),this.next=t.property.value)},this),"drag.owl.carousel dragged.owl.carousel translated.owl.carousel":t.proxy(function(t){t.namespace&&(this.swapping="translated"==t.type)},this),"translate.owl.carousel":t.proxy(function(t){t.namespace&&this.swapping&&(this.core.options.animateOut||this.core.options.animateIn)&&this.swap()},this)},this.core.$element.on(this.handlers)};n.Defaults={animateOut:!1,animateIn:!1},n.prototype.swap=function(){if(1===this.core.settings.items&&t.support.animation&&t.support.transition){this.core.speed(0);var e,i=t.proxy(this.clear,this),s=this.core.$stage.children().eq(this.previous),n=this.core.$stage.children().eq(this.next),o=this.core.settings.animateIn,r=this.core.settings.animateOut;this.core.current()!==this.previous&&(r&&(e=this.core.coordinates(this.previous)-this.core.coordinates(this.next),s.one(t.support.animation.end,i).css({left:e+"px"}).addClass("animated owl-animated-out").addClass(r)),o&&n.one(t.support.animation.end,i).addClass("animated owl-animated-in").addClass(o))}},n.prototype.clear=function(e){t(e.target).css({left:""}).removeClass("animated owl-animated-out owl-animated-in").removeClass(this.core.settings.animateIn).removeClass(this.core.settings.animateOut),this.core.onTransitionEnd()},n.prototype.destroy=function(){var t,e;for(t in this.handlers)this.core.$element.off(t,this.handlers[t]);for(e in Object.getOwnPropertyNames(this))"function"!=typeof this[e]&&(this[e]=null)},t.fn.owlCarousel.Constructor.Plugins.Animate=n}(window.Zepto||window.jQuery,window,document),function(t,e,i,s){var n=function(e){this._core=e,this._call=null,this._time=0,this._timeout=0,this._paused=!0,this._handlers={"changed.owl.carousel":t.proxy(function(t){t.namespace&&"settings"===t.property.name?this._core.settings.autoplay?this.play():this.stop():t.namespace&&"position"===t.property.name&&this._paused&&(this._time=0)},this),"initialized.owl.carousel":t.proxy(function(t){t.namespace&&this._core.settings.autoplay&&this.play()},this),"play.owl.autoplay":t.proxy(function(t,e,i){t.namespace&&this.play(e,i)},this),"stop.owl.autoplay":t.proxy(function(t){t.namespace&&this.stop()},this),"mouseover.owl.autoplay":t.proxy(function(){this._core.settings.autoplayHoverPause&&this._core.is("rotating")&&this.pause()},this),"mouseleave.owl.autoplay":t.proxy(function(){this._core.settings.autoplayHoverPause&&this._core.is("rotating")&&this.play()},this),"touchstart.owl.core":t.proxy(function(){this._core.settings.autoplayHoverPause&&this._core.is("rotating")&&this.pause()},this),"touchend.owl.core":t.proxy(function(){this._core.settings.autoplayHoverPause&&this.play()},this)},this._core.$element.on(this._handlers),this._core.options=t.extend({},n.Defaults,this._core.options)};n.Defaults={autoplay:!1,autoplayTimeout:5e3,autoplayHoverPause:!1,autoplaySpeed:!1},n.prototype._next=function(s){this._call=e.setTimeout(t.proxy(this._next,this,s),this._timeout*(Math.round(this.read()/this._timeout)+1)-this.read()),this._core.is("interacting")||i.hidden||this._core.next(s||this._core.settings.autoplaySpeed)},n.prototype.read=function(){return(new Date).getTime()-this._time},n.prototype.play=function(i,s){var n;this._core.is("rotating")||this._core.enter("rotating"),i=i||this._core.settings.autoplayTimeout,n=Math.min(this._time%(this._timeout||i),i),this._paused?(this._time=this.read(),this._paused=!1):e.clearTimeout(this._call),this._time+=this.read()%i-n,this._timeout=i,this._call=e.setTimeout(t.proxy(this._next,this,s),i-n)},n.prototype.stop=function(){this._core.is("rotating")&&(this._time=0,this._paused=!0,e.clearTimeout(this._call),this._core.leave("rotating"))},n.prototype.pause=function(){this._core.is("rotating")&&!this._paused&&(this._time=this.read(),this._paused=!0,e.clearTimeout(this._call))},n.prototype.destroy=function(){var t,e;for(t in this.stop(),this._handlers)this._core.$element.off(t,this._handlers[t]);for(e in Object.getOwnPropertyNames(this))"function"!=typeof this[e]&&(this[e]=null)},t.fn.owlCarousel.Constructor.Plugins.autoplay=n}(window.Zepto||window.jQuery,window,document),function(t,e,i,s){"use strict";var n=function(e){this._core=e,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":t.proxy(function(e){e.namespace&&this._core.settings.dotsData&&this._templates.push('<div class="'+this._core.settings.dotClass+'">'+t(e.content).find("[data-dot]").addBack("[data-dot]").attr("data-dot")+"</div>")},this),"added.owl.carousel":t.proxy(function(t){t.namespace&&this._core.settings.dotsData&&this._templates.splice(t.position,0,this._templates.pop())},this),"remove.owl.carousel":t.proxy(function(t){t.namespace&&this._core.settings.dotsData&&this._templates.splice(t.position,1)},this),"changed.owl.carousel":t.proxy(function(t){t.namespace&&"position"==t.property.name&&this.draw()},this),"initialized.owl.carousel":t.proxy(function(t){t.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":t.proxy(function(t){t.namespace&&this._initialized&&(this._core.trigger("refresh",null,"navigation"),this.update(),this.draw(),this._core.trigger("refreshed",null,"navigation"))},this)},this._core.options=t.extend({},n.Defaults,this._core.options),this.$element.on(this._handlers)};n.Defaults={nav:!1,navText:['<span aria-label="Previous">‹</span>','<span aria-label="Next">›</span>'],navSpeed:!1,navElement:'button type="button" role="presentation"',navContainer:!1,navContainerClass:"owl-nav",navClass:["owl-prev","owl-next"],slideBy:1,changeItemOnClick:!1,dotClass:"owl-dot",dotsClass:"owl-dots",dots:!0,dotsEach:!1,dotsData:!1,dotsSpeed:!1,dotsContainer:!1},n.prototype.initialize=function(){var e,i=this._core.settings;if(this._controls.$relative=(i.navContainer?t(i.navContainer):t("<div>").addClass(i.navContainerClass).appendTo(this.$element)).addClass("disabled"),this._controls.$previous=t("<"+i.navElement+">").addClass(i.navClass[0]).html(i.navText[0]).prependTo(this._controls.$relative).on("click",t.proxy(function(t){this.prev(i.navSpeed)},this)),this._controls.$next=t("<"+i.navElement+">").addClass(i.navClass[1]).html(i.navText[1]).appendTo(this._controls.$relative).on("click",t.proxy(function(t){this.next(i.navSpeed)},this)),i.changeItemOnClick){var s=this._core.$stage.children(),n=this._core.clones().length/2;s.on("click",t.proxy(function(e){var s=t(e.currentTarget).index();this.to(s-n,i.navSpeed,!0)},this))}for(e in i.dotsData||(this._templates=[t('<button role="button">').addClass(i.dotClass).append(t("<span>")).prop("outerHTML")]),this._controls.$absolute=(i.dotsContainer?t(i.dotsContainer):t("<div>").addClass(i.dotsClass).appendTo(this.$element)).addClass("disabled"),this._controls.$absolute.on("click","button",t.proxy(function(e){var s=t(e.target).parent().is(this._controls.$absolute)?t(e.target).index():t(e.target).parent().index();console.log(t(e.target).index()),e.preventDefault(),this.to(s,i.dotsSpeed)},this)),this._overrides)this._core[e]=t.proxy(this[e],this)},n.prototype.destroy=function(){var t,e,i,s,n;for(t in n=this._core.settings,this._handlers)this.$element.off(t,this._handlers[t]);for(e in this._controls)"$relative"===e&&n.navContainer?this._controls[e].html(""):this._controls[e].remove();for(s in this.overides)this._core[s]=this._overrides[s];for(i in Object.getOwnPropertyNames(this))"function"!=typeof this[i]&&(this[i]=null)},n.prototype.update=function(){var t,e,i=this._core.clones().length/2,s=i+this._core.items().length,n=this._core.maximum(!0),o=this._core.settings,r=o.center||o.autoWidth||o.dotsData?1:o.dotsEach||o.items;if("page"!==o.slideBy&&(o.slideBy=Math.min(o.slideBy,o.items)),o.dots||"page"==o.slideBy)for(this._pages=[],t=i,e=0,0;t<s;t++){if(e>=r||0===e){if(this._pages.push({start:Math.min(n,t-i),end:t-i+r-1}),Math.min(n,t-i)===n)break;e=0,0}e+=this._core.mergers(this._core.relative(t))}},n.prototype.draw=function(){var e,i=this._core.settings,s=this._core.items().length<=i.items,n=this._core.relative(this._core.current()),o=i.loop||i.rewind;this._controls.$relative.toggleClass("disabled",!i.nav||s),i.nav&&(this._controls.$previous.toggleClass("disabled",!o&&n<=this._core.minimum(!0)),this._controls.$next.toggleClass("disabled",!o&&n>=this._core.maximum(!0))),this._controls.$absolute.toggleClass("disabled",!i.dots||s),i.dots&&(e=this._pages.length-this._controls.$absolute.children().length,i.dotsData&&0!==e?this._controls.$absolute.html(this._templates.join("")):e>0?this._controls.$absolute.append(new Array(e+1).join(this._templates[0])):e<0&&this._controls.$absolute.children().slice(e).remove(),this._controls.$absolute.find(".active").removeClass("active"),this._controls.$absolute.children().eq(t.inArray(this.current(),this._pages)).addClass("active"))},n.prototype.onTrigger=function(e){var i=this._core.settings;e.page={index:t.inArray(this.current(),this._pages),count:this._pages.length,size:i&&(i.center||i.autoWidth||i.dotsData?1:i.dotsEach||i.items)}},n.prototype.current=function(){var e=this._core.relative(this._core.current());return t.grep(this._pages,t.proxy(function(t,i){return t.start<=e&&t.end>=e},this)).pop()},n.prototype.getPosition=function(e){var i,s,n=this._core.settings;return"page"==n.slideBy?(i=t.inArray(this.current(),this._pages),s=this._pages.length,e?++i:--i,i=this._pages[(i%s+s)%s].start):(i=this._core.relative(this._core.current()),s=this._core.items().length,e?i+=n.slideBy:i-=n.slideBy),i},n.prototype.next=function(e){t.proxy(this._overrides.to,this._core)(this.getPosition(!0),e)},n.prototype.prev=function(e){t.proxy(this._overrides.to,this._core)(this.getPosition(!1),e)},n.prototype.to=function(e,i,s){var n;!s&&this._pages.length?(n=this._pages.length,t.proxy(this._overrides.to,this._core)(this._pages[(e%n+n)%n].start,i)):t.proxy(this._overrides.to,this._core)(e,i)},t.fn.owlCarousel.Constructor.Plugins.Navigation=n}(window.Zepto||window.jQuery,window,document),function(t,e,i,s){"use strict";var n=function(i){this._core=i,this._hashes={},this.$element=this._core.$element,this._handlers={"initialized.owl.carousel":t.proxy(function(i){i.namespace&&"URLHash"===this._core.settings.startPosition&&t(e).trigger("hashchange.owl.navigation")},this),"prepared.owl.carousel":t.proxy(function(e){if(e.namespace){var i=t(e.content).find("[data-hash]").addBack("[data-hash]").attr("data-hash");if(!i)return;this._hashes[i]=e.content}},this),"changed.owl.carousel":t.proxy(function(i){if(i.namespace&&"position"===i.property.name){var s=this._core.items(this._core.relative(this._core.current())),n=t.map(this._hashes,function(t,e){return t===s?e:null}).join();if(!n||e.location.hash.slice(1)===n)return;e.location.hash=n}},this)},this._core.options=t.extend({},n.Defaults,this._core.options),this.$element.on(this._handlers),t(e).on("hashchange.owl.navigation",t.proxy(function(t){var i=e.location.hash.substring(1),s=this._core.$stage.children(),n=this._hashes[i]&&s.index(this._hashes[i]);void 0!==n&&n!==this._core.current()&&this._core.to(this._core.relative(n),!1,!0)},this))};n.Defaults={URLhashListener:!1},n.prototype.destroy=function(){var i,s;for(i in t(e).off("hashchange.owl.navigation"),this._handlers)this._core.$element.off(i,this._handlers[i]);for(s in Object.getOwnPropertyNames(this))"function"!=typeof this[s]&&(this[s]=null)},t.fn.owlCarousel.Constructor.Plugins.Hash=n}(window.Zepto||window.jQuery,window,document),function(t,e,i,s){var n=t("<support>").get(0).style,o="Webkit Moz O ms".split(" "),r={transition:{end:{WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd",transition:"transitionend"}},animation:{end:{WebkitAnimation:"webkitAnimationEnd",MozAnimation:"animationend",OAnimation:"oAnimationEnd",animation:"animationend"}}},a=function(){return!!c("transform")},h=function(){return!!c("perspective")},l=function(){return!!c("animation")};function c(e,i){var r=!1,a=e.charAt(0).toUpperCase()+e.slice(1);return t.each((e+" "+o.join(a+" ")+a).split(" "),function(t,e){if(n[e]!==s)return r=!i||e,!1}),r}function p(t){return c(t,!0)}(function(){return!!c("transition")})()&&(t.support.transition=new String(p("transition")),t.support.transition.end=r.transition.end[t.support.transition]),l()&&(t.support.animation=new String(p("animation")),t.support.animation.end=r.animation.end[t.support.animation]),a()&&(t.support.transform=new String(p("transform")),t.support.transform3d=h())}(window.Zepto||window.jQuery,window,document);
|
1 |
/**
|
2 |
+
* Owl Carousel v2.3.5 - UE3
|
3 |
* Copyright 2013-2018 David Deutsch
|
4 |
* Licensed under: SEE LICENSE IN https://github.com/OwlCarousel2/OwlCarousel2/blob/master/LICENSE
|
5 |
*/
|
6 |
/**
|
7 |
* Owl carousel
|
8 |
+
* @version 2.3.5
|
9 |
* @author Bartosz Wojciechowski
|
10 |
* @author David Deutsch
|
11 |
* @license The MIT License (MIT)
|
16 |
* @todo stagePadding calculate wrong active classes
|
17 |
*/
|
18 |
|
19 |
+
!function(t,e,i,s){function n(e,i){this.settings=null,this.options=t.extend({},n.Defaults,i),this.$element=t(e),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"]}},t.each(["onResize","onThrottledResize"],t.proxy(function(e,i){this._handlers[i]=t.proxy(this[i],this)},this)),t.each(n.Plugins,t.proxy(function(t,e){this._plugins[t.charAt(0).toLowerCase()+t.slice(1)]=new e(this)},this)),t.each(n.Workers,t.proxy(function(e,i){this._pipe.push({filter:i.filter,run:t.proxy(i.run,this)})},this)),this.setup(),this.initialize()}n.Defaults={items:3,loop:!1,center:!1,rewind:!1,checkVisibility:!0,setActiveClass:!0,setActiveClassOnMobile:!0,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:e,fallbackEasing:"swing",slideTransition:"",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"},n.Width={Default:"default",Inner:"inner",Outer:"outer"},n.Type={Event:"event",State:"state"},n.Plugins={},n.Workers=[{filter:["width","settings"],run:function(){this._width=this.$element.width()}},{filter:["width","items","settings"],run:function(t){t.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(t){var e=this.settings.margin||"",i=!this.settings.autoWidth,s=this.settings.rtl,n={width:"auto","margin-left":s?e:"","margin-right":s?"":e};!i&&this.$stage.children().css(n),t.css=n}},{filter:["width","items","settings"],run:function(t){var e=(this.width()/this.settings.items).toFixed(3)-this.settings.margin,i=null,s=this._items.length,n=!this.settings.autoWidth,o=[];for(t.items={merge:!1,width:e};s--;)i=this._mergers[s],i=this.settings.mergeFit&&Math.min(i,this.settings.items)||i,t.items.merge=i>1||t.items.merge,o[s]=n?e*i:this._items[s].width();this._widths=o}},{filter:["items","settings"],run:function(){var e=[],i=this._items,s=this.settings,n=Math.max(2*s.items,4),o=2*Math.ceil(i.length/2),r=s.loop&&i.length?s.rewind?n:Math.max(n,o):0,a="",h="";for(r/=2;r>0;)e.push(this.normalize(e.length/2,!0)),a+=i[e[e.length-1]][0].outerHTML,e.push(this.normalize(i.length-1-(e.length-1)/2,!0)),h=i[e[e.length-1]][0].outerHTML+h,r-=1;this._clones=e,t(a).addClass("cloned").appendTo(this.$stage),t(h).addClass("cloned").prependTo(this.$stage)}},{filter:["width","items","settings"],run:function(){for(var t=this.settings.rtl?1:-1,e=this._clones.length+this._items.length,i=-1,s=0,n=0,o=[];++i<e;)s=o[i-1]||0,n=this._widths[this.relative(i)]+this.settings.margin,o.push(s+n*t);this._coordinates=o}},{filter:["width","items","settings"],run:function(){var t=this.settings.stagePadding,e=this._coordinates,i={width:Math.ceil(Math.abs(e[e.length-1]))+2*t,"padding-left":t||"","padding-right":t||""};this.$stage.css(i)}},{filter:["width","items","settings"],run:function(t){var e=this._coordinates.length,i=!this.settings.autoWidth,s=this.$stage.children();if(i&&t.items.merge)for(;e--;)t.css.width=this._widths[this.relative(e)],s.eq(e).css(t.css);else i&&(t.css.width=t.items.width,s.css(t.css))}},{filter:["items"],run:function(){this._coordinates.length<1&&this.$stage.removeAttr("style")}},{filter:["width","items","settings"],run:function(t){t.current=t.current?this.$stage.children().index(t.current):0,t.current=Math.max(this.minimum(),Math.min(this.maximum(),t.current)),this.reset(t.current)}},{filter:["position"],run:function(){this.animate(this.coordinates(this._current))}},{filter:["width","position","items","settings"],run:function(){var t,e,i,s,n=this.settings.rtl?1:-1,o=2*this.settings.stagePadding,r=this.coordinates(this.current())+o,a=r+this.width()*n,h=[];for(i=0,s=this._coordinates.length;i<s;i++)t=this._coordinates[i-1]||0,e=Math.abs(this._coordinates[i])+o*n,(this.op(t,"<=",r)&&this.op(t,">",a)||this.op(e,"<",r)&&this.op(e,">",a))&&h.push(i);this.$stage.children(".active").removeClass("active"),this.$stage.children(":eq("+h.join("), :eq(")+")").addClass("active"),this.$stage.children(".center").removeClass("center"),this.settings.center&&this.$stage.children().eq(this.current()).addClass("center")}},{filter:["width","position","items","settings"],run:function(){if(this.settings.setActiveClass&&this.settings.setActiveClass){var t=!0;this.settings.setActiveClassOnMobile?1==this.$stage.children(".active").length&&(t=!0):this.settings.setActiveClassOnMobile||1==this.$stage.children(".active").length&&(t=!1),1==t?this.$stage.children().eq(this.current()).addClass("uc-active-item").siblings().removeClass("uc-active-item"):0==t&&this.$stage.children().removeClass("uc-active-item")}}}],n.prototype.initializeStage=function(){this.$stage=this.$element.find("."+this.settings.stageClass),this.$stage.length||(this.$element.addClass(this.options.loadingClass),this.$stage=t("<"+this.settings.stageElement+">",{class:this.settings.stageClass}).wrap(t("<div/>",{class:this.settings.stageOuterClass})),this.$element.append(this.$stage.parent()))},n.prototype.initializeItems=function(){var e=this.$element.find(".owl-item");if(e.length)return this._items=e.get().map(function(e){return t(e)}),this._mergers=this._items.map(function(){return 1}),void this.refresh();this.replace(this.$element.children().not(this.$stage.parent())),this.isVisible()?this.refresh():this.invalidate("width"),this.$element.removeClass(this.options.loadingClass).addClass(this.options.loadedClass)},n.prototype.initialize=function(){var t,e,i;(this.enter("initializing"),this.trigger("initialize"),this.$element.toggleClass(this.settings.rtlClass,this.settings.rtl),this.settings.autoWidth&&!this.is("pre-loading"))&&(t=this.$element.find("img"),e=this.settings.nestedItemSelector?"."+this.settings.nestedItemSelector:void 0,i=this.$element.children(e).width(),t.length&&i<=0&&this.preloadAutoWidthImages(t));this.initializeStage(),this.initializeItems(),this.registerEventHandlers(),this.leave("initializing"),this.trigger("initialized")},n.prototype.isVisible=function(){return!this.settings.checkVisibility||this.$element.is(":visible")},n.prototype.setup=function(){var e=this.viewport(),i=this.options.responsive,s=-1,n=null;i?(t.each(i,function(t){t<=e&&t>s&&(s=Number(t))}),"function"==typeof(n=t.extend({},this.options,i[s])).stagePadding&&(n.stagePadding=n.stagePadding()),delete n.responsive,n.responsiveClass&&this.$element.attr("class",this.$element.attr("class").replace(new RegExp("("+this.options.responsiveClass+"-)\\S+\\s","g"),"$1"+s))):n=t.extend({},this.options),this.trigger("change",{property:{name:"settings",value:n}}),this._breakpoint=s,this.settings=n,this.invalidate("settings"),this.trigger("changed",{property:{name:"settings",value:this.settings}})},n.prototype.optionsLogic=function(){this.settings.autoWidth&&(this.settings.stagePadding=!1,this.settings.merge=!1)},n.prototype.prepare=function(e){var i=this.trigger("prepare",{content:e});return i.data||(i.data=t("<"+this.settings.itemElement+"/>").addClass(this.options.itemClass).append(e)),this.trigger("prepared",{content:i.data}),i.data},n.prototype.update=function(){for(var e=0,i=this._pipe.length,s=t.proxy(function(t){return this[t]},this._invalidated),n={};e<i;)(this._invalidated.all||t.grep(this._pipe[e].filter,s).length>0)&&this._pipe[e].run(n),e++;this._invalidated={},!this.is("valid")&&this.enter("valid")},n.prototype.width=function(t){switch(t=t||n.Width.Default){case n.Width.Inner:case n.Width.Outer:return this._width;default:return this._width-2*this.settings.stagePadding+this.settings.margin}},n.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")},n.prototype.onThrottledResize=function(){e.clearTimeout(this.resizeTimer),this.resizeTimer=e.setTimeout(this._handlers.onResize,this.settings.responsiveRefreshRate)},n.prototype.onResize=function(){return!!this._items.length&&(this._width!==this.$element.width()&&(!!this.isVisible()&&(this.enter("resizing"),this.trigger("resize").isDefaultPrevented()?(this.leave("resizing"),!1):(this.invalidate("width"),this.refresh(),this.leave("resizing"),void this.trigger("resized")))))},n.prototype.registerEventHandlers=function(){t.support.transition&&this.$stage.on(t.support.transition.end+".owl.core",t.proxy(this.onTransitionEnd,this)),!1!==this.settings.responsive&&this.on(e,"resize",this._handlers.onThrottledResize),this.settings.mouseDrag&&(this.$element.addClass(this.options.dragClass),this.$stage.on("mousedown.owl.core",t.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",t.proxy(this.onDragStart,this)),this.$stage.on("touchcancel.owl.core",t.proxy(this.onDragEnd,this)))},n.prototype.onDragStart=function(e){var s=null;3!==e.which&&(t.support.transform?s={x:(s=this.$stage.css("transform").replace(/.*\(|\)| /g,"").split(","))[16===s.length?12:4],y:s[16===s.length?13:5]}:(s=this.$stage.position(),s={x:this.settings.rtl?s.left+this.$stage.width()-this.width()+this.settings.margin:s.left,y:s.top}),this.is("animating")&&(t.support.transform?this.animate(s.x):this.$stage.stop(),this.invalidate("position")),this.$element.toggleClass(this.options.grabClass,"mousedown"===e.type),this.speed(0),this._drag.time=(new Date).getTime(),this._drag.target=t(e.target),this._drag.stage.start=s,this._drag.stage.current=s,this._drag.pointer=this.pointer(e),t(i).on("mouseup.owl.core touchend.owl.core",t.proxy(this.onDragEnd,this)),t(i).one("mousemove.owl.core touchmove.owl.core",t.proxy(function(e){var s=this.difference(this._drag.pointer,this.pointer(e));t(i).on("mousemove.owl.core touchmove.owl.core",t.proxy(this.onDragMove,this)),Math.abs(s.x)<Math.abs(s.y)&&this.is("valid")||(e.preventDefault(),this.enter("dragging"),this.trigger("drag"))},this)))},n.prototype.onDragMove=function(t){var e=null,i=null,s=null,n=this.difference(this._drag.pointer,this.pointer(t)),o=this.difference(this._drag.stage.start,n);this.is("dragging")&&(t.preventDefault(),this.settings.loop?(e=this.coordinates(this.minimum()),i=this.coordinates(this.maximum()+1)-e,o.x=((o.x-e)%i+i)%i+e):(e=this.settings.rtl?this.coordinates(this.maximum()):this.coordinates(this.minimum()),i=this.settings.rtl?this.coordinates(this.minimum()):this.coordinates(this.maximum()),s=this.settings.pullDrag?-1*n.x/5:0,o.x=Math.max(Math.min(o.x,e+s),i+s)),this._drag.stage.current=o,this.animate(o.x))},n.prototype.onDragEnd=function(e){var s=this.difference(this._drag.pointer,this.pointer(e)),n=this._drag.stage.current,o=s.x>0^this.settings.rtl?"left":"right";t(i).off(".owl.core"),this.$element.removeClass(this.options.grabClass),(0!==s.x&&this.is("dragging")||!this.is("valid"))&&(this.speed(this.settings.dragEndSpeed||this.settings.smartSpeed),this.current(this.closest(n.x,0!==s.x?o:this._drag.direction)),this.invalidate("position"),this.update(),this._drag.direction=o,(Math.abs(s.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"))},n.prototype.closest=function(e,i){var s=-1,n=this.width(),o=this.coordinates();return this.settings.freeDrag||t.each(o,t.proxy(function(t,r){return"left"===i&&e>r-30&&e<r+30?s=t:"right"===i&&e>r-n-30&&e<r-n+30?s=t+1:this.op(e,"<",r)&&this.op(e,">",void 0!==o[t+1]?o[t+1]:r-n)&&(s="left"===i?t+1:t),-1===s},this)),this.settings.loop||(this.op(e,">",o[this.minimum()])?s=e=this.minimum():this.op(e,"<",o[this.maximum()])&&(s=e=this.maximum())),s},n.prototype.animate=function(e){var i=this.speed()>0;this.is("animating")&&this.onTransitionEnd(),i&&(this.enter("animating"),this.trigger("translate")),t.support.transform3d&&t.support.transition?this.$stage.css({transform:"translate3d("+e+"px,0px,0px)",transition:this.speed()/1e3+"s"+(this.settings.slideTransition?" "+this.settings.slideTransition:"")}):i?this.$stage.animate({left:e+"px"},this.speed(),this.settings.fallbackEasing,t.proxy(this.onTransitionEnd,this)):this.$stage.css({left:e+"px"})},n.prototype.is=function(t){return this._states.current[t]&&this._states.current[t]>0},n.prototype.current=function(t){if(void 0===t)return this._current;if(0!==this._items.length){if(t=this.normalize(t),this._current!==t){var e=this.trigger("change",{property:{name:"position",value:t}});void 0!==e.data&&(t=this.normalize(e.data)),this._current=t,this.invalidate("position"),this.trigger("changed",{property:{name:"position",value:this._current}})}return this._current}},n.prototype.invalidate=function(e){return"string"===t.type(e)&&(this._invalidated[e]=!0,this.is("valid")&&this.leave("valid")),t.map(this._invalidated,function(t,e){return e})},n.prototype.reset=function(t){void 0!==(t=this.normalize(t))&&(this._speed=0,this._current=t,this.suppress(["translate","translated"]),this.animate(this.coordinates(t)),this.release(["translate","translated"]))},n.prototype.normalize=function(t,e){var i=this._items.length,s=e?0:this._clones.length;return!this.isNumeric(t)||i<1?t=void 0:(t<0||t>=i+s)&&(t=((t-s/2)%i+i)%i+s/2),t},n.prototype.relative=function(t){return t-=this._clones.length/2,this.normalize(t,!0)},n.prototype.maximum=function(t){var e,i,s,n=this.settings,o=this._coordinates.length;if(n.loop)o=this._clones.length/2+this._items.length-1;else if(n.autoWidth||n.merge){if(e=this._items.length)for(i=this._items[--e].width(),s=this.$element.width();e--&&!((i+=this._items[e].width()+this.settings.margin)>s););o=e+1}else o=n.center?this._items.length-1:this._items.length-n.items;return t&&(o-=this._clones.length/2),Math.max(o,0)},n.prototype.minimum=function(t){return t?0:this._clones.length/2},n.prototype.items=function(t){return void 0===t?this._items.slice():(t=this.normalize(t,!0),this._items[t])},n.prototype.mergers=function(t){return void 0===t?this._mergers.slice():(t=this.normalize(t,!0),this._mergers[t])},n.prototype.clones=function(e){var i=this._clones.length/2,s=i+this._items.length,n=function(t){return t%2==0?s+t/2:i-(t+1)/2};return void 0===e?t.map(this._clones,function(t,e){return n(e)}):t.map(this._clones,function(t,i){return t===e?n(i):null})},n.prototype.speed=function(t){return void 0!==t&&(this._speed=t),this._speed},n.prototype.coordinates=function(e){var i,s=1,n=e-1;return void 0===e?t.map(this._coordinates,t.proxy(function(t,e){return this.coordinates(e)},this)):(this.settings.center?(this.settings.rtl&&(s=-1,n=e+1),i=this._coordinates[e],i+=(this.width()-i+(this._coordinates[n]||0))/2*s):i=this._coordinates[n]||0,i=Math.ceil(i))},n.prototype.duration=function(t,e,i){return 0===i?0:Math.min(Math.max(Math.abs(e-t),1),6)*Math.abs(i||this.settings.smartSpeed)},n.prototype.to=function(t,e){var i=this.current(),s=null,n=t-this.relative(i),o=(n>0)-(n<0),r=this._items.length,a=this.minimum(),h=this.maximum();this.settings.loop?(!this.settings.rewind&&Math.abs(n)>r/2&&(n+=-1*o*r),(s=(((t=i+n)-a)%r+r)%r+a)!==t&&s-n<=h&&s-n>0&&(i=s-n,t=s,this.reset(i))):t=this.settings.rewind?(t%(h+=1)+h)%h:Math.max(a,Math.min(h,t)),this.speed(this.duration(i,t,e)),this.current(t),this.isVisible()&&this.update()},n.prototype.next=function(t){t=t||!1,this.to(this.relative(this.current())+1,t)},n.prototype.prev=function(t){t=t||!1,this.to(this.relative(this.current())-1,t)},n.prototype.onTransitionEnd=function(t){if(void 0!==t&&(t.stopPropagation(),(t.target||t.srcElement||t.originalTarget)!==this.$stage.get(0)))return!1;this.leave("animating"),this.trigger("translated")},n.prototype.viewport=function(){var s;return this.options.responsiveBaseElement!==e?s=t(this.options.responsiveBaseElement).width():e.innerWidth?s=e.innerWidth:i.documentElement&&i.documentElement.clientWidth?s=i.documentElement.clientWidth:console.warn("Can not detect viewport width."),s},n.prototype.replace=function(e){this.$stage.empty(),this._items=[],e&&(e=e instanceof jQuery?e:t(e)),this.settings.nestedItemSelector&&(e=e.find("."+this.settings.nestedItemSelector)),e.filter(function(){return 1===this.nodeType}).each(t.proxy(function(t,e){e=this.prepare(e),this.$stage.append(e),this._items.push(e),this._mergers.push(1*e.find("[data-merge]").addBack("[data-merge]").attr("data-merge")||1)},this)),this.reset(this.isNumeric(this.settings.startPosition)?this.settings.startPosition:0),this.invalidate("items")},n.prototype.add=function(e,i){var s=this.relative(this._current);i=void 0===i?this._items.length:this.normalize(i,!0),e=e instanceof jQuery?e:t(e),this.trigger("add",{content:e,position:i}),e=this.prepare(e),0===this._items.length||i===this._items.length?(0===this._items.length&&this.$stage.append(e),0!==this._items.length&&this._items[i-1].after(e),this._items.push(e),this._mergers.push(1*e.find("[data-merge]").addBack("[data-merge]").attr("data-merge")||1)):(this._items[i].before(e),this._items.splice(i,0,e),this._mergers.splice(i,0,1*e.find("[data-merge]").addBack("[data-merge]").attr("data-merge")||1)),this._items[s]&&this.reset(this._items[s].index()),this.invalidate("items"),this.trigger("added",{content:e,position:i})},n.prototype.remove=function(t){void 0!==(t=this.normalize(t,!0))&&(this.trigger("remove",{content:this._items[t],position:t}),this._items[t].remove(),this._items.splice(t,1),this._mergers.splice(t,1),this.invalidate("items"),this.trigger("removed",{content:null,position:t}))},n.prototype.preloadAutoWidthImages=function(e){e.each(t.proxy(function(e,i){this.enter("pre-loading"),i=t(i),t(new Image).one("load",t.proxy(function(t){i.attr("src",t.target.src),i.css("opacity",1),this.leave("pre-loading"),!this.is("pre-loading")&&!this.is("initializing")&&this.refresh()},this)).attr("src",i.attr("src")||i.attr("data-src")||i.attr("data-src-retina"))},this))},n.prototype.destroy=function(){for(var s in this.$element.off(".owl.core"),this.$stage.off(".owl.core"),t(i).off(".owl.core"),!1!==this.settings.responsive&&(e.clearTimeout(this.resizeTimer),this.off(e,"resize",this._handlers.onThrottledResize)),this._plugins)this._plugins[s].destroy();this.$stage.children(".cloned").remove(),this.$stage.unwrap(),this.$stage.children().contents().unwrap(),this.$stage.children().unwrap(),this.$stage.remove(),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")},n.prototype.op=function(t,e,i){var s=this.settings.rtl;switch(e){case"<":return s?t>i:t<i;case">":return s?t<i:t>i;case">=":return s?t<=i:t>=i;case"<=":return s?t>=i:t<=i}},n.prototype.on=function(t,e,i,s){t.addEventListener?t.addEventListener(e,i,s):t.attachEvent&&t.attachEvent("on"+e,i)},n.prototype.off=function(t,e,i,s){t.removeEventListener?t.removeEventListener(e,i,s):t.detachEvent&&t.detachEvent("on"+e,i)},n.prototype.trigger=function(e,i,s,o,r){var a={item:{count:this._items.length,index:this.current()}},h=t.camelCase(t.grep(["on",e,s],function(t){return t}).join("-").toLowerCase()),l=t.Event([e,"owl",s||"carousel"].join(".").toLowerCase(),t.extend({relatedTarget:this},a,i));return this._supress[e]||(t.each(this._plugins,function(t,e){e.onTrigger&&e.onTrigger(l)}),this.register({type:n.Type.Event,name:e}),this.$element.trigger(l),this.settings&&"function"==typeof this.settings[h]&&this.settings[h].call(this,l)),l},n.prototype.enter=function(e){t.each([e].concat(this._states.tags[e]||[]),t.proxy(function(t,e){void 0===this._states.current[e]&&(this._states.current[e]=0),this._states.current[e]++},this))},n.prototype.leave=function(e){t.each([e].concat(this._states.tags[e]||[]),t.proxy(function(t,e){this._states.current[e]--},this))},n.prototype.register=function(e){if(e.type===n.Type.Event){if(t.event.special[e.name]||(t.event.special[e.name]={}),!t.event.special[e.name].owl){var i=t.event.special[e.name]._default;t.event.special[e.name]._default=function(t){return!i||!i.apply||t.namespace&&-1!==t.namespace.indexOf("owl")?t.namespace&&t.namespace.indexOf("owl")>-1:i.apply(this,arguments)},t.event.special[e.name].owl=!0}}else e.type===n.Type.State&&(this._states.tags[e.name]?this._states.tags[e.name]=this._states.tags[e.name].concat(e.tags):this._states.tags[e.name]=e.tags,this._states.tags[e.name]=t.grep(this._states.tags[e.name],t.proxy(function(i,s){return t.inArray(i,this._states.tags[e.name])===s},this)))},n.prototype.suppress=function(e){t.each(e,t.proxy(function(t,e){this._supress[e]=!0},this))},n.prototype.release=function(e){t.each(e,t.proxy(function(t,e){delete this._supress[e]},this))},n.prototype.pointer=function(t){var i={x:null,y:null};return(t=(t=t.originalEvent||t||e.event).touches&&t.touches.length?t.touches[0]:t.changedTouches&&t.changedTouches.length?t.changedTouches[0]:t).pageX?(i.x=t.pageX,i.y=t.pageY):(i.x=t.clientX,i.y=t.clientY),i},n.prototype.isNumeric=function(t){return!isNaN(parseFloat(t))},n.prototype.difference=function(t,e){return{x:t.x-e.x,y:t.y-e.y}},t.fn.owlCarousel=function(e){var i=Array.prototype.slice.call(arguments,1);return this.each(function(){var s=t(this),o=s.data("owl.carousel");o||(o=new n(this,"object"==typeof e&&e),s.data("owl.carousel",o),t.each(["next","prev","to","destroy","refresh","replace","add","remove"],function(e,i){o.register({type:n.Type.Event,name:i}),o.$element.on(i+".owl.carousel.core",t.proxy(function(t){t.namespace&&t.relatedTarget!==this&&(this.suppress([i]),o[i].apply(this,[].slice.call(arguments,1)),this.release([i]))},o))})),"string"==typeof e&&"_"!==e.charAt(0)&&o[e].apply(o,i)})},t.fn.owlCarousel.Constructor=n}(window.Zepto||window.jQuery,window,document),function(t,e,i,s){var n=function(e){this._core=e,this._interval=null,this._visible=null,this._handlers={"initialized.owl.carousel":t.proxy(function(t){t.namespace&&this._core.settings.autoRefresh&&this.watch()},this)},this._core.options=t.extend({},n.Defaults,this._core.options),this._core.$element.on(this._handlers)};n.Defaults={autoRefresh:!0,autoRefreshInterval:500},n.prototype.watch=function(){this._interval||(this._visible=this._core.isVisible(),this._interval=e.setInterval(t.proxy(this.refresh,this),this._core.settings.autoRefreshInterval))},n.prototype.refresh=function(){this._core.isVisible()!==this._visible&&(this._visible=!this._visible,this._core.$element.toggleClass("owl-hidden",!this._visible),this._visible&&this._core.invalidate("width")&&this._core.refresh())},n.prototype.destroy=function(){var t,i;for(t in e.clearInterval(this._interval),this._handlers)this._core.$element.off(t,this._handlers[t]);for(i in Object.getOwnPropertyNames(this))"function"!=typeof this[i]&&(this[i]=null)},t.fn.owlCarousel.Constructor.Plugins.AutoRefresh=n}(window.Zepto||window.jQuery,window,document),function(t,e,i,s){var n=function(e){this._core=e,this._loaded=[],this._handlers={"initialized.owl.carousel change.owl.carousel resized.owl.carousel":t.proxy(function(e){if(e.namespace&&this._core.settings&&this._core.settings.lazyLoad&&(e.property&&"position"==e.property.name||"initialized"==e.type)){var i=this._core.settings,s=i.center&&Math.ceil(i.items/2)||i.items,n=i.center&&-1*s||0,o=(e.property&&void 0!==e.property.value?e.property.value:this._core.current())+n,r=this._core.clones().length,a=t.proxy(function(t,e){this.load(e)},this);for(i.lazyLoadEager>0&&(s+=i.lazyLoadEager,i.loop&&(o-=i.lazyLoadEager,s++));n++<s;)this.load(r/2+this._core.relative(o)),r&&t.each(this._core.clones(this._core.relative(o)),a),o++}},this)},this._core.options=t.extend({},n.Defaults,this._core.options),this._core.$element.on(this._handlers)};n.Defaults={lazyLoad:!1,lazyLoadEager:0},n.prototype.load=function(i){var s=this._core.$stage.children().eq(i),n=s&&s.find(".owl-lazy");!n||t.inArray(s.get(0),this._loaded)>-1||(n.each(t.proxy(function(i,s){var n,o=t(s),r=e.devicePixelRatio>1&&o.attr("data-src-retina")||o.attr("data-src")||o.attr("data-srcset");this._core.trigger("load",{element:o,url:r},"lazy"),o.is("img")?o.one("load.owl.lazy",t.proxy(function(){o.css("opacity",1),this._core.trigger("loaded",{element:o,url:r},"lazy")},this)).attr("src",r):o.is("source")?o.one("load.owl.lazy",t.proxy(function(){this._core.trigger("loaded",{element:o,url:r},"lazy")},this)).attr("srcset",r):((n=new Image).onload=t.proxy(function(){o.css({"background-image":'url("'+r+'")',opacity:"1"}),this._core.trigger("loaded",{element:o,url:r},"lazy")},this),n.src=r)},this)),this._loaded.push(s.get(0)))},n.prototype.destroy=function(){var t,e;for(t in this.handlers)this._core.$element.off(t,this.handlers[t]);for(e in Object.getOwnPropertyNames(this))"function"!=typeof this[e]&&(this[e]=null)},t.fn.owlCarousel.Constructor.Plugins.Lazy=n}(window.Zepto||window.jQuery,window,document),function(t,e,i,s){var n=function(i){this._core=i,this._previousHeight=null,this._handlers={"initialized.owl.carousel refreshed.owl.carousel":t.proxy(function(t){t.namespace&&this._core.settings.autoHeight&&this.update()},this),"changed.owl.carousel":t.proxy(function(t){t.namespace&&this._core.settings.autoHeight&&"position"===t.property.name&&this.update()},this),"loaded.owl.lazy":t.proxy(function(t){t.namespace&&this._core.settings.autoHeight&&t.element.closest("."+this._core.settings.itemClass).index()===this._core.current()&&this.update()},this)},this._core.options=t.extend({},n.Defaults,this._core.options),this._core.$element.on(this._handlers),this._intervalId=null;var s=this;t(e).on("load",function(){s._core.settings.autoHeight&&s.update()}),t(e).resize(function(){s._core.settings.autoHeight&&(null!=s._intervalId&&clearTimeout(s._intervalId),s._intervalId=setTimeout(function(){s.update()},250))})};n.Defaults={autoHeight:!1,autoHeightClass:"owl-height"},n.prototype.update=function(){var e=this._core._current,i=e+this._core.settings.items,s=this._core.settings.lazyLoad,n=this._core.$stage.children().toArray().slice(e,i),o=[],r=0;t.each(n,function(e,i){o.push(t(i).height())}),(r=Math.max.apply(null,o))<=1&&s&&this._previousHeight&&(r=this._previousHeight),this._previousHeight=r,this._core.$stage.parent().height(r).addClass(this._core.settings.autoHeightClass)},n.prototype.destroy=function(){var t,e;for(t in this._handlers)this._core.$element.off(t,this._handlers[t]);for(e in Object.getOwnPropertyNames(this))"function"!=typeof this[e]&&(this[e]=null)},t.fn.owlCarousel.Constructor.Plugins.AutoHeight=n}(window.Zepto||window.jQuery,window,document),function(t,e,i,s){var n=function(e){this._core=e,this._videos={},this._playing=null,this._handlers={"initialized.owl.carousel":t.proxy(function(t){t.namespace&&this._core.register({type:"state",name:"playing",tags:["interacting"]})},this),"resize.owl.carousel":t.proxy(function(t){t.namespace&&this._core.settings.video&&this.isInFullScreen()&&t.preventDefault()},this),"refreshed.owl.carousel":t.proxy(function(t){t.namespace&&this._core.is("resizing")&&this._core.$stage.find(".cloned .owl-video-frame").remove()},this),"changed.owl.carousel":t.proxy(function(t){t.namespace&&"position"===t.property.name&&this._playing&&this.stop()},this),"prepared.owl.carousel":t.proxy(function(e){if(e.namespace){var i=t(e.content).find(".owl-video");i.length&&(i.css("display","none"),this.fetch(i,t(e.content)))}},this)},this._core.options=t.extend({},n.Defaults,this._core.options),this._core.$element.on(this._handlers),this._core.$element.on("click.owl.video",".owl-video-play-icon",t.proxy(function(t){this.play(t)},this))};n.Defaults={video:!1,videoHeight:!1,videoWidth:!1},n.prototype.fetch=function(t,e){var i=t.attr("data-vimeo-id")?"vimeo":t.attr("data-vzaar-id")?"vzaar":"youtube",s=t.attr("data-vimeo-id")||t.attr("data-youtube-id")||t.attr("data-vzaar-id"),n=t.attr("data-width")||this._core.settings.videoWidth,o=t.attr("data-height")||this._core.settings.videoHeight,r=t.attr("href");if(!r)throw new Error("Missing video URL.");if((s=r.match(/(http:|https:|)\/\/(player.|www.|app.)?(vimeo\.com|youtu(be\.com|\.be|be\.googleapis\.com|be\-nocookie\.com)|vzaar\.com)\/(video\/|videos\/|embed\/|channels\/.+\/|groups\/.+\/|watch\?v=|v\/)?([A-Za-z0-9._%-]*)(\&\S+)?/))[3].indexOf("youtu")>-1)i="youtube";else if(s[3].indexOf("vimeo")>-1)i="vimeo";else{if(!(s[3].indexOf("vzaar")>-1))throw new Error("Video URL not supported.");i="vzaar"}s=s[6],this._videos[r]={type:i,id:s,width:n,height:o},e.attr("data-video",r),this.thumbnail(t,this._videos[r])},n.prototype.thumbnail=function(e,i){var s,n,o=i.width&&i.height?"width:"+i.width+"px;height:"+i.height+"px;":"",r=e.find("img"),a="src",h="",l=this._core.settings,c=function(i){'<div class="owl-video-play-icon"></div>',s=l.lazyLoad?t("<div/>",{class:"owl-video-tn "+h,srcType:i}):t("<div/>",{class:"owl-video-tn",style:"opacity:1;background-image:url("+i+")"}),e.after(s),e.after('<div class="owl-video-play-icon"></div>')};if(e.wrap(t("<div/>",{class:"owl-video-wrapper",style:o})),this._core.settings.lazyLoad&&(a="data-src",h="owl-lazy"),r.length)return c(r.attr(a)),r.remove(),!1;"youtube"===i.type?(n="//img.youtube.com/vi/"+i.id+"/hqdefault.jpg",c(n)):"vimeo"===i.type?t.ajax({type:"GET",url:"//vimeo.com/api/v2/video/"+i.id+".json",jsonp:"callback",dataType:"jsonp",success:function(t){n=t[0].thumbnail_large,c(n)}}):"vzaar"===i.type&&t.ajax({type:"GET",url:"//vzaar.com/api/videos/"+i.id+".json",jsonp:"callback",dataType:"jsonp",success:function(t){n=t.framegrab_url,c(n)}})},n.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")},n.prototype.play=function(e){var i,s=t(e.target).closest("."+this._core.settings.itemClass),n=this._videos[s.attr("data-video")],o=n.width||"100%",r=n.height||this._core.$stage.height();this._playing||(this._core.enter("playing"),this._core.trigger("play",null,"video"),s=this._core.items(this._core.relative(s.index())),this._core.reset(s.index()),(i=t('<iframe frameborder="0" allowfullscreen mozallowfullscreen webkitAllowFullScreen ></iframe>')).attr("height",r),i.attr("width",o),"youtube"===n.type?i.attr("src","//www.youtube.com/embed/"+n.id+"?autoplay=1&rel=0&v="+n.id):"vimeo"===n.type?i.attr("src","//player.vimeo.com/video/"+n.id+"?autoplay=1"):"vzaar"===n.type&&i.attr("src","//view.vzaar.com/"+n.id+"/player?autoplay=true"),t(i).wrap('<div class="owl-video-frame" />').insertAfter(s.find(".owl-video")),this._playing=s.addClass("owl-video-playing"))},n.prototype.isInFullScreen=function(){var e=i.fullscreenElement||i.mozFullScreenElement||i.webkitFullscreenElement;return e&&t(e).parent().hasClass("owl-video-frame")},n.prototype.destroy=function(){var t,e;for(t in this._core.$element.off("click.owl.video"),this._handlers)this._core.$element.off(t,this._handlers[t]);for(e in Object.getOwnPropertyNames(this))"function"!=typeof this[e]&&(this[e]=null)},t.fn.owlCarousel.Constructor.Plugins.Video=n}(window.Zepto||window.jQuery,window,document),function(t,e,i,s){var n=function(e){this.core=e,this.core.options=t.extend({},n.Defaults,this.core.options),this.swapping=!0,this.previous=void 0,this.next=void 0,this.handlers={"change.owl.carousel":t.proxy(function(t){t.namespace&&"position"==t.property.name&&(this.previous=this.core.current(),this.next=t.property.value)},this),"drag.owl.carousel dragged.owl.carousel translated.owl.carousel":t.proxy(function(t){t.namespace&&(this.swapping="translated"==t.type)},this),"translate.owl.carousel":t.proxy(function(t){t.namespace&&this.swapping&&(this.core.options.animateOut||this.core.options.animateIn)&&this.swap()},this)},this.core.$element.on(this.handlers)};n.Defaults={animateOut:!1,animateIn:!1},n.prototype.swap=function(){if(1===this.core.settings.items&&t.support.animation&&t.support.transition){this.core.speed(0);var e,i=t.proxy(this.clear,this),s=this.core.$stage.children().eq(this.previous),n=this.core.$stage.children().eq(this.next),o=this.core.settings.animateIn,r=this.core.settings.animateOut;this.core.current()!==this.previous&&(r&&(e=this.core.coordinates(this.previous)-this.core.coordinates(this.next),s.one(t.support.animation.end,i).css({left:e+"px"}).addClass("animated owl-animated-out").addClass(r)),o&&n.one(t.support.animation.end,i).addClass("animated owl-animated-in").addClass(o))}},n.prototype.clear=function(e){t(e.target).css({left:""}).removeClass("animated owl-animated-out owl-animated-in").removeClass(this.core.settings.animateIn).removeClass(this.core.settings.animateOut),this.core.onTransitionEnd()},n.prototype.destroy=function(){var t,e;for(t in this.handlers)this.core.$element.off(t,this.handlers[t]);for(e in Object.getOwnPropertyNames(this))"function"!=typeof this[e]&&(this[e]=null)},t.fn.owlCarousel.Constructor.Plugins.Animate=n}(window.Zepto||window.jQuery,window,document),function(t,e,i,s){var n=function(e){this._core=e,this._call=null,this._time=0,this._timeout=0,this._paused=!0,this._handlers={"changed.owl.carousel":t.proxy(function(t){t.namespace&&"settings"===t.property.name?this._core.settings.autoplay?this.play():this.stop():t.namespace&&"position"===t.property.name&&this._paused&&(this._time=0)},this),"initialized.owl.carousel":t.proxy(function(t){t.namespace&&this._core.settings.autoplay&&this.play()},this),"play.owl.autoplay":t.proxy(function(t,e,i){t.namespace&&this.play(e,i)},this),"stop.owl.autoplay":t.proxy(function(t){t.namespace&&this.stop()},this),"mouseover.owl.autoplay":t.proxy(function(){this._core.settings.autoplayHoverPause&&this._core.is("rotating")&&this.pause()},this),"mouseleave.owl.autoplay":t.proxy(function(){this._core.settings.autoplayHoverPause&&this._core.is("rotating")&&this.play()},this),"touchstart.owl.core":t.proxy(function(){this._core.settings.autoplayHoverPause&&this._core.is("rotating")&&this.pause()},this),"touchend.owl.core":t.proxy(function(){this._core.settings.autoplayHoverPause&&this.play()},this)},this._core.$element.on(this._handlers),this._core.options=t.extend({},n.Defaults,this._core.options)};n.Defaults={autoplay:!1,autoplayTimeout:5e3,autoplayHoverPause:!1,autoplaySpeed:!1},n.prototype._next=function(s){this._call=e.setTimeout(t.proxy(this._next,this,s),this._timeout*(Math.round(this.read()/this._timeout)+1)-this.read()),this._core.is("interacting")||i.hidden||this._core.next(s||this._core.settings.autoplaySpeed)},n.prototype.read=function(){return(new Date).getTime()-this._time},n.prototype.play=function(i,s){var n;this._core.is("rotating")||this._core.enter("rotating"),i=i||this._core.settings.autoplayTimeout,n=Math.min(this._time%(this._timeout||i),i),this._paused?(this._time=this.read(),this._paused=!1):e.clearTimeout(this._call),this._time+=this.read()%i-n,this._timeout=i,this._call=e.setTimeout(t.proxy(this._next,this,s),i-n)},n.prototype.stop=function(){this._core.is("rotating")&&(this._time=0,this._paused=!0,e.clearTimeout(this._call),this._core.leave("rotating"))},n.prototype.pause=function(){this._core.is("rotating")&&!this._paused&&(this._time=this.read(),this._paused=!0,e.clearTimeout(this._call))},n.prototype.destroy=function(){var t,e;for(t in this.stop(),this._handlers)this._core.$element.off(t,this._handlers[t]);for(e in Object.getOwnPropertyNames(this))"function"!=typeof this[e]&&(this[e]=null)},t.fn.owlCarousel.Constructor.Plugins.autoplay=n}(window.Zepto||window.jQuery,window,document),function(t,e,i,s){"use strict";var n=function(e){this._core=e,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":t.proxy(function(e){e.namespace&&this._core.settings.dotsData&&this._templates.push('<div class="'+this._core.settings.dotClass+'">'+t(e.content).find("[data-dot]").addBack("[data-dot]").attr("data-dot")+"</div>")},this),"added.owl.carousel":t.proxy(function(t){t.namespace&&this._core.settings.dotsData&&this._templates.splice(t.position,0,this._templates.pop())},this),"remove.owl.carousel":t.proxy(function(t){t.namespace&&this._core.settings.dotsData&&this._templates.splice(t.position,1)},this),"changed.owl.carousel":t.proxy(function(t){t.namespace&&"position"==t.property.name&&this.draw()},this),"initialized.owl.carousel":t.proxy(function(t){t.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":t.proxy(function(t){t.namespace&&this._initialized&&(this._core.trigger("refresh",null,"navigation"),this.update(),this.draw(),this._core.trigger("refreshed",null,"navigation"))},this)},this._core.options=t.extend({},n.Defaults,this._core.options),this.$element.on(this._handlers)};n.Defaults={nav:!1,navText:['<span aria-label="Previous">‹</span>','<span aria-label="Next">›</span>'],navSpeed:!1,navElement:'button type="button" role="presentation"',navContainer:!1,navContainerClass:"owl-nav",navClass:["owl-prev","owl-next"],slideBy:1,changeItemOnClick:!1,dotClass:"owl-dot",dotsClass:"owl-dots",dots:!0,dotsEach:!1,dotsData:!1,dotsSpeed:!1,dotsContainer:!1},n.prototype.initialize=function(){var e,i=this._core.settings;if(this._controls.$relative=(i.navContainer?t(i.navContainer):t("<div>").addClass(i.navContainerClass).appendTo(this.$element)).addClass("disabled"),this._controls.$previous=t("<"+i.navElement+' value="previous item">').addClass(i.navClass[0]).html(i.navText[0]).prependTo(this._controls.$relative).on("click",t.proxy(function(t){this.prev(i.navSpeed)},this)),this._controls.$next=t("<"+i.navElement+' value="next item">').addClass(i.navClass[1]).html(i.navText[1]).appendTo(this._controls.$relative).on("click",t.proxy(function(t){this.next(i.navSpeed)},this)),i.changeItemOnClick){var s=this._core.$stage.children(),n=this._core.clones().length/2;s.on("click",t.proxy(function(e){var s=t(e.currentTarget).index();this.to(s-n,i.navSpeed,!0)},this))}for(e in i.dotsData||(this._templates=[t('<button role="button">').addClass(i.dotClass).append(t("<span>")).prop("outerHTML")]),this._controls.$absolute=(i.dotsContainer?t(i.dotsContainer):t("<div>").addClass(i.dotsClass).appendTo(this.$element)).addClass("disabled"),this._controls.$absolute.on("click","button",t.proxy(function(e){var s=t(e.target).parent().is(this._controls.$absolute)?t(e.target).index():t(e.target).parent().index();console.log(t(e.target).index()),e.preventDefault(),this.to(s,i.dotsSpeed)},this)),this._overrides)this._core[e]=t.proxy(this[e],this)},n.prototype.destroy=function(){var t,e,i,s,n;for(t in n=this._core.settings,this._handlers)this.$element.off(t,this._handlers[t]);for(e in this._controls)"$relative"===e&&n.navContainer?this._controls[e].html(""):this._controls[e].remove();for(s in this.overides)this._core[s]=this._overrides[s];for(i in Object.getOwnPropertyNames(this))"function"!=typeof this[i]&&(this[i]=null)},n.prototype.update=function(){var t,e,i=this._core.clones().length/2,s=i+this._core.items().length,n=this._core.maximum(!0),o=this._core.settings,r=o.center||o.autoWidth||o.dotsData?1:o.dotsEach||o.items;if("page"!==o.slideBy&&(o.slideBy=Math.min(o.slideBy,o.items)),o.dots||"page"==o.slideBy)for(this._pages=[],t=i,e=0,0;t<s;t++){if(e>=r||0===e){if(this._pages.push({start:Math.min(n,t-i),end:t-i+r-1}),Math.min(n,t-i)===n)break;e=0,0}e+=this._core.mergers(this._core.relative(t))}},n.prototype.draw=function(){var e,i=this._core.settings,s=this._core.items().length<=i.items,n=this._core.relative(this._core.current()),o=i.loop||i.rewind;this._controls.$relative.toggleClass("disabled",!i.nav||s),i.nav&&(this._controls.$previous.toggleClass("disabled",!o&&n<=this._core.minimum(!0)),this._controls.$next.toggleClass("disabled",!o&&n>=this._core.maximum(!0))),this._controls.$absolute.toggleClass("disabled",!i.dots||s),i.dots&&(e=this._pages.length-this._controls.$absolute.children().length,i.dotsData&&0!==e?this._controls.$absolute.html(this._templates.join("")):e>0?this._controls.$absolute.append(new Array(e+1).join(this._templates[0])):e<0&&this._controls.$absolute.children().slice(e).remove(),this._controls.$absolute.find(".active").removeClass("active"),this._controls.$absolute.children().eq(t.inArray(this.current(),this._pages)).addClass("active"))},n.prototype.onTrigger=function(e){var i=this._core.settings;e.page={index:t.inArray(this.current(),this._pages),count:this._pages.length,size:i&&(i.center||i.autoWidth||i.dotsData?1:i.dotsEach||i.items)}},n.prototype.current=function(){var e=this._core.relative(this._core.current());return t.grep(this._pages,t.proxy(function(t,i){return t.start<=e&&t.end>=e},this)).pop()},n.prototype.getPosition=function(e){var i,s,n=this._core.settings;return"page"==n.slideBy?(i=t.inArray(this.current(),this._pages),s=this._pages.length,e?++i:--i,i=this._pages[(i%s+s)%s].start):(i=this._core.relative(this._core.current()),s=this._core.items().length,e?i+=n.slideBy:i-=n.slideBy),i},n.prototype.next=function(e){t.proxy(this._overrides.to,this._core)(this.getPosition(!0),e)},n.prototype.prev=function(e){t.proxy(this._overrides.to,this._core)(this.getPosition(!1),e)},n.prototype.to=function(e,i,s){var n;!s&&this._pages.length?(n=this._pages.length,t.proxy(this._overrides.to,this._core)(this._pages[(e%n+n)%n].start,i)):t.proxy(this._overrides.to,this._core)(e,i)},t.fn.owlCarousel.Constructor.Plugins.Navigation=n}(window.Zepto||window.jQuery,window,document),function(t,e,i,s){"use strict";var n=function(i){this._core=i,this._hashes={},this.$element=this._core.$element,this._handlers={"initialized.owl.carousel":t.proxy(function(i){i.namespace&&"URLHash"===this._core.settings.startPosition&&t(e).trigger("hashchange.owl.navigation")},this),"prepared.owl.carousel":t.proxy(function(e){if(e.namespace){var i=t(e.content).find("[data-hash]").addBack("[data-hash]").attr("data-hash");if(!i)return;this._hashes[i]=e.content}},this),"changed.owl.carousel":t.proxy(function(i){if(i.namespace&&"position"===i.property.name){var s=this._core.items(this._core.relative(this._core.current())),n=t.map(this._hashes,function(t,e){return t===s?e:null}).join();if(!n||e.location.hash.slice(1)===n)return;e.location.hash=n}},this)},this._core.options=t.extend({},n.Defaults,this._core.options),this.$element.on(this._handlers),t(e).on("hashchange.owl.navigation",t.proxy(function(t){var i=e.location.hash.substring(1),s=this._core.$stage.children(),n=this._hashes[i]&&s.index(this._hashes[i]);void 0!==n&&n!==this._core.current()&&this._core.to(this._core.relative(n),!1,!0)},this))};n.Defaults={URLhashListener:!1},n.prototype.destroy=function(){var i,s;for(i in t(e).off("hashchange.owl.navigation"),this._handlers)this._core.$element.off(i,this._handlers[i]);for(s in Object.getOwnPropertyNames(this))"function"!=typeof this[s]&&(this[s]=null)},t.fn.owlCarousel.Constructor.Plugins.Hash=n}(window.Zepto||window.jQuery,window,document),function(t,e,i,s){var n=t("<support>").get(0).style,o="Webkit Moz O ms".split(" "),r={transition:{end:{WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd",transition:"transitionend"}},animation:{end:{WebkitAnimation:"webkitAnimationEnd",MozAnimation:"animationend",OAnimation:"oAnimationEnd",animation:"animationend"}}},a=function(){return!!c("transform")},h=function(){return!!c("perspective")},l=function(){return!!c("animation")};function c(e,i){var r=!1,a=e.charAt(0).toUpperCase()+e.slice(1);return t.each((e+" "+o.join(a+" ")+a).split(" "),function(t,e){if(n[e]!==s)return r=!i||e,!1}),r}function p(t){return c(t,!0)}(function(){return!!c("transition")})()&&(t.support.transition=new String(p("transition")),t.support.transition.end=r.transition.end[t.support.transition]),l()&&(t.support.animation=new String(p("animation")),t.support.animation.end=r.animation.end[t.support.animation]),a()&&(t.support.transform=new String(p("transform")),t.support.transform3d=h())}(window.Zepto||window.jQuery,window,document);
|
inc_php/unitecreator_addon.class.php
CHANGED
@@ -2227,7 +2227,7 @@ defined('UNLIMITED_ELEMENTS_INC') or die('Restricted access');
|
|
2227 |
* type: main,items
|
2228 |
*/
|
2229 |
private function setParamsValuesWork($arrValues, $arrParams, $type){
|
2230 |
-
|
2231 |
$this->validateInited();
|
2232 |
|
2233 |
if(empty($arrValues))
|
@@ -2235,11 +2235,9 @@ defined('UNLIMITED_ELEMENTS_INC') or die('Restricted access');
|
|
2235 |
|
2236 |
if(!is_array($arrValues))
|
2237 |
UniteFunctionsUC::throwError("The values shoud be array");
|
2238 |
-
|
2239 |
-
|
2240 |
foreach($arrParams as $key => $param){
|
2241 |
|
2242 |
-
|
2243 |
$name = UniteFunctionsUC::getVal($param, "name");
|
2244 |
|
2245 |
if(empty($name))
|
@@ -2250,7 +2248,7 @@ defined('UNLIMITED_ELEMENTS_INC') or die('Restricted access');
|
|
2250 |
$type = UniteFunctionsUC::getVal($param, "type");
|
2251 |
|
2252 |
$value = UniteFunctionsUC::getVal($arrValues, $name, $defaultValue);
|
2253 |
-
|
2254 |
$value = $this->objProcessor->getSpecialParamValue($type, $name, $value, $arrValues);
|
2255 |
|
2256 |
$param["value"] = $value;
|
2227 |
* type: main,items
|
2228 |
*/
|
2229 |
private function setParamsValuesWork($arrValues, $arrParams, $type){
|
2230 |
+
|
2231 |
$this->validateInited();
|
2232 |
|
2233 |
if(empty($arrValues))
|
2235 |
|
2236 |
if(!is_array($arrValues))
|
2237 |
UniteFunctionsUC::throwError("The values shoud be array");
|
2238 |
+
|
|
|
2239 |
foreach($arrParams as $key => $param){
|
2240 |
|
|
|
2241 |
$name = UniteFunctionsUC::getVal($param, "name");
|
2242 |
|
2243 |
if(empty($name))
|
2248 |
$type = UniteFunctionsUC::getVal($param, "type");
|
2249 |
|
2250 |
$value = UniteFunctionsUC::getVal($arrValues, $name, $defaultValue);
|
2251 |
+
|
2252 |
$value = $this->objProcessor->getSpecialParamValue($type, $name, $value, $arrValues);
|
2253 |
|
2254 |
$param["value"] = $value;
|
inc_php/unitecreator_filters_process.class.php
CHANGED
@@ -21,13 +21,177 @@ class UniteCreatorFiltersProcess{
|
|
21 |
private static $isFilesAdded = false;
|
22 |
private static $isStyleAdded = false;
|
23 |
private static $isAjaxCache = null;
|
|
|
24 |
|
25 |
private static $showDebug = false;
|
26 |
private static $originalQueryVars = null;
|
|
|
27 |
|
28 |
const TYPE_TERMS = "terms";
|
29 |
|
30 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
31 |
/**
|
32 |
* get request array
|
33 |
*/
|
@@ -85,13 +249,24 @@ class UniteCreatorFiltersProcess{
|
|
85 |
$key = $arrFilter[0];
|
86 |
$strValues = $arrFilter[1];
|
87 |
|
88 |
-
$
|
89 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
90 |
$type = self::TYPE_TERMS;
|
91 |
|
92 |
switch($type){
|
93 |
case self::TYPE_TERMS:
|
94 |
-
$arrTerms[$key] = $
|
95 |
break;
|
96 |
}
|
97 |
|
@@ -101,7 +276,7 @@ class UniteCreatorFiltersProcess{
|
|
101 |
|
102 |
if(!empty($arrTerms))
|
103 |
$arrOutput[self::TYPE_TERMS] = $arrTerms;
|
104 |
-
|
105 |
return($arrOutput);
|
106 |
}
|
107 |
|
@@ -115,7 +290,7 @@ class UniteCreatorFiltersProcess{
|
|
115 |
return(self::$arrInputFiltersCache);
|
116 |
|
117 |
$request = $this->getArrRequest();
|
118 |
-
|
119 |
$strTerms = UniteFunctionsUC::getVal($request, "ucterms");
|
120 |
|
121 |
$arrOutput = array();
|
@@ -180,7 +355,7 @@ class UniteCreatorFiltersProcess{
|
|
180 |
}
|
181 |
|
182 |
self::$arrFiltersAssocCache = $output;
|
183 |
-
|
184 |
return($output);
|
185 |
}
|
186 |
|
@@ -205,29 +380,6 @@ class UniteCreatorFiltersProcess{
|
|
205 |
if(!empty($arrTerms))
|
206 |
self::$filters["terms"] = $arrTerms;
|
207 |
|
208 |
-
//collect term filters
|
209 |
-
|
210 |
-
/*
|
211 |
-
$arrFilterTerms = array();
|
212 |
-
|
213 |
-
foreach($arrTerms as $taxonomy=>$arrTerms){
|
214 |
-
|
215 |
-
$prefix = "";
|
216 |
-
if($taxonomy != "category")
|
217 |
-
$prefix = $taxonomy."--";
|
218 |
-
|
219 |
-
foreach($arrTerms as $term)
|
220 |
-
$arrFilterTerms[] = $prefix.$term;
|
221 |
-
}
|
222 |
-
|
223 |
-
//put to output
|
224 |
-
|
225 |
-
if(!empty($arrFilterTerms)){
|
226 |
-
self::$filters["category"] = $arrFilterTerms;
|
227 |
-
self::$filters["category_relation"] = "OR";
|
228 |
-
}
|
229 |
-
|
230 |
-
*/
|
231 |
|
232 |
//get the page
|
233 |
|
@@ -248,166 +400,6 @@ class UniteCreatorFiltersProcess{
|
|
248 |
}
|
249 |
|
250 |
|
251 |
-
/**
|
252 |
-
* check if under ajax request
|
253 |
-
*/
|
254 |
-
private function isUnderAjax(){
|
255 |
-
|
256 |
-
$ajaxAction = UniteFunctionsUC::getPostGetVariable("ucfrontajaxaction","",UniteFunctionsUC::SANITIZE_TEXT_FIELD);
|
257 |
-
|
258 |
-
if(!empty($ajaxAction))
|
259 |
-
return(true);
|
260 |
-
|
261 |
-
return(false);
|
262 |
-
}
|
263 |
-
|
264 |
-
|
265 |
-
/**
|
266 |
-
* get fitler url from the given slugs
|
267 |
-
*/
|
268 |
-
private function getUrlFilter_term($term, $taxonomyName){
|
269 |
-
|
270 |
-
$key = "filter-term";
|
271 |
-
|
272 |
-
$taxPrefix = $taxonomyName."--";
|
273 |
-
|
274 |
-
if($taxonomyName == "category"){
|
275 |
-
$taxPrefix = "";
|
276 |
-
$key="filter-category";
|
277 |
-
}
|
278 |
-
|
279 |
-
$slug = $term->slug;
|
280 |
-
|
281 |
-
$value = $taxPrefix.$slug;
|
282 |
-
|
283 |
-
$urlAddition = "{$key}=".urlencode($value);
|
284 |
-
|
285 |
-
$urlCurrent = GlobalsUC::$current_page_url;
|
286 |
-
|
287 |
-
$url = UniteFunctionsUC::addUrlParams($urlCurrent, $urlAddition);
|
288 |
-
|
289 |
-
return($url);
|
290 |
-
}
|
291 |
-
|
292 |
-
/**
|
293 |
-
* check if the term is acrive
|
294 |
-
*/
|
295 |
-
private function isTermActive($term, $arrActiveFilters = null){
|
296 |
-
|
297 |
-
if(empty($term))
|
298 |
-
return(false);
|
299 |
-
|
300 |
-
if($arrActiveFilters === null)
|
301 |
-
$arrActiveFilters = $this->getRequestFilters();
|
302 |
-
|
303 |
-
if(empty($arrActiveFilters))
|
304 |
-
return(false);
|
305 |
-
|
306 |
-
$taxonomy = $term->taxonomy;
|
307 |
-
|
308 |
-
$selectedTermID = UniteFunctionsUC::getVal($arrActiveFilters, $taxonomy);
|
309 |
-
|
310 |
-
if(empty($selectedTermID))
|
311 |
-
return(false);
|
312 |
-
|
313 |
-
if($selectedTermID === $term->term_id)
|
314 |
-
return(true);
|
315 |
-
|
316 |
-
return(false);
|
317 |
-
}
|
318 |
-
|
319 |
-
/**
|
320 |
-
* get current term by query vars
|
321 |
-
*/
|
322 |
-
private function getCurrentTermByQueryVars($queryVars){
|
323 |
-
|
324 |
-
if(is_array($queryVars) == false)
|
325 |
-
return(null);
|
326 |
-
|
327 |
-
if(empty($queryVars))
|
328 |
-
return(null);
|
329 |
-
|
330 |
-
if(count($queryVars) > 1)
|
331 |
-
return(null);
|
332 |
-
|
333 |
-
$postType = null;
|
334 |
-
if(isset($queryVars["post_type"])){
|
335 |
-
|
336 |
-
$postType = $queryVars["post_type"];
|
337 |
-
unset($queryVars["post_type"]);
|
338 |
-
}
|
339 |
-
|
340 |
-
$args = array();
|
341 |
-
if(!empty($postType))
|
342 |
-
$args["post_type"] = $postType;
|
343 |
-
|
344 |
-
if(!empty($queryVars)){
|
345 |
-
$taxonomy = null;
|
346 |
-
$slug = null;
|
347 |
-
|
348 |
-
foreach($queryVars as $queryTax=>$querySlug){
|
349 |
-
|
350 |
-
$taxonomy = $queryTax;
|
351 |
-
$slug = $querySlug;
|
352 |
-
}
|
353 |
-
|
354 |
-
$args = array();
|
355 |
-
$args["taxonomy"] = $taxonomy;
|
356 |
-
$args["slug"] = $slug;
|
357 |
-
}
|
358 |
-
|
359 |
-
$arrTerms = get_terms($args);
|
360 |
-
|
361 |
-
$isError = is_wp_error($arrTerms);
|
362 |
-
|
363 |
-
if($isError == true){
|
364 |
-
if(self::$showDebug == true){
|
365 |
-
|
366 |
-
dmp("error get terms");
|
367 |
-
dmp($args);
|
368 |
-
dmp($arrTerms);
|
369 |
-
}
|
370 |
-
|
371 |
-
UniteFunctionsUC::throwError("cannot get the terms");
|
372 |
-
}
|
373 |
-
|
374 |
-
if(empty($arrTerms))
|
375 |
-
return(null);
|
376 |
-
|
377 |
-
$term = $arrTerms[0];
|
378 |
-
|
379 |
-
return($term);
|
380 |
-
}
|
381 |
-
|
382 |
-
|
383 |
-
/**
|
384 |
-
* get current term
|
385 |
-
*/
|
386 |
-
private function getCurrentTerm(){
|
387 |
-
|
388 |
-
if(!empty(self::$currentTermCache))
|
389 |
-
return(self::$currentTermCache);
|
390 |
-
|
391 |
-
if(is_archive() == false)
|
392 |
-
return(null);
|
393 |
-
|
394 |
-
if(!empty(self::$originalQueryVars)){
|
395 |
-
|
396 |
-
$currentTerm = $this->getCurrentTermByQueryVars(self::$originalQueryVars);
|
397 |
-
}else{
|
398 |
-
$currentTerm = get_queried_object();
|
399 |
-
|
400 |
-
|
401 |
-
|
402 |
-
if($currentTerm instanceof WP_Term == false)
|
403 |
-
$currentTerm = null;
|
404 |
-
}
|
405 |
-
|
406 |
-
self::$currentTermCache = $currentTerm;
|
407 |
-
|
408 |
-
return($currentTerm);
|
409 |
-
}
|
410 |
-
|
411 |
private function _______FILTER_ARGS__________(){}
|
412 |
|
413 |
|
@@ -459,12 +451,32 @@ class UniteCreatorFiltersProcess{
|
|
459 |
|
460 |
foreach($arrTax as $taxonomy=>$arrTerms){
|
461 |
|
462 |
-
$
|
463 |
-
|
464 |
-
$
|
465 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
466 |
|
467 |
-
|
|
|
|
|
468 |
}
|
469 |
|
470 |
$arrQuery["relation"] = "AND";
|
@@ -474,32 +486,34 @@ class UniteCreatorFiltersProcess{
|
|
474 |
|
475 |
/**
|
476 |
* set arguments tax query, merge with existing if avaliable
|
477 |
-
* Enter description here ...
|
478 |
-
* @param unknown_type $arrTaxQuery
|
479 |
*/
|
480 |
private function setArgsTaxQuery($args, $arrTaxQuery){
|
481 |
|
482 |
if(empty($arrTaxQuery))
|
483 |
return($args);
|
484 |
-
|
485 |
$existingTaxQuery = UniteFunctionsUC::getVal($args, "tax_query");
|
|
|
|
|
|
|
|
|
486 |
|
487 |
if(empty($existingTaxQuery)){
|
488 |
|
489 |
$args["tax_query"] = $arrTaxQuery;
|
490 |
-
|
491 |
return($args);
|
492 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
493 |
|
494 |
-
foreach($arrTaxQuery as $key => $item){
|
495 |
-
|
496 |
-
if(is_numeric($key) == false)
|
497 |
-
$existingTaxQuery[$key] = $item;
|
498 |
-
else
|
499 |
-
$existingTaxQuery[] = $item;
|
500 |
-
}
|
501 |
|
502 |
-
$args["tax_query"] = $
|
503 |
|
504 |
return($args);
|
505 |
}
|
@@ -537,6 +551,7 @@ class UniteCreatorFiltersProcess{
|
|
537 |
|
538 |
}
|
539 |
|
|
|
540 |
if(self::DEBUG_FILTER == true){
|
541 |
dmp("debug!!!");
|
542 |
dmp($args);
|
@@ -644,6 +659,7 @@ class UniteCreatorFiltersProcess{
|
|
644 |
$arrSettingsValues = UniteFunctionsUC::getVal($arrElement, "settings");
|
645 |
|
646 |
$widgetName = str_replace("ucaddon_", "", $widgetType);
|
|
|
647 |
|
648 |
$addon = new UniteCreatorAddon();
|
649 |
$addon->initByAlias($widgetName, GlobalsUC::ADDON_TYPE_ELEMENTOR);
|
@@ -659,21 +675,17 @@ class UniteCreatorFiltersProcess{
|
|
659 |
|
660 |
$addon->setParamsValues($arrSettingsValues);
|
661 |
|
|
|
662 |
//------ get the html output
|
663 |
|
664 |
//collect the debug html
|
|
|
|
|
|
|
|
|
665 |
|
666 |
-
|
667 |
-
|
668 |
-
|
669 |
-
$objOutput = new UniteCreatorOutput();
|
670 |
-
$objOutput->initByAddon($addon);
|
671 |
-
|
672 |
-
if($isGrid == true){
|
673 |
-
$htmlDebug = ob_get_contents();
|
674 |
-
ob_end_clean();
|
675 |
-
}
|
676 |
-
|
677 |
|
678 |
$output = array();
|
679 |
|
@@ -693,9 +705,9 @@ class UniteCreatorFiltersProcess{
|
|
693 |
$output["html"] = $htmlBody;
|
694 |
}
|
695 |
|
696 |
-
if(
|
697 |
$output["html_debug"] = $htmlDebug;
|
698 |
-
|
699 |
return($output);
|
700 |
}
|
701 |
|
@@ -712,11 +724,19 @@ class UniteCreatorFiltersProcess{
|
|
712 |
|
713 |
$arrHTML = array();
|
714 |
|
|
|
|
|
715 |
foreach($arrIDs as $elementID){
|
716 |
|
717 |
$output = $this->getContentWidgetHtml($arrContent, $elementID, false);
|
718 |
|
|
|
|
|
719 |
$html = UniteFunctionsUC::getVal($output, "html");
|
|
|
|
|
|
|
|
|
720 |
|
721 |
$arrHTML[$elementID] = $html;
|
722 |
}
|
@@ -727,7 +747,7 @@ class UniteCreatorFiltersProcess{
|
|
727 |
/**
|
728 |
* get init filtres taxonomy request
|
729 |
*/
|
730 |
-
private function
|
731 |
|
732 |
$posLimit = strpos($request, "LIMIT");
|
733 |
|
@@ -744,121 +764,65 @@ class UniteCreatorFiltersProcess{
|
|
744 |
|
745 |
$prefix = UniteProviderFunctionsUC::$tablePrefix;
|
746 |
|
747 |
-
$
|
748 |
-
|
749 |
-
$parentID = 17;
|
750 |
|
|
|
|
|
|
|
751 |
$selectTerms = "";
|
752 |
-
$
|
753 |
|
754 |
-
$
|
755 |
|
756 |
-
foreach($
|
757 |
|
758 |
-
if(!empty($selectTerms))
|
759 |
-
$selectTerms .= "
|
|
|
|
|
760 |
|
761 |
-
|
762 |
-
$queryTerms .= ",";
|
763 |
|
764 |
-
$
|
765 |
-
|
766 |
-
$selectTerms .= "SELECT SUM(if(clothing > 0, 1, 0)) as $termKey";
|
767 |
-
|
768 |
-
$queryTerms .= "SUM(if(tt.`parent` = $taxID OR tt.`term_id` = $taxID, 1, 0)) AS $termKey";
|
769 |
-
}
|
770 |
-
|
771 |
-
|
772 |
-
$query3 = "SELECT SUM(if(clothing > 0, 1, 0)) as clothing FROM (
|
773 |
|
774 |
-
|
775 |
|
776 |
-
FROM `wp_posts` p
|
777 |
-
LEFT JOIN `wp_term_relationships` rl ON rl.`object_id` = p.`id`
|
778 |
-
LEFT JOIN `wp_term_taxonomy` tt ON tt.`term_taxonomy_id` = rl.`term_taxonomy_id`
|
779 |
-
WHERE rl.`term_taxonomy_id` IS NOT NULL AND p.`id` IN
|
780 |
-
({$request})
|
781 |
-
GROUP BY p.`id`
|
782 |
-
) as sum_table";
|
783 |
-
|
784 |
-
//AND p.`id` IN ({$request})
|
785 |
-
|
786 |
-
|
787 |
-
dmp($query3);
|
788 |
-
|
789 |
-
return($query3);
|
790 |
-
|
791 |
-
/*
|
792 |
-
$query3 = "SELECT SUM(red_cars) as red_cars, SUM(green_cars) as green_cars, SUM(if(colored_cars > 0, 1, 0)) as colored_cars FROM (
|
793 |
-
SELECT SUM(if(tt.`term_id` = 8, 1, 0)) AS red_cars, SUM(if(tt.`term_id` = 7, 1, 0)) AS green_cars, SUM(if(tt.`parent` = 9 OR tt.`term_id` = 9, 1, 0)) AS colored_cars
|
794 |
-
FROM `wp_posts` p
|
795 |
-
LEFT JOIN `wp_term_relationships` rl ON rl.`object_id` = p.`id`
|
796 |
-
LEFT JOIN `wp_term_taxonomy` tt ON tt.`term_taxonomy_id` = rl.`term_taxonomy_id`
|
797 |
-
WHERE `post_type` = 'post' AND rl.`term_taxonomy_id` IS NOT NULL AND p.`id` IN (
|
798 |
-
SELECT wp_posts.ID
|
799 |
-
FROM wp_posts
|
800 |
-
LEFT JOIN wp_term_relationships ON (wp_posts.ID = wp_term_relationships.object_id)
|
801 |
-
WHERE 1=1 AND (wp_term_relationships.term_taxonomy_id IN (4))
|
802 |
-
AND wp_posts.post_type = 'post'
|
803 |
-
AND ((wp_posts.post_status = 'publish'))
|
804 |
-
GROUP BY wp_posts.ID ORDER BY wp_posts.post_date
|
805 |
-
) GROUP BY p.`id`
|
806 |
-
) as sum_table";
|
807 |
-
*/
|
808 |
-
|
809 |
-
dmp($arrTaxIDs);
|
810 |
-
dmp("get tax request");
|
811 |
-
|
812 |
-
dmp($request);
|
813 |
-
exit();
|
814 |
-
|
815 |
-
}
|
816 |
-
|
817 |
-
/**
|
818 |
-
* get init filtres taxonomy request
|
819 |
-
*/
|
820 |
-
private function getInitFiltersTaxRequest($request, $strTestIDs){
|
821 |
-
|
822 |
-
//cut the limit
|
823 |
-
|
824 |
-
$posLimit = strpos($request, "LIMIT");
|
825 |
-
|
826 |
-
if($posLimit){
|
827 |
-
$request = substr($request, 0, $posLimit-1);
|
828 |
-
$request = trim($request);
|
829 |
}
|
830 |
|
831 |
-
|
832 |
-
|
833 |
-
$request = str_replace("SQL_CALC_FOUND_ROWS", "", $request);
|
834 |
-
|
835 |
-
//wrap it in get term id's request
|
836 |
|
837 |
-
$
|
838 |
-
|
839 |
-
|
|
|
|
|
|
|
|
|
840 |
|
841 |
-
|
842 |
|
843 |
-
|
844 |
-
$request .= " and t.term_taxonomy_id in ($strTestIDs)";
|
845 |
|
846 |
-
return($
|
847 |
}
|
|
|
|
|
848 |
|
849 |
/**
|
850 |
* modify test term id's
|
851 |
*/
|
852 |
private function modifyFoundTermsIDs($arrFoundTermIDs){
|
853 |
|
|
|
|
|
|
|
854 |
$arrTermsAssoc = array();
|
855 |
|
856 |
-
foreach($arrFoundTermIDs as $
|
|
|
|
|
857 |
|
858 |
-
|
859 |
-
$arrTermsAssoc[$id] = 1;
|
860 |
-
else
|
861 |
-
$arrTermsAssoc[$id]++;
|
862 |
}
|
863 |
|
864 |
return($arrTermsAssoc);
|
@@ -869,7 +833,7 @@ class UniteCreatorFiltersProcess{
|
|
869 |
* get widget ajax data
|
870 |
*/
|
871 |
private function putWidgetGridFrontAjaxData(){
|
872 |
-
|
873 |
//validate by response code
|
874 |
|
875 |
$responseCode = http_response_code();
|
@@ -889,13 +853,18 @@ class UniteCreatorFiltersProcess{
|
|
889 |
$isModeFiltersInit = UniteFunctionsUC::getPostGetVariable("modeinit","",UniteFunctionsUC::SANITIZE_TEXT_FIELD);
|
890 |
$isModeFiltersInit = UniteFunctionsUC::strToBool($isModeFiltersInit);
|
891 |
|
892 |
-
|
893 |
-
|
894 |
-
|
895 |
-
|
896 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
897 |
GlobalsProviderUC::$skipRunPostQueryOnce = true;
|
898 |
-
}
|
899 |
|
900 |
$arrContent = HelperProviderCoreUC_EL::getElementorContentByPostID($layoutID);
|
901 |
|
@@ -904,41 +873,24 @@ class UniteCreatorFiltersProcess{
|
|
904 |
|
905 |
$arrHtmlWidget = $this->getContentWidgetHtml($arrContent, $elementID);
|
906 |
|
907 |
-
|
908 |
-
|
|
|
909 |
$args = GlobalsProviderUC::$lastQueryArgs;
|
910 |
|
911 |
$query = new WP_Query($args);
|
912 |
|
913 |
$request = $query->request;
|
914 |
|
|
|
915 |
|
916 |
-
$
|
917 |
-
|
918 |
-
//$taxRequest = $this->getInitFiltersTaxRequest_new($request, $initTermIDs);
|
919 |
-
|
920 |
-
|
921 |
-
//remove me
|
922 |
-
/*
|
923 |
-
$postSQL = "SELECT wp_posts.ID FROM wp_posts WHERE 1=1 AND wp_posts.post_type = 'product' AND ((wp_posts.post_status = 'publish')) ORDER BY wp_posts.post_date DESC";
|
924 |
-
$sql = "select term_taxonomy_id, count(*) from wp_term_relationships as t where t.object_id in ({$postSQL}) and t.term_taxonomy_id in (16,17,20,48,49,50)";
|
925 |
-
dmp($sql);
|
926 |
-
dmp($taxRequest);
|
927 |
-
exit();
|
928 |
-
*/
|
929 |
-
|
930 |
-
//$db = HelperUC::getDB();
|
931 |
-
//$response = $db->fetchSql($taxRequest);
|
932 |
-
|
933 |
-
//dmp($response);
|
934 |
-
global $wpdb;
|
935 |
-
$arrFoundTermIDs = $wpdb->get_col( $taxRequest);
|
936 |
|
937 |
$arrFoundTermIDs = $this->modifyFoundTermsIDs($arrFoundTermIDs);
|
938 |
|
939 |
//set the test term id's for the output
|
940 |
GlobalsProviderUC::$arrTestTermIDs = $arrFoundTermIDs;
|
941 |
-
|
942 |
}
|
943 |
|
944 |
|
@@ -946,7 +898,7 @@ class UniteCreatorFiltersProcess{
|
|
946 |
$htmlDebug = UniteFunctionsUC::getVal($arrHtmlWidget, "html_debug");
|
947 |
|
948 |
$addWidgetsHTML = $this->getContentWidgetsHTML($arrContent, $addElIDs);
|
949 |
-
|
950 |
//output the html
|
951 |
$outputData = array();
|
952 |
|
@@ -959,6 +911,10 @@ class UniteCreatorFiltersProcess{
|
|
959 |
if(!empty($addWidgetsHTML))
|
960 |
$outputData["html_widgets"] = $addWidgetsHTML;
|
961 |
|
|
|
|
|
|
|
|
|
962 |
HelperUC::ajaxResponseData($outputData);
|
963 |
|
964 |
}
|
@@ -1149,30 +1105,45 @@ class UniteCreatorFiltersProcess{
|
|
1149 |
/**
|
1150 |
* get editor filter arguments
|
1151 |
*/
|
1152 |
-
public function addEditorFilterArguments($data, $isInitAfter){
|
1153 |
|
1154 |
$arguments = "";
|
1155 |
$style = "";
|
1156 |
$addClass = " uc-grid-filter";
|
1157 |
$addClassItem = "";
|
1158 |
-
|
|
|
|
|
|
|
1159 |
$isUnderAjax = $this->isUnderAjax();
|
1160 |
|
|
|
|
|
|
|
1161 |
if($isInitAfter == true){
|
1162 |
$arguments = " data-initafter=\"true\"";
|
1163 |
|
1164 |
-
if($isUnderAjax == false){
|
1165 |
$addClassItem = " uc-filter-item-hidden";
|
1166 |
$addClass .= " uc-filter-initing";
|
1167 |
}
|
1168 |
|
|
|
1169 |
}
|
1170 |
|
|
|
|
|
|
|
|
|
|
|
|
|
1171 |
$data["filter_isajax"] = $isUnderAjax?"yes":"no";
|
1172 |
$data["filter_arguments"] = $arguments;
|
1173 |
$data["filter_style"] = $style;
|
1174 |
$data["filter_addclass"] = $addClass;
|
1175 |
$data["filter_addclass_item"] = $addClassItem;
|
|
|
|
|
1176 |
|
1177 |
return($data);
|
1178 |
}
|
@@ -1185,11 +1156,11 @@ class UniteCreatorFiltersProcess{
|
|
1185 |
|
1186 |
if(GlobalsProviderUC::$arrTestTermIDs === null)
|
1187 |
return($arrTerms);
|
1188 |
-
|
1189 |
$arrParentNumPosts = array();
|
1190 |
|
1191 |
$arrPostNums = GlobalsProviderUC::$arrTestTermIDs;
|
1192 |
-
|
1193 |
foreach($arrTerms as $key => $term){
|
1194 |
|
1195 |
$termID = UniteFunctionsUC::getVal($term, "id");
|
@@ -1198,16 +1169,24 @@ class UniteCreatorFiltersProcess{
|
|
1198 |
|
1199 |
$numPosts = 0;
|
1200 |
|
1201 |
-
if($termFound)
|
1202 |
$numPosts = $arrPostNums[$termID];
|
1203 |
-
|
|
|
1204 |
//add parent id if exists
|
1205 |
$parentID = UniteFunctionsUC::getVal($term, "parent_id");
|
1206 |
|
1207 |
//set the number of posts
|
1208 |
$term["num_posts"] = $numPosts;
|
1209 |
|
|
|
|
|
|
|
1210 |
$isHidden = !$termFound;
|
|
|
|
|
|
|
|
|
1211 |
$htmlAttributes = "";
|
1212 |
|
1213 |
if($isHidden == true)
|
@@ -1218,8 +1197,7 @@ class UniteCreatorFiltersProcess{
|
|
1218 |
|
1219 |
$arrTerms[$key] = $term;
|
1220 |
}
|
1221 |
-
|
1222 |
-
|
1223 |
return($arrTerms);
|
1224 |
}
|
1225 |
|
21 |
private static $isFilesAdded = false;
|
22 |
private static $isStyleAdded = false;
|
23 |
private static $isAjaxCache = null;
|
24 |
+
private static $isModeReplace = false;
|
25 |
|
26 |
private static $showDebug = false;
|
27 |
private static $originalQueryVars = null;
|
28 |
+
private $contentWidgetsDebug = array();
|
29 |
|
30 |
const TYPE_TERMS = "terms";
|
31 |
|
32 |
|
33 |
+
/**
|
34 |
+
* check if under ajax request
|
35 |
+
*/
|
36 |
+
private function isUnderAjax(){
|
37 |
+
|
38 |
+
$ajaxAction = UniteFunctionsUC::getPostGetVariable("ucfrontajaxaction","",UniteFunctionsUC::SANITIZE_TEXT_FIELD);
|
39 |
+
|
40 |
+
if(!empty($ajaxAction))
|
41 |
+
return(true);
|
42 |
+
|
43 |
+
return(false);
|
44 |
+
}
|
45 |
+
|
46 |
+
|
47 |
+
/**
|
48 |
+
* get fitler url from the given slugs
|
49 |
+
*/
|
50 |
+
private function getUrlFilter_term($term, $taxonomyName){
|
51 |
+
|
52 |
+
$key = "filter-term";
|
53 |
+
|
54 |
+
$taxPrefix = $taxonomyName."--";
|
55 |
+
|
56 |
+
if($taxonomyName == "category"){
|
57 |
+
$taxPrefix = "";
|
58 |
+
$key="filter-category";
|
59 |
+
}
|
60 |
+
|
61 |
+
$slug = $term->slug;
|
62 |
+
|
63 |
+
$value = $taxPrefix.$slug;
|
64 |
+
|
65 |
+
$urlAddition = "{$key}=".urlencode($value);
|
66 |
+
|
67 |
+
$urlCurrent = GlobalsUC::$current_page_url;
|
68 |
+
|
69 |
+
$url = UniteFunctionsUC::addUrlParams($urlCurrent, $urlAddition);
|
70 |
+
|
71 |
+
return($url);
|
72 |
+
}
|
73 |
+
|
74 |
+
/**
|
75 |
+
* check if the term is acrive
|
76 |
+
*/
|
77 |
+
private function isTermActive($term, $arrActiveFilters = null){
|
78 |
+
|
79 |
+
if(empty($term))
|
80 |
+
return(false);
|
81 |
+
|
82 |
+
if($arrActiveFilters === null)
|
83 |
+
$arrActiveFilters = $this->getRequestFilters();
|
84 |
+
|
85 |
+
if(empty($arrActiveFilters))
|
86 |
+
return(false);
|
87 |
+
|
88 |
+
$taxonomy = $term->taxonomy;
|
89 |
+
|
90 |
+
$selectedTermID = UniteFunctionsUC::getVal($arrActiveFilters, $taxonomy);
|
91 |
+
|
92 |
+
if(empty($selectedTermID))
|
93 |
+
return(false);
|
94 |
+
|
95 |
+
if($selectedTermID === $term->term_id)
|
96 |
+
return(true);
|
97 |
+
|
98 |
+
return(false);
|
99 |
+
}
|
100 |
+
|
101 |
+
/**
|
102 |
+
* get current term by query vars
|
103 |
+
*/
|
104 |
+
private function getCurrentTermByQueryVars($queryVars){
|
105 |
+
|
106 |
+
if(is_array($queryVars) == false)
|
107 |
+
return(null);
|
108 |
+
|
109 |
+
if(empty($queryVars))
|
110 |
+
return(null);
|
111 |
+
|
112 |
+
if(count($queryVars) > 1)
|
113 |
+
return(null);
|
114 |
+
|
115 |
+
$postType = null;
|
116 |
+
if(isset($queryVars["post_type"])){
|
117 |
+
|
118 |
+
$postType = $queryVars["post_type"];
|
119 |
+
unset($queryVars["post_type"]);
|
120 |
+
}
|
121 |
+
|
122 |
+
$args = array();
|
123 |
+
if(!empty($postType))
|
124 |
+
$args["post_type"] = $postType;
|
125 |
+
|
126 |
+
if(!empty($queryVars)){
|
127 |
+
$taxonomy = null;
|
128 |
+
$slug = null;
|
129 |
+
|
130 |
+
foreach($queryVars as $queryTax=>$querySlug){
|
131 |
+
|
132 |
+
$taxonomy = $queryTax;
|
133 |
+
$slug = $querySlug;
|
134 |
+
}
|
135 |
+
|
136 |
+
$args = array();
|
137 |
+
$args["taxonomy"] = $taxonomy;
|
138 |
+
$args["slug"] = $slug;
|
139 |
+
}
|
140 |
+
|
141 |
+
$arrTerms = get_terms($args);
|
142 |
+
|
143 |
+
$isError = is_wp_error($arrTerms);
|
144 |
+
|
145 |
+
if($isError == true){
|
146 |
+
if(self::$showDebug == true){
|
147 |
+
|
148 |
+
dmp("error get terms");
|
149 |
+
dmp($args);
|
150 |
+
dmp($arrTerms);
|
151 |
+
}
|
152 |
+
|
153 |
+
UniteFunctionsUC::throwError("cannot get the terms");
|
154 |
+
}
|
155 |
+
|
156 |
+
if(empty($arrTerms))
|
157 |
+
return(null);
|
158 |
+
|
159 |
+
$term = $arrTerms[0];
|
160 |
+
|
161 |
+
return($term);
|
162 |
+
}
|
163 |
+
|
164 |
+
|
165 |
+
/**
|
166 |
+
* get current term
|
167 |
+
*/
|
168 |
+
private function getCurrentTerm(){
|
169 |
+
|
170 |
+
if(!empty(self::$currentTermCache))
|
171 |
+
return(self::$currentTermCache);
|
172 |
+
|
173 |
+
if(is_archive() == false)
|
174 |
+
return(null);
|
175 |
+
|
176 |
+
if(!empty(self::$originalQueryVars)){
|
177 |
+
|
178 |
+
$currentTerm = $this->getCurrentTermByQueryVars(self::$originalQueryVars);
|
179 |
+
}else{
|
180 |
+
$currentTerm = get_queried_object();
|
181 |
+
|
182 |
+
|
183 |
+
|
184 |
+
if($currentTerm instanceof WP_Term == false)
|
185 |
+
$currentTerm = null;
|
186 |
+
}
|
187 |
+
|
188 |
+
self::$currentTermCache = $currentTerm;
|
189 |
+
|
190 |
+
return($currentTerm);
|
191 |
+
}
|
192 |
+
|
193 |
+
private function _______PARSE_INPUT_FILTERS__________(){}
|
194 |
+
|
195 |
/**
|
196 |
* get request array
|
197 |
*/
|
249 |
$key = $arrFilter[0];
|
250 |
$strValues = $arrFilter[1];
|
251 |
|
252 |
+
$arrValues = explode(".", $strValues);
|
253 |
|
254 |
+
$isTermsAnd = false;
|
255 |
+
foreach($arrValues as $valueKey=>$value){
|
256 |
+
if($value === "*"){
|
257 |
+
unset($arrValues[$valueKey]);
|
258 |
+
$isTermsAnd = true;
|
259 |
+
}
|
260 |
+
}
|
261 |
+
|
262 |
+
if($isTermsAnd == true)
|
263 |
+
$arrValues["relation"] = "AND";
|
264 |
+
|
265 |
$type = self::TYPE_TERMS;
|
266 |
|
267 |
switch($type){
|
268 |
case self::TYPE_TERMS:
|
269 |
+
$arrTerms[$key] = $arrValues;
|
270 |
break;
|
271 |
}
|
272 |
|
276 |
|
277 |
if(!empty($arrTerms))
|
278 |
$arrOutput[self::TYPE_TERMS] = $arrTerms;
|
279 |
+
|
280 |
return($arrOutput);
|
281 |
}
|
282 |
|
290 |
return(self::$arrInputFiltersCache);
|
291 |
|
292 |
$request = $this->getArrRequest();
|
293 |
+
|
294 |
$strTerms = UniteFunctionsUC::getVal($request, "ucterms");
|
295 |
|
296 |
$arrOutput = array();
|
355 |
}
|
356 |
|
357 |
self::$arrFiltersAssocCache = $output;
|
358 |
+
|
359 |
return($output);
|
360 |
}
|
361 |
|
380 |
if(!empty($arrTerms))
|
381 |
self::$filters["terms"] = $arrTerms;
|
382 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
383 |
|
384 |
//get the page
|
385 |
|
400 |
}
|
401 |
|
402 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
403 |
private function _______FILTER_ARGS__________(){}
|
404 |
|
405 |
|
451 |
|
452 |
foreach($arrTax as $taxonomy=>$arrTerms){
|
453 |
|
454 |
+
$relation = UniteFunctionsUC::getVal($arrTerms, "relation");
|
455 |
+
|
456 |
+
if($relation == "AND"){ //multiple
|
457 |
+
|
458 |
+
unset($arrTerms["relation"]);
|
459 |
+
|
460 |
+
foreach($arrTerms as $term){
|
461 |
+
|
462 |
+
$item = array();
|
463 |
+
$item["taxonomy"] = $taxonomy;
|
464 |
+
$item["field"] = "slug";
|
465 |
+
$item["terms"] = $term;
|
466 |
+
|
467 |
+
$arrQuery[] = $item;
|
468 |
+
}
|
469 |
+
|
470 |
+
}else{ //single (or)
|
471 |
+
|
472 |
+
$item = array();
|
473 |
+
$item["taxonomy"] = $taxonomy;
|
474 |
+
$item["field"] = "slug";
|
475 |
+
$item["terms"] = $arrTerms;
|
476 |
|
477 |
+
$arrQuery[] = $item;
|
478 |
+
}
|
479 |
+
|
480 |
}
|
481 |
|
482 |
$arrQuery["relation"] = "AND";
|
486 |
|
487 |
/**
|
488 |
* set arguments tax query, merge with existing if avaliable
|
|
|
|
|
489 |
*/
|
490 |
private function setArgsTaxQuery($args, $arrTaxQuery){
|
491 |
|
492 |
if(empty($arrTaxQuery))
|
493 |
return($args);
|
494 |
+
|
495 |
$existingTaxQuery = UniteFunctionsUC::getVal($args, "tax_query");
|
496 |
+
|
497 |
+
//if replace terms mode - just delete the existing tax query
|
498 |
+
if(self::$isModeReplace == true)
|
499 |
+
$existingTaxQuery = null;
|
500 |
|
501 |
if(empty($existingTaxQuery)){
|
502 |
|
503 |
$args["tax_query"] = $arrTaxQuery;
|
504 |
+
|
505 |
return($args);
|
506 |
}
|
507 |
+
|
508 |
+
$newTaxQuery = array(
|
509 |
+
$existingTaxQuery,
|
510 |
+
$arrTaxQuery
|
511 |
+
);
|
512 |
+
|
513 |
+
$newTaxQuery["relation"] = "AND";
|
514 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
515 |
|
516 |
+
$args["tax_query"] = $newTaxQuery;
|
517 |
|
518 |
return($args);
|
519 |
}
|
551 |
|
552 |
}
|
553 |
|
554 |
+
|
555 |
if(self::DEBUG_FILTER == true){
|
556 |
dmp("debug!!!");
|
557 |
dmp($args);
|
659 |
$arrSettingsValues = UniteFunctionsUC::getVal($arrElement, "settings");
|
660 |
|
661 |
$widgetName = str_replace("ucaddon_", "", $widgetType);
|
662 |
+
|
663 |
|
664 |
$addon = new UniteCreatorAddon();
|
665 |
$addon->initByAlias($widgetName, GlobalsUC::ADDON_TYPE_ELEMENTOR);
|
675 |
|
676 |
$addon->setParamsValues($arrSettingsValues);
|
677 |
|
678 |
+
|
679 |
//------ get the html output
|
680 |
|
681 |
//collect the debug html
|
682 |
+
ob_start();
|
683 |
+
|
684 |
+
$objOutput = new UniteCreatorOutput();
|
685 |
+
$objOutput->initByAddon($addon);
|
686 |
|
687 |
+
$htmlDebug = ob_get_contents();
|
688 |
+
ob_end_clean();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
689 |
|
690 |
$output = array();
|
691 |
|
705 |
$output["html"] = $htmlBody;
|
706 |
}
|
707 |
|
708 |
+
if(!empty($htmlDebug))
|
709 |
$output["html_debug"] = $htmlDebug;
|
710 |
+
|
711 |
return($output);
|
712 |
}
|
713 |
|
724 |
|
725 |
$arrHTML = array();
|
726 |
|
727 |
+
$this->contentWidgetsDebug = array();
|
728 |
+
|
729 |
foreach($arrIDs as $elementID){
|
730 |
|
731 |
$output = $this->getContentWidgetHtml($arrContent, $elementID, false);
|
732 |
|
733 |
+
$htmlDebug = UniteFunctionsUC::getVal($output, "html_debug");
|
734 |
+
|
735 |
$html = UniteFunctionsUC::getVal($output, "html");
|
736 |
+
|
737 |
+
//collect the debug
|
738 |
+
if(!empty($htmlDebug))
|
739 |
+
$this->contentWidgetsDebug[$elementID] = $htmlDebug;
|
740 |
|
741 |
$arrHTML[$elementID] = $html;
|
742 |
}
|
747 |
/**
|
748 |
* get init filtres taxonomy request
|
749 |
*/
|
750 |
+
private function getInitFiltersTaxRequest($request, $strTestIDs){
|
751 |
|
752 |
$posLimit = strpos($request, "LIMIT");
|
753 |
|
764 |
|
765 |
$prefix = UniteProviderFunctionsUC::$tablePrefix;
|
766 |
|
767 |
+
$arrTermIDs = explode(",", $strTestIDs);
|
|
|
|
|
768 |
|
769 |
+
if(empty($arrTermIDs))
|
770 |
+
return(null);
|
771 |
+
|
772 |
$selectTerms = "";
|
773 |
+
$selectTop = "";
|
774 |
|
775 |
+
$query = "SELECT \n";
|
776 |
|
777 |
+
foreach($arrTermIDs as $termID){
|
778 |
|
779 |
+
if(!empty($selectTerms)){
|
780 |
+
$selectTerms .= ",\n";
|
781 |
+
$selectTop .= ",\n";
|
782 |
+
}
|
783 |
|
784 |
+
$name = "term_$termID";
|
|
|
785 |
|
786 |
+
$selectTerms .= "SUM(if(tt.`parent` = $termID OR tt.`term_id` = $termID, 1, 0)) AS $name";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
787 |
|
788 |
+
$selectTop .= "SUM(if($name > 0, 1, 0)) as $name";
|
789 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
790 |
}
|
791 |
|
792 |
+
$query .= $selectTerms;
|
|
|
|
|
|
|
|
|
793 |
|
794 |
+
$sql = "
|
795 |
+
FROM `{$prefix}posts` p
|
796 |
+
LEFT JOIN `{$prefix}term_relationships` rl ON rl.`object_id` = p.`id`
|
797 |
+
LEFT JOIN `{$prefix}term_taxonomy` tt ON tt.`term_taxonomy_id` = rl.`term_taxonomy_id`
|
798 |
+
WHERE rl.`term_taxonomy_id` IS NOT NULL AND p.`id` IN \n
|
799 |
+
({$request}) \n
|
800 |
+
GROUP BY p.`id`";
|
801 |
|
802 |
+
$query .= $sql;
|
803 |
|
804 |
+
$fullQuery = "SELECT $selectTop from($query) as summary";
|
|
|
805 |
|
806 |
+
return($fullQuery);
|
807 |
}
|
808 |
+
|
809 |
+
|
810 |
|
811 |
/**
|
812 |
* modify test term id's
|
813 |
*/
|
814 |
private function modifyFoundTermsIDs($arrFoundTermIDs){
|
815 |
|
816 |
+
if(isset($arrFoundTermIDs[0]))
|
817 |
+
$arrFoundTermIDs = $arrFoundTermIDs[0];
|
818 |
+
|
819 |
$arrTermsAssoc = array();
|
820 |
|
821 |
+
foreach($arrFoundTermIDs as $strID=>$count){
|
822 |
+
|
823 |
+
$termID = str_replace("term_", "", $strID);
|
824 |
|
825 |
+
$arrTermsAssoc[$termID] = $count;
|
|
|
|
|
|
|
826 |
}
|
827 |
|
828 |
return($arrTermsAssoc);
|
833 |
* get widget ajax data
|
834 |
*/
|
835 |
private function putWidgetGridFrontAjaxData(){
|
836 |
+
|
837 |
//validate by response code
|
838 |
|
839 |
$responseCode = http_response_code();
|
853 |
$isModeFiltersInit = UniteFunctionsUC::getPostGetVariable("modeinit","",UniteFunctionsUC::SANITIZE_TEXT_FIELD);
|
854 |
$isModeFiltersInit = UniteFunctionsUC::strToBool($isModeFiltersInit);
|
855 |
|
856 |
+
$testTermIDs = UniteFunctionsUC::getPostGetVariable("testtermids","",UniteFunctionsUC::SANITIZE_TEXT_FIELD);
|
857 |
+
UniteFunctionsUC::validateIDsList($testTermIDs);
|
858 |
+
|
859 |
+
//replace terms mode
|
860 |
+
$isModeReplace = UniteFunctionsUC::getPostGetVariable("ucreplace","",UniteFunctionsUC::SANITIZE_TEXT_FIELD);
|
861 |
+
$isModeReplace = UniteFunctionsUC::strToBool($isModeReplace);
|
862 |
+
|
863 |
+
self::$isModeReplace = $isModeReplace;
|
864 |
+
|
865 |
+
|
866 |
+
if($isModeFiltersInit == true)
|
867 |
GlobalsProviderUC::$skipRunPostQueryOnce = true;
|
|
|
868 |
|
869 |
$arrContent = HelperProviderCoreUC_EL::getElementorContentByPostID($layoutID);
|
870 |
|
873 |
|
874 |
$arrHtmlWidget = $this->getContentWidgetHtml($arrContent, $elementID);
|
875 |
|
876 |
+
//find the term id's for test (find or not in the current posts query)
|
877 |
+
if(!empty($testTermIDs)){
|
878 |
+
|
879 |
$args = GlobalsProviderUC::$lastQueryArgs;
|
880 |
|
881 |
$query = new WP_Query($args);
|
882 |
|
883 |
$request = $query->request;
|
884 |
|
885 |
+
$taxRequest = $this->getInitFiltersTaxRequest($request, $testTermIDs);
|
886 |
|
887 |
+
$db = HelperUC::getDB();
|
888 |
+
$arrFoundTermIDs = $db->fetchSql($taxRequest);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
889 |
|
890 |
$arrFoundTermIDs = $this->modifyFoundTermsIDs($arrFoundTermIDs);
|
891 |
|
892 |
//set the test term id's for the output
|
893 |
GlobalsProviderUC::$arrTestTermIDs = $arrFoundTermIDs;
|
|
|
894 |
}
|
895 |
|
896 |
|
898 |
$htmlDebug = UniteFunctionsUC::getVal($arrHtmlWidget, "html_debug");
|
899 |
|
900 |
$addWidgetsHTML = $this->getContentWidgetsHTML($arrContent, $addElIDs);
|
901 |
+
|
902 |
//output the html
|
903 |
$outputData = array();
|
904 |
|
911 |
if(!empty($addWidgetsHTML))
|
912 |
$outputData["html_widgets"] = $addWidgetsHTML;
|
913 |
|
914 |
+
if(!empty($this->contentWidgetsDebug))
|
915 |
+
$outputData["html_widgets_debug"] = $this->contentWidgetsDebug;
|
916 |
+
|
917 |
+
|
918 |
HelperUC::ajaxResponseData($outputData);
|
919 |
|
920 |
}
|
1105 |
/**
|
1106 |
* get editor filter arguments
|
1107 |
*/
|
1108 |
+
public function addEditorFilterArguments($data, $isInitAfter, $isMainFilter){
|
1109 |
|
1110 |
$arguments = "";
|
1111 |
$style = "";
|
1112 |
$addClass = " uc-grid-filter";
|
1113 |
$addClassItem = "";
|
1114 |
+
$isFirstLoad = true; //not in ajax, or with init after (also first load)
|
1115 |
+
|
1116 |
+
$isInsideEditor = UniteCreatorElementorIntegrate::$isEditMode;
|
1117 |
+
|
1118 |
$isUnderAjax = $this->isUnderAjax();
|
1119 |
|
1120 |
+
if($isUnderAjax == true)
|
1121 |
+
$isFirstLoad = false;
|
1122 |
+
|
1123 |
if($isInitAfter == true){
|
1124 |
$arguments = " data-initafter=\"true\"";
|
1125 |
|
1126 |
+
if($isUnderAjax == false && $isInsideEditor == false){
|
1127 |
$addClassItem = " uc-filter-item-hidden";
|
1128 |
$addClass .= " uc-filter-initing";
|
1129 |
}
|
1130 |
|
1131 |
+
$isFirstLoad = true;
|
1132 |
}
|
1133 |
|
1134 |
+
if($isInsideEditor == true)
|
1135 |
+
$isFirstLoad = true;
|
1136 |
+
|
1137 |
+
if($isMainFilter == true)
|
1138 |
+
$addClass .= " uc-main-filter";
|
1139 |
+
|
1140 |
$data["filter_isajax"] = $isUnderAjax?"yes":"no";
|
1141 |
$data["filter_arguments"] = $arguments;
|
1142 |
$data["filter_style"] = $style;
|
1143 |
$data["filter_addclass"] = $addClass;
|
1144 |
$data["filter_addclass_item"] = $addClassItem;
|
1145 |
+
$data["filter_first_load"] = $isFirstLoad?"yes":"no";
|
1146 |
+
|
1147 |
|
1148 |
return($data);
|
1149 |
}
|
1156 |
|
1157 |
if(GlobalsProviderUC::$arrTestTermIDs === null)
|
1158 |
return($arrTerms);
|
1159 |
+
|
1160 |
$arrParentNumPosts = array();
|
1161 |
|
1162 |
$arrPostNums = GlobalsProviderUC::$arrTestTermIDs;
|
1163 |
+
|
1164 |
foreach($arrTerms as $key => $term){
|
1165 |
|
1166 |
$termID = UniteFunctionsUC::getVal($term, "id");
|
1169 |
|
1170 |
$numPosts = 0;
|
1171 |
|
1172 |
+
if($termFound){
|
1173 |
$numPosts = $arrPostNums[$termID];
|
1174 |
+
}
|
1175 |
+
|
1176 |
//add parent id if exists
|
1177 |
$parentID = UniteFunctionsUC::getVal($term, "parent_id");
|
1178 |
|
1179 |
//set the number of posts
|
1180 |
$term["num_posts"] = $numPosts;
|
1181 |
|
1182 |
+
if(!empty($term["num_products"]))
|
1183 |
+
$term["num_products"] = $numPosts;
|
1184 |
+
|
1185 |
$isHidden = !$termFound;
|
1186 |
+
|
1187 |
+
if($numPosts == 0)
|
1188 |
+
$isHidden = true;
|
1189 |
+
|
1190 |
$htmlAttributes = "";
|
1191 |
|
1192 |
if($isHidden == true)
|
1197 |
|
1198 |
$arrTerms[$key] = $term;
|
1199 |
}
|
1200 |
+
|
|
|
1201 |
return($arrTerms);
|
1202 |
}
|
1203 |
|
includes.php
CHANGED
@@ -12,7 +12,7 @@ if(!defined('UNLIMITED_ELEMENTS_INC'))
|
|
12 |
defined('UNLIMITED_ELEMENTS_INC') or die('Restricted access');
|
13 |
|
14 |
if(!defined("UNLIMITED_ELEMENTS_VERSION"))
|
15 |
-
define("UNLIMITED_ELEMENTS_VERSION", "1.
|
16 |
|
17 |
$currentFile = __FILE__;
|
18 |
$currentFolder = dirname($currentFile);
|
12 |
defined('UNLIMITED_ELEMENTS_INC') or die('Restricted access');
|
13 |
|
14 |
if(!defined("UNLIMITED_ELEMENTS_VERSION"))
|
15 |
+
define("UNLIMITED_ELEMENTS_VERSION", "1.5.0");
|
16 |
|
17 |
$currentFile = __FILE__;
|
18 |
$currentFolder = dirname($currentFile);
|
provider/core/plugins/unlimited_elements/elementor/elementor_widget.class.php
CHANGED
@@ -30,7 +30,7 @@ class UniteCreatorElementorWidget extends Widget_Base {
|
|
30 |
protected $objControls;
|
31 |
protected $isAddSapBefore = false;
|
32 |
protected $tabsCounter = 1;
|
33 |
-
|
34 |
|
35 |
const DEBUG_SETTINGS_VALUES = false;
|
36 |
|
@@ -526,11 +526,14 @@ class UniteCreatorElementorWidget extends Widget_Base {
|
|
526 |
|
527 |
$titleField = null;
|
528 |
|
|
|
|
|
529 |
foreach($paramsItems as $param){
|
530 |
|
531 |
$name = UniteFunctionsUC::getVal($param, "name");
|
532 |
$type = UniteFunctionsUC::getVal($param, "type");
|
533 |
|
|
|
534 |
if($name == "title")
|
535 |
$titleField = $name;
|
536 |
|
@@ -552,6 +555,54 @@ class UniteCreatorElementorWidget extends Widget_Base {
|
|
552 |
break;
|
553 |
}
|
554 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
555 |
|
556 |
$arrControl = $this->getControlArrayUC($param, true);
|
557 |
|
@@ -566,12 +617,20 @@ class UniteCreatorElementorWidget extends Widget_Base {
|
|
566 |
$repeater->add_control($name, $arrControl);
|
567 |
}
|
568 |
|
569 |
-
|
570 |
//add some child params
|
571 |
$this->checkAddRelatedControls($param, $repeater);
|
572 |
-
|
573 |
}
|
574 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
575 |
|
576 |
$arrItemsControl = array();
|
577 |
$arrItemsControl["type"] = Controls_Manager::REPEATER;
|
30 |
protected $objControls;
|
31 |
protected $isAddSapBefore = false;
|
32 |
protected $tabsCounter = 1;
|
33 |
+
|
34 |
|
35 |
const DEBUG_SETTINGS_VALUES = false;
|
36 |
|
526 |
|
527 |
$titleField = null;
|
528 |
|
529 |
+
$activeTab = null;
|
530 |
+
|
531 |
foreach($paramsItems as $param){
|
532 |
|
533 |
$name = UniteFunctionsUC::getVal($param, "name");
|
534 |
$type = UniteFunctionsUC::getVal($param, "type");
|
535 |
|
536 |
+
|
537 |
if($name == "title")
|
538 |
$titleField = $name;
|
539 |
|
555 |
break;
|
556 |
}
|
557 |
|
558 |
+
$tabName = UniteFunctionsUC::getVal($param, "tabname");
|
559 |
+
$tabName = trim($tabName);
|
560 |
+
|
561 |
+
/**
|
562 |
+
* end tabs, if opened and no active tab
|
563 |
+
*/
|
564 |
+
if(!empty($activeTab) && empty($tabName)){
|
565 |
+
$repeater->end_controls_tab();
|
566 |
+
$repeater->end_controls_tabs();
|
567 |
+
$activeTab = null;
|
568 |
+
}
|
569 |
+
|
570 |
+
//check and add tabs
|
571 |
+
|
572 |
+
if(!empty($tabName)){
|
573 |
+
|
574 |
+
//if empty active tab - start tabs area
|
575 |
+
if(empty($activeTab)){
|
576 |
+
|
577 |
+
$numTab = $this->tabsCounter++;
|
578 |
+
|
579 |
+
$tabsID = "uctabs{$numTab}";
|
580 |
+
$tabID = "uctab{$numTab}";
|
581 |
+
|
582 |
+
$repeater->start_controls_tabs($tabsID);
|
583 |
+
$repeater->start_controls_tab($tabID, array("label"=>$tabName));
|
584 |
+
|
585 |
+
$activeTab = $tabName;
|
586 |
+
|
587 |
+
}else{
|
588 |
+
|
589 |
+
//open another tab, if changed
|
590 |
+
|
591 |
+
if($activeTab != $tabName){
|
592 |
+
$numTab = $this->tabsCounter++;
|
593 |
+
|
594 |
+
$tabID = "uctab{$numTab}";
|
595 |
+
|
596 |
+
$repeater->end_controls_tab();
|
597 |
+
$repeater->start_controls_tab($tabID, array("label"=>$tabName));
|
598 |
+
$activeTab = $tabName;
|
599 |
+
}
|
600 |
+
|
601 |
+
}//else
|
602 |
+
|
603 |
+
|
604 |
+
}//not emtpy tabName
|
605 |
+
|
606 |
|
607 |
$arrControl = $this->getControlArrayUC($param, true);
|
608 |
|
617 |
$repeater->add_control($name, $arrControl);
|
618 |
}
|
619 |
|
620 |
+
|
621 |
//add some child params
|
622 |
$this->checkAddRelatedControls($param, $repeater);
|
623 |
+
|
624 |
}
|
625 |
|
626 |
+
//if inside some tab, in last option - close tabs
|
627 |
+
if(!empty($activeTab)){
|
628 |
+
|
629 |
+
$repeater->end_controls_tab();
|
630 |
+
$repeater->end_controls_tabs();
|
631 |
+
$activeTab = null;
|
632 |
+
}
|
633 |
+
|
634 |
|
635 |
$arrItemsControl = array();
|
636 |
$arrItemsControl["type"] = Controls_Manager::REPEATER;
|
provider/provider_params_processor.class.php
CHANGED
@@ -3011,10 +3011,11 @@ class UniteCreatorParamsProcessor extends UniteCreatorParamsProcessorWork{
|
|
3011 |
$arrTerms = UniteFunctionsWPUC::getTerms($taxonomy, $orderBy, $orderDir, $isHide, $arrExcludeSlugs, $params);
|
3012 |
|
3013 |
if($showDebug == true){
|
3014 |
-
|
3015 |
-
|
3016 |
-
|
3017 |
-
|
|
|
3018 |
}
|
3019 |
|
3020 |
|
@@ -3074,10 +3075,10 @@ class UniteCreatorParamsProcessor extends UniteCreatorParamsProcessorWork{
|
|
3074 |
protected function getWPTermsData($value, $name, $processType, $param){
|
3075 |
|
3076 |
$postType = UniteFunctionsUC::getVal($value, $name."_posttype");
|
3077 |
-
$taxonomy = UniteFunctionsUC::getVal($value, $name."_taxonomy");
|
3078 |
|
3079 |
-
$orderBy = UniteFunctionsUC::getVal($value, $name."_orderby");
|
3080 |
-
$orderDir = UniteFunctionsUC::getVal($value, $name."_orderdir");
|
3081 |
|
3082 |
$hideEmpty = UniteFunctionsUC::getVal($value, $name."_hideempty");
|
3083 |
|
@@ -3288,11 +3289,13 @@ class UniteCreatorParamsProcessor extends UniteCreatorParamsProcessorWork{
|
|
3288 |
HelperUC::addDebug("Terms Query", $args);
|
3289 |
|
3290 |
if($showDebug == true){
|
|
|
3291 |
|
3292 |
dmp("The terms query is:");
|
3293 |
dmp($args);
|
3294 |
}
|
3295 |
-
|
|
|
3296 |
$term_query = new WP_Term_Query();
|
3297 |
$arrTermsObjects = $term_query->query( $args );
|
3298 |
|
@@ -3319,6 +3322,9 @@ class UniteCreatorParamsProcessor extends UniteCreatorParamsProcessorWork{
|
|
3319 |
|
3320 |
}
|
3321 |
|
|
|
|
|
|
|
3322 |
if(!empty($arrExcludeSlugs)){
|
3323 |
HelperUC::addDebug("Terms Before Filter:", $arrTermsObjects);
|
3324 |
HelperUC::addDebug("Exclude by:", $arrExcludeSlugs);
|
@@ -3344,6 +3350,7 @@ class UniteCreatorParamsProcessor extends UniteCreatorParamsProcessorWork{
|
|
3344 |
$filterExists = false;
|
3345 |
$isFilter = false;
|
3346 |
$isInitAfter = false;
|
|
|
3347 |
|
3348 |
if(!$value)
|
3349 |
$value = array();
|
@@ -3356,10 +3363,15 @@ class UniteCreatorParamsProcessor extends UniteCreatorParamsProcessorWork{
|
|
3356 |
|
3357 |
$isInitAfter = UniteFunctionsUC::getVal($value, $name."_init_after_grid");
|
3358 |
$isInitAfter = UniteFunctionsUC::strToBool($isInitAfter);
|
|
|
|
|
|
|
|
|
3359 |
}
|
3360 |
|
3361 |
$arrTerms = $this->getWPTermsData($value, $name, $processType, $param);
|
3362 |
-
|
|
|
3363 |
//add filter arguments
|
3364 |
|
3365 |
$objFilters = new UniteCreatorFiltersProcess();
|
@@ -3374,7 +3386,7 @@ class UniteCreatorParamsProcessor extends UniteCreatorParamsProcessorWork{
|
|
3374 |
$data["is_filter"] = $isFilter?"true":"false";
|
3375 |
|
3376 |
if($isFilter == true)
|
3377 |
-
$data = $objFilters->addEditorFilterArguments($data, $isInitAfter);
|
3378 |
}
|
3379 |
|
3380 |
return($data);
|
@@ -3614,7 +3626,7 @@ class UniteCreatorParamsProcessor extends UniteCreatorParamsProcessorWork{
|
|
3614 |
* get processe param data, function with override
|
3615 |
*/
|
3616 |
protected function getProcessedParamData($data, $value, $param, $processType){
|
3617 |
-
|
3618 |
$type = UniteFunctionsUC::getVal($param, "type");
|
3619 |
$name = UniteFunctionsUC::getVal($param, "name");
|
3620 |
|
3011 |
$arrTerms = UniteFunctionsWPUC::getTerms($taxonomy, $orderBy, $orderDir, $isHide, $arrExcludeSlugs, $params);
|
3012 |
|
3013 |
if($showDebug == true){
|
3014 |
+
echo "<div class='uc-div-ajax-debug'>";
|
3015 |
+
dmp("The terms query is:");
|
3016 |
+
dmp(UniteFunctionsWPUC::$arrLastTermsArgs);
|
3017 |
+
dmp("num terms found: ".count($arrTerms));
|
3018 |
+
echo "</div>";
|
3019 |
}
|
3020 |
|
3021 |
|
3075 |
protected function getWPTermsData($value, $name, $processType, $param){
|
3076 |
|
3077 |
$postType = UniteFunctionsUC::getVal($value, $name."_posttype");
|
3078 |
+
$taxonomy = UniteFunctionsUC::getVal($value, $name."_taxonomy","category");
|
3079 |
|
3080 |
+
$orderBy = UniteFunctionsUC::getVal($value, $name."_orderby","name");
|
3081 |
+
$orderDir = UniteFunctionsUC::getVal($value, $name."_orderdir","ASC");
|
3082 |
|
3083 |
$hideEmpty = UniteFunctionsUC::getVal($value, $name."_hideempty");
|
3084 |
|
3289 |
HelperUC::addDebug("Terms Query", $args);
|
3290 |
|
3291 |
if($showDebug == true){
|
3292 |
+
echo "<div class='uc-div-ajax-debug'>";
|
3293 |
|
3294 |
dmp("The terms query is:");
|
3295 |
dmp($args);
|
3296 |
}
|
3297 |
+
|
3298 |
+
|
3299 |
$term_query = new WP_Term_Query();
|
3300 |
$arrTermsObjects = $term_query->query( $args );
|
3301 |
|
3322 |
|
3323 |
}
|
3324 |
|
3325 |
+
if($showDebug == true)
|
3326 |
+
echo "</div>";
|
3327 |
+
|
3328 |
if(!empty($arrExcludeSlugs)){
|
3329 |
HelperUC::addDebug("Terms Before Filter:", $arrTermsObjects);
|
3330 |
HelperUC::addDebug("Exclude by:", $arrExcludeSlugs);
|
3350 |
$filterExists = false;
|
3351 |
$isFilter = false;
|
3352 |
$isInitAfter = false;
|
3353 |
+
$isMainFilter = false;
|
3354 |
|
3355 |
if(!$value)
|
3356 |
$value = array();
|
3363 |
|
3364 |
$isInitAfter = UniteFunctionsUC::getVal($value, $name."_init_after_grid");
|
3365 |
$isInitAfter = UniteFunctionsUC::strToBool($isInitAfter);
|
3366 |
+
|
3367 |
+
$isMainFilter = UniteFunctionsUC::getVal($value, $name."_is_main_filter");
|
3368 |
+
$isMainFilter = UniteFunctionsUC::strToBool($isMainFilter);
|
3369 |
+
|
3370 |
}
|
3371 |
|
3372 |
$arrTerms = $this->getWPTermsData($value, $name, $processType, $param);
|
3373 |
+
|
3374 |
+
|
3375 |
//add filter arguments
|
3376 |
|
3377 |
$objFilters = new UniteCreatorFiltersProcess();
|
3386 |
$data["is_filter"] = $isFilter?"true":"false";
|
3387 |
|
3388 |
if($isFilter == true)
|
3389 |
+
$data = $objFilters->addEditorFilterArguments($data, $isInitAfter, $isMainFilter);
|
3390 |
}
|
3391 |
|
3392 |
return($data);
|
3626 |
* get processe param data, function with override
|
3627 |
*/
|
3628 |
protected function getProcessedParamData($data, $value, $param, $processType){
|
3629 |
+
|
3630 |
$type = UniteFunctionsUC::getVal($param, "type");
|
3631 |
$name = UniteFunctionsUC::getVal($param, "name");
|
3632 |
|
provider/provider_settings.class.php
CHANGED
@@ -406,14 +406,24 @@ class UniteCreatorSettings extends UniteCreatorSettingsWork{
|
|
406 |
|
407 |
$this->addRadioBoolean($name."_is_filter", __("Use As Posts Filter", "unlimited-elements-for-elementor"), false, "Yes", "No", $params);
|
408 |
|
409 |
-
//----------
|
410 |
|
411 |
$params = array();
|
412 |
$params["origtype"] = UniteCreatorDialogParam::PARAM_RADIOBOOLEAN;
|
413 |
$params["description"] = __("Show the widget by ajax request after the grid has loaded, only relevant terms from the chosen, according chosen grid posts.", "unlimited-elements-for-elementor");
|
|
|
414 |
|
415 |
$this->addRadioBoolean($name."_init_after_grid", __("Init After Grid", "unlimited-elements-for-elementor"), false, "Yes", "No", $params);
|
416 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
417 |
|
418 |
//---------- add hr ---------
|
419 |
|
406 |
|
407 |
$this->addRadioBoolean($name."_is_filter", __("Use As Posts Filter", "unlimited-elements-for-elementor"), false, "Yes", "No", $params);
|
408 |
|
409 |
+
//---------- init after grid ---------
|
410 |
|
411 |
$params = array();
|
412 |
$params["origtype"] = UniteCreatorDialogParam::PARAM_RADIOBOOLEAN;
|
413 |
$params["description"] = __("Show the widget by ajax request after the grid has loaded, only relevant terms from the chosen, according chosen grid posts.", "unlimited-elements-for-elementor");
|
414 |
+
$params["elementor_condition"] = array($name."_is_filter" => "true");
|
415 |
|
416 |
$this->addRadioBoolean($name."_init_after_grid", __("Init After Grid", "unlimited-elements-for-elementor"), false, "Yes", "No", $params);
|
417 |
|
418 |
+
//---------- is main filter ---------
|
419 |
+
|
420 |
+
$params = array();
|
421 |
+
$params["origtype"] = UniteCreatorDialogParam::PARAM_RADIOBOOLEAN;
|
422 |
+
$params["description"] = __("This filter is not redrawable on other filters press.", "unlimited-elements-for-elementor");
|
423 |
+
$params["elementor_condition"] = array($name."_is_filter" => "true");
|
424 |
+
|
425 |
+
$this->addRadioBoolean($name."_is_main_filter", __("Is Main Filter", "unlimited-elements-for-elementor"), false, "Yes", "No", $params);
|
426 |
+
|
427 |
|
428 |
//---------- add hr ---------
|
429 |
|
readme.txt
CHANGED
@@ -477,6 +477,13 @@ Note : This plugin works with Elementor. Make sure you have [Elementor](https://
|
|
477 |
== Changelog ==
|
478 |
|
479 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
480 |
version 1.4.99: 2022-01-27:
|
481 |
|
482 |
* Feature: added option for disable content filtering in general settings->troubleshooting
|
477 |
== Changelog ==
|
478 |
|
479 |
|
480 |
+
version 1.5.0: 2022-02-02:
|
481 |
+
|
482 |
+
* Feature: added tabs in items controls
|
483 |
+
* Feature: added functionality for ajax taxonomies terms filter
|
484 |
+
* Feature: added some accessability to owl carousel buttons
|
485 |
+
|
486 |
+
|
487 |
version 1.4.99: 2022-01-27:
|
488 |
|
489 |
* Feature: added option for disable content filtering in general settings->troubleshooting
|
release_log.txt
CHANGED
@@ -1,4 +1,10 @@
|
|
1 |
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
|
3 |
version 1.4.99:
|
4 |
|
1 |
|
2 |
+
version 1.5.0:
|
3 |
+
|
4 |
+
-feature: added tabs in items controls
|
5 |
+
-feature: added functionality for ajax taxonomies terms filter
|
6 |
+
-change: added some accessability to owl carousel buttons
|
7 |
+
|
8 |
|
9 |
version 1.4.99:
|
10 |
|
unlimited_elements.php
CHANGED
@@ -4,12 +4,12 @@
|
|
4 |
* Plugin URI: http://unlimited-elements.com
|
5 |
* Description: Unlimited Elements - Huge Widgets Pack for Elementor Website Builder, with html/css/js widget creator and editor
|
6 |
* Author: Unlimited Elements
|
7 |
-
* Version: 1.
|
8 |
* Author URI: http://unlimited-elements.com
|
9 |
* Text Domain: unlimited-elements-for-elementor
|
10 |
* Domain Path: /languages
|
11 |
*
|
12 |
-
* Tested up to: 5.
|
13 |
* Elementor tested up to: 3.5.3
|
14 |
* Elementor Pro tested up to: 3.5.2
|
15 |
*/
|
4 |
* Plugin URI: http://unlimited-elements.com
|
5 |
* Description: Unlimited Elements - Huge Widgets Pack for Elementor Website Builder, with html/css/js widget creator and editor
|
6 |
* Author: Unlimited Elements
|
7 |
+
* Version: 1.5.0
|
8 |
* Author URI: http://unlimited-elements.com
|
9 |
* Text Domain: unlimited-elements-for-elementor
|
10 |
* Domain Path: /languages
|
11 |
*
|
12 |
+
* Tested up to: 5.9
|
13 |
* Elementor tested up to: 3.5.3
|
14 |
* Elementor Pro tested up to: 3.5.2
|
15 |
*/
|