Fix bug.
This commit is contained in:
parent
d788e94c47
commit
0d9e84cdc7
|
@ -2452,10 +2452,16 @@ var wpex = {};
|
||||||
}
|
}
|
||||||
return filter_constraint;
|
return filter_constraint;
|
||||||
}
|
}
|
||||||
|
var container_text_arr = window.wpexAnimsition.container_block.split(",");
|
||||||
|
if(window.already_changes == undefined)
|
||||||
|
window.already_changes = container_text_arr.map(function(){return false});
|
||||||
$(containers).each(function (i,v) {
|
$(containers).each(function (i,v) {
|
||||||
var $container = $(v);
|
var $container = $(v);
|
||||||
if($(v).find(window.wpexAnimsition.linkElement).length != 1){
|
if(container_text_arr[i] == undefined){
|
||||||
if(!window.already_change){
|
return;
|
||||||
|
}
|
||||||
|
if($(container_text_arr[i]).parents(window.wpexAnimsition.need_fix_containers).length != 0){
|
||||||
|
if(!window.already_changes[i]){
|
||||||
var $filter = $container.parent().find(window.wpexAnimsition.filter_bar);
|
var $filter = $container.parent().find(window.wpexAnimsition.filter_bar);
|
||||||
var $filterLinks = $filter.find(window.wpexAnimsition.filter_option);
|
var $filterLinks = $filter.find(window.wpexAnimsition.filter_option);
|
||||||
var $divs = [];
|
var $divs = [];
|
||||||
|
@ -2545,6 +2551,8 @@ var wpex = {};
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
window.already_changes[i] = true;
|
||||||
|
console.log("changed")
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
$container.imagesLoaded(function () {
|
$container.imagesLoaded(function () {
|
||||||
|
@ -2577,7 +2585,6 @@ var wpex = {};
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
window.already_change = true;
|
|
||||||
}, customHovers: function () {
|
}, customHovers: function () {
|
||||||
|
|
||||||
}, responsiveCSS: function () { var headCSS = ''; var mediaObj = {}; var bkPoints = {}; $('.wpex-vc-rcss').remove(); bkPoints.d = ''; bkPoints = $.extend(bkPoints, wpexLocalize.responsiveDataBreakpoints); $.each(bkPoints, function (key) { mediaObj[key] = '' }); $('[data-wpex-rcss]').each(function (index, value) { var $this = $(this); var uniqueClass = 'wpex-rcss-' + index; var data = $this.data('wpex-rcss'); $this.addClass(uniqueClass); $.each(data, function (key, val) { var thisVal = val; var target = key; $.each(bkPoints, function (key) { if (thisVal[key]) { mediaObj[key] += '.' + uniqueClass + '{' + target + ':' + thisVal[key] + '!important;}' } }) }) }); $.each(mediaObj, function (key, val) { if ('d' == key) { headCSS += val } else { if (val) { headCSS += '@media (max-width: ' + bkPoints[key] + ') { ' + val + ' }' } } }); if (headCSS) { headCSS = '<style class="wpex-vc-rcss">/** RESPONSIVE VC PARAMS **/' + headCSS + '</style>'; this.config.$head.append(headCSS) } }, vcexFilterNav: function ($context) {
|
}, responsiveCSS: function () { var headCSS = ''; var mediaObj = {}; var bkPoints = {}; $('.wpex-vc-rcss').remove(); bkPoints.d = ''; bkPoints = $.extend(bkPoints, wpexLocalize.responsiveDataBreakpoints); $.each(bkPoints, function (key) { mediaObj[key] = '' }); $('[data-wpex-rcss]').each(function (index, value) { var $this = $(this); var uniqueClass = 'wpex-rcss-' + index; var data = $this.data('wpex-rcss'); $this.addClass(uniqueClass); $.each(data, function (key, val) { var thisVal = val; var target = key; $.each(bkPoints, function (key) { if (thisVal[key]) { mediaObj[key] += '.' + uniqueClass + '{' + target + ':' + thisVal[key] + '!important;}' } }) }) }); $.each(mediaObj, function (key, val) { if ('d' == key) { headCSS += val } else { if (val) { headCSS += '@media (max-width: ' + bkPoints[key] + ') { ' + val + ' }' } } }); if (headCSS) { headCSS = '<style class="wpex-vc-rcss">/** RESPONSIVE VC PARAMS **/' + headCSS + '</style>'; this.config.$head.append(headCSS) } }, vcexFilterNav: function ($context) {
|
||||||
|
|
|
@ -241,6 +241,7 @@ class AnnouncementsController < ApplicationController
|
||||||
"outDuration":"400",
|
"outDuration":"400",
|
||||||
"inClass":"fade-in",
|
"inClass":"fade-in",
|
||||||
"outClass":"fade-out",
|
"outClass":"fade-out",
|
||||||
|
"need_fix_containers":".widget-announcement-4,.widget-announcement-15",
|
||||||
"linkElement": "[data-list=\"announcements\"] > *",
|
"linkElement": "[data-list=\"announcements\"] > *",
|
||||||
"children_text_block": ".w-annc__content-wrap",
|
"children_text_block": ".w-annc__content-wrap",
|
||||||
"container_block": "[data-subpart-id=\"'+subpart.id.to_s+'\"] [data-list=\"announcements\"]:not(tbody)",
|
"container_block": "[data-subpart-id=\"'+subpart.id.to_s+'\"] [data-list=\"announcements\"]:not(tbody)",
|
||||||
|
|
Loading…
Reference in New Issue