71fe35de by Jeff Balicki

qa

Signed-off-by: Jeff <jeff@gotenzing.com>
1 parent 52c0dc56
......@@ -18953,7 +18953,7 @@ ul.sf_date_field .sf-datepicker {
@media screen and (max-width: 59.375rem) {
#search-wrapper #main > article .photo {
max-width: 100%;
max-height: unset;
max-height: 200px;
max-width: 100%;
min-height: unset;
}
......@@ -20738,7 +20738,7 @@ ul.sf_date_field .sf-datepicker {
.relevant-resources #relevant-resources td .rel .photo {
flex-basis: 100%;
max-width: 100%;
max-height: unset;
max-height: 200px;
max-width: 100%;
min-height: unset;
margin-right: 0px;
......
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
......@@ -20767,17 +20767,6 @@
$('.search-box').removeClass('show');
$('.badge').show();
});
if ($(window).width() < 960) {
$(".search-result .entry-summary, .content p").each(function () {
var yourString = $(this).text();
var maxLength = 160;
if (yourString.length > maxLength) {
var trimmedString = yourString.substr(0, maxLength);
trimmedString = trimmedString.substr(0, Math.min(trimmedString.length, trimmedString.lastIndexOf(" ")));
$(this).text(trimmedString + "...");
}
});
}
}
return {
init: init
......@@ -26222,7 +26211,7 @@
});
// Add your custom JS here.
new LazyLoad();
var myLazyLoad = new LazyLoad();
window.tz_checkVisible = function (elm, evalType, offset, heightBuffer) {
evalType = evalType || "visible";
var vpH = jQuery(window).height(),
......@@ -26238,6 +26227,7 @@
if (evalType === "above") return y < vpH + st;
};
jQuery(document).ready(function ($) {
trim_text();
$('#relevant-resources').dataTable({
info: false,
ordering: false,
......@@ -26252,6 +26242,19 @@
scrollTop: $("#relevant-resources").offset().top - 250
}, 100);
});
function trim_text() {
if ($(window).width() < 960) {
$(".search-result .entry-summary, .content p").each(function () {
var yourString = $(this).text();
var maxLength = 160;
if (yourString.length > maxLength) {
var trimmedString = yourString.substr(0, maxLength);
trimmedString = trimmedString.substr(0, Math.min(trimmedString.length, trimmedString.lastIndexOf(" ")));
$(this).text(trimmedString + "...");
}
});
}
}
(function () {
var origOpen = XMLHttpRequest.prototype.open;
XMLHttpRequest.prototype.open = function (method, url) {
......@@ -26261,7 +26264,8 @@
$('html, body, #page').animate({
scrollTop: $("#search-wrapper").offset().top - 250
}, 100);
console.log('click');
myLazyLoad.update();
trim_text();
}, 100);
}
});
......
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
......@@ -61,7 +61,11 @@ if ( !empty( $terms ) && !is_wp_error( $terms ) ){
}
?>
<img src='<?= $image ?>' loading="eager" alt='<?= $image_alt ?>' />
<img src='#' data-src="<?= $image ?>" class='lazy' alt='<?= $image_alt ?>' />
</div>
<?php endif; ?>
<div class='content'>
......
......@@ -48,17 +48,7 @@ var Search = (function($) {
$('.badge').show();
})
if ($(window).width() < 960) {
$( ".search-result .entry-summary, .content p" ).each(function() {
var yourString = $(this).text();
var maxLength = 160;
if (yourString.length > maxLength) {
var trimmedString = yourString.substr(0, maxLength);
trimmedString = trimmedString.substr(0, Math.min(trimmedString.length, trimmedString.lastIndexOf(" ")));
$(this).text(trimmedString + "...");
}
});
}
}
return {
......
......@@ -35,6 +35,7 @@ window.tz_checkVisible = function(elm, evalType , offset, heightBuffer) {
jQuery(document).ready(function($) {
trim_text();
$('#relevant-resources').dataTable( {
info: false,
ordering: false,
......@@ -53,6 +54,21 @@ jQuery(document).ready(function($) {
});
function trim_text(){
if ($(window).width() < 960) {
$( ".search-result .entry-summary, .content p" ).each(function() {
var yourString = $(this).text();
var maxLength = 160;
if (yourString.length > maxLength) {
var trimmedString = yourString.substr(0, maxLength);
trimmedString = trimmedString.substr(0, Math.min(trimmedString.length, trimmedString.lastIndexOf(" ")));
$(this).text(trimmedString + "...");
}
});
}
}
(function() {
var origOpen = XMLHttpRequest.prototype.open;
......@@ -63,7 +79,8 @@ jQuery(document).ready(function($) {
$('html, body, #page').animate({
scrollTop: $("#search-wrapper").offset().top - 250
}, 100);
console.log('click');
myLazyLoad.update();
trim_text();
}, 100);
}
});
......
......@@ -31,7 +31,7 @@
@media screen and (max-width: 59.375rem) {
flex-basis: 100%;
max-width: 100%;
max-height: unset;
max-height: 200px;
max-width: 100%;
min-height: unset;
margin-right: 0px;
......
......@@ -48,7 +48,7 @@
border: 1px solid #bebebe;
@media screen and (max-width: 59.375rem) {
max-width: 100%;
max-height: unset;
max-height: 200px;
max-width: 100%;
min-height: unset;
}
......
......@@ -2,6 +2,6 @@
Theme Name: MSF CA Child
Author: Tenzing Communications
Template: msf-ca
Version: 1.0.485
Version: 1.0.486
*/
......