PageSourceSearch

https://www.mcc.edu/_resources/js/newsroom.js

js mcc.edu collected 2026-10-02 06:46:44 UTC 2,545 bytes, 47 lines download raw bytes

1var baApi = mott.api.bearAdvisory;
2var filter = baApi.lookups.BaseFilter;
3filter.types = [2]; // 1 = event / 2 = news / 3 = important - type also found in baApi.lookups.PublicationTypes /
4filter.statuses = [3];
5filter.pageSize = 3;
6filter.tagIds = [49] //Newsroom only
7filter.sortBy = 1;
8filter.dateRangeStart = '2020-04-01';
9//filter.dateRangeStart = moment().format('YYYY-MM-DD');
10$('#newsroomContainer').html('<div id="loader"><p class="ajaxloader"><img src="/_resources/images/ajax-loader.gif" alt="data loading animated bar" /><h3>Loading results &hellip; One moment please</h3></p></div>');
11//$('#eventContainer').html('<span class="text-5">Loading Events...</span>');
12baApi.publication.fetchByFilter(filter).then(function (resp) {
13	if(resp.status === 'success') {
14		$('#newsroomContainer').html('');
15		$.each(resp.data, (i, newsroom) => {
16			console.log(newsroom);
17			// var newsroomDate = moment(newsroom.dateTime);
18			//<img class="card-img-top" src="https:${newsroom.headerImage['viewUrl']}"/newsroom/images/newsroom4.jpg alt="${newsroom.headerImageAltText}" /> appear-animation data-appear-animation="fadeInUpShorter" data-appear-animation-delay="200"
19			
20			var myNewDiv =`<div class="col-lg-4 px-1" >
21<div class="card h-100"><div style="height:200px;background-color:#dedede;"><img class="card-img-top img-fluid" src="${newsroom.headerImage['viewUrl']}" alt="${newsroom.headerImageAltText}" style="height:200px;object-fit:cover;" /></div><div class="card-body h-100">
22<h3 class="card-title mb-1 text-4 font-weight-bold">${newsroom.title}</h3>`
23
24function truncate(str, no_words) {
25   return str.split(" ").splice(0,no_words).join(" ");
26
27}//<p class="card-text"></p>
28	var	para =	truncate(newsroom.body, 25)
29
30myNewDiv +=` ${para}&hellip; 
31</div>
32<div class="card-footer">
33<div class="row">
34<div class="col text-left float-left"> <!--<a href="#" class="" aria-label="Share this story on social media"> <span class="fas fa-share-alt" aria-hidden="true"></span> Share</a>--> </div>
35<div class="col text-right float-right"> <a href="${newsroom.url}" target="_blank" class="read-more font-weight-semibold text-2" aria-label="Complete Story - ${newsroom.title}">Complete Story <span class="fas fa-angle-right position-relative top-1 ml-1"></span></a> </div>
36</div>
37</div>
38</div>
39</div>`
40
41			$('#newsroomContainer').html($('#newsroomContainer').html() + myNewDiv)
42			$('#newsroomContainer2').html($('#newsroomContainer2').html() + myNewDiv)
43		}) 
44	} else {
45		$('#newsroomContainer').html('<h3 class="text-danger">Failed to Load</h3>');
46	}
47});

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.