FED Scripts https://www.quailhollowclub.com/A_Master/library/js/overridePhotoAlbum.js .mpContent’); //nav-basic for main and subnav $j(‘.nav-offcanvas ul.level0, .nav-utility > ul’).addClass(‘ul-basic clearfix’); $j(‘body.page’).addClass(‘offcanvas offcanvas-right’); $j(‘[data-toggle=”offcanvas”], [data-toggle=”offcanvas-close”], .nav-modal’).click(function () { $j(‘.offcanvas’).toggleClass(‘open-shelf’); }); //WRAPPING LINKS THAT ARE FOLDERS $j(‘.nav-offcanvas li.ulMenuItem, .sub-menu ul > li’).each(function(){ $j(this).contents().filter(function(){ return this.nodeType === 3; // Node.TEXT_NODE }).wrap(‘‘); }); $j(‘a.link-off’).click(function(e){ e.preventDefault(); }); $j(‘.nav-offcanvas .ulMenu.level0’).find(‘.ulMenu’).addClass(‘dropdown-menu’).attr(‘role’,’menu’); $j(‘.dropdown-menu’).parent().children(‘a’).append(”); $j(‘.dropdown-menu’).parent(‘li.ulMenuItem.level1’).addClass(‘dropdown’); $j(‘.dropdown-menu’).parent(‘li.ulMenuItem.level2’).addClass(‘dropdown dropdown-submenu’); $j(‘[data-toggle=dropdown]’).on(‘click’, function(event) { // Avoid following the href location when clicking event.preventDefault(); // Avoid having the menu to close when clicking event.stopPropagation(); // Re-add .open to parent sub-menu item $j(this).parent().parent().toggleClass(‘open’); //$j(this).parent().parent().find(‘ul’).parent().find(‘li.dropdown’).addClass(‘open’); }); $j(‘#content .mpContent img’).addClass(‘img-responsive’); $j(‘.adminbar’).parent().parent().parent().addClass(‘adminbar-wrap’); $j(‘.module-wrap img[src*=”1×1″]’).css(‘opacity’,0); $j(‘.footer ul.level0’).addClass(‘ul-basic ul-hz’); //sidemenu //panelbar0 $j(‘.side-menu ul.level1’).parent().addClass(‘open-panel’); $j(‘.side-menu li.ulMenuItem.level1’).each(function(){ $j(this).contents().filter(function(){ return this.nodeType === 3 // Node.TEXT_NODE }).wrap(‘‘); }); $j(‘.open-panel > a’).after(”); $j(‘.open-panel > a + .submenu-toggle, .open-panel > a.link-off’).click(function(e){ e.preventDefault(); $j(this).parent().toggleClass(‘opened’); $j(this).parent().children(‘ul.level1’).slideToggle(); }); //using scroll to responsify tabs function responsiveTabs(display) { //set the window var displayWidth = $j(‘table[id$=”tblTop”]’).outerWidth(); $j(display).css(‘width’,displayWidth); var tabs = $j(‘.RadTabStrip_Tab_responsive .levelwrap.level1 > ul > li’); var listWrap = $j(‘.RadTabStrip_Tab_responsive .levelwrap.level1 > ul’); var listWidth = 0; //set width of UL //console.log(tabs); for (i=0; i
$j(‘.GS-toggle’).on(‘click’, function () {
$j(‘.global-scripts’).toggleClass(‘minimized’)
});
$j(‘#toggle-edits’).change(function () {
if (!this.checked) {
// ^
$j(‘.clickToEditDiv’).show();
$j( ‘img[title=”Click to edit Plugin Properties”]’ ).parentsUntil( ‘table’ ).show();
$j(‘img[title=”Click to edit navigation properties”]’).parentsUntil(‘div’).show();
} else {
$j(‘.clickToEditDiv’).hide();
$j(‘img[title=”Click to edit navigation properties”]’).parentsUntil(‘div’).hide();
$j( ‘img[title=”Click to edit Plugin Properties”]’ ).parentsUntil( ‘table’ ).hide();
}
});
//js override for nav icons
$j(“div[style*=’text-align:Right’]”).addClass(‘nav–editor’).css({
float: ‘right’,
position: ‘relative’,
right: 0,
top: 12+’px’
});
//fixed header
var header = $j(‘.brand’);
var scrolled = false;
$j(window).scroll(function () {
if (120 $j(window).scrollTop() && scrolled) {
header.removeClass(‘fixed’).removeAttr(‘style’);
$j(‘#content’).removeAttr(‘style’);
scrolled = false;
}
});
//panel + callout componentry
//global cte builder
//setup tools
function cteBuild(el) {
if ($j(el).parents(‘a’).length) {
var cte = $j(el).parents(‘a’).next();
} else {
var cte = $j(el).next();
}
console.log(cte);
var imgCte = $j(el).find(‘[class*=”-img”] .clickToEditDiv’).detach();
var txtCte = $j(el).find(‘[class*=”-txt”] .clickToEditDiv’).detach();
$j(cte).find(‘[class*=”-cte-img”]’).append(imgCte);
$j(cte).find(‘[class*=”-cte-txt”]’).append(txtCte);
$j(cte).find(‘[class*=”-cte-link”] > .mpContent’).html(”);
}
//wrap item in a link
function calloutLinkWrap(el,type) {
console.log(el);
var itemLink = $j.trim($j(el).next().find(‘.’+type+’-cte-link > .mpContent’).text());
if (itemLink === ”) {
return
} else {
$j(el).wrap(‘‘); } } function staffLinkWrap(el,type) { var itemLink = $j.trim($j(el).next().find(‘.’+type+’-cte-link > .mpContent’).text()); $j(el).wrap(‘‘); } if($j(‘.staff-callouts’).length) { $j(‘.callout-item’).each(function(){ staffLinkWrap(this,’callout’); cteBuild(this); //cteBuild always called last }); } if($j(‘.callouts’).length) { $j(‘.callout-item’).each(function(){ calloutLinkWrap(this,’callout’); cteBuild(this); //cteBuild always called last }); } if($j(‘.panel-single’).length) { $j(‘.panel-single .panel-item’).each(function(){ cteBuild(this); }); } //Album Functions // Plugin Load Finish function aFirstLoad(gs){ var curIndexDiv = gs.CurrentDivID.substring(0, gs.CurrentDivID.length – 1) + gs.CurrentIndex; gs.PluginWrapper.css(‘min-height’, $j(‘#’+curIndexDiv).height()+”px”); } // On Before Transition Starts function aBeforeTransition(gs){ var curIndexDiv = gs.CurrentDivID.substring(0, gs.CurrentDivID.length – 1) + gs.CurrentIndex; var tHeight = 0; $j(‘#’+curIndexDiv).show(); tHeight = $j(‘#’+curIndexDiv).height(); $j(‘#’+curIndexDiv).hide(); gs.PluginWrapper.css(‘min-height’, tHeight+”px”); } // Resize function aScrollResize(tag){ var aScrollTarget = $j(‘[id^=”photoPluginWrapper”]’); if(tag){ aScrollTarget = $j(tag).find(‘[id^=”photoPluginWrapper”]’);} aScrollTarget.each(function(){ var pHeight = 0; if($j(this).has(‘.photoGalleryWrapDiv[style*=”z-index: 50″]’).length){ pHeight = $j(this).find(‘.photoGalleryWrapDiv[style*=”z-index: 50″]’).height(); }else{ pHeight = $j(this).find(‘.photoGalleryWrapDiv:visible’).height() } $j(this).css(‘min-height’, pHeight +”px”); }); } function aScrollResizeGallery(tag){ var aScrollTarget = $j(‘[id^=”photoPluginWrapper”]’); if(tag){ aScrollTarget = $j(tag).find(‘[id^=”photoPluginWrapper”]’);} aScrollTarget.each(function(){ var pHeight = 0; if($j(this).has(‘.photoGalleryThumbPageDiv[style*=”z-index: 50″]’).length){ pHeight = $j(this).find(‘.photoGalleryThumbPageDiv[style*=”z-index: 50″]’).height(); }else{ pHeight = $j(this).find(‘.photoGalleryThumbPageDiv:visible’).height() } $j(this).css(‘min-height’, pHeight +”px”); }); } // End Album Functions function resizeSitewrap() { aScrollResize(); aScrollResizeGallery(); // Reset Calendars eventLeft = 0; $j(‘.element-item .events-wrapper’).scrollLeft(0); } $j(window).bind(“load”, function() { resizeSitewrap(); var resizeTimer = null; $j(window).resize(function () { if (resizeTimer) { clearTimeout(resizeTimer); } resizeTimer = setTimeout(resizeSitewrap, 10); }); }); var adminLvl = -1 console.log(adminLvl); $j(‘article.callout-wrap a.callout-link’).each( function(){ var emailLink = $j(this).find(‘.callout-info a’).attr(‘href’); $j(this).attr(‘href’, emailLink); });
Source