9
Technology and Science News - ABC News if (nbItemObj.notes) //author image //console.log('y'+lastNBObjStr); '+nbNote.noteHeadline+' this.social = ''; newsbulletin.authorCutouts = []; //console.log('no refresh'); this.socialStyle = ' style="height:21px; padding: 2px 0px;' + this.socialCustomStyle + '"'; isNewTemp = false; else isHeaderLinkLoaded = true; 7500) itemDetails.isExpanded = ($.inArray(itemDetails.id, fullTextList) > -1) ? accurate : false; this.itemBgPos = '100% 55%'; if (it.notes) itemDetails.link = it.link; newsbulletin.nbFooter = "" if($.browser.msie) if(isNewDataFlag) newsbulletin.nbDiv = document.getElementById('nbItemContainer'); this.text = this.textCapped + '...'; $("#newsbulletin > .midcontainer > .widget_head > .twitterLink any > .twitterContent").append("" + twitterImg + ""); $("#newsbulletin > .midcontainer").append(""); if (shareLink != '' && shareLink != null && !isShareLinkLoaded) //if merchandise just isn't expanded display capped text if applicable if (typeof hasHeight != 'undefined') it = updates[ind];

Technology and Science News - ABC News

Embed Size (px)

Citation preview

Page 1: Technology and Science News - ABC News

Technology and Science News - ABC News

if (nbItemObj.notes)//author image//console.log('y'+lastNBObjStr);

'+nbNote.noteHeadline+'

this.social = '';newsbulletin.authorCutouts = [];//console.log('no refresh');

this.socialStyle = ' style="height:21px; padding: 2px 0px;' + this.socialCustomStyle + '"';isNewTemp = false;elseisHeaderLinkLoaded = true;

7500)itemDetails.isExpanded = ($.inArray(itemDetails.id, fullTextList) > -1) ? accurate : false;

this.itemBgPos = '100% 55%';if (it.notes)itemDetails.link = it.link;

newsbulletin.nbFooter = ""if($.browser.msie)if(isNewDataFlag)

newsbulletin.nbDiv = document.getElementById('nbItemContainer');this.text = this.textCapped + '...';$("#newsbulletin > .midcontainer > .widget_head > .twitterLink any > .twitterContent").append(""+ twitterImg + "");$("#newsbulletin > .midcontainer").append("");if (shareLink != '' && shareLink != null && !isShareLinkLoaded)

//if merchandise just isn't expanded display capped text if applicableif (typeof hasHeight != 'undefined')

it = updates[ind];

Page 2: Technology and Science News - ABC News

if(nbItemObj.authortwitter != null && nbItemObj.authortwitter != '')

clearTimeout(timeoutId);

dynamicJS.load('newsBulletin'+nbjsId,newsbulletin.baseloc+'/xmldata/newsbulletin?id=15691212&twOverride=&lpos='+newsbulletin.lpos2+'&section=&'+nbjsId);

//grab previous product height$("#newsbulletin > .midcontainer > .nbFooter").append("");if(nbItemObj.text.length > 63)this.noteAuthorBlock = '';this.nbNoteDiv = '$("#newsbulletin > .midcontainer").append(newsbulletin.nbFooter);

// Initialization of the container should be done after all the markup has been loaded

$('#text_'+id).html(contentObject[id])

if(it.author.image != '' &&($.inArray(it.author.image, newsbulletin.authorCutouts) == -1))$.each(nbNotes, function(idx)//display items);function newsBulletin(data)itemDetails.notes = it.notes;

var twitterImg = " "

'+this.notesocial+'

this.nbH4Style = ' style=width:210px;';

//console.log('x'+currNBObjStr);

$.each(updates, function(ind)itemDetails.label = it.label;

if(nbNote.noteAuthor.bio != null && nbNote.noteAuthor.bio != '')//add to end up being able to ignore list

this.nbH4Class = 'class=nbheader';

this.nbTextOverride = '';

this.authorBlock = '';itemDetails.title = it.title;

Page 3: Technology and Science News - ABC News

this.textStyle = '';//retrieve the particular content material from your arrayisDoneLoading = true;isHeaderLinkLoaded = false; // flag to verify on when the header link is loaded

nbNoteStr += this.nbNoteDiv;this.notesocial = '';if(nbItemObj.authorbio != null && nbItemObj.authorbio != '')return this.rowTemp;this.socialCustomStyle = '';$("#nbItemContainer").css('height',$("#nbItemContainer").height());

this.nbItemStyleAuthor = '';if(itemDetails.label == 'Status Update')this.twitter = ''isDoneLoading = false; // flag to check when the html is completed loading inside the jScrollPaneif(nbItemObj.link != null && nbItemObj.link != '')otherwise//dynamicJS.load('newsBulletin','http://newspreview.corp.dig.com/xmldata/newsbulletin?id=13564505');

this.social = '';newsbulletin.nbDiv.innerHTML = '';//only pass the writer image if it isn't displayed inside any one of the items yetif(nbNote.noteAuthor.twitter != null && nbNote.noteAuthor.twitter != '')if(this.isStatusUpdate)'+this.notebio+'itemDetails.feed = it.feed;if(it.author.image == '')itemDetails.author = it.author.name;

newsbulletin.load()

'+nbItemObj.date+'window.api.reinitialise();if (isDoneLoading)

60000itemDetails.authortwitter = 'http://twitter.com/abc'

this.nbH4Style = '';if (idx == nbNotes.length-1)

$.each(data.updates, function(ind)';nbjsId = 0;this.fb = ''

Page 4: Technology and Science News - ABC News

updates = data.updates;

if ($.browser.webkit)this.categoryTag = '';if(nbItemObj.text != null)

this.noteAuthorBlock = '

if ($.browser.version .midcontainer > .nbFooter").css("display":"none");window.api.getContentPane().html(addOnload(newsbulletin.load());// since there's absolutely no listener that could potentially be passed directly into reinitialise()pertaining to callback

if(nbNote.noteAuthor.facebook != null && nbNote.noteAuthor.facebook != '')$('#nbItemContainer').removeAttr('style');, 3000);

this.title = ''itemDetails.bgPos = 'bottom right';//store id a new list of opened objects

function isNewData(data)

itemDetails.authorfb = it.author.facebook;this.text = nbItemObj.text;this.bio = ''+nbItemObj.author+'');this.rowTemp = ''+this.authorBlock+'it.author.image = 'http://a.abcnews.com/assets/images/abc_news_logo_84x84.png'

itemDetails.authorbio = it.author.bio;

newsbulletin.displayItems = function(nbItemObj)this.nbItemStyle = '';

if(this.notefb != '' elseif(nbItemObj.author != null && nbItemObj.author != '') this.twitter != '')this.textCapped = '';

this.authorBlock = '

shareLink = data.shareLink;var timeoutId = setTimeout(function()

itemDetails.id = it.objId;

Page 5: Technology and Science News - ABC News

isShareLinkLoaded = false; // flag to test in the wedding the share hyperlink will be loaded$("#newsbulletin > .midcontainer").append(newsbulletin.nbContainer);

//social

';

//set defaults if merchandise http://www.nytimes.com/pages/technology/index.html can become astatus update

$("#newsbulletin > .midcontainer > .nbFooter").css("display":"block");

clearTimeout(timeoutId);

if(nbItemObj.authorimage != null && nbItemObj.authorimage != '')

this.itemTypeClass = (this.isStatusUpdate)?'orange':'blue';dynamicJS.unload('newsBulletin'+nbjsId,newsbulletin.baseloc+'/xmldata/newsbulletin?id=15691212&'+nbjsId);

itemDetails.author = 'ABC News'elsefullTextList.push(id.toString());

var hasHeight = $('#nbItemContainer').attr('style'););

var oldItemHeight = $('#nbItem_'+id).height();else

this.noteSocialStyle = '';//append widget header

isShareLinkLoaded = true;//check if status update

//item sort classthis.itemBgPos = nbItemObj.bgPos;

this.bio = '';

//clear contents firstisDoneLoading = false;nbNoteStr = '';this.divider = '';if(data)

Page 6: Technology and Science News - ABC News

nbNote = nbNotes[idx];"

this.isStatusUpdate = (nbItemObj.label == 'Status Update')?true:false;

this.nbItemStyle = 'background:url('+nbItemObj.authorimage+') no-repeat bottom right'//+this.itemBgPos;itemDetails.text = it.text;this.morelink = 'More'if(currNBObjStr != lastNBObjStr)

var newContainerHeight = $("#nbItemContainer").height() + ($('#nbItem_'+id).height()-oldItemHeight);//clear mcdougal cutouts array';function()

this.textCapped = nbItemObj.text.substring(0, 63);isNewDataFlag = isNewData(data);itemDetails.authortwitter = it.author.twitter;// options we passed in are usually routinely remembered.this.rowTemp += nbNoteStr;//console.log('refresh');

this.notetwitter = ''

this.notesocial = '';headerLink = data.widgetLink;itemDetails.objType = it.objType;this.twitter = '';$("#newsbulletin > .midcontainer > .nbFooter").css("height":"35px", "border-top":"1px sound#d5d5d5", "border-bottom":"border-bottom:1px sound #eaeaea");, 5000);this.notetwitter = '';nbNotes = nbItemObj.notes;

if(nbItemObj.isExpanded != true)contentObject[itemDetails.id] = itemDetails.textnewsbulletin.authorCutouts.push(it.author.image);this.fb = '';this.text = '';

// prevents cacheing

if(nbjsId .midcontainer > .nbFooter").css("display":"none");'+this.title+'this.textStyle = ' style=width:208px;';

this.notebio = ''+nbNote.noteAuthor.name+''

Page 7: Technology and Science News - ABC News

nbNoteDivider = '';this.title = 'newsbulletin.load = function()setInterval(function()if(nbItemObj.bgPos != null);'+this.text+'$("#nbItemContainer").css('height', newContainerHeight);

this.text = this.textCapped + '... ' + this.morelink;lastNBObjStr = '';this.notebio = '';if (headerLink != '' && headerLink != null && !isHeaderLinkLoaded)//reinitialize scroll

);lastNBObjStr = currNBObjStr;if(it.author.name == '')

// check to notice if there will be a height set pertaining to container, if that's the case obvious itcurrNBObjStr = '';'+this.social+'$("#newsbulletin > .midcontainer > .nbFooter").css("display":"block");currNBObjStr = currNBObjStr + data.updates[ind].objId + data.updates[ind].date;itemDetails.authorfb = 'http://www.facebook.com/abcnews'

//to try to handle caching within webkit browsersitemDetails.date = it.date;//titlenbNoteDivider = '';

//text$("#nbItemContainer").append('');

this.social = this.fb + this.twitter;, 3000);

// a lot more convenient in order to call through the API as then a originalif(nbItemObj.authorimage != null && nbItemObj.authorimage != '')

);if(nbNote.noteAuthor.name != null && nbNote.noteAuthor.name != '')itemDetails.authorimage = it.author.image;

Page 8: Technology and Science News - ABC News

itemDetails.category = it.category;

'+this.noteAuthorBlock+''+nbItemObj.title+'//populate the actual itemDetails objectthis.notefb = '';,

return isNewTemp;

'+this.bio+'window.api.reinitialise();'

var itemDetails = new Object();

//set the height regarding container divthis.nbItemStyleAuthor = ' nbItemContentsAuthor'

if($.inArray(it.author.image, newsbulletin.authorCutouts) == -1)//build markup// we're in any position to contact "pane.jScrollPane(settings)" once more however it is

//alert(newsbulletin.baseloc+'/xmldata/newsbulletin?id=15691212&twOverride=&lpos='+newsbulletin.lpos+'&section=&'+nbjsId)this.notefb = '''+nbNote.noteOverview+'$("#newsbulletin > .midcontainer > .widget_head").append("");

this.socialStyle = '';

$("#nbItemContainer").append(newsbulletin.displayItems(itemDetails));

var timeoutId = setTimeout(function()if(nbItemObj.authorfb != null && nbItemObj.authorfb != '')function showMoreText(id)isNewTemp = true;if(it.text != '')

setInterval(

Page 9: Technology and Science News - ABC News

//build a name worth pair listing of id/text//bg position'