1(function(){ 2if (window.YLOPO_WIDGETS.allTeamMembers !== undefined) { 3 return 4} 5window.YLOPO_WIDGETS.allTeamMembers = []; 6waitFor(function(){ 7 return window.YLOPO_WIDGETS && YLOPO_WIDGETS.fullSiteNav && YLOPO_WIDGETS.fullSiteNav.length > 0 8},function(hasSiteNav){ 9 if (!hasSiteNav){ 10 console.log("No site nav") 11 return 12 } 13 14 var allTeams = window.YLOPO_WIDGETS.fullSiteNav.filter(function(o){ 15 if (o.collection && o.collection.typeName === 'team' && o.collection.itemCount > 0){ 16 return true 17 } 18 }).map(function(o){ 19 return new Promise(function(resolve, reject){ 20 $.ajax({ 21 url: o.collection.fullUrl+'?format=json', 22 dataType: 'jsonp', 23 success: function(data){ 24 if (data.items){ 25 data.items.forEach(function(item){ 26 item.collectionTitle = data.collection.navigationTitle || data.collection.title; 27 item.collectionFullUrl = data.collection.fullUrl; 28 item.collectionId = data.collection.id; 29 }) 30 } else { 31 data.items = []; 32 } 33 resolve(data); 34 }, 35 error: function(err){ 36 console.log(err); 37 resolve({ 38 items: [] 39 }); 40 } 41 }); 42 }); 43 }); 44 45 Promise.all(allTeams).then(function(teams){ 46 window.YLOPO_WIDGETS.allTeamMembers = teams.reduce(function(a,o){ 47 a = a.concat(o.items); 48 return a; 49 },[]); 50 51 window.YLOPO_WIDGETS.allTeamMembers = window.YLOPO_WIDGETS.allTeamMembers.filter(function(o){ 52 return o && o.customContent && o.customContent.customType === "teamMember" 53 }); 54 55 window.YLOPO_WIDGETS.allTeamMembers._loaded = true; 56 57 if (window.YLOPO_WIDGETS.allTeamMembers.length === 0){ 58 window.YLOPO_WIDGETS.allTeamMembers._empty = true; 59 } 60 }); 61 62 63}); 64 65})();
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.