Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • tneumann9/UNL_Search
  • erasmussen2/UNL_Search
  • JSTUREK8/UNL_Search
  • rdee2/UNL_Search
  • dxg/UNL_Search
5 results
Show changes
Showing
with 10016 additions and 7680 deletions
www/images/search-bg-1920.webp

23.5 KiB

www/images/search-bg-2560.jpg

92.1 KiB

www/images/search-bg-2560.webp

31.1 KiB

www/images/search-bg-640.jpg

16.3 KiB

www/images/search-bg-640.webp

7.8 KiB

www/images/search-bg-960.jpg

27.1 KiB

www/images/search-bg-960.webp

11.9 KiB

<?php
$cacheVersion = date('Ymd') . 'v';
$search_engine_id = '015236299699564929946:nk1siew10ie';
$config_file = __DIR__ . '/../config.sample.php';
......@@ -11,17 +11,6 @@ require_once $config_file;
use UNL\Templates\Templates;
$isEmbed = isset($_GET['embed']) && $_GET['embed'];
// While the site proper is skinned with a specific version, the templates used
// used in embed search need to be supported in legacy sites.
// ?embed=1 : 4.1
// ?embed=5.0 : 5.0
$templatePath = 'templates/4.1/';
if ($isEmbed && $_GET['embed'] === '5.0') {
$templatePath = 'templates/5.0/';
}
function renderTemplate($file, $params = array())
{
ob_start();
......@@ -32,42 +21,67 @@ function renderTemplate($file, $params = array())
function loadDefaultSections($page)
{
$page->titlegraphic = 'UNL Search';
$page->breadcrumbs = str_replace('Department', 'Search', $page->breadcrumbs);
$page->navlinks = file_get_contents('https://www.unl.edu/ucomm/sharedcode/navigation.html');
$page->titlegraphic = '<a class="dcf-txt-h5" href="/">Search</a>';
$page->contactinfo = renderTemplate('templates/local-footer.tpl.php');
$page->affiliation = '';
//Convert relative paths to absolute
$page->navlinks = UNL_Search::removeRelativePaths($page->navlinks, 'https://www.unl.edu/');
}
$localScriptUrl = './js/search.min.js?v=4.1.20';
$pageTemplate = 'Fixed';
$isEmbed = isset($_GET['embed']) && $_GET['embed'];
if (UNL_Search::$mode === 'debug') {
$pageTemplate = 'Local';
$localScriptUrl = './js/search.js';
}
// While the site proper is skinned with a specific version, the templates used
// used in embed search need to be supported in legacy sites.
// ?embed=1 : 4.1
// ?embed=(not 1) : 5.3
if ($isEmbed && $_GET['embed'] === '1') {
$pageTemplate = 'Fixed';
$page = Templates::factory($pageTemplate, Templates::VERSION_4_1);
$templatePath = 'templates/4.1/';
$page->addStyleSheet('css/search.css?v=' . $cacheVersion);
$localScriptUrl = './js/search.min.js?v=' . $cacheVersion;
if (UNL_Search::$mode === 'debug') {
$pageTemplate = 'Local';
$localScriptUrl = './js/search.js';
}
$page = Templates::factory($pageTemplate, Templates::VERSION_4_1);
} else {
$pageTemplate = 'AppLocal';
$page = Templates::factory($pageTemplate, Templates::VERSION_5_3);
$templatePath = 'templates/5.0/';
if (!$isEmbed) {
if (file_exists(__DIR__ . '/wdn/templates_4.1')) {
$page->setLocalIncludePath(__DIR__);
$localScriptUrl = './js/search-tabs.min.js?v=' . $cacheVersion;
if (UNL_Search::$mode === 'debug') {
$pageTemplate = 'Local';
$localScriptUrl = './js/search-tabs.js';
}
if (!$isEmbed) {
if (file_exists(__DIR__ . '/wdn/templates_5.3')) {
$page->setLocalIncludePath(__DIR__);
}
if (isset($siteNotice) && $siteNotice->display) {
$page->displayDCFNoticeMessage($siteNotice->title, $siteNotice->message, $siteNotice->type, $siteNotice->noticePath, $siteNotice->containerID);
}
$page->doctitle = '<title>Search | University of Nebraska&ndash;Lincoln</title>';
$page->head .= '<link rel="home" href="./" />';
// no menu items, so hide mobile menu
$page->addStyleDeclaration("#dcf-mobile-toggle-menu {display: none!important}");
// in search, so hide search
$page->addStyleDeclaration("#dcf-mobile-toggle-search, #dcf-search {display: none!important}");
}
$page->doctitle = '<title>Search | University of Nebraska&ndash;Lincoln</title>';
$page->head = '<link rel="home" href="./" />';
$page->pagetitle = '';
$page->breadcrumbs = renderTemplate('templates/breadcrumbs.tpl.php');
$page->addStyleSheet('css/search-5.0.css?v=' . $cacheVersion);
}
$localResults = '';
$context = '';
$page->addStyleSheet('css/search.css?v=20161215');
//u is referring site
if (isset($_GET['u']) && $scanned = UNL_Search::getScannedPage($_GET['u'])) {
// Add local site search results
......@@ -77,7 +91,7 @@ if (isset($_GET['u']) && $scanned = UNL_Search::getScannedPage($_GET['u'])) {
//require_once 'HTMLPurifier.auto.php';
$config = HTMLPurifier_Config::createDefault();
$config->set('Cache.SerializerPath', '/tmp');
//Trick the purifier into accepting HTML5 elements/attributes
$config->set('HTML.DefinitionID', 'html5-definitions'); // unqiue id
$config->set('HTML.DefinitionRev', 1);
......@@ -85,21 +99,17 @@ if (isset($_GET['u']) && $scanned = UNL_Search::getScannedPage($_GET['u'])) {
//Allow everything to have a role
$def->addAttribute('*', 'role', 'Text');
}
$purifier = new HTMLPurifier($config);
$page->head .= '<link rel="home" href="'.htmlentities($_GET['u'], ENT_QUOTES).'" />';
$page->head .= '<link rel="home" href="'.htmlentities($_GET['u'], ENT_QUOTES).'" />';
$page->titlegraphic = $purifier->purify(str_replace(array('<h1>', '</h1>'), '', $scanned->titlegraphic));
$page->affiliation = '';
foreach (array('breadcrumbs', 'navlinks', 'leftcollinks', 'contactinfo', 'affiliation') as $region) {
foreach (array('contactinfo', 'affiliation') as $region) {
if (isset($scanned->{$region}) && !empty($scanned->{$region})) {
$scannedContent = $scanned->{$region};
switch ($region) {
case 'breadcrumbs':
case 'navlinks':
$scannedContent = UNL_Search::removeRelativePaths($scannedContent, $_GET['u']);
break;
case 'contactinfo':
$scannedContent = preg_replace('#<h3>.*</h3>#', '', $scannedContent);
break;
......@@ -122,7 +132,7 @@ if (isset($_GET['u']) && $scanned = UNL_Search::getScannedPage($_GET['u'])) {
}
$localResults = renderTemplate($templatePath . 'google-results.tpl.php', array(
'title' => $page->titlegraphic,
'title' => $page->titlegraphic, // leave for backwards compatibility for 4.1
'id' => 'local_results',
));
} elseif (!$isEmbed) {
......@@ -130,26 +140,36 @@ if (isset($_GET['u']) && $scanned = UNL_Search::getScannedPage($_GET['u'])) {
loadDefaultSections($page);
}
$initialQuery = json_encode(isset($_GET['q']) ? $_GET['q'] : '');
$context = json_encode($context);
$maincontent = '';
if (!$isEmbed) {
$maincontent .= renderTemplate('templates/search-form.tpl.php', array('local_results' => $localResults));
}
$maincontent .= renderTemplate($templatePath . 'search-results.tpl.php', array(
'isEmbed' => $isEmbed,
'local_results' => $localResults
));
$initialQuery = json_encode(isset($_GET['q']) ? $_GET['q'] : '');
$context = json_encode($context);
if ($isEmbed || !empty($_GET['q'])) {
$maincontent .= renderTemplate($templatePath . 'search-results.tpl.php', array(
'isEmbed' => $isEmbed,
'local_results' => $localResults,
'localTitle' => $page->titlegraphic
));
}
$maincontent .= renderTemplate($templatePath . 'end-scripts.tpl.php', array(
$endScript = renderTemplate($templatePath . 'end-scripts.tpl.php', array(
'localScriptUrl' => $localScriptUrl,
'googleLoaderUrl' => 'https://cse.google.com/cse.js?cx=' . $search_engine_id,
'initialQuery' => $initialQuery,
'localContext' => $context,
'cacheVersion' => $cacheVersion
));
if ($isEmbed) {
$maincontent .= $endScript;
} else {
$page->jsbody .= $endScript;
}
if (!$isEmbed) {
$page->maincontentarea = $maincontent;
echo $page;
......@@ -164,5 +184,6 @@ if (UNL_Search::$mode === 'debug') {
echo renderTemplate($template, array(
'head' => $page->head,
'maincontent' => $maincontent
'maincontent' => $maincontent,
'cacheVersion' => $cacheVersion
));
/*.map
/search.min.js
/embed
This diff is collapsed.
define(['jquery', 'analytics'], function ($, analytics) {
"use strict";
// Service server (defaults to //directory.unl.edu)
var directoryServer = null;
var unlContext = '015236299699564929946:nk1siew10ie';
var transitionDelay = 400;
var inputSel = '#search_q';
var formSel = '#searchform form';
var wrapperMain = '#search_wrapper';
var dirPeopleResults = 'ppl_results';
var dirDeptResults = 'dept_results';
window.pf_getUID = function() {
return true;
};
// Caching Class
var Cache = function() {
this.storage = {};
};
Cache.prototype.get = function(key) {
return this.storage[key] || undefined;
};
Cache.prototype.save = function(key, value) {
this.storage[key] = value;
return this;
};
// Directory Controller Class
var Directory = function(server, peopleContainerId, deptContainerId) {
this.peopleContainer = '#' + peopleContainerId;
this.deptContainer = '#' + deptContainerId;
this._server = server || 'https://directory.unl.edu';
this._cache = new Cache();
this._searchCanceled = false;
$(this.peopleContainer).on('click', '.fn a', function() {
if (this.target !== '_blank') {
this.target = '_blank';
}
});
$(this.deptContainer).on('click', '.fn a', function() {
if (this.target !== '_blank') {
this.target = '_blank';
}
});
};
Directory.prototype._render = function(data) {
if (this._searchCanceled) {
return;
}
// render people results
$(this.peopleContainer).html(data);
this._renderState('people', this.peopleContainer);
// render dept results
$(this.deptContainer).html(data);
this._renderState('dept', this.deptContainer);
};
Directory.prototype._renderState = function(type, container) {
var $innerRes = $('.results', $(container)),
$showRes, $hideRes,
depFilter = '.departments';
if (!$innerRes.length) {
return;
}
if (type === 'people') {
$showRes = $innerRes.not(depFilter);
$hideRes = $innerRes.filter(depFilter);
} else {
$showRes = $innerRes.filter(depFilter);
$hideRes = $innerRes.not(depFilter);
}
if (!$showRes.length) {
$(container).html('Sorry, no results could be found.');
// if no people results show dept results
if (type === 'people') {
var dirTab = document.getElementsByClassName('dept-results-tab')[0];
if (dirTab) {
dirTab.click();
dirTab.blur();
}
}
}
$hideRes.hide();
};
Directory.prototype.cancelSearch = function() {
this._searchCanceled = true;
if (this._xhr) {
this._xhr.abort();
}
};
Directory.prototype.execute = function(q) {
var cacheData = this._cache.get(q),
self = this;
this._searchCanceled = false;
if (this._xhr) {
this._xhr.abort();
}
if (cacheData) {
this._render(cacheData);
} else {
this._xhr = $.get(this._server + '/service.php?q=' + encodeURIComponent(q), function(data) {
self._cache.save(q, data);
self._render(data);
});
}
};
Directory.prototype.clearAllResults = function() {
$(this.peopleContainer).empty();
$(this.deptContainer).empty();
};
// Google Search Wrapper Class
var GoogleSearcher = function(search_element, root_of_element) {
this.control = search_element;
this.control.root = root_of_element;
}
GoogleSearcher.prototype.setSearchCompleteCallback = function(callback) {
this.complete_callback = callback;
}
GoogleSearcher.prototype.setSearchStartingCallback = function(callback) {
this.starting_callback = callback;
}
GoogleSearcher.prototype.execute = function(query) {
this.starting_callback(this.control, null, query);
this.control.execute(query);
this.complete_callback(this.control);
}
return {
initialize: function(firstQ, localContext) {
// query related
var query = '';
// CustomSearchControl instances and config
var unlGoogleSearch;
var localGoogleSearch;
var directorySearch;
var searchToggleLock = false;
var trackQuery = function(q) {
var loc = window.location,
qs = loc.search.replace(/(?:(\?)|&)q=[^&]*(?:&|$)/, '$1'),
page = [
loc.pathname,
qs || '?',
(qs && qs != '?') ? '&' : '',
'q=',
encodeURIComponent(q)
].join('');
analytics.callTrackPageview(page);
if (window.history.pushState) {
window.history.pushState({query: q}, '', page);
}
};
var queryComplete = function(control) {
var $root = $(control.root);
// a11y patching
$('img.gs-image', $root).each(function() {
if (!this.alt) {
this.alt = $(this).closest('.gsc-table-result').find('.gs-title').first().text();
}
});
$('img.gcsc-branding-img-noclear', $root).attr('alt', 'Google™');
setTimeout(function() {
if ($('.gsc-table-result', $root).length == 0 && $('.gs-no-results-result', $root).length == 0 && $('#recaptcha-wrapper', $root).length == 0) {
var data = new FormData();
data.set("error", "Failed To Load");
fetch("/failCount.php", {
method: "POST",
body: data
});
$($root).html('<p>We are having issues connecting to Google, please try again later.</p>');
}
if ($('#recaptcha-wrapper', $root).length > 0){
var data = new FormData();
data.set("error", "Recaptcha");
fetch("/failCount.php", {
method: "POST",
body: data
});
}
if (!searchToggleLock && localGoogleSearch && control == localGoogleSearch.control && $('.gs-no-results-result', $root).length) {
var allUNLTab = document.getElementsByClassName('all-unl-tab')[0];
if (allUNLTab) {
allUNLTab.click();
allUNLTab.blur();
}
return;
}
}, 1000);
searchToggleLock = false;
};
var fullQuery = function(q, track) {
if (track !== false) {
trackQuery(q);
}
try {
unlGoogleSearch.execute(q);
localGoogleSearch.execute(q);
} catch (e) {
queryComplete(unlGoogleSearch.control);
}
directorySearch.execute(q);
$(wrapperMain).fadeIn();
};
var fullStop = function() {
unlGoogleSearch.cancelSearch();
localGoogleSearch.cancelSearch();
directorySearch.cancelSearch();
$(wrapperMain).fadeOut();
setTimeout(function() {
unlGoogleSearch.clearAllResults();
localGoogleSearch.clearAllResults();
directorySearch.clearAllResults();
}, transitionDelay);
};
var queryStart = function(control, searcher, q) {
if (q !== query) {
trackQuery(q);
directorySearch.execute(q);
}
};
directorySearch = new Directory(directoryServer, dirPeopleResults, dirDeptResults);
// Setup DOM on ready
$(function() {
var $q = $(inputSel),
googleOrigin = /^https?:\/\/.*\.google\.com$/,
isValidOrigin = function(origin) {
if (googleOrigin.test(origin)) {
return false;
}
// don't allow self origin or browser extension origins
if (origin == location.origin || /^chrome:/.test(origin)) {
return false;
}
return true;
},
passiveQuery = function(q, track) {
if (query === q) {
return;
}
query = q;
$q.val(q);
if (q) {
fullQuery(q, track);
} else {
fullStop();
}
};
var render_attrs = {
div: 'unl_results',
tag: 'searchresults-only',
attributes: {
enableImageSearch: false
}
}
// draw the Google search results stuff
google.search.cse.element.render(render_attrs);
// bind the search results element to this class
var searchElement = google.search.cse.element.getAllElements()['searchresults-only0'];
window.googleSearchElement = searchElement;
unlGoogleSearch = new GoogleSearcher(searchElement, $('#unl_results'));
unlGoogleSearch.setSearchStartingCallback(queryStart);
unlGoogleSearch.setSearchCompleteCallback(queryComplete);
if (localContext) {
var render_attrs_local = {
div: 'local_results',
tag: 'searchresults-only',
attributes: {
enableImageSearch: false,
as_sitesearch: localContext
}
}
google.search.cse.element.render(render_attrs_local);
var localSearchElement = google.search.cse.element.getAllElements()['searchresults-only1'];
window.localGoogleSearchElement = searchElement;
localGoogleSearch = new GoogleSearcher(localSearchElement, $('#local_results'));
localGoogleSearch.setSearchStartingCallback(queryStart);
localGoogleSearch.setSearchCompleteCallback(queryComplete);
}
// a11y patch Google search box
$('form.gsc-search-box').remove();
// listen for the submit event
$(formSel).submit(function(e) {
e.preventDefault();
var q = $.trim($q.val());
passiveQuery(q);
});
// issue an inital query
if (firstQ) {
passiveQuery(firstQ, false);
}
// listen for message from parent frames
$(window).on('message', function(e) {
var oEvent = e.originalEvent, q;
if (!isValidOrigin(oEvent.origin)) {
return;
}
// Chrome iOS issues a message on touch that is an object with
// oEvent.data.type = 'org.chromium.contextMenuMessage'.
// We will just ignore anything that isn't a string, which is what is
// expected from the parent window with wdntemplates's embedded search.
if (typeof oEvent.data !== 'string') {
return;
}
q = $.trim(oEvent.data);
passiveQuery(q);
});
$(window).on('popstate', function(e) {
var oEvent = e.originalEvent,
q = firstQ || '';
if (oEvent.state) {
q = oEvent.state.query || '';
}
passiveQuery(q, false);
});
// trigger iframe search close from
if (window.parent && window.self !== window.top) {
$(document).on('keydown', function(e) {
if (e.keyCode === 27) {
window.parent.postMessage('wdn.search.close', "*");
}
});
}
});
}
};
});
define(["jquery","analytics"],function(a,b){"use strict";var c=null,d=400,e="#search_q",f="#searchform form",g="#search_wrapper",h="ppl_results",i="dept_results";window.pf_getUID=function(){return!0};var j=function(){this.storage={}};j.prototype.get=function(a){return this.storage[a]||void 0},j.prototype.save=function(a,b){return this.storage[a]=b,this};var k=function(b,c,d){this.peopleContainer="#"+c,this.deptContainer="#"+d,this._server=b||"https://directory.unl.edu",this._cache=new j,this._searchCanceled=!1,a(this.peopleContainer).on("click",".fn a",function(){"_blank"!==this.target&&(this.target="_blank")}),a(this.deptContainer).on("click",".fn a",function(){"_blank"!==this.target&&(this.target="_blank")})};k.prototype._render=function(b){this._searchCanceled||(a(this.peopleContainer).html(b),this._renderState("people",this.peopleContainer),a(this.deptContainer).html(b),this._renderState("dept",this.deptContainer))},k.prototype._renderState=function(b,c){var d,e,f=a(".results",a(c)),g=".departments";if(f.length){if("people"===b?(d=f.not(g),e=f.filter(g)):(d=f.filter(g),e=f.not(g)),!d.length&&(a(c).html("Sorry, no results could be found."),"people"===b)){var h=document.getElementsByClassName("dept-results-tab")[0];h&&(h.click(),h.blur())}e.hide()}},k.prototype.cancelSearch=function(){this._searchCanceled=!0,this._xhr&&this._xhr.abort()},k.prototype.execute=function(b){var c=this._cache.get(b),d=this;this._searchCanceled=!1,this._xhr&&this._xhr.abort(),c?this._render(c):this._xhr=a.get(this._server+"/service.php?q="+encodeURIComponent(b),function(a){d._cache.save(b,a),d._render(a)})},k.prototype.clearAllResults=function(){a(this.peopleContainer).empty(),a(this.deptContainer).empty()};var l=function(a,b){this.control=a,this.control.root=b};return l.prototype.setSearchCompleteCallback=function(a){this.complete_callback=a},l.prototype.setSearchStartingCallback=function(a){this.starting_callback=a},l.prototype.execute=function(a){this.starting_callback(this.control,null,a),this.control.execute(a),this.complete_callback(this.control)},{initialize:function(j,m){var n,o,p,q="",r=!1,s=function(a){var c=window.location,d=c.search.replace(/(?:(\?)|&)q=[^&]*(?:&|$)/,"$1"),e=[c.pathname,d||"?",d&&"?"!=d?"&":"","q=",encodeURIComponent(a)].join("");b.callTrackPageview(e),window.history.pushState&&window.history.pushState({query:a},"",e)},t=function(b){var c=a(b.root);a("img.gs-image",c).each(function(){this.alt||(this.alt=a(this).closest(".gsc-table-result").find(".gs-title").first().text())}),a("img.gcsc-branding-img-noclear",c).attr("alt","Google™"),setTimeout(function(){if(0==a(".gsc-table-result",c).length&&0==a(".gs-no-results-result",c).length&&0==a("#recaptcha-wrapper",c).length){var d=new FormData;d.set("error","Failed To Load"),fetch("/failCount.php",{method:"POST",body:d}),a(c).html("<p>We are having issues connecting to Google, please try again later.</p>")}if(a("#recaptcha-wrapper",c).length>0){var d=new FormData;d.set("error","Recaptcha"),fetch("/failCount.php",{method:"POST",body:d})}if(!r&&o&&b==o.control&&a(".gs-no-results-result",c).length){var e=document.getElementsByClassName("all-unl-tab")[0];return void(e&&(e.click(),e.blur()))}},1e3),r=!1},u=function(b,c){!1!==c&&s(b);try{n.execute(b),o.execute(b)}catch(d){t(n.control)}p.execute(b),a(g).fadeIn()},v=function(){n.cancelSearch(),o.cancelSearch(),p.cancelSearch(),a(g).fadeOut(),setTimeout(function(){n.clearAllResults(),o.clearAllResults(),p.clearAllResults()},d)},w=function(a,b,c){c!==q&&(s(c),p.execute(c))};p=new k(c,h,i),a(function(){var b=a(e),c=/^https?:\/\/.*\.google\.com$/,d=function(a){return!c.test(a)&&(a!=location.origin&&!/^chrome:/.test(a))},g=function(a,c){q!==a&&(q=a,b.val(a),a?u(a,c):v())},h={div:"unl_results",tag:"searchresults-only",attributes:{enableImageSearch:!1}};google.search.cse.element.render(h);var i=google.search.cse.element.getAllElements()["searchresults-only0"];if(window.googleSearchElement=i,n=new l(i,a("#unl_results")),n.setSearchStartingCallback(w),n.setSearchCompleteCallback(t),m){var k={div:"local_results",tag:"searchresults-only",attributes:{enableImageSearch:!1,as_sitesearch:m}};google.search.cse.element.render(k);var p=google.search.cse.element.getAllElements()["searchresults-only1"];window.localGoogleSearchElement=i,o=new l(p,a("#local_results")),o.setSearchStartingCallback(w),o.setSearchCompleteCallback(t)}a("form.gsc-search-box").remove(),a(f).submit(function(c){c.preventDefault();var d=a.trim(b.val());g(d)}),j&&g(j,!1),a(window).on("message",function(b){var c,e=b.originalEvent;d(e.origin)&&"string"==typeof e.data&&(c=a.trim(e.data),g(c))}),a(window).on("popstate",function(a){var b=a.originalEvent,c=j||"";b.state&&(c=b.state.query||""),g(c,!1)}),window.parent&&window.self!==window.top&&a(document).on("keydown",function(a){27===a.keyCode&&window.parent.postMessage("wdn.search.close","*")})})}}});
//# sourceMappingURL=search-tabs.min.js.map
\ No newline at end of file
{"version":3,"sources":["search-tabs.js"],"names":["define","$","analytics","directoryServer","transitionDelay","inputSel","formSel","wrapperMain","dirPeopleResults","dirDeptResults","window","pf_getUID","Cache","this","storage","prototype","get","key","undefined","save","value","Directory","server","peopleContainerId","deptContainerId","peopleContainer","deptContainer","_server","_cache","_searchCanceled","on","target","_render","data","html","_renderState","type","container","$showRes","$hideRes","$innerRes","depFilter","length","not","filter","dirTab","document","getElementsByClassName","click","blur","hide","cancelSearch","_xhr","abort","execute","q","cacheData","self","encodeURIComponent","clearAllResults","empty","GoogleSearcher","search_element","root_of_element","control","root","setSearchCompleteCallback","callback","complete_callback","setSearchStartingCallback","starting_callback","query","initialize","firstQ","localContext","unlGoogleSearch","localGoogleSearch","directorySearch","searchToggleLock","trackQuery","loc","location","qs","search","replace","page","pathname","join","callTrackPageview","history","pushState","queryComplete","$root","each","alt","closest","find","first","text","attr","setTimeout","FormData","set","fetch","method","body","allUNLTab","fullQuery","track","e","fadeIn","fullStop","fadeOut","queryStart","searcher","$q","googleOrigin","isValidOrigin","origin","test","passiveQuery","val","render_attrs","div","tag","attributes","enableImageSearch","google","cse","element","render","searchElement","getAllElements","googleSearchElement","render_attrs_local","as_sitesearch","localSearchElement","localGoogleSearchElement","remove","submit","preventDefault","trim","oEvent","originalEvent","state","parent","top","keyCode","postMessage"],"mappings":"AAAAA,QAAQ,SAAU,aAAc,SAAUC,EAAGC,GAC5C,YAGA,IAAIC,GAAkB,KAElBC,EAAkB,IAClBC,EAAW,YACXC,EAAU,mBACVC,EAAc,kBACdC,EAAmB,cACnBC,EAAiB,cAErBC,QAAOC,UAAY,WAClB,OAAO,EAIR,IAAIC,GAAQ,WACXC,KAAKC,WAENF,GAAMG,UAAUC,IAAM,SAASC,GAC9B,MAAOJ,MAAKC,QAAQG,QAAQC,IAE7BN,EAAMG,UAAUI,KAAO,SAASF,EAAKG,GAEpC,MADAP,MAAKC,QAAQG,GAAOG,EACbP,KAIR,IAAIQ,GAAY,SAASC,EAAQC,EAAmBC,GACnDX,KAAKY,gBAAkB,IAAMF,EAC7BV,KAAKa,cAAgB,IAAMF,EAC3BX,KAAKc,QAAUL,GAAU,4BACzBT,KAAKe,OAAS,GAAIhB,GAClBC,KAAKgB,iBAAkB,EAErB5B,EAAEY,KAAKY,iBAAiBK,GAAG,QAAS,QAAS,WACrB,WAAhBjB,KAAKkB,SACLlB,KAAKkB,OAAS,YAItB9B,EAAEY,KAAKa,eAAeI,GAAG,QAAS,QAAS,WACnB,WAAhBjB,KAAKkB,SACLlB,KAAKkB,OAAS,YAIzBV,GAAUN,UAAUiB,QAAU,SAASC,GAClCpB,KAAKgB,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 -42,20 +42,21 @@ define(['jquery', 'analytics'], function ($, analytics) {
var Directory = function(server, containerId) {
var cntSel = '#' + containerId;
this._server = server || '//directory.unl.edu';
this._server = server || 'https://directory.unl.edu';
this._cache = new Cache();
this._searchCanceled = false;
this._viewState = 0;
this._renderTo = cntSel;
$(function() {
$(cntSel).on('click', '.fn a', function() {
if (this.target !== '_blank') {
this.target = '_blank';
}
});
});
};
$(function() {
$(cntSel).on('click', '.fn a', function() {
if (this.target !== '_blank') {
this.target = '_blank';
}
});
});
};
Directory.prototype._render = function(data) {
if (this._searchCanceled) {
return;
......@@ -195,6 +196,24 @@ define(['jquery', 'analytics'], function ($, analytics) {
$('img.gcsc-branding-img-noclear', $root).attr('alt', 'Google™');
setTimeout(function() {
if ($('.gsc-result', $root).length == 0) {
var data = new FormData();
data.set("error", "No Results");
fetch("/failCount.php", {
method: "POST",
body: data
});
$($root).html('<p>We are having issues connecting to Google, please try again later.</p>');
}
if ($('#recaptcha-wrapper', $root).length > 0){
var data = new FormData();
data.set("error", "Recaptcha");
fetch("/failCount.php", {
method: "POST",
body: data
});
}
if (!searchToggleLock && localGoogleSearch && control == localGoogleSearch.control && $('.gs-no-results-result', $root).length) {
$root.closest('.results-group').find('.result-tab li:last-child').click();
return;
......@@ -381,6 +400,14 @@ define(['jquery', 'analytics'], function ($, analytics) {
return;
}
// Chrome iOS issues a message on touch that is an object with
// oEvent.data.type = 'org.chromium.contextMenuMessage'.
// We will just ignore anything that isn't a string, which is what is
// expected from the parent window with wdntemplates's embedded search.
if (typeof oEvent.data !== 'string') {
return;
}
q = $.trim(oEvent.data);
passiveQuery(q);
});
......
define(["jquery","analytics"],function(a,b){"use strict";var c=null,d=400,e="#search_q",f="#searchform form",g=".search-results",h=".google-results",i="statechange",j="#search_wrapper",k="#search_results",l="#directory_results",m="ppl_results";window.pf_getUID=function(){return!0};var n=function(){this.storage={}};n.prototype.get=function(a){return this.storage[a]||void 0},n.prototype.save=function(a,b){return this.storage[a]=b,this};var o=function(b,c){var d="#"+c;this._server=b||"https://directory.unl.edu",this._cache=new n,this._searchCanceled=!1,this._viewState=0,this._renderTo=d,a(function(){a(d).on("click",".fn a",function(){"_blank"!==this.target&&(this.target="_blank")})})};o.prototype._render=function(b){this._searchCanceled||(a(this._renderTo).html(b).addClass("active"),this._renderState(0))},o.prototype._renderState=function(b){var c,d,e=a(".results",a(this._renderTo)),f=".departments";if(e.length){if(e.slideUp(b),0===this._viewState?(c=e.not(f),d=1):(c=e.filter(f),d=0),!c.length&&void 0!==b)return void this.changeViewState(d);c.slideDown()}},o.prototype.cancelSearch=function(){this._searchCanceled=!0,this._xhr&&this._xhr.abort()},o.prototype.execute=function(b){var c=this._cache.get(b),d=this;this._searchCanceled=!1,this._xhr&&this._xhr.abort(),c?this._render(c):this._xhr=a.get(this._server+"/service.php?q="+encodeURIComponent(b),function(a){d._cache.save(b,a),d._render(a)})},o.prototype.changeViewState=function(b){if(this._viewState!=b){var c=this._viewState;this._viewState=b,this._renderState(),a(this._renderTo).trigger(i,[b,c])}},o.prototype.clearAllResults=function(){a(this._renderTo).empty()};var p=function(a,b){this.control=a,this.control.root=b};return p.prototype.setSearchCompleteCallback=function(a){this.complete_callback=a},p.prototype.setSearchStartingCallback=function(a){this.starting_callback=a},p.prototype.execute=function(a){this.starting_callback(this.control,null,a),this.control.execute(a),this.complete_callback(this.control)},{initialize:function(n,q){var r,s,t,u,v="",w="active",x=!1,y=function(a){var c=window.location,d=c.search.replace(/(?:(\?)|&)q=[^&]*(?:&|$)/,"$1"),e=[c.pathname,d||"?",d&&"?"!=d?"&":"","q=",encodeURIComponent(a)].join("");b.callTrackPageview(e),window.history.pushState&&window.history.pushState({query:a},"",e)},z=function(b){var c=a(b.root);a("img.gs-image",c).each(function(){this.alt||(this.alt=a(this).closest(".gsc-table-result").find(".gs-title").first().text())}),a("img.gcsc-branding-img-noclear",c).attr("alt","Google™"),setTimeout(function(){if(0==a(".gsc-result",c).length){var d=new FormData;d.set("error","No Results"),fetch("/failCount.php",{method:"POST",body:d}),a(c).html("<p>We are having issues connecting to Google, please try again later.</p>")}if(a("#recaptcha-wrapper",c).length>0){var d=new FormData;d.set("error","Recaptcha"),fetch("/failCount.php",{method:"POST",body:d})}if(!x&&t&&b==t.control&&a(".gs-no-results-result",c).length)return void c.closest(".results-group").find(".result-tab li:last-child").click()},1e3),c.closest(g).addClass(w),c.closest(h).slideDown(),x=!1},A=function(b,c){!1!==c&&y(b);try{r.execute(b)}catch(d){z(r.control)}u.execute(b),a(j).fadeIn()},B=function(){u.cancelSearch(),a(g).removeClass(w),a(j).fadeOut(),setTimeout(function(){r.control.clearAllResults(),u.clearAllResults()},d)},C=function(b,c,d){a(b.root).closest(h).slideUp(0),d!==v&&(y(d),u.execute(d))};u=new o(c,m),a(function(){var b=a(e),c=".results-group",d=".result-tab",g="selected",j="state-",m=a(".result-tab"),o=function(b,c,e){var f=a(this).find(d);b.stopPropagation(),f.removeClass(j+e),f.addClass(j+c),f.children().removeClass(g).eq(c).addClass(g)},w=/^https?:\/\/.*\.google\.com$/,y=function(a){return!w.test(a)&&(a!=location.origin&&!/^chrome:/.test(a))},D=function(a,c){v!==a&&(v=a,b.val(a),a?A(a,c):B())};a("#unl_results").hide();var E={div:"unl_results",tag:"searchresults-only",attributes:{enableImageSearch:!1}};google.search.cse.element.render(E);var F=google.search.cse.element.getAllElements()["searchresults-only0"];if(window.googleSearchElement=F,s=new p(F,a("#unl_results")),s.setSearchStartingCallback(C),s.setSearchCompleteCallback(z),r=s,q){var G={div:"local_results",tag:"searchresults-only",attributes:{enableImageSearch:!1,as_sitesearch:q}};google.search.cse.element.render(G);var H=google.search.cse.element.getAllElements()["searchresults-only1"];window.localGoogleSearchElement=F,t=new p(H,a("#local_results")),t.setSearchStartingCallback(C),t.setSearchCompleteCallback(z),r=t}a("form.gsc-search-box").remove(),a("li:first-child",m).addClass(g),a(m).on("click","li",function(b){if(b.preventDefault(),!a(this).hasClass(g)){var d=a(this).index(),e=a(this).parents(c);e.is(l)?u.changeViewState(d):e.is(k)&&(x=!0,a(r.control.root).closest(h).slideUp().trigger(i,[d,0+!d]),r=0===d?t:s,r.execute(v))}}),a(c).on(i,o),a(f).submit(function(c){c.preventDefault();var d=a.trim(b.val());D(d)}),n&&D(n,!1),a(window).on("message",function(b){var c,d=b.originalEvent;y(d.origin)&&"string"==typeof d.data&&(c=a.trim(d.data),D(c))}),a(window).on("popstate",function(a){var b=a.originalEvent,c=n||"";b.state&&(c=b.state.query||""),D(c,!1)}),window.parent&&a(document).on("keydown",function(a){27===a.keyCode&&window.parent.postMessage("wdn.search.close","*")})})}}});
//# sourceMappingURL=search.min.js.map
\ No newline at end of file
{"version":3,"sources":["search.js"],"names":["define","$","analytics","directoryServer","transitionDelay","inputSel","formSel","resultSel","googleSel","evtStateChange","wrapperMain","wrapperWeb","wrapperDir","dirResults","window","pf_getUID","Cache","this","storage","prototype","get","key","undefined","save","value","Directory","server","containerId","cntSel","_server","_cache","_searchCanceled","_viewState","_renderTo","on","target","_render","data","html","addClass","_renderState","duration","$showRes","failState","$innerRes","depFilter","length","slideUp","not","filter","changeViewState","slideDown","cancelSearch","_xhr","abort","execute","q","cacheData","self","encodeURIComponent","state","prevState","trigger","clearAllResults","empty","GoogleSearcher","search_element","root_of_element","control","root","setSearchCompleteCallback","callback","complete_callback","setSearchStartingCallback","starting_callback","query","initialize","firstQ","localContext","activeSearch","unlGoogleSearch","localGoogleSearch","directorySearch","actCls","searchToggleLock","trackQuery","loc","location","qs","search","replace","page","pathname","join","callTrackPageview","history","pushState","queryComplete","$root","each","alt","closest","find","first","text","attr","setTimeout","FormData","set","fetch","method","body","click","fullQuery","track","e","fadeIn","fullStop","removeClass","fadeOut","queryStart","searcher","$q","resSel","tabsSel","selCls","stateClsPfx","$resTabs","tabStateChange","$tab","stopPropagation","children","eq","googleOrigin","isValidOrigin","origin","test","passiveQuery","val","hide","render_attrs","div","tag","attributes","enableImageSearch","google","cse","element","render","searchElement","getAllElements","googleSearchElement","render_attrs_local","as_sitesearch","localSearchElement","localGoogleSearchElement","remove","preventDefault","hasClass","i","index","$par","parents","is","submit","trim","oEvent","originalEvent","parent","document","keyCode","postMessage"],"mappings":"AAAAA,QAAQ,SAAU,aAAc,SAAUC,EAAGC,GAC5C,YAGA,IAAIC,GAAkB,KAIlBC,EAAkB,IAElBC,EAAW,YACXC,EAAU,mBACVC,EAAY,kBACZC,EAAY,kBAEZC,EAAiB,cACjBC,EAAc,kBACdC,EAAa,kBACbC,EAAa,qBAEbC,EAAa,aAIjBC,QAAOC,UAAY,WAClB,OAAO,EAIR,IAAIC,GAAQ,WACXC,KAAKC,WAENF,GAAMG,UAAUC,IAAM,SAASC,GAC9B,MAAOJ,MAAKC,QAAQG,QAAQC,IAE7BN,EAAMG,UAAUI,KAAO,SAASF,EAAKG,GAEpC,MADAP,MAAKC,QAAQG,GAAOG,EACbP,KAIR,IAAIQ,GAAY,SAASC,EAAQC,GAChC,GAAIC,GAAS,IAAMD,CAEnBV,MAAKY,QAAUH,GAAU,4BACzBT,KAAKa,OAAS,GAAId,GAClBC,KAAKc,iBAAkB,EACvBd,KAAKe,WAAa,EAClBf,KAAKgB,UAAYL,EAEf3B,EAAE,WACAA,EAAE2B,GAAQM,GAAG,QAAS,QAAS,WACT,WAAhBjB,KAAKkB,SACPlB,KAAKkB,OAAS,cAMvBV,GAAUN,UAAUiB,QAAU,SAASC,GAClCpB,KAAKc,kBAIT9B,EAAEgB,KAAKgB,WACLK,KAAKD,GACLE,SAAS,UAEXtB,KAAKuB,aAAa,KAEnBf,EAAUN,UAAUqB,aAAe,SAASC,GAC3C,GACCC,GAAUC,EADPC,EAAY3C,EAAE,WAAYA,EAAEgB,KAAKgB,YAEpCY,EAAY,cAEb,IAAKD,EAAUE,OAAf,CAaA,GATAF,EAAUG,QAAQN,GACM,IAApBxB,KAAKe,YACRU,EAAWE,EAAUI,IAAIH,GACzBF,EAAY,IAEZD,EAAWE,EAAUK,OAAOJ,GAC5BF,EAAY,IAGRD,EAAS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SAASiF,GAChC,GAA8B3D,GAA1B8G,EAASnD,EAAEoD,aAEVjC,GAAcgC,EAAO/B,SAQC,gBAAhB+B,GAAOjI,OAIlBmB,EAAIvD,EAAEoK,KAAKC,EAAOjI,MAClBoG,EAAajF,MAGdvD,EAAEa,QAAQoB,GAAG,WAAY,SAASiF,GACjC,GAAImD,GAASnD,EAAEoD,cACd/G,EAAIqB,GAAU,EAEXyF,GAAO1G,QACVJ,EAAI8G,EAAO1G,MAAMe,OAAS,IAE3B8D,EAAajF,GAAG,KAGb1C,OAAO0J,QACVvK,EAAEwK,UAAUvI,GAAG,UAAW,SAASiF,GAChB,KAAdA,EAAEuD,SACL5J,OAAO0J,OAAOG,YAAY,mBAAoB","file":"search.min.js"}
\ No newline at end of file
@charset "UTF-8";
@import "shared.less";
@import "lib/breakpoints.less";
@import "lib/colors.less";
@import "lib/fonts.less";
// Google Styles
/* Google Styles */
.gsc-control-cse,
.gsc-control-cse .gsc-table-result {
font-family: inherit;
......
@charset "UTF-8";
@import "shared.less";
@import "lib/breakpoints.less";
@import "lib/colors.less";
@import "lib/fonts.less";
// Template overrides
/* Template overrides */
.embed #visitorChat,
#wdn_search {
display: none !important;
......@@ -20,11 +17,6 @@
text-align: center;
background: #38431b url(../images/050419.jpg) 50% 50% no-repeat;
background-size: cover;
.wdn-input-group {
margin: 0 auto;
max-width: 30em;
}
}
#search_wrapper {
......@@ -73,7 +65,7 @@
}
&:before {
content: '\b7\a0'; // middle-dot + space
content: '\b7\a0'; /* middle-dot + space */
}
&:first-child:before {
......@@ -188,7 +180,7 @@
display: none;
}
// Directory Styles
/* Directory Styles */
#ppl_results {
h3, h4, .result_head {
display: none;
......@@ -260,7 +252,6 @@
.given-name {
margin-left: 1em;
font-size: 1rem;
.sans-serif-font();
text-transform: uppercase;
color: @ui08;
}
......
/* Colors */
/* Scarlet */
@scarlet: #d00000;
@brand: @scarlet;
/* Cream */
@cream: #fefdfa;
@page-background: @cream; // A color to represent the page background, used for WDN colors
/* A few neutral shades, light tan and dark brown */
@neutral: #4a3b13;
@light-neutral: lighten(desaturate(@neutral, 15%), 5%);
/* UI */
/* Light (<50%) */
@ui02: mix(#000, @cream, 4%); /* #f4f3f0 */
@ui03: mix(#000, @cream, 8%); /* #eae9e6 */
@ui04: mix(#000, @cream, 16%); /* #d5d5d2 */
/* Dark (>50%) */
@ui08: mix(#000, @cream, 64%); /* #5b5b5a */
@ui09: mix(#000, @cream, 72%); /* #474746 */
/* Break Points */
/* Standard, width-based media queries */
@bp768: ~" (min-width: 48em)";
/* Deprecated names */
@bp2: @bp768;
/* Fonts */
.sans-serif-font() {
font-family: 'Gotham SSm A', 'Gotham SSm B', Verdana, sans-serif;
font-weight: 400;
font-style: normal;
}
// TODO: Import DCF mixins
// @import "mixins/_mixins.backgrounds.scss";
// @import "mixins/_mixins.margins.scss";
// @import "mixins/_mixins.padding.scss";
// @import "mixins/_mixins.typography.scss";
// !UNL Google Search Results Overrides
.unl .gcsc-branding,
.unl .gsc-url-bottom,
.unl .gsc-table-cell-snippet-close .gs-title {
display: none;
}
.unl .google-results table,
.unl .google-results tbody th,
.unl .google-results tbody td {
border: 0 !important;
}
.unl .google-results tbody th,
.unl .google-results tbody td {
padding: 0;
}
.unl .gsc-control-cse {
// @include bg-transparent;
background-color: transparent;
border: 0;
font-family: inherit;
font-size: inherit;
padding: 0;
}
.unl .cse .gsc-control-cse {
// @include bg-transparent;
background-color: transparent;
border: 0;
padding: 0;
}
.unl .gsc-control-cse .gsc-table-result {
display: flex;
font-family: inherit;
font-size: inherit;
padding: 0;
}
.unl .gsc-above-wrapper-area {
border: 0;
// @include mb-7;
margin-bottom: 2.37em;
padding: 0;
}
.unl .gsc-result-info {
font-size: inherit;
margin: 0;
padding: 0;
color: var(--dark-gray);
}
.unl .gsc-webResult .gsc-result {
border: 0;
// @include pb-7;
padding-bottom: 2.37em;
padding-top: 0;
}
.unl .gsc-thumbnail-inside {
padding-left: 0;
}
.unl .gs-result .gs-image,
.unl .gs-result .gs-promotion-image,
.unl .gs-web-image-box .gs-image,
.unl .gs-promotion-image-box .gs-promotion-image {
border: 0;
}
.unl .gsc-thumbnail-inside > .gs-title,
.unl .gsc-thumbnail-inside > .gs-title * {
// color: $scarlet;
color: var(--link);
height: initial;
text-decoration: none;
// @include lh-3;
line-height: 1.25em;
}
.unl .gsc-thumbnail-inside > .gs-title {
// @include txt-h5;
font-size: 1.5em;
margin-bottom: .18em;
}
.unl .gsc-thumbnail-inside > .gs-title * {
// @include txt-base;
font-size: 1rem;
}
.unl .gsc-thumbnail-left {
display: block;
// @include mb-1;
margin-bottom: .43em;
}
.unl .gs-snippet {
// @include mb-1;
margin-bottom: .43em;
}
.unl .gsc-control-cse .gs-snippet {
color: inherit;
}
.unl .gs-web-image-box,
.unl .gs-promotion-image-box {
padding: 0;
}
.unl .gs-promotion-image-box img.gs-promotion-image,
.unl .gs-web-image-box img.gs-image {
height: 4.21em;
object-fit: cover;
width: 4.21em;
}
.unl .gs-promotion-image-box,
.unl .gs-image-box.gs-web-image-box.gs-web-image-box-portrait,
.unl .gs-image-box.gs-web-image-box.gs-web-image-box-landscape {
margin-left: 0;
margin-right: 1em;
margin-top: .24em;
}
.unl .gsc-result.gsc-webResult:hover {
border: 0;
}
.unl .gsc-url-top {
display: block;
padding: 0 0 1em 0;
// @include txt-xs;
font-size: .75em;
}
// .unl .gsc-snippet-metadata,
// .unl .gsc-role,
// .unl .gsc-tel,
// .unl .gsc-org,
// .unl .gsc-location,
// .unl .gsc-reviewer,
// .unl .gsc-author,
// .unl .gs-result .gs-visibleUrl,
// .unl .gs-result a.gs-visibleUrl {
// color: $color-light-text;
// }
.unl .gsc-results .gsc-cursor-box {
border-bottom: 1px solid var(--b);
border-radius: 0;
border-top: 1px solid var(--b);
margin: 0 0 .75em 0;
padding-bottom: .56em;
padding-top: .56em;
}
.unl .gsc-cursor-container-previous,
.unl .gsc-cursor-container-next {
padding: 1em 0;
}
.unl .gsc-snippet-metadata,
.unl .gsc-role,
.unl .gsc-tel,
.unl .gsc-org,
.unl .gsc-location,
.unl .gsc-reviewer,
.unl .gsc-author
.unl .gs-result a.gs-visibleUrl,
.unl .gs-result .gs-visibleUrl {
color: var(--darker-gray); // TODO: replace with color variable
}
.unl .gs-result a.gs-visibleUrl,
.unl .gs-result .gs-visibleUrl {
padding-bottom: 0;
}
.unl .gcsc-find-more-on-google-root {
font-size: .84em;
margin-top: 1em;
text-align: left;
}
.unl .gcsc-more-maybe-branding-box {
border: 0;
margin: 0;
padding: 0;
}
.unl .gsc-cursor,
.unl .gcsc-find-more-on-google-magnifier {
fill: var(--link);
}
.unl .gcsc-find-more-on-google,
.unl .gsc-results .gsc-cursor-box .gsc-cursor-page,
.unl .gs-spelling a {
color: var(--link);
}
.unl .gsc-results .gsc-cursor-box .gsc-cursor-page.gsc-cursor-current-page {
font-weight: bold;
text-decoration: underline;
}
.unl .gs-spelling {
color: var(--body);
font-size: unset;
padding: 0;
}